6.0.1
Table Of Contents
- Using the vCenter Orchestrator Plug-In for vCloud Automation Center 6.0.1
- Contents
- Using the vCenter Orchestrator Plug-In for vCloud Automation Center 6.0.1
- Introduction to the VMware vCenter Orchestrator Plug-In for vCloud Automation Center
- Role of vCenter Orchestrator with the vCloud Automation Center Plug-In
- Installing the vCloud Automation Center Plug-In
- Configuring the vCloud Automation Center Plug-In
- Using the vCloud Automation Center Plug-In
- Using the vCloud Automation Center Plug-In Inventory
- Using the vCloud Automation Center Plug-In Administration Workflows
- Using the vCloud Automation Center Plug-In IaaS Workflows
- Using the vCloud Automation Center Plug-In Requests Workflows
- Using the vCloud Automation Center Plug-In Sample Workflows
- Access the vCloud Automation Center Plug-In API
- Examples of Scripts for Common vCloud Automation Center Tasks
- Examples of Scripts for CRUD vCloud Automation Center Infrastructure Administration Tasks
- Index
Example: Create a vCloud Automation Center Model Entity
This example script performs the following actions:
1 Defines the model name and the entity set name.
2 Defines the properties of the host prefix.
3 Saves the host prefix entity.
4 Defines the properties of the provisioning group.
5 Defines the provisioning group as a link.
6 Saves the provisioning group entity, by linking it with the host name prefix.
Table 3‑14. Input Variables
Variable Type
host
vCAC:VcacHost
var modelName = 'ManagementModelEntities.svc';
var entitySetName = 'HostNamePrefixes';
var links = null;
var headers = null;
//Create properties for prefix entity
var prefixInputProperties = {
MachinePrefix:'test-prefix',
NextMachineNo:1,
MachineNumberLength:3
};
//Save the prefix
var prefixEntity = vCACEntityManager
.createModelEntity(host.id, modelName, entitySetName, prefixInputProperties, links, headers);
entitySetName = 'ProvisioningGroups';
//Create properties for the provisioning group entity
inputProperties = {
GroupName:'TestGroupName',
GroupDescription:'This group was generated with a vCO workflow',
AdministratorEmail:'test@test.com',
AdContainer:'AD',
IsTestGroup:false,
Flags:2,
GroupType:1};
//Add a reference to the newly created prefix entity
links = {
HostNamePrefix:prefixEntity
};
//Save the provisioning group
var entity = vCACEntityManager
createModelEntity(host.id, modelName, entitySetName, inputProperties, links, headers);
Example: Update a vCloud Automation Center Model Entity
This example script performs the following actions:
1 Gets the host ID from the provided entity.
2 Gets the model name from the provided entity.
Chapter 3 Using the vCloud Automation Center Plug-In
VMware, Inc. 25