Neutron: POST network response contains "multiple provider" extension attributes

Bug #1373423 reported by Jamie Hannaford
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openstack-api-site
Fix Released
Medium
Nguyen Phuong An

Bug Description

When creating a new network, the documented JSON response is this:

{
    "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,
        "port_security_enabled": true,
        "id": "4e8e5957-649f-477b-9e5b-f1f75b21c03c"
    }
}

But the "segments" attribute is specific to the "multiple providers" extension (http://docs.openstack.org/api/openstack-network/2.0/content/POST_createMultiNetwork__v2.0_networks_provider_multi_ext_ops.html), which allows networks to be associated with multiple providers. By default, this should not be embedded in the JSON response.

Tags: neutron
ZhiQiang Fan (aji-zqfan)
Changed in openstack-api-site:
assignee: nobody → ZhiQiang Fan (aji-zqfan)
Revision history for this message
ZhiQiang Fan (aji-zqfan) wrote :

I use devstack with very basic and default settings to test, after ./stack is succeeded, and type neutron --debug net-list, the result is:

RESP BODY: {"networks": [{"status": "ACTIVE", "subnets": ["ef020ffe-7a52-4b8f-82ff-1ab5422dac3f"], "name": "private", "provider:physical_network": null, "admin_state_up": true, "tenant_id": "b49f4e5efdef4d4b80ba1d7355107e88", "provider:network_type": "local", "router:external": false, "shared": false, "id": "40c878e4-3ef9-4eea-be67-31388a5ffbdf", "provider:segmentation_id": null}, {"status": "ACTIVE", "subnets": ["95a5157f-911b-415f-8f69-cc63279b7b10"], "name": "public", "provider:physical_network": null, "admin_state_up": true, "tenant_id": "c166203de9e14e77baf8b450c31a7c68", "provider:network_type": "local", "router:external": true, "shared": false, "id": "5f0836d9-e154-4937-969b-2eb26aa0e546", "provider:segmentation_id": null}]}

+--------------------------------------+---------+----------------------------------------------------+
| id | name | subnets |
+--------------------------------------+---------+----------------------------------------------------+
| 40c878e4-3ef9-4eea-be67-31388a5ffbdf | private | ef020ffe-7a52-4b8f-82ff-1ab5422dac3f 10.0.0.0/24 |
| 5f0836d9-e154-4937-969b-2eb26aa0e546 | public | 95a5157f-911b-415f-8f69-cc63279b7b10 172.24.4.0/24 |
+--------------------------------------+---------+----------------------------------------------------+

Revision history for this message
Jamie Hannaford (jamie-hannaford) wrote :

That's what I get too - but the "multiple providers" extension is enabled on my installation, so it's not an accurate portrayal of the default installation.

What extensions are enabled or installed in your neutron.conf?

Revision history for this message
ZhiQiang Fan (aji-zqfan) wrote :

$ neutron ext-list
+-----------------------+-----------------------------------------------+
| alias | name |
+-----------------------+-----------------------------------------------+
| security-group | security-group |
| l3_agent_scheduler | L3 Agent Scheduler |
| ext-gw-mode | Neutron L3 Configurable external gateway mode |
| binding | Port Binding |
| provider | Provider Network |
| agent | agent |
| quotas | Quota management support |
| dhcp_agent_scheduler | DHCP Agent Scheduler |
| l3-ha | HA Router extension |
| multi-provider | Multi Provider Network |
| external-net | Neutron external network |
| router | Neutron L3 Router |
| allowed-address-pairs | Allowed Address Pairs |
| extraroute | Neutron Extra Route |
| extra_dhcp_opt | Neutron Extra DHCP opts |
| dvr | Distributed Virtual Router |
+-----------------------+-----------------------------------------------+

these are enabled by devstack by default

Revision history for this message
Anne Gentle (annegentle) wrote :

It's possible to display multiple examples, so if you think you want to do that to fix this bug, you would update the WADL to point to multiple example responses.

https://github.com/openstack/api-site/blob/master/api-ref/src/wadls/netconn-api/src/os-layer3-ext.wadl

Changed in openstack-api-site:
status: New → Triaged
importance: Undecided → Medium
ZhiQiang Fan (aji-zqfan)
Changed in openstack-api-site:
assignee: ZhiQiang Fan (aji-zqfan) → nobody
Revision history for this message
Atsushi SAKAI (sakaia) wrote :
Atsushi SAKAI (sakaia)
tags: added: neutron
Changed in openstack-api-site:
status: Triaged → Fix Released
Changed in openstack-api-site:
assignee: nobody → Nguyen Phuong An (annp)
milestone: none → liberty
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.