Getting Information About The Vapp - VMware VCLOUD API 1.0 - API Programming Manual

Table of Contents

Advertisement

Because the deployment request specified powerOn="true", the vApp is powered on and ready for use when 
the task completes. The client can wait for a suitable interval and check the task status (see "Retrieve a Task" 
on page 89), or simply begin requesting operations on the powered‐on vApp and checking the task status if 
those requests fail. See "Deploying and Controlling vApps and Virtual Machines" on page 80.

Getting Information About the vApp

As other examples have shown, a client can always use an HTTP GET request to discover the current state of 
any vCloud object, including a vApp. The response in Example
The vApp is deployed (its deployed attribute is set to true) and powered on (status="4").
The Vm in its Children collection is also powered on and deployed. The Vm is connected to the vApp 
network created during instantiation (see Example
NetworkConfigSection of the vApp, though most are not shown here.
Action links for all operations except powerOn are present in both the vApp itself and its child Vm. Because 
the vApp is already powered on, that operation is invalid for the vApp in its current state, so the link is 
not part of the response. (The link for deploy is always present, even in a deployed vApp, because the 
deploy action is always valid.) The Vm element also includes several links for actions that not applicable 
to a vApp: actions like acquiring a screen ticket or thumbnail, and inserting or removing media, are 
specific to a virtual machine. Other actions like shutdown and reboot, can be applied to either object. See 
"Deploying and Controlling vApps and Virtual Machines" on page 80.
Much additional information is available, though most of it is not shown here. The example does show 
where to find the IP address of the vApp, in the IpAddress element of the NetworkConnection.
Example 2-8. Get Information About the vApp
Request:
GET http://vcloud.example.com/api/v1.0/vApp/vapp-7
Response:
200 OK
Content-Type: application/vnd.vmware.vcloud.vApp+xml
...
<VApp status="4" name="Linux FTP server" type="application/vnd.vmware.vcloud.vApp+xml"
<Link rel="power:reboot"
<Link rel="power:powerOff"
<Link rel="undeploy" href="http://vcloud.example.com/api/v1.0/vApp/vapp-7/action/undeploy"/>
<Link rel="deploy" href="http://vcloud.example.com/api/v1.0/vApp/vapp-7/action/deploy"/>
<Link rel="power:shutdown"
<Link rel="power:reset"
<Link rel="power:suspend"
<Link rel="down" type="application/vnd.vmware.vcloud.controlAccess+xml"
<Link rel="controlAccess" type="application/vnd.vmware.vcloud.controlAccess+xml"
<Link rel="up" type="application/vnd.vmware.vcloud.vdc+xml"
<Link rel="edit" type="application/vnd.vmware.vcloud.vApp+xml"
<Description>Example FTP Server vApp</Description>
<LeaseSettingsSection ...>
...
</LeaseSettingsSection>
<ovf:StartupSection ... >
...
VMware, Inc.
href="http://vcloud.example.com/api/v1.0/vApp/vapp-7" ... >
href="http://vcloud.example.com/api/v1.0/vApp/vapp-7/power/action/reboot"/>
href="http://vcloud.example.com/api/v1.0/vApp/vapp-7/power/action/powerOff"/>
href="http://vcloud.example.com/api/v1.0/vApp/vapp-7/power/action/shutdown"/>
href="http://vcloud.example.com/api/v1.0/vApp/vapp-7/power/action/reset"/>
href="http://vcloud.example.com/api/v1.0/vApp/vapp-7/power/action/suspend"/>
href="http://vcloud.example.com/api/v1.0/vApp/vapp-7/controlAccess/"/>
href="http://vcloud.example.com/api/v1.0/vApp/vapp-7/action/controlAccess/"/>
href="http://vcloud.example.com/api/v1.0/vdc/5"/>
href="http://vcloud.example.com/api/v1.0/vApp/vapp-7"/>
Chapter 2 Hello vCloud: A Structured REST Workflow Example
2‐8 reveals several things:
2‐6). Properties of this network are included in the 
27

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the VCLOUD API 1.0 - API and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Table of Contents