VMware: Stop setting dynamicType
To remove the storage policy associated with a volume in vCenter, we use a type in vSphere API called VirtualMachineEmptyProfileSpec. Prior to vSphere 6, this type has only an optional field 'dynamicType' inherited from its base class. Since oslo.vmware prunes empty types, we have to set this. But this property is now removed in vSphere 6.0+. Removing the statement to set 'dynamicType' and relying on oslo.vmware not to prune types without any fields set. Closes-bug: #1688373 Related-bug: #1688376 Change-Id: Id9d2d1b53ee4a6069d53e6f54704632354b96bbd
This commit is contained in:
parent
cfe138bf81
commit
43101af292
@ -1219,7 +1219,6 @@ class VolumeOpsTestCase(test.TestCase):
|
||||
backing = mock.sentinel.backing
|
||||
self.vops.change_backing_profile(backing, None)
|
||||
|
||||
self.assertEqual('profile', empty_profile_spec.dynamicType)
|
||||
self.assertEqual([empty_profile_spec], reconfig_spec.vmProfile)
|
||||
get_disk_device.assert_called_once_with(backing)
|
||||
self.assertEqual(disk_device, disk_spec.device)
|
||||
|
@ -1220,7 +1220,6 @@ class VMwareVolumeOps(object):
|
||||
|
||||
if profile_id is None:
|
||||
vm_profile = cf.create('ns0:VirtualMachineEmptyProfileSpec')
|
||||
vm_profile.dynamicType = 'profile'
|
||||
else:
|
||||
vm_profile = cf.create('ns0:VirtualMachineDefinedProfileSpec')
|
||||
vm_profile.profileId = profile_id.uniqueId
|
||||
|
Loading…
Reference in New Issue
Block a user