Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
packer
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kristopher Ruzic
packer
Commits
779c7184
Commit
779c7184
authored
May 09, 2014
by
Ross Smith II
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
go fmt
parent
ba132396
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
49 additions
and
49 deletions
+49
-49
builder/vmware/common/step_prepare_tools.go
builder/vmware/common/step_prepare_tools.go
+3
-3
builder/vmware/common/step_upload_tools.go
builder/vmware/common/step_upload_tools.go
+4
-4
builder/vmware/common/tools_config.go
builder/vmware/common/tools_config.go
+2
-2
builder/vmware/iso/builder.go
builder/vmware/iso/builder.go
+35
-35
builder/vmware/vmx/builder.go
builder/vmware/vmx/builder.go
+5
-5
No files found.
builder/vmware/common/step_prepare_tools.go
View file @
779c7184
...
@@ -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
{
...
...
builder/vmware/common/step_upload_tools.go
View file @
779c7184
...
@@ -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
{
...
...
builder/vmware/common/tools_config.go
View file @
779c7184
...
@@ -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
{
...
...
builder/vmware/iso/builder.go
View file @
779c7184
...
@@ -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
{
...
...
builder/vmware/vmx/builder.go
View file @
779c7184
...
@@ -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
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment