Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 249166

Re: Retrieve hostFolder from Newly Created Datacenter

$
0
0

You may want to use this forum instead, you'll find a lot more Orchestrator focused minds there

 

http://communities.vmware.com/community/vmtn/server/vcenter/orchestrator

 

 

In terms of what you are looking for (getting hostFolder of a Datacenter) in Orchestrator, the following demonstrates how to list all the Datacenters and their hostFolders (you could have multiple vCenters in Orchestrator, so this will enumerate every Datacenter that Orchestrator is aware of).

 

 

var datacenters = VcPlugin.getAllDatacenters();
for (var i=0; i<datacenters.length; i++) {
     var dc = datacenters[i];
     var hostFolder = dc.hostFolder;
     System.log("Datacenter:" + dc.name + " -- " + hostFolder.name);
}

 


Viewing all articles
Browse latest Browse all 249166

Trending Articles



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