From: Russell Bryant Date: Fri, 16 Jan 2015 14:37:52 +0000 (-0500) Subject: nec: drop usage of SecurityGroupServerRpcApiMixin X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=235c6ab9789d28c358054a2ae56ea9dd9d80b537;p=openstack-build%2Fneutron-build.git nec: drop usage of SecurityGroupServerRpcApiMixin 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 --- diff --git a/neutron/plugins/nec/agent/nec_neutron_agent.py b/neutron/plugins/nec/agent/nec_neutron_agent.py index 7ebcc5f6c..4dd3876ca 100755 --- a/neutron/plugins/nec/agent/nec_neutron_agent.py +++ b/neutron/plugins/nec/agent/nec_neutron_agent.py @@ -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()