vCloud API Programming Guide
44
VMware, Inc.
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 4
‐
3
.
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 4
‐
4
.
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.vAppTxml
...
<VAppTemplate ovfDescriptorUploaded="true" status="0" name="Ubuntu Template"
href="http://vcloud.example.com/api/v1.0/vAppTemplate/vappTemplate-268"
type="application/vnd.vmware.vcloud.vAppTxml" ...>
<Link rel="up" type="application/vnd.vmware.vcloud.vdc+xml"
href="http://vcloud.example.com/api/v1.0/vdc/5"/>
...
<Description>Ubuntu vApp Template</Description>
<Files>
<File size="3940" bytesTransferred="3940" name="descriptor.ovf">
<Link rel="upload:default"
href="http://vcloud.example.com/transfer/.../descriptor.ovf"/>
</File>
Summary of Contents for VCLOUD API 1.0 - TECHNICAL NOTE
Page 10: ...vCloud API Programming Guide 10 VMware Inc...
Page 20: ...vCloud API Programming Guide 20 VMware Inc...
Page 32: ...vCloud API Programming Guide 32 VMware Inc...
Page 90: ...vCloud API Programming Guide 90 VMware Inc...
Page 150: ...vCloud API Programming Guide 150 VMware Inc...
Page 170: ...vCloud API Programming Guide 170 VMware Inc...