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
This commit is contained in:
parent
d1a89af312
commit
042de7e6bb
@ -86,7 +86,9 @@ core_opts = [
|
|||||||
cfg.BoolOpt('dhcp_agent_notification', default=True,
|
cfg.BoolOpt('dhcp_agent_notification', default=True,
|
||||||
help=_("Allow sending resource operation"
|
help=_("Allow sending resource operation"
|
||||||
" notification to DHCP agent")),
|
" 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. "
|
help=_("Allow overlapping IP support in Neutron. "
|
||||||
"Attention: the following parameter MUST be set to "
|
"Attention: the following parameter MUST be set to "
|
||||||
"False if Neutron is being used in conjunction with "
|
"False if Neutron is being used in conjunction with "
|
||||||
|
@ -18,7 +18,6 @@ from http import client as httplib
|
|||||||
from neutron_lib.api.definitions import portbindings
|
from neutron_lib.api.definitions import portbindings
|
||||||
from neutron_lib import context
|
from neutron_lib import context
|
||||||
from neutron_lib.plugins import directory
|
from neutron_lib.plugins import directory
|
||||||
from oslo_config import cfg
|
|
||||||
from webob import exc
|
from webob import exc
|
||||||
|
|
||||||
from neutron.tests.unit.db import test_db_base_plugin_v2
|
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):
|
def test_ports_vif_details(self):
|
||||||
plugin = directory.get_plugin()
|
plugin = directory.get_plugin()
|
||||||
cfg.CONF.set_default('allow_overlapping_ips', True)
|
|
||||||
with self.port(), self.port():
|
with self.port(), self.port():
|
||||||
ctx = context.get_admin_context()
|
ctx = context.get_admin_context()
|
||||||
ports = plugin.get_ports(ctx)
|
ports = plugin.get_ports(ctx)
|
||||||
@ -212,7 +210,6 @@ class PortBindingsHostTestCaseMixin(object):
|
|||||||
self._check_response_no_portbindings_host(non_admin_port)
|
self._check_response_no_portbindings_host(non_admin_port)
|
||||||
|
|
||||||
def test_ports_vif_host(self):
|
def test_ports_vif_host(self):
|
||||||
cfg.CONF.set_default('allow_overlapping_ips', True)
|
|
||||||
host_arg = {portbindings.HOST_ID: self.hostname}
|
host_arg = {portbindings.HOST_ID: self.hostname}
|
||||||
with self.port(name='name1',
|
with self.port(name='name1',
|
||||||
arg_list=(portbindings.HOST_ID,),
|
arg_list=(portbindings.HOST_ID,),
|
||||||
@ -235,7 +232,6 @@ class PortBindingsHostTestCaseMixin(object):
|
|||||||
self._check_response_no_portbindings_host(non_admin_port)
|
self._check_response_no_portbindings_host(non_admin_port)
|
||||||
|
|
||||||
def test_ports_vif_host_update(self):
|
def test_ports_vif_host_update(self):
|
||||||
cfg.CONF.set_default('allow_overlapping_ips', True)
|
|
||||||
host_arg = {portbindings.HOST_ID: self.hostname}
|
host_arg = {portbindings.HOST_ID: self.hostname}
|
||||||
with self.port(name='name1', arg_list=(portbindings.HOST_ID,),
|
with self.port(name='name1', arg_list=(portbindings.HOST_ID,),
|
||||||
**host_arg) as port1, self.port(name='name2') as port2:
|
**host_arg) as port1, self.port(name='name2') as port2:
|
||||||
@ -269,7 +265,6 @@ class PortBindingsHostTestCaseMixin(object):
|
|||||||
res['port'][portbindings.HOST_ID])
|
res['port'][portbindings.HOST_ID])
|
||||||
|
|
||||||
def test_ports_vif_host_list(self):
|
def test_ports_vif_host_list(self):
|
||||||
cfg.CONF.set_default('allow_overlapping_ips', True)
|
|
||||||
host_arg = {portbindings.HOST_ID: self.hostname}
|
host_arg = {portbindings.HOST_ID: self.hostname}
|
||||||
with self.port(name='name1',
|
with self.port(name='name1',
|
||||||
arg_list=(portbindings.HOST_ID,),
|
arg_list=(portbindings.HOST_ID,),
|
||||||
@ -325,7 +320,6 @@ class PortBindingsVnicTestCaseMixin(object):
|
|||||||
self._check_response_portbindings_vnic_type(non_admin_port)
|
self._check_response_portbindings_vnic_type(non_admin_port)
|
||||||
|
|
||||||
def test_ports_vnic_type(self):
|
def test_ports_vnic_type(self):
|
||||||
cfg.CONF.set_default('allow_overlapping_ips', True)
|
|
||||||
vnic_arg = {portbindings.VNIC_TYPE: self.vnic_type}
|
vnic_arg = {portbindings.VNIC_TYPE: self.vnic_type}
|
||||||
with self.port(name='name1', arg_list=(portbindings.VNIC_TYPE,),
|
with self.port(name='name1', arg_list=(portbindings.VNIC_TYPE,),
|
||||||
**vnic_arg), self.port(name='name2'):
|
**vnic_arg), self.port(name='name2'):
|
||||||
|
@ -292,7 +292,6 @@ class OvsAgentSchedulerTestCase(OvsAgentSchedulerTestCaseBase):
|
|||||||
self.assertEqual(0, len(dhcp_agents['agents']))
|
self.assertEqual(0, len(dhcp_agents['agents']))
|
||||||
|
|
||||||
def test_network_auto_schedule_with_disabled(self):
|
def test_network_auto_schedule_with_disabled(self):
|
||||||
cfg.CONF.set_override('allow_overlapping_ips', True)
|
|
||||||
with self.subnet(), self.subnet():
|
with self.subnet(), self.subnet():
|
||||||
dhcp_rpc_cb = dhcp_rpc.DhcpRpcCallback()
|
dhcp_rpc_cb = dhcp_rpc.DhcpRpcCallback()
|
||||||
self._register_agent_states()
|
self._register_agent_states()
|
||||||
@ -314,7 +313,6 @@ class OvsAgentSchedulerTestCase(OvsAgentSchedulerTestCaseBase):
|
|||||||
self.assertEqual(2, num_hostc_nets)
|
self.assertEqual(2, num_hostc_nets)
|
||||||
|
|
||||||
def test_network_auto_schedule_with_no_dhcp(self):
|
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):
|
with self.subnet(enable_dhcp=False), self.subnet(enable_dhcp=False):
|
||||||
dhcp_rpc_cb = dhcp_rpc.DhcpRpcCallback()
|
dhcp_rpc_cb = dhcp_rpc.DhcpRpcCallback()
|
||||||
self._register_agent_states()
|
self._register_agent_states()
|
||||||
@ -336,7 +334,6 @@ class OvsAgentSchedulerTestCase(OvsAgentSchedulerTestCaseBase):
|
|||||||
|
|
||||||
def test_network_auto_schedule_with_multiple_agents(self):
|
def test_network_auto_schedule_with_multiple_agents(self):
|
||||||
cfg.CONF.set_override('dhcp_agents_per_network', 2)
|
cfg.CONF.set_override('dhcp_agents_per_network', 2)
|
||||||
cfg.CONF.set_override('allow_overlapping_ips', True)
|
|
||||||
with self.subnet(), self.subnet():
|
with self.subnet(), self.subnet():
|
||||||
dhcp_rpc_cb = dhcp_rpc.DhcpRpcCallback()
|
dhcp_rpc_cb = dhcp_rpc.DhcpRpcCallback()
|
||||||
self._register_agent_states()
|
self._register_agent_states()
|
||||||
@ -370,7 +367,6 @@ class OvsAgentSchedulerTestCase(OvsAgentSchedulerTestCaseBase):
|
|||||||
|
|
||||||
def test_network_auto_schedule_with_hosted(self):
|
def test_network_auto_schedule_with_hosted(self):
|
||||||
# one agent hosts all the networks, other hosts none
|
# one agent hosts all the networks, other hosts none
|
||||||
cfg.CONF.set_override('allow_overlapping_ips', True)
|
|
||||||
with self.subnet() as sub1, self.subnet():
|
with self.subnet() as sub1, self.subnet():
|
||||||
dhcp_rpc_cb = dhcp_rpc.DhcpRpcCallback()
|
dhcp_rpc_cb = dhcp_rpc.DhcpRpcCallback()
|
||||||
self._register_agent_states()
|
self._register_agent_states()
|
||||||
@ -398,7 +394,6 @@ class OvsAgentSchedulerTestCase(OvsAgentSchedulerTestCaseBase):
|
|||||||
def test_network_auto_schedule_with_hosted_2(self):
|
def test_network_auto_schedule_with_hosted_2(self):
|
||||||
# one agent hosts one network
|
# one agent hosts one network
|
||||||
dhcp_rpc_cb = dhcp_rpc.DhcpRpcCallback()
|
dhcp_rpc_cb = dhcp_rpc.DhcpRpcCallback()
|
||||||
cfg.CONF.set_override('allow_overlapping_ips', True)
|
|
||||||
with self.subnet() as sub1:
|
with self.subnet() as sub1:
|
||||||
helpers.register_dhcp_agent(DHCP_HOSTA)
|
helpers.register_dhcp_agent(DHCP_HOSTA)
|
||||||
dhcp_rpc_cb.get_active_networks_info(
|
dhcp_rpc_cb.get_active_networks_info(
|
||||||
@ -1397,7 +1392,6 @@ class OvsAgentSchedulerTestCase(OvsAgentSchedulerTestCaseBase):
|
|||||||
exc.HTTPNotFound.code)
|
exc.HTTPNotFound.code)
|
||||||
|
|
||||||
def test_network_no_reschedule(self):
|
def test_network_no_reschedule(self):
|
||||||
cfg.CONF.set_override('allow_overlapping_ips', True)
|
|
||||||
cfg.CONF.set_override('network_auto_schedule', False)
|
cfg.CONF.set_override('network_auto_schedule', False)
|
||||||
with self.subnet() as sb1, self.subnet():
|
with self.subnet() as sb1, self.subnet():
|
||||||
network1_id = sb1['subnet']['network_id']
|
network1_id = sb1['subnet']['network_id']
|
||||||
|
@ -128,7 +128,6 @@ class NeutronDbPluginV2TestCase(testlib_api.WebTestCase):
|
|||||||
group=quota_conf.QUOTAS_CFG_GROUP)
|
group=quota_conf.QUOTAS_CFG_GROUP)
|
||||||
super(NeutronDbPluginV2TestCase, self).setUp()
|
super(NeutronDbPluginV2TestCase, self).setUp()
|
||||||
cfg.CONF.set_override('notify_nova_on_port_status_changes', False)
|
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
|
# Make sure at each test according extensions for the plugin is loaded
|
||||||
extensions.PluginAwareExtensionManager._instance = None
|
extensions.PluginAwareExtensionManager._instance = None
|
||||||
# Save the attributes map in case the plugin will alter it
|
# Save the attributes map in case the plugin will alter it
|
||||||
@ -1235,16 +1234,12 @@ class TestPortsV2(NeutronDbPluginV2TestCase):
|
|||||||
res, 'ports', webob.exc.HTTPServerError.code)
|
res, 'ports', webob.exc.HTTPServerError.code)
|
||||||
|
|
||||||
def test_list_ports(self):
|
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:
|
with self.port() as v1, self.port() as v2, self.port() as v3:
|
||||||
ports = (v1, v2, v3)
|
ports = (v1, v2, v3)
|
||||||
self._test_list_resources('port', ports)
|
self._test_list_resources('port', ports)
|
||||||
|
|
||||||
def _test_list_ports_filtered_by_fixed_ip(self, **kwargs):
|
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():
|
with self.port() as port1, self.port():
|
||||||
fixed_ips = port1['port']['fixed_ips'][0]
|
fixed_ips = port1['port']['fixed_ips'][0]
|
||||||
query_params = """
|
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):
|
def test_list_ports_with_sort_native(self):
|
||||||
if self._skip_native_sorting:
|
if self._skip_native_sorting:
|
||||||
self.skipTest("Skip test for not implemented sorting feature")
|
self.skipTest("Skip test for not implemented sorting feature")
|
||||||
cfg.CONF.set_default('allow_overlapping_ips', True)
|
|
||||||
with self.port(admin_state_up='True',
|
with self.port(admin_state_up='True',
|
||||||
mac_address='00:00:00:00:00:01') as port1,\
|
mac_address='00:00:00:00:00:01') as port1,\
|
||||||
self.port(admin_state_up='False',
|
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',
|
'neutron.api.v2.base.Controller._get_sorting_helper',
|
||||||
new=_fake_get_sorting_helper)
|
new=_fake_get_sorting_helper)
|
||||||
helper_patcher.start()
|
helper_patcher.start()
|
||||||
cfg.CONF.set_default('allow_overlapping_ips', True)
|
|
||||||
with self.port(admin_state_up='True',
|
with self.port(admin_state_up='True',
|
||||||
mac_address='00:00:00:00:00:01') as port1,\
|
mac_address='00:00:00:00:00:01') as port1,\
|
||||||
self.port(admin_state_up='False',
|
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):
|
def test_list_ports_with_pagination_native(self):
|
||||||
if self._skip_native_pagination:
|
if self._skip_native_pagination:
|
||||||
self.skipTest("Skip test for not implemented pagination feature")
|
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,\
|
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:02') as port2,\
|
||||||
self.port(mac_address='00:00:00:00:00:03') as port3:
|
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',
|
'neutron.api.v2.base.Controller._get_pagination_helper',
|
||||||
new=_fake_get_pagination_helper)
|
new=_fake_get_pagination_helper)
|
||||||
helper_patcher.start()
|
helper_patcher.start()
|
||||||
cfg.CONF.set_default('allow_overlapping_ips', True)
|
|
||||||
with self.port(mac_address='00:00:00:00:00:01') as port1,\
|
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:02') as port2,\
|
||||||
self.port(mac_address='00:00:00:00:00:03') as port3:
|
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):
|
def test_list_ports_with_pagination_reverse_native(self):
|
||||||
if self._skip_native_pagination:
|
if self._skip_native_pagination:
|
||||||
self.skipTest("Skip test for not implemented pagination feature")
|
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,\
|
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:02') as port2,\
|
||||||
self.port(mac_address='00:00:00:00:00:03') as port3:
|
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',
|
'neutron.api.v2.base.Controller._get_pagination_helper',
|
||||||
new=_fake_get_pagination_helper)
|
new=_fake_get_pagination_helper)
|
||||||
helper_patcher.start()
|
helper_patcher.start()
|
||||||
cfg.CONF.set_default('allow_overlapping_ips', True)
|
|
||||||
with self.port(mac_address='00:00:00:00:00:01') as port1,\
|
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:02') as port2,\
|
||||||
self.port(mac_address='00:00:00:00:00:03') as port3:
|
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):
|
def test_create_2_subnets_overlapping_cidr_allowed_returns_200(self):
|
||||||
cidr_1 = '10.0.0.0/23'
|
cidr_1 = '10.0.0.0/23'
|
||||||
cidr_2 = '10.0.0.0/24'
|
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):
|
with self.subnet(cidr=cidr_1), self.subnet(cidr=cidr_2):
|
||||||
pass
|
pass
|
||||||
|
@ -75,7 +75,6 @@ class L3HATestFramework(testlib_api.SqlTestCase):
|
|||||||
self.mock_quota_make_res = make_res.start()
|
self.mock_quota_make_res = make_res.start()
|
||||||
commit_res = mock.patch.object(quota.QuotaEngine, 'commit_reservation')
|
commit_res = mock.patch.object(quota.QuotaEngine, 'commit_reservation')
|
||||||
self.mock_quota_commit_res = commit_res.start()
|
self.mock_quota_commit_res = commit_res.start()
|
||||||
cfg.CONF.set_override('allow_overlapping_ips', True)
|
|
||||||
|
|
||||||
self.plugin = FakeL3PluginWithAgents()
|
self.plugin = FakeL3PluginWithAgents()
|
||||||
directory.add_plugin(plugin_constants.L3, self.plugin)
|
directory.add_plugin(plugin_constants.L3, self.plugin)
|
||||||
|
@ -100,8 +100,6 @@ class AgentDBTestCase(AgentDBTestMixIn,
|
|||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
plugin = 'neutron.tests.unit.extensions.test_agent.TestAgentPlugin'
|
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()
|
ext_mgr = AgentTestExtensionManager()
|
||||||
super(AgentDBTestCase, self).setUp(plugin=plugin, ext_mgr=ext_mgr)
|
super(AgentDBTestCase, self).setUp(plugin=plugin, ext_mgr=ext_mgr)
|
||||||
self.adminContext = context.get_admin_context()
|
self.adminContext = context.get_admin_context()
|
||||||
|
@ -136,8 +136,6 @@ class DnsExtensionTestCase(test_plugin.Ml2PluginV2TestCase):
|
|||||||
ips_list=[ips[0]['ip_address']])
|
ips_list=[ips[0]['ip_address']])
|
||||||
|
|
||||||
def test_list_ports(self):
|
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:
|
with self.port() as v1, self.port() as v2, self.port() as v3:
|
||||||
ports = (v1, v2, v3)
|
ports = (v1, v2, v3)
|
||||||
res = self._test_list_resources('port', ports)
|
res = self._test_list_resources('port', ports)
|
||||||
|
@ -508,8 +508,6 @@ class ExtraRouteDBIntTestCase(test_l3.L3NatDBIntTestCase,
|
|||||||
if not plugin:
|
if not plugin:
|
||||||
plugin = ('neutron.tests.unit.extensions.test_extraroute.'
|
plugin = ('neutron.tests.unit.extensions.test_extraroute.'
|
||||||
'TestExtraRouteIntPlugin')
|
'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)
|
cfg.CONF.set_default('max_routes', 3)
|
||||||
ext_mgr = ExtraRouteTestExtensionManager()
|
ext_mgr = ExtraRouteTestExtensionManager()
|
||||||
super(test_l3.L3BaseForIntTests, self).setUp(plugin=plugin,
|
super(test_l3.L3BaseForIntTests, self).setUp(plugin=plugin,
|
||||||
@ -527,8 +525,6 @@ class ExtraRouteDBSepTestCase(test_l3.L3NatDBSepTestCase,
|
|||||||
'TestExtraRouteL3NatServicePlugin')
|
'TestExtraRouteL3NatServicePlugin')
|
||||||
service_plugins = {'l3_plugin_name': l3_plugin}
|
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)
|
cfg.CONF.set_default('max_routes', 3)
|
||||||
ext_mgr = ExtraRouteTestExtensionManager()
|
ext_mgr = ExtraRouteTestExtensionManager()
|
||||||
super(test_l3.L3BaseForSepTests, self).setUp(
|
super(test_l3.L3BaseForSepTests, self).setUp(
|
||||||
|
@ -104,8 +104,6 @@ class FloatingIPPortDetailsDBIntTestCase(test_l3.L3BaseForIntTests,
|
|||||||
if not plugin:
|
if not plugin:
|
||||||
plugin = ('neutron.tests.unit.extensions.test_fip_port_details.'
|
plugin = ('neutron.tests.unit.extensions.test_fip_port_details.'
|
||||||
'TestFloatingIPPortDetailsIntPlugin')
|
'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)
|
cfg.CONF.set_default('max_routes', 3)
|
||||||
ext_mgr = FloatingIPPortDetailsTestExtensionManager()
|
ext_mgr = FloatingIPPortDetailsTestExtensionManager()
|
||||||
super(test_l3.L3BaseForIntTests, self).setUp(
|
super(test_l3.L3BaseForIntTests, self).setUp(
|
||||||
@ -126,8 +124,6 @@ class FloatingIPPortDetailsDBSepTestCase(test_l3.L3BaseForSepTests,
|
|||||||
'TestFloatingIPPortDetailsL3NatServicePlugin')
|
'TestFloatingIPPortDetailsL3NatServicePlugin')
|
||||||
service_plugins = {'l3_plugin_name': l3_plugin}
|
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)
|
cfg.CONF.set_default('max_routes', 3)
|
||||||
ext_mgr = FloatingIPPortDetailsTestExtensionManager()
|
ext_mgr = FloatingIPPortDetailsTestExtensionManager()
|
||||||
super(test_l3.L3BaseForSepTests, self).setUp(
|
super(test_l3.L3BaseForSepTests, self).setUp(
|
||||||
|
@ -118,8 +118,6 @@ class FloatingIPPoolsDBIntTestCase(test_l3.L3BaseForIntTests,
|
|||||||
if not plugin:
|
if not plugin:
|
||||||
plugin = ('neutron.tests.unit.extensions.test_floatingip_pools.'
|
plugin = ('neutron.tests.unit.extensions.test_floatingip_pools.'
|
||||||
'TestFloatingIPPoolsIntPlugin')
|
'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)
|
cfg.CONF.set_default('max_routes', 3)
|
||||||
ext_mgr = FloatingIPPoolsTestExtensionManager()
|
ext_mgr = FloatingIPPoolsTestExtensionManager()
|
||||||
super(test_l3.L3BaseForIntTests, self).setUp(
|
super(test_l3.L3BaseForIntTests, self).setUp(
|
||||||
@ -142,8 +140,6 @@ class FloatingIPPoolsDBSepTestCase(test_l3.L3BaseForSepTests,
|
|||||||
'TestFloatingIPPoolsL3NatServicePlugin')
|
'TestFloatingIPPoolsL3NatServicePlugin')
|
||||||
service_plugins = {'l3_plugin_name': l3_plugin}
|
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)
|
cfg.CONF.set_default('max_routes', 3)
|
||||||
ext_mgr = FloatingIPPoolsTestExtensionManager()
|
ext_mgr = FloatingIPPoolsTestExtensionManager()
|
||||||
super(test_l3.L3BaseForSepTests, self).setUp(
|
super(test_l3.L3BaseForSepTests, self).setUp(
|
||||||
|
@ -4205,8 +4205,6 @@ class L3BaseForIntTests(test_db_base_plugin_v2.NeutronDbPluginV2TestCase):
|
|||||||
def setUp(self, plugin=None, ext_mgr=None, service_plugins=None):
|
def setUp(self, plugin=None, ext_mgr=None, service_plugins=None):
|
||||||
if not plugin:
|
if not plugin:
|
||||||
plugin = 'neutron.tests.unit.extensions.test_l3.TestL3NatIntPlugin'
|
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()
|
ext_mgr = ext_mgr or L3TestExtensionManager()
|
||||||
|
|
||||||
super(L3BaseForIntTests, self).setUp(plugin=plugin, ext_mgr=ext_mgr,
|
super(L3BaseForIntTests, self).setUp(plugin=plugin, ext_mgr=ext_mgr,
|
||||||
@ -4226,8 +4224,6 @@ class L3BaseForSepTests(test_db_base_plugin_v2.NeutronDbPluginV2TestCase):
|
|||||||
'TestL3NatServicePlugin')
|
'TestL3NatServicePlugin')
|
||||||
service_plugins = {'l3_plugin_name': l3_plugin}
|
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:
|
if not ext_mgr:
|
||||||
ext_mgr = L3TestExtensionManager()
|
ext_mgr = L3TestExtensionManager()
|
||||||
super(L3BaseForSepTests, self).setUp(plugin=plugin, ext_mgr=ext_mgr,
|
super(L3BaseForSepTests, self).setUp(plugin=plugin, ext_mgr=ext_mgr,
|
||||||
|
@ -25,7 +25,6 @@ from neutron_lib import context as nctx
|
|||||||
from neutron_lib.db import api as db_api
|
from neutron_lib.db import api as db_api
|
||||||
from neutron_lib.plugins import directory
|
from neutron_lib.plugins import directory
|
||||||
from neutron_lib.utils import net as net_utils
|
from neutron_lib.utils import net as net_utils
|
||||||
from oslo_config import cfg
|
|
||||||
from oslo_db import exception as db_exc
|
from oslo_db import exception as db_exc
|
||||||
from oslo_serialization import jsonutils
|
from oslo_serialization import jsonutils
|
||||||
from oslo_utils import uuidutils
|
from oslo_utils import uuidutils
|
||||||
@ -369,8 +368,6 @@ class ExtGwModeIntTestCase(test_db_base_plugin_v2.NeutronDbPluginV2TestCase,
|
|||||||
plugin = plugin or (
|
plugin = plugin or (
|
||||||
'neutron.tests.unit.extensions.test_l3_ext_gw_mode.'
|
'neutron.tests.unit.extensions.test_l3_ext_gw_mode.'
|
||||||
'TestDbIntPlugin')
|
'TestDbIntPlugin')
|
||||||
# for these tests we need to enable overlapping ips
|
|
||||||
cfg.CONF.set_default('allow_overlapping_ips', True)
|
|
||||||
ext_mgr = ext_mgr or TestExtensionManager()
|
ext_mgr = ext_mgr or TestExtensionManager()
|
||||||
super(ExtGwModeIntTestCase, self).setUp(plugin=plugin,
|
super(ExtGwModeIntTestCase, self).setUp(plugin=plugin,
|
||||||
ext_mgr=ext_mgr,
|
ext_mgr=ext_mgr,
|
||||||
@ -532,7 +529,5 @@ class ExtGwModeSepTestCase(ExtGwModeIntTestCase):
|
|||||||
l3_plugin = ('neutron.tests.unit.extensions.test_l3_ext_gw_mode.'
|
l3_plugin = ('neutron.tests.unit.extensions.test_l3_ext_gw_mode.'
|
||||||
'TestDbSepPlugin')
|
'TestDbSepPlugin')
|
||||||
svc_plugins = {'l3_plugin_name': l3_plugin}
|
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,
|
super(ExtGwModeSepTestCase, self).setUp(plugin=plugin,
|
||||||
svc_plugins=svc_plugins)
|
svc_plugins=svc_plugins)
|
||||||
|
@ -350,8 +350,6 @@ class FloatingIPQoSDBIntTestCase(test_l3.L3BaseForIntTests,
|
|||||||
'QoSPlugin'}
|
'QoSPlugin'}
|
||||||
|
|
||||||
extraroute_db.register_db_extraroute_opts()
|
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)
|
cfg.CONF.set_default('max_routes', 3)
|
||||||
|
|
||||||
ext_mgr = FloatingIPQoSTestExtensionManager()
|
ext_mgr = FloatingIPQoSTestExtensionManager()
|
||||||
@ -379,8 +377,6 @@ class FloatingIPQoSDBSepTestCase(test_l3.L3BaseForSepTests,
|
|||||||
'QoSPlugin'}
|
'QoSPlugin'}
|
||||||
|
|
||||||
extraroute_db.register_db_extraroute_opts()
|
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)
|
cfg.CONF.set_default('max_routes', 3)
|
||||||
|
|
||||||
ext_mgr = FloatingIPQoSTestExtensionManager()
|
ext_mgr = FloatingIPQoSTestExtensionManager()
|
||||||
|
@ -195,8 +195,6 @@ class GatewayIPQoSDBIntTestCase(test_l3.L3BaseForIntTests,
|
|||||||
service_plugins = {'qos': 'neutron.services.qos.qos_plugin.QoSPlugin'}
|
service_plugins = {'qos': 'neutron.services.qos.qos_plugin.QoSPlugin'}
|
||||||
|
|
||||||
extraroute_db.register_db_extraroute_opts()
|
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)
|
cfg.CONF.set_default('max_routes', 3)
|
||||||
|
|
||||||
ext_mgr = GatewayIPQoSTestExtensionManager()
|
ext_mgr = GatewayIPQoSTestExtensionManager()
|
||||||
@ -222,8 +220,6 @@ class GatewayIPQoSDBSepTestCase(test_l3.L3BaseForSepTests,
|
|||||||
'qos': 'neutron.services.qos.qos_plugin.QoSPlugin'}
|
'qos': 'neutron.services.qos.qos_plugin.QoSPlugin'}
|
||||||
|
|
||||||
extraroute_db.register_db_extraroute_opts()
|
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)
|
cfg.CONF.set_default('max_routes', 3)
|
||||||
|
|
||||||
ext_mgr = GatewayIPQoSTestExtensionManager()
|
ext_mgr = GatewayIPQoSTestExtensionManager()
|
||||||
|
@ -21,7 +21,6 @@ from neutron_lib import context
|
|||||||
from neutron_lib.db import api as db_api
|
from neutron_lib.db import api as db_api
|
||||||
from neutron_lib import exceptions
|
from neutron_lib import exceptions
|
||||||
from neutron_lib.plugins import directory
|
from neutron_lib.plugins import directory
|
||||||
from oslo_config import cfg
|
|
||||||
from oslo_db import exception as db_exc
|
from oslo_db import exception as db_exc
|
||||||
from oslo_utils import uuidutils
|
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.setup_coreplugin(test_db_base_plugin_v2.DB_PLUGIN_KLASS)
|
||||||
self.plugin = directory.get_plugin()
|
self.plugin = directory.get_plugin()
|
||||||
self.ctx = context.get_admin_context()
|
self.ctx = context.get_admin_context()
|
||||||
cfg.CONF.set_override('allow_overlapping_ips', True)
|
|
||||||
|
|
||||||
def _create_subnet_pool(self, plugin, ctx, name, prefix_list,
|
def _create_subnet_pool(self, plugin, ctx, name, prefix_list,
|
||||||
min_prefixlen, ip_version,
|
min_prefixlen, ip_version,
|
||||||
|
@ -1641,8 +1641,6 @@ class TestMl2PortsV2(test_plugin.TestPortsV2, Ml2PluginV2TestCase):
|
|||||||
self.assertTrue(listener.except_raised)
|
self.assertTrue(listener.except_raised)
|
||||||
|
|
||||||
def test_list_ports_filtered_by_fixed_ip_substring(self):
|
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():
|
with self.port() as port1, self.port():
|
||||||
fixed_ips = port1['port']['fixed_ips'][0]
|
fixed_ips = port1['port']['fixed_ips'][0]
|
||||||
query_params = """
|
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'])
|
self._delete('ports', port2['port']['id'])
|
||||||
|
|
||||||
def test_list_ports_filtered_by_security_groups(self):
|
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()
|
ctx = context.get_admin_context()
|
||||||
with self.port() as port1, self.port() as port2:
|
with self.port() as port1, self.port() as port2:
|
||||||
query_params = "security_groups=%s" % (
|
query_params = "security_groups=%s" % (
|
||||||
|
@ -1636,8 +1636,6 @@ class OVNL3ExtrarouteTests(test_l3_gw.ExtGwModeIntTestCase,
|
|||||||
plugin = 'neutron.tests.unit.extensions.test_l3.TestNoL3NatPlugin'
|
plugin = 'neutron.tests.unit.extensions.test_l3.TestNoL3NatPlugin'
|
||||||
l3_plugin = ('neutron.services.ovn_l3.plugin.OVNL3RouterPlugin')
|
l3_plugin = ('neutron.services.ovn_l3.plugin.OVNL3RouterPlugin')
|
||||||
service_plugins = {'l3_plugin_name': l3_plugin}
|
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)
|
cfg.CONF.set_default('max_routes', 3)
|
||||||
ext_mgr = test_extraroute.ExtraRouteTestExtensionManager()
|
ext_mgr = test_extraroute.ExtraRouteTestExtensionManager()
|
||||||
super(test_l3.L3BaseForIntTests, self).setUp(
|
super(test_l3.L3BaseForIntTests, self).setUp(
|
||||||
|
@ -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.
|
Loading…
Reference in New Issue
Block a user