I am using the vMA CLI, and the ESXi host CLI, to automate the testing of our NIC cards. Ideally, I would not have to hardcode anything for a testbed, but, instead, discover anything dynamically.
One thing that I have not been able to do via the CLI, even though it is a supported feature on the vSphere GUI and web client, is to determine the Cisco port that a vmnic is attached to. ESXi uses the Cisco Discovery protocol, and the GUI will display the port number for any vmnic. Currently, for every test bed I have to create a simple datastructure to hold this information. This means it has to be configured for every test bed, and changed if either the card or Cisco port changes.
What CLI command can I use that wll give me this information?
For example, something like 'esxcli get cdp vmnic=vmnic5', and return '2/11'.
Thank you.