vmware_host_vmnic_facts: ensure nm_config is define (#55156)
Fix a regression introduced by f96c569f9d
.
This commit is contained in:
parent
acd89b3300
commit
d55e3ad0b8
1 changed files with 1 additions and 1 deletions
|
@ -192,8 +192,8 @@ class HostVmnicMgr(PyVmomi):
|
|||
host_vmnic_facts = dict(all=[], available=[], used=[], vswitch=dict(), dvswitch=dict())
|
||||
host_nw_system = host.configManager.networkSystem
|
||||
if host_nw_system:
|
||||
vmnics = [pnic.device for pnic in nw_config.pnic if pnic.startswith('vmnic')]
|
||||
nw_config = host_nw_system.networkConfig
|
||||
vmnics = [pnic.device for pnic in nw_config.pnic if pnic.device.startswith('vmnic')]
|
||||
host_vmnic_facts['all'] = [pnic.device for pnic in nw_config.pnic]
|
||||
host_vmnic_facts['num_vmnics'] = len(vmnics)
|
||||
host_vmnic_facts['vmnic_details'] = []
|
||||
|
|
Loading…
Reference in a new issue