vCloud API Programming Guide
66
VMware, Inc.
</NetworkConnectionSection>
</InstantiationParams>
</Item>
<Item>
<Source href="http://vcloud.example.com/api/v1.0/vAppTemplate/vappTemplate-114"/>
</Item>
<Item>
<Source href="http://vcloud.example.com/api/v1.0/vAppTemplate/vappTemplate-190"/>
</Item>
<AllEULAsAccepted>true</AllEULAsAccepted>
</ComposeVAppParams>
Response:
201 Created
Content-Type: application/vnd.vmware.vcloud.vApp+xml
...
<VApp name="Example Corp’s CRM Appliance" type="application/vnd.vmware.vcloud.vApp+xml"
status="8" href="http://vcloud.example.com/api/v1.0/vApp/vapp-33" ...>
<Link rel="up" type="application/vnd.vmware.vcloud.vdc+xml"
href="http://vcloud.example.com/api/v1.0/vdc/5"/>
<Description>Composed CRM Appliance</Description>
...
<Tasks>
<Task ...>
...
</Task>
</Tasks>
</VApp>
The
response
is
similar
to
the
one
shown
in
Example 5
‐
1
,
a
sparsely
populated
vApp
body
that
contains
a
Task
element.
The
status
of
the
vApp
is
initially
0
.
When
composition
is
complete,
the
status
changes
to
1
.
Finding Virtual Machine URLs to Use in a Composition Item
Virtual
machines
(
Vm
objects)
are
not
listed
in
catalogs
or
vDCs.
To
find
the
URL
of
a
Vm
URL
to
include
in
a
composition
item
Source
,
GET
a
vApp
or
vApp
template
that
includes
it,
and
examine
the
Children
container
of
the
VApp
element.
Each
Vm
in
this
container
has
an
href
attribute
whose
value
you
can
use
to
reference
the
Vm
for
this
(or
any
other)
purpose.
The
Vm
URL
used
in
Example 5
‐
4
appears
in
the
Children
element
of
Example 5
‐
5
.
Example 5-5.
Vm URL in a vApp Body
Request:
GET http://vcloud.example.com/api/v1.0/vApp/vapp-7
Response:
200 OK
Content-type: application/vnd.vmware.vcloud.vApp+xml
...
<VApp name="Linux FTP server" status="8" href="http://vcloud.example.com/api/v1.0/vApp/vapp-7"
...>
...
<Children>
<Vm status="8" href="http://vcloud.example.com/api/v1.0/vApp/vm-4" ...>
...
</Children>
</VApp>
N
OTE
To
be
included
in
a
composition
request,
a
Vm
must
be
powered
off
(
status="8"
).
Содержание 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...