Remove fake_rabbit configuration option

The fake_rabbit configuration option has been deprecated since the
release of 1.5.0 in late 2014. Finally remove it, and its test.

Change-Id: I014c2012cca0f289de0d95b9bb35bbde7f61d2ee
This commit is contained in:
Steve Kowalik 2018-06-26 13:12:00 +10:00
parent 648ad56c86
commit 5de0494739
2 changed files with 1 additions and 33 deletions

View File

@ -194,13 +194,6 @@ rabbit_opts = [
default=2,
help='How often times during the heartbeat_timeout_threshold '
'we check the heartbeat.'),
# NOTE(sileht): deprecated option since oslo_messaging 1.5.0,
cfg.BoolOpt('fake_rabbit',
default=False,
deprecated_group='DEFAULT',
help='Deprecated, use rpc_backend=kombu+memory or '
'rpc_backend=fake'),
]
LOG = logging.getLogger(__name__)
@ -463,7 +456,6 @@ class Connection(object):
self.interval_max = driver_conf.rabbit_interval_max
self.login_method = driver_conf.rabbit_login_method
self.fake_rabbit = driver_conf.fake_rabbit
self.virtual_host = driver_conf.rabbit_virtual_host
self.rabbit_hosts = driver_conf.rabbit_hosts
self.rabbit_port = driver_conf.rabbit_port
@ -501,12 +493,7 @@ class Connection(object):
virtual_host = self.virtual_host
self._url = ''
if self.fake_rabbit:
LOG.warning(_LW("Deprecated: fake_rabbit option is deprecated, "
"set rpc_backend to kombu+memory or use the fake "
"driver instead."))
self._url = 'memory://%s/' % virtual_host
elif url.hosts:
if url.hosts:
if url.transport.startswith('kombu+'):
LOG.warning(_LW('Selecting the kombu transport through the '
'transport url (%s) is a experimental feature '

View File

@ -22,7 +22,6 @@ import uuid
import fixtures
import kombu
import kombu.transport.memory
from oslo_config import cfg
from oslo_serialization import jsonutils
import testscenarios
@ -37,24 +36,6 @@ from six.moves import mock
load_tests = testscenarios.load_tests_apply_scenarios
class TestDeprecatedRabbitDriverLoad(test_utils.BaseTestCase):
def setUp(self):
super(TestDeprecatedRabbitDriverLoad, self).setUp(
conf=cfg.ConfigOpts())
self.messaging_conf.transport_url = 'rabbit:/'
self.config(fake_rabbit=True, group="oslo_messaging_rabbit")
def test_driver_load(self):
transport = oslo_messaging.get_transport(self.conf)
self.addCleanup(transport.cleanup)
driver = transport._driver
url = driver._get_connection()._url
self.assertIsInstance(driver, rabbit_driver.RabbitDriver)
self.assertEqual('memory:///', url)
class TestHeartbeat(test_utils.BaseTestCase):
@mock.patch('oslo_messaging._drivers.impl_rabbit.LOG')