I have found strange thing,
when I call host.configManager.networkSystem.networkInfo.pnic , I receive Array of VcPhysicalNic
But when I call host.configManager.networkSystem.networkInfo.vswitch[0].pnic , I receive Array of String (looks to be Array of ....pnic.key)
I'm using Orchestrator 7.0.1. Is it so by design? Is there some other easy way to get physical NICs connected to the standard virtual switch?
maaca
Hi maaca,
The correct output of host.configManager.networkSystem.networkInfo.vswitch[0].pnic is array of string, so yes, what you see is by design.
vRO documentation states the result should be array of VcPhysicalNic; perhaps there is some error/out-of-date documentation issue that need to be investigated. I'll open a PR to get it fixed in future release.
For getting a list of physical NICs connected to the virtual switch you may use a combination of these 2 APIs:
Let me know if you have troubles writing scripting code for the algorithm above, and I'll try to provide some sample code.
Hi maaca,
The correct output of host.configManager.networkSystem.networkInfo.vswitch[0].pnic is array of string, so yes, what you see is by design.
vRO documentation states the result should be array of VcPhysicalNic; perhaps there is some error/out-of-date documentation issue that need to be investigated. I'll open a PR to get it fixed in future release.
For getting a list of physical NICs connected to the virtual switch you may use a combination of these 2 APIs:
Let me know if you have troubles writing scripting code for the algorithm above, and I'll try to provide some sample code.
Hi Ilian,
thanks for making it clear. I'll put the script together, no problem.
maaca