VMware: Fix dvs idempotency issue (#35389)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
parent
56196e66bf
commit
c96bad461f
1 changed files with 1 additions and 1 deletions
|
@ -947,7 +947,7 @@ class PyVmomiHelper(PyVmomi):
|
|||
# VDS switch
|
||||
pg_obj = find_obj(self.content, [vim.dvs.DistributedVirtualPortgroup], network_devices[key]['name'])
|
||||
|
||||
if (nic.device.backing and not hasattr(nic.device.backing, 'port')) or \
|
||||
if vm_obj is None or (nic.device.backing and not hasattr(nic.device.backing, 'port')) or \
|
||||
(nic.device.backing and (nic.device.backing.port.portgroupKey != pg_obj.key or
|
||||
nic.device.backing.port.switchUuid != pg_obj.config.distributedVirtualSwitch.uuid)):
|
||||
dvs_port_connection = vim.dvs.PortConnection()
|
||||
|
|
Loading…
Reference in a new issue