Hi,
I am planning to write a script in vRealize Orchestrator to import an OVF. For that I have started with the script and have written so far this and running it to take one step at a time. But I am getting error "TypeError: Cannot call method "parseDescriptor" of null" for function parseDecriptor " I have added System.log(ovfD) to print the ocf content to verify and it prints. So still I do not know why it is giving me this. Am I missing anything here?
var ovfmanager = host.sdkConnection.ovfManager();
var descriptorSpec = new VcOvfParseDescriptorParams();
descriptorSpec.locale = '';
descriptorSpec.deploymentOption = '';
var tempDir = System.getTempDirectory() ;
var fileReader = new FileReader(tempDir + '/ss.ovf') ;
fileReader.open() ;
var ovfDescriptor = fileReader.readAll();
var ovfD = String(ovfDescriptor);
ovfD = ovfD.trim();
fileReader.close();
System.log(ovfD);
var ovfInfo = ovfmanager.parseDescriptor(ovfD, descriptorSpec);
On the first line, you are trying to execute a method ovfManager() but it's not a method; it's a property.
So the first line should be
var ovfmanager = host.sdkConnection.ovfManager;
On the first line, you are trying to execute a method ovfManager() but it's not a method; it's a property.
So the first line should be
var ovfmanager = host.sdkConnection.ovfManager;
Hi IIian,
Many thanks for the help!
Regards
Sandeep