From f3505e873f59702fad1196cafdd224eea72ba674 Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Fri, 16 Jan 2015 08:52:40 -0500 Subject: [PATCH] bigswitch: drop usage of SecurityGroupServerRpcApiMixin Drop usage of SecurityGroupServerRpcApiMixin in the bigswitch 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: Ib1c06d5b79c51fb63131efdf6ed83a7e85a7b820 --- neutron/plugins/bigswitch/agent/restproxy_agent.py | 10 +++------- neutron/tests/unit/bigswitch/test_restproxy_agent.py | 2 +- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/neutron/plugins/bigswitch/agent/restproxy_agent.py b/neutron/plugins/bigswitch/agent/restproxy_agent.py index ab60ec41916..b8ec85fbea6 100644 --- a/neutron/plugins/bigswitch/agent/restproxy_agent.py +++ b/neutron/plugins/bigswitch/agent/restproxy_agent.py @@ -71,11 +71,6 @@ class IVSBridge(ovs_lib.OVSBridge): return False -class PluginApi(agent_rpc.PluginApi, - sg_rpc.SecurityGroupServerRpcApiMixin): - pass - - class SecurityGroupAgent(sg_rpc.SecurityGroupAgentRpcMixin): def __init__(self, context, plugin_rpc, root_helper): self.context = context @@ -93,7 +88,7 @@ class RestProxyAgent(sg_rpc.SecurityGroupAgentRpcCallbackMixin): self.polling_interval = polling_interval self._setup_rpc() self.sg_agent = SecurityGroupAgent(self.context, - self.plugin_rpc, + self.sg_plugin_rpc, root_helper) if vs == 'ivs': self.int_br = IVSBridge(integ_br, root_helper) @@ -102,7 +97,8 @@ class RestProxyAgent(sg_rpc.SecurityGroupAgentRpcCallbackMixin): def _setup_rpc(self): self.topic = topics.AGENT - self.plugin_rpc = PluginApi(topics.PLUGIN) + self.plugin_rpc = agent_rpc.PluginApi(topics.PLUGIN) + self.sg_plugin_rpc = sg_rpc.SecurityGroupServerRpcApi(topics.PLUGIN) self.context = q_context.get_admin_context_without_session() self.endpoints = [self] consumers = [[topics.PORT, topics.UPDATE], diff --git a/neutron/tests/unit/bigswitch/test_restproxy_agent.py b/neutron/tests/unit/bigswitch/test_restproxy_agent.py index 7dd710eab51..95632fae1dc 100644 --- a/neutron/tests/unit/bigswitch/test_restproxy_agent.py +++ b/neutron/tests/unit/bigswitch/test_restproxy_agent.py @@ -21,7 +21,7 @@ from oslo.utils import importutils from neutron.tests import base OVSBRIDGE = 'neutron.agent.linux.ovs_lib.OVSBridge' -PLUGINAPI = 'neutron.plugins.bigswitch.agent.restproxy_agent.PluginApi' +PLUGINAPI = 'neutron.agent.rpc.PluginApi' CONTEXT = 'neutron.context' CONSUMERCREATE = 'neutron.agent.rpc.create_consumers' SGRPC = 'neutron.agent.securitygroups_rpc'