5.1

Table Of Contents
4 Uploading Referenced Files on page 63
You can use a PUT request to upload each file that the vApp template references.
Initiating the OVF Upload
To initiate the OVF upload, a client makes a POST request to the uploadVAppTemplate URL of the target vDC.
The request body is an UploadVAppTemplateParams element.
The first step in uploading an OVF package is to request vCloud Director to create a vAppTemplate object to
represent the template that will be constructed from the upload. This request returns a response that includes
a URL to which you can upload the package's descriptor file.
Prerequisites
Verify that you have the following information:
n
An OVF package to upload.
n
You are logged in as a user who has permission to upload OVF packages and create vApp templates.
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.
Procedure
1 Find the uploadVappTemplate link in the target vDC.
Retrieve the XML representation of the vDC using a request like the one shown in the request portion of
“Example: Deployment Information in a vDC,” on page 30. The response contains an
uploadVappTemplate link, which has the following form:
<Link
rel="add"
type="application/vnd.vmware.vcloud.uploadVAppTemplateParams+xml"
href="https://vcloud.example.com/api/vdc/5/action/uploadVAppTemplate" />
2 Create an UploadVAppTemplateParams element that specifies a name for the template.
The Description element is optional. Using it to provide a concise description of this object is a best
practice. See the request portion of “Example: Initiating the Upload,” on page 59.
3 (Optional) If the OVF package includes a manifest, include a manifestRequired="true" attribute in the
UploadVAppTemplateParams element.
Some OVF packages include a manifest document, which provides a checksum for each file in the package.
When the UploadVAppTemplateParams element includes a manifestRequired="true" attribute, the set of
File elements returned after you upload the OVF descriptor includes one for the manifest itself.
4 Make an HTTP POST request to the uploadVAppTemplate link that you retrieved in Step 1, supplying the
UploadVAppTemplateParams element in the request body.
See the request portion of “Example: Initiating the Upload,” on page 59.
5 Examine the response.
The response, a VAppTemplate element, contains a File element that specifies an upload URL for the
package's OVF descriptor. See the response portion of “Example: Initiating the Upload,” on page 59.
The server creates a new VAppTemplate object in the target vDC and returns the object's XML representation in
the response. See the response portion of “Example: Initiating the Upload,” on page 59.
Example: Initiating the Upload
This example assumes an OVF package that has no manifest.
Chapter 4 Provisioning an Organization
VMware, Inc. 59