]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
linuxbridge: drop usage of SecurityGroupServerRpcApiMixin
authorRussell Bryant <rbryant@redhat.com>
Wed, 21 Jan 2015 18:40:18 +0000 (13:40 -0500)
committerRussell Bryant <rbryant@redhat.com>
Thu, 22 Jan 2015 20:39:07 +0000 (15:39 -0500)
Drop usage of SecurityGroupServerRpcApiMixin in the linuxbridge agent.
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: I736468ebd32822352e44eda8c5f1a25972a70fda

neutron/plugins/linuxbridge/agent/linuxbridge_neutron_agent.py

index 9b2e2a5a71868081f9450724392dae3914dcd56f..7c72ed960228ca2f7e4d7638171f218f61c3fdc3 100755 (executable)
@@ -742,11 +742,6 @@ class LinuxBridgeRpcCallbacks(sg_rpc.SecurityGroupAgentRpcCallbackMixin,
             getattr(self, method)(context, values)
 
 
-class LinuxBridgePluginApi(agent_rpc.PluginApi,
-                           sg_rpc.SecurityGroupServerRpcApiMixin):
-    pass
-
-
 class LinuxBridgeSecurityGroupAgent(sg_rpc.SecurityGroupAgentRpcMixin):
     def __init__(self, context, plugin_rpc, root_helper):
         self.context = context
@@ -778,9 +773,10 @@ class LinuxBridgeNeutronAgentRPC(object):
         # stores received port_updates for processing by the main loop
         self.updated_devices = set()
         self.context = context.get_admin_context_without_session()
-        self.plugin_rpc = LinuxBridgePluginApi(topics.PLUGIN)
+        self.plugin_rpc = agent_rpc.PluginApi(topics.PLUGIN)
+        self.sg_plugin_rpc = sg_rpc.SecurityGroupServerRpcApi(topics.PLUGIN)
         self.sg_agent = LinuxBridgeSecurityGroupAgent(self.context,
-                self.plugin_rpc, self.root_helper)
+                self.sg_plugin_rpc, self.root_helper)
         self.setup_rpc(interface_mappings.values())
 
     def _report_state(self):