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 (
"os"
)
type
StepPrepareTools
struct
{
type
StepPrepareTools
struct
{
RemoteType
string
`mapstructure:"remote_type"`
ToolsUploadFlavor
string
`mapstructure:"tools_upload_flavor"`
ToolsUploadPath
string
`mapstructure:"tools_upload_path"`
ToolsUploadFlavor
string
`mapstructure:"tools_upload_flavor"`
ToolsUploadPath
string
`mapstructure:"tools_upload_path"`
}
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 {
Flavor
string
}
type
StepUploadTools
struct
{
type
StepUploadTools
struct
{
RemoteType
string
`mapstructure:"remote_type"`
ToolsUploadFlavor
string
`mapstructure:"tools_upload_flavor"`
ToolsUploadPath
string
`mapstructure:"tools_upload_path"`
Tpl
*
packer
.
ConfigTemplate
ToolsUploadFlavor
string
`mapstructure:"tools_upload_flavor"`
ToolsUploadPath
string
`mapstructure:"tools_upload_path"`
Tpl
*
packer
.
ConfigTemplate
}
func
(
c
*
StepUploadTools
)
Run
(
state
multistep
.
StateBag
)
multistep
.
StepAction
{
...
...
builder/vmware/common/tools_config.go
View file @
779c7184
...
...
@@ -8,8 +8,8 @@ import (
)
type
ToolsConfig
struct
{
ToolsUploadFlavor
string
`mapstructure:"tools_upload_flavor"`
ToolsUploadPath
string
`mapstructure:"tools_upload_path"`
ToolsUploadFlavor
string
`mapstructure:"tools_upload_flavor"`
ToolsUploadPath
string
`mapstructure:"tools_upload_path"`
}
func
(
c
*
ToolsConfig
)
Prepare
(
t
*
packer
.
ConfigTemplate
)
[]
error
{
...
...
builder/vmware/iso/builder.go
View file @
779c7184
...
...
@@ -32,23 +32,23 @@ type config struct {
vmwcommon
.
ToolsConfig
`mapstructure:",squash"`
vmwcommon
.
VMXConfig
`mapstructure:",squash"`
DiskName
string
`mapstructure:"vmdk_name"`
DiskSize
uint
`mapstructure:"disk_size"`
DiskTypeId
string
`mapstructure:"disk_type_id"`
FloppyFiles
[]
string
`mapstructure:"floppy_files"`
GuestOSType
string
`mapstructure:"guest_os_type"`
ISOChecksum
string
`mapstructure:"iso_checksum"`
ISOChecksumType
string
`mapstructure:"iso_checksum_type"`
ISOUrls
[]
string
`mapstructure:"iso_urls"`
VMName
string
`mapstructure:"vm_name"`
HTTPDir
string
`mapstructure:"http_directory"`
HTTPPortMin
uint
`mapstructure:"http_port_min"`
HTTPPortMax
uint
`mapstructure:"http_port_max"`
BootCommand
[]
string
`mapstructure:"boot_command"`
SkipCompaction
bool
`mapstructure:"skip_compaction"`
VMXTemplatePath
string
`mapstructure:"vmx_template_path"`
VNCPortMin
uint
`mapstructure:"vnc_port_min"`
VNCPortMax
uint
`mapstructure:"vnc_port_max"`
DiskName
string
`mapstructure:"vmdk_name"`
DiskSize
uint
`mapstructure:"disk_size"`
DiskTypeId
string
`mapstructure:"disk_type_id"`
FloppyFiles
[]
string
`mapstructure:"floppy_files"`
GuestOSType
string
`mapstructure:"guest_os_type"`
ISOChecksum
string
`mapstructure:"iso_checksum"`
ISOChecksumType
string
`mapstructure:"iso_checksum_type"`
ISOUrls
[]
string
`mapstructure:"iso_urls"`
VMName
string
`mapstructure:"vm_name"`
HTTPDir
string
`mapstructure:"http_directory"`
HTTPPortMin
uint
`mapstructure:"http_port_min"`
HTTPPortMax
uint
`mapstructure:"http_port_max"`
BootCommand
[]
string
`mapstructure:"boot_command"`
SkipCompaction
bool
`mapstructure:"skip_compaction"`
VMXTemplatePath
string
`mapstructure:"vmx_template_path"`
VNCPortMin
uint
`mapstructure:"vnc_port_min"`
VNCPortMax
uint
`mapstructure:"vnc_port_max"`
RemoteType
string
`mapstructure:"remote_type"`
RemoteDatastore
string
`mapstructure:"remote_datastore"`
...
...
@@ -145,19 +145,19 @@ func (b *Builder) Prepare(raws ...interface{}) ([]string, error) {
// Errors
templates
:=
map
[
string
]
*
string
{
"disk_name"
:
&
b
.
config
.
DiskName
,
"guest_os_type"
:
&
b
.
config
.
GuestOSType
,
"http_directory"
:
&
b
.
config
.
HTTPDir
,
"iso_checksum"
:
&
b
.
config
.
ISOChecksum
,
"iso_checksum_type"
:
&
b
.
config
.
ISOChecksumType
,
"iso_url"
:
&
b
.
config
.
RawSingleISOUrl
,
"vm_name"
:
&
b
.
config
.
VMName
,
"vmx_template_path"
:
&
b
.
config
.
VMXTemplatePath
,
"remote_type"
:
&
b
.
config
.
RemoteType
,
"remote_host"
:
&
b
.
config
.
RemoteHost
,
"remote_datastore"
:
&
b
.
config
.
RemoteDatastore
,
"remote_user"
:
&
b
.
config
.
RemoteUser
,
"remote_password"
:
&
b
.
config
.
RemotePassword
,
"disk_name"
:
&
b
.
config
.
DiskName
,
"guest_os_type"
:
&
b
.
config
.
GuestOSType
,
"http_directory"
:
&
b
.
config
.
HTTPDir
,
"iso_checksum"
:
&
b
.
config
.
ISOChecksum
,
"iso_checksum_type"
:
&
b
.
config
.
ISOChecksumType
,
"iso_url"
:
&
b
.
config
.
RawSingleISOUrl
,
"vm_name"
:
&
b
.
config
.
VMName
,
"vmx_template_path"
:
&
b
.
config
.
VMXTemplatePath
,
"remote_type"
:
&
b
.
config
.
RemoteType
,
"remote_host"
:
&
b
.
config
.
RemoteHost
,
"remote_datastore"
:
&
b
.
config
.
RemoteDatastore
,
"remote_user"
:
&
b
.
config
.
RemoteUser
,
"remote_password"
:
&
b
.
config
.
RemotePassword
,
}
for
n
,
ptr
:=
range
templates
{
...
...
@@ -310,9 +310,9 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
steps
:=
[]
multistep
.
Step
{
&
vmwcommon
.
StepPrepareTools
{
RemoteType
:
b
.
config
.
RemoteType
,
RemoteType
:
b
.
config
.
RemoteType
,
ToolsUploadFlavor
:
b
.
config
.
ToolsUploadFlavor
,
ToolsUploadPath
:
b
.
config
.
ToolsUploadPath
,
ToolsUploadPath
:
b
.
config
.
ToolsUploadPath
,
},
&
common
.
StepDownload
{
Checksum
:
b
.
config
.
ISOChecksum
,
...
...
@@ -357,10 +357,10 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
NoPty
:
b
.
config
.
SSHSkipRequestPty
,
},
&
vmwcommon
.
StepUploadTools
{
RemoteType
:
b
.
config
.
RemoteType
,
RemoteType
:
b
.
config
.
RemoteType
,
ToolsUploadFlavor
:
b
.
config
.
ToolsUploadFlavor
,
ToolsUploadPath
:
b
.
config
.
ToolsUploadPath
,
Tpl
:
b
.
config
.
tpl
,
ToolsUploadPath
:
b
.
config
.
ToolsUploadPath
,
Tpl
:
b
.
config
.
tpl
,
},
&
common
.
StepProvision
{},
&
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
// Build the steps.
steps
:=
[]
multistep
.
Step
{
&
vmwcommon
.
StepPrepareTools
{
RemoteType
:
b
.
config
.
RemoteType
,
RemoteType
:
b
.
config
.
RemoteType
,
ToolsUploadFlavor
:
b
.
config
.
ToolsUploadFlavor
,
ToolsUploadPath
:
b
.
config
.
ToolsUploadPath
,
ToolsUploadPath
:
b
.
config
.
ToolsUploadPath
,
},
&
vmwcommon
.
StepOutputDir
{
Force
:
b
.
config
.
PackerForce
,
...
...
@@ -84,10 +84,10 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
NoPty
:
b
.
config
.
SSHSkipRequestPty
,
},
&
vmwcommon
.
StepUploadTools
{
RemoteType
:
b
.
config
.
RemoteType
,
RemoteType
:
b
.
config
.
RemoteType
,
ToolsUploadFlavor
:
b
.
config
.
ToolsUploadFlavor
,
ToolsUploadPath
:
b
.
config
.
ToolsUploadPath
,
Tpl
:
b
.
config
.
tpl
,
ToolsUploadPath
:
b
.
config
.
ToolsUploadPath
,
Tpl
:
b
.
config
.
tpl
,
},
&
common
.
StepProvision
{},
&
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