Networking API v2.0 (CURRENT)

Use virtual networking services among devices that are managed by the OpenStack Compute service. The Networking (neutron) API v2.0 combines the API v1.1 functionality with some essential Internet Protocol Address Management (IPAM) functionality. Enables users to associate IP address blocks and other network configuration settings with an OpenStack Networking network. You can choose a specific IP address from the block or let OpenStack Networking choose the first available IP address.

API versions

List information for all Networking API versions and show details about API v2.

GET
/
List API versions

Lists information about all Networking API versions.

 
Normal response codes
200, 300
{
    "versions": [
        {
            "status": "CURRENT",
            "id": "v2.0",
            "links": [
                {
                    "href": "http://23.253.228.211:9696/v2.0",
                    "rel": "self"
                }
            ]
        }
    ]
}
<?xml version='1.0' encoding='UTF-8'?>
<versions xmlns="http://openstack.org/quantum/api/v2.0"
    xmlns:quantum="http://openstack.org/quantum/api/v2.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <version>
        <status>CURRENT</status>
        <id>v2.0</id>
        <links>
            <link>
                <href>http://23.253.228.211:9696/v2.0</href>
                <rel>self</rel>
            </link>
        </links>
    </version>
</versions>

This operation does not accept a request body.

GET
/v2.0
Show API v2.0 details

Shows details for Networking API v2.0.

 
Normal response codes
200, 203
Response parameters
Parameter Style Type Description
location plain xsd:anyURI

Full URL to a service or server.

{
    "resources": [
        {
            "links": [
                {
                    "href": "http://23.253.228.211:9696/v2.0/subnets",
                    "rel": "self"
                }
            ],
            "name": "subnet",
            "collection": "subnets"
        },
        {
            "links": [
                {
                    "href": "http://23.253.228.211:9696/v2.0/networks",
                    "rel": "self"
                }
            ],
            "name": "network",
            "collection": "networks"
        },
        {
            "links": [
                {
                    "href": "http://23.253.228.211:9696/v2.0/ports",
                    "rel": "self"
                }
            ],
            "name": "port",
            "collection": "ports"
        }
    ]
}
<?xml version='1.0' encoding='UTF-8'?>
<resources xmlns="http://openstack.org/quantum/api/v2.0"
    xmlns:quantum="http://openstack.org/quantum/api/v2.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <resource>
        <links>
            <link>
                <href>http://23.253.228.211:9696/v2.0/subnets</href>
                <rel>self</rel>
            </link>
        </links>
        <name>subnet</name>
        <collection>subnets</collection>
    </resource>
    <resource>
        <links>
            <link>
                <href>http://23.253.228.211:9696/v2.0/networks</href>
                <rel>self</rel>
            </link>
        </links>
        <name>network</name>
        <collection>networks</collection>
    </resource>
    <resource>
        <links>
            <link>
                <href>http://23.253.228.211:9696/v2.0/ports</href>
                <rel>self</rel>
            </link>
        </links>
        <name>port</name>
        <collection>ports</collection>
    </resource>
</resources>

This operation does not accept a request body.

Networks

List, show information for, create, update, and delete networks.

GET
/
List API versions

Lists information about all Networking API versions.

 
Normal response codes
200, 300
{
    "versions": [
        {
            "status": "CURRENT",
            "id": "v2.0",
            "links": [
                {
                    "href": "http://23.253.228.211:9696/v2.0",
                    "rel": "self"
                }
            ]
        }
    ]
}
<?xml version='1.0' encoding='UTF-8'?>
<versions xmlns="http://openstack.org/quantum/api/v2.0"
    xmlns:quantum="http://openstack.org/quantum/api/v2.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <version>
        <status>CURRENT</status>
        <id>v2.0</id>
        <links>
            <link>
                <href>http://23.253.228.211:9696/v2.0</href>
                <rel>self</rel>
            </link>
        </links>
    </version>
</versions>

This operation does not accept a request body.

GET
/v2.0
Show API v2.0 details

Shows details for Networking API v2.0.

 
Normal response codes
200, 203
Response parameters
Parameter Style Type Description
location plain xsd:anyURI

Full URL to a service or server.

{
    "resources": [
        {
            "links": [
                {
                    "href": "http://23.253.228.211:9696/v2.0/subnets",
                    "rel": "self"
                }
            ],
            "name": "subnet",
            "collection": "subnets"
        },
        {
            "links": [
                {
                    "href": "http://23.253.228.211:9696/v2.0/networks",
                    "rel": "self"
                }
            ],
            "name": "network",
            "collection": "networks"
        },
        {
            "links": [
                {
                    "href": "http://23.253.228.211:9696/v2.0/ports",
                    "rel": "self"
                }
            ],
            "name": "port",
            "collection": "ports"
        }
    ]
}
<?xml version='1.0' encoding='UTF-8'?>
<resources xmlns="http://openstack.org/quantum/api/v2.0"
    xmlns:quantum="http://openstack.org/quantum/api/v2.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <resource>
        <links>
            <link>
                <href>http://23.253.228.211:9696/v2.0/subnets</href>
                <rel>self</rel>
            </link>
        </links>
        <name>subnet</name>
        <collection>subnets</collection>
    </resource>
    <resource>
        <links>
            <link>
                <href>http://23.253.228.211:9696/v2.0/networks</href>
                <rel>self</rel>
            </link>
        </links>
        <name>network</name>
        <collection>networks</collection>
    </resource>
    <resource>
        <links>
            <link>
                <href>http://23.253.228.211:9696/v2.0/ports</href>
                <rel>self</rel>
            </link>
        </links>
        <name>port</name>
        <collection>ports</collection>
    </resource>
</resources>

This operation does not accept a request body.

GET
/v2.0/extensions
List extensions

Lists available Networking API extensions.

 
Normal response codes
200, 203
Error response codes
computeFault (400, 500, …)
Response parameters
Parameter Style Type Description
next (Optional) plain xsd:anyURI Moves to the next item in the list.
previous (Optional) plain xsd:anyURI Moves to the previous item in the list.
{
    "extensions": [
        {
            "updated": "2013-01-20T00:00:00-00:00",
            "name": "Neutron Service Type Management",
            "links": [],
            "namespace": "http://docs.openstack.org/ext/neutron/service-type/api/v1.0",
            "alias": "service-type",
            "description": "API for retrieving service providers for Neutron advanced services"
        },
        {
            "updated": "2012-10-05T10:00:00-00:00",
            "name": "security-group",
            "links": [],
            "namespace": "http://docs.openstack.org/ext/securitygroups/api/v2.0",
            "alias": "security-group",
            "description": "The security groups extension."
        },
        {
            "updated": "2013-02-07T10:00:00-00:00",
            "name": "L3 Agent Scheduler",
            "links": [],
            "namespace": "http://docs.openstack.org/ext/l3_agent_scheduler/api/v1.0",
            "alias": "l3_agent_scheduler",
            "description": "Schedule routers among l3 agents"
        },
        {
            "updated": "2013-02-07T10:00:00-00:00",
            "name": "Loadbalancer Agent Scheduler",
            "links": [],
            "namespace": "http://docs.openstack.org/ext/lbaas_agent_scheduler/api/v1.0",
            "alias": "lbaas_agent_scheduler",
            "description": "Schedule pools among lbaas agents"
        },
        {
            "updated": "2013-03-28T10:00:00-00:00",
            "name": "Neutron L3 Configurable external gateway mode",
            "links": [],
            "namespace": "http://docs.openstack.org/ext/neutron/ext-gw-mode/api/v1.0",
            "alias": "ext-gw-mode",
            "description": "Extension of the router abstraction for specifying whether SNAT should occur on the external gateway"
        },
        {
            "updated": "2014-02-03T10:00:00-00:00",
            "name": "Port Binding",
            "links": [],
            "namespace": "http://docs.openstack.org/ext/binding/api/v1.0",
            "alias": "binding",
            "description": "Expose port bindings of a virtual port to external application"
        },
        {
            "updated": "2012-09-07T10:00:00-00:00",
            "name": "Provider Network",
            "links": [],
            "namespace": "http://docs.openstack.org/ext/provider/api/v1.0",
            "alias": "provider",
            "description": "Expose mapping of virtual networks to physical networks"
        },
        {
            "updated": "2013-02-03T10:00:00-00:00",
            "name": "agent",
            "links": [],
            "namespace": "http://docs.openstack.org/ext/agent/api/v2.0",
            "alias": "agent",
            "description": "The agent management extension."
        },
        {
            "updated": "2012-07-29T10:00:00-00:00",
            "name": "Quota management support",
            "links": [],
            "namespace": "http://docs.openstack.org/network/ext/quotas-sets/api/v2.0",
            "alias": "quotas",
            "description": "Expose functions for quotas management per tenant"
        },
        {
            "updated": "2013-02-07T10:00:00-00:00",
            "name": "DHCP Agent Scheduler",
            "links": [],
            "namespace": "http://docs.openstack.org/ext/dhcp_agent_scheduler/api/v1.0",
            "alias": "dhcp_agent_scheduler",
            "description": "Schedule networks among dhcp agents"
        },
        {
            "updated": "2013-06-27T10:00:00-00:00",
            "name": "Multi Provider Network",
            "links": [],
            "namespace": "http://docs.openstack.org/ext/multi-provider/api/v1.0",
            "alias": "multi-provider",
            "description": "Expose mapping of virtual networks to multiple physical networks"
        },
        {
            "updated": "2013-01-14T10:00:00-00:00",
            "name": "Neutron external network",
            "links": [],
            "namespace": "http://docs.openstack.org/ext/neutron/external_net/api/v1.0",
            "alias": "external-net",
            "description": "Adds external network attribute to network resource."
        },
        {
            "updated": "2012-07-20T10:00:00-00:00",
            "name": "Neutron L3 Router",
            "links": [],
            "namespace": "http://docs.openstack.org/ext/neutron/router/api/v1.0",
            "alias": "router",
            "description": "Router abstraction for basic L3 forwarding between L2 Neutron networks and access to external networks via a NAT gateway."
        },
        {
            "updated": "2013-07-23T10:00:00-00:00",
            "name": "Allowed Address Pairs",
            "links": [],
            "namespace": "http://docs.openstack.org/ext/allowedaddresspairs/api/v2.0",
            "alias": "allowed-address-pairs",
            "description": "Provides allowed address pairs"
        },
        {
            "updated": "2013-03-17T12:00:00-00:00",
            "name": "Neutron Extra DHCP opts",
            "links": [],
            "namespace": "http://docs.openstack.org/ext/neutron/extra_dhcp_opt/api/v1.0",
            "alias": "extra_dhcp_opt",
            "description": "Extra options configuration for DHCP. For example PXE boot options to DHCP clients can be specified (e.g. tftp-server, server-ip-address, bootfile-name)"
        },
        {
            "updated": "2012-10-07T10:00:00-00:00",
            "name": "LoadBalancing service",
            "links": [],
            "namespace": "http://wiki.openstack.org/neutron/LBaaS/API_1.0",
            "alias": "lbaas",
            "description": "Extension for LoadBalancing service"
        },
        {
            "updated": "2013-02-01T10:00:00-00:00",
            "name": "Neutron Extra Route",
            "links": [],
            "namespace": "http://docs.openstack.org/ext/neutron/extraroutes/api/v1.0",
            "alias": "extraroute",
            "description": "Extra routes configuration for L3 router"
        }
    ]
}
<?xml version='1.0' encoding='UTF-8'?>
<extensions xmlns="http://openstack.org/quantum/api/v2.0"
    xmlns:quantum="http://openstack.org/quantum/api/v2.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <extension>
        <updated>2013-01-20T00:00:00-00:00</updated>
        <name>Neutron Service Type Management</name>
        <links quantum:type="list"/>
        <namespace>http://docs.openstack.org/ext/neutron/service-type/api/v1.0</namespace>
        <alias>service-type</alias>
        <description>API for retrieving service providers for Neutron
            advanced services</description>
    </extension>
    <extension>
        <updated>2012-10-05T10:00:00-00:00</updated>
        <name>security-group</name>
        <links quantum:type="list"/>
        <namespace>http://docs.openstack.org/ext/securitygroups/api/v2.0</namespace>
        <alias>security-group</alias>
        <description>The security groups extension.</description>
    </extension>
    <extension>
        <updated>2013-02-07T10:00:00-00:00</updated>
        <name>L3 Agent Scheduler</name>
        <links quantum:type="list"/>
        <namespace>http://docs.openstack.org/ext/l3_agent_scheduler/api/v1.0</namespace>
        <alias>l3_agent_scheduler</alias>
        <description>Schedule routers among l3 agents</description>
    </extension>
    <extension>
        <updated>2013-02-07T10:00:00-00:00</updated>
        <name>Loadbalancer Agent Scheduler</name>
        <links quantum:type="list"/>
        <namespace>http://docs.openstack.org/ext/lbaas_agent_scheduler/api/v1.0</namespace>
        <alias>lbaas_agent_scheduler</alias>
        <description>Schedule pools among lbaas agents</description>
    </extension>
    <extension>
        <updated>2013-03-28T10:00:00-00:00</updated>
        <name>Neutron L3 Configurable external gateway mode</name>
        <links quantum:type="list"/>
        <namespace>http://docs.openstack.org/ext/neutron/ext-gw-mode/api/v1.0</namespace>
        <alias>ext-gw-mode</alias>
        <description>Extension of the router abstraction for
            specifying whether SNAT should occur on the external
            gateway</description>
    </extension>
    <extension>
        <updated>2014-02-03T10:00:00-00:00</updated>
        <name>Port Binding</name>
        <links quantum:type="list"/>
        <namespace>http://docs.openstack.org/ext/binding/api/v1.0</namespace>
        <alias>binding</alias>
        <description>Expose port bindings of a virtual port to
            external application</description>
    </extension>
    <extension>
        <updated>2012-09-07T10:00:00-00:00</updated>
        <name>Provider Network</name>
        <links quantum:type="list"/>
        <namespace>http://docs.openstack.org/ext/provider/api/v1.0</namespace>
        <alias>provider</alias>
        <description>Expose mapping of virtual networks to physical
            networks</description>
    </extension>
    <extension>
        <updated>2013-02-03T10:00:00-00:00</updated>
        <name>agent</name>
        <links quantum:type="list"/>
        <namespace>http://docs.openstack.org/ext/agent/api/v2.0</namespace>
        <alias>agent</alias>
        <description>The agent management extension.</description>
    </extension>
    <extension>
        <updated>2012-07-29T10:00:00-00:00</updated>
        <name>Quota management support</name>
        <links quantum:type="list"/>
        <namespace>http://docs.openstack.org/network/ext/quotas-sets/api/v2.0</namespace>
        <alias>quotas</alias>
        <description>Expose functions for quotas management per
            tenant</description>
    </extension>
    <extension>
        <updated>2013-02-07T10:00:00-00:00</updated>
        <name>DHCP Agent Scheduler</name>
        <links quantum:type="list"/>
        <namespace>http://docs.openstack.org/ext/dhcp_agent_scheduler/api/v1.0</namespace>
        <alias>dhcp_agent_scheduler</alias>
        <description>Schedule networks among dhcp agents</description>
    </extension>
    <extension>
        <updated>2013-06-27T10:00:00-00:00</updated>
        <name>Multi Provider Network</name>
        <links quantum:type="list"/>
        <namespace>http://docs.openstack.org/ext/multi-provider/api/v1.0</namespace>
        <alias>multi-provider</alias>
        <description>Expose mapping of virtual networks to multiple
            physical networks</description>
    </extension>
    <extension>
        <updated>2013-01-14T10:00:00-00:00</updated>
        <name>Neutron external network</name>
        <links quantum:type="list"/>
        <namespace>http://docs.openstack.org/ext/neutron/external_net/api/v1.0</namespace>
        <alias>external-net</alias>
        <description>Adds external network attribute to network
            resource.</description>
    </extension>
    <extension>
        <updated>2012-07-20T10:00:00-00:00</updated>
        <name>Neutron L3 Router</name>
        <links quantum:type="list"/>
        <namespace>http://docs.openstack.org/ext/neutron/router/api/v1.0</namespace>
        <alias>router</alias>
        <description>Router abstraction for basic L3 forwarding
            between L2 Neutron networks and access to external
            networks via a NAT gateway.</description>
    </extension>
    <extension>
        <updated>2013-07-23T10:00:00-00:00</updated>
        <name>Allowed Address Pairs</name>
        <links quantum:type="list"/>
        <namespace>http://docs.openstack.org/ext/allowedaddresspairs/api/v2.0</namespace>
        <alias>allowed-address-pairs</alias>
        <description>Provides allowed address pairs</description>
    </extension>
    <extension>
        <updated>2013-03-17T12:00:00-00:00</updated>
        <name>Neutron Extra DHCP opts</name>
        <links quantum:type="list"/>
        <namespace>http://docs.openstack.org/ext/neutron/extra_dhcp_opt/api/v1.0</namespace>
        <alias>extra_dhcp_opt</alias>
        <description>Extra options configuration for DHCP. For example
            PXE boot options to DHCP clients can be specified (e.g.
            tftp-server, server-ip-address,
            bootfile-name)</description>
    </extension>
    <extension>
        <updated>2012-10-07T10:00:00-00:00</updated>
        <name>LoadBalancing service</name>
        <links quantum:type="list"/>
        <namespace>http://wiki.openstack.org/neutron/LBaaS/API_1.0</namespace>
        <alias>lbaas</alias>
        <description>Extension for LoadBalancing service</description>
    </extension>
    <extension>
        <updated>2013-02-01T10:00:00-00:00</updated>
        <name>Neutron Extra Route</name>
        <links quantum:type="list"/>
        <namespace>http://docs.openstack.org/ext/neutron/extraroutes/api/v1.0</namespace>
        <alias>extraroute</alias>
        <description>Extra routes configuration for L3
            router</description>
    </extension>
</extensions>

This operation does not accept a request body.

GET
/v2.0/extensions/​{alias}​
Get extension details

Gets detailed information for a specified extension.

 
Normal response codes
200, 203
Error response codes
computeFault (400, 500, …)
Request parameters
Parameter Style Type Description
alias URI xsd:string
{
    "extension": {
        "updated": "2013-02-03T10:00:00-00:00",
        "name": "agent",
        "links": [],
        "namespace": "http://docs.openstack.org/ext/agent/api/v2.0",
        "alias": "agent",
        "description": "The agent management extension."
    }
}
<?xml version='1.0' encoding='UTF-8'?>
<extension xmlns="http://openstack.org/quantum/api/v2.0"
    xmlns:quantum="http://openstack.org/quantum/api/v2.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <updated>2013-02-03T10:00:00-00:00</updated>
    <name>agent</name>
    <links quantum:type="list"/>
    <namespace>http://docs.openstack.org/ext/agent/api/v2.0</namespace>
    <alias>agent</alias>
    <description>The agent management extension.</description>
</extension>

This operation does not accept a request body.

GET
/v2.0/networks
List networks

Lists networks to which the specified tenant has access.

 

You can control which attributes are returned by using the fields query parameter. For information, see Filtering and Column Selection in the OpenStack Networking API v2.0 Reference .

Normal response codes
200
Error response codes
unauthorized (401)
Response parameters
Parameter Style Type Description
admin_state_up plain xsd:bool

The administrative state of the network, which is up (true) or down (false).

id plain csapi:uuid

The network ID.

name plain xsd:string

The network name.

shared plain xsd:bool

Indicates whether this network is shared across all tenants. By default, only administrative users can change this value.

status plain xsd:string

The network status.

subnets plain xsd:dict

The associated subnets.

tenant_id plain csapi:uuid

The tenant ID.

{
    "networks": [
        {
            "status": "ACTIVE",
            "subnets": [
                "54d6f61d-db07-451c-9ab3-b9609b6b6f0b"
            ],
            "name": "private-network",
            "provider:physical_network": null,
            "admin_state_up": true,
            "tenant_id": "4fd44f30292945e481c7b8a0c8908869",
            "provider:network_type": "local",
            "router:external": true,
            "shared": true,
            "id": "d32019d3-bc6e-4319-9c1d-6722fc136a22",
            "provider:segmentation_id": null
        },
        {
            "status": "ACTIVE",
            "subnets": [
                "08eae331-0402-425a-923c-34f7cfe39c1b"
            ],
            "name": "private",
            "provider:physical_network": null,
            "admin_state_up": true,
            "tenant_id": "26a7980765d0414dbc1fc1f88cdb7e6e",
            "provider:network_type": "local",
            "router:external": true,
            "shared": true,
            "id": "db193ab3-96e3-4cb3-8fc5-05f4296d0324",
            "provider:segmentation_id": null
        }
    ]
}
<?xml version='1.0' encoding='UTF-8'?>
<networks xmlns="http://openstack.org/quantum/api/v2.0"
    xmlns:provider="http://docs.openstack.org/ext/provider/api/v1.0"
    xmlns:quantum="http://openstack.org/quantum/api/v2.0"
    xmlns:router="http://docs.openstack.org/ext/neutron/router/api/v1.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <network>
        <status>ACTIVE</status>
        <subnets>
            <subnet>54d6f61d-db07-451c-9ab3-b9609b6b6f0b</subnet>
        </subnets>
        <name>private-network</name>
        <provider:physical_network xsi:nil="true"/>
        <admin_state_up quantum:type="bool">True</admin_state_up>
        <tenant_id>4fd44f30292945e481c7b8a0c8908869</tenant_id>
        <provider:network_type>local</provider:network_type>
        <router:external quantum:type="bool">True</router:external>
        <shared quantum:type="bool">True</shared>
        <id>d32019d3-bc6e-4319-9c1d-6722fc136a22</id>
        <provider:segmentation_id xsi:nil="true"/>
    </network>
    <network>
        <status>ACTIVE</status>
        <subnets>
            <subnet>08eae331-0402-425a-923c-34f7cfe39c1b</subnet>
        </subnets>
        <name>private</name>
        <provider:physical_network xsi:nil="true"/>
        <admin_state_up quantum:type="bool">True</admin_state_up>
        <tenant_id>26a7980765d0414dbc1fc1f88cdb7e6e</tenant_id>
        <provider:network_type>local</provider:network_type>
        <router:external quantum:type="bool">True</router:external>
        <shared quantum:type="bool">True</shared>
        <id>db193ab3-96e3-4cb3-8fc5-05f4296d0324</id>
        <provider:segmentation_id xsi:nil="true"/>
    </network>
</networks>

This operation does not accept a request body.

POST
/v2.0/networks
Create network

Creates a network.

 

A request body is optional. An administrative user can specify another tenant ID, which is the tenant who owns the network, in the request body.

Normal response codes
201
Error response codes
badRequest (400), unauthorized (401)
Request parameters
Parameter Style Type Description
admin_state_up (Optional) plain xsd:bool

The administrative state of the network, which is up (true) or down (false).

name (Optional) plain xsd:string

The network name. A request body is optional: If you include it, it can specify this optional attribute.

shared (Optional) plain xsd:bool

Indicates whether this network is shared across all tenants. By default, only administrative users can change this value.

tenant_id (Optional) plain csapi:uuid

Admin-only. The UUID of the tenant that will own the network. This tenant can be different from the tenant that makes the create network request. However, only administrative users can specify a tenant ID other than their own. You cannot change this value through authorization policies.

Response parameters
Parameter Style Type Description
admin_state_up plain xsd:bool

The administrative state of the network, which is up (true) or down (false).

id plain csapi:uuid

The network ID.

name plain xsd:string

The network name.

shared plain xsd:bool

Indicates whether this network is shared across all tenants. By default, only administrative users can change this value.

status plain xsd:string

The network status.

subnets plain xsd:dict

The associated subnets.

tenant_id plain csapi:uuid

The tenant ID.

router:external plain xsd:bool

Indicates whether this network is externally accessible.

{
    "network": {
        "name": "sample_network",
        "admin_state_up": true
    }
}
<?xml version="1.0" encoding="UTF-8"?>
<network>
    <name>sample_network2</name>
</network>
{
    "network": {
        "status": "ACTIVE",
        "subnets": [],
        "name": "net1",
        "admin_state_up": true,
        "tenant_id": "9bacb3c5d39d41a79512987f338cf177",
        "router:external": false,
        "segments": [
            {
                "provider:segmentation_id": 2,
                "provider:physical_network": "8bab8453-1bc9-45af-8c70-f83aa9b50453",
                "provider:network_type": "vlan"
            },
            {
                "provider:segmentation_id": null,
                "provider:physical_network": "8bab8453-1bc9-45af-8c70-f83aa9b50453",
                "provider:network_type": "stt"
            }
        ],
        "shared": false,
        "id": "4e8e5957-649f-477b-9e5b-f1f75b21c03c"
    }
}
<?xml version='1.0' encoding='UTF-8'?>
<network xmlns="http://openstack.org/quantum/api/v2.0"
    xmlns:provider="http://docs.openstack.org/ext/provider/api/v1.0"
    xmlns:quantum="http://openstack.org/quantum/api/v2.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <status>ACTIVE</status>
    <subnets quantum:type="list"/>
    <name>sample_network2</name>
    <provider:physical_network xsi:nil="true"/>
    <admin_state_up quantum:type="bool">True</admin_state_up>
    <tenant_id>4fd44f30292945e481c7b8a0c8908869</tenant_id>
    <provider:network_type>local</provider:network_type>
    <shared quantum:type="bool">False</shared>
    <id>c220b026-ece1-4ead-873f-83537f4c9f92</id>
    <provider:segmentation_id xsi:nil="true"/>
</network>
POST
/v2.0/networks
Bulk create networks

Creates multiple networks in a single request.

 

In the request body, specify a list of networks.

The bulk create operation is always atomic. Either all or no networks in the request body are created.

Normal response codes
201
Error response codes
badRequest (400), unauthorized (401)
Request parameters
Parameter Style Type Description
admin_state_up (Optional) plain xsd:bool

The administrative state of the network, which is up (true) or down (false).

name (Optional) plain xsd:string The network name.
shared (Optional) plain xsd:bool

Admin-only. Indicates whether this network is shared across all tenants.

tenant_id (Optional) plain csapi:uuid

The ID of the tenant who owns the network. Only administrative users can specify a tenant ID other than their own. You cannot change this value through authorization policies.

router:external (Optional) plain xsd:bool

Indicates whether this network is externally accessible.

Response parameters
Parameter Style Type Description
admin_state_up plain xsd:bool

The administrative state of the network, which is up (true) or down (false).

id plain csapi:uuid

The network ID.

name plain xsd:string

The network name.

shared plain xsd:bool

Indicates whether this network is shared across all tenants. By default, only administrative users can change this value.

status plain xsd:string

The network status.

subnets plain xsd:dict

The associated subnets.

tenant_id plain csapi:uuid

The tenant ID.

{
    "networks": [
        {
            "name": "sample_network3",
            "admin_state_up": true
        },
        {
            "name": "sample_network4",
            "admin_state_up": true
        }
    ]
}
<?xml version="1.0" encoding="UTF-8"?>
<networks>
    <network>
        <name>sample_network_5</name>
    </network>
    <network>
        <name>sample_network_6</name>
    </network>
</networks>
{
    "networks": [
        {
            "status": "ACTIVE",
            "subnets": [],
            "name": "sample_network3",
            "provider:physical_network": null,
            "admin_state_up": true,
            "tenant_id": "4fd44f30292945e481c7b8a0c8908869",
            "provider:network_type": "local",
            "shared": false,
            "id": "bc1a76cb-8767-4c3a-bb95-018b822f2130",
            "provider:segmentation_id": null
        },
        {
            "status": "ACTIVE",
            "subnets": [],
            "name": "sample_network4",
            "provider:physical_network": null,
            "admin_state_up": true,
            "tenant_id": "4fd44f30292945e481c7b8a0c8908869",
            "provider:network_type": "local",
            "shared": false,
            "id": "af374017-c9ae-4a1d-b799-ab73111476e2",
            "provider:segmentation_id": null
        }
    ]
}
<?xml version='1.0' encoding='UTF-8'?>
<networks xmlns="http://openstack.org/quantum/api/v2.0"
    xmlns:provider="http://docs.openstack.org/ext/provider/api/v1.0"
    xmlns:quantum="http://openstack.org/quantum/api/v2.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <network>
        <status>ACTIVE</status>
        <subnets quantum:type="list"/>
        <name>sample_network_5</name>
        <provider:physical_network xsi:nil="true"/>
        <admin_state_up quantum:type="bool">True</admin_state_up>
        <tenant_id>4fd44f30292945e481c7b8a0c8908869</tenant_id>
        <provider:network_type>local</provider:network_type>
        <shared quantum:type="bool">False</shared>
        <id>1f370095-98f6-4079-be64-6d3d4a6adcc6</id>
        <provider:segmentation_id xsi:nil="true"/>
    </network>
    <network>
        <status>ACTIVE</status>
        <subnets quantum:type="list"/>
        <name>sample_network_6</name>
        <provider:physical_network xsi:nil="true"/>
        <admin_state_up quantum:type="bool">True</admin_state_up>
        <tenant_id>4fd44f30292945e481c7b8a0c8908869</tenant_id>
        <provider:network_type>local</provider:network_type>
        <shared quantum:type="bool">False</shared>
        <id>ee2d3158-3e80-4fb3-ba87-c99f515d85e7</id>
        <provider:segmentation_id xsi:nil="true"/>
    </network>
</networks>
GET
/v2.0/networks/​{network_id}​
Show network

Shows information for a specified network.

 

You can control which attributes are returned by using the fields query parameter. For information, see Filtering and Column Selection in the OpenStack Networking API v2.0 Reference .

Normal response codes
200
Error response codes
unauthorized (401), itemNotFound (404)
Request parameters
Parameter Style Type Description
network_id URI csapi:UUID The UUID for the network of interest to you.
Response parameters
Parameter Style Type Description
admin_state_up plain xsd:bool

The administrative state of the network, which is up (true) or down (false).

id plain csapi:uuid

The network ID.

name plain xsd:string

The network name.

shared plain xsd:bool

Indicates whether this network is shared across all tenants. By default, only administrative users can change this value.

status plain xsd:string

The network status.

subnets plain xsd:dict

The associated subnets.

tenant_id plain csapi:uuid

The tenant ID.

{
    "network": {
        "status": "ACTIVE",
        "subnets": [
            "54d6f61d-db07-451c-9ab3-b9609b6b6f0b"
        ],
        "name": "private-network",
        "provider:physical_network": null,
        "admin_state_up": true,
        "tenant_id": "4fd44f30292945e481c7b8a0c8908869",
        "provider:network_type": "local",
        "router:external": true,
        "shared": true,
        "id": "d32019d3-bc6e-4319-9c1d-6722fc136a22",
        "provider:segmentation_id": null
    }
}
<?xml version='1.0' encoding='UTF-8'?>
<network xmlns="http://openstack.org/quantum/api/v2.0"
    xmlns:provider="http://docs.openstack.org/ext/provider/api/v1.0"
    xmlns:quantum="http://openstack.org/quantum/api/v2.0"
    xmlns:router="http://docs.openstack.org/ext/neutron/router/api/v1.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <status>ACTIVE</status>
    <subnets>
        <subnet>54d6f61d-db07-451c-9ab3-b9609b6b6f0b</subnet>
    </subnets>
    <name>private-network</name>
    <provider:physical_network xsi:nil="true"/>
    <admin_state_up quantum:type="bool">True</admin_state_up>
    <tenant_id>4fd44f30292945e481c7b8a0c8908869</tenant_id>
    <provider:network_type>local</provider:network_type>
    <router:external quantum:type="bool">True</router:external>
    <shared quantum:type="bool">True</shared>
    <id>d32019d3-bc6e-4319-9c1d-6722fc136a22</id>
    <provider:segmentation_id xsi:nil="true"/>
</network>

This operation does not accept a request body.

PUT
/v2.0/networks/​{network_id}​
Update network

Updates a specified network.

 
Normal response codes
200
Error response codes
badRequest (400), unauthorized (401), forbidden (403), itemNotFound (404)
Request parameters
Parameter Style Type Description
network_id URI csapi:UUID The UUID for the network of interest to you.
admin_state_up (Optional) plain xsd:bool

The administrative state of the network, which is up (true) or down (false).

name (Optional) plain xsd:string The network name.
shared (Optional) plain xsd:bool

Admin-only. Indicates whether this network is shared across all tenants.

router:external (Optional) plain xsd:bool

Indicates whether this network is externally accessible.

Response parameters
Parameter Style Type Description
admin_state_up plain xsd:bool

The administrative state of the network, which is up (true) or down (false).

id plain csapi:uuid

The network ID.

name plain xsd:string

The network name.

shared plain xsd:bool

Indicates whether this network is shared across all tenants. By default, only administrative users can change this value.

status plain xsd:string

The network status.

subnets plain xsd:dict

The associated subnets.

tenant_id plain csapi:uuid

The tenant ID.

router:external plain xsd:bool

Indicates whether this network is externally accessible.

{
    "network": {
        "name": "sample_network_5_updated"
    }
}
<?xml version="1.0" encoding="UTF-8"?>
<network xmlns="http://openstack.org/quantum/api/v2.0"
    xmlns:provider="http://docs.openstack.org/ext/provider/api/v1.0"
    xmlns:quantum="http://openstack.org/quantum/api/v2.0"
    xmlns:router="http://docs.openstack.org/ext/quantum/router/api/v1.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <name>sample-network-4-updated</name>
</network>
{
    "network": {
        "status": "ACTIVE",
        "subnets": [],
        "name": "sample_network_5_updated",
        "provider:physical_network": null,
        "admin_state_up": true,
        "tenant_id": "4fd44f30292945e481c7b8a0c8908869",
        "provider:network_type": "local",
        "router:external": false,
        "shared": false,
        "id": "1f370095-98f6-4079-be64-6d3d4a6adcc6",
        "provider:segmentation_id": null
    }
}
<?xml version='1.0' encoding='UTF-8'?>
<network xmlns="http://openstack.org/quantum/api/v2.0"
    xmlns:provider="http://docs.openstack.org/ext/provider/api/v1.0"
    xmlns:quantum="http://openstack.org/quantum/api/v2.0"
    xmlns:router="http://docs.openstack.org/ext/neutron/router/api/v1.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <status>ACTIVE</status>
    <subnets quantum:type="list"/>
    <name>sample-network-4-updated</name>
    <provider:physical_network xsi:nil="true"/>
    <admin_state_up quantum:type="bool">True</admin_state_up>
    <tenant_id>4fd44f30292945e481c7b8a0c8908869</tenant_id>
    <provider:network_type>local</provider:network_type>
    <router:external quantum:type="bool">False</router:external>
    <shared quantum:type="bool">False</shared>
    <id>af374017-c9ae-4a1d-b799-ab73111476e2</id>
    <provider:segmentation_id xsi:nil="true"/>
</network>
DELETE
/v2.0/networks/​{network_id}​
Delete network

Deletes a specified network and its associated resources.

 
Normal response codes
204
Error response codes
unauthorized (401), itemNotFound (404), conflict (409)
Request parameters
Parameter Style Type Description
network_id URI csapi:UUID The UUID for the network of interest to you.

This operation does not accept a request body and does not return a response body.

Subnets

List, show information for, create, update, and delete subnet resources.

GET
/v2.0/subnets
List subnets

Lists subnets to which the specified tenant has access.

 

Default policy settings returns exclusively subnets owned by the tenant submitting the request, unless the request is submitted by an user with administrative rights. You can control which attributes are returned by using the fields query parameter. You can filter results by using query string parameters.

Normal response codes
200
Error response codes
unauthorized (401)
Request parameters
Parameter Style Type Description
display_name (Optional) query xsd:string

Name of the network.

network_id (Optional) query csapi:uuid

The ID of the attached network.

tenant_id (Optional) plain csapi:uuid

The ID of the tenant who owns the network. Only administrative users can specify a tenant ID other than their own. You cannot change this value through authorization policies.

gateway_ip (Optional) query xsd:string

The gateway IP address.

ip_version (Optional) query xsd:string

The IP version, which is 4 or 6.

cidr (Optional) query xsd:bool

The CIDR.

id (Optional) query csapi:uuid

The ID of the subnet.

enable_dhcp (Optional) query xsd:boolean

If true, DHCP is enabled and If false, DHCP is disabled.

ipv6_ra_mode (Optional) query xsd:string

Choose from (constants.IPV6_SLAAC,constants.DHCPV6_STATEFUL,constants.DHCPV6_STATELESS,name='ipv6_address_modes,null).

ipv6_address_mode (Optional) query xsd:string

Choose from (constants.IPV6_SLAAC,constants.DHCPV6_STATEFUL,constants.DHCPV6_STATELESS,name='ipv6_address_modes,null).

Response parameters
Parameter Style Type Description
name plain xsd:string

The subnet name.

network_id plain csapi:uuid

The ID of the attached network.

tenant_id plain csapi:uuid

The ID of the tenant who owns the network. Only administrative users can specify a tenant ID other than their own.

allocation_pools plain xsd:dict

The start and end addresses for the allocation pools.

start plain xsd:string

The start address for the allocation pools.

end plain xsd:string

The end address for the allocation pools.

gateway_ip plain xsd:string

The gateway IP address.

ip_version plain xsd:string

The IP version, which is 4 or 6.

cidr plain xsd:bool

The CIDR.

id plain csapi:uuid

The ID of the subnet.

enable_dhcp plain xsd:boolean

Set to true if DHCP is enabled and false if DHCP is disabled.

dns_nameservers plain xsd:string

DNS server.

host_routes (Optional) plain xsd:list

A list of host route dictionaries for the subnet. For example:

"host_routes":[
    {
        "destination":"0.0.0.0/0",
        "nexthop":"123.456.78.9"
    },
    {
        "destination":"192.168.0.0/24",
        "nexthop":"192.168.0.1"
    }
]
destination plain xsd:string

Destination for static route.

nexthop plain xsd:string

Nexthop for the destination.

ipv6_ra_mode plain xsd:string

One of the following values is returned: dhcpv6-stateful, dhcpv6-stateless, or slaac.

ipv6_address_mode plain xsd:string

One of the following values is returned: dhcpv6-stateful, dhcpv6-stateless, or slaac.

{
    "subnets": [
        {
            "name": "private-subnet",
            "enable_dhcp": true,
            "network_id": "db193ab3-96e3-4cb3-8fc5-05f4296d0324",
            "tenant_id": "26a7980765d0414dbc1fc1f88cdb7e6e",
            "dns_nameservers": [],
            "allocation_pools": [
                {
                    "start": "10.0.0.2",
                    "end": "10.0.0.254"
                }
            ],
            "host_routes": [],
            "ip_version": 4,
            "gateway_ip": "10.0.0.1",
            "cidr": "10.0.0.0/24",
            "id": "08eae331-0402-425a-923c-34f7cfe39c1b"
        },
        {
            "name": "my_subnet",
            "enable_dhcp": true,
            "network_id": "d32019d3-bc6e-4319-9c1d-6722fc136a22",
            "tenant_id": "4fd44f30292945e481c7b8a0c8908869",
            "dns_nameservers": [],
            "allocation_pools": [
                {
                    "start": "192.0.0.2",
                    "end": "192.255.255.254"
                }
            ],
            "host_routes": [],
            "ip_version": 4,
            "gateway_ip": "192.0.0.1",
            "cidr": "192.0.0.0/8",
            "id": "54d6f61d-db07-451c-9ab3-b9609b6b6f0b"
        }
    ]
}
<?xml version='1.0' encoding='UTF-8'?>
<subnets>
    <subnet>
        <name>private-subnet</name>
        <enable_dhcp>True</enable_dhcp>
        <network_id>db193ab3-96e3-4cb3-8fc5-05f4296d0324</network_id>
        <tenant_id>26a7980765d0414dbc1fc1f88cdb7e6e</tenant_id>
        <dns_nameservers/>
        <allocation_pools>
            <allocation_pool>
                <start>10.0.0.2</start>
                <end>10.0.0.254</end>
            </allocation_pool>
        </allocation_pools>
        <host_routes/>
        <ip_version>4</ip_version>
        <gateway_ip>10.0.0.1</gateway_ip>
        <cidr>10.0.0.0/24</cidr>
        <id>08eae331-0402-425a-923c-34f7cfe39c1b</id>
    </subnet>
    <subnet>
        <name>my_subnet</name>
        <enable_dhcp>True</enable_dhcp>
        <network_id>d32019d3-bc6e-4319-9c1d-6722fc136a22</network_id>
        <tenant_id>4fd44f30292945e481c7b8a0c8908869</tenant_id>
        <dns_nameservers/>
        <allocation_pools>
            <allocation_pool>
                <start>192.0.0.2</start>
                <end>192.255.255.254</end>
            </allocation_pool>
        </allocation_pools>
        <host_routes/>
        <ip_version>4</ip_version>
        <gateway_ip>192.0.0.1</gateway_ip>
        <cidr>192.0.0.0/8</cidr>
        <id>54d6f61d-db07-451c-9ab3-b9609b6b6f0b</id>
    </subnet>
</subnets>
POST
/v2.0/subnets
Create subnet

Creates a subnet on a specified network.

 

OpenStack Networking does not try to derive the correct IP version from the specified CIDR. If you do not specify the gateway_ip attribute, OpenStack Networking allocates an address from the CIDR for the gateway for the subnet.

To specify a subnet without a gateway, set the gateway_ip attribute to null in the request body. If you do not specify the allocation_pools attribute, OpenStack Networking automatically allocates pools for covering all IP addresses in the CIDR, excluding the address reserved for the subnet gateway. Otherwise, you can explicitly specify allocation pools as shown in the following example.

When you specify both the allocation_pools and gateway_ip attributes, you must ensure that the gateway IP does not overlap with the specified allocation pools; otherwise a 409 Conflict error occurs.

A subnet can have one or more name servers and host routes. Hosts in this subnet use the specified name servers. Devices with IP addresses from this subnet, not including the local subnet route, use the specified host routes.

Specify the ipv6_ra_mode and ipv6_address_mode attributes to create subnets that support IPv6 configurations, such as Stateless Address Autoconfiguration (SLAAC), DHCPv6 Stateful, and DHCPv6 Stateless configurations.

Normal response codes
201
Error response codes
badRequest (400), unauthorized (401), forbidden (403), itemNotFound (404), conflict (409)
Request parameters
Parameter Style Type Description
name (Optional) plain xsd:string

The subnet name.

network_id plain csapi:uuid

The ID of the attached network.

tenant_id (Optional) plain csapi:uuid

The ID of the tenant who owns the network. Only administrative users can specify a tenant ID other than their own. You cannot change this value through authorization policies.

allocation_pools (Optional) plain xsd:dict

The start and end addresses for the allocation pools.

start (Optional) plain xsd:string

The start address for the allocation pools.

end (Optional) plain xsd:string

The end address for the allocation pools.

gateway_ip (Optional) plain xsd:string

The gateway IP address.

ip_version plain xsd:string

The IP version, which is 4 or 6.

cidr plain xsd:bool

The CIDR.

enable_dhcp (Optional) plain xsd:boolean

Set to true if DHCP is enabled and false if DHCP is disabled.

dns_nameservers (Optional) plain xsd:list

A list of DNS name servers for the subnet. Specify each name server as an IP address and separate multiple entries with a space. For example [8.8.8.7 8.8.8.8].

host_routes (Optional) plain xsd:list

A list of host route dictionaries for the subnet. For example:

"host_routes":[
    {
        "destination":"0.0.0.0/0",
        "nexthop":"123.456.78.9"
    },
    {
        "destination":"192.168.0.0/24",
        "nexthop":"192.168.0.1"
    }
]
destination (Optional) plain xsd:string

Destination for static route

nexthop (Optional) plain xsd:string

Nexthop for the destination.

ipv6_ra_mode (Optional) plain xsd:string

A valid value is dhcpv6-stateful, dhcpv6-stateless, or slaac.

ipv6_address_mode (Optional) plain xsd:string

A valid value is dhcpv6-stateful, dhcpv6-stateless, or slaac.

Response parameters
Parameter Style Type Description
name plain xsd:string

The subnet name.

network_id plain csapi:uuid

The ID of the attached network.

tenant_id plain csapi:uuid

The ID of the tenant who owns the network. Only administrative users can specify a tenant ID other than their own.

allocation_pools plain xsd:dict

The start and end addresses for the allocation pools.

start plain xsd:string

The start address for the allocation pools.

end plain xsd:string

The end address for the allocation pools.

gateway_ip plain xsd:string

The gateway IP address.

ip_version plain xsd:string

The IP version, which is 4 or 6.

cidr plain xsd:bool

The CIDR.

id plain csapi:uuid

The ID of the subnet.

enable_dhcp plain xsd:boolean

Set to true if DHCP is enabled and false if DHCP is disabled.

dns_nameservers plain xsd:string

DNS server.

host_routes (Optional) plain xsd:list

A list of host route dictionaries for the subnet. For example:

"host_routes":[
    {
        "destination":"0.0.0.0/0",
        "nexthop":"123.456.78.9"
    },
    {
        "destination":"192.168.0.0/24",
        "nexthop":"192.168.0.1"
    }
]
destination plain xsd:string

Destination for static route.

nexthop plain xsd:string

Nexthop for the destination.

ipv6_ra_mode plain xsd:string

One of the following values is returned: dhcpv6-stateful, dhcpv6-stateless, or slaac.

ipv6_address_mode plain xsd:string

One of the following values is returned: dhcpv6-stateful, dhcpv6-stateless, or slaac.

{
    "subnet": {
        "network_id": "d32019d3-bc6e-4319-9c1d-6722fc136a22",
        "ip_version": 4,
        "cidr": "10.0.0.1"
    }
}
<?xml version='1.0' encoding='UTF-8'?>
<subnet>
    <network_id>d32019d3-bc6e-4319-9c1d-6722fc136a22</network_id>
    <ip_version>4</ip_version>
    <cidr>10.0.0.1</cidr>
</subnet>
{
    "subnet": {
        "name": "",
        "enable_dhcp": true,
        "network_id": "d32019d3-bc6e-4319-9c1d-6722fc136a22",
        "tenant_id": "4fd44f30292945e481c7b8a0c8908869",
        "dns_nameservers": [],
        "allocation_pools": [
            {
                "start": "192.168.199.2",
                "end": "192.168.199.254"
            }
        ],
        "host_routes": [],
        "ip_version": 4,
        "gateway_ip": "192.168.199.1",
        "cidr": "192.168.199.0/24",
        "id": "3b80198d-4f7b-4f77-9ef5-774d54e17126"
    }
}
<?xml version='1.0' encoding='UTF-8'?>
<subnet>
    <name>test_subnet_1</name>
    <enable_dhcp>True</enable_dhcp>
    <network_id>d32019d3-bc6e-4319-9c1d-6722fc136a22</network_id>
    <tenant_id>4fd44f30292945e481c7b8a0c8908869</tenant_id>
    <dns_nameservers/>
    <allocation_pools>
        <allocation_pool>
            <start>192.0.0.2</start>
            <end>192.255.255.254</end>
        </allocation_pool>
    </allocation_pools>
    <host_routes/>
    <ip_version>4</ip_version>
    <gateway_ip>192.0.0.1</gateway_ip>
    <cidr>192.0.0.0/8</cidr>
    <id>54d6f61d-db07-451c-9ab3-b9609b6b6f0b</id>
</subnet>
POST
/v2.0/subnets
Bulk create subnet

Creates multiple subnets in a single request. Specify a list of subnets in the request body.

 

The bulk create operation is always atomic. Either all or no subnets in the request body are created.

Normal response codes
201
Error response codes
badRequest (400), unauthorized (401), forbidden (403), itemNotFound (404), conflict (409)
Request parameters
Parameter Style Type Description
name (Optional) plain xsd:string

The subnet name.

network_id plain csapi:uuid

The ID of the attached network.

tenant_id (Optional) plain csapi:uuid

The ID of the tenant who owns the network. Only administrative users can specify a tenant ID other than their own. You cannot change this value through authorization policies.

allocation_pools (Optional) plain xsd:dict

The start and end addresses for the allocation pools.

start (Optional) plain xsd:string

The start address for the allocation pools.

end (Optional) plain xsd:string

The end address for the allocation pools.

gateway_ip (Optional) plain xsd:string

The gateway IP address.

ip_version plain xsd:string

The IP version, which is 4 or 6.

cidr plain xsd:bool

The CIDR.

enable_dhcp (Optional) plain xsd:boolean

Set to true if DHCP is enabled and false if DHCP is disabled.

dns_nameservers (Optional) plain xsd:list

A list of DNS name servers for the subnet. Specify each name server as an IP address and separate multiple entries with a space. For example [8.8.8.7 8.8.8.8].

host_routes (Optional) plain xsd:list

A list of host route dictionaries for the subnet. For example:

"host_routes":[
    {
        "destination":"0.0.0.0/0",
        "nexthop":"123.456.78.9"
    },
    {
        "destination":"192.168.0.0/24",
        "nexthop":"192.168.0.1"
    }
]
destination (Optional) plain xsd:string

Destination for static route

nexthop (Optional) plain xsd:string

Nexthop for the destination.

ipv6_ra_mode (Optional) plain xsd:string

A valid value is dhcpv6-stateful, dhcpv6-stateless, or slaac.

ipv6_address_mode (Optional) plain xsd:string

A valid value is dhcpv6-stateful, dhcpv6-stateless, or slaac.

Response parameters
Parameter Style Type Description
name plain xsd:string

The subnet name.

network_id plain csapi:uuid

The ID of the attached network.

tenant_id plain csapi:uuid

The ID of the tenant who owns the network. Only administrative users can specify a tenant ID other than their own.

allocation_pools plain xsd:dict

The start and end addresses for the allocation pools.

start plain xsd:string

The start address for the allocation pools.

end plain xsd:string

The end address for the allocation pools.

gateway_ip plain xsd:string

The gateway IP address.

ip_version plain xsd:string

The IP version, which is 4 or 6.

cidr plain xsd:bool

The CIDR.

id plain csapi:uuid

The ID of the subnet.

enable_dhcp plain xsd:boolean

Set to true if DHCP is enabled and false if DHCP is disabled.

dns_nameservers plain xsd:string

DNS server.

host_routes (Optional) plain xsd:list

A list of host route dictionaries for the subnet. For example:

"host_routes":[
    {
        "destination":"0.0.0.0/0",
        "nexthop":"123.456.78.9"
    },
    {
        "destination":"192.168.0.0/24",
        "nexthop":"192.168.0.1"
    }
]
destination plain xsd:string

Destination for static route.

nexthop plain xsd:string

Nexthop for the destination.

ipv6_ra_mode plain xsd:string

One of the following values is returned: dhcpv6-stateful, dhcpv6-stateless, or slaac.

ipv6_address_mode plain xsd:string

One of the following values is returned: dhcpv6-stateful, dhcpv6-stateless, or slaac.

{
    "subnets": [
        {
            "cidr": "192.168.199.0/24",
            "ip_version": 4,
            "network_id": "e6031bc2-901a-4c66-82da-f4c32ed89406"
        },
        {
            "cidr": "10.56.4.0/22",
            "ip_version": 4,
            "network_id": "64239a54-dcc4-4b39-920b-b37c2144effa"
        }
    ]
}
<?xml version="1.0" encoding="UTF-8"?>
<subnets>
    <subnet>
        <name>test_subnet_1</name>
        <network_id>a3775a7d-9f8b-4148-be81-c84bbd0837ce</network_id>
        <cidr>10.0.0.0/8</cidr>
        <ip_version>4</ip_version>
    </subnet>
    <subnet>
        <name>test_subnet_2</name>
        <network_id>a3775a7d-9f8b-4148-be81-c84bbd0837ce</network_id>
        <cidr>192.168.0.0/16</cidr>
        <ip_version>4</ip_version>
    </subnet>
</subnets>
{
    "subnets": [
        {
            "allocation_pools": [
                {
                    "end": "192.168.199.254",
                    "start": "192.168.199.2"
                }
            ],
            "cidr": "192.168.199.0/24",
            "dns_nameservers": [],
            "enable_dhcp": true,
            "gateway_ip": "192.168.199.1",
            "host_routes": [],
            "id": "0468a7a7-290d-4127-aedd-6c9449775a24",
            "ip_version": 4,
            "name": "",
            "network_id": "e6031bc2-901a-4c66-82da-f4c32ed89406",
            "tenant_id": "d19231fc08ec4bc4829b668040d34512"
        },
        {
            "allocation_pools": [
                {
                    "end": "10.56.7.254",
                    "start": "10.56.4.2"
                }
            ],
            "cidr": "10.56.4.0/22",
            "dns_nameservers": [],
            "enable_dhcp": true,
            "gateway_ip": "10.56.4.1",
            "host_routes": [],
            "id": "b0e7435c-1512-45fb-aa9e-9a7c5932fb30",
            "ip_version": 4,
            "name": "",
            "network_id": "64239a54-dcc4-4b39-920b-b37c2144effa",
            "tenant_id": "d19231fc08ec4bc4829b668040d34512"
        }
    ]
}
<?xml version='1.0' encoding='UTF-8'?>
<subnets>
    <subnet>
        <name>test_subnet_1</name>
        <enable_dhcp>True</enable_dhcp>
        <network_id>a3775a7d-9f8b-4148-be81-c84bbd0837ce</network_id>
        <tenant_id>60cd4f6dbc2f491982a284e7b83b5be3</tenant_id>
        <dns_nameservers/>
        <allocation_pools>
            <allocation_pool>
                <start>10.0.0.2</start>
                <end>10.255.255.254</end>
            </allocation_pool>
        </allocation_pools>
        <host_routes/>
        <ip_version>4</ip_version>
        <gateway_ip>10.0.0.1</gateway_ip>
        <cidr>10.0.0.0/8</cidr>
        <id>bd3fd365-fe19-431a-be63-07017a09316c</id>
    </subnet>
    <subnet>
        <name>test_subnet_2</name>
        <enable_dhcp>True</enable_dhcp>
        <network_id>a3775a7d-9f8b-4148-be81-c84bbd0837ce</network_id>
        <tenant_id>60cd4f6dbc2f491982a284e7b83b5be3</tenant_id>
        <dns_nameservers/>
        <allocation_pools>
            <allocation_pool>
                <start>192.168.0.2</start>
                <end>192.168.255.254</end>
            </allocation_pool>
        </allocation_pools>
        <host_routes/>
        <ip_version>4</ip_version>
        <gateway_ip>192.168.0.1</gateway_ip>
        <cidr>192.168.0.0/16</cidr>
        <id>86e7c838-fb75-402b-9dbf-d68166e3f5fe</id>
    </subnet>
</subnets>
GET
/v2.0/subnets/​{subnet_id}​
Show subnet

Shows information for a specified subnet.

 

Use the fields query parameter to filter the results.

Normal response codes
200
Error response codes
unauthorized (401), itemNotFound (404)
Request parameters
Parameter Style Type Description
subnet_id URI csapi:UUID

The UUID for the subnet of interest to you.

Response parameters
Parameter Style Type Description
name plain xsd:string

The subnet name.

network_id plain csapi:uuid

The ID of the attached network.

tenant_id plain csapi:uuid

The ID of the tenant who owns the network. Only administrative users can specify a tenant ID other than their own.

allocation_pools plain xsd:dict

The start and end addresses for the allocation pools.

start plain xsd:string

The start address for the allocation pools.

end plain xsd:string

The end address for the allocation pools.

gateway_ip plain xsd:string

The gateway IP address.

ip_version plain xsd:string

The IP version, which is 4 or 6.

cidr plain xsd:bool

The CIDR.

id plain csapi:uuid

The ID of the subnet.

enable_dhcp plain xsd:boolean

Set to true if DHCP is enabled and false if DHCP is disabled.

dns_nameservers plain xsd:string

DNS server.

host_routes (Optional) plain xsd:list

A list of host route dictionaries for the subnet. For example:

"host_routes":[
    {
        "destination":"0.0.0.0/0",
        "nexthop":"123.456.78.9"
    },
    {
        "destination":"192.168.0.0/24",
        "nexthop":"192.168.0.1"
    }
]
destination plain xsd:string

Destination for static route.

nexthop plain xsd:string

Nexthop for the destination.

ipv6_ra_mode plain xsd:string

One of the following values is returned: dhcpv6-stateful, dhcpv6-stateless, or slaac.

ipv6_address_mode plain xsd:string

One of the following values is returned: dhcpv6-stateful, dhcpv6-stateless, or slaac.

{
    "subnet": {
        "name": "my_subnet",
        "enable_dhcp": true,
        "network_id": "d32019d3-bc6e-4319-9c1d-6722fc136a22",
        "tenant_id": "4fd44f30292945e481c7b8a0c8908869",
        "dns_nameservers": [],
        "allocation_pools": [
            {
                "start": "192.0.0.2",
                "end": "192.255.255.254"
            }
        ],
        "host_routes": [],
        "ip_version": 4,
        "gateway_ip": "192.0.0.1",
        "cidr": "192.0.0.0/8",
        "id": "54d6f61d-db07-451c-9ab3-b9609b6b6f0b"
    }
}
<?xml version='1.0' encoding='UTF-8'?>
<subnet>
    <name>test_subnet_1</name>
    <enable_dhcp>True</enable_dhcp>
    <network_id>d32019d3-bc6e-4319-9c1d-6722fc136a22</network_id>
    <tenant_id>4fd44f30292945e481c7b8a0c8908869</tenant_id>
    <dns_nameservers/>
    <allocation_pools>
        <allocation_pool>
            <start>192.0.0.2</start>
            <end>192.255.255.254</end>
        </allocation_pool>
    </allocation_pools>
    <host_routes/>
    <ip_version>4</ip_version>
    <gateway_ip>192.0.0.1</gateway_ip>
    <cidr>192.0.0.0/8</cidr>
    <id>54d6f61d-db07-451c-9ab3-b9609b6b6f0b</id>
</subnet>

This operation does not accept a request body.

PUT
/v2.0/subnets/​{subnet_id}​
Update subnet

Updates a specified subnet.

 

Some attributes, such as IP version (ip_version), and CIDR (cidr) cannot be updated. Attempting to update these attributes results in a 400 Bad Request error.

Normal response codes
200
Error response codes
badRequest (400), unauthorized (401), forbidden (403), itemNotFound (404)
Request parameters
Parameter Style Type Description
subnet_id URI csapi:UUID

The UUID for the subnet of interest to you.

name (Optional) plain xsd:string

The subnet name.

allocation_pools (Optional) plain xsd:dict

The start and end addresses for the allocation pools.

start (Optional) plain xsd:string

The start address for the allocation pools.

end (Optional) plain xsd:string

The end address for the allocation pools.

gateway_ip (Optional) plain xsd:string

The gateway IP address.

enable_dhcp (Optional) plain xsd:boolean

Set to true if DHCP is enabled and false if DHCP is disabled.

dns_nameservers (Optional) plain xsd:string

DNS server

host_routes (Optional) plain xsd:list

A list of host route dictionaries for the subnet. For example:

"host_routes":[
    {
        "destination":"0.0.0.0/0",
        "nexthop":"123.456.78.9"
    },
    {
        "destination":"192.168.0.0/24",
        "nexthop":"192.168.0.1"
    }
]
destination (Optional) plain xsd:string

Destination for static route

nexthop (Optional) plain xsd:string

Nexthop for the destination

Response parameters
Parameter Style Type Description
name plain xsd:string

The subnet name.

network_id plain csapi:uuid

The ID of the attached network.

tenant_id plain csapi:uuid

The ID of the tenant who owns the network. Only administrative users can specify a tenant ID other than their own.

allocation_pools plain xsd:dict

The start and end addresses for the allocation pools.

start plain xsd:string

The start address for the allocation pools.

end plain xsd:string

The end address for the allocation pools.

gateway_ip plain xsd:string

The gateway IP address.

ip_version plain xsd:string

The IP version, which is 4 or 6.

cidr plain xsd:bool

The CIDR.

id plain csapi:uuid

The ID of the subnet.

enable_dhcp plain xsd:boolean

Set to true if DHCP is enabled and false if DHCP is disabled.

dns_nameservers plain xsd:string

DNS server.

host_routes (Optional) plain xsd:list

A list of host route dictionaries for the subnet. For example:

"host_routes":[
    {
        "destination":"0.0.0.0/0",
        "nexthop":"123.456.78.9"
    },
    {
        "destination":"192.168.0.0/24",
        "nexthop":"192.168.0.1"
    }
]
destination plain xsd:string

Destination for static route.

nexthop plain xsd:string

Nexthop for the destination.

ipv6_ra_mode plain xsd:string

One of the following values is returned: dhcpv6-stateful, dhcpv6-stateless, or slaac.

ipv6_address_mode plain xsd:string

One of the following values is returned: dhcpv6-stateful, dhcpv6-stateless, or slaac.

{
    "subnet": {
        "name": "my_subnet"
    }
}
<?xml version="1.0" encoding="UTF-8"?>
<subnet>
    <name>my_subnet</name>
</subnet>
{
    "subnet": {
        "name": "my_subnet",
        "enable_dhcp": true,
        "network_id": "db193ab3-96e3-4cb3-8fc5-05f4296d0324",
        "tenant_id": "26a7980765d0414dbc1fc1f88cdb7e6e",
        "dns_nameservers": [],
        "allocation_pools": [
            {
                "start": "10.0.0.2",
                "end": "10.0.0.254"
            }
        ],
        "host_routes": [],
        "ip_version": 4,
        "gateway_ip": "10.0.0.1",
        "cidr": "10.0.0.0/24",
        "id": "08eae331-0402-425a-923c-34f7cfe39c1b"
    }
}
<?xml version='1.0' encoding='UTF-8'?>
<subnet>
    <name>my_subnet</name>
    <enable_dhcp>True</enable_dhcp>
    <network_id>d32019d3-bc6e-4319-9c1d-6722fc136a22</network_id>
    <tenant_id>4fd44f30292945e481c7b8a0c8908869</tenant_id>
    <dns_nameservers/>
    <allocation_pools>
        <allocation_pool>
            <start>192.0.0.2</start>
            <end>192.255.255.254</end>
        </allocation_pool>
    </allocation_pools>
    <host_routes/>
    <ip_version>4</ip_version>
    <gateway_ip>192.0.0.1</gateway_ip>
    <cidr>192.0.0.0/8</cidr>
    <id>54d6f61d-db07-451c-9ab3-b9609b6b6f0b</id>
</subnet>
DELETE
/v2.0/subnets/​{subnet_id}​
Delete subnet

Deletes a specified subnet.

 

The operation fails if subnet IP addresses are still allocated.

Normal response codes
204
Error response codes
unauthorized (401), itemNotFound (404), conflict (409)
Request parameters
Parameter Style Type Description
subnet_id URI csapi:UUID

The UUID for the subnet of interest to you.

This operation does not accept a request body and does not return a response body.

Ports

List, show information for, create, update, and delete ports.

GET
/v2.0/ports
List ports

Lists ports to which the tenant has access.

 

Default policy settings return only those ports that are owned by the tenant who submits the request, unless the request is submitted by an user with administrative rights. Users can control which attributes are returned by using the fields query parameter. Additionally, you can filter results by using query string parameters. For information, see Filtering and Column Selection in the OpenStack Networking API v2.0 Reference .

Normal response codes
200
Error response codes
unauthorized (401)
Request parameters
Parameter Style Type Description
status (Optional) query xsd:string

The port status. Value is ACTIVE or DOWN.

display_name (Optional) query xsd:string

The port name.

admin_state (Optional) query xsd:bool

The administrative state of the router, which is up (true) or down (false).

network_id (Optional) query csapi:uuid

The ID of the attached network.

tenant_id (Optional) plain csapi:uuid

The ID of the tenant who owns the network. Only administrative users can specify a tenant ID other than their own. You cannot change this value through authorization policies.

device_owner (Optional) query xsd:string

The ID of the entity that uses this port. For example, a DHCP agent.

mac_address (Optional) query xsd:string

The MAC address of the port.

port_id (Optional) query csapi:uuid

The ID of the port.

security_groups (Optional) query csapi:uuid

The IDs of any attached security groups.

device_id (Optional) query csapi:uuid

The ID of the device that uses this port. For example, a virtual server.

Response parameters
Parameter Style Type Description
status plain xsd:string

The port status. Value is ACTIVE or DOWN.

name plain xsd:string

The port name.

allowed_address_pairs plain xsd:dict

Allowed address pairs.

ip_address plain xsd:string

IP address.

mac_address plain xsd:string

The MAC address.

admin_state_up plain xsd:bool

The administrative state of the port, which is up (true) or down (false).

network_id plain csapi:uuid

The ID of the attached network.

tenant_id plain csapi:uuid

The ID of the tenant who owns the network. Only administrative users can specify a tenant ID other than their own.

extra_dhcp_opts plain xsd:dict

Extra DHCP options.

opt_value plain xsd:string

Extra DHCP option (value).

opt_name plain xsd:string

Extra DHCP option (name).

device_owner plain xsd:string

The ID of the entity that uses this port. For example, a DHCP agent.

mac_address plain xsd:string

The MAC address of the port.

fixed_ips plain xsd:dict

IP addresses for the port. Includes the IP address and subnet ID.

subnet_id plain csapi:uuid

Subnet ID of the subnet to which the port is attached.

ip_address plain xsd:string

IP address.

id plain csapi:uuid

The ID of the port.

security_groups plain csapi:uuid

The IDs of any attached security groups.

device_id plain csapi:uuid

The ID of the device that uses this port. For example, a virtual server.

{
    "ports": [
        {
            "status": "ACTIVE",
            "name": "",
            "allowed_address_pairs": [],
            "admin_state_up": true,
            "network_id": "70c1db1f-b701-45bd-96e0-a313ee3430b3",
            "tenant_id": "",
            "extra_dhcp_opts": [],
            "device_owner": "network:router_gateway",
            "mac_address": "fa:16:3e:58:42:ed",
            "fixed_ips": [
                {
                    "subnet_id": "008ba151-0b8c-4a67-98b5-0d2b87666062",
                    "ip_address": "172.24.4.2"
                }
            ],
            "id": "d80b1a3b-4fc1-49f3-952e-1e2ab7081d8b",
            "security_groups": [],
            "device_id": "9ae135f4-b6e0-4dad-9e91-3c223e385824"
        },
        {
            "status": "ACTIVE",
            "name": "",
            "allowed_address_pairs": [],
            "admin_state_up": true,
            "network_id": "f27aa545-cbdd-4907-b0c6-c9e8b039dcc2",
            "tenant_id": "d397de8a63f341818f198abb0966f6f3",
            "extra_dhcp_opts": [],
            "device_owner": "network:router_interface",
            "mac_address": "fa:16:3e:bb:3c:e4",
            "fixed_ips": [
                {
                    "subnet_id": "288bf4a1-51ba-43b6-9d0a-520e9005db17",
                    "ip_address": "10.0.0.1"
                }
            ],
            "id": "f71a6703-d6de-4be1-a91a-a570ede1d159",
            "security_groups": [],
            "device_id": "9ae135f4-b6e0-4dad-9e91-3c223e385824"
        }
    ]
}
<?xml version='1.0' encoding='UTF-8'?>
<ports xmlns="http://openstack.org/quantum/api/v2.0"
    xmlns:quantum="http://openstack.org/quantum/api/v2.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <port>
        <status>ACTIVE</status>
        <name/>
        <allowed_address_pairs quantum:type="list"/>
        <admin_state_up quantum:type="bool">True</admin_state_up>
        <network_id>70c1db1f-b701-45bd-96e0-a313ee3430b3</network_id>
        <tenant_id/>
        <extra_dhcp_opts quantum:type="list"/>
        <device_owner>network:router_gateway</device_owner>
        <mac_address>fa:16:3e:58:42:ed</mac_address>
        <fixed_ips>
            <fixed_ip>
                <subnet_id>008ba151-0b8c-4a67-98b5-0d2b87666062</subnet_id>
                <ip_address>172.24.4.2</ip_address>
            </fixed_ip>
        </fixed_ips>
        <id>d80b1a3b-4fc1-49f3-952e-1e2ab7081d8b</id>
        <security_groups quantum:type="list"/>
        <device_id>9ae135f4-b6e0-4dad-9e91-3c223e385824</device_id>
    </port>
    <port>
        <status>ACTIVE</status>
        <name/>
        <allowed_address_pairs quantum:type="list"/>
        <admin_state_up quantum:type="bool">True</admin_state_up>
        <network_id>f27aa545-cbdd-4907-b0c6-c9e8b039dcc2</network_id>
        <tenant_id>d397de8a63f341818f198abb0966f6f3</tenant_id>
        <extra_dhcp_opts quantum:type="list"/>
        <device_owner>network:router_interface</device_owner>
        <mac_address>fa:16:3e:bb:3c:e4</mac_address>
        <fixed_ips>
            <fixed_ip>
                <subnet_id>288bf4a1-51ba-43b6-9d0a-520e9005db17</subnet_id>
                <ip_address>10.0.0.1</ip_address>
            </fixed_ip>
        </fixed_ips>
        <id>f71a6703-d6de-4be1-a91a-a570ede1d159</id>
        <security_groups quantum:type="list"/>
        <device_id>9ae135f4-b6e0-4dad-9e91-3c223e385824</device_id>
    </port>
</ports>
POST
/v2.0/ports
Create port

Creates a port on a specified network.

 

You must specify the network_id attribute in the request body to define the network where the port is to be created.

Normal response codes
201
Error response codes
badRequest (400), unauthorized (401), forbidden (403), itemNotFound (404), macGenerationFailure (503), serviceUnavailable (503)
Request parameters
Parameter Style Type Description
name (Optional) plain xsd:string

A symbolic name for the port.

admin_state_up (Optional) plain xsd:bool

The administrative status of the port, which is up (true) or down (false).

tenant_id (Optional) plain csapi:uuid

The ID of the tenant who owns the network. Only administrative users can specify a tenant ID other than their own. You cannot change this value through authorization policies.

mac_address (Optional) plain xsd:string

The MAC address. If you specify an address that is not valid, a 400 Bad Request error is returned. If you do not specify a MAC address, OpenStack Networking tries to allocate one. If a failure occurs, a 503 Service Unavailable error is returned.

fixed_ips (Optional) plain xsd:dict

If you specify only a subnet ID, OpenStack Networking allocates an available IP from that subnet to the port. If you specify both a subnet ID and an IP address, OpenStack Networking tries to allocate the specified address to the port.

subnet_id (Optional) plain csapi:uuid

If you specify only a subnet ID, OpenStack Networking allocates an available IP from that subnet to the port. If you specify both a subnet ID and an IP address, OpenStack Networking tries to allocate the specified address to the port.

ip_address (Optional) plain xsd:string

If you specify both a subnet ID and an IP address, OpenStack Networking tries to allocate the specified address to the port.

security_groups (Optional) plain csapi:uuid

Security groups. Specify one or more security group IDs.

network_id plain csapi:uuid

The ID of the network.

allowed_address_pairs (Optional) plain xsd:dict

Allowed address pairs

ip_address (Optional) plain xsd:string

The IP address of Allowed address pair.

mac_address (Optional) plain xsd:string

The MAC address of Allowed address pair.

opt_value (Optional) plain xsd:string

Extra DHCP option (value).

opt_name (Optional) plain xsd:string

Extra DHCP option (name).

device_owner (Optional) plain xsd:string

The ID of the entity that uses this port. For example, a DHCP agent.

device_id (Optional) plain csapi:uuid

The ID of the device that uses this port. For example, a virtual server.

Response parameters
Parameter Style Type Description
status plain xsd:string

The port status. Value is ACTIVE or DOWN.

name plain xsd:string

The port name.

allowed_address_pairs plain xsd:dict

Allowed address pairs.

ip_address plain xsd:string

IP address.

mac_address plain xsd:string

The MAC address.

admin_state_up plain xsd:bool

The administrative state of the port, which is up (true) or down (false).

network_id plain csapi:uuid

The ID of the attached network.

tenant_id plain csapi:uuid

The ID of the tenant who owns the network. Only administrative users can specify a tenant ID other than their own.

extra_dhcp_opts plain xsd:dict

Extra DHCP options.

opt_value plain xsd:string

Extra DHCP option (value).

opt_name plain xsd:string

Extra DHCP option (name).

device_owner plain xsd:string

The ID of the entity that uses this port. For example, a DHCP agent.

mac_address plain xsd:string

The MAC address of the port.

fixed_ips plain xsd:dict

IP addresses for the port. Includes the IP address and subnet ID.

subnet_id plain csapi:uuid

Subnet ID of the subnet to which the port is attached.

ip_address plain xsd:string

IP address.

id plain csapi:uuid

The ID of the port.

security_groups plain csapi:uuid

The IDs of any attached security groups.

device_id plain csapi:uuid

The ID of the device that uses this port. For example, a virtual server.

{
    "port": {
        "network_id": "a87cc70a-3e15-4acf-8205-9b711a3531b7",
        "name": "private-port",
        "admin_state_up": true
    }
}
<?xml version="1.0" encoding="UTF-8"?>
<port>
    <name>test_port_1</name>
    <network_id>a87cc70a-3e15-4acf-8205-9b711a3531b7</network_id>
</port>
{
    "port": {
        "status": "DOWN",
        "name": "private-port",
        "allowed_address_pairs": [],
        "admin_state_up": true,
        "network_id": "a87cc70a-3e15-4acf-8205-9b711a3531b7",
        "tenant_id": "d6700c0c9ffa4f1cb322cd4a1f3906fa",
        "device_owner": "",
        "mac_address": "fa:16:3e:c9:cb:f0",
        "fixed_ips": [
            {
                "subnet_id": "a0304c3a-4f08-4c43-88af-d796509c97d2",
                "ip_address": "10.0.0.2"
            }
        ],
        "id": "65c0ee9f-d634-4522-8954-51021b570b0d",
        "security_groups": [
            "f0ac4394-7e4a-4409-9701-ba8be283dbc3"
        ],
        "device_id": ""
    }
}
<?xml version='1.0' encoding='UTF-8'?>
<port xmlns="http://openstack.org/quantum/api/v2.0"
    xmlns:quantum="http://openstack.org/quantum/api/v2.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <status>DOWN</status>
    <name>test_port_1</name>
    <allowed_address_pairs quantum:type="list"/>
    <admin_state_up quantum:type="bool">True</admin_state_up>
    <network_id>a87cc70a-3e15-4acf-8205-9b711a3531b7</network_id>
    <tenant_id>d6700c0c9ffa4f1cb322cd4a1f3906fa</tenant_id>
    <device_owner/>
    <mac_address>fa:16:3e:09:e3:47</mac_address>
    <fixed_ips>
        <fixed_ip>
            <subnet_id>a0304c3a-4f08-4c43-88af-d796509c97d2</subnet_id>
            <ip_address>10.0.0.4</ip_address>
        </fixed_ip>
    </fixed_ips>
    <id>8021790b-4bfd-46ab-bcc7-0ef2f73bff43</id>
    <security_groups>
        <security_group>f0ac4394-7e4a-4409-9701-ba8be283dbc3</security_group>
    </security_groups>
    <device_id/>
</port>
POST
/v2.0/ports
Bulk create ports

Creates multiple ports in a single request. Specify a list of ports in the request body.

 

Guarantees the atomic completion of the bulk operation.

Normal response codes
201
Error response codes
badRequest (400), unauthorized (401), forbidden (403), itemNotFound (404), conflict (409), macGenerationFailure (503)
Request parameters
Parameter Style Type Description
name (Optional) plain xsd:string

A symbolic name for the port.

admin_state_up (Optional) plain xsd:bool

The administrative status of the port, which is up (true) or down (false).

tenant_id (Optional) plain csapi:uuid

The ID of the tenant who owns the network. Only administrative users can specify a tenant ID other than their own. You cannot change this value through authorization policies.

mac_address (Optional) plain xsd:string

The MAC address. If you specify an address that is not valid, a 400 Bad Request error is returned. If you do not specify a MAC address, OpenStack Networking tries to allocate one. If a failure occurs, a 503 Service Unavailable error is returned.

fixed_ips (Optional) plain xsd:dict

If you specify only a subnet ID, OpenStack Networking allocates an available IP from that subnet to the port. If you specify both a subnet ID and an IP address, OpenStack Networking tries to allocate the specified address to the port.

subnet_id (Optional) plain csapi:uuid

If you specify only a subnet ID, OpenStack Networking allocates an available IP from that subnet to the port. If you specify both a subnet ID and an IP address, OpenStack Networking tries to allocate the specified address to the port.

ip_address (Optional) plain xsd:string

If you specify both a subnet ID and an IP address, OpenStack Networking tries to allocate the specified address to the port.

security_groups (Optional) plain csapi:uuid

Security groups. Specify one or more security group IDs.

network_id plain csapi:uuid

The ID of the network.

allowed_address_pairs (Optional) plain xsd:dict

Allowed address pairs

ip_address (Optional) plain xsd:string

The IP address of Allowed address pair.

mac_address (Optional) plain xsd:string

The MAC address of Allowed address pair.

opt_value (Optional) plain xsd:string

Extra DHCP option (value).

opt_name (Optional) plain xsd:string

Extra DHCP option (name).

device_owner (Optional) plain xsd:string

The ID of the entity that uses this port. For example, a DHCP agent.

device_id (Optional) plain csapi:uuid

The ID of the device that uses this port. For example, a virtual server.

Response parameters
Parameter Style Type Description
status plain xsd:string

The port status. Value is ACTIVE or DOWN.

name plain xsd:string

The port name.

allowed_address_pairs plain xsd:dict

Allowed address pairs.

ip_address plain xsd:string

IP address.

mac_address plain xsd:string

The MAC address.

admin_state_up plain xsd:bool

The administrative state of the port, which is up (true) or down (false).

network_id plain csapi:uuid

The ID of the attached network.

tenant_id plain csapi:uuid

The ID of the tenant who owns the network. Only administrative users can specify a tenant ID other than their own.

extra_dhcp_opts plain xsd:dict

Extra DHCP options.

opt_value plain xsd:string

Extra DHCP option (value).

opt_name plain xsd:string

Extra DHCP option (name).

device_owner plain xsd:string

The ID of the entity that uses this port. For example, a DHCP agent.

mac_address plain xsd:string

The MAC address of the port.

fixed_ips plain xsd:dict

IP addresses for the port. Includes the IP address and subnet ID.

subnet_id plain csapi:uuid

Subnet ID of the subnet to which the port is attached.

ip_address plain xsd:string

IP address.

id plain csapi:uuid

The ID of the port.

security_groups plain csapi:uuid

The IDs of any attached security groups.

device_id plain csapi:uuid

The ID of the device that uses this port. For example, a virtual server.

{
    "ports": [
        {
            "name": "sample_port_1",
            "admin_state_up": false,
            "network_id": "a87cc70a-3e15-4acf-8205-9b711a3531b7"
        },
        {
            "name": "sample_port_2",
            "admin_state_up": false,
            "network_id": "a87cc70a-3e15-4acf-8205-9b711a3531b7"
        }
    ]
}
<?xml version="1.0" encoding="UTF-8"?>
<ports>
    <port>
        <name>test_port_1-xml</name>
        <network_id>a87cc70a-3e15-4acf-8205-9b711a3531b7</network_id>
    </port>
    <port>
        <name>test_port_2-xml</name>
        <network_id>a87cc70a-3e15-4acf-8205-9b711a3531b7</network_id>
    </port>
</ports>
{
    "ports": [
        {
            "status": "DOWN",
            "name": "sample_port_1",
            "allowed_address_pairs": [],
            "admin_state_up": false,
            "network_id": "a87cc70a-3e15-4acf-8205-9b711a3531b7",
            "tenant_id": "d6700c0c9ffa4f1cb322cd4a1f3906fa",
            "device_owner": "",
            "mac_address": "fa:16:3e:48:b8:9f",
            "fixed_ips": [
                {
                    "subnet_id": "a0304c3a-4f08-4c43-88af-d796509c97d2",
                    "ip_address": "10.0.0.5"
                }
            ],
            "id": "94225baa-9d3f-4b93-bf12-b41e7ce49cdb",
            "security_groups": [
                "f0ac4394-7e4a-4409-9701-ba8be283dbc3"
            ],
            "device_id": ""
        },
        {
            "status": "DOWN",
            "name": "sample_port_2",
            "allowed_address_pairs": [],
            "admin_state_up": false,
            "network_id": "a87cc70a-3e15-4acf-8205-9b711a3531b7",
            "tenant_id": "d6700c0c9ffa4f1cb322cd4a1f3906fa",
            "device_owner": "",
            "mac_address": "fa:16:3e:f4:73:df",
            "fixed_ips": [
                {
                    "subnet_id": "a0304c3a-4f08-4c43-88af-d796509c97d2",
                    "ip_address": "10.0.0.6"
                }
            ],
            "id": "235b09e0-63c4-47f1-b221-66ba54c21760",
            "security_groups": [
                "f0ac4394-7e4a-4409-9701-ba8be283dbc3"
            ],
            "device_id": ""
        }
    ]
}
<?xml version='1.0' encoding='UTF-8'?>
<ports xmlns="http://openstack.org/quantum/api/v2.0"
    xmlns:quantum="http://openstack.org/quantum/api/v2.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <port>
        <status>DOWN</status>
        <name>test_port_1-xml</name>
        <allowed_address_pairs quantum:type="list"/>
        <admin_state_up quantum:type="bool">True</admin_state_up>
        <network_id>a87cc70a-3e15-4acf-8205-9b711a3531b7</network_id>
        <tenant_id>d6700c0c9ffa4f1cb322cd4a1f3906fa</tenant_id>
        <device_owner/>
        <mac_address>fa:16:3e:fa:e2:34</mac_address>
        <fixed_ips>
            <fixed_ip>
                <subnet_id>a0304c3a-4f08-4c43-88af-d796509c97d2</subnet_id>
                <ip_address>10.0.0.7</ip_address>
            </fixed_ip>
        </fixed_ips>
        <id>054e8f14-4082-400e-afcc-5d6e5b3bcc0c</id>
        <security_groups>
            <security_group>f0ac4394-7e4a-4409-9701-ba8be283dbc3</security_group>
        </security_groups>
        <device_id/>
    </port>
    <port>
        <status>DOWN</status>
        <name>test_port_2-xml</name>
        <allowed_address_pairs quantum:type="list"/>
        <admin_state_up quantum:type="bool">True</admin_state_up>
        <network_id>a87cc70a-3e15-4acf-8205-9b711a3531b7</network_id>
        <tenant_id>d6700c0c9ffa4f1cb322cd4a1f3906fa</tenant_id>
        <device_owner/>
        <mac_address>fa:16:3e:e6:cf:d9</mac_address>
        <fixed_ips>
            <fixed_ip>
                <subnet_id>a0304c3a-4f08-4c43-88af-d796509c97d2</subnet_id>
                <ip_address>10.0.0.8</ip_address>
            </fixed_ip>
        </fixed_ips>
        <id>879e96f9-6dd5-4232-bd19-3f39d0ae463b</id>
        <security_groups>
            <security_group>f0ac4394-7e4a-4409-9701-ba8be283dbc3</security_group>
        </security_groups>
        <device_id/>
    </port>
</ports>
GET
/v2.0/ports/​{port_id}​
Show port

Shows information for a specified port.

 
Normal response codes
200
Error response codes
unauthorized (401), itemNotFound (404)
Request parameters
Parameter Style Type Description
port_id URI csapi:UUID The UUID for the port of interest to you.
Response parameters
Parameter Style Type Description
status plain xsd:string

The port status. Value is ACTIVE or DOWN.

name plain xsd:string

The port name.

allowed_address_pairs plain xsd:dict

Allowed address pairs.

ip_address plain xsd:string

IP address.

mac_address plain xsd:string

The MAC address.

admin_state_up plain xsd:bool

The administrative state of the port, which is up (true) or down (false).

network_id plain csapi:uuid

The ID of the attached network.

tenant_id plain csapi:uuid

The ID of the tenant who owns the network. Only administrative users can specify a tenant ID other than their own.

extra_dhcp_opts plain xsd:dict

Extra DHCP options.

opt_value plain xsd:string

Extra DHCP option (value).

opt_name plain xsd:string

Extra DHCP option (name).

device_owner plain xsd:string

The ID of the entity that uses this port. For example, a DHCP agent.

mac_address plain xsd:string

The MAC address of the port.

fixed_ips plain xsd:dict

IP addresses for the port. Includes the IP address and subnet ID.

subnet_id plain csapi:uuid

Subnet ID of the subnet to which the port is attached.

ip_address plain xsd:string

IP address.

id plain csapi:uuid

The ID of the port.

security_groups plain csapi:uuid

The IDs of any attached security groups.

device_id plain csapi:uuid

The ID of the device that uses this port. For example, a virtual server.

{
    "port": {
        "status": "ACTIVE",
        "name": "",
        "allowed_address_pairs": [],
        "admin_state_up": true,
        "network_id": "a87cc70a-3e15-4acf-8205-9b711a3531b7",
        "tenant_id": "7e02058126cc4950b75f9970368ba177",
        "extra_dhcp_opts": [],
        "device_owner": "network:router_interface",
        "mac_address": "fa:16:3e:23:fd:d7",
        "fixed_ips": [
            {
                "subnet_id": "a0304c3a-4f08-4c43-88af-d796509c97d2",
                "ip_address": "10.0.0.1"
            }
        ],
        "id": "46d4bfb9-b26e-41f3-bd2e-e6dcc1ccedb2",
        "security_groups": [],
        "device_id": "5e3898d7-11be-483e-9732-b2f5eccd2b2e"
    }
}
<?xml version='1.0' encoding='UTF-8'?>
<port xmlns="http://openstack.org/quantum/api/v2.0"
    xmlns:quantum="http://openstack.org/quantum/api/v2.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <status>ACTIVE</status>
    <name/>
    <allowed_address_pairs quantum:type="list"/>
    <admin_state_up quantum:type="bool">True</admin_state_up>
    <network_id>a87cc70a-3e15-4acf-8205-9b711a3531b7</network_id>
    <tenant_id>7e02058126cc4950b75f9970368ba177</tenant_id>
    <extra_dhcp_opts quantum:type="list"/>
    <device_owner>network:router_interface</device_owner>
    <mac_address>fa:16:3e:23:fd:d7</mac_address>
    <fixed_ips>
        <fixed_ip>
            <subnet_id>a0304c3a-4f08-4c43-88af-d796509c97d2</subnet_id>
            <ip_address>10.0.0.1</ip_address>
        </fixed_ip>
    </fixed_ips>
    <id>46d4bfb9-b26e-41f3-bd2e-e6dcc1ccedb2</id>
    <security_groups quantum:type="list"/>
    <device_id>5e3898d7-11be-483e-9732-b2f5eccd2b2e</device_id>
</port>

This operation does not accept a request body.

PUT
/v2.0/ports/​{port_id}​
Update port

Updates a specified port.

 

You can update information for a port, such as its symbolic name and associated IPs. When you update IPs for a port, any previously associated IPs are removed, returned to the respective subnets allocation pools, and replaced by the IPs specified in the body for the update request. Therefore, this operation replaces the fixed_ip attribute when it is specified in the request body. If the updated IP addresses are not valid or are already in use, the operation fails and the existing IP addresses are not removed from the port.

When you update security groups for a port and the operation succeeds, any associated security groups are removed and replaced by the security groups specified in the body for the update request. Therefore, this operation replaces the security_groups attribute when you specify it in the request body. However, if the specified security groups are not valid, the operation fails and the existing security groups are not removed from the port.

Normal response codes
200
Error response codes
badRequest (400), unauthorized (401), forbidden (403), itemNotFound (404), conflict (409)
Request parameters
Parameter Style Type Description
port_id URI csapi:UUID The UUID for the port of interest to you.
name (Optional) plain xsd:string

A symbolic name for the port.

admin_state_up (Optional) plain xsd:bool

The administrative status of the port, which is up (true) or down (false).

fixed_ips (Optional) plain xsd:dict

If you specify only a subnet ID, OpenStack Networking allocates an available IP from that subnet to the port. If you specify both a subnet ID and an IP address, OpenStack Networking tries to allocate the specified address to the port.

security_groups (Optional) plain csapi:uuid

Security groups. Specify one or more security group IDs.

Response parameters
Parameter Style Type Description
status plain xsd:string

The port status. Value is ACTIVE or DOWN.

name plain xsd:string

The port name.

allowed_address_pairs plain xsd:dict

Allowed address pairs.

ip_address plain xsd:string

IP address.

mac_address plain xsd:string

The MAC address.

admin_state_up plain xsd:bool

The administrative state of the port, which is up (true) or down (false).

network_id plain csapi:uuid

The ID of the attached network.

tenant_id plain csapi:uuid

The ID of the tenant who owns the network. Only administrative users can specify a tenant ID other than their own.

extra_dhcp_opts plain xsd:dict

Extra DHCP options.

opt_value plain xsd:string

Extra DHCP option (value).

opt_name plain xsd:string

Extra DHCP option (name).

device_owner plain xsd:string

The ID of the entity that uses this port. For example, a DHCP agent.

mac_address plain xsd:string

The MAC address of the port.

fixed_ips plain xsd:dict

IP addresses for the port. Includes the IP address and subnet ID.

subnet_id plain csapi:uuid

Subnet ID of the subnet to which the port is attached.

ip_address plain xsd:string

IP address.

id plain csapi:uuid

The ID of the port.

security_groups plain csapi:uuid

The IDs of any attached security groups.

device_id plain csapi:uuid

The ID of the device that uses this port. For example, a virtual server.

{
    "port": {
        "network_id": "a87cc70a-3e15-4acf-8205-9b711a3531b7",
        "name": "private-port",
        "admin_state_up": true
    }
}
<?xml version="1.0" encoding="UTF-8"?>
<port>
    <name>test_port_1</name>
    <network_id>a87cc70a-3e15-4acf-8205-9b711a3531b7</network_id>
</port>
{
    "port": {
        "status": "DOWN",
        "name": "private-port",
        "allowed_address_pairs": [],
        "admin_state_up": true,
        "network_id": "a87cc70a-3e15-4acf-8205-9b711a3531b7",
        "tenant_id": "d6700c0c9ffa4f1cb322cd4a1f3906fa",
        "device_owner": "",
        "mac_address": "fa:16:3e:c9:cb:f0",
        "fixed_ips": [
            {
                "subnet_id": "a0304c3a-4f08-4c43-88af-d796509c97d2",
                "ip_address": "10.0.0.2"
            }
        ],
        "id": "65c0ee9f-d634-4522-8954-51021b570b0d",
        "security_groups": [
            "f0ac4394-7e4a-4409-9701-ba8be283dbc3"
        ],
        "device_id": ""
    }
}
<?xml version='1.0' encoding='UTF-8'?>
<port xmlns="http://openstack.org/quantum/api/v2.0"
    xmlns:quantum="http://openstack.org/quantum/api/v2.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <status>DOWN</status>
    <name>test_port_1</name>
    <allowed_address_pairs quantum:type="list"/>
    <admin_state_up quantum:type="bool">True</admin_state_up>
    <network_id>a87cc70a-3e15-4acf-8205-9b711a3531b7</network_id>
    <tenant_id>d6700c0c9ffa4f1cb322cd4a1f3906fa</tenant_id>
    <device_owner/>
    <mac_address>fa:16:3e:09:e3:47</mac_address>
    <fixed_ips>
        <fixed_ip>
            <subnet_id>a0304c3a-4f08-4c43-88af-d796509c97d2</subnet_id>
            <ip_address>10.0.0.4</ip_address>
        </fixed_ip>
    </fixed_ips>
    <id>8021790b-4bfd-46ab-bcc7-0ef2f73bff43</id>
    <security_groups>
        <security_group>f0ac4394-7e4a-4409-9701-ba8be283dbc3</security_group>
    </security_groups>
    <device_id/>
</port>
DELETE
/v2.0/ports/​{port_id}​
Delete port

Deletes a specified port.

 

Any IP addresses that are associated with the port are returned to the respective subnets allocation pools.

Normal response codes
204
Error response codes
unauthorized (401), forbidden (403), itemNotFound (404)
Request parameters
Parameter Style Type Description
port_id URI csapi:UUID The UUID for the port of interest to you.

This operation does not accept a request body and does not return a response body.

Networking API v2.0 extensions

Extensions

List available Networking API v2.0 extensions and show details for a specified extension.

GET
/v2.0/extensions
List extensions

Lists available Networking API extensions.

 
Normal response codes
200, 203
Error response codes
computeFault (400, 500, …)
Response parameters
Parameter Style Type Description
next (Optional) plain xsd:anyURI Moves to the next item in the list.
previous (Optional) plain xsd:anyURI Moves to the previous item in the list.
{
    "extensions": [
        {
            "updated": "2013-01-20T00:00:00-00:00",
            "name": "Neutron Service Type Management",
            "links": [],
            "namespace": "http://docs.openstack.org/ext/neutron/service-type/api/v1.0",
            "alias": "service-type",
            "description": "API for retrieving service providers for Neutron advanced services"
        },
        {
            "updated": "2012-10-05T10:00:00-00:00",
            "name": "security-group",
            "links": [],
            "namespace": "http://docs.openstack.org/ext/securitygroups/api/v2.0",
            "alias": "security-group",
            "description": "The security groups extension."
        },
        {
            "updated": "2013-02-07T10:00:00-00:00",
            "name": "L3 Agent Scheduler",
            "links": [],
            "namespace": "http://docs.openstack.org/ext/l3_agent_scheduler/api/v1.0",
            "alias": "l3_agent_scheduler",
            "description": "Schedule routers among l3 agents"
        },
        {
            "updated": "2013-02-07T10:00:00-00:00",
            "name": "Loadbalancer Agent Scheduler",
            "links": [],
            "namespace": "http://docs.openstack.org/ext/lbaas_agent_scheduler/api/v1.0",
            "alias": "lbaas_agent_scheduler",
            "description": "Schedule pools among lbaas agents"
        },
        {
            "updated": "2013-03-28T10:00:00-00:00",
            "name": "Neutron L3 Configurable external gateway mode",
            "links": [],
            "namespace": "http://docs.openstack.org/ext/neutron/ext-gw-mode/api/v1.0",
            "alias": "ext-gw-mode",
            "description": "Extension of the router abstraction for specifying whether SNAT should occur on the external gateway"
        },
        {
            "updated": "2014-02-03T10:00:00-00:00",
            "name": "Port Binding",
            "links": [],
            "namespace": "http://docs.openstack.org/ext/binding/api/v1.0",
            "alias": "binding",
            "description": "Expose port bindings of a virtual port to external application"
        },
        {
            "updated": "2012-09-07T10:00:00-00:00",
            "name": "Provider Network",
            "links": [],
            "namespace": "http://docs.openstack.org/ext/provider/api/v1.0",
            "alias": "provider",
            "description": "Expose mapping of virtual networks to physical networks"
        },
        {
            "updated": "2013-02-03T10:00:00-00:00",
            "name": "agent",
            "links": [],
            "namespace": "http://docs.openstack.org/ext/agent/api/v2.0",
            "alias": "agent",
            "description": "The agent management extension."
        },
        {
            "updated": "2012-07-29T10:00:00-00:00",
            "name": "Quota management support",
            "links": [],
            "namespace": "http://docs.openstack.org/network/ext/quotas-sets/api/v2.0",
            "alias": "quotas",
            "description": "Expose functions for quotas management per tenant"
        },
        {
            "updated": "2013-02-07T10:00:00-00:00",
            "name": "DHCP Agent Scheduler",
            "links": [],
            "namespace": "http://docs.openstack.org/ext/dhcp_agent_scheduler/api/v1.0",
            "alias": "dhcp_agent_scheduler",
            "description": "Schedule networks among dhcp agents"
        },
        {
            "updated": "2013-06-27T10:00:00-00:00",
            "name": "Multi Provider Network",
            "links": [],
            "namespace": "http://docs.openstack.org/ext/multi-provider/api/v1.0",
            "alias": "multi-provider",
            "description": "Expose mapping of virtual networks to multiple physical networks"
        },
        {
            "updated": "2013-01-14T10:00:00-00:00",
            "name": "Neutron external network",
            "links": [],
            "namespace": "http://docs.openstack.org/ext/neutron/external_net/api/v1.0",
            "alias": "external-net",
            "description": "Adds external network attribute to network resource."
        },
        {
            "updated": "2012-07-20T10:00:00-00:00",
            "name": "Neutron L3 Router",
            "links": [],
            "namespace": "http://docs.openstack.org/ext/neutron/router/api/v1.0",
            "alias": "router",
            "description": "Router abstraction for basic L3 forwarding between L2 Neutron networks and access to external networks via a NAT gateway."
        },
        {
            "updated": "2013-07-23T10:00:00-00:00",
            "name": "Allowed Address Pairs",
            "links": [],
            "namespace": "http://docs.openstack.org/ext/allowedaddresspairs/api/v2.0",
            "alias": "allowed-address-pairs",
            "description": "Provides allowed address pairs"
        },
        {
            "updated": "2013-03-17T12:00:00-00:00",
            "name": "Neutron Extra DHCP opts",
            "links": [],
            "namespace": "http://docs.openstack.org/ext/neutron/extra_dhcp_opt/api/v1.0",
            "alias": "extra_dhcp_opt",
            "description": "Extra options configuration for DHCP. For example PXE boot options to DHCP clients can be specified (e.g. tftp-server, server-ip-address, bootfile-name)"
        },
        {
            "updated": "2012-10-07T10:00:00-00:00",
            "name": "LoadBalancing service",
            "links": [],
            "namespace": "http://wiki.openstack.org/neutron/LBaaS/API_1.0",
            "alias": "lbaas",
            "description": "Extension for LoadBalancing service"
        },
        {
            "updated": "2013-02-01T10:00:00-00:00",
            "name": "Neutron Extra Route",
            "links": [],
            "namespace": "http://docs.openstack.org/ext/neutron/extraroutes/api/v1.0",
            "alias": "extraroute",
            "description": "Extra routes configuration for L3 router"
        }
    ]
}
<?xml version='1.0' encoding='UTF-8'?>
<extensions xmlns="http://openstack.org/quantum/api/v2.0"
    xmlns:quantum="http://openstack.org/quantum/api/v2.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <extension>
        <updated>2013-01-20T00:00:00-00:00</updated>
        <name>Neutron Service Type Management</name>
        <links quantum:type="list"/>
        <namespace>http://docs.openstack.org/ext/neutron/service-type/api/v1.0</namespace>
        <alias>service-type</alias>
        <description>API for retrieving service providers for Neutron
            advanced services</description>
    </extension>
    <extension>
        <updated>2012-10-05T10:00:00-00:00</updated>
        <name>security-group</name>
        <links quantum:type="list"/>
        <namespace>http://docs.openstack.org/ext/securitygroups/api/v2.0</namespace>
        <alias>security-group</alias>
        <description>The security groups extension.</description>
    </extension>
    <extension>
        <updated>2013-02-07T10:00:00-00:00</updated>
        <name>L3 Agent Scheduler</name>
        <links quantum:type="list"/>
        <namespace>http://docs.openstack.org/ext/l3_agent_scheduler/api/v1.0</namespace>
        <alias>l3_agent_scheduler</alias>
        <description>Schedule routers among l3 agents</description>
    </extension>
    <extension>
        <updated>2013-02-07T10:00:00-00:00</updated>
        <name>Loadbalancer Agent Scheduler</name>
        <links quantum:type="list"/>
        <namespace>http://docs.openstack.org/ext/lbaas_agent_scheduler/api/v1.0</namespace>
        <alias>lbaas_agent_scheduler</alias>
        <description>Schedule pools among lbaas agents</description>
    </extension>
    <extension>
        <updated>2013-03-28T10:00:00-00:00</updated>
        <name>Neutron L3 Configurable external gateway mode</name>
        <links quantum:type="list"/>
        <namespace>http://docs.openstack.org/ext/neutron/ext-gw-mode/api/v1.0</namespace>
        <alias>ext-gw-mode</alias>
        <description>Extension of the router abstraction for
            specifying whether SNAT should occur on the external
            gateway</description>
    </extension>
    <extension>
        <updated>2014-02-03T10:00:00-00:00</updated>
        <name>Port Binding</name>
        <links quantum:type="list"/>
        <namespace>http://docs.openstack.org/ext/binding/api/v1.0</namespace>
        <alias>binding</alias>
        <description>Expose port bindings of a virtual port to
            external application</description>
    </extension>
    <extension>
        <updated>2012-09-07T10:00:00-00:00</updated>
        <name>Provider Network</name>
        <links quantum:type="list"/>
        <namespace>http://docs.openstack.org/ext/provider/api/v1.0</namespace>
        <alias>provider</alias>
        <description>Expose mapping of virtual networks to physical
            networks</description>
    </extension>
    <extension>
        <updated>2013-02-03T10:00:00-00:00</updated>
        <name>agent</name>
        <links quantum:type="list"/>
        <namespace>http://docs.openstack.org/ext/agent/api/v2.0</namespace>
        <alias>agent</alias>
        <description>The agent management extension.</description>
    </extension>
    <extension>
        <updated>2012-07-29T10:00:00-00:00</updated>
        <name>Quota management support</name>
        <links quantum:type="list"/>
        <namespace>http://docs.openstack.org/network/ext/quotas-sets/api/v2.0</namespace>
        <alias>quotas</alias>
        <description>Expose functions for quotas management per
            tenant</description>
    </extension>
    <extension>
        <updated>2013-02-07T10:00:00-00:00</updated>
        <name>DHCP Agent Scheduler</name>
        <links quantum:type="list"/>
        <namespace>http://docs.openstack.org/ext/dhcp_agent_scheduler/api/v1.0</namespace>
        <alias>dhcp_agent_scheduler</alias>
        <description>Schedule networks among dhcp agents</description>
    </extension>
    <extension>
        <updated>2013-06-27T10:00:00-00:00</updated>
        <name>Multi Provider Network</name>
        <links quantum:type="list"/>
        <namespace>http://docs.openstack.org/ext/multi-provider/api/v1.0</namespace>
        <alias>multi-provider</alias>
        <description>Expose mapping of virtual networks to multiple
            physical networks</description>
    </extension>
    <extension>
        <updated>2013-01-14T10:00:00-00:00</updated>
        <name>Neutron external network</name>
        <links quantum:type="list"/>
        <namespace>http://docs.openstack.org/ext/neutron/external_net/api/v1.0</namespace>
        <alias>external-net</alias>
        <description>Adds external network attribute to network
            resource.</description>
    </extension>
    <extension>
        <updated>2012-07-20T10:00:00-00:00</updated>
        <name>Neutron L3 Router</name>
        <links quantum:type="list"/>
        <namespace>http://docs.openstack.org/ext/neutron/router/api/v1.0</namespace>
        <alias>router</alias>
        <description>Router abstraction for basic L3 forwarding
            between L2 Neutron networks and access to external
            networks via a NAT gateway.</description>
    </extension>
    <extension>
        <updated>2013-07-23T10:00:00-00:00</updated>
        <name>Allowed Address Pairs</name>
        <links quantum:type="list"/>
        <namespace>http://docs.openstack.org/ext/allowedaddresspairs/api/v2.0</namespace>
        <alias>allowed-address-pairs</alias>
        <description>Provides allowed address pairs</description>
    </extension>
    <extension>
        <updated>2013-03-17T12:00:00-00:00</updated>
        <name>Neutron Extra DHCP opts</name>
        <links quantum:type="list"/>
        <namespace>http://docs.openstack.org/ext/neutron/extra_dhcp_opt/api/v1.0</namespace>
        <alias>extra_dhcp_opt</alias>
        <description>Extra options configuration for DHCP. For example
            PXE boot options to DHCP clients can be specified (e.g.
            tftp-server, server-ip-address,
            bootfile-name)</description>
    </extension>
    <extension>
        <updated>2012-10-07T10:00:00-00:00</updated>
        <name>LoadBalancing service</name>
        <links quantum:type="list"/>
        <namespace>http://wiki.openstack.org/neutron/LBaaS/API_1.0</namespace>
        <alias>lbaas</alias>
        <description>Extension for LoadBalancing service</description>
    </extension>
    <extension>
        <updated>2013-02-01T10:00:00-00:00</updated>
        <name>Neutron Extra Route</name>
        <links quantum:type="list"/>
        <namespace>http://docs.openstack.org/ext/neutron/extraroutes/api/v1.0</namespace>
        <alias>extraroute</alias>
        <description>Extra routes configuration for L3
            router</description>
    </extension>
</extensions>

This operation does not accept a request body.

GET
/v2.0/extensions/​{alias}​
Get extension details

Gets detailed information for a specified extension.

 
Normal response codes
200, 203
Error response codes
computeFault (400, 500, …)
Request parameters
Parameter Style Type Description
alias URI xsd:string
{
    "extension": {
        "updated": "2013-02-03T10:00:00-00:00",
        "name": "agent",
        "links": [],
        "namespace": "http://docs.openstack.org/ext/agent/api/v2.0",
        "alias": "agent",
        "description": "The agent management extension."
    }
}
<?xml version='1.0' encoding='UTF-8'?>
<extension xmlns="http://openstack.org/quantum/api/v2.0"
    xmlns:quantum="http://openstack.org/quantum/api/v2.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <updated>2013-02-03T10:00:00-00:00</updated>
    <name>agent</name>
    <links quantum:type="list"/>
    <namespace>http://docs.openstack.org/ext/agent/api/v2.0</namespace>
    <alias>agent</alias>
    <description>The agent management extension.</description>
</extension>

This operation does not accept a request body.

Quotas extension (quotas)

List, show information for, update, and reset quotas.

GET
/v2.0/quotas
Show quota

Shows quotas for a specified tenant.

 
Normal response codes
200
Error response codes
unauthorized (401), forbidden (403)
{
    "quota": {
        "subnet": 10,
        "router": 10,
        "port": 50,
        "network": 10,
        "floatingip": 50
    }
}

This operation does not accept a request body.

PUT
/v2.0/quotas/​{tenant_id}​
Update quota

Updates quotas for a specified tenant. Use when non-default quotas are desired.

 
Normal response codes
200
Error response codes
unauthorized (401), forbidden (403)
Request parameters
Parameter Style Type Description
tenant_id URI csapi:uuid The UUID for the tenant which is target of API.
{
    "quota": {
        "subnet": 40,
        "router": 50,
        "network": 10,
        "floatingip": 30,
        "port": 30
    }
}
{
    "quota": {
        "subnet": 40,
        "router": 50,
        "port": 30,
        "network": 10,
        "floatingip": 30
    }
}
DELETE
/v2.0/quotas/​{tenant_id}​
Reset quota

Resets quotas to default values for a specified tenant.

 
Normal response codes
204
Error response codes
unauthorized (401), forbidden (403)
Request parameters
Parameter Style Type Description
tenant_id URI csapi:uuid The UUID for the tenant which is target of API.

This operation does not accept a request body and does not return a response body.

Networks provider extended attributes (networks)

List, create, show information for, update, and delete networks.

GET
/v2.0/networks
List networks

Lists networks that are accessible to the tenant who submits the request.

 
Normal response codes
200
Response parameters
Parameter Style Type Description
admin_state_up plain xsd:bool

The administrative state of the network, which is up (true) or down (false).

id plain csapi:uuid

The network ID.

name plain xsd:string

The network name.

shared plain xsd:bool

Indicates whether this network is shared across all tenants.

status plain xsd:string

The network status.

subnets plain xsd:dict

The associated subnets.

tenant_id plain csapi:uuid

The tenant ID.

router:external plain xsd:bool

Indicates whether this network is externally accessible.

provider:physical_network (Optional) plain xsd:string

The physical network where this network object is implemented. The Networking API v2.0 does not provide a way to list available physical networks. For example, the Open vSwitch plug-in configuration file defines a symbolic name that maps to specific bridges on each Compute host.

provider:network_type (Optional) plain xsd:string

The type of physical network that maps to this network resource. Examples are flat, vlan, vxlan, and gre.

provider:segmentation_id (Optional) plain xsd:string

An isolated segment on the physical network. The network_type attribute defines the segmentation model. For example, if the network_type value is vlan, this ID is a vlan identifier. If the network_type value is gre, this ID is a gre key.

{
    "network": {
        "status": "ACTIVE",
        "subnets": [
            "54d6f61d-db07-451c-9ab3-b9609b6b6f0b"
        ],
        "name": "private-network",
        "provider:physical_network": null,
        "admin_state_up": true,
        "tenant_id": "4fd44f30292945e481c7b8a0c8908869",
        "provider:network_type": "local",
        "router:external": true,
        "shared": true,
        "id": "d32019d3-bc6e-4319-9c1d-6722fc136a22",
        "provider:segmentation_id": null
    }
}
<?xml version='1.0' encoding='UTF-8'?>
<network xmlns="http://openstack.org/quantum/api/v2.0"
    xmlns:provider="http://docs.openstack.org/ext/provider/api/v1.0"
    xmlns:quantum="http://openstack.org/quantum/api/v2.0"
    xmlns:router="http://docs.openstack.org/ext/neutron/router/api/v1.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <status>ACTIVE</status>
    <subnets>
        <subnet>54d6f61d-db07-451c-9ab3-b9609b6b6f0b</subnet>
    </subnets>
    <name>private-network</name>
    <provider:physical_network xsi:nil="true"/>
    <admin_state_up quantum:type="bool">True</admin_state_up>
    <tenant_id>4fd44f30292945e481c7b8a0c8908869</tenant_id>
    <provider:network_type>local</provider:network_type>
    <router:external quantum:type="bool">True</router:external>
    <shared quantum:type="bool">True</shared>
    <id>d32019d3-bc6e-4319-9c1d-6722fc136a22</id>
    <provider:segmentation_id xsi:nil="true"/>
</network>

This operation does not accept a request body.

POST
/v2.0/networks
Create network

Creates a network.

 
Normal response codes
201
Request parameters
Parameter Style Type Description
admin_state_up (Optional) plain xsd:bool

The administrative state of the network, which is up (true) or down (false).

name (Optional) plain xsd:string The network name.
shared (Optional) plain xsd:bool

Admin-only. Indicates whether this network is shared across all tenants.

tenant_id (Optional) plain csapi:uuid

The ID of the tenant who owns the network. Only administrative users can specify a tenant ID other than their own. You cannot change this value through authorization policies.

router:external (Optional) plain xsd:bool

Indicates whether this network is externally accessible.

provider:physical_network (Optional) plain xsd:string

The physical network where this network object is implemented. The Networking API v2.0 does not provide a way to list available physical networks. For example, the Open vSwitch plug-in configuration file defines a symbolic name that maps to specific bridges on each Compute host.

provider:network_type (Optional) plain xsd:string

The type of physical network that maps to this network resource. Examples are flat, vlan, vxlan, and gre.

provider:segmentation_id (Optional) plain xsd:string

An isolated segment on the physical network. The network_type attribute defines the segmentation model. For example, if the network_type value is vlan, this ID is a vlan identifier. If the network_type value is gre, this ID is a gre key.

Response parameters
Parameter Style Type Description
admin_state_up plain xsd:bool

The administrative state of the network, which is up (true) or down (false).

id plain csapi:uuid

The network ID.

name plain xsd:string

The network name.

shared plain xsd:bool

Indicates whether this network is shared across all tenants.

status plain xsd:string

The network status.

subnets plain xsd:dict

The associated subnets.

tenant_id plain csapi:uuid

The tenant ID.

router:external plain xsd:bool

Indicates whether this network is externally accessible.

provider:physical_network (Optional) plain xsd:string

The physical network where this network object is implemented. The Networking API v2.0 does not provide a way to list available physical networks. For example, the Open vSwitch plug-in configuration file defines a symbolic name that maps to specific bridges on each Compute host.

provider:network_type (Optional) plain xsd:string

The type of physical network that maps to this network resource. Examples are flat, vlan, vxlan, and gre.

provider:segmentation_id (Optional) plain xsd:string

An isolated segment on the physical network. The network_type attribute defines the segmentation model. For example, if the network_type value is vlan, this ID is a vlan identifier. If the network_type value is gre, this ID is a gre key.

{
    "network": {
        "name": "sample_network",
        "admin_state_up": true
    }
}
<?xml version="1.0" encoding="UTF-8"?>
<network>
    <name>sample_network2</name>
</network>
{
    "network": {
        "status": "ACTIVE",
        "subnets": [],
        "name": "net1",
        "admin_state_up": true,
        "tenant_id": "9bacb3c5d39d41a79512987f338cf177",
        "router:external": false,
        "segments": [
            {
                "provider:segmentation_id": 2,
                "provider:physical_network": "8bab8453-1bc9-45af-8c70-f83aa9b50453",
                "provider:network_type": "vlan"
            },
            {
                "provider:segmentation_id": null,
                "provider:physical_network": "8bab8453-1bc9-45af-8c70-f83aa9b50453",
                "provider:network_type": "stt"
            }
        ],
        "shared": false,
        "id": "4e8e5957-649f-477b-9e5b-f1f75b21c03c"
    }
}
<?xml version='1.0' encoding='UTF-8'?>
<network xmlns="http://openstack.org/quantum/api/v2.0"
    xmlns:provider="http://docs.openstack.org/ext/provider/api/v1.0"
    xmlns:quantum="http://openstack.org/quantum/api/v2.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <status>ACTIVE</status>
    <subnets quantum:type="list"/>
    <name>sample_network2</name>
    <provider:physical_network xsi:nil="true"/>
    <admin_state_up quantum:type="bool">True</admin_state_up>
    <tenant_id>4fd44f30292945e481c7b8a0c8908869</tenant_id>
    <provider:network_type>local</provider:network_type>
    <shared quantum:type="bool">False</shared>
    <id>c220b026-ece1-4ead-873f-83537f4c9f92</id>
    <provider:segmentation_id xsi:nil="true"/>
</network>
GET
/v2.0/networks/​{network_id}​
Show network details

Shows details for a specified network.

 
Normal response codes
200
Request parameters
Parameter Style Type Description
network_id URI csapi:UUID

The UUID for the network of interest to you.

Response parameters
Parameter Style Type Description
admin_state_up plain xsd:bool

The administrative state of the network, which is up (true) or down (false).

id plain csapi:uuid

The network ID.

name plain xsd:string

The network name.

shared plain xsd:bool

Indicates whether this network is shared across all tenants.

status plain xsd:string

The network status.

subnets plain xsd:dict

The associated subnets.

tenant_id plain csapi:uuid

The tenant ID.

router:external plain xsd:bool

Indicates whether this network is externally accessible.

provider:physical_network (Optional) plain xsd:string

The physical network where this network object is implemented. The Networking API v2.0 does not provide a way to list available physical networks. For example, the Open vSwitch plug-in configuration file defines a symbolic name that maps to specific bridges on each Compute host.

provider:network_type (Optional) plain xsd:string

The type of physical network that maps to this network resource. Examples are flat, vlan, vxlan, and gre.

provider:segmentation_id (Optional) plain xsd:string

An isolated segment on the physical network. The network_type attribute defines the segmentation model. For example, if the network_type value is vlan, this ID is a vlan identifier. If the network_type value is gre, this ID is a gre key.

{
    "network": {
        "status": "ACTIVE",
        "subnets": [
            "54d6f61d-db07-451c-9ab3-b9609b6b6f0b"
        ],
        "name": "private-network",
        "provider:physical_network": null,
        "admin_state_up": true,
        "tenant_id": "4fd44f30292945e481c7b8a0c8908869",
        "provider:network_type": "local",
        "router:external": true,
        "shared": true,
        "id": "d32019d3-bc6e-4319-9c1d-6722fc136a22",
        "provider:segmentation_id": null
    }
}
<?xml version='1.0' encoding='UTF-8'?>
<network xmlns="http://openstack.org/quantum/api/v2.0"
    xmlns:provider="http://docs.openstack.org/ext/provider/api/v1.0"
    xmlns:quantum="http://openstack.org/quantum/api/v2.0"
    xmlns:router="http://docs.openstack.org/ext/neutron/router/api/v1.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <status>ACTIVE</status>
    <subnets>
        <subnet>54d6f61d-db07-451c-9ab3-b9609b6b6f0b</subnet>
    </subnets>
    <name>private-network</name>
    <provider:physical_network xsi:nil="true"/>
    <admin_state_up quantum:type="bool">True</admin_state_up>
    <tenant_id>4fd44f30292945e481c7b8a0c8908869</tenant_id>
    <provider:network_type>local</provider:network_type>
    <router:external quantum:type="bool">True</router:external>
    <shared quantum:type="bool">True</shared>
    <id>d32019d3-bc6e-4319-9c1d-6722fc136a22</id>
    <provider:segmentation_id xsi:nil="true"/>
</network>

This operation does not accept a request body.

PUT
/v2.0/networks/​{network_id}​
Update network

Updates a specified network.

 
Normal response codes
201
Request parameters
Parameter Style Type Description
network_id URI csapi:UUID

The UUID for the network of interest to you.

admin_state_up (Optional) plain xsd:bool

The administrative state of the network, which is up (true) or down (false).

name (Optional) plain xsd:string The network name.
shared (Optional) plain xsd:bool

Admin-only. Indicates whether this network is shared across all tenants.

tenant_id (Optional) plain csapi:uuid

The ID of the tenant who owns the network. Only administrative users can specify a tenant ID other than their own. You cannot change this value through authorization policies.

router:external (Optional) plain xsd:bool

Indicates whether this network is externally accessible.

provider:physical_network (Optional) plain xsd:string

The physical network where this network object is implemented. The Networking API v2.0 does not provide a way to list available physical networks. For example, the Open vSwitch plug-in configuration file defines a symbolic name that maps to specific bridges on each Compute host.

provider:network_type (Optional) plain xsd:string

The type of physical network that maps to this network resource. Examples are flat, vlan, vxlan, and gre.

provider:segmentation_id (Optional) plain xsd:string

An isolated segment on the physical network. The network_type attribute defines the segmentation model. For example, if the network_type value is vlan, this ID is a vlan identifier. If the network_type value is gre, this ID is a gre key.

Response parameters
Parameter Style Type Description
admin_state_up plain xsd:bool

The administrative state of the network, which is up (true) or down (false).

id plain csapi:uuid

The network ID.

name plain xsd:string

The network name.

shared plain xsd:bool

Indicates whether this network is shared across all tenants.

status plain xsd:string

The network status.

subnets plain xsd:dict

The associated subnets.

tenant_id plain csapi:uuid

The tenant ID.

router:external plain xsd:bool

Indicates whether this network is externally accessible.

provider:physical_network (Optional) plain xsd:string

The physical network where this network object is implemented. The Networking API v2.0 does not provide a way to list available physical networks. For example, the Open vSwitch plug-in configuration file defines a symbolic name that maps to specific bridges on each Compute host.

provider:network_type (Optional) plain xsd:string

The type of physical network that maps to this network resource. Examples are flat, vlan, vxlan, and gre.

provider:segmentation_id (Optional) plain xsd:string

An isolated segment on the physical network. The network_type attribute defines the segmentation model. For example, if the network_type value is vlan, this ID is a vlan identifier. If the network_type value is gre, this ID is a gre key.

{
    "network": {
        "name": "sample_network_5_updated"
    }
}
<?xml version="1.0" encoding="UTF-8"?>
<network xmlns="http://openstack.org/quantum/api/v2.0"
    xmlns:provider="http://docs.openstack.org/ext/provider/api/v1.0"
    xmlns:quantum="http://openstack.org/quantum/api/v2.0"
    xmlns:router="http://docs.openstack.org/ext/quantum/router/api/v1.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <name>sample-network-4-updated</name>
</network>
{
    "network": {
        "status": "ACTIVE",
        "subnets": [],
        "name": "sample_network_5_updated",
        "provider:physical_network": null,
        "admin_state_up": true,
        "tenant_id": "4fd44f30292945e481c7b8a0c8908869",
        "provider:network_type": "local",
        "router:external": false,
        "shared": false,
        "id": "1f370095-98f6-4079-be64-6d3d4a6adcc6",
        "provider:segmentation_id": null
    }
}
<?xml version='1.0' encoding='UTF-8'?>
<network xmlns="http://openstack.org/quantum/api/v2.0"
    xmlns:provider="http://docs.openstack.org/ext/provider/api/v1.0"
    xmlns:quantum="http://openstack.org/quantum/api/v2.0"
    xmlns:router="http://docs.openstack.org/ext/neutron/router/api/v1.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <status>ACTIVE</status>
    <subnets quantum:type="list"/>
    <name>sample-network-4-updated</name>
    <provider:physical_network xsi:nil="true"/>
    <admin_state_up quantum:type="bool">True</admin_state_up>
    <tenant_id>4fd44f30292945e481c7b8a0c8908869</tenant_id>
    <provider:network_type>local</provider:network_type>
    <router:external quantum:type="bool">False</router:external>
    <shared quantum:type="bool">False</shared>
    <id>af374017-c9ae-4a1d-b799-ab73111476e2</id>
    <provider:segmentation_id xsi:nil="true"/>
</network>
DELETE
/v2.0/networks/​{network_id}​
Delete network

Deletes a specified network.

 
Request parameters
Parameter Style Type Description
network_id URI csapi:UUID

The UUID for the network of interest to you.

This operation does not accept a request body and does not return a response body.

Networks multiple provider extension (networks)

Enables administrative users to define multiple physical bindings for an OpenStack Networking network and list or show details for networks with multiple physical bindings.

You cannot update any provider attributes. If you try to do so, an error occurs.

To delete a network with multiple physical bindings, issue a normal delete network request.

To define multiple physical bindings for a network, include a segments list in the request body of a POST /v2.0/networks request. Each element in the segments list has the same structure as the provider network attributes. These attributes are provider:network_type, provider:physical_network, and provider:segmentation_id. The validation rules for these attributes are the same as for the Networks provider extended attributes. You cannot use both extensions at the same time.

The NSX and ML2 plug-ins support this extension. With the ML2 plug-in, you can specify multiple VLANs for a specified network, a VXLAN tunnel ID, and a VLAN.

GET
/v2.0/networks
List networks

Lists networks that are accessible to the tenant who submits the request. Networks with multiple segments include the segments list in the response.

 
Normal response codes
200
Response parameters
Parameter Style Type Description
admin_state_up plain xsd:bool

The administrative state of the network, which is up (true) or down (false).

id plain csapi:uuid

The network ID.

name plain xsd:string

The network name.

shared plain xsd:bool

Indicates whether this network is shared across all tenants.

status plain xsd:string

The network status.

subnets plain xsd:dict

The associated subnets.

tenant_id plain csapi:uuid

The tenant ID.

router:external plain xsd:bool

Indicates whether this network is externally accessible.

segments plain xsd:string

A segments object that defines one or more provider segments.

provider:physical_network (Optional) plain xsd:string

The physical network where this network object is implemented. The Networking API v2.0 does not provide a way to list available physical networks. For example, the Open vSwitch plug-in configuration file defines a symbolic name that maps to specific bridges on each Compute host.

provider:network_type (Optional) plain xsd:string

The type of physical network that maps to this network resource. Examples are flat, vlan, vxlan, and gre.

provider:segmentation_id (Optional) plain xsd:string

An isolated segment on the physical network. The network_type attribute defines the segmentation model. For example, if the network_type value is vlan, this ID is a vlan identifier. If the network_type value is gre, this ID is a gre key.

{
    "networks": [
        {
            "status": "ACTIVE",
            "subnets": [],
            "name": "net1",
            "admin_state_up": true,
            "tenant_id": "9bacb3c5d39d41a79512987f338cf177",
            "segments": [
                {
                    "provider:segmentation_id": 2,
                    "provider:physical_network": "8bab8453-1bc9-45af-8c70-f83aa9b50453",
                    "provider:network_type": "vlan"
                },
                {
                    "provider:segmentation_id": 0,
                    "provider:physical_network": "8bab8453-1bc9-45af-8c70-f83aa9b50453",
                    "provider:network_type": "stt"
                }
            ],
            "router:external": false,
            "shared": false,
            "id": "4e8e5957-649f-477b-9e5b-f1f75b21c03c"
        },
        {
            "status": "ACTIVE",
            "subnets": [
                "08eae331-0402-425a-923c-34f7cfe39c1b"
            ],
            "name": "private",
            "provider:physical_network": null,
            "router:external": true,
            "admin_state_up": true,
            "tenant_id": "26a7980765d0414dbc1fc1f88cdb7e6e",
            "provider:network_type": "local",
            "shared": true,
            "id": "db193ab3-96e3-4cb3-8fc5-05f4296d0324",
            "provider:segmentation_id": null
        }
    ]
}

This operation does not accept a request body.

POST
/v2.0/networks
Create network with multiple segment mappings

Creates a network with multiple segment mappings.

 
Normal response codes
201
Request parameters
Parameter Style Type Description
admin_state_up (Optional) plain xsd:bool

The administrative state of the network, which is up (true) or down (false).

name (Optional) plain xsd:string The network name.
shared (Optional) plain xsd:bool

Admin-only. Indicates whether this network is shared across all tenants.

tenant_id (Optional) plain csapi:uuid

The ID of the tenant who owns the network. Only administrative users can specify a tenant ID other than their own. You cannot change this value through authorization policies.

router:external (Optional) plain xsd:bool

Indicates whether this network is externally accessible.

segments plain xsd:string

A segments object that defines one or more provider segments.

provider:physical_network (Optional) plain xsd:string

The physical network where this network object is implemented. The Networking API v2.0 does not provide a way to list available physical networks. For example, the Open vSwitch plug-in configuration file defines a symbolic name that maps to specific bridges on each Compute host.

provider:network_type (Optional) plain xsd:string

The type of physical network that maps to this network resource. Examples are flat, vlan, vxlan, and gre.

provider:segmentation_id (Optional) plain xsd:string

An isolated segment on the physical network. The network_type attribute defines the segmentation model. For example, if the network_type value is vlan, this ID is a vlan identifier. If the network_type value is gre, this ID is a gre key.

Response parameters
Parameter Style Type Description
admin_state_up plain xsd:bool

The administrative state of the network, which is up (true) or down (false).

id plain csapi:uuid

The network ID.

name plain xsd:string

The network name.

shared plain xsd:bool

Indicates whether this network is shared across all tenants.

status plain xsd:string

The network status.

subnets plain xsd:dict

The associated subnets.

tenant_id plain csapi:uuid

The tenant ID.

router:external plain xsd:bool

Indicates whether this network is externally accessible.

provider:physical_network (Optional) plain xsd:string

The physical network where this network object is implemented. The Networking API v2.0 does not provide a way to list available physical networks. For example, the Open vSwitch plug-in configuration file defines a symbolic name that maps to specific bridges on each Compute host.

provider:network_type (Optional) plain xsd:string

The type of physical network that maps to this network resource. Examples are flat, vlan, vxlan, and gre.

provider:segmentation_id (Optional) plain xsd:string

An isolated segment on the physical network. The network_type attribute defines the segmentation model. For example, if the network_type value is vlan, this ID is a vlan identifier. If the network_type value is gre, this ID is a gre key.

{
    "network": {
        "segments": [
            {
                "provider:segmentation_id": "2",
                "provider:physical_network": "8bab8453-1bc9-45af-8c70-f83aa9b50453",
                "provider:network_type": "vlan"
            },
            {
                "provider:physical_network": "8bab8453-1bc9-45af-8c70-f83aa9b50453",
                "provider:network_type": "stt"
            }
        ],
        "name": "net1",
        "admin_state_up": true
    }
}
{
    "network": {
        "status": "ACTIVE",
        "subnets": [],
        "name": "net1",
        "admin_state_up": true,
        "tenant_id": "9bacb3c5d39d41a79512987f338cf177",
        "segments": [
            {
                "provider:segmentation_id": 2,
                "provider:physical_network": "8bab8453-1bc9-45af-8c70-f83aa9b50453",
                "provider:network_type": "vlan"
            },
            {
                "provider:segmentation_id": null,
                "provider:physical_network": "8bab8453-1bc9-45af-8c70-f83aa9b50453",
                "provider:network_type": "stt"
            }
        ],
        "shared": false,
        "id": "4e8e5957-649f-477b-9e5b-f1f75b21c03c"
    }
}
GET
/v2.0/networks/​{network_id}​
Show details for a network with multiple segments

Shows details for a specified network with multiple segments.

 
Normal response codes
200
Request parameters
Parameter Style Type Description
network_id URI csapi:UUID

The UUID for the network of interest to you.

Response parameters
Parameter Style Type Description
admin_state_up plain xsd:bool

The administrative state of the network, which is up (true) or down (false).

id plain csapi:uuid

The network ID.

name plain xsd:string

The network name.

shared plain xsd:bool

Indicates whether this network is shared across all tenants.

status plain xsd:string

The network status.

subnets plain xsd:dict

The associated subnets.

tenant_id plain csapi:uuid

The tenant ID.

router:external plain xsd:bool

Indicates whether this network is externally accessible.

segments plain xsd:string

A segments object that defines one or more provider segments.

provider:physical_network (Optional) plain xsd:string

The physical network where this network object is implemented. The Networking API v2.0 does not provide a way to list available physical networks. For example, the Open vSwitch plug-in configuration file defines a symbolic name that maps to specific bridges on each Compute host.

provider:network_type (Optional) plain xsd:string

The type of physical network that maps to this network resource. Examples are flat, vlan, vxlan, and gre.

provider:segmentation_id (Optional) plain xsd:string

An isolated segment on the physical network. The network_type attribute defines the segmentation model. For example, if the network_type value is vlan, this ID is a vlan identifier. If the network_type value is gre, this ID is a gre key.

{
    "network": {
        "status": "ACTIVE",
        "subnets": [],
        "name": "net1",
        "admin_state_up": true,
        "tenant_id": "9bacb3c5d39d41a79512987f338cf177",
        "segments": [
            {
                "provider:segmentation_id": 2,
                "provider:physical_network": "8bab8453-1bc9-45af-8c70-f83aa9b50453",
                "provider:network_type": "vlan"
            },
            {
                "provider:segmentation_id": 0,
                "provider:physical_network": "8bab8453-1bc9-45af-8c70-f83aa9b50453",
                "provider:network_type": "stt"
            }
        ],
        "router:external": false,
        "shared": false,
        "id": "4e8e5957-649f-477b-9e5b-f1f75b21c03c"
    }
}

This operation does not accept a request body.

Ports binding extended attributes (ports)

List, create, show information for, and update ports.

GET
/v2.0/ports
List ports

Lists ports to which the tenant has access.

 
Normal response codes
200
Request parameters
Parameter Style Type Description
status (Optional) query xsd:string

The port status. Value is ACTIVE or DOWN.

display_name (Optional) query xsd:string

The port name.

admin_state (Optional) query xsd:bool

The administrative state of the router, which is up (true) or down (false).

network_id (Optional) query csapi:uuid

The ID of the attached network.

tenant_id (Optional) plain csapi:uuid

The ID of the tenant who owns the network. Only administrative users can specify a tenant ID other than their own. You cannot change this value through authorization policies.

device_owner (Optional) query xsd:string

The ID of the entity that uses this port. For example, a DHCP agent.

mac_address (Optional) query xsd:string

The MAC address of the port.

port_id (Optional) query csapi:uuid

The ID of the port.

security_groups (Optional) query csapi:uuid

The IDs of any attached security groups.

device_id (Optional) query csapi:uuid

The ID of the device that uses this port. For example, a virtual server.

Response parameters
Parameter Style Type Description
status plain xsd:string

The port status. Value is ACTIVE or DOWN.

name plain xsd:string

The port name.

allowed_address_pairs plain xsd:dict

Allowed address pairs.

ip_address plain xsd:string

IP address.

mac_address plain xsd:string

The MAC address.

admin_state_up plain xsd:bool

The administrative state of the port, which is up (true) or down (false).

network_id plain csapi:uuid

The ID of the attached network.

tenant_id plain csapi:uuid

The ID of the tenant who owns the network. Only administrative users can specify a tenant ID other than their own.

extra_dhcp_opts plain xsd:dict

Extra DHCP options.

opt_value plain xsd:string

Extra DHCP option (value).

opt_name plain xsd:string

Extra DHCP option (name).

device_owner plain xsd:string

The ID of the entity that uses this port. For example, a DHCP agent.

mac_address plain xsd:string

The MAC address of the port.

fixed_ips plain xsd:dict

IP addresses for the port. Includes the IP address and subnet ID.

subnet_id plain csapi:uuid

Subnet ID of the subnet to which the port is attached.

ip_address plain xsd:string

IP address.

id plain csapi:uuid

The ID of the port.

security_groups plain csapi:uuid

The IDs of any attached security groups.

device_id plain csapi:uuid

The ID of the device that uses this port. For example, a virtual server.

binding:host_id (Optional) plain csapi:uuid

The ID of the host where the port is allocated. In some cases, different implementations can run on different hosts.

binding:vif_details (Optional) plain xsd:dict

Read-only. A dictionary that enables the application to pass information about functions that the Networking API provides. To enable or disable port filtering features such as security group and anti-MAC/IP spoofing, specify port_filter: True or port_filter: False.

port_filter (Optional) plain xsd:bool

Read-only. A dictionary that enables the application to pass information about functions that the Networking API provides. To enable or disable port filtering features such as security group and anti-MAC/IP spoofing, specify port_filter: True or port_filter: False.

ovs_hybrid_plug (Optional) plain xsd:bool

Read-only. A dictionary that enables the application to pass information about functions that the Networking API provides. To enable or disable port filtering features such as security group and anti-MAC/IP spoofing, specify port_filter: True or port_filter: False.

binding:vif_type (Optional) plain xsd:string

Read-only. The vif type for the specified port.

binding:profile (Optional) plain xsd:dict

A dictionary the enables the application running on the specified host to pass and receive vif port-specific information to the plug-in.

binding:vnic_type (Optional) plain xsd:string

The vnic type that is bound to the neutron port.

In POST and PUT operations, specify a value of normal (virtual nic), direct (pci passthrough), or macvtap (virtual interface with a tap-like software interface). These values support SR-IOV PCI passthrough networking. The ML2 plug-in supports the vnic_type.

In GET operations, the binding:vnic_type extended attribute is visible to only port owners and administrative users.

{
    "ports": [
        {
            "status": "ACTIVE",
            "binding:host_id": "devstack",
            "name": "",
            "allowed_address_pairs": [],
            "admin_state_up": true,
            "network_id": "70c1db1f-b701-45bd-96e0-a313ee3430b3",
            "tenant_id": "",
            "extra_dhcp_opts": [],
            "binding:vif_details": {
                "port_filter": true,
                "ovs_hybrid_plug": true
            },
            "binding:vif_type": "ovs",
            "device_owner": "network:router_gateway",
            "mac_address": "fa:16:3e:58:42:ed",
            "binding:profile": {},
            "binding:vnic_type": "normal",
            "fixed_ips": [
                {
                    "subnet_id": "008ba151-0b8c-4a67-98b5-0d2b87666062",
                    "ip_address": "172.24.4.2"
                }
            ],
            "id": "d80b1a3b-4fc1-49f3-952e-1e2ab7081d8b",
            "security_groups": [],
            "device_id": "9ae135f4-b6e0-4dad-9e91-3c223e385824"
        },
        {
            "status": "ACTIVE",
            "binding:host_id": "devstack",
            "name": "",
            "allowed_address_pairs": [],
            "admin_state_up": true,
            "network_id": "f27aa545-cbdd-4907-b0c6-c9e8b039dcc2",
            "tenant_id": "d397de8a63f341818f198abb0966f6f3",
            "extra_dhcp_opts": [],
            "binding:vif_details": {
                "port_filter": true,
                "ovs_hybrid_plug": true
            },
            "binding:vif_type": "ovs",
            "device_owner": "network:router_interface",
            "mac_address": "fa:16:3e:bb:3c:e4",
            "binding:profile": {},
            "binding:vnic_type": "normal",
            "fixed_ips": [
                {
                    "subnet_id": "288bf4a1-51ba-43b6-9d0a-520e9005db17",
                    "ip_address": "10.0.0.1"
                }
            ],
            "id": "f71a6703-d6de-4be1-a91a-a570ede1d159",
            "security_groups": [],
            "device_id": "9ae135f4-b6e0-4dad-9e91-3c223e385824"
        }
    ]
}
<?xml version='1.0' encoding='UTF-8'?>
<ports xmlns="http://openstack.org/quantum/api/v2.0"
    xmlns:binding="http://docs.openstack.org/ext/binding/api/v1.0"
    xmlns:quantum="http://openstack.org/quantum/api/v2.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <port>
        <status>ACTIVE</status>
        <binding:host_id>devstack</binding:host_id>
        <name/>
        <allowed_address_pairs quantum:type="list"/>
        <admin_state_up quantum:type="bool">True</admin_state_up>
        <network_id>70c1db1f-b701-45bd-96e0-a313ee3430b3</network_id>
        <tenant_id/>
        <extra_dhcp_opts quantum:type="list"/>
        <binding:vif_details>
            <port_filter quantum:type="bool">True</port_filter>
            <ovs_hybrid_plug quantum:type="bool"
                >True</ovs_hybrid_plug>
        </binding:vif_details>
        <binding:vif_type>ovs</binding:vif_type>
        <device_owner>network:router_gateway</device_owner>
        <mac_address>fa:16:3e:58:42:ed</mac_address>
        <binding:profile quantum:type="dict"/>
        <binding:vnic_type>normal</binding:vnic_type>
        <fixed_ips>
            <fixed_ip>
                <subnet_id>008ba151-0b8c-4a67-98b5-0d2b87666062</subnet_id>
                <ip_address>172.24.4.2</ip_address>
            </fixed_ip>
        </fixed_ips>
        <id>d80b1a3b-4fc1-49f3-952e-1e2ab7081d8b</id>
        <security_groups quantum:type="list"/>
        <device_id>9ae135f4-b6e0-4dad-9e91-3c223e385824</device_id>
    </port>
    <port>
        <status>ACTIVE</status>
        <binding:host_id>devstack</binding:host_id>
        <name/>
        <allowed_address_pairs quantum:type="list"/>
        <admin_state_up quantum:type="bool">True</admin_state_up>
        <network_id>f27aa545-cbdd-4907-b0c6-c9e8b039dcc2</network_id>
        <tenant_id>d397de8a63f341818f198abb0966f6f3</tenant_id>
        <extra_dhcp_opts quantum:type="list"/>
        <binding:vif_details>
            <port_filter quantum:type="bool">True</port_filter>
            <ovs_hybrid_plug quantum:type="bool"
                >True</ovs_hybrid_plug>
        </binding:vif_details>
        <binding:vif_type>ovs</binding:vif_type>
        <device_owner>network:router_interface</device_owner>
        <mac_address>fa:16:3e:bb:3c:e4</mac_address>
        <binding:profile quantum:type="dict"/>
        <binding:vnic_type>normal</binding:vnic_type>
        <fixed_ips>
            <fixed_ip>
                <subnet_id>288bf4a1-51ba-43b6-9d0a-520e9005db17</subnet_id>
                <ip_address>10.0.0.1</ip_address>
            </fixed_ip>
        </fixed_ips>
        <id>f71a6703-d6de-4be1-a91a-a570ede1d159</id>
        <security_groups quantum:type="list"/>
        <device_id>9ae135f4-b6e0-4dad-9e91-3c223e385824</device_id>
    </port>
</ports>
POST
/v2.0/ports
Create port

Creates a port on the specified network.

 
Normal response codes
200
Request parameters
Parameter Style Type Description
name (Optional) plain xsd:string

A symbolic name for the port.

admin_state_up (Optional) plain xsd:bool

The administrative status of the port, which is up (true) or down (false).

tenant_id (Optional) plain csapi:uuid

The ID of the tenant who owns the network. Only administrative users can specify a tenant ID other than their own. You cannot change this value through authorization policies.

mac_address (Optional) plain xsd:string

The MAC address. If you specify an address that is not valid, a 400 Bad Request error is returned. If you do not specify a MAC address, OpenStack Networking tries to allocate one. If a failure occurs, a 503 Service Unavailable error is returned.

fixed_ips (Optional) plain xsd:dict

If you specify only a subnet ID, OpenStack Networking allocates an available IP from that subnet to the port. If you specify both a subnet ID and an IP address, OpenStack Networking tries to allocate the specified address to the port.

subnet_id (Optional) plain csapi:uuid

If you specify only a subnet ID, OpenStack Networking allocates an available IP from that subnet to the port. If you specify both a subnet ID and an IP address, OpenStack Networking tries to allocate the specified address to the port.

ip_address (Optional) plain xsd:string

If you specify both a subnet ID and an IP address, OpenStack Networking tries to allocate the specified address to the port.

security_groups (Optional) plain csapi:uuid

Security groups. Specify one or more security group IDs.

network_id plain csapi:uuid

The ID of the network.

allowed_address_pairs (Optional) plain xsd:dict

Allowed address pairs

ip_address (Optional) plain xsd:string

The IP address of Allowed address pair.

mac_address (Optional) plain xsd:string

The MAC address of Allowed address pair.

opt_value (Optional) plain xsd:string

Extra DHCP option (value).

opt_name (Optional) plain xsd:string

Extra DHCP option (name).

device_owner (Optional) plain xsd:string

The ID of the entity that uses this port. For example, a DHCP agent.

device_id (Optional) plain csapi:uuid

The ID of the device that uses this port. For example, a virtual server.

binding:host_id (Optional) plain csapi:uuid

The ID of the host where the port is allocated. In some cases, different implementations can run on different hosts.

binding:profile (Optional) plain xsd:dict

A dictionary that enables the application running on the specified host to pass and receive vif port-specific information to the plug-in.

binding:vnic_type (Optional) plain xsd:string

The vnic type that is bound to the neutron port. Choose from normal, direct, macvtap.

Response parameters
Parameter Style Type Description
status plain xsd:string

The port status. Value is ACTIVE or DOWN.

name plain xsd:string

The port name.

allowed_address_pairs plain xsd:dict

Allowed address pairs.

ip_address plain xsd:string

IP address.

mac_address plain xsd:string

The MAC address.

admin_state_up plain xsd:bool

The administrative state of the port, which is up (true) or down (false).

network_id plain csapi:uuid

The ID of the attached network.

tenant_id plain csapi:uuid

The ID of the tenant who owns the network. Only administrative users can specify a tenant ID other than their own.

extra_dhcp_opts plain xsd:dict

Extra DHCP options.

opt_value plain xsd:string

Extra DHCP option (value).

opt_name plain xsd:string

Extra DHCP option (name).

device_owner plain xsd:string

The ID of the entity that uses this port. For example, a DHCP agent.

mac_address plain xsd:string

The MAC address of the port.

fixed_ips plain xsd:dict

IP addresses for the port. Includes the IP address and subnet ID.

subnet_id plain csapi:uuid

Subnet ID of the subnet to which the port is attached.

ip_address plain xsd:string

IP address.

id plain csapi:uuid

The ID of the port.

security_groups plain csapi:uuid

The IDs of any attached security groups.

device_id plain csapi:uuid

The ID of the device that uses this port. For example, a virtual server.

binding:host_id (Optional) plain csapi:uuid

The ID of the host where the port is allocated. In some cases, different implementations can run on different hosts.

binding:vif_details (Optional) plain xsd:dict

Read-only. A dictionary that enables the application to pass information about functions that the Networking API provides. To enable or disable port filtering features such as security group and anti-MAC/IP spoofing, specify port_filter: True or port_filter: False.

port_filter (Optional) plain xsd:bool

Read-only. A dictionary that enables the application to pass information about functions that the Networking API provides. To enable or disable port filtering features such as security group and anti-MAC/IP spoofing, specify port_filter: True or port_filter: False.

ovs_hybrid_plug (Optional) plain xsd:bool

Read-only. A dictionary that enables the application to pass information about functions that the Networking API provides. To enable or disable port filtering features such as security group and anti-MAC/IP spoofing, specify port_filter: True or port_filter: False.

binding:vif_type (Optional) plain xsd:string

Read-only. The vif type for the specified port.

binding:profile (Optional) plain xsd:dict

A dictionary the enables the application running on the specified host to pass and receive vif port-specific information to the plug-in.

binding:vnic_type (Optional) plain xsd:string

The vnic type that is bound to the neutron port.

In POST and PUT operations, specify a value of normal (virtual nic), direct (pci passthrough), or macvtap (virtual interface with a tap-like software interface). These values support SR-IOV PCI passthrough networking. The ML2 plug-in supports the vnic_type.

In GET operations, the binding:vnic_type extended attribute is visible to only port owners and administrative users.

{
    "port": {
        "network_id": "ee2d3158-3e80-4fb3-ba87-c99f515d85e7",
        "admin_state_up": true
    }
}
{
    "port": {
        "status": "DOWN",
        "binding:host_id": "",
        "name": "private-port",
        "allowed_address_pairs": [],
        "admin_state_up": true,
        "network_id": "a87cc70a-3e15-4acf-8205-9b711a3531b7",
        "tenant_id": "d6700c0c9ffa4f1cb322cd4a1f3906fa",
        "binding:vif_details": {},
        "binding:vnic_type": "normal",
        "binding:vif_type": "unbound",
        "device_owner": "",
        "mac_address": "fa:16:3e:c9:cb:f0",
        "binding:profile": {},
        "fixed_ips": [
            {
                "subnet_id": "a0304c3a-4f08-4c43-88af-d796509c97d2",
                "ip_address": "10.0.0.2"
            }
        ],
        "id": "65c0ee9f-d634-4522-8954-51021b570b0d",
        "security_groups": [
            "f0ac4394-7e4a-4409-9701-ba8be283dbc3"
        ],
        "device_id": ""
    }
}
<?xml version='1.0' encoding='UTF-8'?>
<port xmlns="http://openstack.org/quantum/api/v2.0"
    xmlns:binding="http://docs.openstack.org/ext/binding/api/v1.0"
    xmlns:quantum="http://openstack.org/quantum/api/v2.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <status>DOWN</status>
    <binding:host_id/>
    <name>test_port_1</name>
    <allowed_address_pairs quantum:type="list"/>
    <admin_state_up quantum:type="bool">True</admin_state_up>
    <network_id>a87cc70a-3e15-4acf-8205-9b711a3531b7</network_id>
    <tenant_id>d6700c0c9ffa4f1cb322cd4a1f3906fa</tenant_id>
    <binding:vif_details quantum:type="dict"/>
    <binding:vnic_type>normal</binding:vnic_type>
    <binding:vif_type>unbound</binding:vif_type>
    <device_owner/>
    <mac_address>fa:16:3e:09:e3:47</mac_address>
    <binding:profile quantum:type="dict"/>
    <fixed_ips>
        <fixed_ip>
            <subnet_id>a0304c3a-4f08-4c43-88af-d796509c97d2</subnet_id>
            <ip_address>10.0.0.4</ip_address>
        </fixed_ip>
    </fixed_ips>
    <id>8021790b-4bfd-46ab-bcc7-0ef2f73bff43</id>
    <security_groups>
        <security_group>f0ac4394-7e4a-4409-9701-ba8be283dbc3</security_group>
    </security_groups>
    <device_id/>
</port>
GET
/v2.0/ports/​{port_id}​
Show port

Shows information for the specified port.

 
Normal response codes
200
Request parameters
Parameter Style Type Description
port_id URI csapi:UUID

The UUID for the port of interest to you.

Response parameters
Parameter Style Type Description
status plain xsd:string

The port status. Value is ACTIVE or DOWN.

name plain xsd:string

The port name.

allowed_address_pairs plain xsd:dict

Allowed address pairs.

ip_address plain xsd:string

IP address.

mac_address plain xsd:string

The MAC address.

admin_state_up plain xsd:bool

The administrative state of the port, which is up (true) or down (false).

network_id plain csapi:uuid

The ID of the attached network.

tenant_id plain csapi:uuid

The ID of the tenant who owns the network. Only administrative users can specify a tenant ID other than their own.

extra_dhcp_opts plain xsd:dict

Extra DHCP options.

opt_value plain xsd:string

Extra DHCP option (value).

opt_name plain xsd:string

Extra DHCP option (name).

device_owner plain xsd:string

The ID of the entity that uses this port. For example, a DHCP agent.

mac_address plain xsd:string

The MAC address of the port.

fixed_ips plain xsd:dict

IP addresses for the port. Includes the IP address and subnet ID.

subnet_id plain csapi:uuid

Subnet ID of the subnet to which the port is attached.

ip_address plain xsd:string

IP address.

id plain csapi:uuid

The ID of the port.

security_groups plain csapi:uuid

The IDs of any attached security groups.

device_id plain csapi:uuid

The ID of the device that uses this port. For example, a virtual server.

binding:host_id (Optional) plain csapi:uuid

The ID of the host where the port is allocated. In some cases, different implementations can run on different hosts.

binding:vif_details (Optional) plain xsd:dict

Read-only. A dictionary that enables the application to pass information about functions that the Networking API provides. To enable or disable port filtering features such as security group and anti-MAC/IP spoofing, specify port_filter: True or port_filter: False.

port_filter (Optional) plain xsd:bool

Read-only. A dictionary that enables the application to pass information about functions that the Networking API provides. To enable or disable port filtering features such as security group and anti-MAC/IP spoofing, specify port_filter: True or port_filter: False.

ovs_hybrid_plug (Optional) plain xsd:bool

Read-only. A dictionary that enables the application to pass information about functions that the Networking API provides. To enable or disable port filtering features such as security group and anti-MAC/IP spoofing, specify port_filter: True or port_filter: False.

binding:vif_type (Optional) plain xsd:string

Read-only. The vif type for the specified port.

binding:profile (Optional) plain xsd:dict

A dictionary the enables the application running on the specified host to pass and receive vif port-specific information to the plug-in.

binding:vnic_type (Optional) plain xsd:string

The vnic type that is bound to the neutron port.

In POST and PUT operations, specify a value of normal (virtual nic), direct (pci passthrough), or macvtap (virtual interface with a tap-like software interface). These values support SR-IOV PCI passthrough networking. The ML2 plug-in supports the vnic_type.

In GET operations, the binding:vnic_type extended attribute is visible to only port owners and administrative users.

{
    "port": {
        "status": "ACTIVE",
        "binding:host_id": "devstack",
        "name": "",
        "allowed_address_pairs": [],
        "admin_state_up": true,
        "network_id": "a87cc70a-3e15-4acf-8205-9b711a3531b7",
        "tenant_id": "7e02058126cc4950b75f9970368ba177",
        "extra_dhcp_opts": [],
        "binding:vif_details": {
            "port_filter": true,
            "ovs_hybrid_plug": true
        },
        "binding:vif_type": "ovs",
        "device_owner": "network:router_interface",
        "mac_address": "fa:16:3e:23:fd:d7",
        "binding:profile": {},
        "binding:vnic_type": "normal",
        "fixed_ips": [
            {
                "subnet_id": "a0304c3a-4f08-4c43-88af-d796509c97d2",
                "ip_address": "10.0.0.1"
            }
        ],
        "id": "46d4bfb9-b26e-41f3-bd2e-e6dcc1ccedb2",
        "security_groups": [],
        "device_id": "5e3898d7-11be-483e-9732-b2f5eccd2b2e"
    }
}
<?xml version='1.0' encoding='UTF-8'?>
<port xmlns="http://openstack.org/quantum/api/v2.0"
    xmlns:binding="http://docs.openstack.org/ext/binding/api/v1.0"
    xmlns:quantum="http://openstack.org/quantum/api/v2.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <status>ACTIVE</status>
    <binding:host_id>devstack</binding:host_id>
    <name/>
    <allowed_address_pairs quantum:type="list"/>
    <admin_state_up quantum:type="bool">True</admin_state_up>
    <network_id>a87cc70a-3e15-4acf-8205-9b711a3531b7</network_id>
    <tenant_id>7e02058126cc4950b75f9970368ba177</tenant_id>
    <extra_dhcp_opts quantum:type="list"/>
    <binding:vif_details>
        <port_filter quantum:type="bool">True</port_filter>
        <ovs_hybrid_plug quantum:type="bool">True</ovs_hybrid_plug>
    </binding:vif_details>
    <binding:vif_type>ovs</binding:vif_type>
    <device_owner>network:router_interface</device_owner>
    <mac_address>fa:16:3e:23:fd:d7</mac_address>
    <binding:profile quantum:type="dict"/>
    <binding:vnic_type>normal</binding:vnic_type>
    <fixed_ips>
        <fixed_ip>
            <subnet_id>a0304c3a-4f08-4c43-88af-d796509c97d2</subnet_id>
            <ip_address>10.0.0.1</ip_address>
        </fixed_ip>
    </fixed_ips>
    <id>46d4bfb9-b26e-41f3-bd2e-e6dcc1ccedb2</id>
    <security_groups quantum:type="list"/>
    <device_id>5e3898d7-11be-483e-9732-b2f5eccd2b2e</device_id>
</port>

This operation does not accept a request body.

PUT
/v2.0/ports/​{port_id}​
Update port

Updates the specified port.

 
Normal response codes
200
Request parameters
Parameter Style Type Description
port_id URI csapi:UUID

The UUID for the port of interest to you.

name (Optional) plain xsd:string

A symbolic name for the port.

admin_state_up (Optional) plain xsd:bool

The administrative status of the port, which is up (true) or down (false).

tenant_id (Optional) plain csapi:uuid

The ID of the tenant who owns the network. Only administrative users can specify a tenant ID other than their own. You cannot change this value through authorization policies.

mac_address (Optional) plain xsd:string

The MAC address. If you specify an address that is not valid, a 400 Bad Request error is returned. If you do not specify a MAC address, OpenStack Networking tries to allocate one. If a failure occurs, a 503 Service Unavailable error is returned.

fixed_ips (Optional) plain xsd:dict

If you specify only a subnet ID, OpenStack Networking allocates an available IP from that subnet to the port. If you specify both a subnet ID and an IP address, OpenStack Networking tries to allocate the specified address to the port.

subnet_id (Optional) plain csapi:uuid

If you specify only a subnet ID, OpenStack Networking allocates an available IP from that subnet to the port. If you specify both a subnet ID and an IP address, OpenStack Networking tries to allocate the specified address to the port.

ip_address (Optional) plain xsd:string

If you specify both a subnet ID and an IP address, OpenStack Networking tries to allocate the specified address to the port.

security_groups (Optional) plain csapi:uuid

Security groups. Specify one or more security group IDs.

network_id plain csapi:uuid

The ID of the network.

allowed_address_pairs (Optional) plain xsd:dict

Allowed address pairs

ip_address (Optional) plain xsd:string

The IP address of Allowed address pair.

mac_address (Optional) plain xsd:string

The MAC address of Allowed address pair.

opt_value (Optional) plain xsd:string

Extra DHCP option (value).

opt_name (Optional) plain xsd:string

Extra DHCP option (name).

device_owner (Optional) plain xsd:string

The ID of the entity that uses this port. For example, a DHCP agent.

device_id (Optional) plain csapi:uuid

The ID of the device that uses this port. For example, a virtual server.

binding:host_id (Optional) plain csapi:uuid

The ID of the host where the port is allocated. In some cases, different implementations can run on different hosts.

binding:profile (Optional) plain xsd:dict

A dictionary that enables the application running on the specified host to pass and receive vif port-specific information to the plug-in.

binding:vnic_type (Optional) plain xsd:string

The vnic type that is bound to the neutron port. Choose from normal, direct, macvtap.

Response parameters
Parameter Style Type Description
status plain xsd:string

The port status. Value is ACTIVE or DOWN.

name plain xsd:string

The port name.

allowed_address_pairs plain xsd:dict

Allowed address pairs.

ip_address plain xsd:string

IP address.

mac_address plain xsd:string

The MAC address.

admin_state_up plain xsd:bool

The administrative state of the port, which is up (true) or down (false).

network_id plain csapi:uuid

The ID of the attached network.

tenant_id plain csapi:uuid

The ID of the tenant who owns the network. Only administrative users can specify a tenant ID other than their own.

extra_dhcp_opts plain xsd:dict

Extra DHCP options.

opt_value plain xsd:string

Extra DHCP option (value).

opt_name plain xsd:string

Extra DHCP option (name).

device_owner plain xsd:string

The ID of the entity that uses this port. For example, a DHCP agent.

mac_address plain xsd:string

The MAC address of the port.

fixed_ips plain xsd:dict

IP addresses for the port. Includes the IP address and subnet ID.

subnet_id plain csapi:uuid

Subnet ID of the subnet to which the port is attached.

ip_address plain xsd:string

IP address.

id plain csapi:uuid

The ID of the port.

security_groups plain csapi:uuid

The IDs of any attached security groups.

device_id plain csapi:uuid

The ID of the device that uses this port. For example, a virtual server.

binding:host_id (Optional) plain csapi:uuid

The ID of the host where the port is allocated. In some cases, different implementations can run on different hosts.

binding:vif_details (Optional) plain xsd:dict

Read-only. A dictionary that enables the application to pass information about functions that the Networking API provides. To enable or disable port filtering features such as security group and anti-MAC/IP spoofing, specify port_filter: True or port_filter: False.

port_filter (Optional) plain xsd:bool

Read-only. A dictionary that enables the application to pass information about functions that the Networking API provides. To enable or disable port filtering features such as security group and anti-MAC/IP spoofing, specify port_filter: True or port_filter: False.

ovs_hybrid_plug (Optional) plain xsd:bool

Read-only. A dictionary that enables the application to pass information about functions that the Networking API provides. To enable or disable port filtering features such as security group and anti-MAC/IP spoofing, specify port_filter: True or port_filter: False.

binding:vif_type (Optional) plain xsd:string

Read-only. The vif type for the specified port.

binding:profile (Optional) plain xsd:dict

A dictionary the enables the application running on the specified host to pass and receive vif port-specific information to the plug-in.

binding:vnic_type (Optional) plain xsd:string

The vnic type that is bound to the neutron port.

In POST and PUT operations, specify a value of normal (virtual nic), direct (pci passthrough), or macvtap (virtual interface with a tap-like software interface). These values support SR-IOV PCI passthrough networking. The ML2 plug-in supports the vnic_type.

In GET operations, the binding:vnic_type extended attribute is visible to only port owners and administrative users.

{
    "port": {
        "network_id": "ee2d3158-3e80-4fb3-ba87-c99f515d85e7",
        "admin_state_up": true
    }
}
{
    "port": {
        "status": "DOWN",
        "binding:host_id": "",
        "name": "private-port",
        "allowed_address_pairs": [],
        "admin_state_up": true,
        "network_id": "a87cc70a-3e15-4acf-8205-9b711a3531b7",
        "tenant_id": "d6700c0c9ffa4f1cb322cd4a1f3906fa",
        "binding:vif_details": {},
        "binding:vnic_type": "normal",
        "binding:vif_type": "unbound",
        "device_owner": "",
        "mac_address": "fa:16:3e:c9:cb:f0",
        "binding:profile": {},
        "fixed_ips": [
            {
                "subnet_id": "a0304c3a-4f08-4c43-88af-d796509c97d2",
                "ip_address": "10.0.0.2"
            }
        ],
        "id": "65c0ee9f-d634-4522-8954-51021b570b0d",
        "security_groups": [
            "f0ac4394-7e4a-4409-9701-ba8be283dbc3"
        ],
        "device_id": ""
    }
}
<?xml version='1.0' encoding='UTF-8'?>
<port xmlns="http://openstack.org/quantum/api/v2.0"
    xmlns:binding="http://docs.openstack.org/ext/binding/api/v1.0"
    xmlns:quantum="http://openstack.org/quantum/api/v2.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <status>DOWN</status>
    <binding:host_id/>
    <name>test_port_1</name>
    <allowed_address_pairs quantum:type="list"/>
    <admin_state_up quantum:type="bool">True</admin_state_up>
    <network_id>a87cc70a-3e15-4acf-8205-9b711a3531b7</network_id>
    <tenant_id>d6700c0c9ffa4f1cb322cd4a1f3906fa</tenant_id>
    <binding:vif_details quantum:type="dict"/>
    <binding:vnic_type>normal</binding:vnic_type>
    <binding:vif_type>unbound</binding:vif_type>
    <device_owner/>
    <mac_address>fa:16:3e:09:e3:47</mac_address>
    <binding:profile quantum:type="dict"/>
    <fixed_ips>
        <fixed_ip>
            <subnet_id>a0304c3a-4f08-4c43-88af-d796509c97d2</subnet_id>
            <ip_address>10.0.0.4</ip_address>
        </fixed_ip>
    </fixed_ips>
    <id>8021790b-4bfd-46ab-bcc7-0ef2f73bff43</id>
    <security_groups>
        <security_group>f0ac4394-7e4a-4409-9701-ba8be283dbc3</security_group>
    </security_groups>
    <device_id/>
</port>

Security groups and rules (security-groups)

List, create, show information for, and delete security groups and security group rules.

GET
/v2.0/security-groups
List security groups

Lists OpenStack Networking security groups to which the specified tenant has access.

 

The list shows the unique ID for and the rules that are associated with each security group.

Normal response codes
200
Error response codes
unauthorized (401)
Response parameters
Parameter Style Type Description
security_groups plain xsd:dict

Security groups.

description plain xsd:string

The security group description.

id plain csapi:uuid

The UUID for the security group.

name plain xsd:string

The security group name.

security_group_rules plain xsd:dict

Security group rules.

direction plain xsd:string

Ingress or egress: the direction in which the security group rule is applied. For a compute instance, an ingress security group rule is applied to incoming (ingress) traffic for that instance. An egress rule is applied to traffic leaving the instance.

ethertype plain xsd:string

Must be IPv4 or IPv6, and addresses represented in CIDR must match the ingress or egress rules.

id plain csapi:uuid

The UUID of the security group rule.

port_range_max plain xsd:int

The maximum port number in the range that is matched by the security group rule. The port_range_min attribute constrains the port_range_max attribute. If the protocol is ICMP, this value must be an ICMP type.

port_range_min plain xsd:int

The minimum port number in the range that is matched by the security group rule. If the protocol is TCP or UDP, this value must be less than or equal to the port_range_max attribute value. If the protocol is ICMP, this value must be an ICMP type.

protocol plain xsd:string

The protocol that is matched by the security group rule. Valid values are null, tcp, udp, and icmp.

remote_group_id plain csapi:uuid

The remote group ID to be associated with this security group rule. You can specify either the remote_group_id or remote_ip_prefix attribute in the request body.

remote_ip_prefix plain xsd:string

The remote IP prefix to be associated with this security group rule. You can specify either the remote_group_id or remote_ip_prefix attribute in the request body. This attribute value matches the specified IP prefix as the source IP address of the IP packet.

security_group_id plain csapi:uuid

The ID of the security group.

tenant_id plain csapi:uuid

The ID of the tenant who owns the security group rule. Only administrative users can specify a tenant ID other than their own.

tenant_id plain csapi:uuid

The ID of the tenant who owns the security group. Only administrative users can specify a tenant ID other than their own.

GET /v2.0/security-groups
Accept: application/json
{
    "security_groups": [
        {
            "description": "default",
            "id": "85cc3048-abc3-43cc-89b3-377341426ac5",
            "name": "default",
            "security_group_rules": [
                {
                    "direction": "egress",
                    "ethertype": "IPv6",
                    "id": "3c0e45ff-adaf-4124-b083-bf390e5482ff",
                    "port_range_max": null,
                    "port_range_min": null,
                    "protocol": null,
                    "remote_group_id": null,
                    "remote_ip_prefix": null,
                    "security_group_id": "85cc3048-abc3-43cc-89b3-377341426ac5",
                    "tenant_id": "e4f50856753b4dc6afee5fa6b9b6c550"
                },
                {
                    "direction": "egress",
                    "ethertype": "IPv4",
                    "id": "93aa42e5-80db-4581-9391-3a608bd0e448",
                    "port_range_max": null,
                    "port_range_min": null,
                    "protocol": null,
                    "remote_group_id": null,
                    "remote_ip_prefix": null,
                    "security_group_id": "85cc3048-abc3-43cc-89b3-377341426ac5",
                    "tenant_id": "e4f50856753b4dc6afee5fa6b9b6c550"
                },
                {
                    "direction": "ingress",
                    "ethertype": "IPv6",
                    "id": "c0b09f00-1d49-4e64-a0a7-8a186d928138",
                    "port_range_max": null,
                    "port_range_min": null,
                    "protocol": null,
                    "remote_group_id": "85cc3048-abc3-43cc-89b3-377341426ac5",
                    "remote_ip_prefix": null,
                    "security_group_id": "85cc3048-abc3-43cc-89b3-377341426ac5",
                    "tenant_id": "e4f50856753b4dc6afee5fa6b9b6c550"
                },
                {
                    "direction": "ingress",
                    "ethertype": "IPv4",
                    "id": "f7d45c89-008e-4bab-88ad-d6811724c51c",
                    "port_range_max": null,
                    "port_range_min": null,
                    "protocol": null,
                    "remote_group_id": "85cc3048-abc3-43cc-89b3-377341426ac5",
                    "remote_ip_prefix": null,
                    "security_group_id": "85cc3048-abc3-43cc-89b3-377341426ac5",
                    "tenant_id": "e4f50856753b4dc6afee5fa6b9b6c550"
                }
            ],
            "tenant_id": "e4f50856753b4dc6afee5fa6b9b6c550"
        }
    ]
}
POST
/v2.0/security-groups
Create security group

Creates an OpenStack Networking security group.

 

This operation creates a security group with default security group rules for the IPv4 and IPv6 ether types.

Normal response codes
201
Error response codes
badRequest (400), unauthorized (401)
Request parameters
Parameter Style Type Description
name plain xsd:string

A symbolic name for the security group. Not required to be unique.

description (Optional) plain xsd:string

Describes the security group.

tenant_id (Optional) plain csapi:uuid

The ID of the tenant who owns the security group. Only administrative users can specify a tenant ID other than their own.

Response parameters
Parameter Style Type Description
security_groups plain xsd:dict

Security groups.

description plain xsd:string

The security group description.

id plain csapi:uuid

The UUID for the security group.

name plain xsd:string

The security group name.

security_group_rules plain xsd:dict

Security group rules.

direction plain xsd:string

Ingress or egress: the direction in which the security group rule is applied. For a compute instance, an ingress security group rule is applied to incoming (ingress) traffic for that instance. An egress rule is applied to traffic leaving the instance.

ethertype plain xsd:string

Must be IPv4 or IPv6, and addresses represented in CIDR must match the ingress or egress rules.

id plain csapi:uuid

The UUID of the security group rule.

port_range_max plain xsd:int

The maximum port number in the range that is matched by the security group rule. The port_range_min attribute constrains the port_range_max attribute. If the protocol is ICMP, this value must be an ICMP type.

port_range_min plain xsd:int

The minimum port number in the range that is matched by the security group rule. If the protocol is TCP or UDP, this value must be less than or equal to the port_range_max attribute value. If the protocol is ICMP, this value must be an ICMP type.

protocol plain xsd:string

The protocol that is matched by the security group rule. Valid values are null, tcp, udp, and icmp.

remote_group_id plain csapi:uuid

The remote group ID to be associated with this security group rule. You can specify either the remote_group_id or remote_ip_prefix attribute in the request body.

remote_ip_prefix plain xsd:string

The remote IP prefix to be associated with this security group rule. You can specify either the remote_group_id or remote_ip_prefix attribute in the request body. This attribute value matches the specified IP prefix as the source IP address of the IP packet.

security_group_id plain csapi:uuid

The ID of the security group.

tenant_id plain csapi:uuid

The ID of the tenant who owns the security group rule. Only administrative users can specify a tenant ID other than their own.

tenant_id plain csapi:uuid

The ID of the tenant who owns the security group. Only administrative users can specify a tenant ID other than their own.

{
    "security_group": {
        "name": "new-webservers",
        "description": "security group for webservers"
    }
}
{
    "security_group": {
        "description": "security group for webservers",
        "id": "2076db17-a522-4506-91de-c6dd8e837028",
        "name": "new-webservers",
        "security_group_rules": [
            {
                "direction": "egress",
                "ethertype": "IPv4",
                "id": "38ce2d8e-e8f1-48bd-83c2-d33cb9f50c3d",
                "port_range_max": null,
                "port_range_min": null,
                "protocol": null,
                "remote_group_id": null,
                "remote_ip_prefix": null,
                "security_group_id": "2076db17-a522-4506-91de-c6dd8e837028",
                "tenant_id": "e4f50856753b4dc6afee5fa6b9b6c550"
            },
            {
                "direction": "egress",
                "ethertype": "IPv6",
                "id": "565b9502-12de-4ffd-91e9-68885cff6ae1",
                "port_range_max": null,
                "port_range_min": null,
                "protocol": null,
                "remote_group_id": null,
                "remote_ip_prefix": null,
                "security_group_id": "2076db17-a522-4506-91de-c6dd8e837028",
                "tenant_id": "e4f50856753b4dc6afee5fa6b9b6c550"
            }
        ],
        "tenant_id": "e4f50856753b4dc6afee5fa6b9b6c550"
    }
}
GET
/v2.0/security-groups/​{security_group_id}​
Show security group

Shows details for a specified security group.

 

This operation returns a response body that contains the description, name, ID, and security group rules associated with the specified security group and tenant ID.

Normal response codes
200
Error response codes
unauthorized (401), itemNotFound (404)
Request parameters
Parameter Style Type Description
security_group_id URI csapi:uuid The unique identifier of the security group.
verbose (Optional) query xsd:bool

Show detailed information.

fields (Optional) query xsd:string

The fields to be returned by server.

Response parameters
Parameter Style Type Description
security_groups plain xsd:dict

Security groups.

description plain xsd:string

The security group description.

id plain csapi:uuid

The UUID for the security group.

name plain xsd:string

The security group name.

security_group_rules plain xsd:dict

Security group rules.

direction plain xsd:string

Ingress or egress: the direction in which the security group rule is applied. For a compute instance, an ingress security group rule is applied to incoming (ingress) traffic for that instance. An egress rule is applied to traffic leaving the instance.

ethertype plain xsd:string

Must be IPv4 or IPv6, and addresses represented in CIDR must match the ingress or egress rules.

id plain csapi:uuid

The UUID of the security group rule.

port_range_max plain xsd:int

The maximum port number in the range that is matched by the security group rule. The port_range_min attribute constrains the port_range_max attribute. If the protocol is ICMP, this value must be an ICMP type.

port_range_min plain xsd:int

The minimum port number in the range that is matched by the security group rule. If the protocol is TCP or UDP, this value must be less than or equal to the port_range_max attribute value. If the protocol is ICMP, this value must be an ICMP type.

protocol plain xsd:string

The protocol that is matched by the security group rule. Valid values are null, tcp, udp, and icmp.

remote_group_id plain csapi:uuid

The remote group ID to be associated with this security group rule. You can specify either the remote_group_id or remote_ip_prefix attribute in the request body.

remote_ip_prefix plain xsd:string

The remote IP prefix to be associated with this security group rule. You can specify either the remote_group_id or remote_ip_prefix attribute in the request body. This attribute value matches the specified IP prefix as the source IP address of the IP packet.

security_group_id plain csapi:uuid

The ID of the security group.

tenant_id plain csapi:uuid

The ID of the tenant who owns the security group rule. Only administrative users can specify a tenant ID other than their own.

tenant_id plain csapi:uuid

The ID of the tenant who owns the security group. Only administrative users can specify a tenant ID other than their own.

GET /v2.0/security-groups/85cc3048-abc3-43cc-89b3-377341426ac5
Accept: application/json
{
    "security_group": {
        "description": "default",
        "id": "85cc3048-abc3-43cc-89b3-377341426ac5",
        "name": "default",
        "security_group_rules": [
            {
                "direction": "egress",
                "ethertype": "IPv6",
                "id": "3c0e45ff-adaf-4124-b083-bf390e5482ff",
                "port_range_max": null,
                "port_range_min": null,
                "protocol": null,
                "remote_group_id": null,
                "remote_ip_prefix": null,
                "security_group_id": "85cc3048-abc3-43cc-89b3-377341426ac5",
                "tenant_id": "e4f50856753b4dc6afee5fa6b9b6c550"
            },
            {
                "direction": "egress",
                "ethertype": "IPv4",
                "id": "93aa42e5-80db-4581-9391-3a608bd0e448",
                "port_range_max": null,
                "port_range_min": null,
                "protocol": null,
                "remote_group_id": null,
                "remote_ip_prefix": null,
                "security_group_id": "85cc3048-abc3-43cc-89b3-377341426ac5",
                "tenant_id": "e4f50856753b4dc6afee5fa6b9b6c550"
            },
            {
                "direction": "ingress",
                "ethertype": "IPv6",
                "id": "c0b09f00-1d49-4e64-a0a7-8a186d928138",
                "port_range_max": null,
                "port_range_min": null,
                "protocol": null,
                "remote_group_id": "85cc3048-abc3-43cc-89b3-377341426ac5",
                "remote_ip_prefix": null,
                "security_group_id": "85cc3048-abc3-43cc-89b3-377341426ac5",
                "tenant_id": "e4f50856753b4dc6afee5fa6b9b6c550"
            },
            {
                "direction": "ingress",
                "ethertype": "IPv4",
                "id": "f7d45c89-008e-4bab-88ad-d6811724c51c",
                "port_range_max": null,
                "port_range_min": null,
                "protocol": null,
                "remote_group_id": "85cc3048-abc3-43cc-89b3-377341426ac5",
                "remote_ip_prefix": null,
                "security_group_id": "85cc3048-abc3-43cc-89b3-377341426ac5",
                "tenant_id": "e4f50856753b4dc6afee5fa6b9b6c550"
            }
        ],
        "tenant_id": "e4f50856753b4dc6afee5fa6b9b6c550"
    }
}
DELETE
/v2.0/security-groups/​{security_group_id}​
Delete security group

Deletes an OpenStack Networking security group.

 

This operation deletes an OpenStack Networking security group and its associated security group rules, provided that a port is not associated with the security group.

This operation does not require a request body. This operation does not return a response body.

Normal response codes
204
Error response codes
unauthorized (401), itemNotFound (404)
Request parameters
Parameter Style Type Description
security_group_id URI csapi:uuid The unique identifier of the security group.
DELETE /v2.0/security-groups/e470bdfc-4869-459b-a561-cb3377efae59
Content-Type: application/json
Accept: application/json
status: 204
GET
/v2.0/security-group-rules
List security group rules

Lists a summary of all OpenStack Networking security group rules that the specified tenant can access.

 

The list provides the unique ID for each security group rule.

Normal response codes
200
Error response codes
unauthorized (401)
Response parameters
Parameter Style Type Description
direction plain xsd:string Ingress or egress: The direction in which the security group rule is applied. For a compute instance, an ingress security group rule is applied to incoming (ingress) traffic for that instance. An egress rule is applied to traffic leaving the instance.
ethertype plain xsd:string Must be IPv4 or IPv6, and addresses represented in CIDR must match the ingress or egress rules.
id plain csapi:uuid The security group rule ID.
security_group_id plain csapi:uuid The security group ID to associate with this security group rule.
port_range_min plain xsd:int The minimum port number in the range that is matched by the security group rule. If the protocol is TCP or UDP, this value must be less than or equal to the value of the port_range_max attribute. If the protocol is ICMP, this value must be an ICMP type.
port_range_max plain xsd:int The maximum port number in the range that is matched by the security group rule. The port_range_min attribute constrains the port_range_max attribute. If the protocol is ICMP, this value must be an ICMP type.
protocol plain xsd:string The protocol that is matched by the security group rule. Valid values are null, tcp, udp, and icmp.
remote_group_id plain csapi:uuid The remote group ID to be associated with this security group rule. You can specify either the remote_group_id or remote_ip_prefix attribute in the request body.
remote_ip_prefix plain csapi:uuid The remote IP prefix to be associated with this security group rule. You can specify either the remote_group_id or remote_ip_prefix attribute in the request body. This attribute matches the specified IP prefix as the source IP address of the IP packet.
tenant_id plain csapi:uuid

The ID of the tenant who owns the security group rule. Only administrative users can specify a tenant ID other than their own.

GET /v2.0/security-group-rules/
Accept: application/json
{
    "security_group_rules": [
        {
            "direction": "egress",
            "ethertype": "IPv6",
            "id": "3c0e45ff-adaf-4124-b083-bf390e5482ff",
            "port_range_max": null,
            "port_range_min": null,
            "protocol": null,
            "remote_group_id": null,
            "remote_ip_prefix": null,
            "security_group_id": "85cc3048-abc3-43cc-89b3-377341426ac5",
            "tenant_id": "e4f50856753b4dc6afee5fa6b9b6c550"
        },
        {
            "direction": "egress",
            "ethertype": "IPv4",
            "id": "93aa42e5-80db-4581-9391-3a608bd0e448",
            "port_range_max": null,
            "port_range_min": null,
            "protocol": null,
            "remote_group_id": null,
            "remote_ip_prefix": null,
            "security_group_id": "85cc3048-abc3-43cc-89b3-377341426ac5",
            "tenant_id": "e4f50856753b4dc6afee5fa6b9b6c550"
        },
        {
            "direction": "ingress",
            "ethertype": "IPv6",
            "id": "c0b09f00-1d49-4e64-a0a7-8a186d928138",
            "port_range_max": null,
            "port_range_min": null,
            "protocol": null,
            "remote_group_id": "85cc3048-abc3-43cc-89b3-377341426ac5",
            "remote_ip_prefix": null,
            "security_group_id": "85cc3048-abc3-43cc-89b3-377341426ac5",
            "tenant_id": "e4f50856753b4dc6afee5fa6b9b6c550"
        },
        {
            "direction": "ingress",
            "ethertype": "IPv4",
            "id": "f7d45c89-008e-4bab-88ad-d6811724c51c",
            "port_range_max": null,
            "port_range_min": null,
            "protocol": null,
            "remote_group_id": "85cc3048-abc3-43cc-89b3-377341426ac5",
            "remote_ip_prefix": null,
            "security_group_id": "85cc3048-abc3-43cc-89b3-377341426ac5",
            "tenant_id": "e4f50856753b4dc6afee5fa6b9b6c550"
        }
    ]
}
POST
/v2.0/security-group-rules
Create security group rule

Creates an OpenStack Networking security group rule.

 
Normal response codes
201
Error response codes
badRequest (400), unauthorized (401), itemNotFound (404), buildInProgress (409)
Request parameters
Parameter Style Type Description
direction plain xsd:string Ingress or egress: The direction in which the security group rule is applied. For a compute instance, an ingress security group rule is applied to incoming (ingress) traffic for that instance. An egress rule is applied to traffic leaving the instance.
ethertype (Optional) plain xsd:string Must be IPv4 or IPv6, and addresses represented in CIDR must match the ingress or egress rules.
security_group_id plain csapi:uuid The security group ID to associate with this security group rule.
port_range_min (Optional) plain xsd:int The minimum port number in the range that is matched by the security group rule. If the protocol is TCP or UDP, this value must be less than or equal to the port_range_max attribute value. If the protocol is ICMP, this value must be an ICMP type.
port_range_max (Optional) plain xsd:int The maximum port number in the range that is matched by the security group rule. The port_range_min attribute constrains the port_range_max attribute. If the protocol is ICMP, this value must be an ICMP type.
protocol (Optional) plain xsd:string The protocol that is matched by the security group rule. Valid values are null, tcp, udp, and icmp.
remote_group_id (Optional) plain csapi:uuid The remote group ID to be associated with this security group rule. You can specify either the remote_group_id or remote_ip_prefix attribute in the request body.
remote_ip_prefix (Optional) plain csapi:uuid The remote IP prefix to be associated with this security group rule. You can specify either the remote_group_id or remote_ip_prefix attribute in the request body. This attribute matches the specified IP prefix as the source IP address of the IP packet.
Response parameters
Parameter Style Type Description
security_group_rule plain xsd:string

Security group rule object.

direction plain xsd:string Ingress or egress: The direction in which the security group rule is applied. For a compute instance, an ingress security group rule is applied to incoming (ingress) traffic for that instance. An egress rule is applied to traffic leaving the instance.
id plain csapi:uuid The security group rule ID.
ethertype plain xsd:string Must be IPv4 or IPv6, and addresses represented in CIDR must match the ingress or egress rules.
security_group_id plain csapi:uuid The security group ID to associate with this security group rule.
port_range_min plain xsd:int The minimum port number in the range that is matched by the security group rule. If the protocol is TCP or UDP, this value must be less than or equal to the value of the attribute. If the protocol is ICMP, this value must be an ICMP type.
port_range_max plain xsd:int The maximum port number in the range that is matched by the security group rule. The port_range_min attribute constrains the attribute. If the protocol is ICMP, this value must be an ICMP type.
protocol plain xsd:string The protocol that is matched by the security group rule. Valid values are null, tcp, udp, and icmp.
remote_group_id plain csapi:uuid The remote group ID to be associated with this security group rule. You can specify either or in the request body.
remote_ip_prefix plain csapi:uuid The remote IP prefix to be associated with this security group rule. You can specify either or in the request body. This attribute matches the specified IP prefix as the source IP address of the IP packet.
tenant_id plain csapi:uuid The ID of the tenant who owns the security group rule. Only administrative users can specify a tenant ID other than their own.
{
    "security_group_rule": {
        "direction": "ingress",
        "port_range_min": "80",
        "ethertype": "IPv4",
        "port_range_max": "80",
        "protocol": "tcp",
        "remote_group_id": "85cc3048-abc3-43cc-89b3-377341426ac5",
        "security_group_id": "a7734e61-b545-452d-a3cd-0189cbd9747a"
    }
}
{
    "security_group_rule": {
        "direction": "ingress",
        "ethertype": "IPv4",
        "id": "2bc0accf-312e-429a-956e-e4407625eb62",
        "port_range_max": 80,
        "port_range_min": 80,
        "protocol": "tcp",
        "remote_group_id": "85cc3048-abc3-43cc-89b3-377341426ac5",
        "remote_ip_prefix": null,
        "security_group_id": "a7734e61-b545-452d-a3cd-0189cbd9747a",
        "tenant_id": "e4f50856753b4dc6afee5fa6b9b6c550"
    }
}
GET
/v2.0/security-group-rules/​{rules-security-groups-id}​
Show security group rule

Shows detailed information for a specified security group rule.

 

The response body contains the following information about the security group rule:

Normal response codes
200
Error response codes
unauthorized (401), itemNotFound (404)
Request parameters
Parameter Style Type Description
rules-security-groups-id URI csapi:uuid The unique identifier of the security group rule.
Response parameters
Parameter Style Type Description
direction plain xsd:string Ingress or egress: The direction in which the security group rule is applied. For a compute instance, an ingress security group rule is applied to incoming (ingress) traffic for that instance. An egress rule is applied to traffic leaving the instance.
ethertype plain xsd:string Must be IPv4 or IPv6, and addresses represented in CIDR must match the ingress or egress rules.
id plain csapi:uuid The security group rule ID.
security_group_id plain csapi:uuid The security group ID to associate with this security group rule.
port_range_min plain xsd:int The minimum port number in the range that is matched by the security group rule. If the protocol is TCP or UDP, this value must be less than or equal to the value of the port_range_max attribute. If the protocol is ICMP, this value must be an ICMP type.
port_range_max plain xsd:int The maximum port number in the range that is matched by the security group rule. The port_range_min attribute constrains the port_range_max attribute. If the protocol is ICMP, this value must be an ICMP type.
protocol plain xsd:string The protocol that is matched by the security group rule. Valid values are null, tcp, udp, and icmp.
remote_group_id plain csapi:uuid The remote group ID to be associated with this security group rule. You can specify either the remote_group_id or remote_ip_prefix attribute in the request body.
remote_ip_prefix plain csapi:uuid The remote IP prefix to be associated with this security group rule. You can specify either the remote_group_id or remote_ip_prefix attribute in the request body. This attribute matches the specified IP prefix as the source IP address of the IP packet.
tenant_id plain csapi:uuid

The ID of the tenant who owns the security group rule. Only administrative users can specify a tenant ID other than their own.

GET /v2.0/security-group-rules/ 3c0e45ff-adaf-4124-b083-bf390e5482ff
Accept: application/json
{
    "security_group_rule": {
        "direction": "egress",
        "ethertype": "IPv6",
        "id": "3c0e45ff-adaf-4124-b083-bf390e5482ff",
        "port_range_max": null,
        "port_range_min": null,
        "protocol": null,
        "remote_group_id": null,
        "remote_ip_prefix": null,
        "security_group_id": "85cc3048-abc3-43cc-89b3-377341426ac5",
        "tenant_id": "e4f50856753b4dc6afee5fa6b9b6c550"
    }
}
DELETE
/v2.0/security-group-rules/​{rules-security-groups-id}​
Delete security group rule

Deletes a specified rule from a OpenStack Networking security group.

 
Normal response codes
204
Error response codes
unauthorized (401), itemNotFound (404)
Request parameters
Parameter Style Type Description
rules-security-groups-id URI csapi:uuid The unique identifier of the security group rule.
DELETE /v2.0/security-group-rules/fc3c327a-b5b5-4cd3-9577-52893289ce08
Content-Type: application/json
Accept: application/json
status: 204

Layer-3 networking

Route packets between subnets, forward packets from internal networks to external ones, and access instances from external networks through floating IPs.

This extension introduces these resources:

  • router. A logical entity for forwarding packets across internal subnets and NATting them on external networks through an appropriate external gateway.

  • floatingip. An external IP address that is mapped to a port that is attached to an internal network.

GET
/v2.0/routers
List routers

Lists logical routers that are accessible to the tenant who submits the request.

 

Default policy settings return only those routers that are owned by the tenant who submits the request, unless an admin user submits the request.

This example request lists routers in JSON format:

GET /v2.0/routers
Accept: application/json

Use the fields query parameter to control which fields are returned in the response body. Additionally, you can filter results by using query string parameters. For information, see Filtering and Column Selection in the OpenStack Networking API v2.0 Reference .

Normal response codes
200
Error response codes
unauthorized (401)
Response parameters
Parameter Style Type Description
status plain xsd:string

The router status.

external_gateway_info plain xsd:dict

The network_id, for the external gateway.

name plain xsd:string

The router name.

admin_state_up plain xsd:bool

The administrative state of the router, which is up (true) or down (false).

tenant_id plain csapi:uuid

The tenant ID.

id plain csapi:uuid

The router ID.

{
    "routers": [
        {
            "status": "ACTIVE",
            "external_gateway_info": null,
            "name": "second_routers",
            "admin_state_up": true,
            "tenant_id": "6b96ff0cb17a4b859e1e575d221683d3",
            "id": "7177abc4-5ae9-4bb7-b0d4-89e94a4abf3b"
        },
        {
            "status": "ACTIVE",
            "external_gateway_info": {
                "network_id": "3c5bcddd-6af9-4e6b-9c3e-c153e521cab8"
            },
            "name": "router1",
            "admin_state_up": true,
            "tenant_id": "33a40233088643acb66ff6eb0ebea679",
            "id": "a9254bdb-2613-4a13-ac4c-adc581fba50d"
        }
    ]
}

This operation does not accept a request body.

POST
/v2.0/routers
Create router

Creates a logical router.

 

This operation creates a new logical router. When it is created, a logical router does not have any internal interface; it is not associated to any subnet. You can optionally specify an external gateway for a router at create time. The external gateway for the router must be plugged into an external network. An external network has its extended field router:external set to true. To specify an external gateway, the identifier of the external network must be passed in the external_gateway_info attribute in the request body, as follows:

{
   "router":{
      "external_gateway_info":{
         "network_id":"8ca37218-28ff-41cb-9b10-039601ea7e6b"
      }
   }
}
Normal response codes
201
Error response codes
badRequest (400), unauthorized (401)
Request parameters
Parameter Style Type Description
router plain xsd:string

A router object.

name (Optional) plain xsd:string

The router name.

admin_state_up (Optional) plain xsd:bool

The administrative state of the router, which is up (true) or down (false).

Response parameters
Parameter Style Type Description
router plain xsd:string

A router object.

status plain xsd:string

The router status.

external_gateway_info plain xsd:dict

The network_id, for the external gateway.

name plain xsd:string

The router name.

admin_state_up plain xsd:bool

The administrative state of the router, which is up (true) or down (false).

tenant_id plain csapi:uuid

The tenant ID.

id plain csapi:uuid

The router ID.

{
    "router": {
        "name": "another_router",
        "external_gateway_info": {
            "network_id": "8ca37218-28ff-41cb-9b10-039601ea7e6b"
        },
        "admin_state_up": true
    }
}
{
    "router": {
        "status": "ACTIVE",
        "external_gateway_info": {
            "network_id": "8ca37218-28ff-41cb-9b10-039601ea7e6b"
        },
        "name": "another_router",
        "admin_state_up": true,
        "tenant_id": "6b96ff0cb17a4b859e1e575d221683d3",
        "id": "8604a0de-7f6b-409a-a47c-a1cc7bc77b2e"
    }
}
GET
/v2.0/routers/​{router_id}​
Show router details

Shows details for a specified router.

 

This example request shows details for a router in JSON format:

GET /v2.0/routers/{router_id}
Accept: application/json

Use the fields query parameter to control which fields are returned in the response body. For information, see Filtering and Column Selection in the OpenStack Networking API v2.0 Reference .

Normal response codes
200
Error response codes
unauthorized (401), forbidden (403), itemNotFound (404)
Request parameters
Parameter Style Type Description
router_id URI csapi:UUID

The UUID of the router.

Response parameters
Parameter Style Type Description
routers plain xsd:string

A routers object.

status plain xsd:string

The router status.

external_gateway_info plain xsd:dict

The network_id, for the external gateway.

name plain xsd:string

The router name.

admin_state_up plain xsd:bool

The administrative state of the router, which is up (true) or down (false).

tenant_id plain csapi:uuid

The tenant ID.

id plain csapi:uuid

The router ID.

{
    "router": {
        "status": "ACTIVE",
        "external_gateway_info": {
            "network_id": "85d76829-6415-48ff-9c63-5c5ca8c61ac6"
        },
        "name": "router1",
        "admin_state_up": true,
        "tenant_id": "d6554fe62e2f41efbb6e026fad5c1542",
        "id": "a07eea83-7710-4860-931b-5fe220fae533"
    }
}

This operation does not accept a request body.

PUT
/v2.0/routers/​{router_id}​
Update router

Updates a logical router.

 

You can update the name, administrative state, and the external gateway. For more information about how to set the external gateway for a router, see the create router operation. This operation does not enable the update of router interfaces. To update a router, use the add router interface and remove router interface operations.

This example updates the external gateway information for a router:

PUT /v2.0/routers/{router_id}
Accept: application/json
Normal response codes
200
Error response codes
badRequest (400), unauthorized (401), itemNotFound (404)
Request parameters
Parameter Style Type Description
router_id URI csapi:UUID

The UUID of the router.

router plain xsd:string

A router object.

external_gateway_info (Optional) plain xsd:dict

The network_id for the external gateway.

name (Optional) plain xsd:string

The router name.

admin_state_up (Optional) plain xsd:bool

The administrative state of the router, which is up (true) or down (false).

Response parameters
Parameter Style Type Description
router plain xsd:string

A router object.

status plain xsd:string

The router status.

external_gateway_info plain xsd:dict

The network_id, for the external gateway.

name plain xsd:string

The router name.

admin_state_up plain xsd:bool

The administrative state of the router, which is up (true) or down (false).

tenant_id plain csapi:uuid

The tenant ID.

id plain csapi:uuid

The router ID.

{
    "router": {
        "external_gateway_info": {
            "network_id": "8ca37218-28ff-41cb-9b10-039601ea7e6b"
        }
    }
}
{
    "router": {
        "status": "ACTIVE",
        "external_gateway_info": {
            "network_id": "8ca37218-28ff-41cb-9b10-039601ea7e6b"
        },
        "name": "another_router",
        "admin_state_up": true,
        "tenant_id": "6b96ff0cb17a4b859e1e575d221683d3",
        "id": "8604a0de-7f6b-409a-a47c-a1cc7bc77b2e"
    }
}
DELETE
/v2.0/routers/​{router_id}​
Delete router

Deletes a logical router and, if present, its external gateway interface.

 

This operation fails if the router has attached interfaces.

Use the remove router interface operation to remove all router interfaces before you delete the router.

This example deletes a router:

DELETE /v2.0/routers/{router_id}
Accept: application/json
Normal response codes
204
Error response codes
unauthorized (401), itemNotFound (404), conflict (409)
Request parameters
Parameter Style Type Description
router_id URI csapi:UUID

The UUID of the router.

This operation does not accept a request body and does not return a response body.

PUT
/v2.0/routers/​{router_id}​/add_router_interface
Add interface to router

Adds an internal interface to a logical router.

 

This operation attaches a subnet to an internal router interface. You must specify either a subnet or port ID in the request body. If you specify both IDs, the operation returns a 400 Bad Request error.

If you specify a subnet ID in the request body, the gateway IP address for the subnet is used to create the router interface.

If you specify a port ID in the request body, the IP address associated with the port is used to create the router interface.

The operation returns a 400 Bad Request error if several IP addresses are associated with the specified port, or if no IP address is associated with the port.

The operation returns a 409 Conflict error if the port is already used.

The port ID that is returned by this operation can either be the same ID passed in the request body or the ID of a new port created by this operation to attach the specified subnet to the router. After you run this operation, the device ID of this port is set to the router ID, and the device_owner attribute is set to network:router_interface, as shown in this example:

{
   "port":{
      "status":"ACTIVE",
      "name":"",
      "admin_state_up":true,
      "network_id":"5307648b-e836-4658-8f1a-ff7536870c64",
      "tenant_id":"6b96ff0cb17a4b859e1e575d221683d3",
      "device_owner":"network:router_interface",
      "mac_address":"fa:16:3e:f7:d1:9c",
      "fixed_ips":[
         {
            "subnet_id":"a2f1f29d-571b-4533-907f-5803ab96ead1",
            "ip_address":"10.1.1.1"
         }
      ],
      "id":"3a44f4e5-1694-493a-a1fb-393881c673a4",
      "device_id":"7177abc4-5ae9-4bb7-b0d4-89e94a4abf3b"
   }
}
Normal response codes
200
Error response codes
badRequest (400), unauthorized (401), itemNotFound (404), conflict (409)
Request parameters
Parameter Style Type Description
router_id URI csapi:UUID

The UUID of the router.

subnet_id plain csapi:uuid

The subnet ID.

port_id plain csapi:uuid

The port ID.

Response parameters
Parameter Style Type Description
subnet_id plain csapi:uuid

The subnet ID.

tenant_id plain csapi:uuid

The tenant ID.

port_id plain csapi:uuid

The port ID.

id plain csapi:uuid

The router ID.

{
    "subnet_id": "a2f1f29d-571b-4533-907f-5803ab96ead1"
}
{
    "subnet_id": "a2f1f29d-571b-4533-907f-5803ab96ead1",
    "tenant_id": "6ba032e4730d42e2ad928f430f5da33e",
    "port_id": "3a44f4e5-1694-493a-a1fb-393881c673a4",
    "id": "b0294d7e-7da4-4202-9882-2ab1de9dabc0"
}
PUT
/v2.0/routers/​{router_id}​/remove_router_interface
Remove interface from router

Removes an internal interface from a logical router.

 

This operation removes an internal router interface, which detaches a subnet from the router. You must specify either a subnet ID or port ID in the request body; this value is used to identify the router interface to remove.

You can also specify both a subnet ID and port ID. If you specify both IDs, the subnet ID must correspond to the subnet ID of the first IP address on the port specified by the port ID. Otherwise, the operation returns a 409 Conflict error. The response contains information about the affected router and interface.

The operation returns a 404 Not Found if the router or the subnet and port do not exist or are not visible to you. As a consequence of this operation, the port connecting the router with the subnet is removed from the subnet for the network.

This example removes an interface from a router:

PUT /v2.0/routers/{router_id}/remove_router_interface
Accept: application/json
Normal response codes
200
Error response codes
badRequest (400), unauthorized (401), itemNotFound (404), conflict (409)
Request parameters
Parameter Style Type Description
router_id URI csapi:UUID

The UUID of the router.

subnet_id plain csapi:uuid

The subnet ID.

port_id plain csapi:uuid

The port ID.

Response parameters
Parameter Style Type Description
id plain csapi:uuid

The router ID.

tenant_id plain csapi:uuid

The tenant ID.

port_id plain csapi:uuid

The port ID.

subnet_id plain csapi:uuid

The subnet ID.

{
    "subnet_id": "a2f1f29d-571b-4533-907f-5803ab96ead1"
}
{
    "id": "8604a0de-7f6b-409a-a47c-a1cc7bc77b2e",
    "tenant_id": "2f245a7b-796b-4f26-9cf9-9e82d248fda7",
    "port_id": "3a44f4e5-1694-493a-a1fb-393881c673a4",
    "subnet_id": "a2f1f29d-571b-4533-907f-5803ab96ead1"
}
GET
/v2.0/floatingips
List floating IPs

Lists floating IPs that are accessible to the tenant who submits the request.

 

Default policy settings return only those floating IPs that are owned by the tenant who submits the request, unless an admin user submits the request.

This example request lists floating IPs in JSON format:

GET /v2.0/floatingips
Accept: application/json

Use the fields query parameter to control which fields are returned in the response body. Additionally, you can filter results by using query string parameters. For information, see Filtering and Column Selection in the OpenStack Networking API v2.0 Reference .

Normal response codes
200
Error response codes
unauthorized (401)
Response parameters
Parameter Style Type Description
floatingips plain xsd:dict

A floatingips object.

router_id plain csapi:uuid

The router ID.

tenant_id plain csapi:uuid

The tenant ID.

floating_network_id plain csapi:uuid

The ID of the network associated with the floating IP.

fixed_ip_address plain xsd:string

The fixed IP address associated with the floating IP.

floating_ip_address plain xsd:string

The floating IP address.

port_id plain csapi:uuid

The port ID.

id plain csapi:uuid

The ID of the floating IP address.

status plain xsd:string

The floating IP status.

{
    "floatingips": [
        {
            "router_id": "d23abc8d-2991-4a55-ba98-2aaea84cc72f",
            "tenant_id": "4969c491a3c74ee4af974e6d800c62de",
            "floating_network_id": "376da547-b977-4cfe-9cba-275c80debf57",
            "fixed_ip_address": "10.0.0.3",
            "floating_ip_address": "172.24.4.228",
            "port_id": "ce705c24-c1ef-408a-bda3-7bbd946164ab",
            "id": "2f245a7b-796b-4f26-9cf9-9e82d248fda7",
            "status": "ACTIVE"
        },
        {
            "router_id": null,
            "tenant_id": "4969c491a3c74ee4af974e6d800c62de",
            "floating_network_id": "376da547-b977-4cfe-9cba-275c80debf57",
            "fixed_ip_address": null,
            "floating_ip_address": "172.24.4.227",
            "port_id": null,
            "id": "61cea855-49cb-4846-997d-801b70c71bdd",
            "status": "DOWN"
        }
    ]
}

This operation does not accept a request body.

POST
/v2.0/floatingips
Create floating IP

Creates a floating IP, and, if you specify port information, associates the floating IP with an internal port.

 

If you do not specify port information in the request, you can issue an PUT request.

You can create floating IPs on external networks only. If you specify a network that is not external, such as router:external=False, the operation returns a 400 error.

If you do not specify a floating IP address in the request, the operation automatically allocates an address for the floating IP. If the requested floating IP address does not fall in the subnet range for the external network, the operation returns a 400 error. If the requested floating IP address is already in use, the operation returns a 409 error code.

You can associate the floating IP with an internal port by using the port ID attribute in the request body. If you specify a port ID that is not valid, the operation returns a 404 error code.

You must configure an IP address with the internal OpenStack Networking port associated with the floating IP or the operation returns a 400 error code. Because an OpenStack Networking port might be associated with multiple IP addresses, you can use the fixed_ip_address attribute in the request body to associate a particular IP address with the floating IP.

By default, this operation associates the floating IP with a single IP address that is configured on a port. Therefore, if a port has multiple IP addresses, you must specify the fixed_ip_address attribute.

If you specify an IP address that is not valid in the fixed_ip_address attribute, the operation returns a 400 error code. If the internal OpenStack Networking port and specified IP address are already associated with another floating IP, the operation returns a 409 error code.

Normal response codes
201
Error response codes
badRequest (400), unauthorized (401), conflict (409)
Request parameters
Parameter Style Type Description
floatingip plain xsd:string

A floatingip object. When you associate a floating IP address with a VM, the instance has the same public IP address each time that it boots, basically to maintain a consistent IP address for maintaining DNS assignment.

tenant_id plain csapi:uuid

The tenant ID.

floating_network_id plain csapi:uuid

The ID of the network associated with the floating IP.

fixed_ip_address (Optional) plain xsd:string

The fixed IP address associated with the floating IP. If you intend to associate the floating IP with a fixed IP at creation time, then you must indicate the identifier of the internal port. If an internal port has multiple associated IP addresses, the service chooses the first IP unless you explicitly specify the parameter fixed_ip_address to select a specific IP.

floating_ip_address (Optional) plain xsd:string

The floating IP address.

port_id plain csapi:uuid

The port ID.

Response parameters
Parameter Style Type Description
floatingip plain xsd:string

A floatingip object. When you associate a floating IP address with a VM, the instance has the same public IP address each time that it boots, basically to maintain a consistent IP address for maintaining DNS assignment.

fixed_ip_address plain xsd:string

The fixed IP address associated with the floating IP.

floating_ip_address plain xsd:string

The floating IP address.

floating_network_id plain csapi:uuid

The ID of the network associated with the floating IP.

id plain csapi:uuid

The ID of the floating IP address.

port_id plain csapi:uuid

The port ID.

router_id plain csapi:uuid

The router ID.

status plain xsd:string

The floating IP status.

tenant_id plain csapi:uuid

The tenant ID.

{
    "floatingip": {
        "floating_network_id": "376da547-b977-4cfe-9cba-275c80debf57",
        "port_id": "ce705c24-c1ef-408a-bda3-7bbd946164ab"
    }
}
{
    "floatingip": {
        "fixed_ip_address": "10.0.0.3",
        "floating_ip_address": "172.24.4.228",
        "floating_network_id": "376da547-b977-4cfe-9cba-275c80debf57",
        "id": "2f245a7b-796b-4f26-9cf9-9e82d248fda7",
        "port_id": "ce705c24-c1ef-408a-bda3-7bbd946164ab",
        "router_id": "d23abc8d-2991-4a55-ba98-2aaea84cc72f",
        "status": "ACTIVE",
        "tenant_id": "4969c491a3c74ee4af974e6d800c62de"
    }
}
GET
/v2.0/floatingips/​{floatingip_id}​
Show floating IP details

Shows details for a specified floating IP.

 

Use the fields query parameter to control which fields are returned in the response body. For information, see Filtering and Column Selection in the OpenStack Networking API v2.0 Reference .

This example request shows details for a floating IP in JSON format. This example also filters the result by the fixed_ip_address and floating_ip_address fields.

GET /v2.0/floatingips/{floatingip_id}?fields=fixed_ip_address&fields=floating_ip_address
Accept: application/json
Normal response codes
200
Error response codes
unauthorized (401), forbidden (403), itemNotFound (404)
Request parameters
Parameter Style Type Description
floatingip_id URI csapi:UUID

The UUID of the floating IP.

Response parameters
Parameter Style Type Description
floatingip plain xsd:string

A floatingip object. When you associate a floating IP address with a VM, the instance has the same public IP address each time that it boots, basically to maintain a consistent IP address for maintaining DNS assignment.

floating_network_id plain csapi:uuid

The ID of the network associated with the floating IP.

router_id plain csapi:uuid

The router ID.

fixed_ip_address plain xsd:string

The fixed IP address associated with the floating IP.

floating_ip_address plain xsd:string

The floating IP address.

tenant_id plain csapi:uuid

The tenant ID.

status plain xsd:string

The floating IP status.

port_id plain csapi:uuid

The port ID.

id plain csapi:uuid

The ID of the floating IP address.

{
    "floatingip": {
        "floating_network_id": "376da547-b977-4cfe-9cba-275c80debf57",
        "router_id": "d23abc8d-2991-4a55-ba98-2aaea84cc72f",
        "fixed_ip_address": "10.0.0.3",
        "floating_ip_address": "172.24.4.228",
        "tenant_id": "4969c491a3c74ee4af974e6d800c62de",
        "status": "ACTIVE",
        "port_id": "ce705c24-c1ef-408a-bda3-7bbd946164ab",
        "id": "2f245a7b-796b-4f26-9cf9-9e82d248fda7"
    }
}

This operation does not accept a request body.

PUT
/v2.0/floatingips/​{floatingip_id}​
Update floating IP

Updates a floating IP and its association with an internal port.

 

The association process is the same as the process for the create floating IP operation.

To disassociate a floating IP from a port, set the port_id attribute to null or omit it from the request body.

This example updates a floating IP:

PUT /v2.0/floatingips/{floatingip_id}
Accept: application/json

Depending on the request body that you submit, this request associates a port with or disassociates a port from a floating IP.

Normal response codes
200
Error response codes
badRequest (400), unauthorized (401), itemNotFound (404), conflict (409)
Request parameters
Parameter Style Type Description
floatingip_id URI csapi:UUID

The UUID of the floating IP.

port_id plain csapi:uuid

The port ID.

Response parameters
Parameter Style Type Description
floatingip plain xsd:string

A floatingip object. When you associate a floating IP address with a VM, the instance has the same public IP address each time that it boots, basically to maintain a consistent IP address for maintaining DNS assignment.

floating_network_id plain csapi:uuid

The ID of the network associated with the floating IP.

router_id plain csapi:uuid

The router ID.

fixed_ip_address plain xsd:string

The fixed IP address associated with the floating IP.

floating_ip_address plain xsd:string

The floating IP address.

tenant_id plain csapi:uuid

The tenant ID.

status plain xsd:string

The floating IP status.

port_id plain csapi:uuid

The port ID.

id plain csapi:uuid

The ID of the floating IP address.

{
    "floatingip": {
        "port_id": "fc861431-0e6c-4842-a0ed-e2363f9bc3a8"
    }
}
{
    "floatingip": {
        "port_id": null
    }
}
{
    "floatingip": {
        "floating_network_id": "376da547-b977-4cfe-9cba-275c80debf57",
        "router_id": "d23abc8d-2991-4a55-ba98-2aaea84cc72f",
        "fixed_ip_address": "10.0.0.4",
        "floating_ip_address": "172.24.4.228",
        "tenant_id": "4969c491a3c74ee4af974e6d800c62de",
        "status": "ACTIVE",
        "port_id": "fc861431-0e6c-4842-a0ed-e2363f9bc3a8",
        "id": "2f245a7b-796b-4f26-9cf9-9e82d248fda7"
    }
}
{
    "floatingip": {
        "floating_network_id": "376da547-b977-4cfe-9cba-275c80debf57",
        "router_id": "d23abc8d-2991-4a55-ba98-2aaea84cc72f",
        "fixed_ip_address": null,
        "floating_ip_address": "172.24.4.228",
        "tenant_id": "4969c491a3c74ee4af974e6d800c62de",
        "status": "ACTIVE",
        "port_id": null,
        "id": "2f245a7b-796b-4f26-9cf9-9e82d248fda7"
    }
}
DELETE
/v2.0/floatingips/​{floatingip_id}​
Delete floating IP

Deletes a floating IP and, if present, its associated port.

 

This example deletes a floating IP:

DELETE /v2.0/floatingips/{floatingip_id}
Accept: application/json
Normal response codes
204
Error response codes
unauthorized (401), itemNotFound (404)
Request parameters
Parameter Style Type Description
floatingip_id URI csapi:UUID

The UUID of the floating IP.

This operation does not accept a request body and does not return a response body.

Metering labels and rules

Create, modify, and delete OpenStack Layer3 Metering labels and rules.

GET
/v2.0/metering/metering-labels
List metering labels

Lists all l3 metering labels that belong to the specified tenant.

 

The list includes the unique ID for each metering labels.

This operation does not require a request body.

This operation returns a response body.

Normal response codes
200
Error response codes
unauthorized (401)
GET /v2.0/metering/metering-labels HTTP/1.1
Host: controlnode:9696
User-Agent: python-neutronclient
Content-Type: application/json
Accept: application/json
X-Auth-Token: c52a1b304fec4ca0ac85dc1741eec6e2
{
    "metering_labels": [
        {
            "tenant_id": "45345b0ee1ea477fac0f541b2cb79cd4",
            "description": "label1 description",
            "name": "label1",
            "id": "a6700594-5b7a-4105-8bfe-723b346ce866"
        },
        {
            "tenant_id": "45345b0ee1ea477fac0f541b2cb79cd4",
            "description": "label2 description",
            "name": "label2",
            "id": "e131d186-b02d-4c0b-83d5-0c0725c4f812"
        }
    ]
}
POST
/v2.0/metering/metering-labels
Create metering label

Creates a l3 metering label.

 

This operation requires a request body.

The following table describes the required and optional attributes in the request body:

Create Metering label rule Request Attributes
Attribute Required Description

name

Required

The name of the metering label.

description

Optional

Description for the metering label.

This operation returns a response body, which contains the following informations about the metering label:

  • name. Name of the metering label.

  • description. Description of the metering label.

  • tenant_id. The tenant ID for the specified metering label.

  • id. The metering label ID

Normal response codes
201
Error response codes
badRequest (400), unauthorized (401)
{
    "metering_label": {
        "name": "label1",
        "description": "description of label1"
    }
}
{
    "metering_label": {
        "tenant_id": "45345b0ee1ea477fac0f541b2cb79cd4",
        "description": "description of label1",
        "name": "label1",
        "id": "bc91b832-8465-40a7-a5d8-ba87de442266"
    }
}
GET
/v2.0/metering/metering-labels/​{metering_label_id}​
Show metering label

Shows informations for a specified metering label.

 

This operation does not require a request body.

This operation returns a response body that contains the description, name, ID.

Normal response codes
200
Error response codes
unauthorized (401), itemNotFound (404)
Request parameters
Parameter Style Type Description
metering_label_id URI csapi:uuid

The unique identifier of the metering label.

GET /v2.0/metering/metering-labels/a6700594-5b7a-4105-8bfe-723b346ce866 HTTP/1.1
Host: controlnode:9696
User-Agent: python-neutronclient
Content-Type: application/json
Accept: application/json
X-Auth-Token: c52a1b304fec4ca0ac85dc1741eec6e2
{
    "metering_label": {
        "tenant_id": "45345b0ee1ea477fac0f541b2cb79cd4",
        "description": "label1 description",
        "name": "label1",
        "id": "a6700594-5b7a-4105-8bfe-723b346ce866"
    }
}
DELETE
/v2.0/metering/metering-labels/​{metering_label_id}​
Delete metering label

Deletes a l3 metering label.

 

This operation deletes a l3 metering label.

This operation does not require a request body. This operation does not return a response body.

Normal response codes
204
Error response codes
unauthorized (401), itemNotFound (404)
Request parameters
Parameter Style Type Description
metering_label_id URI csapi:uuid

The unique identifier of the metering label.

DELETE /v2.0/metering/metering-labels/a6700594-5b7a-4105-8bfe-723b346ce866 HTTP/1.1
Host: controlnode:9696
User-Agent: python-neutronclient
Content-Type: application/json
Accept: application/json
X-Auth-Token: c52a1b304fec4ca0ac85dc1741eec6e2
status: 204
GET
/v2.0/metering/metering-label-rules
List metering label rules

Lists a summary of all l3 metering label rules belonging to the specified tenant.

 

The list provides the unique ID for each metering label rule.

This operation does not require a request body. This operation returns a response body.

Normal response codes
200
Error response codes
unauthorized (401)
GET /v2.0/metering/metering-label-rules HTTP/1.1
Host: controlnode:9696
User-Agent: python-neutronclient
Content-Type: application/json
Accept: application/json
X-Auth-Token: c52a1b304fec4ca0ac85dc1741eec6e2
{
    "metering_label_rules": [
        {
            "remote_ip_prefix": "20.0.0.0/24",
            "direction": "ingress",
            "metering_label_id": "e131d186-b02d-4c0b-83d5-0c0725c4f812",
            "id": "9536641a-7d14-4dc5-afaf-93a973ce0eb8",
            "excluded": false
        },
        {
            "remote_ip_prefix": "10.0.0.0/24",
            "direction": "ingress",
            "metering_label_id": "e131d186-b02d-4c0b-83d5-0c0725c4f812",
            "id": "ffc6fd15-40de-4e7d-b617-34d3f7a93aec",
            "excluded": false
        }
    ]
}
POST
/v2.0/metering/metering-label-rules
Create metering label rule

Creates a l3 metering label rule.

 

This operation requires a request body.

The following table describes the required and optional attributes in the request body:

Create Metering label rule Request Attributes
Attribute Required Description

direction

Optional

Ingress or egress: The direction in which metering rule is applied. Default: ingress

metering_label_id

Required

The meteting label ID to associate with this metering rule.

excluded

Optional

Specify whether the remote_ip_prefix will be excluded or not from traffic counters of the metering label, ie: to not count the traffic of a specific IP address of a range. Default: False

remote_ip_prefix

Required

The remote IP prefix to be associated with this metering rule. packet.

This operation returns a response body.

Normal response codes
201
Error response codes
badRequest (400), unauthorized (401), itemNotFound (404), buildInProgress (409)
{
    "metering_label_rule": {
        "remote_ip_prefix": "10.0.1.0/24",
        "direction": "ingress",
        "metering_label_id": "e131d186-b02d-4c0b-83d5-0c0725c4f812"
    }
}
{
    "metering_label_rule": {
        "remote_ip_prefix": "10.0.1.0/24",
        "direction": "ingress",
        "metering_label_id": "e131d186-b02d-4c0b-83d5-0c0725c4f812",
        "id": "00e13b58-b4f2-4579-9c9c-7ac94615f9ae",
        "excluded": false
    }
}
GET
/v2.0/metering/metering-label-rules/​{metering-label-rule-id}​
Show metering label rule

Shows detailed informations for a specified metering label rule.

 

This operation does not require a request body.

This operation returns a response body, which contains the following informations about the metering label rule:

  • direction. Either ingress or egress.

  • excluded. Either True or False.

  • The ID for the specified metering label rule

  • The remote IP prefix

  • The metering label ID for the metering label with which the rule is associated

Normal response codes
200
Error response codes
unauthorized (401), itemNotFound (404)
Request parameters
Parameter Style Type Description
metering-label-rule-id URI csapi:uuid

The unique identifier of metering label rule.

GET /v2.0/metering/metering-label-rules/9536641a-7d14-4dc5-afaf-93a973ce0eb8 HTTP/1.1
Host: controlnode:9696
User-Agent: python-neutronclient
Content-Type: application/json
Accept: application/json
X-Auth-Token: c52a1b304fec4ca0ac85dc1741eec6e2
{
    "metering_label_rule": {
        "remote_ip_prefix": "20.0.0.0/24",
        "direction": "ingress",
        "metering_label_id": "e131d186-b02d-4c0b-83d5-0c0725c4f812",
        "id": "9536641a-7d14-4dc5-afaf-93a973ce0eb8",
        "excluded": false
    }
}
DELETE
/v2.0/metering/metering-label-rules/​{metering-label-rule-id}​
Delete metering label rule

Deletes a specified l3 metering label rule.

 

This operation does not require a request body.

This operation does not return a response body.

Normal response codes
204
Error response codes
unauthorized (401), itemNotFound (404)
Request parameters
Parameter Style Type Description
metering-label-rule-id URI csapi:uuid

The unique identifier of metering label rule.

DELETE /v2.0/metering/metering-labels/37b31179-71ee-4f0a-b130-0eeb28e7ede7 HTTP/1.1
Host: controlnode:9696
User-Agent: python-neutronclient
Content-Type: application/json
Accept: application/json
X-Auth-Token: c52a1b304fec4ca0ac85dc1741eec6e2
status: 204

Load-Balancer-as-a-Service (LBaaS) 1.0 (STABLE)

The LBaaS version 1.0 extension pairs with the Networking 2.0 API to enable OpenStack tenants to manage load balancers for their VMs. With this extension you can load-balance client traffic from one network to application services, such as VMs, on the same network.

Use this extension to create and manage virtual IP addresses (VIPs), pools, members of a pool, health monitors associated with a pool, and view status of a resource.

Load balancer statuses
Status Description
ACTIVE Resource is ready and active.
PENDING_CREATE Resource is being created.
PENDING_UPDATE Resource is being updated.
PENDING_DELETE Resource is going to be deleted.
INACTIVE Resource is created but not active.
ERROR Object within the service is not working. Look for an extra attribute called error_details for a textual explanation on the error, its cause, and possibly a solution.
GET
/v2.0/lb/vips
List VIPs

Lists VIPs.

 
Normal response codes
200
Error response codes
unauthorized (401), forbidden (403)
Response parameters
Parameter Style Type Description
id plain csapi:uuid

The unique ID for the VIP.

tenant_id plain csapi:uuid

The ID of the tenant who owns the VIP. Only administrative users can specify a tenant ID other than their own.

name plain xsd:string

Human-readable name for the VIP. Does not have to be unique.

description plain xsd:string

Human-readable description for the VIP.

subnet_id plain csapi:uuid

The ID of the subnet on which to allocate the VIP address.

address plain xsd:ip

The IP address of the VIP.

protocol plain xsd:string

The protocol of the VIP address. A valid value is TCP, HTTP, or HTTPS.

protocol_port plain xsd:int

The port on which to listen to client traffic that is associated with the VIP address. A valid value is from 0 to 65535.

pool_id plain csapi:uuid

The ID of the pool with which the VIP is associated.

session_persistence plain xsd:dict

Session persistence parameters for the VIP. Omit the session_persistence parameter to prevent session persistence. When no session persistence is used, the session_persistence parameter does not appear in the API response. To clear session persistence for the VIP, set the session_persistence parameter to null in a VIP update request.

connection_limit plain xsd:int

The maximum number of connections allowed for the VIP. Default is -1, meaning no limit.

admin_state_up plain xsd:boolean

The administrative state of the VIP. A valid value is true (UP) or false (DOWN).

status plain xsd:string

The status of the VIP. Indicates whether the VIP is operational.

{
    "vips": [
        {
            "status": "ACTIVE",
            "protocol": "HTTP",
            "description": "",
            "admin_state_up": true,
            "subnet_id": "8032909d-47a1-4715-90af-5153ffe39861",
            "tenant_id": "83657cfcdfe44cd5920adaf26c48ceea",
            "connection_limit": 1000,
            "pool_id": "72741b06-df4d-4715-b142-276b6bce75ab",
            "session_persistence": {
                "cookie_name": "MyAppCookie",
                "type": "APP_COOKIE"
            },
            "address": "10.0.0.10",
            "protocol_port": 80,
            "port_id": "b5a743d6-056b-468b-862d-fb13a9aa694e",
            "id": "4ec89087-d057-4e2c-911f-60a3b47ee304",
            "name": "my-vip"
        }
    ]
}

This operation does not accept a request body.

POST
/v2.0/lb/vips
Create a load balancer VIP

Creates a load balancer VIP.

 
Normal response codes
201
Error response codes
badRequest (400), unauthorized (401)
Request parameters
Parameter Style Type Description
tenant_id plain csapi:uuid

The ID of the tenant who owns the VIP. Only administrative users can specify a tenant ID other than their own.

name (Optional) plain xsd:string

Human-readable name for the VIP. Does not have to be unique.

description (Optional) plain xsd:string

Human-readable description for the VIP.

subnet_id (Optional) plain csapi:uuid

The ID of the subnet on which to allocate the VIP address.

address (Optional) plain xsd:ip

The IP address of the VIP.

protocol plain xsd:string

The protocol of the VIP address. A valid value is TCP, HTTP, or HTTPS.

protocol_port plain xsd:int

The port on which to listen to client traffic that is associated with the VIP address. A valid value is from 0 to 65535.

pool_id (Optional) plain csapi:uuid

The ID of the pool with which the VIP is associated.

session_persistence (Optional) plain xsd:dict

Session persistence parameters for the VIP. Omit the session_persistence parameter to prevent session persistence. When no session persistence is used, the session_persistence parameter does not appear in the API response. To clear session persistence for the VIP, set the session_persistence parameter to null in a VIP update request.

connection_limit (Optional) plain xsd:int

The maximum number of connections allowed for the VIP. Value is -1 if the limit is not set.

admin_state_up (Optional) plain xsd:boolean

The administrative state of the VIP. A valid value is true (UP) or false (DOWN).

Response parameters
Parameter Style Type Description
id plain csapi:uuid

The unique ID for the VIP.

tenant_id plain csapi:uuid

The ID of the tenant who owns the VIP. Only administrative users can specify a tenant ID other than their own.

name plain xsd:string

Human-readable name for the VIP. Does not have to be unique.

description plain xsd:string

Human-readable description for the VIP.

subnet_id plain csapi:uuid

The ID of the subnet on which to allocate the VIP address.

address plain xsd:ip

The IP address of the VIP.

protocol plain xsd:string

The protocol of the VIP address. A valid value is TCP, HTTP, or HTTPS.

protocol_port plain xsd:int

The port on which to listen to client traffic that is associated with the VIP address. A valid value is from 0 to 65535.

pool_id plain csapi:uuid

The ID of the pool with which the VIP is associated.

session_persistence plain xsd:dict

Session persistence parameters for the VIP. Omit the session_persistence parameter to prevent session persistence. When no session persistence is used, the session_persistence parameter does not appear in the API response. To clear session persistence for the VIP, set the session_persistence parameter to null in a VIP update request.

connection_limit plain xsd:int

The maximum number of connections allowed for the VIP. Default is -1, meaning no limit.

admin_state_up plain xsd:boolean

The administrative state of the VIP. A valid value is true (UP) or false (DOWN).

status plain xsd:string

The status of the VIP. Indicates whether the VIP is operational.

{
    "vip": {
        "protocol": "HTTP",
        "name": "NewVip",
        "admin_state_up": true,
        "subnet_id": "8032909d-47a1-4715-90af-5153ffe39861",
        "pool_id": "61b1f87a-7a21-4ad3-9dda-7f81d249944f",
        "protocol_port": "80"
    }
}
{
    "vip": {
        "status": "PENDING_CREATE",
        "protocol": "HTTP",
        "description": "",
        "admin_state_up": true,
        "subnet_id": "8032909d-47a1-4715-90af-5153ffe39861",
        "tenant_id": "83657cfcdfe44cd5920adaf26c48ceea",
        "connection_limit": -1,
        "pool_id": "61b1f87a-7a21-4ad3-9dda-7f81d249944f",
        "address": "10.0.0.11",
        "protocol_port": 80,
        "port_id": "f7e6fe6a-b8b5-43a8-8215-73456b32e0f5",
        "id": "c987d2be-9a3c-4ac9-a046-e8716b1350e2",
        "name": "NewVip"
    }
}
GET
/v2.0/lb/vips/​{vip_id}​
Show VIP details

Shows details for a specified VIP.

 
Normal response codes
200
Error response codes
unauthorized (401), forbidden (403), itemNotFound (404)
Request parameters
Parameter Style Type Description
vip_id URI csapi:UUID The UUID for the VIP.
Response parameters
Parameter Style Type Description
id plain csapi:uuid

The unique ID for the VIP.

tenant_id plain csapi:uuid

The ID of the tenant who owns the VIP. Only administrative users can specify a tenant ID other than their own.

name plain xsd:string

Human-readable name for the VIP. Does not have to be unique.

description plain xsd:string

Human-readable description for the VIP.

subnet_id plain csapi:uuid

The ID of the subnet on which to allocate the VIP address.

address plain xsd:ip

The IP address of the VIP.

protocol plain xsd:string

The protocol of the VIP address. A valid value is TCP, HTTP, or HTTPS.

protocol_port plain xsd:int

The port on which to listen to client traffic that is associated with the VIP address. A valid value is from 0 to 65535.

pool_id plain csapi:uuid

The ID of the pool with which the VIP is associated.

session_persistence plain xsd:dict

Session persistence parameters for the VIP. Omit the session_persistence parameter to prevent session persistence. When no session persistence is used, the session_persistence parameter does not appear in the API response. To clear session persistence for the VIP, set the session_persistence parameter to null in a VIP update request.

connection_limit plain xsd:int

The maximum number of connections allowed for the VIP. Default is -1, meaning no limit.

admin_state_up plain xsd:boolean

The administrative state of the VIP. A valid value is true (UP) or false (DOWN).

status plain xsd:string

The status of the VIP. Indicates whether the VIP is operational.

{
    "vip": {
        "status": "ACTIVE",
        "protocol": "HTTP",
        "description": "",
        "admin_state_up": true,
        "subnet_id": "8032909d-47a1-4715-90af-5153ffe39861",
        "tenant_id": "83657cfcdfe44cd5920adaf26c48ceea",
        "connection_limit": 1000,
        "pool_id": "72741b06-df4d-4715-b142-276b6bce75ab",
        "session_persistence": {
            "cookie_name": "MyAppCookie",
            "type": "APP_COOKIE"
        },
        "address": "10.0.0.10",
        "protocol_port": 80,
        "port_id": "b5a743d6-056b-468b-862d-fb13a9aa694e",
        "id": "4ec89087-d057-4e2c-911f-60a3b47ee304",
        "name": "my-vip"
    }
}

This operation does not accept a request