Commit 779c7184 authored by Ross Smith II's avatar Ross Smith II

go fmt

parent ba132396
...@@ -6,10 +6,10 @@ import ( ...@@ -6,10 +6,10 @@ import (
"os" "os"
) )
type StepPrepareTools struct{ type StepPrepareTools struct {
RemoteType string `mapstructure:"remote_type"` RemoteType string `mapstructure:"remote_type"`
ToolsUploadFlavor string `mapstructure:"tools_upload_flavor"` ToolsUploadFlavor string `mapstructure:"tools_upload_flavor"`
ToolsUploadPath string `mapstructure:"tools_upload_path"` ToolsUploadPath string `mapstructure:"tools_upload_path"`
} }
func (c *StepPrepareTools) Run(state multistep.StateBag) multistep.StepAction { func (c *StepPrepareTools) Run(state multistep.StateBag) multistep.StepAction {
......
...@@ -11,11 +11,11 @@ type toolsUploadPathTemplate struct { ...@@ -11,11 +11,11 @@ type toolsUploadPathTemplate struct {
Flavor string Flavor string
} }
type StepUploadTools struct{ type StepUploadTools struct {
RemoteType string `mapstructure:"remote_type"` RemoteType string `mapstructure:"remote_type"`
ToolsUploadFlavor string `mapstructure:"tools_upload_flavor"` ToolsUploadFlavor string `mapstructure:"tools_upload_flavor"`
ToolsUploadPath string `mapstructure:"tools_upload_path"` ToolsUploadPath string `mapstructure:"tools_upload_path"`
Tpl *packer.ConfigTemplate Tpl *packer.ConfigTemplate
} }
func (c *StepUploadTools) Run(state multistep.StateBag) multistep.StepAction { func (c *StepUploadTools) Run(state multistep.StateBag) multistep.StepAction {
......
...@@ -8,8 +8,8 @@ import ( ...@@ -8,8 +8,8 @@ import (
) )
type ToolsConfig struct { type ToolsConfig struct {
ToolsUploadFlavor string `mapstructure:"tools_upload_flavor"` ToolsUploadFlavor string `mapstructure:"tools_upload_flavor"`
ToolsUploadPath string `mapstructure:"tools_upload_path"` ToolsUploadPath string `mapstructure:"tools_upload_path"`
} }
func (c *ToolsConfig) Prepare(t *packer.ConfigTemplate) []error { func (c *ToolsConfig) Prepare(t *packer.ConfigTemplate) []error {
......
...@@ -32,23 +32,23 @@ type config struct { ...@@ -32,23 +32,23 @@ type config struct {
vmwcommon.ToolsConfig `mapstructure:",squash"` vmwcommon.ToolsConfig `mapstructure:",squash"`
vmwcommon.VMXConfig `mapstructure:",squash"` vmwcommon.VMXConfig `mapstructure:",squash"`
DiskName string `mapstructure:"vmdk_name"` DiskName string `mapstructure:"vmdk_name"`
DiskSize uint `mapstructure:"disk_size"` DiskSize uint `mapstructure:"disk_size"`
DiskTypeId string `mapstructure:"disk_type_id"` DiskTypeId string `mapstructure:"disk_type_id"`
FloppyFiles []string `mapstructure:"floppy_files"` FloppyFiles []string `mapstructure:"floppy_files"`
GuestOSType string `mapstructure:"guest_os_type"` GuestOSType string `mapstructure:"guest_os_type"`
ISOChecksum string `mapstructure:"iso_checksum"` ISOChecksum string `mapstructure:"iso_checksum"`
ISOChecksumType string `mapstructure:"iso_checksum_type"` ISOChecksumType string `mapstructure:"iso_checksum_type"`
ISOUrls []string `mapstructure:"iso_urls"` ISOUrls []string `mapstructure:"iso_urls"`
VMName string `mapstructure:"vm_name"` VMName string `mapstructure:"vm_name"`
HTTPDir string `mapstructure:"http_directory"` HTTPDir string `mapstructure:"http_directory"`
HTTPPortMin uint `mapstructure:"http_port_min"` HTTPPortMin uint `mapstructure:"http_port_min"`
HTTPPortMax uint `mapstructure:"http_port_max"` HTTPPortMax uint `mapstructure:"http_port_max"`
BootCommand []string `mapstructure:"boot_command"` BootCommand []string `mapstructure:"boot_command"`
SkipCompaction bool `mapstructure:"skip_compaction"` SkipCompaction bool `mapstructure:"skip_compaction"`
VMXTemplatePath string `mapstructure:"vmx_template_path"` VMXTemplatePath string `mapstructure:"vmx_template_path"`
VNCPortMin uint `mapstructure:"vnc_port_min"` VNCPortMin uint `mapstructure:"vnc_port_min"`
VNCPortMax uint `mapstructure:"vnc_port_max"` VNCPortMax uint `mapstructure:"vnc_port_max"`
RemoteType string `mapstructure:"remote_type"` RemoteType string `mapstructure:"remote_type"`
RemoteDatastore string `mapstructure:"remote_datastore"` RemoteDatastore string `mapstructure:"remote_datastore"`
...@@ -145,19 +145,19 @@ func (b *Builder) Prepare(raws ...interface{}) ([]string, error) { ...@@ -145,19 +145,19 @@ func (b *Builder) Prepare(raws ...interface{}) ([]string, error) {
// Errors // Errors
templates := map[string]*string{ templates := map[string]*string{
"disk_name": &b.config.DiskName, "disk_name": &b.config.DiskName,
"guest_os_type": &b.config.GuestOSType, "guest_os_type": &b.config.GuestOSType,
"http_directory": &b.config.HTTPDir, "http_directory": &b.config.HTTPDir,
"iso_checksum": &b.config.ISOChecksum, "iso_checksum": &b.config.ISOChecksum,
"iso_checksum_type": &b.config.ISOChecksumType, "iso_checksum_type": &b.config.ISOChecksumType,
"iso_url": &b.config.RawSingleISOUrl, "iso_url": &b.config.RawSingleISOUrl,
"vm_name": &b.config.VMName, "vm_name": &b.config.VMName,
"vmx_template_path": &b.config.VMXTemplatePath, "vmx_template_path": &b.config.VMXTemplatePath,
"remote_type": &b.config.RemoteType, "remote_type": &b.config.RemoteType,
"remote_host": &b.config.RemoteHost, "remote_host": &b.config.RemoteHost,
"remote_datastore": &b.config.RemoteDatastore, "remote_datastore": &b.config.RemoteDatastore,
"remote_user": &b.config.RemoteUser, "remote_user": &b.config.RemoteUser,
"remote_password": &b.config.RemotePassword, "remote_password": &b.config.RemotePassword,
} }
for n, ptr := range templates { for n, ptr := range templates {
...@@ -310,9 +310,9 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe ...@@ -310,9 +310,9 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
steps := []multistep.Step{ steps := []multistep.Step{
&vmwcommon.StepPrepareTools{ &vmwcommon.StepPrepareTools{
RemoteType: b.config.RemoteType, RemoteType: b.config.RemoteType,
ToolsUploadFlavor: b.config.ToolsUploadFlavor, ToolsUploadFlavor: b.config.ToolsUploadFlavor,
ToolsUploadPath: b.config.ToolsUploadPath, ToolsUploadPath: b.config.ToolsUploadPath,
}, },
&common.StepDownload{ &common.StepDownload{
Checksum: b.config.ISOChecksum, Checksum: b.config.ISOChecksum,
...@@ -357,10 +357,10 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe ...@@ -357,10 +357,10 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
NoPty: b.config.SSHSkipRequestPty, NoPty: b.config.SSHSkipRequestPty,
}, },
&vmwcommon.StepUploadTools{ &vmwcommon.StepUploadTools{
RemoteType: b.config.RemoteType, RemoteType: b.config.RemoteType,
ToolsUploadFlavor: b.config.ToolsUploadFlavor, ToolsUploadFlavor: b.config.ToolsUploadFlavor,
ToolsUploadPath: b.config.ToolsUploadPath, ToolsUploadPath: b.config.ToolsUploadPath,
Tpl: b.config.tpl, Tpl: b.config.tpl,
}, },
&common.StepProvision{}, &common.StepProvision{},
&vmwcommon.StepShutdown{ &vmwcommon.StepShutdown{
......
...@@ -53,9 +53,9 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe ...@@ -53,9 +53,9 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
// Build the steps. // Build the steps.
steps := []multistep.Step{ steps := []multistep.Step{
&vmwcommon.StepPrepareTools{ &vmwcommon.StepPrepareTools{
RemoteType: b.config.RemoteType, RemoteType: b.config.RemoteType,
ToolsUploadFlavor: b.config.ToolsUploadFlavor, ToolsUploadFlavor: b.config.ToolsUploadFlavor,
ToolsUploadPath: b.config.ToolsUploadPath, ToolsUploadPath: b.config.ToolsUploadPath,
}, },
&vmwcommon.StepOutputDir{ &vmwcommon.StepOutputDir{
Force: b.config.PackerForce, Force: b.config.PackerForce,
...@@ -84,10 +84,10 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe ...@@ -84,10 +84,10 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
NoPty: b.config.SSHSkipRequestPty, NoPty: b.config.SSHSkipRequestPty,
}, },
&vmwcommon.StepUploadTools{ &vmwcommon.StepUploadTools{
RemoteType: b.config.RemoteType, RemoteType: b.config.RemoteType,
ToolsUploadFlavor: b.config.ToolsUploadFlavor, ToolsUploadFlavor: b.config.ToolsUploadFlavor,
ToolsUploadPath: b.config.ToolsUploadPath, ToolsUploadPath: b.config.ToolsUploadPath,
Tpl: b.config.tpl, Tpl: b.config.tpl,
}, },
&common.StepProvision{}, &common.StepProvision{},
&vmwcommon.StepShutdown{ &vmwcommon.StepShutdown{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment