VMware Cloud Director API - POST-CreateNetworkPool
POST /admin/extension/networkPools
- Operation:
- POST /admin/extension/networkPools
- Description:
- Create a network pool.
- Since:
- 0.9
- Deprecated:
- 35.0
- Input parameters
-
- Consume media type(s):
-
application/vnd.vmware.admin.networkPool+xml
application/vnd.vmware.admin.networkPool+json
- Input type:
- VMWNetworkPoolType
- Output parameters
-
VMWNetworkPool
- Produce media type(s):
-
application/vnd.vmware.admin.networkPool+xml
application/vnd.vmware.admin.networkPool+json
- Output type:
- VMWNetworkPoolType
- Examples
-
-
Add vlan-backed network pool.
- Request
-
HTTP 1.1
POST /api/admin/extension/networkPools
Headers:
Content-Length: 782
Content-Type: application/vnd.vmware.admin.networkPool+xml; charset=ISO-8859-1
x-vcloud-authorization: X600Twh81GezzqBm3B3GXTe8r9U8+U5kIrA3X4H2ctE=
Body:
<?xml version="1.0" encoding="UTF-8"?><vmext:VMWNetworkPool
xmlns:vcloud="http://www.vmware.com/vcloud/v1.5"
xmlns:vmext="http://www.vmware.com/vcloud/extension/v1.5"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
name="Vlan-backed-net-pool"
xsi:type="vmext:VlanPoolType">
<vcloud:Description>Example vlan-backed network pool</vcloud:Description>
<vmext:VlanRange>
<vmext:Start>1</vmext:Start>
<vmext:End>5</vmext:End>
</vmext:VlanRange>
<vmext:VimSwitchRef>
<vmext:VimServerRef
href="https://vcloud.example.com/api/admin/extension/vimServer/3691f5d6-32eb-44f6-804a-1d30d17068c3"/>
<vmext:MoRef>dvs-45</vmext:MoRef>
<vmext:VimObjectType>DV_SWITCH</vmext:VimObjectType>
</vmext:VimSwitchRef>
</vmext:VMWNetworkPool>
- Response
-
HTTP/1.1 201 Created
Headers:
Content-Length: 3109
Content-Type: application/vnd.vmware.admin.networkpool+xml;version=5.1
Location: https://vcloud.example.com/api/admin/extension/networkPool/63c8ed84-2bf2-427b-9eae-548b4ab78410
Vary: Accept-Encoding
Body:
<?xml version="1.0" encoding="UTF-8"?><vmext:VMWNetworkPool
xmlns:vcloud="http://www.vmware.com/vcloud/v1.5"
xmlns:vmext="http://www.vmware.com/vcloud/extension/v1.5"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
href="https://vcloud.example.com/api/admin/extension/networkPool/63c8ed84-2bf2-427b-9eae-548b4ab78410"
id="urn:vcloud:networkpool:63c8ed84-2bf2-427b-9eae-548b4ab78410"
name="Vlan-backed-net-pool"
status="0"
type="application/vnd.vmware.admin.networkPool+xml"
xsi:schemaLocation="http://www.vmware.com/vcloud/extension/v1.5 http://https://vcloud.example.com/api/v1.5/schema/vmwextensions.xsd http://www.vmware.com/vcloud/v1.5 http://https://vcloud.example.com/api/v1.5/schema/master.xsd"
xsi:type="vmext:VlanPoolType">
<vcloud:Link
href="https://vcloud.example.com/api/admin/extension/networkPoolReferences"
rel="up"
type="application/vnd.vmware.admin.vmwNetworkPoolReferences+xml"/>
<vcloud:Link
href="https://vcloud.example.com/api/admin/extension/networkPool/63c8ed84-2bf2-427b-9eae-548b4ab78410"
rel="edit"
type="application/vnd.vmware.admin.networkPool+xml"/>
<vcloud:Link
href="https://vcloud.example.com/api/admin/extension/networkPool/63c8ed84-2bf2-427b-9eae-548b4ab78410"
rel="remove"/>
<vcloud:Description>Example vlan-backed network pool</vcloud:Description>
<vcloud:Tasks>
<vcloud:Task
cancelRequested="false"
expiryTime="2013-05-13T16:56:46.818+03:00"
href="https://vcloud.example.com/api/task/31dcc286-afb5-4a4a-a7e1-d252b18fcf8e"
id="urn:vcloud:task:31dcc286-afb5-4a4a-a7e1-d252b18fcf8e"
name="task"
operation="Creating Network Pool Vlan-backed-net-pool(63c8ed84-2bf2-427b-9eae-548b4ab78410)"
operationName="networkCreateNetworkPool"
serviceNamespace="com.vmware.vcloud"
startTime="2013-02-12T16:56:46.818+02:00"
status="running"
type="application/vnd.vmware.vcloud.task+xml">
<vcloud:Link
href="https://vcloud.example.com/api/task/31dcc286-afb5-4a4a-a7e1-d252b18fcf8e/action/cancel"
rel="task:cancel"/>
<vcloud:Owner
href="https://vcloud.example.com/api/admin/extension/networkPool/63c8ed84-2bf2-427b-9eae-548b4ab78410"
name="Vlan-backed-net-pool"
type="application/vnd.vmware.admin.networkPool+xml"/>
<vcloud:User
href="https://vcloud.example.com/api/admin/user/1260efee-6915-494c-8afa-84e7e6d8a310"
name="vcloud"
type="application/vnd.vmware.admin.user+xml"/>
<vcloud:Organization
href="https://vcloud.example.com/api/org/a93c9db9-7471-3192-8d09-a8f7eeda85f9"
name="System"
type="application/vnd.vmware.vcloud.org+xml"/>
<vcloud:Details/>
</vcloud:Task>
</vcloud:Tasks>
<vmext:VlanRange>
<vmext:Start>1</vmext:Start>
<vmext:End>5</vmext:End>
</vmext:VlanRange>
<vmext:VimSwitchRef>
<vmext:VimServerRef
href="https://vcloud.example.com/api/admin/extension/vimServer/3691f5d6-32eb-44f6-804a-1d30d17068c3"
type="application/vnd.vmware.admin.vmwvirtualcenter+xml"/>
<vmext:MoRef>dvs-45</vmext:MoRef>
<vmext:VimObjectType>DV_SWITCH</vmext:VimObjectType>
</vmext:VimSwitchRef>
<vmext:UsedNetworksCount>0</vmext:UsedNetworksCount>
</vmext:VMWNetworkPool>
Add isolation-backed network pool. - Request
-
HTTP 1.1
POST /api/admin/extension/networkPools
Headers:
Content-Length: 761
Content-Type: application/vnd.vmware.admin.networkPool+xml; charset=ISO-8859-1
x-vcloud-authorization: X600Twh81GezzqBm3B3GXTe8r9U8+U5kIrA3X4H2ctE=
Body:
<?xml version="1.0" encoding="UTF-8"?><vmext:VMWNetworkPool
xmlns:vcloud="http://www.vmware.com/vcloud/v1.5"
xmlns:vmext="http://www.vmware.com/vcloud/extension/v1.5"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
name="Isolation-backed-net-pool"
xsi:type="vmext:FencePoolType">
<vcloud:Description>Example isolation-backed network pool</vcloud:Description>
<vmext:FenceIdCount>12</vmext:FenceIdCount>
<vmext:VlanId>0</vmext:VlanId>
<vmext:VimSwitchRef>
<vmext:VimServerRef
href="https://vcloud.example.com/api/admin/extension/vimServer/3691f5d6-32eb-44f6-804a-1d30d17068c3"/>
<vmext:MoRef>dvs-45</vmext:MoRef>
<vmext:VimObjectType>DV_SWITCH</vmext:VimObjectType>
</vmext:VimSwitchRef>
</vmext:VMWNetworkPool>
- Response
-
HTTP/1.1 201 Created
Headers:
Content-Length: 3143
Content-Type: application/vnd.vmware.admin.networkpool+xml;version=5.1
Location: https://vcloud.example.com/api/admin/extension/networkPool/ca46ab0d-a049-4b5d-a9b2-b248a12d0770
Vary: Accept-Encoding
Body:
<?xml version="1.0" encoding="UTF-8"?><vmext:VMWNetworkPool
xmlns:vcloud="http://www.vmware.com/vcloud/v1.5"
xmlns:vmext="http://www.vmware.com/vcloud/extension/v1.5"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
href="https://vcloud.example.com/api/admin/extension/networkPool/ca46ab0d-a049-4b5d-a9b2-b248a12d0770"
id="urn:vcloud:networkpool:ca46ab0d-a049-4b5d-a9b2-b248a12d0770"
name="Isolation-backed-net-pool"
status="0"
type="application/vnd.vmware.admin.networkPool+xml"
xsi:schemaLocation="http://www.vmware.com/vcloud/extension/v1.5 http://https://vcloud.example.com/api/v1.5/schema/vmwextensions.xsd http://www.vmware.com/vcloud/v1.5 http://https://vcloud.example.com/api/v1.5/schema/master.xsd"
xsi:type="vmext:FencePoolType">
<vcloud:Link
href="https://vcloud.example.com/api/admin/extension/networkPoolReferences"
rel="up"
type="application/vnd.vmware.admin.vmwNetworkPoolReferences+xml"/>
<vcloud:Link
href="https://vcloud.example.com/api/admin/extension/networkPool/ca46ab0d-a049-4b5d-a9b2-b248a12d0770"
rel="edit"
type="application/vnd.vmware.admin.networkPool+xml"/>
<vcloud:Link
href="https://vcloud.example.com/api/admin/extension/networkPool/ca46ab0d-a049-4b5d-a9b2-b248a12d0770"
rel="remove"/>
<vcloud:Description>Example isolation-backed network pool</vcloud:Description>
<vcloud:Tasks>
<vcloud:Task
cancelRequested="false"
expiryTime="2013-05-13T16:57:02.829+03:00"
href="https://vcloud.example.com/api/task/36e9d12f-c5b8-4385-8ded-4f51ca81c07b"
id="urn:vcloud:task:36e9d12f-c5b8-4385-8ded-4f51ca81c07b"
name="task"
operation="Creating Network Pool Isolation-backed-net-pool(ca46ab0d-a049-4b5d-a9b2-b248a12d0770)"
operationName="networkCreateFencePoolTypeNetworkPool"
serviceNamespace="com.vmware.vcloud"
startTime="2013-02-12T16:57:02.829+02:00"
status="running"
type="application/vnd.vmware.vcloud.task+xml">
<vcloud:Link
href="https://vcloud.example.com/api/task/36e9d12f-c5b8-4385-8ded-4f51ca81c07b/action/cancel"
rel="task:cancel"/>
<vcloud:Owner
href="https://vcloud.example.com/api/admin/extension/networkPool/ca46ab0d-a049-4b5d-a9b2-b248a12d0770"
name="Isolation-backed-net-pool"
type="application/vnd.vmware.admin.networkPool+xml"/>
<vcloud:User
href="https://vcloud.example.com/api/admin/user/1260efee-6915-494c-8afa-84e7e6d8a310"
name="vcloud"
type="application/vnd.vmware.admin.user+xml"/>
<vcloud:Organization
href="https://vcloud.example.com/api/org/a93c9db9-7471-3192-8d09-a8f7eeda85f9"
name="System"
type="application/vnd.vmware.vcloud.org+xml"/>
<vcloud:Details/>
</vcloud:Task>
</vcloud:Tasks>
<vmext:FenceIdCount>12</vmext:FenceIdCount>
<vmext:VlanId>0</vmext:VlanId>
<vmext:VimSwitchRef>
<vmext:VimServerRef
href="https://vcloud.example.com/api/admin/extension/vimServer/3691f5d6-32eb-44f6-804a-1d30d17068c3"
type="application/vnd.vmware.admin.vmwvirtualcenter+xml"/>
<vmext:MoRef>dvs-45</vmext:MoRef>
<vmext:VimObjectType>DV_SWITCH</vmext:VimObjectType>
</vmext:VimSwitchRef>
<vmext:UsedNetworksCount>0</vmext:UsedNetworksCount>
<vmext:Mtu>1500</vmext:Mtu>
</vmext:VMWNetworkPool>
Add portgroup-backed network pool. - Request
-
HTTP 1.1
POST /api/admin/extension/networkPools
Headers:
Content-Length: 1019
Content-Type: application/vnd.vmware.admin.networkPool+xml; charset=ISO-8859-1
x-vcloud-authorization: X600Twh81GezzqBm3B3GXTe8r9U8+U5kIrA3X4H2ctE=
Body:
<?xml version="1.0" encoding="UTF-8"?><vmext:VMWNetworkPool
xmlns:vcloud="http://www.vmware.com/vcloud/v1.5"
xmlns:vmext="http://www.vmware.com/vcloud/extension/v1.5"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
name="Portgroup-backed-net-pool"
xsi:type="vmext:PortGroupPoolType">
<vcloud:Description>Example portgroup-backed network pool</vcloud:Description>
<vmext:PortGroupRefs>
<vmext:VimObjectRef>
<vmext:VimServerRef
href="https://vcloud.example.com/api/admin/extension/vimServer/3691f5d6-32eb-44f6-804a-1d30d17068c3"
name=""
type="application/vnd.vmware.admin.vmwvirtualcenter+xml"/>
<vmext:MoRef>dvportgroup-47</vmext:MoRef>
<vmext:VimObjectType>DV_PORTGROUP</vmext:VimObjectType>
</vmext:VimObjectRef>
</vmext:PortGroupRefs>
<vmext:VimServer
href="https://vcloud.example.com/api/admin/extension/vimServer/3691f5d6-32eb-44f6-804a-1d30d17068c3"
name=""
type="application/vnd.vmware.admin.vmwvirtualcenter+xml"/>
</vmext:VMWNetworkPool>
- Response
-
HTTP/1.1 201 Created
Headers:
Content-Length: 3283
Content-Type: application/vnd.vmware.admin.networkpool+xml;version=5.1
Location: https://vcloud.example.com/api/admin/extension/networkPool/7a037b2b-bac9-412e-9989-f44cb2bf5125
Vary: Accept-Encoding
Body:
<?xml version="1.0" encoding="UTF-8"?><vmext:VMWNetworkPool
xmlns:vcloud="http://www.vmware.com/vcloud/v1.5"
xmlns:vmext="http://www.vmware.com/vcloud/extension/v1.5"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
href="https://vcloud.example.com/api/admin/extension/networkPool/7a037b2b-bac9-412e-9989-f44cb2bf5125"
id="urn:vcloud:networkpool:7a037b2b-bac9-412e-9989-f44cb2bf5125"
name="Portgroup-backed-net-pool"
status="0"
type="application/vnd.vmware.admin.networkPool+xml"
xsi:schemaLocation="http://www.vmware.com/vcloud/extension/v1.5 http://https://vcloud.example.com/api/v1.5/schema/vmwextensions.xsd http://www.vmware.com/vcloud/v1.5 http://https://vcloud.example.com/api/v1.5/schema/master.xsd"
xsi:type="vmext:PortGroupPoolType">
<vcloud:Link
href="https://vcloud.example.com/api/admin/extension/networkPoolReferences"
rel="up"
type="application/vnd.vmware.admin.vmwNetworkPoolReferences+xml"/>
<vcloud:Link
href="https://vcloud.example.com/api/admin/extension/networkPool/7a037b2b-bac9-412e-9989-f44cb2bf5125"
rel="edit"
type="application/vnd.vmware.admin.networkPool+xml"/>
<vcloud:Link
href="https://vcloud.example.com/api/admin/extension/networkPool/7a037b2b-bac9-412e-9989-f44cb2bf5125"
rel="remove"/>
<vcloud:Description>Example portgroup-backed network pool</vcloud:Description>
<vcloud:Tasks>
<vcloud:Task
cancelRequested="false"
expiryTime="2013-05-13T16:57:18.863+03:00"
href="https://vcloud.example.com/api/task/59f22a7c-6ab6-4bec-8d13-fb716a33fc97"
id="urn:vcloud:task:59f22a7c-6ab6-4bec-8d13-fb716a33fc97"
name="task"
operation="Creating Network Pool Portgroup-backed-net-pool(7a037b2b-bac9-412e-9989-f44cb2bf5125)"
operationName="networkCreateNetworkPool"
serviceNamespace="com.vmware.vcloud"
startTime="2013-02-12T16:57:18.863+02:00"
status="running"
type="application/vnd.vmware.vcloud.task+xml">
<vcloud:Link
href="https://vcloud.example.com/api/task/59f22a7c-6ab6-4bec-8d13-fb716a33fc97/action/cancel"
rel="task:cancel"/>
<vcloud:Owner
href="https://vcloud.example.com/api/admin/extension/networkPool/7a037b2b-bac9-412e-9989-f44cb2bf5125"
name="Portgroup-backed-net-pool"
type="application/vnd.vmware.admin.networkPool+xml"/>
<vcloud:User
href="https://vcloud.example.com/api/admin/user/1260efee-6915-494c-8afa-84e7e6d8a310"
name="vcloud"
type="application/vnd.vmware.admin.user+xml"/>
<vcloud:Organization
href="https://vcloud.example.com/api/org/a93c9db9-7471-3192-8d09-a8f7eeda85f9"
name="System"
type="application/vnd.vmware.vcloud.org+xml"/>
<vcloud:Details/>
</vcloud:Task>
</vcloud:Tasks>
<vmext:PortGroupRefs>
<vmext:VimObjectRef>
<vmext:VimServerRef
href="https://vcloud.example.com/api/admin/extension/vimServer/3691f5d6-32eb-44f6-804a-1d30d17068c3"
type="application/vnd.vmware.admin.vmwvirtualcenter+xml"/>
<vmext:MoRef>dvportgroup-47</vmext:MoRef>
<vmext:VimObjectType>DV_PORTGROUP</vmext:VimObjectType>
</vmext:VimObjectRef>
</vmext:PortGroupRefs>
<vmext:VimServer
href="https://vcloud.example.com/api/admin/extension/vimServer/3691f5d6-32eb-44f6-804a-1d30d17068c3"
type="application/vnd.vmware.admin.vmwvirtualcenter+xml"/>
<vmext:UsedNetworksCount>0</vmext:UsedNetworksCount>
</vmext:VMWNetworkPool>