VMware, Inc.
133
Chapter 7 VMware vSphere Platform Operations
Example 7-21.
Remove a vDC
Request:
DELETE http://vcloud.example.com/api/v1.0/admin/extension/providervdc/43
Response:
202 Accepted
Content-Type: application/vnd.vmware.vcloud.task+xml
...
<Task ... operation="Deleting Provider Virtual Datacenter (43)" ...>
...
</Task>
Create an External Network
A
system
administrator
can
use
the
rel="add"
link
for
externalnets
in
a
VMWExtension
element
to
add
an
external
network
to
a
vCloud.
Example 7
‐
22
does
this
by
making
a
POST
request
to
the
externalnets
link
returned
in
Example 7
‐
1
.
The
content
of
the
VimPortGroupRef
element
in
the
request
body
specifies
that
vCenter
portgroup
that
supports
the
new
external
network.
Example 7-22.
Create an External Network
Request:
POST http://vcloud.example.com/api/v1.0/admin/extension/externalnets
Content-Type: application/vnd.vmware.admin.vmwextexml
...
<vmext:VMWExternalNetwork xmlns:vmext="http://www.vmware.com/vcloud/extension/v1"
xmlns:vcloud="http://www.vmware.com/vcloud/v1" name="ExternalNet-VC100">
<vcloud:Description>Portgroup-25 on VC-100</vcloud:Description>
<vcloud:Configuration>
<vcloud:IpScope>
<vcloud:IsInherited>false</vcloud:IsInherited>
<vcloud:Gateway>10.147.58.253</vcloud:Gateway>
<vcloud:Netmask>255.255.255.0</vcloud:Netmask>
<vcloud:Dns1>10.147.115.1</vcloud:Dns1>
<vcloud:Dns2>10.147.115.2</vcloud:Dns2>
<vcloud:DnsSuffix>eng.vmware.com</vcloud:DnsSuffix>
<vcloud:IpRanges>
<vcloud:IpRange>
<vcloud:StartAddress>10.147.58.1</vcloud:StartAddress>
<vcloud:EndAddress>10.147.58.100</vcloud:EndAddress>
</vcloud:IpRange>
</vcloud:IpRanges>
</vcloud:IpScope>
<vcloud:FenceMode>isolated</vcloud:FenceMode>
</vcloud:Configuration>
<vmext:VimPortGroupRef>
<vmext:VimServerRef type="application/vnd.vmware.admin.vmwxml"
href="http://vcloud.example.com/api/v1.0/admin/extension/vimServer/100"/>
<vmext:MoRef>dvportgroup-25</vmext:MoRef>
<vmext:VimObjectType>NETWORK</vmext:VimObjectType>
</vmext:VimPortGroupRef>
</vmext:VMWExternalNetwork>
N
OTE
You
must
use
the
VMware
vSphere
API
to
obtain
the
values
you
need
to
populate
the
VimPortGroupRef
element.
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...