Quantcast
Channel: VMware Communities : Discussion List - vRealize Orchestrator
Viewing all articles
Browse latest Browse all 6251

vCD 5.1 plugin (prerelease) for vCO 5.5 query service errors

$
0
0

I am testing out the vCD 5.1 (prerelease) plugin for vCO 5.5 o11nplugin-vcloud-5.1-562.vmoappand all of my queries using the vcloud query service are breaking.  I am loading up an array with expressions then passing the array into a filter object and the following error is being generated in my 5.5 instance.  The works fine in vCO 5.1 + vCD 5.1 plugin.

 

Cannot convert org.mozilla.javascript.NativeArray@5b5c7f6d to com.vmware.vmo.plugin.vcloud.model.query.Filter[] (Dynamic Script Module name : QCvclqueryByNameConvertToProperties#18).

 

I basically load up the array with one or more VclExpression types and when I set a filter like so the above error is generated.

 

var filter = new VclFilter(expressions,VclFilterType.AND);

 

Here is a code snippet:

 

var vAppTemplates = new Array();

var matchCatalog = true;

var vcdHost = System.getModule("com.qualcomm.basic").QCgetConstant("Qualcomm","QCloud","vcdRoot");

var matchCatalog = (!System.getModule("com.qualcomm.basic").QCisBlank(catalogName) ) ;

var items = new Array();

 

var queryService = System.getModule("com.vmware.library.vCloud.Query").getQueryService(vcdHost);

 

Is anyone else seeing this?  Do I need to modify something in my queries for this upcoming release?

 

var expressions = new Array();

var expression1 = new VclExpression(VclQueryAdminVAppTemplateField.NAME, itemName , VclExpressionType.EQUALS);

expressions.push(expression1);

 

 

if (goldMaster) {

  var expression2 = new VclExpression(VclQueryAdminVAppTemplateField.ISGOLDMASTER, true , VclExpressionType.EQUALS);

  expressions.push(expression2);

}

if (matchCatalog) {

  var expression3 = new VclExpression(VclQueryAdminVAppTemplateField.CATALOGNAME, catalogName , VclExpressionType.EQUALS);

  expressions.push(expression3);

}

if (published) {

  var expression4 = new VclExpression(VclQueryAdminVAppTemplateField.ISPUBLISHED, true , VclExpressionType.EQUALS);

  expressions.push(expression4);

}

 

// Error happens here!

var filter = new VclFilter(expressions,VclFilterType.AND);

var params = new VclQueryParams();


Viewing all articles
Browse latest Browse all 6251

Trending Articles



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