Skip to content
This repository has been archived by the owner on Jul 1, 2021. It is now read-only.

"host_mo_ref.config.storageDevice.plugStoreTopology.device.lun" returns nil #4

Open
Cindia-blue opened this issue Aug 27, 2012 · 7 comments

Comments

@Cindia-blue
Copy link

try to get key of mapped Lun device by calling host_mo_ref.config.storageDevice.plugStoreTopology.device.lun, but keep got nil. according to VIM development guidence, this should return an object of Lun(ScsiLun). should I change to some other way with Rbvimomi function invocation to reach the goal? Looking forward to suggestions on this problem and sharing of best dev practice with Rbvmomi.

@cdickmann
Copy link
Contributor

Go to https:///mob and browse through there to find the same thing. Does it show up there?

@Cindia-blue
Copy link
Author

yes, on mob web page I can find values which failed to be returned by rbvmomi, e.g. for host_mo_ref.config.storageDevice.plugStoreTopology.device.lun, mob page presents the key of mapped lun object but rbvmomi returns nil

@cdickmann
Copy link
Contributor

Is this value one that was introduced in a later API version, like ESX 5.0 or 5.1? If so, you need to make rbvmomi connect with that API revision.

@Cindia-blue
Copy link
Author

yes, this is included by vSphere 5.0 Management SDK. Would you please help provide guidance about how to make rbvmomi connect with right API revision?

@cdickmann
Copy link
Contributor

When you connect, you can set :rev. After connect, you can do "conn.rev = ". Set it to 5.0. I believe RVC has the nice code to negotiate the highest possible version with the server.

@Cindia-blue
Copy link
Author

Thanks for the help. Progress has been made on reachable of deep object but can not get any of its properties. below is my code and returns:
plug_devices = host_mo_ref.config.storageDevice.plugStoreTopology.device
puts "plug_devices lun is #{plug_devices[0][:lun].inspect}"

return:
plug_devices lun is #<RbVmomi::VIM::ScsiLun:0x23a3df8 @props={:dynamicProperty=>[], :descriptor=>[], :alternateName=>[], :standardInquiry=>[], :operationalState=>[]}>

looking forward to further comments. Thanks.

@jrgarcia
Copy link
Contributor

jrgarcia commented Aug 3, 2016

@Cindia-blue Hey, I just started maintaining this project and noticed this issue is almost 4 years old. Is this still something you'd like me to look into or is this ok to close?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants