Skip to content

Commit

Permalink
Remove additional unuseful comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Jorge-Holgado authored and marinsalinas committed Aug 21, 2019
1 parent 1ba8002 commit 7123f52
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions nutanix/resource_nutanix_virtual_machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -985,12 +985,6 @@ func resourceNutanixVirtualMachineUpdate(d *schema.ResourceData, meta interface{

log.Printf("[Debug] Updating VM values %s", d.Id())

//First, shutDown the VM.
//skip it here, It will depend on the changes
//if err := changePowerState(conn, d.Id(), "OFF"); err != nil {
// return fmt.Errorf("internal error: cannot shut down the VM with UUID(%s): %s", d.Id(), err)
//}

request := &v3.VMIntentInput{}
metadata := &v3.Metadata{}
res := &v3.VMResources{}
Expand Down Expand Up @@ -1035,13 +1029,11 @@ func resourceNutanixVirtualMachineUpdate(d *schema.ResourceData, meta interface{
metadata.ProjectReference = validateRef(n.(map[string]interface{}))
hotPlugChange = false
}
// hotplug option
spec.Name = response.Status.Name
if d.HasChange("name") {
_, n := d.GetChange("name")
spec.Name = utils.StringPtr(n.(string))
}
// hotplug option
spec.Description = response.Status.Description
if d.HasChange("description") {
_, n := d.GetChange("description")
Expand Down Expand Up @@ -1076,23 +1068,20 @@ func resourceNutanixVirtualMachineUpdate(d *schema.ResourceData, meta interface{
res.GuestOsID = utils.StringPtr(n.(string))
hotPlugChange = false
}
// hotplug option just in case of higher value being applied
if d.HasChange("num_vcpus_per_socket") {
o, n := d.GetChange("num_vcpus_per_socket")
res.NumVcpusPerSocket = utils.Int64Ptr(int64(n.(int)))
if n.(int) < o.(int) {
hotPlugChange = false
}
}
// hotplug option just in case of higher value being applied
if d.HasChange("num_sockets") {
o, n := d.GetChange("num_sockets")
res.NumSockets = utils.Int64Ptr(int64(n.(int)))
if n.(int) < o.(int) {
hotPlugChange = false
}
}
// hotplug option just in case of higher value being applied
if d.HasChange("memory_size_mib") {
o, n := d.GetChange("memory_size_mib")
res.MemorySizeMib = utils.Int64Ptr(int64(n.(int)))
Expand Down

0 comments on commit 7123f52

Please sign in to comment.