vmware / pyvmomi

VMware vSphere API Python Bindings
Apache License 2.0
2.21k stars 765 forks source link

netStackInstanceKey on vnic is returned as None although it is set. #703

Closed jonathanmier closed 6 years ago

jonathanmier commented 6 years ago

When trying to get the netstack instance key from a vnic on a host it is returned as None. I can see through the MOB that is it indeed set? Any ideas?

jonathanmier commented 6 years ago

@rreubenur Any ideas?

reubenur-rahman commented 6 years ago

How are you accessing the data ?

This works for me

    vnic_infos = host.configManager.virtualNicManager.info.netConfig
    for vnic_info in vnic_infos:
        print vnic_info.candidateVnic[0].spec.netStackInstanceKey
jonathanmier commented 6 years ago

@rreubenur, I tried running your code and I still get None returned. Not sure what is going on, in the MOB I can see that the values are set.

This is what I see in the MOB. netStackInstanceKey | string | "defaultTcpipStack"