rbvmomi icon indicating copy to clipboard operation
rbvmomi copied to clipboard

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

Open Cindia-blue opened this issue 13 years ago • 7 comments

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.

Cindia-blue avatar Aug 27 '12 11:08 Cindia-blue

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

cdickmann avatar Aug 27 '12 18:08 cdickmann

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

Cindia-blue avatar Aug 28 '12 02:08 Cindia-blue

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.

cdickmann avatar Aug 28 '12 15:08 cdickmann

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?

Cindia-blue avatar Aug 29 '12 03:08 Cindia-blue

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.

cdickmann avatar Aug 29 '12 18:08 cdickmann

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.

Cindia-blue avatar Aug 30 '12 03:08 Cindia-blue

@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?

jrgarcia avatar Aug 03 '16 16:08 jrgarcia