Merge "Introduced rpc_compat.create_connection()"

This commit is contained in:
Jenkins 2014-06-16 23:11:30 +00:00 committed by Gerrit Code Review
commit 5f0602828a
8 changed files with 9 additions and 13 deletions

View File

@ -29,7 +29,6 @@ from neutron import context as ctx
from neutron.openstack.common import lockutils
from neutron.openstack.common import log as logging
from neutron.openstack.common import loopingcall
from neutron.openstack.common import rpc
from neutron.plugins.common import constants
from neutron.plugins.common import utils as plugin_utils
from neutron.services.vpn.common import topics
@ -192,7 +191,7 @@ class CiscoCsrIPsecDriver(device_drivers.DeviceDriver):
# TODO(ihrachys): we can't use RpcCallback here due to
# inheritance issues
self.host = host
self.conn = rpc.create_connection(new=True)
self.conn = rpc_compat.create_connection(new=True)
context = ctx.get_admin_context_without_session()
node_topic = '%s.%s' % (topics.CISCO_IPSEC_AGENT_TOPIC, self.host)

View File

@ -33,7 +33,6 @@ from neutron import context
from neutron.openstack.common import lockutils
from neutron.openstack.common import log as logging
from neutron.openstack.common import loopingcall
from neutron.openstack.common import rpc
from neutron.plugins.common import constants
from neutron.plugins.common import utils as plugin_utils
from neutron.services.vpn.common import topics
@ -495,7 +494,7 @@ class IPsecDriver(device_drivers.DeviceDriver):
self.conf = self.agent.conf
self.root_helper = self.agent.root_helper
self.host = host
self.conn = rpc.create_connection(new=True)
self.conn = rpc_compat.create_connection(new=True)
self.context = context.get_admin_context_without_session()
self.topic = topics.IPSEC_AGENT_TOPIC
node_topic = '%s.%s' % (self.topic, self.host)

View File

@ -20,7 +20,6 @@ from neutron.common import rpc as n_rpc
from neutron.common import rpc_compat
from neutron.openstack.common import excutils
from neutron.openstack.common import log as logging
from neutron.openstack.common import rpc
from neutron.plugins.common import constants
from neutron.services.vpn.common import topics
from neutron.services.vpn import service_drivers
@ -91,7 +90,7 @@ class CiscoCsrIPsecVPNDriver(service_drivers.VpnDriver):
def __init__(self, service_plugin):
super(CiscoCsrIPsecVPNDriver, self).__init__(service_plugin)
self.callbacks = CiscoCsrIPsecVpnDriverCallBack(self)
self.conn = rpc.create_connection(new=True)
self.conn = rpc_compat.create_connection(new=True)
self.conn.create_consumer(
topics.CISCO_IPSEC_DRIVER_TOPIC,
self.callbacks.create_rpc_dispatcher(),

View File

@ -19,7 +19,6 @@ import netaddr
from neutron.common import rpc as n_rpc
from neutron.common import rpc_compat
from neutron.openstack.common import log as logging
from neutron.openstack.common import rpc
from neutron.services.vpn.common import topics
from neutron.services.vpn import service_drivers
@ -76,7 +75,7 @@ class IPsecVPNDriver(service_drivers.VpnDriver):
def __init__(self, service_plugin):
super(IPsecVPNDriver, self).__init__(service_plugin)
self.callbacks = IPsecVpnDriverCallBack(self)
self.conn = rpc.create_connection(new=True)
self.conn = rpc_compat.create_connection(new=True)
self.conn.create_consumer(
topics.IPSEC_DRIVER_TOPIC,
self.callbacks.create_rpc_dispatcher(),

View File

@ -399,7 +399,7 @@ class TestCiscoCsrIPsecDeviceDriverSyncStatuses(base.BaseTestCase):
def setUp(self):
super(TestCiscoCsrIPsecDeviceDriverSyncStatuses, self).setUp()
for klass in ['neutron.openstack.common.rpc.create_connection',
for klass in ['neutron.common.rpc_compat.create_connection',
'neutron.context.get_admin_context_without_session',
'neutron.openstack.common.'
'loopingcall.FixedIntervalLoopingCall']:

View File

@ -47,7 +47,7 @@ class TestIPsecDeviceDriver(base.BaseTestCase):
'os.makedirs',
'os.path.isdir',
'neutron.agent.linux.utils.replace_file',
'neutron.openstack.common.rpc.create_connection',
'neutron.common.rpc_compat.create_connection',
'neutron.services.vpn.device_drivers.ipsec.'
'OpenSwanProcess._gen_config_content',
'shutil.rmtree',

View File

@ -44,7 +44,7 @@ class TestCiscoIPsecDriverValidation(base.BaseTestCase):
def setUp(self):
super(TestCiscoIPsecDriverValidation, self).setUp()
mock.patch('neutron.openstack.common.rpc.create_connection').start()
mock.patch('neutron.common.rpc_compat.create_connection').start()
self.service_plugin = mock.Mock()
self.driver = ipsec_driver.CiscoCsrIPsecVPNDriver(self.service_plugin)
self.context = n_ctx.Context('some_user', 'some_tenant')
@ -284,7 +284,7 @@ class TestCiscoIPsecDriver(base.BaseTestCase):
super(TestCiscoIPsecDriver, self).setUp()
dbapi.configure_db()
self.addCleanup(dbapi.clear_db)
mock.patch('neutron.openstack.common.rpc.create_connection').start()
mock.patch('neutron.common.rpc_compat.create_connection').start()
l3_agent = mock.Mock()
l3_agent.host = FAKE_HOST

View File

@ -37,7 +37,7 @@ FAKE_HOST = 'fake_host'
class TestIPsecDriver(base.BaseTestCase):
def setUp(self):
super(TestIPsecDriver, self).setUp()
mock.patch('neutron.openstack.common.rpc.create_connection').start()
mock.patch('neutron.common.rpc_compat.create_connection').start()
l3_agent = mock.Mock()
l3_agent.host = FAKE_HOST