vCloud API Programming Guide
136
VMware, Inc.
Example 7-25.
Remove an External Network
Request:
DELETE http://vcloud.example.com/api/v1.0/admin/extension/externalnet/27
Response:
202 Accepted
Content-Type: application/vnd.vmware.vcloud.task+xml
...
<Task ... operation="Deleting External Network (27)" ...>
...
</Task>
Create a Network Pool
A
system
administrator
can
use
the
rel="add"
link
for
networkPools
in
a
VMWExtension
body
to
add
a
network
pool
to
a
vCloud.
Example 7
‐
26
creates
a
network
pool
of
the
VlanPoolType
by
making
a
POST
request
to
the
networkPools
link
returned
in
Example 7
‐
1
.
Requests
to
create
network
pools
of
other
types
(
FencePoolType
and
PortGroupPoolType
)
follow
a
similar
pattern.
Example 7-26.
Create a Network Pool
Request:
POST http://vcloud.example.com/api/v1.0/admin/extension/networkPools
Content-Type: application/vnd.vmware.admin.netwxml
...
<vmext:VMWNetworkPool xmlns:vmext="http://www.vmware.com/vcloud/extension/v1"
xmlns:vcloud="http://www.vmware.com/vcloud/v1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance”
xsi:type="vmext:VlanPoolType" name="NewVlanPool">
<vcloud:Description>Extra pool for new Orgs</vcloud:Description>
<vmext:VlanRange>
<vmext:Start>100</vmext:Start>
<vmext:End>120</vmext:End>
</vmext:VlanRange>
<vmext:VimSwitchRef>
<vmext:VimServerRef type="application/vnd.vmware.admin.vmwxml"
href="http://vcloud.example.com/api/v1.0/admin/extension/vimServer/100"/>
<vmext:MoRef>dvs-28</vmext:MoRef>
<vmext:VimObjectType>DV_SWITCH</vmext:VimObjectType>
</vmext:VimSwitchRef>
</vmext:VMWNetworkPool>
Response:
201 Created
Content-Type: application/vnd.vmware.admin.netwxml
...
<vmext:VMWNetworkPool xmlns:vmext="http://www.vmware.com/vcloud/extension/v1"
xmlns:vcloud="http://www.vmware.com/vcloud/v1" xsi:type="vmext:VlanPoolType"
name="NewVlanPool" type="application/vnd.vmware.admin.netwxml"
href="http://vcloud.example.com/api/v1.0/admin/extension/networkPool/41" ... >
<vcloud:Description>Extra pool for new Orgs</vcloud:Description>
<vmext:VlanRange>
<vmext:Start>100</vmext:Start>
<vmext:End>120</vmext:End>
</vmext:VlanRange>
<vmext:VimSwitchRef>
N
OTE
You
must
use
the
VMware
vSphere
API
to
obtain
the
values
you
need
to
populate
the
VimSwitchRef
element.
Содержание 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...