vCloud API Programming Guide
26
VMware, Inc.
<Task status="running" startTime="2010-06-25T08:00:55.402-07:00" operation="Creating
Virtual Application Linux FTP server(7)"
expiryTime="2010-09-23T08:00:55.402-07:00"
type="application/vnd.vmware.vcloud.task+xml"
href="http://vcloud.example.com/api/v1.0/task/1awvdrn82atz7yzsdey">
<Owner type="application/vnd.vmware.vcloud.vApp+xml" name="LinuxFtpServer"
href="http://vcloud.example.com/vApp/vapp-7"/>
</Task>
</Tasks>
</VApp>
The
response
to
the
instantiation
request
is
a
sparsely
populated
vApp
body,
which
includes
the
following
information:
The
status
of
the
vApp.
The
status
value
0
indicates
that
the
vApp
is
unresolved,
because
instantiation
has
not
completed.
The
name
of
the
vApp,
as
supplied
in
the
request
The
vApp
URL,
shown
in
the
href
attribute
of
the
VApp
body
A
task
created
to
track
the
instantiation.
The
Task
element
has
an
operation
attribute
that
describes
what
is
happening,
and
contains
an
Owner
element
that
is
a
reference
the
vApp
being
created.
For
more
information,
see
“Task”
on
page 168.
Deploying and Powering On the vApp
After
the
instantiation
task
completes,
the
template
has
been
transformed
into
a
vApp.
The
vApp
body
no
longer
includes
a
Tasks
element,
and
it
now
includes
a
number
of
Link
elements
that
you
can
use
to
deploy
and
operate
the
vApp.
Example 2
‐
7
shows
a
request
and
response
for
a
deploy
action.
The
request
URL
is
the
rel="deploy"
link
returned
in
the
vApp
body
(see
Example 2
‐
8
).
The
request
body
is
a
DeployVAppParams
element,
which
specifies
deployment
details.
Example 2-7.
Deploy and Power On a vApp
Request:
POST http://vcloud.example.com/api/v1.0/vApp/vapp-7/action/deploy
Content-type: application/vnd.vmware.vcloud.deployVApxml
...
<DeployVAppParams powerOn="true" deploymentLeaseSeconds="2592000"
xmlns="http://www.vmware.com/vcloud/v1"/>
Response:
202 Accepted
<Task xmlns="http://www.vmware.com/vcloud/v1" status="running"
startTime="2010-06-25T11:15:55.558-07:00" operation="Starting Virtual Application
Linux FTP server(7)" expiryTime="2010-09-23T08:00:55.402-07:00"
type="application/vnd.vmware.vcloud.task+xml"
href="http://vcloud.example.com/api/v1.0/task/i9h1djqzsyllf0zvdy" ...>
<Owner type="application/vnd.vmware.vcloud.vApp+xml" name="LinuxFtpServer"
href="http://vcloud.example.com/vApp/vapp-7"/>
</Task>
Because
deployment
is
a
long
‐
running
operation
that
can
fail
for
a
variety
of
reasons
(inability
of
the
vDC
to
satisfy
the
vApp’s
resource
requirements,
for
example),
the
response
is
a
Task
.
N
OTE
A
vApp
template
might
include
a
license
agreement
or
other
terms
that
you
must
accept
before
you
can
create
a
vApp
from
it.
In
this
example,
the
template
contains
no
such
terms.
If
it
did,
the
request
would
fail
if
it
did
not
include
an
AllEULAsAccepted
element,
as
shown
in
Example 5
‐
1
on
page 63
.
Содержание VCLOUD API 1.0 - TECHNICAL NOTE
Страница 10: ...vCloud API Programming Guide 10 VMware Inc...
Страница 20: ...vCloud API Programming Guide 20 VMware Inc...
Страница 32: ...vCloud API Programming Guide 32 VMware Inc...
Страница 90: ...vCloud API Programming Guide 90 VMware Inc...
Страница 150: ...vCloud API Programming Guide 150 VMware Inc...
Страница 170: ...vCloud API Programming Guide 170 VMware Inc...
Страница 202: ...vCloud API Programming Guide 202 VMware Inc...
Страница 212: ...vCloud API Programming Guide 212 VMware Inc...