EasyManuals Logo

VMware VCLOUD API 1.0 - API User Manual

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
Page #45 background imageLoading...
Page #45 background image
VMware, Inc. 45
Chapter 4 Provisioning
<File size="1950489088" bytesTransferred="0" name="disk0.vmdk">
<Link rel="upload:default" href="http://vcloud.example.com/transfer/.../disk0.vmdk"/>
</File>
</Files>
</VAppTemplate>
Inthisexample,theovfDescriptorUploadedattributehasavalueoftrueandthestatusattributehasa
valueof0.Ifthedescriptorfailsvalidation,thestatusissetto‐1,andthetemplatecontainsaTaskelement
whoseErrorelementindicatesthereasonforthefailure.
EachoftheFile
elementsincludesanuploadlink(<Link rel="upload:default" ... />)andseveral
attributes:
size.Thefilesize,takenfromthesizeattributeoftheFileelementintheOVFdescriptor.
bytesTransferred.Forallfilereferencesotherthanthedescriptor,thisattributeisinitiallysettoavalueof
0indicatingthattheuploadhasnotyetbegun.IntheFilereferencetothedescriptor,thevalueofthe
bytesTransferredattributeisequaltothevalueofthesizeattribute,indicating
thatallthebytesinthe
descriptorhavebeentransferred.
name.Thefilename,takenfromthehrefattributeoftheFileelementintheOVFdescriptor.
Including a Manifest
SomeOVFpackagesincludeamanifestdocument,whichspecifiesachecksumforeachfileinthepackage.If
youareuploadingapackagethatincludesamanifestfile,addamanifestRequired="true"attributetothe
requestbody,asshowninExample 45.
Example 4-5. uploadVappTemplate Request for an OVF Package That Includes a Manifest
POST http://vcloud.example.com/api/v1.0/vdc/5/action/uploadVAppTemplate
Content-Type: application/vnd.vmware.vcloud.uploadVAppTemplateParams+xml
<UploadVAppTemplateParams name="Ubuntu Template" manifestRequired="true"
xmlns="http://www.vmware.com/vcloud/v1" >
<Description>Ubuntu vApp Template</Description>
</UploadVAppTemplateParams>
Whenyouspecifythatamanifestisrequired,thesetofFileelementsreturnedafteryouuploadtheOVF
descriptorincludesoneforthemanifestitself.Afterallthefilesareuploaded,eachfileischeckedbytheserver
toverifythatitschecksummatchestheonestatedinthemanifest.
Ifanychecksumsdonotmatch,the
template’sstatusattributeissetto‐1andthetemplatecontainsaTaskelementwhoseErrorelement
indicatesthereasonforthefailure.
Uploading the Files
InformationfromtheserversresponseinExample 43enablestheclienttoconstructaseriesofPUTrequests,
oneforeachFileinthelist,thatuploadthefilesreferencedbythetemplate.Eachrequestspecifiesanupload
URLandacontentlengthinbytes.
Example 46showsanuploadrequest
foroneofthefilesrequiredbyanOVFpackage.Theuploadrequestis
simplyafewheaderlines,followedbytheserializedfilecontent.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

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

VMware VCLOUD API 1.0 - API Specifications

General IconGeneral
BrandVMware
ModelVCLOUD API 1.0 - API
CategorySoftware
LanguageEnglish

Related product manuals