VMware VCLOUD API 1.0 - API Programming Manual page 25

Table of Contents

Advertisement

Creation parameters for a vApp network. A vApp network defines how the vApp connects to an 
organization network available in the target vDC. For more information, see "About vApp Networks" on 
page 62.
The instantiateVAppTemplate request in Example
The name is supplied in the name attribute of the InstantiateVAppTemplateParams request. (This 
request also provides a description, which is optional but a good practice.)
The template URL is suppled in the Source element
The vApp network is specified in the NetworkConfigSection element. This specification includes three 
parameters:
A name for the network, supplied in the name attribute of the NetworkConfigSection element. If 
the vApp template includes an ovf:Network element, the name you specify for the vApp network 
must match the name specified in that element's ovf:name attribute.
A reference to the organization network to which the vApp network connects, specified in the 
ParentNetwork element. The URL used here is one returned in Example
AvailableNetworks element of the vDC.
A fence mode, specified in the FenceMode element. A value of bridged indicates that the vApp 
network is connected directly to the organization network.
The target of the request is the instantiateVAppTemplate URL of this vDC (see Example
operation creates a new object (a vApp), the HTTP request type is POST.
Example 2-6. Instantiating a vApp Template
Request:
POST http://vcloud.example.com/api/v1.0/vdc/5/action/instantiateVAppTemplate
Content-Type: application/vnd.vmware.vcloud.instantiateVAppTemplateParams+xml
...
<InstantiateVAppTemplateParams name="Linux FTP server" xmlns="http://www.vmware.com/vcloud/v1"
<Description>Example FTP Server vApp</Description>
<InstantiationParams>
<NetworkConfigSection>
<ovf:Info>Configuration parameters for vAppNetwork</ovf:Info>
<NetworkConfig networkName="vAppNetwork">
</NetworkConfig>
</NetworkConfigSection>
</InstantiationParams>
<Source href="http://vcloud.example.com/api/v1.0/vAppTemplate/vappTemplate-111"/>
</InstantiateVAppTemplateParams>
Response:
201 Created
Content-Type: application/vnd.vmware.vcloud.vApp+xml
<VApp deployed="false" status="0" name="Linux FTP server"
<Link rel="up" type="application/vnd.vmware.vcloud.vdc+xml"
<Description>Example FTP Server vApp</Description>
<Tasks>
VMware, Inc.
xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1" >
<Configuration>
<ParentNetwork href="http://vcloud.example.com/api/v1.0/network/54"/>
<FenceMode>bridged</FenceMode>
</Configuration>
type="application/vnd.vmware.vcloud.vApp+xml"
href="http://vcloud.example.com/api/v1.0/vApp/vapp-7" ...>
href="http://vcloud.example.com/api/v1.0/vdc/5"/>
Chapter 2 Hello vCloud: A Structured REST Workflow Example
2‐6 supplies these parameters in the following places:
2‐5, in the 
2‐5). Because the 
25

Advertisement

Table of Contents
loading

Table of Contents