]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Refresh rpc_backend values in unit tests to those from oslo.messaging
authorIhar Hrachyshka <ihrachys@redhat.com>
Thu, 21 Aug 2014 13:49:24 +0000 (15:49 +0200)
committerIhar Hrachyshka <ihrachys@redhat.com>
Fri, 22 Aug 2014 09:02:25 +0000 (11:02 +0200)
Though old values are supported via compatibility transport aliases [1],
it's better to stick to those values that are officially supported by
oslo.messaging.

[1]: neutron/common/rpc.py:TRANSPORT_ALIASES

blueprint oslo-messaging

Change-Id: I7bc03e323151cfdda2cb2bc4cd6f5aea9b87a746

13 files changed:
neutron/tests/etc/neutron.conf.test
neutron/tests/unit/hyperv/test_hyperv_neutron_agent.py
neutron/tests/unit/ibm/test_sdnve_agent.py
neutron/tests/unit/linuxbridge/test_lb_neutron_agent.py
neutron/tests/unit/mlnx/test_mlnx_neutron_agent.py
neutron/tests/unit/mlnx/test_mlnx_plugin_config.py
neutron/tests/unit/nec/test_nec_agent.py
neutron/tests/unit/ofagent/test_ofa_neutron_agent.py
neutron/tests/unit/oneconvergence/test_nvsd_agent.py
neutron/tests/unit/openvswitch/test_ovs_neutron_agent.py
neutron/tests/unit/openvswitch/test_ovs_tunnel.py
neutron/tests/unit/sriovnicagent/test_sriov_neutron_agent.py
neutron/tests/unit/vmware/etc/neutron.conf.test

index 45f0e778f5c2e924cbd6b13c1def3f5d4a4d5cc5..45fcf29411e3cd09692e82a116a4c9cb69ee266d 100644 (file)
@@ -18,7 +18,7 @@ api_extensions_path = unit/extensions
 api_paste_config = api-paste.ini.test
 
 # The messaging module to use, defaults to kombu.
-rpc_backend = neutron.openstack.common.rpc.impl_fake
+rpc_backend = fake
 
 lock_path = $state_path/lock
 
index 49fc04c0e78f71edc5900cc81ba2fef2b1feb7d6..1de90d12feccb471ca604746ea0fb7568e550be4 100644 (file)
@@ -36,9 +36,6 @@ class TestHyperVNeutronAgent(base.BaseTestCase):
 
     def setUp(self):
         super(TestHyperVNeutronAgent, self).setUp()
-        # Avoid rpc initialization for unit tests
-        cfg.CONF.set_override('rpc_backend',
-                              'neutron.openstack.common.rpc.impl_fake')
 
         utilsfactory._get_windows_version = mock.MagicMock(
             return_value='6.2.0')
index 3b33d901e6d399aa62ff2afa2c63082114575f45..085ec936d184b9b469124842256d4cf5f9a98ddc 100644 (file)
@@ -59,9 +59,6 @@ class TestSdnveNeutronAgent(base.BaseTestCase):
         notifier_cls = notifier_p.start()
         self.notifier = mock.Mock()
         notifier_cls.return_value = self.notifier
-        # Avoid rpc initialization for unit tests
-        cfg.CONF.set_override('rpc_backend',
-                              'neutron.openstack.common.rpc.impl_fake')
         cfg.CONF.set_override('integration_bridge',
                               'br_int', group='SDNVE')
         kwargs = sdnve_neutron_agent.create_agent_config_map(cfg.CONF)
index 0c4661267d8780659e2a18679846ada37acbe981..adc3822db398198f042c511b8bbfaaba589a34e4 100644 (file)
@@ -95,8 +95,6 @@ class TestLinuxBridgeAgent(base.BaseTestCase):
         super(TestLinuxBridgeAgent, self).setUp()
         # disable setting up periodic state reporting
         cfg.CONF.set_override('report_interval', 0, 'AGENT')
-        cfg.CONF.set_override('rpc_backend',
-                              'neutron.openstack.common.rpc.impl_fake')
         cfg.CONF.set_default('firewall_driver',
                              'neutron.agent.firewall.NoopFirewallDriver',
                              group='SECURITYGROUP')
index d8bd5abf633613a4ab97e73592e4d1fbaf6e3bb5..fafbd5c56d743efc1610ae203be58e6ea0b27382 100644 (file)
@@ -66,9 +66,6 @@ class TestEswitchAgent(base.BaseTestCase):
 
     def setUp(self):
         super(TestEswitchAgent, self).setUp()
-        # Avoid rpc initialization for unit tests
-        cfg.CONF.set_override('rpc_backend',
-                              'neutron.openstack.common.rpc.impl_fake')
         cfg.CONF.set_default('firewall_driver',
                              'neutron.agent.firewall.NoopFirewallDriver',
                              group='SECURITYGROUP')
index 90991a604c98819f6c35e8661a41fcd5a7500d5c..581f622c1a2951c53e77c23f074b67f09801bce5 100644 (file)
@@ -33,8 +33,6 @@ class TestMlnxPluginConfig(testlib_api.SqlTestCase):
 
     def setUp(self):
         super(TestMlnxPluginConfig, self).setUp()
-        cfg.CONF.set_override('rpc_backend',
-                              'neutron.openstack.common.rpc.impl_fake')
         cfg.CONF.set_override(group='MLNX',
                               name='network_vlan_ranges',
                               override=self.config_vlan_ranges)
index 1bb7b64149eaccb52bfbf169c5bb0ccfc6af4e67..a2125e1929869a006bb353741e218dd518579dcf 100644 (file)
@@ -39,8 +39,6 @@ class TestNecAgentBase(base.BaseTestCase):
         cfg.CONF.set_default('firewall_driver',
                              'neutron.agent.firewall.NoopFirewallDriver',
                              group='SECURITYGROUP')
-        cfg.CONF.set_override('rpc_backend',
-                              'neutron.openstack.common.rpc.impl_fake')
         cfg.CONF.set_override('host', 'dummy-host')
         with contextlib.nested(
             mock.patch.object(ovs_lib.OVSBridge, 'get_datapath_id',
index 9336611a2d2e094d0add784f3a3888b9f446f9c4..e0bdaf709e1bec82a672bf5a200898958ac9d416 100644 (file)
@@ -192,9 +192,6 @@ class TestOFANeutronAgent(ofa_test_base.OFAAgentTestBase):
         notifier_cls = notifier_p.start()
         self.notifier = mock.Mock()
         notifier_cls.return_value = self.notifier
-        # Avoid rpc initialization for unit tests
-        cfg.CONF.set_override('rpc_backend',
-                              'neutron.openstack.common.rpc.impl_fake')
         kwargs = self.mod_agent.create_agent_config_map(cfg.CONF)
 
         class MockFixedIntervalLoopingCall(object):
index f04d2fecb11bc14a1b30d27f16779aa3c9dc33e4..d034755fbd416f025329d860a4d79510caae8fb5 100644 (file)
@@ -36,8 +36,6 @@ class TestOneConvergenceAgentBase(base.BaseTestCase):
         cfg.CONF.set_default('firewall_driver',
                              'neutron.agent.firewall.NoopFirewallDriver',
                              group='SECURITYGROUP')
-        cfg.CONF.set_override('rpc_backend',
-                              'neutron.openstack.common.rpc.impl_fake')
         with contextlib.nested(
             mock.patch('neutron.openstack.common.loopingcall.'
                        'FixedIntervalLoopingCall'),
index b7e8f3c1335b2373df5f90af7f2ff37a84363948..17da5960da13f956c27927c483d55493b8c2c908 100644 (file)
@@ -105,9 +105,6 @@ class TestOvsNeutronAgent(base.BaseTestCase):
         cfg.CONF.set_default('firewall_driver',
                              'neutron.agent.firewall.NoopFirewallDriver',
                              group='SECURITYGROUP')
-        # Avoid rpc initialization for unit tests
-        cfg.CONF.set_override('rpc_backend',
-                              'neutron.openstack.common.rpc.impl_fake')
         kwargs = ovs_neutron_agent.create_agent_config_map(cfg.CONF)
 
         class MockFixedIntervalLoopingCall(object):
@@ -1379,9 +1376,6 @@ class AncillaryBridgesTest(base.BaseTestCase):
         cfg.CONF.set_default('firewall_driver',
                              'neutron.agent.firewall.NoopFirewallDriver',
                              group='SECURITYGROUP')
-        # Avoid rpc initialization for unit tests
-        cfg.CONF.set_override('rpc_backend',
-                              'neutron.openstack.common.rpc.impl_fake')
         cfg.CONF.set_override('report_interval', 0, 'AGENT')
         self.kwargs = ovs_neutron_agent.create_agent_config_map(cfg.CONF)
 
index 8ddfa64be777a7b8e6cb58c46a957582007b7298..8da894ee0f4388673b0f1a05cda98b6a7fbe47a0 100644 (file)
@@ -74,8 +74,6 @@ class TunnelTest(base.BaseTestCase):
         cfg.CONF.set_default('firewall_driver',
                              'neutron.agent.firewall.NoopFirewallDriver',
                              group='SECURITYGROUP')
-        cfg.CONF.set_override('rpc_backend',
-                              'neutron.openstack.common.rpc.impl_fake')
         cfg.CONF.set_override('report_interval', 0, 'AGENT')
 
         self.INT_BRIDGE = 'integration_bridge'
index ac078e267bf6611ba5be81a7a53e24f822993291..3a422ce8e96981929ecc328e06f688dcc96f26ae 100644 (file)
@@ -29,8 +29,6 @@ class TestSriovAgent(base.BaseTestCase):
         super(TestSriovAgent, self).setUp()
         # disable setting up periodic state reporting
         cfg.CONF.set_override('report_interval', 0, 'AGENT')
-        cfg.CONF.set_override('rpc_backend',
-                              'neutron.openstack.common.rpc.impl_fake')
         cfg.CONF.set_default('firewall_driver',
                              'neutron.agent.firewall.NoopFirewallDriver',
                              group='SECURITYGROUP')
index 9eff4405d3d58aa6a85a007faa4b82480ab67ea6..4fd0092bf0ddf9cbc02acac8200dce34ee13d027 100644 (file)
@@ -18,7 +18,7 @@ bind_port = 9696
 api_paste_config = api-paste.ini.test
 
 # The messaging module to use, defaults to kombu.
-rpc_backend = neutron.openstack.common.rpc.impl_fake
+rpc_backend = fake
 
 lock_path = $state_path/lock