Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vmware_host_vmnic_facts: ensure nm_config is define #55156

Merged
merged 1 commit into from
Apr 11, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@ def gather_host_vmnic_facts(self):
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'] = []
Expand Down