This commit is contained in:
ktruong7 2013-11-07 11:22:24 -05:00
parent f01346d305
commit f41915d291
3 changed files with 0 additions and 35 deletions

View File

@ -54,7 +54,6 @@ type config struct {
VMXTemplatePath string `mapstructure:"vmx_template_path"`
VNCPortMin uint `mapstructure:"vnc_port_min"`
VNCPortMax uint `mapstructure:"vnc_port_max"`
Description string `mapstructure:"description"`
RawBootWait string `mapstructure:"boot_wait"`
RawSingleISOUrl string `mapstructure:"iso_url"`
@ -139,10 +138,6 @@ func (b *Builder) Prepare(raws ...interface{}) ([]string, error) {
if b.config.ToolsUploadPath == "" {
b.config.ToolsUploadPath = "{{ .Flavor }}.iso"
}
if b.config.Description == "" {
b.config.Description = "<No Description>"
}
// Errors
templates := map[string]*string{

View File

@ -744,34 +744,6 @@ func TestBuilderPrepare_VNCPort(t *testing.T) {
}
}
func TestBuilderPrepare_Description(t *testing.T) {
var b Builder
config := testConfig()
// Test with no description field
config["description"] = ""
warns, err := b.Prepare(config)
if len(warns) > 0 {
t.Fatalf("bad: %#v", warns)
}
if err != nil {
t.Fatalf("err: %s", err)
}
if b.config.Description != "<No Description>" {
t.Fatalf("Wrong value: %s", b.config.Description)
}
// Test with a description field
config["description"] = "VM description"
warns, err = b.Prepare(config)
if len(warns) > 0 {
t.Fatalf("bad: %#v", warns)
}
if b.config.Description != "VM description" {
t.Fatalf("Wrong value: %s", b.config.Description)
}
}
func TestBuilderPrepare_VMXData(t *testing.T) {
var b Builder
config := testConfig()

View File

@ -90,8 +90,6 @@ func (stepCreateVMX) Run(state multistep.StateBag) multistep.StepAction {
// Set this so that no dialogs ever appear from Packer.
vmxData["msg.autoAnswer"] = "true"
// prints the template description into the "notes" field on VMWare
vmxData["annotation"] = config.Description
vmxPath := filepath.Join(config.OutputDir, config.VMName+".vmx")
if err := WriteVMX(vmxPath, vmxData); err != nil {