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

neutron/plugins/nec/agent/nec_neutron_agent.py

index 7ebcc5f6c984c34e4d04dfdd35f6d31a17dd8519..4dd3876ca535e53bb58f0016b113d27130c7f69c 100755 (executable)
@@ -32,7 +32,6 @@ 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 constants as q_const
-from neutron.common import rpc as n_rpc
 from neutron.common import topics
 from neutron import context as q_context
 from neutron.extensions import securitygroup as ext_sg
@@ -83,14 +82,6 @@ class NECAgentRpcCallback(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)
@@ -105,7 +96,7 @@ class SecurityGroupAgentRpc(sg_rpc.SecurityGroupAgentRpcMixin):
 
     def __init__(self, context):
         self.context = context
-        self.plugin_rpc = SecurityGroupServerRpcApi(topics.PLUGIN)
+        self.plugin_rpc = sg_rpc.SecurityGroupServerRpcApi(topics.PLUGIN)
         self.init_firewall()