-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
get_properties: a property collector action #37
base: master
Are you sure you want to change the base?
Conversation
d78f9e5
to
d7ba93c
Compare
I think it may be necessary to leverage the serialize internals used in vm_guest_info_get (for example) to deal with serializing results that are complex types (pyVmomi). This will allow things like |
0e99451
to
22f8537
Compare
@LindsayHill This one is ready for review. |
22f8537
to
7edf6b8
Compare
I added code to strip out the useless dynamicType and dynamicProperty if they are None and [] respectively. |
7edf6b8
to
a1ea3db
Compare
So I am seeing this in some runs this morning:
I'd wait on merging this until I figure it out. |
This will be changing, as I am pushing a JSON encoder down into pyVmomi. |
This is blocked waiting for:
|
pyVmomi was updated - I'll finish this off... |
@jeking3 Any update to this? I'm liking this PR. |
I wish I had better news but sadly we're not using SS and I can't allocate the time to bring it back up and implement this, sorry. |
|
The property collector is a more efficient way to retrieve properties from vSphere. If you use
get_properties
it can replace things likevm_guest_info_get
andvm_runtime_info_get
as it allows for getting arbitrary properties from types supported by CreateContainerView.96% coverage on tests for get_properties (in the vSphere pack)
Example: Datacenter name and status
Example: Select properties from a couple VMs
Example: Retrieving an array property or a property that is a class
I have been able to use the results from these queries to publish variables in workflows. In an orquesta workflow for the second example above, one could extract the memory size (assuming an input called vm_id which is the MOID):