List Networks

Verb URI Description
GET /networks Returns a list of networks with their provider networks attributes.

Normal Response Code: 200 OK

Error Response Codes: 401 Unauthorized

This operation returns, for each network, its provider network attributes as well as all the attributes normally returned by the list networks operation. Provider networks attribute are returned only if the user is authorized to view them.

 

Example 4.1. List Networks with provider attributes: JSON Response

{
  "networks": [
  {
    "status": "ACTIVE",
    "subnets": [],
    "name": "network-1",
    "admin_state_up": true,
    "tenant_id": "c1210485b2424d48804aad5d39c61b8f",
    "id": "3a06dfc7-d239-4aad-9a57-21cd171c72e5",
    "shared": false,
    "provider:network_type": "vlan",
    "provider:physical_network": "physnet_1",
    "provider:segmentation_id": 101
  },
  {
    "status": "ACTIVE",
    "subnets": [],
    "name": "network-2",
    "admin_state_up": true,
    "tenant_id": "c1210485b2424d48804aad5d39c61b8f",
    "id": "7db8c5a4-6eb0-478d-856b-7cfda2b25e13",
    "shared": false,
    "provider:network_type": "local",
    "provider:physical_network": null,
    "provider:segmentation_id": null
  }
 ]
}

 

Example 4.2. List Networks with provider attributes: XML Response

<?xml version='1.0' encoding='UTF-8'?>
<networks xmlns="http://openstack.org/neutron/api/v2.0"
    xmlns:provider="http://docs.openstack.org/ext/provider/api/v1.0"
    xmlns:neutron="http://openstack.org/neutron/api/v2.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <network>
        <status>ACTIVE</status>
        <name>network-1</name>
        <admin_state_up neutron:type="bool">True</admin_state_up>
        <tenant_id>c1210485b2424d48804aad5d39c61b8f</tenant_id>
        <shared neutron:type="bool">False</shared>
        <id>3a06dfc7-d239-4aad-9a57-21cd171c72e5</id>
        <provider:network_type>vlan</provider:network_type>
        <provider:physical_network>physnet_1</provider:physical_network>
        <provider:segmentation_id neutron:type="int"
            >101</provider:segmentation_id>
    </network>
    <network>
        <status>ACTIVE</status>
        <name>network-2</name>
        <admin_state_up neutron:type="bool">True</admin_state_up>
        <tenant_id>c1210485b2424d48804aad5d39c61b8f</tenant_id>
        <shared neutron:type="bool">False</shared>
        <id>7db8c5a4-6eb0-478d-856b-7cfda2b25e13</id>
        <provider:network_type>local</provider:network_type>
        <provider:physical_network xsi:nil="true"/>
        <provider:segmentation_id xsi:nil="true"/>
    </network>
</networks>

Questions? Discuss on ask.openstack.org
Found an error? Report a bug against this page


loading table of contents...