Skip to content

Commit

Permalink
Apply code formatting recommendations.
Browse files Browse the repository at this point in the history
  • Loading branch information
MrKeiKun committed Aug 5, 2023
1 parent 8d8c36a commit 79b124a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 16 deletions.
25 changes: 13 additions & 12 deletions builder/vsphere/driver/vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,18 +117,19 @@ type NIC struct {
}

type CreateConfig struct {
Annotation string
Name string
Folder string
Cluster string
Host string
ResourcePool string
Datastore string
GuestOS string // example: otherGuest
NICs []NIC
USBController []string
Version uint // example: 10
StorageConfig StorageConfig
Annotation string
Name string
Folder string
Cluster string
Host string
ResourcePool string
Datastore string
GuestOS string // example: otherGuest
NICs []NIC
USBController []string
Version uint // example: 10
StorageConfig StorageConfig
VAppProperties map[string]string
}

func (d *VCenterDriver) NewVM(ref *types.ManagedObjectReference) VirtualMachine {
Expand Down
6 changes: 3 additions & 3 deletions builder/vsphere/iso/step_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ type CreateConfig struct {
// VM notes.
Notes string `mapstructure:"notes"`
// If set to true, the VM will be destroyed after the builder completes
Destroy bool `mapstructure:"destroy"`
VAppConfig vAppConfig `mapstructure:"vapp"`
Destroy bool `mapstructure:"destroy"`
VAppConfig vAppConfig `mapstructure:"vapp"`
}

func (c *CreateConfig) Prepare() []error {
Expand Down Expand Up @@ -178,7 +178,7 @@ func (s *StepCreateVM) Run(_ context.Context, state multistep.StateBag) multiste
}

vm, err := d.CreateVM(&driver.CreateConfig{
VAppProperties: s.Config.VAppConfig.Properties,
VAppProperties: s.Config.VAppConfig.Properties,
StorageConfig: driver.StorageConfig{
DiskControllerType: s.Config.StorageConfig.DiskControllerType,
Storage: disks,
Expand Down
2 changes: 1 addition & 1 deletion builder/vsphere/iso/step_create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ func driverCreateConfig(config *CreateConfig, location *common.LocationConfig) *
}

return &driver.CreateConfig{
VAppProperties: config.VAppConfig.Properties,
VAppProperties: config.VAppConfig.Properties,
StorageConfig: driver.StorageConfig{
DiskControllerType: config.StorageConfig.DiskControllerType,
Storage: disks,
Expand Down

0 comments on commit 79b124a

Please sign in to comment.