VMware, Inc.
67
Chapter 5 Datacenter Operations
Recompose a vApp to Add or Remove Virtual Machines
The
vCloud
API
supports
recomposition
of
a
vApp
to
add
or
remove
virtual
machines
(
Vm
elements).
To
recompose
a
vApp,
a
client
makes
a
recomposeVApp
request,
supplying
a
RecomposeVAppParams
element
as
the
request
body.
The
RecomposeVAppParams
element
allows
an
arbitrary
number
of
DeleteItem
elements,
but
is
otherwise
identical
to
ComposeVAppParams
.
This
means
that
in
addition
to
adding
or
removing
virtual
machines,
a
recomposeVApp
request
can
also
change
the
name
and
description
of
the
vApp,
and
can
supply
new
InstantiationParams
to
change
various
sections
of
the
composed
vApp
or
any
of
the
added
virtual
machines.
Example 5-6.
vApp Before Recomposition
Request:
GET http://vcloud.example.com/api/v1.0/vApp/vapp-33
Response:
200 OK
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>
...
<Children>
<Vm status="8" name="CRM-DB" href="http://vcloud.example.com/api/v1.0/vApp/vm-7" ...>
...
</Vm>
<Vm status="8" name="CRM-CRM" href="http://vcloud.example.com/api/v1.0/vApp/vm-44" ...>
...
</Vm>
<Vm status="8" name="CRM-HTTP" href="http://vcloud.example.com/api/v1.0/vApp/vm-45" ...>
...
</Vm>
</Children>
...
</VApp>
Example 5
‐
7
shows
a
re
composeVApp
request
that
modifies
the
vApp
shown
in
Example 5
‐
6
by
removing
one
of
the
virtual
machines
it
contains
and
creating
a
new
StartupSection
that
specifies
a
startup
order
for
the
two
virtual
machines
that
remain
in
the
vApp.
Example 5-7.
Recompose a vApp
Request:
POST http://vcloud.example.com/api/v1.0/vApp/vapp-33/action/recomposeVApp
Content-Type: application/vnd.vmware.vcloud.recomposeVApxml
...
<RecomposeVAppParams name="Example Corp’s CRM Appliance" xmlns="http://www.vmware.com/vcloud/v1"
xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1">
<InstantiationParams>
<NetworkConfigSection>
<ovf:Info>Configuration parameters for logical networks</ovf:Info>
<NetworkConfig networkName="CRMApplianceNetwork">
<Configuration>
<ParentNetwork href="http://vcloud.example.com/api/v1.0/network/54"/>
<FenceMode>bridged</FenceMode>
</Configuration>
</NetworkConfig>
</NetworkConfigSection>
Содержание 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...