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

Definition of StoragePod class and how to query for it? #174

Closed
kpureblade opened this issue Jan 30, 2020 · 1 comment
Closed

Definition of StoragePod class and how to query for it? #174

kpureblade opened this issue Jan 30, 2020 · 1 comment

Comments

@kpureblade
Copy link

I am trying to find functionality for datastore clusters (StoragePods) using rbvmomi. I found this issue posted on the python API interface back in 2014 that has them finding the StoragePod objects in Ruby that I have been using as a starting point:

vmware/pyvmomi#24

Basically to start, I am looking for a way to identify what StoragePods are accessible from a given VM. Using the link above, I'm able to find a StoragePod class object from the data center.

> dc.datastoreFolder.childEntity[7].class
=> RbVmomi::VIM::StoragePod

Can anyone give me guidance on how I can retrieve the StoragePod(s) available given a particular VM? Also, once I identify the StoragePod class object, I cannot find any documentation on what methods are available to the StoragePod, so I don't know what I can do with it. I couldn't find the class definition for this object in the repo, where is it coming from? Or where can I find what functionality this class provides?

Any guidance is appreciated. Thanks!

@jrgarcia
Copy link
Contributor

The code for all of the classes is generated dynamically at runtime by the vmodl.db in the root of the repo. If you want to view what's in there, it's just a Ruby Hash that has been Marshal.dumped and then written to a file (vmodl.db in this case). You can read it by doing the reverse (from the root)

Marshal.load(File.read(File.expand_path('vmodl.db', __dir__)))

To view the documentation without having to go through all of that, it maps 1-1 to the SOAP API, so the Web Services API Reference will show what's available and how it relates to other objects available in the API without having to dig through the vmodl.db. You can view the documentation for the StoragePod class here. As you can see from the documentation (and the vmodl.db), there are no methods available on that class. It also doesn't appear to be returned by any method calls.

@jrgarcia jrgarcia closed this as completed Sep 4, 2020
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

2 participants