Add shim extension l3-port-ip-change-not-allowed
Change-Id: I3578ef48432792aca25acf7c30413d79a0fd4065 Closes-Bug: #1796824
This commit is contained in:
parent
987fc92fef
commit
cd2c69890b
@ -51,6 +51,7 @@ from neutron_lib.api.definitions import l3
|
||||
from neutron_lib.api.definitions import l3_ext_gw_mode
|
||||
from neutron_lib.api.definitions import l3_ext_ha_mode
|
||||
from neutron_lib.api.definitions import l3_flavors
|
||||
from neutron_lib.api.definitions import l3_port_ip_change_not_allowed
|
||||
from neutron_lib.api.definitions import logging
|
||||
from neutron_lib.api.definitions import logging_resource
|
||||
from neutron_lib.api.definitions import metering
|
||||
@ -145,6 +146,7 @@ _ALL_API_DEFINITIONS = {
|
||||
l3_ext_gw_mode,
|
||||
l3_ext_ha_mode,
|
||||
l3_flavors,
|
||||
l3_port_ip_change_not_allowed,
|
||||
logging,
|
||||
logging_resource,
|
||||
metering,
|
||||
|
@ -102,6 +102,7 @@ KNOWN_EXTENSIONS = (
|
||||
'ip-substring-filtering',
|
||||
'l3-ha',
|
||||
'l3_agent_scheduler',
|
||||
'l3-port-ip-change-not-allowed',
|
||||
'logging',
|
||||
'metering',
|
||||
'multi-provider',
|
||||
|
29
neutron_lib/api/definitions/l3_port_ip_change_not_allowed.py
Normal file
29
neutron_lib/api/definitions/l3_port_ip_change_not_allowed.py
Normal file
@ -0,0 +1,29 @@
|
||||
# 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 l3
|
||||
|
||||
|
||||
ALIAS = 'l3-port-ip-change-not-allowed'
|
||||
IS_SHIM_EXTENSION = True
|
||||
IS_STANDARD_ATTR_EXTENSION = False
|
||||
NAME = 'Prevent L3 router ports IP address change extension'
|
||||
DESCRIPTION = 'Prevent change of IP address for some L3 router ports'
|
||||
UPDATED_TIMESTAMP = '2018-10-09T10:00:00-00:00'
|
||||
RESOURCE_ATTRIBUTE_MAP = {}
|
||||
SUB_RESOURCE_ATTRIBUTE_MAP = {}
|
||||
ACTION_MAP = {}
|
||||
REQUIRED_EXTENSIONS = [
|
||||
l3.ALIAS
|
||||
]
|
||||
OPTIONAL_EXTENSIONS = []
|
||||
ACTION_STATUS = {}
|
@ -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 l3_port_ip_change_not_allowed
|
||||
from neutron_lib.tests.unit.api.definitions import base
|
||||
|
||||
|
||||
class L3PortIPChangeNotAllowedDefinitionTestCase(base.DefinitionBaseTestCase):
|
||||
extension_module = l3_port_ip_change_not_allowed
|
@ -0,0 +1,9 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
Directly updating some L3-related port IP addresses does not have any
|
||||
effect on the L3 agent side. As a consequence, these L3-related ports
|
||||
should not allow changing of their IP address. A new shim extension has
|
||||
been added called ``l3-port-ip-change-not-allowed`` to prevent such IP
|
||||
address change. For more information please see bug
|
||||
`1796824 <https://bugs.launchpad.net/neutron/+bug/1796824>`_.
|
Loading…
Reference in New Issue
Block a user