vCloud API Programming Guide
106
VMware, Inc.
The
response
echoes
the
request,
and
includes
a
Task
element
that
tracks
creation
of
the
vDC.
The
network
created
in
Example 6
‐
10
appears
in
the
AvailableNetworks
element.
If
you
added
more
networks
to
the
organization
that
contains
this
vDC,
they
would
also
appear
in
that
element.
Get an Administrative View of a vDC
References
to
an
organization’s
vDCs
are
contained
in
the
Vdcs
element
of
the
Org
or
AdminOrg
body.
To
get
an
administrative
view
of
a
vDC,
an
administrator
can
make
a
GET
request
to
its
admin
URL.
The
request
returns
an
AdminVdc
body,
similar
to
the
one
shown
in
the
response
section
of
Example 6
‐
3
.
Modify a vDC
To
modify
a
vDC,
make
a
PUT
request
to
its
edit
link,
and
supply
a
modified
version
of
the
Vdc
body.
In
Example 6
‐
17
,
the
client
modifies
the
vDC
created
in
Example 6
‐
3
to
change
the
values
in
the
Cpu
element,
then
includes
the
modified
body
in
a
PUT
request
to
the
edit
link
that
was
returned
when
the
vDC
was
created.
The
response,
only
part
of
which
is
shown
in
the
example,
is
an
AdminVdc
body
containing
the
modified
values.
Example 6-17.
Modify a vDC
Request:
PUT http://vcloud.example.com/api/v1.0/admin/vdc/44
Content-Type: application/vnd.vmware.admin.vdc+xm
<AdminVdc name="org3vdc1" xmlns="http://www.vmware.com/vcloud/v1">
<Description>Example vDC</Description>
<AllocationModel>AllocationPool</AllocationModel>
<StorageCapacity>
<Units>MB</Units>
<Allocated>4096</Allocated>
<Limit>8192</Limit>
</StorageCapacity>
<ComputeCapacity>
<Cpu>
<Units>MHz</Units>
<Allocated>4096</Allocated>
<Limit>4096</Limit>
</Cpu>
<Memory>
<Units>MB</Units>
<Allocated>2048</Allocated>
<Limit>4096</Limit>
</Memory>
</ComputeCapacity>
<NicQuota>0</NicQuota>
<NetworkQuota>0</NetworkQuota>
<ProviderVdcReference type="application/vnd.vmware.admin.provxml"
name="Main Provider"
href="http://vcloud.example.com/api/v1.0/admin/providervdc/2"/>
</AdminVdc>
Response:
200 OK
Content-Type: application/vnd.vmware.admin.vdc+xm
...
<AdminVdc name="org26vdc1" type="application/vnd.vmware.admin.vdc+xml"
href="http://vcloud.example.com/api/v1.0/admin/vdc/44" ...>
...
<Tasks>
<Task status="running" ... operation="Updating Virtual Datacenter (44)"...>
...
</Task>
</Tasks>
Содержание 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...