VMware, Inc.
49
Chapter 4 Provisioning
<Disk ovf:capacity="100" ovf:capacityAllocationUnits="byte * 2^20" ovf:diskId="vmdisk1"
ovf:fileRef="file1"
ovf:format="http://www.vmware.com/interfaces/specifications/
vmdk.html#streamOptimized"/>
</DiskSection>
<VirtualSystem ... ovf:id="Ubuntu Template">
...
</VirtualSystem>
</Envelope>
In
this
example,
the
descriptor
references
only
one
file:
<File ovf:href="disk0.vmdk" ovf:id="file1" ovf:size="1950489088"/>
The
href
attribute
of
the
File
element
is
the
path
to
the
file
relative
to
the
location
of
the
descriptor
itself.
To
retrieve
this
file
from
the
server,
the
client
must
make
a
GET
request
to
a
URL
that
it
constructs
with
a
simple
two
‐
step
algorithm:
1
Start
with
the
URL
that
was
contained
in
the
download:default
attribute
of
the
Link
to
the
descriptor
that
was
contained
by
template.
(See
Example 4
‐
11
.)
2
Replace
the
final
component
of
that
URL
with
the
value
of
the
href
attribute
of
the
File
in
the
downloaded
OVF
descriptor.
The
result
of
this
process,
using
the
responses
in
Example 4
‐
11
and
Example 4
‐
12
,
is
the
request
URL
shown
in
Example 4
‐
13
.
Example 4-13.
Downloading a Referenced File
Request:
GET http://vcloud.example.com/transfer/..../disk0.vmdk
Response:
200 OK
...
...serialized
contents
of
file
disk0.vmdk...
EOF
When
the
download
completes,
the
vApp
template
is
available
on
the
client
as
an
OVF
package.
Disable a vApp Template for Download
An
administrator
or
authorized
user
can
use
the
disableDownload
action
to
disable
a
vApp
template
for
download,
as
shown
in
Example 4
‐
14
.
The
response
is
an
HTTP
204
(No
Content)
status.
Example 4-14.
Disable a vApp Template for Download
Request:
POST http://vcloud.example.com/api/v1.0/vAppTemplate/vappTemplate-268/action/disableDownload
Response:
204 No Content
N
OTE
Make
sure
that
the
downloaded
files
maintain
the
same
relationship
to
each
other
in
the
local
file
system
as
they
had
on
the
transfer
server
file
system.
In
this
case,
the
descriptor
and
disk0.vmdk
were
both
in
the
same
directory
(the
default
arrangement).
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...