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.
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-1ab5422dac 3f"], "name": "private", "provider: physical_ network" : null, "admin_state_up": true, "tenant_id": "b49f4e5efdef4d 4b80ba1d7355107 e88", "provider: network_ type": "local", "router:external": false, "shared": false, "id": "40c878e4- 3ef9-4eea- be67-31388a5ffb df", "provider: segmentation_ id": null}, {"status": "ACTIVE", "subnets": ["95a5157f- 911b-415f- 8f69-cc63279b7b 10"], "name": "public", "provider: physical_ network" : null, "admin_state_up": true, "tenant_id": "c166203de9e14e 77baf8b450c31a7 c68", "provider: network_ type": "local", "router:external": true, "shared": false, "id": "5f0836d9- e154-4937- 969b-2eb26aa0e5 46", "provider: segmentation_ id": null}]}
+------ ------- ------- ------- ------- ----+-- ------- +------ ------- ------- ------- ------- ------- ------- ----+ ------- ------- ------- ------- ----+-- ------- +------ ------- ------- ------- ------- ------- ------- ----+ 3ef9-4eea- be67-31388a5ffb df | private | ef020ffe- 7a52-4b8f- 82ff-1ab5422dac 3f 10.0.0.0/24 | e154-4937- 969b-2eb26aa0e5 46 | public | 95a5157f- 911b-415f- 8f69-cc63279b7b 10 172.24.4.0/24 | ------- ------- ------- ------- ----+-- ------- +------ ------- ------- ------- ------- ------- ------- ----+
| id | name | subnets |
+------
| 40c878e4-
| 5f0836d9-
+------