Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- vmware_guest_network - populate ``vlan_id`` in gathered NIC data for Distributed Virtual Portgroup backings so check mode diff does not report a false change when the NIC is already on the requested network.
3 changes: 3 additions & 0 deletions plugins/modules/vmware_guest_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@
mac_address:
description:
- MAC address of the NIC that should be altered, if a MAC address is not supplied a new nic will be created.
- Matching is case-sensitive; use the same MAC address case as reported by VMware to target an existing NIC.
- If the case does not match, the module can treat the adapter as missing and attempt to create a new NIC.
- Required when O(state=absent).
type: str
label:
Expand Down Expand Up @@ -412,6 +414,7 @@ def _get_nics_from_vm(self, vm_obj):
if hasattr(portgroup, 'key') and portgroup.key == key:
d_item['network_name'] = portgroup.name
d_item['switch'] = portgroup.config.distributedVirtualSwitch.name
d_item['vlan_id'] = self._get_vlanid_from_network(portgroup)
break
# If an NSX-T port group specified
elif isinstance(nic.backing, vim.vm.device.VirtualEthernetCard.OpaqueNetworkBackingInfo):
Expand Down