Clone vApp Template operation


The Clone vApp Template operation enables you to make a copy of a vApp template.

The following figure shows a sample <items> XML element for the Clone vApp Template operation:

Sample <items> XML element for the Clone vApp Template operation

<items>
 <item>
   <parameters>
     <vdc-id></vdc-id>
     <clone-vapp-template-params>
       <vapp-template-id></vapp-template-id>
       <vapp-template-name></vapp-template-name>
       <description></description>
       <is-source-delete></is-source-delete>
     </clone-vapp-template-params>
   </parameters>
 </item>
</items>

The following table describes the elements for this adapter request:

Adapter request elements for the Clone vApp Template operation

Element

Definition

Required

<operation-name>

Defines the type of operation: Clone_vApp_Template

Yes

<vcloud-organization>

Specifies the name of the vCloud organization

Conditional:

  • Required if not specified in the configuration
  • If used, requires <user-name> and <password>
<user-name>

Specifies the user name required for basic HTTP authentication on vCloud

Conditional:

  • Required if not specified in the configuration
  • If used, requires <vcloud-organization> and <password>
<password>

Contains the password corresponding to the specified user name

Conditional:

  • Required if not specified in the configuration
  • If used, requires <vcloud-organization> and <user-name>
<parameters>

Contains the elements for the operation

Yes

<vdc-id>

Specifies the ID of the target vDC

Valid value: Any string

Yes

<vapp-template-id>

Specifies the ID corresponding to the vApp template that you want to clone

Valid value: Any string

Yes

<vapp-template-name>

Specifies the name of the cloned vApp template

Valid value: Any string
Default value: New Clone

No

<description>

Specifies the description of the cloned vApp

Valid value: Any string

No

<is-source-delete>

Specifies whether to delete the source vApp template

Valid value: true, false (default)

No

<vdc-storage-profile>

Specifies a reference (ID) to the storage profile to be specified in the vApp template created by the operation

Default: Empty

Note: This element is applicable to VMware vCloud version 5.1 only.

No

The following figure shows the sample adapter request for the Clone vApp Template operation:

Sample adapter request for the Clone vApp Template operation

<vmware-vcloud-request>
 <operation-name>Clone_vApp_Template</operation-name>
 <vcloud-organization>TestOrg</vcloud-organization>
 <user-name>TestUser</user-name>
 <password>Password</password>
 <parameters>
     <vdc-id>882004552</vdc-id>
     <clone-vapp-template-params>
       <vapp-template-id>vappTemplate-847288105</vapp-template-id>
       <vapp-template-name>Test clone</vapp-template-name>
       <description>Description</description>
       <is-source-delete>false</is-source-delete>
     </clone-vapp-template-params>
 </parameters>
</vmware-vcloud-request>

The following figure shows the response for the sample adapter request:

Sample adapter response for the Clone vApp Template operation

<vmware-vcloud-response>
 <metadata>
   <status>success</status>
 </metadata>
 <status-line>
   <code>201</code>
   <reason>Created</reason>
 </status-line>
 <message-body>
   <VAppTemplate ovfDescriptorUploaded="true" status="0" name="Test clone"
type="application/vnd.vmware.vcloud.vAppTemplate+xml"
href="https://10.128.248.112/api/v1.0/vAppTemplate/vappTemplate-1139505209">
     <Link rel="up" type="application/vnd.vmware.vcloud.vdc+xml"
href="https://10.128.248.112/api/v1.0/vdc/882004552" />
     <Description>Description</Description>
     <Tasks>
       <Task status="running" startTime="2011-01-06T17:05:28.172+05:30"
operation="Copying Virtual Application Template Test clone(1139505209)"
expiryTime="2011-04-06T17:05:28.172+05:30" endTime="9999-12-31T23:59:59.999+05:30"
type="application/vnd.vmware.vcloud.task+xml"
href="https://10.128.248.112/api/v1.0/task/ghaalxho3j1plszijw">
         <Owner type="application/vnd.vmware.vcloud.vAppTemplate+xml"
name="Test clone"
href="https://10.128.248.112/api/v1.0/vAppTemplate/vappTemplate-1139505209" />
       </Task>
     </Tasks>
     <Children />
     <LeaseSettingsSection
type="application/vnd.vmware.vcloud.leaseSettingsSection+xml"
href="https://10.128.248.112/api/v1.0/vAppTemplate/vappTemplate-1139505209/
leaseSettingsSection/"
required="false">
       <Info>Lease settings section</Info>
       <Link rel="edit"
type="application/vnd.vmware.vcloud.leaseSettingsSection+xml"
href="https://10.128.248.112/api/v1.0/vAppTemplate/vappTemplate-1139505209/
leaseSettingsSection/"
/>
       <StorageLeaseInSeconds>7776000</StorageLeaseInSeconds>
       <StorageLeaseExpiration>2011-04-06T17:05:28.042+05:30
</StorageLeaseExpiration>
     </LeaseSettingsSection>
     <CustomizationSection type="application/vnd.vmware.vcloud.
customizationSection+xml"
href="https://10.128.248.112/api/v1.0/
vAppTemplate/vappTemplate-1139505209/customization
Section/"
required="false">
       <Info>VApp template customization section</Info>
       <CustomizeOnInstantiate>true</CustomizeOnInstantiate>
     </CustomizationSection>
   </VAppTemplate>
 </message-body>
</vmware-vcloud-response>

The following figure shows the sample adapter request for the Clone vApp Template operation for VMware vCloud version 5.1:

Sample adapter request for the Clone vApp Template operation

<vmware-vcloud-request>
   <operation-name>Clone_vApp_Template</operation-name>
   <parameters>
     <vdc-id>4db292cb-dc14-49a6-9f6c-dd0c7b760b66</vdc-id>
     <clone-vapp-template-params>
       <vapp-template-id>vappTemplate-3a58df05-4cb0-48ed-b8b6-edf58fbaa467 </vapp-template-id>
       <vapp-template-name>PujaClonedTemplateby_jai</vapp-template-name>
       <description>test</description>
       <is-source-delete>false</is-source-delete>
       <vdc-storage-profile>78564134-7836-4b50-b76b-a37e4272cdb7</vdc-storage-profile>
     </clone-vapp-template-params>
   </parameters>
 </vmware-vcloud-request>

The following figure shows the adapter response for the sample request:

Sample adapter response for the Clone vApp Template operation for VMware vCloud version 5.1

<vmware-vcloud-response>
 <metadata>
   <status>success</status>
 </metadata>
 <status-line>
   <code>201</code>
   <reason>Created</reason>
 </status-line>
 <message-body>
   <VAppTemplate ovfDescriptorUploaded="true" goldMaster="false" status="0" name="PujaClonedTemplateby_jai" id="urn:vcloud:vapptemplate:99b14f30-0394-4df3-98c6-0c2ebc4e7db0" type="application/vnd.vmware.vcloud.vAppTemplate+xml" href="https://10.128.37.5/api/vAppTemplate/vappTemplate-99b14f30-0394-4df3-98c6-0c2ebc4e7db0">
     <Link rel="up" type="application/vnd.vmware.vcloud.vdc+xml" href="https://10.128.37.5/api/vdc/4db292cb-dc14-49a6-9f6c-dd0c7b760b66" />
     <Description>test</Description>
     <Tasks>
       <Task status="running" startTime="2012-12-19T11:49:50.710+05:30" serviceNamespace="com.vmware.vcloud" operationName="vdcCopyTemplate" operation="Copying Virtual Application Template PujaClonedTemplateby_jai(99b14f30-0394-4df3-98c6-0c2ebc4e7db0)" expiryTime="2013-03-19T11:49:50.710+05:30" cancelRequested="false" name="task" id="urn:vcloud:task:ba786567-3133-419a-8c73-34bb83e58fef" type="application/vnd.vmware.vcloud.task+xml" href="https://10.128.37.5/api/task/ba786567-3133-419a-8c73-34bb83e58fef">
         <Link rel="task:cancel" href="https://10.128.37.5/api/task/ba786567-3133-419a-8c73-34bb83e58fef/action/cancel" />
         <Owner type="application/vnd.vmware.vcloud.vAppTemplate+xml" name="PujaClonedTemplateby_jai" href="https://10.128.37.5/api/vAppTemplate/vappTemplate-99b14f30-0394-4df3-98c6-0c2ebc4e7db0" />
         <User type="application/vnd.vmware.admin.user+xml" name="system" href="https://10.128.37.5/api/admin/user/4e73bdbb-1e7a-4240-8bbd-4697b3978a7d" />
         <Organization type="application/vnd.vmware.vcloud.org+xml" name="RnD-Org" href="https://10.128.37.5/api/org/82ab4d52-d1a8-41a4-9249-af72207e7230" />
         <Progress>1</Progress>
         <Details />
       </Task>
     </Tasks>
     <Owner type="application/vnd.vmware.vcloud.owner+xml">
       <User type="application/vnd.vmware.admin.user+xml" name="system" href="https://10.128.37.5/api/admin/user/a156839c-d6d8-4eb6-b3fe-ca7c0fbbd3d5" />
     </Owner>
     <Children />
     <LeaseSettingsSection type="application/vnd.vmware.vcloud.leaseSettingsSection+xml" href="https://10.128.37.5/api/vAppTemplate/vappTemplate-99b14f30-0394-4df3-98c6-0c2ebc4e7db0/leaseSettingsSection/" required="false">
       <Info>Lease settings section</Info>
       <Link rel="edit" type="application/vnd.vmware.vcloud.leaseSettingsSection+xml" href="https://10.128.37.5/api/vAppTemplate/vappTemplate-99b14f30-0394-4df3-98c6-0c2ebc4e7db0/leaseSettingsSection/" />
       <StorageLeaseInSeconds>7776000</StorageLeaseInSeconds>
       <StorageLeaseExpiration>2013-03-19T11:49:46.741+05:30</StorageLeaseExpiration>
     </LeaseSettingsSection>
     <CustomizationSection type="application/vnd.vmware.vcloud.customizationSection+xml" href="https://10.128.37.5/api/vAppTemplate/vappTemplate-99b14f30-0394-4df3-98c6-0c2ebc4e7db0/customizationSection/" goldMaster="false" required="false">
       <Info>VApp template customization section</Info>
       <CustomizeOnInstantiate>true</CustomizeOnInstantiate>
     </CustomizationSection>
     <DateCreated>2012-12-19T11:49:46.740+05:30</DateCreated>
   </VAppTemplate>
 </message-body>
</vmware-vcloud-response>

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

TrueSight Orchestration Content 20.19.02