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

VMware vCO Add Host to Cluster Workflow

$
0
0

Hi All,

 

I have been working on a number of workflows that can be called from command line using curl and the REST API to configure vCenter. I have used the out of the box workflows as a reference and successfully have the below workflows working correctly with minimal input and that which can be run using the @request.xml to supply:

 

- Create vCenter datacenter

- Create vCenter cluster

 

I am now working on the add host to cluster workflow and am having an issue with it, specifically I am using the below code from another forum post to find the cluster inventory object via the vCenter plugin:

 

var clusters = VcPlugin.getAllClusterComputeResources();

for (var i=-; i<clusters.length; i++) {

System.log("Cluster: " + clusters[i].name);

System.log("Cluster Name: " + clusters[i].parent.parent.name);

clusterHostFolder = clusters[i].id;

}

 

Looking at what gets echo'd out to the screen in the system.log the value looks fine to me; however when I run the workflow, all of the variables have got the relevant values with the exception of the VC:ClusterComputeResource, which returns the below error message:

 

TypeError: cannot find function addHost_Task in object domain-c466

 

domain-c466 is the id for the cluster object in vCenter hence I'm somewhat stumped as to why its saying the "cannot find function".

 

Thanks in advance for any feedback.

Regards

Andy


Viewing all articles
Browse latest Browse all 6251

Trending Articles



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