vCloud API Programming Guide
66 VMware, Inc.
</NetworkConnectionSection>
</InstantiationParams>
</Item>
<Item>
<Source href="http://vcloud.example.com/api/v1.0/vAppTemplate/vappTemplate-114"/>
</Item>
<Item>
<Source href="http://vcloud.example.com/api/v1.0/vAppTemplate/vappTemplate-190"/>
</Item>
<AllEULAsAccepted>true</AllEULAsAccepted>
</ComposeVAppParams>
Response:
201 Created
Content-Type: application/vnd.vmware.vcloud.vApp+xml
...
<VApp name="Example Corp’s CRM Appliance" type="application/vnd.vmware.vcloud.vApp+xml"
status="8" href="http://vcloud.example.com/api/v1.0/vApp/vapp-33" ...>
<Link rel="up" type="application/vnd.vmware.vcloud.vdc+xml"
href="http://vcloud.example.com/api/v1.0/vdc/5"/>
<Description>Composed CRM Appliance</Description>
...
<Tasks>
<Task ...>
...
</Task>
</Tasks>
</VApp>
TheresponseissimilartotheoneshowninExample 5‐1,asparselypopulatedvAppbodythatcontainsaTask
element.ThestatusofthevAppisinitially0.Whencompositioniscomplete,thestatuschangesto1.
Finding Virtual Machine URLs to Use in a Composition Item
Virtualmachines(Vmobjects)arenotlistedincatalogsorvDCs.TofindtheURLofaVmURLtoincludeina
compositionitemSource,GETavApporvApptemplatethatincludesit,andexaminetheChildren
containeroftheVAppelement.EachVminthiscontainerhas
anhrefattributewhosevalueyoucanuseto
referencetheVmforthis(oranyother)purpose.
TheVmURLusedinExample 5‐4appearsintheChildrenelementofExample 5‐5.
Example 5-5. Vm URL in a vApp Body
Request:
GET http://vcloud.example.com/api/v1.0/vApp/vapp-7
Response:
200 OK
Content-type: application/vnd.vmware.vcloud.vApp+xml
...
<VApp name="Linux FTP server" status="8" href="http://vcloud.example.com/api/v1.0/vApp/vapp-7"
...>
...
<Children>
<Vm status="8" href="http://vcloud.example.com/api/v1.0/vApp/vm-4" ...>
...
</Children>
</VApp>
NOTETobeincludedinacompositionrequest,aVmmustbepoweredoff(status="8").