VMware, Inc.
131
Chapter 7 VMware vSphere Platform Operations
</vmext:VimObjectRef>
</vmext:DataStoreRefs>
<vmext:ResourcePoolRef>
<vmext:VimServerRef type="application/vnd.vmware.admin.vmwvirtuaxml" name="VC2"
href="http://vcloud.example.com/api/v1.0/admin/extension/vimServer/101"/>
<vmext:MoRef>resgroup-220</vmext:MoRef>
<vmext:VimObjectType>RESOURCE_POOL</vmext:VimObjectType>
</vmext:ResourcePoolRef>
<vmext:VimServer type="application/vnd.vmware.admin.vmwvirtuaxml" name="VC2"
href="http://vcloud.example.com/api/v1.0/admin/extension/vimServer/101"/>
<vmext:HostReferences>
<vmext:HostReference type="application/vnd.vmware.admin.host+xml" name="10.115.121.11"
href="http:// vcloud.example.com/api/v1.0/admin/extension/host/1"/>
<vmext:HostReference type="application/vnd.vmware.admin.host+xml" name="10.115.121.9"
href="http:// vcloud.example.com/api/v1.0/admin/extension/host/2"/>
</vmext:HostReferences>
</vmext:VMWProviderVdc>
The
response
echoes
the
request
but
now
has
a
status
attribute
whose
value
is
initially
0
and
an
href
attribute
whose
value
is
the
URL
of
the
new
provider
vDC.
It
also
includes
some
additional
elements
created
by
the
server:
Link
elements
for
actions
and
related
references
A
Task
element
that
tracks
creation
of
the
provider
vDC.
When
the
task
completes,
the
value
of
the
provider
vDC’s
status
attribute
changes
to
1
.
A
HostReferences
element
that
contains
references
to
the
ESX/ESXi
hosts
registered
to
the
vCenter
server
backing
this
provider
vDC.
Examine the vSphere Objects in a Provider vDC
A
system
administrator
can
retrieve
a
list
of
ProviderVdcReferences
(see
“List
Provider
vDCs
in
a
vCloud”
on
page 120),
then
use
the
value
of
the
href
attribute
in
any
ProviderVdcReference
as
the
target
of
a
GET
request.
The
response
is
a
VMWProviderVdc
body
similar
to
the
one
shown
in
the
response
in
Example 7
‐
18
.
Modify a Provider vDC
To
modify
a
provider
vDC,
make
a
PUT
request
to
its
edit
link,
and
supply
a
modified
version
of
the
VMWProviderVdc
element
in
the
request
body.
In
Example 7
‐
19
,
the
client
modifies
the
Cpu Allocation
of
the
provider
vDC
created
in
Example 7
‐
18
,
then
includes
the
modified
element
in
a
PUT
request
to
the
edit
link
in
the
VMWProviderVdc
element.
You
must
include
all
required
elements
and
attributes
in
the
request,
even
those
that
you
are
not
changing.
Example 7-19.
Modify a Provider vDC
Request:
PUT http://vcloud.example.com/api/v1.0/admin/extension/providervdc/2
Content-Type: application/vnd.vmware.admin.vmwprovxml
...
<vmext:VMWProviderVdc xmlns:vmext="http://www.vmware.com/vcloud/extension/v1"
xmlns:vcloud="http://www.vmware.com/vcloud/v1" name="PvDC-VC2"
type="application/vnd.vmware.admin.vmwprovxml">
<vcloud:ComputeCapacity>
<vcloud:Cpu>
<vcloud:Units>MHz</vcloud:Units>
<vcloud:Allocation>4096</vcloud:Allocation>
<vcloud:Total>24675</vcloud:Total>
</vcloud:Cpu>
<vcloud:Memory>
<vcloud:Units>MB</vcloud:Units>
<vcloud:Allocation>1319056</vcloud:Allocation>
<vcloud:Total>2097152</vcloud:Total>
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...