Skip to content

Commit

Permalink
vcsim: more input spec honored in ReConfig VM
Browse files Browse the repository at this point in the history
  • Loading branch information
Yongkun Anfernee Gui committed Dec 20, 2017
1 parent 2892ed5 commit 5073546
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions simulator/virtual_machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,12 @@ func (vm *VirtualMachine) apply(spec *types.VirtualMachineConfigSpec) {
src string
dst *string
}{
{spec.AlternateGuestName, &vm.Config.AlternateGuestName},
{spec.Annotation, &vm.Config.Annotation},
{spec.Firmware, &vm.Config.Firmware},
{spec.InstanceUuid, &vm.Config.InstanceUuid},
{spec.LocationId, &vm.Config.LocationId},
{spec.NpivWorldWideNameType, &vm.Config.NpivWorldWideNameType},
{spec.Name, &vm.Name},
{spec.Name, &vm.Config.Name},
{spec.Name, &vm.Summary.Config.Name},
Expand Down Expand Up @@ -164,6 +170,30 @@ func (vm *VirtualMachine) apply(spec *types.VirtualMachineConfigSpec) {
}
}

if spec.Flags != nil {
vm.Config.Flags = *spec.Flags
}

if spec.LatencySensitivity != nil {
vm.Config.LatencySensitivity = spec.LatencySensitivity
}

if spec.ManagedBy != nil {
vm.Config.ManagedBy = spec.ManagedBy
}

if spec.BootOptions != nil {
vm.Config.BootOptions = spec.BootOptions
}

if spec.RepConfig != nil {
vm.Config.RepConfig = spec.RepConfig
}

if spec.Tools != nil {
vm.Config.Tools = spec.Tools
}

if spec.ConsolePreferences != nil {
vm.Config.ConsolePreferences = spec.ConsolePreferences
}
Expand Down

0 comments on commit 5073546

Please sign in to comment.