]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
bigswitch: drop usage of SecurityGroupServerRpcApiMixin
authorRussell Bryant <rbryant@redhat.com>
Fri, 16 Jan 2015 13:52:40 +0000 (08:52 -0500)
committerRussell Bryant <rbryant@redhat.com>
Wed, 21 Jan 2015 14:49:28 +0000 (09:49 -0500)
Drop usage of SecurityGroupServerRpcApiMixin in the bigswitch plugin.
This is required to be able to eventually move this API into a
messaging namespace.  It needs to use its own messaging client
instance, instead of a different one it gets after being used as a
mixin.

Part of blueprint rpc-docs-and-namespaces.

Change-Id: Ib1c06d5b79c51fb63131efdf6ed83a7e85a7b820

neutron/plugins/bigswitch/agent/restproxy_agent.py
neutron/tests/unit/bigswitch/test_restproxy_agent.py

index ab60ec419168247c49b28d916eec01e4d9af7885..b8ec85fbea6012977d6477de562c43c3ec0a5b01 100644 (file)
@@ -71,11 +71,6 @@ class IVSBridge(ovs_lib.OVSBridge):
         return False
 
 
-class PluginApi(agent_rpc.PluginApi,
-                sg_rpc.SecurityGroupServerRpcApiMixin):
-    pass
-
-
 class SecurityGroupAgent(sg_rpc.SecurityGroupAgentRpcMixin):
     def __init__(self, context, plugin_rpc, root_helper):
         self.context = context
@@ -93,7 +88,7 @@ class RestProxyAgent(sg_rpc.SecurityGroupAgentRpcCallbackMixin):
         self.polling_interval = polling_interval
         self._setup_rpc()
         self.sg_agent = SecurityGroupAgent(self.context,
-                                           self.plugin_rpc,
+                                           self.sg_plugin_rpc,
                                            root_helper)
         if vs == 'ivs':
             self.int_br = IVSBridge(integ_br, root_helper)
@@ -102,7 +97,8 @@ class RestProxyAgent(sg_rpc.SecurityGroupAgentRpcCallbackMixin):
 
     def _setup_rpc(self):
         self.topic = topics.AGENT
-        self.plugin_rpc = PluginApi(topics.PLUGIN)
+        self.plugin_rpc = agent_rpc.PluginApi(topics.PLUGIN)
+        self.sg_plugin_rpc = sg_rpc.SecurityGroupServerRpcApi(topics.PLUGIN)
         self.context = q_context.get_admin_context_without_session()
         self.endpoints = [self]
         consumers = [[topics.PORT, topics.UPDATE],
index 7dd710eab51a317947a6de43035b8104fd5bece6..95632fae1dcd6c93a5d8385e810d73b7b5b45656 100644 (file)
@@ -21,7 +21,7 @@ from oslo.utils import importutils
 from neutron.tests import base
 
 OVSBRIDGE = 'neutron.agent.linux.ovs_lib.OVSBridge'
-PLUGINAPI = 'neutron.plugins.bigswitch.agent.restproxy_agent.PluginApi'
+PLUGINAPI = 'neutron.agent.rpc.PluginApi'
 CONTEXT = 'neutron.context'
 CONSUMERCREATE = 'neutron.agent.rpc.create_consumers'
 SGRPC = 'neutron.agent.securitygroups_rpc'