Quantcast
Channel: VMware Communities : Discussion List - Virtual Disk Development Kit
Viewing all articles
Browse latest Browse all 2039

Having issue with QueryService

$
0
0

I am attempting to get a list of VM's back that have a specific status.

 

Code:

 

QueryService queryService = client.GetQueryService();

QueryParams<QueryVMField> query = new QueryParams<QueryVMField>();

query.Fields.Add(QueryVMField.STATUS);

query.Filter = new Filter(new Expression(QueryVMField.STATUS, "3", ExpressionType.EQUALS));

RecordResult<QueryResultVMRecordType> searchResults = queryService.QueryVmRecords(query);

 

 

Error:

No enum const class com.vmware.vcloud.api.presentation.entity.vdc.ResourceEntityStatus.3

   at com.vmware.vcloud.sdk.QueryService.QueryVmRecords(QueryParams`1 queryParams)

 

Anyone see waht I am doing incorrect with this call?


Viewing all articles
Browse latest Browse all 2039

Trending Articles



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