VMware: fixed network['vlan'] str / int mismatch (#42984)

Typecast network vlan into string.
pull/42730/head
Deric Crago 6 years ago committed by Abhijeet Kasurde
parent e423436ed7
commit 5522e9e934

@ -1111,7 +1111,7 @@ class PyVmomiHelper(PyVmomi):
for dvp in dvps: for dvp in dvps:
if hasattr(dvp.config.defaultPortConfig, 'vlan') and \ if hasattr(dvp.config.defaultPortConfig, 'vlan') and \
isinstance(dvp.config.defaultPortConfig.vlan.vlanId, int) and \ isinstance(dvp.config.defaultPortConfig.vlan.vlanId, int) and \
str(dvp.config.defaultPortConfig.vlan.vlanId) == network['vlan']: str(dvp.config.defaultPortConfig.vlan.vlanId) == str(network['vlan']):
network['name'] = dvp.config.name network['name'] = dvp.config.name
break break
if 'dvswitch_name' in network and \ if 'dvswitch_name' in network and \

Loading…
Cancel
Save