Import OVF As vApp Template operation
The Import OVF As vApp Template operation enables you to create a vApp template from an OVF package.
The following figure shows a sample <items> XML element for the Import OVF As vApp Template operation:
Sample <items> XML element for the Import OVF As vApp Template operation
<item>
<parameters>
<vdc-id></vdc-id>
<catalog-id></catalog-id>
<import-ovf-as-vapp-template-params>
<vapp-template-name></vapp-template-name>
<description>test desc</description>
<ovf-descriptor-file></ovf-descriptor-file>
</import-ovf-as-vapp-template-params>
</parameters>
</item>
</items>
The following table describes the elements for this adapter request:
Adapter request elements for the Import OVF As vApp Template operation
Element | Definition | Required |
---|---|---|
<operation-name> | Defines the type of operation: Import Ovf_As_vApp_Template | Yes |
<vcloud-organization> | Specifies the name of the vCloud organization | Conditional:
|
<user-name> | Specifies the user name required for basic HTTP authentication on vCloud | Conditional:
|
<password> | Contains the password corresponding to the specified user name | Conditional:
|
<parameters> | Contains the elements for the operation | Yes |
<vdc-id> | Specifies the ID of the target vDC | Yes |
<catalog-id> | Specifies the ID corresponding to the catalog to which the vApp template is added | Yes |
<vapp-template-name> | Specifies a unique name for the vApp template being created | Yes |
<description> | Specifies the description of the vApp template | No |
<ovf-descriptor-file> | Specifies the path of the descriptor file | Yes |
The following figure shows the sample adapter request for the Import OVF As vApp Template operation:
Sample adapter request for the Import OVF As vApp Template operation
<operation-name>Import_Ovf_As_vApp_Template</operation-name>
<vcloud-organization>TestOrg</vcloud-organization>
<user-name>TestUser</user-name>
<password>Password</password>
<parameters>
<vdc-id>882004552</vdc-id>
<catalog-id>1545932923</catalog-id>
<import-ovf-as-vapp-template-params>
<vapp-template-name>Test Template new2</vapp-template-name>
<description>test desc</description>
<ovf-descriptor-file>/export/home/user/o@v#f/descriptor.ovf
</ovf-descriptor-file>
</import-ovf-as-vapp-template-params>
</parameters>
</vmware-vcloud-request>
The following figure shows the response for the sample adapter request:
Sample adapter response for the Import OVF As vApp Template operation
<metadata>
<status>success</status>
</metadata>
<status-line>
<code>201</code>
<reason>Created</reason>
</status-line>
<message-body>
<CatalogItem
name = "Test Template new2"
type = "application/vnd.vmware.vcloud.catalogItem+xml"
href = "https://10.128.248.112/api/v1.0/catalogItem/1535894605">
<Link
rel = "up"
type = "application/vnd.vmware.vcloud.catalog+xml"
href = "https://10.128.248.112/api/v1.0/catalog/1545932923"/>
<Link
rel = "edit"
type = "application/vnd.vmware.vcloud.catalogItem+xml"
href = "https://10.128.248.112/api/v1.0/catalogItem/1535894605"/>
<Link rel = "remove" href =
"https://10.128.248.112/api/v1.0/catalogItem/1535894605"/>
<Description>test desc</Description>
<Entity
type = "application/vnd.vmware.vcloud.vAppTemplate+xml"
name = "Test Template new2"
href = "https://10.128.248.112/api/v1.0/vAppTemplate/
vappTemplate-145139217"/>
</CatalogItem>
</message-body>
</vmware-vcloud-response>