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

Problem with SDK QueryService for getting ADMINSHADOWVM

$
0
0

I am getting an error trying to use the query service for getting shadowVM records.

Onc I get this list I will be deleting some - but I cannot seem to get the query to work.  Bug in the SDK?

 

Error: Unsupported query: adminShadowVm.

   at com.vmware.vcloud.sdk.QueryService.QueryRecords[T,U](QueryRecordType query
RecordType, QueryParams`1 queryParams)
   at vCloudTools.Program.Main(String[] args) in C:\source\vCloudTools\vCloudToo
ls\Program.cs:line 54
Code:
QueryParams<QueryAdminShadowVMField> queryParams = new QueryParams<QueryAdminShadowVMField>();
queryParams.PageSize = 250;
List<Filter> filterList = new List<Filter>();
filterList.Add(new Filter(new Expression(QueryAdminShadowVMField.DATASTORENAME, "VCD-D-01", ExpressionType.EQUALS)));
filterList.Add(new Filter(new Expression(QueryAdminShadowVMField.DATASTORENAME, "VCD-D-02", ExpressionType.EQUALS)));
filterList.Add(new Filter(new Expression(QueryAdminShadowVMField.DATASTORENAME, "VCD-D-03", ExpressionType.EQUALS)));
filterList.Add(new Filter(new Expression(QueryAdminShadowVMField.DATASTORENAME, "VCD-F-01", ExpressionType.EQUALS)));
filterList.Add(new Filter(new Expression(QueryAdminShadowVMField.DATASTORENAME, "VCD-F-02", ExpressionType.EQUALS)));
filterList.Add(new Filter(new Expression(QueryAdminShadowVMField.DATASTORENAME, "VCD-F-03", ExpressionType.EQUALS)));
queryParams.Filter = new Filter(filterList, FilterType.OR);
RecordResult<QueryResultAdminShadowVMRecordType> searchResult = queryService.QueryRecords<QueryAdminShadowVMField, QueryResultAdminShadowVMRecordType>(QueryRecordType.ADMINSHADOWVM, queryParams);

 

 

If I use the following I get close to getting a result - but somethig is not right.

RecordResult<QueryResultRecordType> searchResult = queryService.QueryReferences(QueryReferenceType.ADMINSHADOWVM, queryParams).GetRecordResult();

This does a GetTotal showing 493 records.  But when I do a

searchResult.GetRecords() I get 0...  so figure something internal is having some issue.


Viewing all articles
Browse latest Browse all 2039

Trending Articles



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