EasyManua.ls Logo

VMware VCLOUD API 1.0 - API

VMware VCLOUD API 1.0 - API
212 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
vCloud API Programming Guide
52 VMware, Inc.
Example 4-18. Move a vAppTemplate
Request:
POST http://vcloud.example.com/api/v1.0/vdc/5/action/cloneVAppTemplate
Content-Type: application/vnd.vmware.vcloud.cloneVAppTemplateParams+xml
<CloneVAppTemplateParams name="Ubuntu Copy" xmlns="http://www.vmware.com/vcloud/v1">
<Source href="http://vcloud.example.com/api/v1.0/vAppTemplate/vappTemplate-111"/>
<IsSourceDelete>true</IsSourceDelete>
</CloneVAppTemplateParams>
Response:
201 Created
Content-Type: application/vnd.vmware.vcloud.vAppTemplate+xml
...
<VAppTemplate ovfDescriptorUploaded="true" status="0" name="Ubuntu Copy"
href="http://vcloud.example.com/api/v1.0/vAppTemplate/vappTemplate-302"
type="application/vnd.vmware.vcloud.vAppTemplate+xml" ...>
<Link rel="up" type="application/vnd.vmware.vcloud.vdc+xml"
href="http://vcloud.example.com/api/v1.0/vdc/5"/>
...
<Tasks>
<Task ... operation="Busy Virtual Application Template Ubuntu Copy (382)" ...>
...
</Task>
</Tasks>
</VAppTemplate>
Copy or Move a vApp
ThecloneVApprequestmakesacopyofthevAppreferencedintheSourceelementoftherequestbody.The
requestspecifiesanewnameand,optionally,anewdescriptionforthecopy.Therequestcanoptionally
includeanIsSourceDeleteelementwhosevaluespecifieswhetherthesourcevAppisdeletedafterthe
copy
iscomplete.IfIsSourceDeleteismissingfromtherequestbodyorpresentwithavalueoffalse,thesource
objectremainsinplaceafterthecopyiscomplete.SettingIsSourceDeletetotrueeffectivelymovesthe
vApp.
YoucannotcopyormoveavAppthatisdeployed.
Example 419copiesthe
vAppreferencedbyhttp://vcloud.example.com/api/v1.0/vApp/vApp201tothevDC
referencedbyhttp://vcloud.example.com/api/v1.0/vdc/5andprovidesanewnameanddescriptionforthe
copy.BecausetheIsSourceDeleteelementintherequestbodycontainsavalueoffalse,thesourcevApp
isunaffectedbythecopyoperation.(ThedefaultvalueofIsSourceDeleteisfalse
.Theexampleincludesit
forillustrativepurposesonly.)
TheresponseisaTaskelementownedbythecopy.
Example 4-19. Copy a vApp
Request:
POST http://vcloud.example.com/api/v1.0/vdc/5/action/cloneVApp
Content-Type: application/vnd.vmware.vcloud.cloneVAppParams+xml
<CloneVAppParams name="New Linux Server" xmlns="http://www.vmware.com/vcloud/v1">
<Description>Cloned from Ubuntu FTP Server</Description>
<Source href=”http://vcloud.example.com/api/v1.0/vApp/vApp-201”/>
<IsSourceDelete>false</IsSourceDelete>
</CloneVAppParams>

Table of Contents

Related product manuals