Quantcast
Channel: VMware Communities : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 176483

Issue with retrieveProperties

$
0
0

Hi,

 

I am using VMWare SDK Web Service API to monitor and collect the performance statistics. I am trying to retrieve performance statistics (Historical Intervals) from vCenter. Here is the piece of code for this.

 

private ObjectContent[] getManagerContents(PropertySpec propertySpec, ManagedObjectReference ref) throws Exception

    {

        PropertySpec[] propspecary = new PropertySpec[]{ propertySpec };

 

 

        PropertyFilterSpec spec = new PropertyFilterSpec();

        spec.setPropSet(propspecary);

        spec.setObjectSet(new ObjectSpec[]{new ObjectSpec()});

        spec.getObjectSet(0).setObj(ref);

        spec.getObjectSet(0).setSkip(new Boolean(false));

        return cb.getConnection().getService().retrieveProperties(cb.getConnection().getServiceContent().getPropertyCollector(), new PropertyFilterSpec[]{spec});

   }

 

The above method works most of the time, but some times returns blank ObjectContent. I would like to know in which case it will return blank array of ObjectContent.

 

Any help would be greatly appreciated.

 

Thanks,


Viewing all articles
Browse latest Browse all 176483

Trending Articles



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