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

cannot convert native array error

$
0
0

I'm trying to run the following code to resignature a bunch of VmfsVolumes:

var specs = new Array();
for each (var unres in unresolved)
{  var resolutionSpec = new VcHostUnresolvedVmfsResignatureSpec([unres]);  specs.push(resolutionSpec);
}


var unresVmfsResults = u_host.configManager.storageSystem.resolveMultipleUnresolvedVmfsVolumes(specs);
for each (var res in unresVmfsResults)
{
  System.log(res.vmfs.name);  System.log(res.fault.localizedMessage);
}

 

I'm getting this error message:

Cannot convert org.mozilla.javascript.NativeArray@53a11a66 to com.vmware.vim.vi4.HostUnresolvedVmfsResolutionSpec[]


I have no idea how to create a strongly typed array in Javascript and i'm not even sure its possible.  Does anyone know how to work around this issue?  I've tried using var specs = [];  I've also tried feeding the first resolutionSpec in manually like: var specs = [resolutionSpec].



Viewing all articles
Browse latest Browse all 6251

Trending Articles



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