From 042de7e6bbb3a187e8e12462eb35e6740448b2be Mon Sep 17 00:00:00 2001 From: Slawek Kaplonski Date: Wed, 8 Sep 2021 11:44:30 +0200 Subject: [PATCH] Deprecate 'allow_overlapping_ips' config option Config option allow_overlapping_ips is deprecated to removal now and will be removed in the Z cycle. Default value for that option is now set to True as this is supported by IPAM module in Neutron. Related-Bug: #1942294 Change-Id: I17bf5e4483025e9cc4ee04dd3e7c925f7bddc3db --- neutron/conf/common.py | 4 +++- neutron/tests/unit/_test_extension_portbindings.py | 6 ------ neutron/tests/unit/db/test_agentschedulers_db.py | 6 ------ neutron/tests/unit/db/test_db_base_plugin_v2.py | 12 ------------ neutron/tests/unit/db/test_l3_hamode_db.py | 1 - neutron/tests/unit/extensions/test_agent.py | 2 -- neutron/tests/unit/extensions/test_dns.py | 2 -- neutron/tests/unit/extensions/test_extraroute.py | 4 ---- .../tests/unit/extensions/test_fip_port_details.py | 4 ---- .../tests/unit/extensions/test_floatingip_pools.py | 4 ---- neutron/tests/unit/extensions/test_l3.py | 4 ---- neutron/tests/unit/extensions/test_l3_ext_gw_mode.py | 5 ----- neutron/tests/unit/extensions/test_qos_fip.py | 4 ---- neutron/tests/unit/extensions/test_qos_gateway_ip.py | 4 ---- neutron/tests/unit/ipam/test_subnet_alloc.py | 2 -- neutron/tests/unit/plugins/ml2/test_plugin.py | 4 ---- neutron/tests/unit/services/ovn_l3/test_plugin.py | 2 -- ...erlapping_ips-config-option-0e33af8876bad28f.yaml | 8 ++++++++ 18 files changed, 11 insertions(+), 67 deletions(-) create mode 100644 releasenotes/notes/Deprecate-allow_overlapping_ips-config-option-0e33af8876bad28f.yaml diff --git a/neutron/conf/common.py b/neutron/conf/common.py index a2047944b19..aa95f46d374 100644 --- a/neutron/conf/common.py +++ b/neutron/conf/common.py @@ -86,7 +86,9 @@ core_opts = [ cfg.BoolOpt('dhcp_agent_notification', default=True, help=_("Allow sending resource operation" " notification to DHCP agent")), - cfg.BoolOpt('allow_overlapping_ips', default=False, + cfg.BoolOpt('allow_overlapping_ips', default=True, + deprecated_for_removal=True, + deprecated_since='Yoga', help=_("Allow overlapping IP support in Neutron. " "Attention: the following parameter MUST be set to " "False if Neutron is being used in conjunction with " diff --git a/neutron/tests/unit/_test_extension_portbindings.py b/neutron/tests/unit/_test_extension_portbindings.py index 39de7a36d10..ea18b96e104 100644 --- a/neutron/tests/unit/_test_extension_portbindings.py +++ b/neutron/tests/unit/_test_extension_portbindings.py @@ -18,7 +18,6 @@ from http import client as httplib from neutron_lib.api.definitions import portbindings from neutron_lib import context from neutron_lib.plugins import directory -from oslo_config import cfg from webob import exc from neutron.tests.unit.db import test_db_base_plugin_v2 @@ -78,7 +77,6 @@ class PortBindingsTestCase(test_db_base_plugin_v2.NeutronDbPluginV2TestCase): def test_ports_vif_details(self): plugin = directory.get_plugin() - cfg.CONF.set_default('allow_overlapping_ips', True) with self.port(), self.port(): ctx = context.get_admin_context() ports = plugin.get_ports(ctx) @@ -212,7 +210,6 @@ class PortBindingsHostTestCaseMixin(object): self._check_response_no_portbindings_host(non_admin_port) def test_ports_vif_host(self): - cfg.CONF.set_default('allow_overlapping_ips', True) host_arg = {portbindings.HOST_ID: self.hostname} with self.port(name='name1', arg_list=(portbindings.HOST_ID,), @@ -235,7 +232,6 @@ class PortBindingsHostTestCaseMixin(object): self._check_response_no_portbindings_host(non_admin_port) def test_ports_vif_host_update(self): - cfg.CONF.set_default('allow_overlapping_ips', True) host_arg = {portbindings.HOST_ID: self.hostname} with self.port(name='name1', arg_list=(portbindings.HOST_ID,), **host_arg) as port1, self.port(name='name2') as port2: @@ -269,7 +265,6 @@ class PortBindingsHostTestCaseMixin(object): res['port'][portbindings.HOST_ID]) def test_ports_vif_host_list(self): - cfg.CONF.set_default('allow_overlapping_ips', True) host_arg = {portbindings.HOST_ID: self.hostname} with self.port(name='name1', arg_list=(portbindings.HOST_ID,), @@ -325,7 +320,6 @@ class PortBindingsVnicTestCaseMixin(object): self._check_response_portbindings_vnic_type(non_admin_port) def test_ports_vnic_type(self): - cfg.CONF.set_default('allow_overlapping_ips', True) vnic_arg = {portbindings.VNIC_TYPE: self.vnic_type} with self.port(name='name1', arg_list=(portbindings.VNIC_TYPE,), **vnic_arg), self.port(name='name2'): diff --git a/neutron/tests/unit/db/test_agentschedulers_db.py b/neutron/tests/unit/db/test_agentschedulers_db.py index d33176a9269..729f6f87a8b 100644 --- a/neutron/tests/unit/db/test_agentschedulers_db.py +++ b/neutron/tests/unit/db/test_agentschedulers_db.py @@ -292,7 +292,6 @@ class OvsAgentSchedulerTestCase(OvsAgentSchedulerTestCaseBase): self.assertEqual(0, len(dhcp_agents['agents'])) def test_network_auto_schedule_with_disabled(self): - cfg.CONF.set_override('allow_overlapping_ips', True) with self.subnet(), self.subnet(): dhcp_rpc_cb = dhcp_rpc.DhcpRpcCallback() self._register_agent_states() @@ -314,7 +313,6 @@ class OvsAgentSchedulerTestCase(OvsAgentSchedulerTestCaseBase): self.assertEqual(2, num_hostc_nets) def test_network_auto_schedule_with_no_dhcp(self): - cfg.CONF.set_override('allow_overlapping_ips', True) with self.subnet(enable_dhcp=False), self.subnet(enable_dhcp=False): dhcp_rpc_cb = dhcp_rpc.DhcpRpcCallback() self._register_agent_states() @@ -336,7 +334,6 @@ class OvsAgentSchedulerTestCase(OvsAgentSchedulerTestCaseBase): def test_network_auto_schedule_with_multiple_agents(self): cfg.CONF.set_override('dhcp_agents_per_network', 2) - cfg.CONF.set_override('allow_overlapping_ips', True) with self.subnet(), self.subnet(): dhcp_rpc_cb = dhcp_rpc.DhcpRpcCallback() self._register_agent_states() @@ -370,7 +367,6 @@ class OvsAgentSchedulerTestCase(OvsAgentSchedulerTestCaseBase): def test_network_auto_schedule_with_hosted(self): # one agent hosts all the networks, other hosts none - cfg.CONF.set_override('allow_overlapping_ips', True) with self.subnet() as sub1, self.subnet(): dhcp_rpc_cb = dhcp_rpc.DhcpRpcCallback() self._register_agent_states() @@ -398,7 +394,6 @@ class OvsAgentSchedulerTestCase(OvsAgentSchedulerTestCaseBase): def test_network_auto_schedule_with_hosted_2(self): # one agent hosts one network dhcp_rpc_cb = dhcp_rpc.DhcpRpcCallback() - cfg.CONF.set_override('allow_overlapping_ips', True) with self.subnet() as sub1: helpers.register_dhcp_agent(DHCP_HOSTA) dhcp_rpc_cb.get_active_networks_info( @@ -1397,7 +1392,6 @@ class OvsAgentSchedulerTestCase(OvsAgentSchedulerTestCaseBase): exc.HTTPNotFound.code) def test_network_no_reschedule(self): - cfg.CONF.set_override('allow_overlapping_ips', True) cfg.CONF.set_override('network_auto_schedule', False) with self.subnet() as sb1, self.subnet(): network1_id = sb1['subnet']['network_id'] diff --git a/neutron/tests/unit/db/test_db_base_plugin_v2.py b/neutron/tests/unit/db/test_db_base_plugin_v2.py index 30679c225c4..375dc908688 100644 --- a/neutron/tests/unit/db/test_db_base_plugin_v2.py +++ b/neutron/tests/unit/db/test_db_base_plugin_v2.py @@ -128,7 +128,6 @@ class NeutronDbPluginV2TestCase(testlib_api.WebTestCase): group=quota_conf.QUOTAS_CFG_GROUP) super(NeutronDbPluginV2TestCase, self).setUp() cfg.CONF.set_override('notify_nova_on_port_status_changes', False) - cfg.CONF.set_override('allow_overlapping_ips', True) # Make sure at each test according extensions for the plugin is loaded extensions.PluginAwareExtensionManager._instance = None # Save the attributes map in case the plugin will alter it @@ -1235,16 +1234,12 @@ class TestPortsV2(NeutronDbPluginV2TestCase): res, 'ports', webob.exc.HTTPServerError.code) def test_list_ports(self): - # for this test we need to enable overlapping ips - cfg.CONF.set_default('allow_overlapping_ips', True) with self.port() as v1, self.port() as v2, self.port() as v3: ports = (v1, v2, v3) self._test_list_resources('port', ports) def _test_list_ports_filtered_by_fixed_ip(self, **kwargs): - # for this test we need to enable overlapping ips - cfg.CONF.set_default('allow_overlapping_ips', True) with self.port() as port1, self.port(): fixed_ips = port1['port']['fixed_ips'][0] query_params = """ @@ -1307,7 +1302,6 @@ fixed_ips=ip_address%%3D%s&fixed_ips=ip_address%%3D%s&fixed_ips=subnet_id%%3D%s def test_list_ports_with_sort_native(self): if self._skip_native_sorting: self.skipTest("Skip test for not implemented sorting feature") - cfg.CONF.set_default('allow_overlapping_ips', True) with self.port(admin_state_up='True', mac_address='00:00:00:00:00:01') as port1,\ self.port(admin_state_up='False', @@ -1323,7 +1317,6 @@ fixed_ips=ip_address%%3D%s&fixed_ips=ip_address%%3D%s&fixed_ips=subnet_id%%3D%s 'neutron.api.v2.base.Controller._get_sorting_helper', new=_fake_get_sorting_helper) helper_patcher.start() - cfg.CONF.set_default('allow_overlapping_ips', True) with self.port(admin_state_up='True', mac_address='00:00:00:00:00:01') as port1,\ self.port(admin_state_up='False', @@ -1337,7 +1330,6 @@ fixed_ips=ip_address%%3D%s&fixed_ips=ip_address%%3D%s&fixed_ips=subnet_id%%3D%s def test_list_ports_with_pagination_native(self): if self._skip_native_pagination: self.skipTest("Skip test for not implemented pagination feature") - cfg.CONF.set_default('allow_overlapping_ips', True) with self.port(mac_address='00:00:00:00:00:01') as port1,\ self.port(mac_address='00:00:00:00:00:02') as port2,\ self.port(mac_address='00:00:00:00:00:03') as port3: @@ -1350,7 +1342,6 @@ fixed_ips=ip_address%%3D%s&fixed_ips=ip_address%%3D%s&fixed_ips=subnet_id%%3D%s 'neutron.api.v2.base.Controller._get_pagination_helper', new=_fake_get_pagination_helper) helper_patcher.start() - cfg.CONF.set_default('allow_overlapping_ips', True) with self.port(mac_address='00:00:00:00:00:01') as port1,\ self.port(mac_address='00:00:00:00:00:02') as port2,\ self.port(mac_address='00:00:00:00:00:03') as port3: @@ -1361,7 +1352,6 @@ fixed_ips=ip_address%%3D%s&fixed_ips=ip_address%%3D%s&fixed_ips=subnet_id%%3D%s def test_list_ports_with_pagination_reverse_native(self): if self._skip_native_pagination: self.skipTest("Skip test for not implemented pagination feature") - cfg.CONF.set_default('allow_overlapping_ips', True) with self.port(mac_address='00:00:00:00:00:01') as port1,\ self.port(mac_address='00:00:00:00:00:02') as port2,\ self.port(mac_address='00:00:00:00:00:03') as port3: @@ -1375,7 +1365,6 @@ fixed_ips=ip_address%%3D%s&fixed_ips=ip_address%%3D%s&fixed_ips=subnet_id%%3D%s 'neutron.api.v2.base.Controller._get_pagination_helper', new=_fake_get_pagination_helper) helper_patcher.start() - cfg.CONF.set_default('allow_overlapping_ips', True) with self.port(mac_address='00:00:00:00:00:01') as port1,\ self.port(mac_address='00:00:00:00:00:02') as port2,\ self.port(mac_address='00:00:00:00:00:03') as port3: @@ -3431,7 +3420,6 @@ class TestSubnetsV2(NeutronDbPluginV2TestCase): def test_create_2_subnets_overlapping_cidr_allowed_returns_200(self): cidr_1 = '10.0.0.0/23' cidr_2 = '10.0.0.0/24' - cfg.CONF.set_override('allow_overlapping_ips', True) with self.subnet(cidr=cidr_1), self.subnet(cidr=cidr_2): pass diff --git a/neutron/tests/unit/db/test_l3_hamode_db.py b/neutron/tests/unit/db/test_l3_hamode_db.py index 541f082b41d..53088c5f172 100644 --- a/neutron/tests/unit/db/test_l3_hamode_db.py +++ b/neutron/tests/unit/db/test_l3_hamode_db.py @@ -75,7 +75,6 @@ class L3HATestFramework(testlib_api.SqlTestCase): self.mock_quota_make_res = make_res.start() commit_res = mock.patch.object(quota.QuotaEngine, 'commit_reservation') self.mock_quota_commit_res = commit_res.start() - cfg.CONF.set_override('allow_overlapping_ips', True) self.plugin = FakeL3PluginWithAgents() directory.add_plugin(plugin_constants.L3, self.plugin) diff --git a/neutron/tests/unit/extensions/test_agent.py b/neutron/tests/unit/extensions/test_agent.py index d6c50062e60..2a084bf4ddf 100644 --- a/neutron/tests/unit/extensions/test_agent.py +++ b/neutron/tests/unit/extensions/test_agent.py @@ -100,8 +100,6 @@ class AgentDBTestCase(AgentDBTestMixIn, def setUp(self): plugin = 'neutron.tests.unit.extensions.test_agent.TestAgentPlugin' - # for these tests we need to enable overlapping ips - cfg.CONF.set_default('allow_overlapping_ips', True) ext_mgr = AgentTestExtensionManager() super(AgentDBTestCase, self).setUp(plugin=plugin, ext_mgr=ext_mgr) self.adminContext = context.get_admin_context() diff --git a/neutron/tests/unit/extensions/test_dns.py b/neutron/tests/unit/extensions/test_dns.py index c12895bf5fe..34d8f76c983 100644 --- a/neutron/tests/unit/extensions/test_dns.py +++ b/neutron/tests/unit/extensions/test_dns.py @@ -136,8 +136,6 @@ class DnsExtensionTestCase(test_plugin.Ml2PluginV2TestCase): ips_list=[ips[0]['ip_address']]) def test_list_ports(self): - # for this test we need to enable overlapping ips - cfg.CONF.set_default('allow_overlapping_ips', True) with self.port() as v1, self.port() as v2, self.port() as v3: ports = (v1, v2, v3) res = self._test_list_resources('port', ports) diff --git a/neutron/tests/unit/extensions/test_extraroute.py b/neutron/tests/unit/extensions/test_extraroute.py index a7251d0f310..4e6b948dbd2 100644 --- a/neutron/tests/unit/extensions/test_extraroute.py +++ b/neutron/tests/unit/extensions/test_extraroute.py @@ -508,8 +508,6 @@ class ExtraRouteDBIntTestCase(test_l3.L3NatDBIntTestCase, if not plugin: plugin = ('neutron.tests.unit.extensions.test_extraroute.' 'TestExtraRouteIntPlugin') - # for these tests we need to enable overlapping ips - cfg.CONF.set_default('allow_overlapping_ips', True) cfg.CONF.set_default('max_routes', 3) ext_mgr = ExtraRouteTestExtensionManager() super(test_l3.L3BaseForIntTests, self).setUp(plugin=plugin, @@ -527,8 +525,6 @@ class ExtraRouteDBSepTestCase(test_l3.L3NatDBSepTestCase, 'TestExtraRouteL3NatServicePlugin') service_plugins = {'l3_plugin_name': l3_plugin} - # for these tests we need to enable overlapping ips - cfg.CONF.set_default('allow_overlapping_ips', True) cfg.CONF.set_default('max_routes', 3) ext_mgr = ExtraRouteTestExtensionManager() super(test_l3.L3BaseForSepTests, self).setUp( diff --git a/neutron/tests/unit/extensions/test_fip_port_details.py b/neutron/tests/unit/extensions/test_fip_port_details.py index fdf048b0242..1a88836190b 100644 --- a/neutron/tests/unit/extensions/test_fip_port_details.py +++ b/neutron/tests/unit/extensions/test_fip_port_details.py @@ -104,8 +104,6 @@ class FloatingIPPortDetailsDBIntTestCase(test_l3.L3BaseForIntTests, if not plugin: plugin = ('neutron.tests.unit.extensions.test_fip_port_details.' 'TestFloatingIPPortDetailsIntPlugin') - # for these tests we need to enable overlapping ips - cfg.CONF.set_default('allow_overlapping_ips', True) cfg.CONF.set_default('max_routes', 3) ext_mgr = FloatingIPPortDetailsTestExtensionManager() super(test_l3.L3BaseForIntTests, self).setUp( @@ -126,8 +124,6 @@ class FloatingIPPortDetailsDBSepTestCase(test_l3.L3BaseForSepTests, 'TestFloatingIPPortDetailsL3NatServicePlugin') service_plugins = {'l3_plugin_name': l3_plugin} - # for these tests we need to enable overlapping ips - cfg.CONF.set_default('allow_overlapping_ips', True) cfg.CONF.set_default('max_routes', 3) ext_mgr = FloatingIPPortDetailsTestExtensionManager() super(test_l3.L3BaseForSepTests, self).setUp( diff --git a/neutron/tests/unit/extensions/test_floatingip_pools.py b/neutron/tests/unit/extensions/test_floatingip_pools.py index 10061ce5a40..8fc175cb0e5 100644 --- a/neutron/tests/unit/extensions/test_floatingip_pools.py +++ b/neutron/tests/unit/extensions/test_floatingip_pools.py @@ -118,8 +118,6 @@ class FloatingIPPoolsDBIntTestCase(test_l3.L3BaseForIntTests, if not plugin: plugin = ('neutron.tests.unit.extensions.test_floatingip_pools.' 'TestFloatingIPPoolsIntPlugin') - # for these tests we need to enable overlapping ips - cfg.CONF.set_default('allow_overlapping_ips', True) cfg.CONF.set_default('max_routes', 3) ext_mgr = FloatingIPPoolsTestExtensionManager() super(test_l3.L3BaseForIntTests, self).setUp( @@ -142,8 +140,6 @@ class FloatingIPPoolsDBSepTestCase(test_l3.L3BaseForSepTests, 'TestFloatingIPPoolsL3NatServicePlugin') service_plugins = {'l3_plugin_name': l3_plugin} - # for these tests we need to enable overlapping ips - cfg.CONF.set_default('allow_overlapping_ips', True) cfg.CONF.set_default('max_routes', 3) ext_mgr = FloatingIPPoolsTestExtensionManager() super(test_l3.L3BaseForSepTests, self).setUp( diff --git a/neutron/tests/unit/extensions/test_l3.py b/neutron/tests/unit/extensions/test_l3.py index 3dd74d46554..b330beb8d96 100644 --- a/neutron/tests/unit/extensions/test_l3.py +++ b/neutron/tests/unit/extensions/test_l3.py @@ -4205,8 +4205,6 @@ class L3BaseForIntTests(test_db_base_plugin_v2.NeutronDbPluginV2TestCase): def setUp(self, plugin=None, ext_mgr=None, service_plugins=None): if not plugin: plugin = 'neutron.tests.unit.extensions.test_l3.TestL3NatIntPlugin' - # for these tests we need to enable overlapping ips - cfg.CONF.set_default('allow_overlapping_ips', True) ext_mgr = ext_mgr or L3TestExtensionManager() super(L3BaseForIntTests, self).setUp(plugin=plugin, ext_mgr=ext_mgr, @@ -4226,8 +4224,6 @@ class L3BaseForSepTests(test_db_base_plugin_v2.NeutronDbPluginV2TestCase): 'TestL3NatServicePlugin') service_plugins = {'l3_plugin_name': l3_plugin} - # for these tests we need to enable overlapping ips - cfg.CONF.set_default('allow_overlapping_ips', True) if not ext_mgr: ext_mgr = L3TestExtensionManager() super(L3BaseForSepTests, self).setUp(plugin=plugin, ext_mgr=ext_mgr, diff --git a/neutron/tests/unit/extensions/test_l3_ext_gw_mode.py b/neutron/tests/unit/extensions/test_l3_ext_gw_mode.py index e2e0009c589..e0e61f524f8 100644 --- a/neutron/tests/unit/extensions/test_l3_ext_gw_mode.py +++ b/neutron/tests/unit/extensions/test_l3_ext_gw_mode.py @@ -25,7 +25,6 @@ from neutron_lib import context as nctx from neutron_lib.db import api as db_api from neutron_lib.plugins import directory from neutron_lib.utils import net as net_utils -from oslo_config import cfg from oslo_db import exception as db_exc from oslo_serialization import jsonutils from oslo_utils import uuidutils @@ -369,8 +368,6 @@ class ExtGwModeIntTestCase(test_db_base_plugin_v2.NeutronDbPluginV2TestCase, plugin = plugin or ( 'neutron.tests.unit.extensions.test_l3_ext_gw_mode.' 'TestDbIntPlugin') - # for these tests we need to enable overlapping ips - cfg.CONF.set_default('allow_overlapping_ips', True) ext_mgr = ext_mgr or TestExtensionManager() super(ExtGwModeIntTestCase, self).setUp(plugin=plugin, ext_mgr=ext_mgr, @@ -532,7 +529,5 @@ class ExtGwModeSepTestCase(ExtGwModeIntTestCase): l3_plugin = ('neutron.tests.unit.extensions.test_l3_ext_gw_mode.' 'TestDbSepPlugin') svc_plugins = {'l3_plugin_name': l3_plugin} - # for these tests we need to enable overlapping ips - cfg.CONF.set_default('allow_overlapping_ips', True) super(ExtGwModeSepTestCase, self).setUp(plugin=plugin, svc_plugins=svc_plugins) diff --git a/neutron/tests/unit/extensions/test_qos_fip.py b/neutron/tests/unit/extensions/test_qos_fip.py index eaab2b158f9..74b8686dbcf 100644 --- a/neutron/tests/unit/extensions/test_qos_fip.py +++ b/neutron/tests/unit/extensions/test_qos_fip.py @@ -350,8 +350,6 @@ class FloatingIPQoSDBIntTestCase(test_l3.L3BaseForIntTests, 'QoSPlugin'} extraroute_db.register_db_extraroute_opts() - # for these tests we need to enable overlapping ips - cfg.CONF.set_default('allow_overlapping_ips', True) cfg.CONF.set_default('max_routes', 3) ext_mgr = FloatingIPQoSTestExtensionManager() @@ -379,8 +377,6 @@ class FloatingIPQoSDBSepTestCase(test_l3.L3BaseForSepTests, 'QoSPlugin'} extraroute_db.register_db_extraroute_opts() - # for these tests we need to enable overlapping ips - cfg.CONF.set_default('allow_overlapping_ips', True) cfg.CONF.set_default('max_routes', 3) ext_mgr = FloatingIPQoSTestExtensionManager() diff --git a/neutron/tests/unit/extensions/test_qos_gateway_ip.py b/neutron/tests/unit/extensions/test_qos_gateway_ip.py index 4f8385bb26b..a3d9ded44cd 100644 --- a/neutron/tests/unit/extensions/test_qos_gateway_ip.py +++ b/neutron/tests/unit/extensions/test_qos_gateway_ip.py @@ -195,8 +195,6 @@ class GatewayIPQoSDBIntTestCase(test_l3.L3BaseForIntTests, service_plugins = {'qos': 'neutron.services.qos.qos_plugin.QoSPlugin'} extraroute_db.register_db_extraroute_opts() - # for these tests we need to enable overlapping ips - cfg.CONF.set_default('allow_overlapping_ips', True) cfg.CONF.set_default('max_routes', 3) ext_mgr = GatewayIPQoSTestExtensionManager() @@ -222,8 +220,6 @@ class GatewayIPQoSDBSepTestCase(test_l3.L3BaseForSepTests, 'qos': 'neutron.services.qos.qos_plugin.QoSPlugin'} extraroute_db.register_db_extraroute_opts() - # for these tests we need to enable overlapping ips - cfg.CONF.set_default('allow_overlapping_ips', True) cfg.CONF.set_default('max_routes', 3) ext_mgr = GatewayIPQoSTestExtensionManager() diff --git a/neutron/tests/unit/ipam/test_subnet_alloc.py b/neutron/tests/unit/ipam/test_subnet_alloc.py index 52deedf7acc..8d11c6aff7e 100644 --- a/neutron/tests/unit/ipam/test_subnet_alloc.py +++ b/neutron/tests/unit/ipam/test_subnet_alloc.py @@ -21,7 +21,6 @@ from neutron_lib import context from neutron_lib.db import api as db_api from neutron_lib import exceptions from neutron_lib.plugins import directory -from oslo_config import cfg from oslo_db import exception as db_exc from oslo_utils import uuidutils @@ -39,7 +38,6 @@ class TestSubnetAllocation(testlib_api.SqlTestCase): self.setup_coreplugin(test_db_base_plugin_v2.DB_PLUGIN_KLASS) self.plugin = directory.get_plugin() self.ctx = context.get_admin_context() - cfg.CONF.set_override('allow_overlapping_ips', True) def _create_subnet_pool(self, plugin, ctx, name, prefix_list, min_prefixlen, ip_version, diff --git a/neutron/tests/unit/plugins/ml2/test_plugin.py b/neutron/tests/unit/plugins/ml2/test_plugin.py index 353344c835f..694a6793f81 100644 --- a/neutron/tests/unit/plugins/ml2/test_plugin.py +++ b/neutron/tests/unit/plugins/ml2/test_plugin.py @@ -1641,8 +1641,6 @@ class TestMl2PortsV2(test_plugin.TestPortsV2, Ml2PluginV2TestCase): self.assertTrue(listener.except_raised) def test_list_ports_filtered_by_fixed_ip_substring(self): - # for this test we need to enable overlapping ips - cfg.CONF.set_default('allow_overlapping_ips', True) with self.port() as port1, self.port(): fixed_ips = port1['port']['fixed_ips'][0] query_params = """ @@ -1708,8 +1706,6 @@ fixed_ips=ip_address_substr%%3D%s&fixed_ips=ip_address%%3D%s self._delete('ports', port2['port']['id']) def test_list_ports_filtered_by_security_groups(self): - # for this test we need to enable overlapping ips - cfg.CONF.set_default('allow_overlapping_ips', True) ctx = context.get_admin_context() with self.port() as port1, self.port() as port2: query_params = "security_groups=%s" % ( diff --git a/neutron/tests/unit/services/ovn_l3/test_plugin.py b/neutron/tests/unit/services/ovn_l3/test_plugin.py index f3f0aedb7b0..9f2ed4e9883 100644 --- a/neutron/tests/unit/services/ovn_l3/test_plugin.py +++ b/neutron/tests/unit/services/ovn_l3/test_plugin.py @@ -1636,8 +1636,6 @@ class OVNL3ExtrarouteTests(test_l3_gw.ExtGwModeIntTestCase, plugin = 'neutron.tests.unit.extensions.test_l3.TestNoL3NatPlugin' l3_plugin = ('neutron.services.ovn_l3.plugin.OVNL3RouterPlugin') service_plugins = {'l3_plugin_name': l3_plugin} - # For these tests we need to enable overlapping ips - cfg.CONF.set_default('allow_overlapping_ips', True) cfg.CONF.set_default('max_routes', 3) ext_mgr = test_extraroute.ExtraRouteTestExtensionManager() super(test_l3.L3BaseForIntTests, self).setUp( diff --git a/releasenotes/notes/Deprecate-allow_overlapping_ips-config-option-0e33af8876bad28f.yaml b/releasenotes/notes/Deprecate-allow_overlapping_ips-config-option-0e33af8876bad28f.yaml new file mode 100644 index 00000000000..b332f1c5073 --- /dev/null +++ b/releasenotes/notes/Deprecate-allow_overlapping_ips-config-option-0e33af8876bad28f.yaml @@ -0,0 +1,8 @@ +--- +deprecations: + - | + Config option ``allow_overlapping_ips`` is deprecated for removal now. + Default value for that option is now changed to the ``True`` in the default + IPAM module of Neutron, as the only reason it was defaulting to ``False`` + was to keep compatibility with Nova security group code that was removed + already. The config option itself will removed in the ``Z`` release.