when i try to query with a property spec for datastore as below, it throws an exception.
PropertySpec pdsspec = DataObjectFactory.newInstance(PropertySpec.class);
TypeName DatastoreType = TypeName.forClass(Datastore.class);
pdsspec.setType(DatastoreType);
pdsspec.setAll(Boolean.FALSE);
pdsspec.setPathSet(new String[] {"host","info.name","summary.url","summary.capacity","summary.freeSpace","info.vmfs.type"});
i found out that info.vmfs.type is causing the InvalidProperty exception. any idea? Any workaround?
thanks
venkat
Hi,
Yes you are right, you need to first get instance of "info" and then retreive it's properties.
Another approach for retreiving the "type" property of datastore is by using "summary.type" in the setPathSet. This retreives the type of the datastore.
Hope this helps.
-Angela
if i just do "info" in setpathSet and then get the vmfs on the client side, it should work. right?
Hi,
Yes you are right, you need to first get instance of "info" and then retreive it's properties.
Another approach for retreiving the "type" property of datastore is by using "summary.type" in the setPathSet. This retreives the type of the datastore.
Hope this helps.
-Angela