You can expand the basic workflows and actions in the VMware Aria Automation Orchestrator client, by combining them with other workflows.
You do this by populating the input fields in the basic workflows with the correct objects. You can find some of the most common objects by running the following scripts.
See Developing Workflows with VMware Aria Automation Orchestrator in the VMware Aria Automation Orchestrator Documentation.
Table 1.
All Primary Sites in the Inventory
Description |
Script |
The second parameter in the script is optional and it can be a partial name of the site. The script returns an array of site objects (com.vmware.hms.o11n.model.Site ). |
Server.findAllForType('VR:Site','') |
Table 2.
A Specific Primary Site
Description |
Script |
The second parameter in the script is required and it must be the FQDN of the site. The script returns a site object (com.vmware.hms.o11n.model.Site ). |
Server.findForType('VR:Site', 'PRIMARY_SITE_FQDN'); |
Table 3.
All Remote Sites
Description |
Script |
The second parameter in the script is optional and it can be a partial name of the site. The script returns an array of VcRemoteSite objects (com.vmware.hms.o11n.model.VcRemoteSite) . For ROBO replications, each local site has a remote object for itself and if you run 'Server.findAllForType('VR:VcRemoteSite','REMOTE_SITE_NAME' , the script returns two objects, if the primary site is paired only with the remote site. |
Server.findAllForType('VR:VcRemoteSite','') |
Table 4.
A Specific Remote Site
Description |
Script |
To get the correct remote site object, first you must get the primary site, and then get its remote sites. |
var localSite = Server.findForType('VR:Site', 'REMOTE_SITE_NAME');
var remoteSites = localSite.getVcRemoteSites()
for each( var rsite in remoteSites){
if (rsite.name == 'PRIMARY_SITE_NAME'){ selectedRemoteSite = rsite;
}
} |
Table 5.
Log in to Remote Site
Description |
Script |
Log in to the remote site after you get the correct object and if the remote site is already registered in the vSphere Replication plug-in. |
selectedRemoteSite.loginRemoteSite(); |
Table 6.
Log in to Remote Site with User Name and Password
Description |
Script |
You can log in to the remote site with user name and password regardless if the remote site is registered in the vSphere Replication plug-in. |
selectedRemoteSite.loginRemoteSiteWithCredentials(YOUR_USERNAME, YOUR_PASSWORD); |
Table 7.
All Datastores for the Remote Site
Description |
Script |
Find all datastores for the remote site as an array of VRRemoteDatastore objects. You must be logged into the remote site. |
selectedRemoteSite.getDatastores(); |
Table 8.
All Storage Profiles for the Remote Site
Description |
Script |
Find all storage profiles for the remote site as an array of VRStorageProfile objects. You must be logged in the remote site. |
selectedRemoteSite.getStorageProfiles(); |
Table 9.
VMs That Match a Criteria
Description |
Script |
Find VMs that match a particular condition, for example all VMs, which contain the string accounting . |
Server.findAllForType('VC:VirtualMachine', 'SEARCH_CRITERIA'); |
Table 10.
All Supported Disk Formats as an Array
Description |
Script |
Find all supported disk formats as an array of VRDisktype objects. The relevant fields are Name and ID. |
VRPluginConfig.getSupportedDiskFormats() |