5.1

Table Of Contents
Procedure
1 For each File element in the References element of the descriptor, construct a download URL.
a Start with the URL that you used to download the descriptor.
This URL is the href value of the download:default link that the template contains.
b Replace the final component of that URL with the value of the href attribute of the File element.
2 Use the constructed URLs to download each file.
See “Example: Downloading a Referenced File,” on page 69.
Example: Downloading a Referenced File
The request URL shown in this example combines the URL used in the request portion of
“Example: Downloading the OVF Descriptor,” on page 68 with the file name shown in this File element:
<File
ovf:href="disk0.vmdk"
ovf:id="file1"
ovf:size="1950489088"/>
Request:
GET https://vcloud.example.com/transfer/..../disk0.vmdk
Response:
200 OK
...
...serialized contents of file disk0.vmdk...
EOF
NOTE The downloaded package is valid only if the descriptor and all of its referenced files maintain the same
relationship in the local file system that they had on the transfer server file system. In this case, the descriptor
and disk0.vmdk were both in the same directory, which is the default arrangement.
Upload a Media Image
The vCloud API supports uploading virtual media such as CD-ROM and floppy disk images.
The workflow for uploading media images is similar to the one described in “Upload an OVF Package to Create
a vApp Template,” on page 57.
NOTE You cannot download media images.
Prerequisites
Verify that the following conditions are met:
n
You have a media image to upload.
n
You are logged in as a user who has permission to upload media images.
n
You know the URL of the target vDC that will receive the upload. Retrieve the XML representation of
your organization to see a list of the vDCs that it contains.
Chapter 4 Provisioning an Organization
VMware, Inc. 69