Categories
pyvmomi virtualisation

How get vlan from portgroup information from vcenter api

get portgroup information from vcenter api

vcenter api get portgroup information

vcenter api view distributed switch

pyvmomi get vlan id from portgroup

https://everythingshouldbevirtual.com/virtualization/python-vsphere-host-networking-info/

pyvmomi get object by id

https://github.com/vmware/pyvmomi

https://github.com/vmware/pyvmomi-community-samples/blob/master/samples/get_portgroup.py

https://github.com/vmware/pyvmomi-community-samples/blob/master/samples/list_vlan_in_portgroups.py

The answer: https://github.com/vmware/pyvmomi-community-samples/blob/master/samples/getvnicinfo.py