Quantcast
Channel: VMware Communities : All Content - All Communities
Viewing all articles
Browse latest Browse all 180329

How can I search by moref ID (instead of by name)

$
0
0

I'm trying to figure out which property name to use while defining a PropertySpec object to search by moref ID.  I'm buildling a plug-in for vSphere and the value that is sent to the webapp looks like this:  moref=VirtualMachine:vm-87

 

I'd like to use that value as my search criteria while building the PropertySpec object (VirtualMachine:vm-87 or vm-87).  I see the MOB browser displays the ID for all the objects, but for the life of me I can't figure out what attribute to use.

 

All examples that I can see in the SDK will do a search using "name".

 

      // Create Property Spec
      PropertySpec propertySpec = new PropertySpec();
      propertySpec.setAll(Boolean.FALSE);
      propertySpec.setType(morefType);
      propertySpec.getPathSet().add("name");
I'd like to replace the last line in the code snippet with a value that will allow me to search on something other than name.
      // Create Property Spec
      PropertySpec propertySpec = new PropertySpec();
      propertySpec.setAll(Boolean.FALSE);
      propertySpec.setType(morefType);
      propertySpec.getPathSet().add("  ???  ");

Thanks,

Marc


Viewing all articles
Browse latest Browse all 180329

Trending Articles



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