Update Neutron-Neutron Interconnections

- Move specification for Neutron-Neutron Interconnections RFE for
  implementation in Stein release,
- Remove redundant states from lifecycle FSM,
- Add remote_interconnection_id attribute to interconnection resource,
- Minor update in API exchange example.

Signed-off-by: Thomas Morin <thomas.morin@orange.com>
Submitted on behalf of a third-party: Orange

Change-Id: I30a886813cdca4ed47507bbff38aff2d4137b434
Related-Bug: 1750368
This commit is contained in:
ythomas1 2018-08-31 16:26:50 +02:00
parent 597f767e5c
commit c97f096695
2 changed files with 88 additions and 129 deletions

View File

@ -163,7 +163,7 @@ Note that only the API calls to the 'interconnection' resources at steps A1/A2
require write access to the "interconnection" resources by tenant users (but require write access to the "interconnection" resources by tenant users (but
not to the attributes related to the network mechanism to use). not to the attributes related to the network mechanism to use).
The calls at steps B1/B2, only require read-only access to these resources; The calls at steps B1/B2/B3, only require read-only access to these resources;
this can be achieved by introducing an "interconnection" role with read-only this can be achieved by introducing an "interconnection" role with read-only
access to all "interconnection" resources, and having each OpenStack deployment access to all "interconnection" resources, and having each OpenStack deployment
having credentials for a user with this role in other OpenStack deployments. having credentials for a user with this role in other OpenStack deployments.
@ -278,18 +278,13 @@ TO_VALIDATE
symmetric interconnection hasn't been validated yet symmetric interconnection hasn't been validated yet
VALIDATED VALIDATED
the existence of the symmetric interconnection has been validated the existence of the symmetric interconnection has been validated and local
interconnection parameters have been allocated (remote parameters are
ALLOCATED
local interconnection parameters have been defined (remote parameters are
still unknown) still unknown)
CONFIGURED
both local parameters and remote parameters are known, interconnection is
being built
ACTIVE ACTIVE
interconnection has been setup, it should work both local parameters and remote parameters are known, interconnection has
been setup, it should work
TEARDOWN TEARDOWN
local action taken to delete this interconnection, action local action taken to delete this interconnection, action
@ -306,8 +301,6 @@ TEARDOWN
BEFORE_CREATION [shape = beginpoint, label=""] BEFORE_CREATION [shape = beginpoint, label=""]
TO_VALIDATE TO_VALIDATE
VALIDATED VALIDATED
ALLOCATED
CONFIGURED
ACTIVE ACTIVE
TEARDOWN TEARDOWN
DELETED [shape = endpoint, label=""] DELETED [shape = endpoint, label=""]
@ -315,12 +308,8 @@ TEARDOWN
BEFORE_CREATION -> TO_VALIDATE [folded] BEFORE_CREATION -> TO_VALIDATE [folded]
TO_VALIDATE -> VALIDATED TO_VALIDATE -> VALIDATED
TO_VALIDATE -> TEARDOWN [folded] TO_VALIDATE -> TEARDOWN [folded]
VALIDATED -> ALLOCATED VALIDATED -> ACTIVE
VALIDATED -> TEARDOWN [folded] VALIDATED -> TEARDOWN [folded]
ALLOCATED -> CONFIGURED
ALLOCATED -> TEARDOWN [folded]
CONFIGURED -> ACTIVE
CONFIGURED -> TEARDOWN [folded]
ACTIVE -> TEARDOWN [folded] ACTIVE -> TEARDOWN [folded]
TEARDOWN -> DELETED [folded] TEARDOWN -> DELETED [folded]
ACTIVE -> TO_VALIDATE ACTIVE -> TO_VALIDATE
@ -329,66 +318,66 @@ TEARDOWN
REST API Impact REST API Impact
--------------- ---------------
The proposal is to introduce an API extension ``inter``, with a new The proposal is to introduce an API extension ``interconnection``, exposing a
``interconnection`` resource. new ``interconnection`` resource.
Interconnection resource Interconnection resource
~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~
The new ``interconnection`` API resource will be introduce under the The new ``interconnection`` API resource will be introduced under the
``inter`` API prefix, and having the following attributes: ``interconnection`` API prefix, and having the following attributes:
+------------------+--------+----------------+--------------------------------+ +-------------------------+--------+----------------+--------------------------------+
|Attribute Name |Type |Access | Comment | |Attribute Name |Type |Access | Comment |
+==================+========+================+================================+ +=========================+========+================+================================+
|id | uuid | RO | | |id | uuid | RO | |
+------------------+--------+----------------+--------------------------------+ +-------------------------+--------+----------------+--------------------------------+
|project_id | uuid | RO | | |project_id | uuid | RO | |
+------------------+--------+----------------+--------------------------------+ +-------------------------+--------+----------------+--------------------------------+
|type | enum | RO | ``router``, ``network_l2``, | |type | enum | RO | ``router``, ``network_l2``, |
| | | | ``network_l3`` | | | | | ``network_l3`` |
+------------------+--------+----------------+--------------------------------+ +-------------------------+--------+----------------+--------------------------------+
|state | enum | RO | see states in :ref:`lifecycle` | |state | enum | RO | see states in :ref:`lifecycle` |
| | | will be updated| | | | | will be updated| |
| | | by Neutron | | | | | by Neutron | |
| | | along the life | | | | | along the life | |
| | | of the resource| | | | | of the resource| |
+------------------+--------+----------------+--------------------------------+ +-------------------------+--------+----------------+--------------------------------+
|name | string | RW | | |name | string | RW | |
+------------------+--------+----------------+--------------------------------+ +-------------------------+--------+----------------+--------------------------------+
|local_resource_id | uuid | RO | router or network UUID | |local_resource_id | uuid | RO | router or network UUID |
+------------------+--------+----------------+--------------------------------+ +-------------------------+--------+----------------+--------------------------------+
|remote_resource_id| uuid | RO | router or network UUID | |remote_resource_id | uuid | RO | router or network UUID |
+------------------+--------+----------------+--------------------------------+ +-------------------------+--------+----------------+--------------------------------+
|remote_keystone | string | RO | AUTH_URL of remote | |remote_keystone | string | RO | AUTH_URL of remote |
| | | | keystone | | | | | keystone |
+------------------+--------+----------------+--------------------------------+ +-------------------------+--------+----------------+--------------------------------+
|remote_region | string | RO | region in remote keystone | |remote_region | string | RO | region in remote keystone |
+------------------+--------+----------------+--------------------------------+ +-------------------------+--------+----------------+--------------------------------+
|local_parameters | dict | RO | | |remote_interconnection_id| uuid | RO | uuid of remote interconnection |
+------------------+--------+ | | +-------------------------+--------+ +--------------------------------+
|remote_parameters | dict | will be updated| | |local_parameters | dict | will be updated| |
| | | by Neutron | | +-------------------------+--------+ by Neutron | |
| | | along the life | | |remote_parameters | dict | along the life | |
| | | of the resource| | | | | of the resource| |
+------------------+--------+----------------+--------------------------------+ +-------------------------+--------+----------------+--------------------------------+
This resource will be used with typical CRUD operations: This resource will be used with typical CRUD operations:
* ``POST /v2.0/inter/interconnections`` * ``POST /v2.0/interconnection/interconnections``
* ``GET /v2.0/inter/interconnections`` * ``GET /v2.0/interconnection/interconnections``
* ``GET /v2.0/inter/interconnections/<uuid>`` * ``GET /v2.0/interconnection/interconnections/<uuid>``
* ``PUT /v2.0/inter/interconnections/<uuid>`` * ``PUT /v2.0/interconnection/interconnections/<uuid>``
* ``DELETE /v2.0/inter/interconnections/<uuid>`` * ``DELETE /v2.0/interconnection/interconnections/<uuid>``
Additionally, an additional REST operation is introduced to trigger a Additionally, an additional REST operation is introduced to trigger a
``refresh`` action on an ``interconnection`` resource: ``refresh`` action on an ``interconnection`` resource:
* ``PUT /v2.0/inter/interconnections/<uuid>/refresh`` * ``PUT /v2.0/interconnection/interconnections/<uuid>/refresh``
When this action is triggered the neutron instance on which the call is made When this action is triggered the neutron instance on which the call is made
will try to retrieve (``GET``) an ``interconnection`` resource on the remote will try to retrieve (``GET``) an ``interconnection`` resource on the remote
@ -406,97 +395,98 @@ between two Networks.
API Call A1, from tenant user to Neutron A:: API Call A1, from tenant user to Neutron A::
POST /v2.0/inter/interconnections POST /v2.0/interconnection/interconnections
{'interconnection': {'interconnection': {
'type': 'network' 'type': 'network_l3',
'local_resource_id': <uuid of network X> 'local_resource_id': <uuid of network X>,
'remote_keystone': "http//<keystone-B>/identity", 'remote_keystone': 'http//<keystone-B>/identity',
'remote_region': 'RegionOne', 'remote_region': 'RegionOne',
'remote_resource_id': <uuid of network Y> 'remote_resource_id': <uuid of network Y>
} }}
}
Response: 200 OK Response: 200 OK
{'interconnection': { {'interconnection': {
'id': <uuid 1> 'id': <uuid 1>,
... ...
}} }}
API Call B1, from Neutron A to Neutron B:: API Call B1, from Neutron A to Neutron B::
GET /v2.0/inter/interconnections?local_resource_id=<uuid of network Y>&remote_resource_id=<uuid of network X> GET /v2.0/interconnection/interconnections?local_resource_id=<uuid of network Y>&remote_resource_id=<uuid of network X>
Response: 404 Response: 404 Not Found
API Call A2, from tenant user to Neutron B:: API Call A2, from tenant user to Neutron B::
POST /v2.0/inter/interconnections POST /v2.0/interconnection/interconnections
{'interconnection': {'interconnection': {
'type': 'network' 'type': 'network_l3',
'local_resource_id': <uuid of network Y> 'local_resource_id': <uuid of network Y>,
'remote_keystone': "http//<keystone-A>/identity", 'remote_keystone': 'http//<keystone-A>/identity',
'remote_region': 'RegionOne', 'remote_region': 'RegionOne',
'remote_resource_id': <uuid of network X> 'remote_resource_id': <uuid of network X>
} }}
}
Response: 200 OK Response: 200 OK
{'interconnection': { {'interconnection': {
'id': <uuid 2> 'id': <uuid 2>,
... ...
}} }}
API Call B2, from Neutron B to Neutron A:: API Call B2, from Neutron B to Neutron A::
GET /v2.0/inter/interconnections/local_resource_id=<uuid of network X>&remote_resource_id=<uuid of network Y> GET /v2.0/interconnection/interconnections/local_resource_id=<uuid of network X>&remote_resource_id=<uuid of network Y>
Response: 200 OK Response: 200 OK
{'interconnection': { {'interconnection': {
'id': <uuid 1> 'id': <uuid 1>,
... ...,
'local_parameters": {} 'local_parameters': {}
}} }}
API Call B3' from Neutron B to Neutron A:: API Call B3' from Neutron B to Neutron A::
PUT /v2.0/inter/interconnections/<uuid 1>/refresh PUT /v2.0/interconnection/interconnections/<uuid 1>/refresh
{'interconnection': {
'id': <uuid 2>
'local_parameters": {}
}}
Response: 200 OK Response: 200 OK
API Call B3'', from Neutron A to Neutron B :: API Call B3'', from Neutron A to Neutron B ::
PUT /v2.0/inter/interconnections/<uuid 2>/refresh GET /v2.0/interconnection/interconnections/local_resource_id=<uuid of network Y>&remote_resource_id=<uuid of network X>
Response: 200 OK Response: 200 OK
{'interconnection': { {'interconnection': {
'id': <uuid 2> 'id': <uuid 2>,
'local_parameters": { ...,
'local_parameters': {
'foo': '42' 'foo': '42'
} }
}} }}
API Call B3''', from Neutron B to Neutron A :: API Call B3''', from Neutron A to Neutron B ::
PUT /v2.0/inter/interconnections/<uuid 1>/refresh PUT /v2.0/interconnection/interconnections/<uuid 2>/refresh
Response: 200 OK
API Call B3'''', from Neutron B to Neutron A ::
GET /v2.0/interconnection/interconnections/<uuid 1>
Response: 200 OK Response: 200 OK
{'interconnection': { {'interconnection': {
'id': <uuid 1> 'id': <uuid 1>,
...,
'remote_interconnection_id': <uuid 2>,
'remote_parameters': { 'remote_parameters': {
'foo': '42' 'foo': '42'
} },
'local_parameters": { 'local_parameters': {
'bar': '43' 'bar': '43'
} }
}} }}

View File

@ -1,31 +0,0 @@
..
This work is licensed under a Creative Commons Attribution 3.0 Unported
License.
http://creativecommons.org/licenses/by/3.0/legalcode
==================
(Placeholder Spec)
==================
This file is just a placeholder for the specs directory.
It will be removed soon after some spec is merged.
The latest spec template is found at ``specs/template.rst``
in the ``neutron-specs`` repository.
Problem Description
===================
Sphinx toctree complains if no file exists in a directory
specified in toctree glob.
Proposed Change
===============
Add this file.
References
==========
None.