Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 231887

Re: Fetching selected VM's configInfo

$
0
0

The entire configInfo data is too big and complex an object to retrieve all at once. What you want to do is retrieve the pieces of information you need for a particular view or action.  Use the property "config.extraConfig" for instance to retrieve the array of key/value pairs for the VM extra configuration.  When you don't know in advance what ActionScript data structure will be returned you can cast your result to Object and use the debugger to examine its content.

 

Here is what the FAQs say under "What object types and properties can be used in data models and data requests?"

 

Another approach is to use a "path traversal" syntax to reach primitive values in each object: it is simpler because no java code is required, but may become more tedious if you are dealing with lots of properties. For instance the property name runtime.powerState returns the powerState field of the VM's RuntimeInfo object. Please note that this syntax works only if the path doesn't contain a managed entity, i.e. another server object. In that case you can use the relational syntax to continue the traversal. For instance the model [Model(relation="runtime.host", property="name")] lets you access the name of the host related to the VM. You can also retrieve properties over multi-hop relationships like this [Model(relation=”runtime.host,parent”, property=”name”)].


Viewing all articles
Browse latest Browse all 231887

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>