VMware VCLOUD API 1.0 - API Programming Manual page 44

Table of Contents

Advertisement

vCloud API Programming Guide
The response body includes the following attributes:
An href attribute whose value is a link to the newly created vApp template object.
An ovfDescriptorUploaded attribute with a value of false, indicating that the OVF descriptor file has 
not yet been uploaded
A status attribute with a value of 0, indicating that the file references in the descriptor have not yet been 
uploaded. (A VAppTemplate with a status of 0 is said to be unresolved.)
It also includes a File element with an upload URL (rel="upload:default") for the OVF descriptor. The 
name attribute of this File element has been created by the server and specifies a container that the server has 
created to receive the contents of the descriptor. It has no relation to the file name of the descriptor in the 
client's file system.
The client uploads the OVF descriptor by making a PUT request to the upload URL, and supplying the 
descriptor's contents as an Envelope element in the request body. The server responds with a 200 OK status, 
as shown in Example
Example 4-3. Upload OVF Descriptor
Request:
PUT http://vcloud.example.com/transfer/.../descriptor.ovf
Content-Type text/xml
...
<Envelope ... >
...
</Envelope>
Response:
200 OK
After the descriptor is uploaded, the server validates it and, if it is valid, creates upload URLs for each of the 
files it references. To track the progress of this operation, the client can make periodic GET requests to the 
vAppTemplate URL. When the operation is complete, the response to this kind of request includes additional 
File elements beyond the one already created for the descriptor, as shown in Example
Example 4-4. GET vAppTemplate with Upload URLs
Request:
GET http://vcloud.example.com/api/v1.0/vAppTemplate/vappTemplate-268
Response:
200 OK
Content-Type: application/vnd.vmware.vcloud.vAppTemplate+xml
...
<VAppTemplate ovfDescriptorUploaded="true" status="0" name="Ubuntu Template"
<Link rel="up" type="application/vnd.vmware.vcloud.vdc+xml"
...
<Description>Ubuntu vApp Template</Description>
<Files>
<File size="3940" bytesTransferred="3940" name="descriptor.ovf">
<Link rel="upload:default"
</File>
44
4‐3.
href="http://vcloud.example.com/api/v1.0/vAppTemplate/vappTemplate-268"
type="application/vnd.vmware.vcloud.vAppTemplate+xml" ...>
href="http://vcloud.example.com/api/v1.0/vdc/5"/>
href="http://vcloud.example.com/transfer/.../descriptor.ovf"/>
4‐4.
VMware, Inc.

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

Table of Contents