[Inputs]
DVSwitch ofType VC:VmwareDistributedVirtualSwitch
The code below always returns 0 for vlanId.
Any thoughts on why?
Is there a different way to retrieve the vlanId for a DVPortGroup?
for(i in DVSwitch.portgroup) { System.debug(DVSwitch.portgroup[i].name); if(DVSwitch.portgroup[i].config.defaultPortConfig.vlan instanceof VcVmwareDistributedVirtualSwitchVlanIdSpec){ var vlanId = DVSwitch.portgroup[i].config.defaultPortConfig.vlan.vlanId; System.debug(vlanId); } }