From 903febc4ea8ab540e7bd4a3d235e32346076c2ca Mon Sep 17 00:00:00 2001 From: Michael Kuzmin Date: Sat, 12 May 2018 14:19:17 +0300 Subject: [PATCH] Update dependency to govmomi 0.17 --- Gopkg.lock | 7 ++++--- Gopkg.toml | 2 +- clone/builder_acc_test.go | 6 +++--- driver/vm.go | 6 +++--- driver/vm_clone_acc_test.go | 6 +++--- iso/builder_acc_test.go | 6 +++--- 6 files changed, 17 insertions(+), 16 deletions(-) diff --git a/Gopkg.lock b/Gopkg.lock index a9c04ce89..e4f7e7023 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -194,6 +194,7 @@ ".", "find", "list", + "nfc", "object", "property", "session", @@ -207,8 +208,8 @@ "vim25/types", "vim25/xml" ] - revision = "b63044e5f833781eb7b305bc035392480ee06a82" - version = "v0.15.0" + revision = "123ed177021588bac57b5c87c1a84270ddf2eca8" + version = "v0.17.1" [[projects]] branch = "master" @@ -270,6 +271,6 @@ [solve-meta] analyzer-name = "dep" analyzer-version = 1 - inputs-digest = "adae0b19fa6fd48440ded469329ce77fcaf433c61f699d2405d87ad75650f551" + inputs-digest = "4e43d31e08e37dfb7449ddb1cc361b739f2b65e95d3e560d4e31d40fbabab044" solver-name = "gps-cdcl" solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml index 44d5238a7..5f33f3bef 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -4,7 +4,7 @@ [[constraint]] name = "github.com/vmware/govmomi" - version = "=0.15.0" + version = "~0.17" [[override]] name = "github.com/masterzen/azure-sdk-for-go" diff --git a/clone/builder_acc_test.go b/clone/builder_acc_test.go index dfece3151..8ce956bd5 100644 --- a/clone/builder_acc_test.go +++ b/clone/builder_acc_test.go @@ -348,12 +348,12 @@ func checkHardware(t *testing.T) builderT.TestCheckFunc { t.Errorf("VM should have 2 CPU sockets, got %v", cpuSockets) } - cpuReservation := vmInfo.Config.CpuAllocation.GetResourceAllocationInfo().Reservation + cpuReservation := *vmInfo.Config.CpuAllocation.Reservation if cpuReservation != 1000 { t.Errorf("VM should have CPU reservation for 1000 Mhz, got %v", cpuReservation) } - cpuLimit := vmInfo.Config.CpuAllocation.GetResourceAllocationInfo().Limit + cpuLimit := *vmInfo.Config.CpuAllocation.Limit if cpuLimit != 1500 { t.Errorf("VM should have CPU reservation for 1500 Mhz, got %v", cpuLimit) } @@ -363,7 +363,7 @@ func checkHardware(t *testing.T) builderT.TestCheckFunc { t.Errorf("VM should have 2048 MB of RAM, got %v", ram) } - ramReservation := vmInfo.Config.MemoryAllocation.GetResourceAllocationInfo().Reservation + ramReservation := *vmInfo.Config.MemoryAllocation.Reservation if ramReservation != 1024 { t.Errorf("VM should have RAM reservation for 1024 MB, got %v", ramReservation) } diff --git a/driver/vm.go b/driver/vm.go index 520f1f3ff..db3eb4d66 100644 --- a/driver/vm.go +++ b/driver/vm.go @@ -248,12 +248,12 @@ func (vm *VirtualMachine) Configure(config *HardwareConfig) error { confSpec.MemoryMB = config.RAM var cpuSpec types.ResourceAllocationInfo - cpuSpec.Reservation = config.CPUReservation - cpuSpec.Limit = config.CPULimit + cpuSpec.Reservation = &config.CPUReservation + cpuSpec.Limit = &config.CPULimit confSpec.CpuAllocation = &cpuSpec var ramSpec types.ResourceAllocationInfo - ramSpec.Reservation = config.RAMReservation + ramSpec.Reservation = &config.RAMReservation confSpec.MemoryAllocation = &ramSpec confSpec.MemoryReservationLockedToMax = &config.RAMReserveAll diff --git a/driver/vm_clone_acc_test.go b/driver/vm_clone_acc_test.go index 629e5f6b2..8a023a897 100644 --- a/driver/vm_clone_acc_test.go +++ b/driver/vm_clone_acc_test.go @@ -134,12 +134,12 @@ func configureCheck(t *testing.T, vm *VirtualMachine, _ *CloneConfig) { t.Errorf("VM should have %v CPU sockets, got %v", hwConfig.CPUs, cpuSockets) } - cpuReservation := vmInfo.Config.CpuAllocation.GetResourceAllocationInfo().Reservation + cpuReservation := *vmInfo.Config.CpuAllocation.Reservation if cpuReservation != hwConfig.CPUReservation { t.Errorf("VM should have CPU reservation for %v Mhz, got %v", hwConfig.CPUReservation, cpuReservation) } - cpuLimit := vmInfo.Config.CpuAllocation.GetResourceAllocationInfo().Limit + cpuLimit := *vmInfo.Config.CpuAllocation.Limit if cpuLimit != hwConfig.CPULimit { t.Errorf("VM should have CPU reservation for %v Mhz, got %v", hwConfig.CPULimit, cpuLimit) } @@ -149,7 +149,7 @@ func configureCheck(t *testing.T, vm *VirtualMachine, _ *CloneConfig) { t.Errorf("VM should have %v MB of RAM, got %v", hwConfig.RAM, ram) } - ramReservation := vmInfo.Config.MemoryAllocation.GetResourceAllocationInfo().Reservation + ramReservation := *vmInfo.Config.MemoryAllocation.Reservation if ramReservation != hwConfig.RAMReservation { t.Errorf("VM should have RAM reservation for %v MB, got %v", hwConfig.RAMReservation, ramReservation) } diff --git a/iso/builder_acc_test.go b/iso/builder_acc_test.go index a1d0ef82a..288780a09 100644 --- a/iso/builder_acc_test.go +++ b/iso/builder_acc_test.go @@ -130,12 +130,12 @@ func checkHardware(t *testing.T) builderT.TestCheckFunc { t.Errorf("VM should have 2 CPU sockets, got %v", cpuSockets) } - cpuReservation := vmInfo.Config.CpuAllocation.GetResourceAllocationInfo().Reservation + cpuReservation := *vmInfo.Config.CpuAllocation.Reservation if cpuReservation != 1000 { t.Errorf("VM should have CPU reservation for 1000 Mhz, got %v", cpuReservation) } - cpuLimit := vmInfo.Config.CpuAllocation.GetResourceAllocationInfo().Limit + cpuLimit := *vmInfo.Config.CpuAllocation.Limit if cpuLimit != 1500 { t.Errorf("VM should have CPU reservation for 1500 Mhz, got %v", cpuLimit) } @@ -145,7 +145,7 @@ func checkHardware(t *testing.T) builderT.TestCheckFunc { t.Errorf("VM should have 2048 MB of RAM, got %v", ram) } - ramReservation := vmInfo.Config.MemoryAllocation.GetResourceAllocationInfo().Reservation + ramReservation := *vmInfo.Config.MemoryAllocation.Reservation if ramReservation != 1024 { t.Errorf("VM should have RAM reservation for 1024 MB, got %v", ramReservation) }