From 3fe13e237d8cdfaaca4863c10d35024159edde1c Mon Sep 17 00:00:00 2001 From: Hirofumi Ichihara Date: Thu, 23 Feb 2017 15:41:33 -0500 Subject: [PATCH] api-ref: provider and multiple provider are allowed to update In update network section of api-ref, provider and multiple provider extension should be described because neutron allows users to update them. ML2 plugin doesn't allow us to update them but there is the use case in other plugin[1]. [1]: https://review.openstack.org/#/c/421961/ Change-Id: I43aabbf6131628df9008455fa7fd8d6144900ef4 --- api-ref/source/v2/networks.inc | 21 +++++++++++++++++-- .../network-multi-create-request.json | 8 +++---- .../network-multi-create-response.json | 6 +++--- .../networks/network-multi-show-response.json | 6 +++--- .../network-multi-update-request.json | 15 +++++++++++++ .../network-provider-create-request.json | 2 +- .../network-provider-create-response.json | 2 +- .../network-provider-update-request.json | 7 +++++++ .../networks-provider-list-response.json | 6 +++--- 9 files changed, 56 insertions(+), 17 deletions(-) create mode 100644 api-ref/source/v2/samples/networks/network-multi-update-request.json create mode 100644 api-ref/source/v2/samples/networks/network-provider-update-request.json diff --git a/api-ref/source/v2/networks.inc b/api-ref/source/v2/networks.inc index 8e12026b5..b9b846663 100644 --- a/api-ref/source/v2/networks.inc +++ b/api-ref/source/v2/networks.inc @@ -20,8 +20,9 @@ vary across ``provider:network_type``. For example, ``vlan`` and ``flat`` network types require ``provider:physical_network`` attribute, but ``vxlan`` network type does not. -Most Networking plug-ins and drivers do not support updating any provider -related attributes. +Most Networking plug-ins (e.g. ML2 Plugin) and drivers do not support updating +any provider related attributes. Check your plug-in whether it supports +updating. multiple provider extension =========================== @@ -142,8 +143,12 @@ Request - admin_state_up: network-admin_state_up-request - name: network-name-request - port_security_enabled: network-port_security_enabled-request + - provider:network_type: provider:network_type + - provider:physical_network: provider:physical_network + - provider:segmentation_id: provider:segmentation_id - qos_policy_id: qos_policy_id-request - router:external: router:external-request + - segments: segments - shared: network-shared-request - description: description-request @@ -153,6 +158,18 @@ Request Example .. literalinclude:: samples/networks/network-update-request.json :language: javascript +Request Example (admin user; single segment mapping) +---------------------------------------------------- + +.. literalinclude:: samples/networks/network-provider-update-request.json + :language: javascript + +Request Example (admin user; multiple segment mappings) +------------------------------------------------------- + +.. literalinclude:: samples/networks/network-multi-update-request.json + :language: javascript + Response Parameters ------------------- diff --git a/api-ref/source/v2/samples/networks/network-multi-create-request.json b/api-ref/source/v2/samples/networks/network-multi-create-request.json index 5a2594c10..2e19b981f 100644 --- a/api-ref/source/v2/samples/networks/network-multi-create-request.json +++ b/api-ref/source/v2/samples/networks/network-multi-create-request.json @@ -2,13 +2,13 @@ "network": { "segments": [ { - "provider:segmentation_id": "2", - "provider:physical_network": "8bab8453-1bc9-45af-8c70-f83aa9b50453", + "provider:segmentation_id": 2, + "provider:physical_network": "public", "provider:network_type": "vlan" }, { - "provider:physical_network": "8bab8453-1bc9-45af-8c70-f83aa9b50453", - "provider:network_type": "stt" + "provider:physical_network": "default", + "provider:network_type": "flat" } ], "name": "net1", diff --git a/api-ref/source/v2/samples/networks/network-multi-create-response.json b/api-ref/source/v2/samples/networks/network-multi-create-response.json index 1ed5439e9..212e30fb7 100644 --- a/api-ref/source/v2/samples/networks/network-multi-create-response.json +++ b/api-ref/source/v2/samples/networks/network-multi-create-response.json @@ -10,13 +10,13 @@ "segments": [ { "provider:segmentation_id": 2, - "provider:physical_network": "8bab8453-1bc9-45af-8c70-f83aa9b50453", + "provider:physical_network": "public", "provider:network_type": "vlan" }, { "provider:segmentation_id": null, - "provider:physical_network": "8bab8453-1bc9-45af-8c70-f83aa9b50453", - "provider:network_type": "stt" + "provider:physical_network": "default", + "provider:network_type": "flat" } ], "shared": false, diff --git a/api-ref/source/v2/samples/networks/network-multi-show-response.json b/api-ref/source/v2/samples/networks/network-multi-show-response.json index 1b186a6e2..3fa975338 100644 --- a/api-ref/source/v2/samples/networks/network-multi-show-response.json +++ b/api-ref/source/v2/samples/networks/network-multi-show-response.json @@ -16,12 +16,12 @@ "segments": [ { "provider:network_type": "vlan", - "provider:physical_network": "8bab8453-1bc9-45af-8c70-f83aa9b50453", + "provider:physical_network": "public", "provider:segmentation_id": 2 }, { - "provider:network_type": "stt", - "provider:physical_network": "8bab8453-1bc9-45af-8c70-f83aa9b50453", + "provider:network_type": "flat", + "provider:physical_network": "default", "provider:segmentation_id": 0 } ], diff --git a/api-ref/source/v2/samples/networks/network-multi-update-request.json b/api-ref/source/v2/samples/networks/network-multi-update-request.json new file mode 100644 index 000000000..ba2247172 --- /dev/null +++ b/api-ref/source/v2/samples/networks/network-multi-update-request.json @@ -0,0 +1,15 @@ +{ + "network": { + "segments": [ + { + "provider:segmentation_id": 2, + "provider:physical_network": "public", + "provider:network_type": "vlan" + }, + { + "provider:physical_network": "default", + "provider:network_type": "flat" + } + ] + } +} diff --git a/api-ref/source/v2/samples/networks/network-provider-create-request.json b/api-ref/source/v2/samples/networks/network-provider-create-request.json index ca8e3d1b9..3957e3f80 100644 --- a/api-ref/source/v2/samples/networks/network-provider-create-request.json +++ b/api-ref/source/v2/samples/networks/network-provider-create-request.json @@ -3,7 +3,7 @@ "admin_state_up": true, "name": "net1", "provider:network_type": "vlan", - "provider:physical_network": "8bab8453-1bc9-45af-8c70-f83aa9b50453", + "provider:physical_network": "public", "provider:segmentation_id": 2, "qos_policy_id": "6a8454ade84346f59e8d40665f878b2e" } diff --git a/api-ref/source/v2/samples/networks/network-provider-create-response.json b/api-ref/source/v2/samples/networks/network-provider-create-response.json index 6115d5a2a..263bd4546 100644 --- a/api-ref/source/v2/samples/networks/network-provider-create-response.json +++ b/api-ref/source/v2/samples/networks/network-provider-create-response.json @@ -4,7 +4,7 @@ "subnets": [], "availability_zone_hints": [], "name": "net1", - "provider:physical_network": "8bab8453-1bc9-45af-8c70-f83aa9b50453", + "provider:physical_network": "public", "admin_state_up": true, "project_id": "9bacb3c5d39d41a79512987f338cf177", "tenant_id": "9bacb3c5d39d41a79512987f338cf177", diff --git a/api-ref/source/v2/samples/networks/network-provider-update-request.json b/api-ref/source/v2/samples/networks/network-provider-update-request.json new file mode 100644 index 000000000..7d1e1a54d --- /dev/null +++ b/api-ref/source/v2/samples/networks/network-provider-update-request.json @@ -0,0 +1,7 @@ +{ + "network": { + "provider:network_type": "vlan", + "provider:physical_network": "public", + "provider:segmentation_id": 2 + } +} diff --git a/api-ref/source/v2/samples/networks/networks-provider-list-response.json b/api-ref/source/v2/samples/networks/networks-provider-list-response.json index 3411e4342..c93e96ab6 100644 --- a/api-ref/source/v2/samples/networks/networks-provider-list-response.json +++ b/api-ref/source/v2/samples/networks/networks-provider-list-response.json @@ -13,7 +13,7 @@ "port_security_enabled": true, "project_id": "4fd44f30292945e481c7b8a0c8908869", "provider:network_type": "vlan", - "provider:physical_network": "8bab8453-1bc9-45af-8c70-f83aa9b50453", + "provider:physical_network": "public", "provider:segmentation_id": 3, "router:external": false, "shared": false, @@ -45,12 +45,12 @@ "segments": [ { "provider:network_type": "vlan", - "provider:physical_network": "8bab8453-1bc9-45af-8c70-f83aa9b50453", + "provider:physical_network": "public", "provider:segmentation_id": 2 }, { "provider:network_type": "stt", - "provider:physical_network": "8bab8453-1bc9-45af-8c70-f83aa9b50453", + "provider:physical_network": "default", "provider:segmentation_id": 0 } ],