]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
oneconvergence: drop usage of SecurityGroupServerRpcApiMixin
authorRussell Bryant <rbryant@redhat.com>
Fri, 16 Jan 2015 15:06:00 +0000 (10:06 -0500)
committerRussell Bryant <rbryant@redhat.com>
Wed, 21 Jan 2015 14:49:28 +0000 (09:49 -0500)
Drop usage of SecurityGroupServerRpcApiMixin in the oneconvergence
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: I635fbeb57f4d5ee8a7ce4ca353a32b543e7d2433

neutron/plugins/oneconvergence/agent/nvsd_neutron_agent.py

index 8baf24de555dfddba7efcbef0695be73b161e07a..a616e45e91aee351a5922d68e6d651fa74907e26 100644 (file)
@@ -27,7 +27,6 @@ from neutron.agent.linux import ovs_lib
 from neutron.agent import rpc as agent_rpc
 from neutron.agent import securitygroups_rpc as sg_rpc
 from neutron.common import config as common_config
-from neutron.common import rpc as n_rpc
 from neutron.common import topics
 from neutron import context as n_context
 from neutron.extensions import securitygroup as ext_sg
@@ -60,14 +59,6 @@ class NVSDAgentRpcCallback(object):
             self.sg_agent.refresh_firewall()
 
 
-class SecurityGroupServerRpcApi(sg_rpc.SecurityGroupServerRpcApiMixin):
-
-    def __init__(self, topic):
-        self.topic = topic
-        target = messaging.Target(topic=topic, version=sg_rpc.SG_RPC_VERSION)
-        self.client = n_rpc.get_client(target)
-
-
 class SecurityGroupAgentRpcCallback(sg_rpc.SecurityGroupAgentRpcCallbackMixin):
 
     target = messaging.Target(version=sg_rpc.SG_RPC_VERSION)
@@ -83,7 +74,7 @@ class SecurityGroupAgentRpc(sg_rpc.SecurityGroupAgentRpcMixin):
     def __init__(self, context, root_helper):
         self.context = context
 
-        self.plugin_rpc = SecurityGroupServerRpcApi(topics.PLUGIN)
+        self.plugin_rpc = sg_rpc.SecurityGroupServerRpcApi(topics.PLUGIN)
         self.root_helper = root_helper
         self.init_firewall()