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
This commit is contained in:
Hirofumi Ichihara 2017-02-23 15:41:33 -05:00
parent 16a6dd4d3e
commit 3fe13e237d
9 changed files with 56 additions and 17 deletions

View File

@ -20,8 +20,9 @@ vary across ``provider:network_type``. For example, ``vlan`` and ``flat``
network types require ``provider:physical_network`` attribute, but ``vxlan`` network types require ``provider:physical_network`` attribute, but ``vxlan``
network type does not. network type does not.
Most Networking plug-ins and drivers do not support updating any provider Most Networking plug-ins (e.g. ML2 Plugin) and drivers do not support updating
related attributes. any provider related attributes. Check your plug-in whether it supports
updating.
multiple provider extension multiple provider extension
=========================== ===========================
@ -142,8 +143,12 @@ Request
- admin_state_up: network-admin_state_up-request - admin_state_up: network-admin_state_up-request
- name: network-name-request - name: network-name-request
- port_security_enabled: network-port_security_enabled-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 - qos_policy_id: qos_policy_id-request
- router:external: router:external-request - router:external: router:external-request
- segments: segments
- shared: network-shared-request - shared: network-shared-request
- description: description-request - description: description-request
@ -153,6 +158,18 @@ Request Example
.. literalinclude:: samples/networks/network-update-request.json .. literalinclude:: samples/networks/network-update-request.json
:language: javascript :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 Response Parameters
------------------- -------------------

View File

@ -2,13 +2,13 @@
"network": { "network": {
"segments": [ "segments": [
{ {
"provider:segmentation_id": "2", "provider:segmentation_id": 2,
"provider:physical_network": "8bab8453-1bc9-45af-8c70-f83aa9b50453", "provider:physical_network": "public",
"provider:network_type": "vlan" "provider:network_type": "vlan"
}, },
{ {
"provider:physical_network": "8bab8453-1bc9-45af-8c70-f83aa9b50453", "provider:physical_network": "default",
"provider:network_type": "stt" "provider:network_type": "flat"
} }
], ],
"name": "net1", "name": "net1",

View File

@ -10,13 +10,13 @@
"segments": [ "segments": [
{ {
"provider:segmentation_id": 2, "provider:segmentation_id": 2,
"provider:physical_network": "8bab8453-1bc9-45af-8c70-f83aa9b50453", "provider:physical_network": "public",
"provider:network_type": "vlan" "provider:network_type": "vlan"
}, },
{ {
"provider:segmentation_id": null, "provider:segmentation_id": null,
"provider:physical_network": "8bab8453-1bc9-45af-8c70-f83aa9b50453", "provider:physical_network": "default",
"provider:network_type": "stt" "provider:network_type": "flat"
} }
], ],
"shared": false, "shared": false,

View File

@ -16,12 +16,12 @@
"segments": [ "segments": [
{ {
"provider:network_type": "vlan", "provider:network_type": "vlan",
"provider:physical_network": "8bab8453-1bc9-45af-8c70-f83aa9b50453", "provider:physical_network": "public",
"provider:segmentation_id": 2 "provider:segmentation_id": 2
}, },
{ {
"provider:network_type": "stt", "provider:network_type": "flat",
"provider:physical_network": "8bab8453-1bc9-45af-8c70-f83aa9b50453", "provider:physical_network": "default",
"provider:segmentation_id": 0 "provider:segmentation_id": 0
} }
], ],

View File

@ -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"
}
]
}
}

View File

@ -3,7 +3,7 @@
"admin_state_up": true, "admin_state_up": true,
"name": "net1", "name": "net1",
"provider:network_type": "vlan", "provider:network_type": "vlan",
"provider:physical_network": "8bab8453-1bc9-45af-8c70-f83aa9b50453", "provider:physical_network": "public",
"provider:segmentation_id": 2, "provider:segmentation_id": 2,
"qos_policy_id": "6a8454ade84346f59e8d40665f878b2e" "qos_policy_id": "6a8454ade84346f59e8d40665f878b2e"
} }

View File

@ -4,7 +4,7 @@
"subnets": [], "subnets": [],
"availability_zone_hints": [], "availability_zone_hints": [],
"name": "net1", "name": "net1",
"provider:physical_network": "8bab8453-1bc9-45af-8c70-f83aa9b50453", "provider:physical_network": "public",
"admin_state_up": true, "admin_state_up": true,
"project_id": "9bacb3c5d39d41a79512987f338cf177", "project_id": "9bacb3c5d39d41a79512987f338cf177",
"tenant_id": "9bacb3c5d39d41a79512987f338cf177", "tenant_id": "9bacb3c5d39d41a79512987f338cf177",

View File

@ -0,0 +1,7 @@
{
"network": {
"provider:network_type": "vlan",
"provider:physical_network": "public",
"provider:segmentation_id": 2
}
}

View File

@ -13,7 +13,7 @@
"port_security_enabled": true, "port_security_enabled": true,
"project_id": "4fd44f30292945e481c7b8a0c8908869", "project_id": "4fd44f30292945e481c7b8a0c8908869",
"provider:network_type": "vlan", "provider:network_type": "vlan",
"provider:physical_network": "8bab8453-1bc9-45af-8c70-f83aa9b50453", "provider:physical_network": "public",
"provider:segmentation_id": 3, "provider:segmentation_id": 3,
"router:external": false, "router:external": false,
"shared": false, "shared": false,
@ -45,12 +45,12 @@
"segments": [ "segments": [
{ {
"provider:network_type": "vlan", "provider:network_type": "vlan",
"provider:physical_network": "8bab8453-1bc9-45af-8c70-f83aa9b50453", "provider:physical_network": "public",
"provider:segmentation_id": 2 "provider:segmentation_id": 2
}, },
{ {
"provider:network_type": "stt", "provider:network_type": "stt",
"provider:physical_network": "8bab8453-1bc9-45af-8c70-f83aa9b50453", "provider:physical_network": "default",
"provider:segmentation_id": 0 "provider:segmentation_id": 0
} }
], ],