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

neutron/plugins/sriovnicagent/sriov_nic_agent.py

index 751e1c445ef95fabf05450ddcf5550bdea3552e7..12374297fc07f185946c16ebd513f19b39d02235 100644 (file)
@@ -66,11 +66,6 @@ class SriovNicSwitchRpcCallbacks(sg_rpc.SecurityGroupAgentRpcCallbackMixin):
         LOG.debug("port_update RPC received for port: %s", port['id'])
 
 
-class SriovNicSwitchPluginApi(agent_rpc.PluginApi,
-                              sg_rpc.SecurityGroupServerRpcApiMixin):
-    pass
-
-
 class SriovNicSwitchSecurityGroupAgent(sg_rpc.SecurityGroupAgentRpcMixin):
     def __init__(self, context, plugin_rpc, root_helper):
         self.context = context
@@ -100,9 +95,10 @@ class SriovNicSwitchAgent(object):
         self.updated_devices = set()
 
         self.context = context.get_admin_context_without_session()
-        self.plugin_rpc = SriovNicSwitchPluginApi(topics.PLUGIN)
+        self.plugin_rpc = agent_rpc.PluginApi(topics.PLUGIN)
+        self.sg_plugin_rpc = sg_rpc.SecurityGroupServerRpcApi(topics.PLUGIN)
         self.sg_agent = SriovNicSwitchSecurityGroupAgent(self.context,
-                self.plugin_rpc, self.root_helper)
+                self.sg_plugin_rpc, self.root_helper)
         self._setup_rpc()
         # Initialize iteration counter
         self.iter_num = 0