VMware Cloud Director API - POST-CreateProviderNetwork

VMware Cloud Director API - POST-CreateProviderNetwork

POST /admin/extension/externalnets

Operation:
POST /admin/extension/externalnets
Description:
Create an external network.
Since:
1.0
Deprecated:
35.0
Input parameters
Consume media type(s):
application/vnd.vmware.admin.vmwexternalnet+xml
application/vnd.vmware.admin.vmwexternalnet+json
Input type:
VMWExternalNetworkType
Output parameters
VMWExternalNetworkType

Produce media type(s):
application/vnd.vmware.admin.vmwexternalnet+xml
application/vnd.vmware.admin.vmwexternalnet+json
Output type:
VMWExternalNetworkType
Examples
Request
HTTP 1.1
POST /api/admin/extension/externalnets

Headers:
Content-Length: 1594
Content-Type: application/vnd.vmware.admin.vmwexternalnet+xml; charset=ISO-8859-1
x-vcloud-authorization: M69zc2o7Ol7AuYVBAslGYbnTluZZVZKIYa1HPe8MzEk=

Body:
<?xml version="1.0" encoding="UTF-8"?><vmext:VMWExternalNetwork
    xmlns:vcloud="http://www.vmware.com/vcloud/v1.5"
    xmlns:vmext="http://www.vmware.com/vcloud/extension/v1.5"
    name="External-net"
    type="application/vnd.vmware.admin.vmwexternalnet+xml">
    <vcloud:Description>External net description</vcloud:Description>
    <vcloud:Configuration>
        <vcloud:IpScopes>
            <vcloud:IpScope>
                <vcloud:IsInherited>false</vcloud:IsInherited>
                <vcloud:Gateway>10.23.119.253</vcloud:Gateway>
                <vcloud:Netmask>255.255.254.0</vcloud:Netmask>
                <vcloud:Dns1>10.23.108.1</vcloud:Dns1>
                <vcloud:Dns2>10.23.108.2</vcloud:Dns2>
                <vcloud:DnsSuffix>eng.vmware.com</vcloud:DnsSuffix>
                <vcloud:IpRanges>
                    <vcloud:IpRange>
                        <vcloud:StartAddress>10.23.119.231</vcloud:StartAddress>
                        <vcloud:EndAddress>10.23.119.240</vcloud:EndAddress>
                    </vcloud:IpRange>
                </vcloud:IpRanges>
            </vcloud:IpScope>
        </vcloud:IpScopes>
        <vcloud:FenceMode>isolated</vcloud:FenceMode>
    </vcloud:Configuration>
    <vmext:VimPortGroupRef>
        <vmext:VimServerRef
            href="https://vcloud.example.com/api/admin/extension/vimServer/5b2f648b-9da7-4d7b-8212-6ed8a83f2102"
            name=""
            type="application/vnd.vmware.admin.vmwvirtualcenter+xml"/>
        <vmext:MoRef>network-248</vmext:MoRef>
        <vmext:VimObjectType>NETWORK</vmext:VimObjectType>
    </vmext:VimPortGroupRef>
</vmext:VMWExternalNetwork>
Response
HTTP/1.1 201 Created

Headers:
Content-Length: 4718
Content-Type: application/vnd.vmware.admin.vmwexternalnet+xml;version=5.5
Location: https://vcloud.example.com/api/admin/extension/externalnet/a09bffcb-1054-4405-8310-bceda572972e
Vary: Accept-Encoding

Body:
<?xml version="1.0" encoding="UTF-8"?><vmext:VMWExternalNetwork
    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/externalnet/a09bffcb-1054-4405-8310-bceda572972e"
    id="urn:vcloud:network:a09bffcb-1054-4405-8310-bceda572972e"
    name="External-net"
    type="application/vnd.vmware.admin.vmwexternalnet+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">
    <vcloud:Link
        href="https://vcloud.example.com/api/admin/network/a09bffcb-1054-4405-8310-bceda572972e"
        rel="alternate"
        type="application/vnd.vmware.admin.network+xml"/>
    <vcloud:Link
        href="https://vcloud.example.com/api/admin/extension/externalnet/a09bffcb-1054-4405-8310-bceda572972e"
        rel="edit"
        type="application/vnd.vmware.admin.vmwexternalnet+xml"/>
    <vcloud:Link
        href="https://vcloud.example.com/api/admin/extension/externalnet/a09bffcb-1054-4405-8310-bceda572972e"
        rel="remove"/>
    <vcloud:Link
        href="https://vcloud.example.com/api/admin/extension/externalNetworkReferences"
        rel="up"
        type="application/vnd.vmware.admin.vmwExternalNetworkReferences+xml"/>
    <vcloud:Link
        href="https://vcloud.example.com/api/admin/network/a09bffcb-1054-4405-8310-bceda572972e/action/reset"
        rel="repair"
        type="application/vnd.vmware.admin.network+xml"/>
    <vcloud:Link
        href="https://vcloud.example.com/api/admin/network/a09bffcb-1054-4405-8310-bceda572972e/metadata"
        rel="down"
        type="application/vnd.vmware.vcloud.metadata+xml"/>
    <vcloud:Link
        href="https://vcloud.example.com/api/admin/network/a09bffcb-1054-4405-8310-bceda572972e/allocatedAddresses/"
        rel="down"
        type="application/vnd.vmware.vcloud.allocatedNetworkAddress+xml"/>
    <vcloud:Description>External net description</vcloud:Description>
    <vcloud:Tasks>
        <vcloud:Task
            cancelRequested="false"
            expiryTime="2013-05-15T13:25:14.644+03:00"
            href="https://vcloud.example.com/api/task/8a90b2f1-9c4d-48a8-a3b4-6c6a6ac5dba0"
            id="urn:vcloud:task:8a90b2f1-9c4d-48a8-a3b4-6c6a6ac5dba0"
            name="task"
            operation="Creating Network External-net(a09bffcb-1054-4405-8310-bceda572972e)"
            operationName="networkCreateExternalNetwork"
            serviceNamespace="com.vmware.vcloud"
            startTime="2013-02-14T13:25:14.644+02:00"
            status="running"
            type="application/vnd.vmware.vcloud.task+xml">
            <vcloud:Link
                href="https://vcloud.example.com/api/task/8a90b2f1-9c4d-48a8-a3b4-6c6a6ac5dba0/action/cancel"
                rel="task:cancel"/>
            <vcloud:Owner
                href="https://vcloud.example.com/api/admin/extension/externalnet/a09bffcb-1054-4405-8310-bceda572972e"
                name="External-net"
                type="application/vnd.vmware.admin.extension.network+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>
    <vcloud:Configuration>
        <vcloud:IpScopes>
            <vcloud:IpScope>
                <vcloud:IsInherited>false</vcloud:IsInherited>
                <vcloud:Gateway>10.23.119.253</vcloud:Gateway>
                <vcloud:Netmask>255.255.254.0</vcloud:Netmask>
                <vcloud:Dns1>10.23.108.1</vcloud:Dns1>
                <vcloud:Dns2>10.23.108.2</vcloud:Dns2>
                <vcloud:DnsSuffix>eng.vmware.com</vcloud:DnsSuffix>
                <vcloud:IsEnabled>true</vcloud:IsEnabled>
                <vcloud:IpRanges>
                    <vcloud:IpRange>
                        <vcloud:StartAddress>10.23.119.231</vcloud:StartAddress>
                        <vcloud:EndAddress>10.23.119.240</vcloud:EndAddress>
                    </vcloud:IpRange>
                </vcloud:IpRanges>
                <vcloud:SubAllocations/>
            </vcloud:IpScope>
        </vcloud:IpScopes>
        <vcloud:FenceMode>isolated</vcloud:FenceMode>
        <vcloud:RetainNetInfoAcrossDeployments>false</vcloud:RetainNetInfoAcrossDeployments>
    </vcloud:Configuration>
    <vmext:VimPortGroupRef>
        <vmext:VimServerRef
            href="https://vcloud.example.com/api/admin/extension/vimServer/5b2f648b-9da7-4d7b-8212-6ed8a83f2102"
            name=""
            type="application/vnd.vmware.admin.vmwvirtualcenter+xml"/>
        <vmext:MoRef>network-248</vmext:MoRef>
        <vmext:VimObjectType>NETWORK</vmext:VimObjectType>
    </vmext:VimPortGroupRef>
</vmext:VMWExternalNetwork>