1.5

Table Of Contents
In this example, which omits most of the additional elements shown in “Example: Initiating the Upload,” on
page 57, the ovfDescriptorUploaded attribute has a value of true and the status attribute has a value of 0. If
the descriptor fails validation, status is set to -1, and the template contains a Task element whose Error element
indicates the reason for the failure.
Each of the File elements includes an upload link where rel="upload:default" and several attributes.
size
The file size, taken from the size attribute of the File element in the OVF
descriptor.
bytesTransferred
For all file references other than the descriptor, this attribute is initially set to a
value of 0, indicating that the upload has not begun. In the File element that
references the OVF descriptor, the value of the bytesTransferred attribute is
equal to the value of the size attribute, indicating that all the bytes in the
descriptor were transferred.
name
The file name, taken from the href attribute of the File element in the OVF
descriptor.
NOTE Upload URLs remain valid while a transfer session is in progress, and for a maximum of 60 minutes of
transfer session idle time. A system administrator can change this default value. See “Retrieve or Update
System Settings,” on page 165.
Uploading Referenced Files
You can use a PUT request to upload each file that the vApp template references.
Prerequisites
n
Verify that you uploaded the OVF descriptor. See “Uploading the OVF Descriptor,” on page 59.
n
Retrieve the upload URLs for all files in the package. See “Retrieving the Upload URLs,” on page 59.
Procedure
1 Find the upload:default URL for the file you want to upload.
2 Use the upload:default URL to construct a PUT request for the file.
The request specifies an upload URL and a content length in bytes. See “Example: Uploading File
Data,” on page 61.
After all the files are uploaded, the vApp template is complete, and has a status attribute value of 8. If the
upload included a manifest file, the server checks each file in the upload to verify that its checksum matches
the one stated in the manifest. If a checksum does not match, the template’s status attribute is set to -1 and the
template contains a Task element whose Error element indicates the reason for the failure.
Example: Uploading File Data
This example shows an upload request for one of the files that an OVF package requires. The upload request
is a Content-Length header followed by the serialized file content.
Chapter 4 Provisioning an Organization with vApps, Templates, and Media
VMware, Inc. 61