Shim extension - segments peer subnet host routes, and api-ref

Adds shim extension for segment peer-subnet host routes.
Adds api-ref documentation of the new extension.

Related-Bug: 1766380
Depends-On: Iafbabe6352283e7f1a535a7b147bd81fb32f0ed1
Change-Id: Ibd1b565a04a6d979b6e56ca5469af644894d6b4c
This commit is contained in:
Harald Jensås 2018-06-12 13:49:11 +02:00
parent 8664953c5a
commit 51bb43045a
5 changed files with 64 additions and 0 deletions

View File

@ -47,6 +47,17 @@ The subnet segment_id writable (``subnet-segmentid-writable``) extension
enhances the `Segments`_ (``segment``) extension in that now the ``segment_id``
attribute is also available for write when a subnet is updated.
Segment peer subnet host routes extension
=========================================
The segment peer subnet host routes extension (
``segments-peer-subnet-host-routes``) extension enhances the `Segments`_
(``segment``) extension in that now the ``host_routes`` property of the
different `Subnets`_ (``subnets``) in a routed network gets routes to the peer
subnets on different segments added automatically. This ensures that traffic
within an L3 routed network stays within the network even when the default
route is on a different host interface.
Subnet service types extension
==============================

View File

@ -74,6 +74,7 @@ from neutron_lib.api.definitions import router_interface_fip
from neutron_lib.api.definitions import routerservicetype
from neutron_lib.api.definitions import security_groups_port_filtering
from neutron_lib.api.definitions import segment
from neutron_lib.api.definitions import segments_peer_subnet_host_routes
from neutron_lib.api.definitions import servicetype
from neutron_lib.api.definitions import sfc
from neutron_lib.api.definitions import sorting
@ -156,6 +157,7 @@ _ALL_API_DEFINITIONS = {
routerservicetype,
security_groups_port_filtering,
segment,
segments_peer_subnet_host_routes,
servicetype,
sfc,
sorting,

View File

@ -0,0 +1,27 @@
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from neutron_lib.api.definitions import segment
ALIAS = 'segments-peer-subnet-host-routes'
IS_SHIM_EXTENSION = True
IS_STANDARD_ATTR_EXTENSION = False
NAME = 'Segments peer-subnet host routes'
DESCRIPTION = 'Add host routes to subnets on a routed network (segments)'
UPDATED_TIMESTAMP = '2018-06-12T10:00:00-00:00'
RESOURCE_ATTRIBUTE_MAP = {}
SUB_RESOURCE_ATTRIBUTE_MAP = {}
ACTION_MAP = {}
REQUIRED_EXTENSIONS = [segment.ALIAS]
OPTIONAL_EXTENSIONS = []
ACTION_STATUS = {}

View File

@ -0,0 +1,18 @@
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from neutron_lib.api.definitions import segments_peer_subnet_host_routes
from neutron_lib.tests.unit.api.definitions import base
class SegmentPeerHostRoutesDefinitionTestCase(base.DefinitionBaseTestCase):
extension_module = segments_peer_subnet_host_routes

View File

@ -0,0 +1,6 @@
---
features:
- |
Adds api-extension ``segments-peer-subnet-host-routes``. Adds host routes
to subnets on a routed network (segments). `RFE: 1766380
<https://bugs.launchpad.net/neutron/+bug/1766380>`_.