From 21b20b7e2d4a4ff1a18ef2b19508cab7cca9f27e Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Fri, 16 Jan 2015 09:09:48 -0500 Subject: [PATCH] hyperv: drop usage of SecurityGroupServerRpcApiMixin Drop usage of SecurityGroupServerRpcApiMixin in the hyperv 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: Idad9732be1c225262b39e07455d41bd61477c39d --- neutron/plugins/hyperv/agent/hyperv_neutron_agent.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/neutron/plugins/hyperv/agent/hyperv_neutron_agent.py b/neutron/plugins/hyperv/agent/hyperv_neutron_agent.py index 0f993d4673a..21517c61e5a 100644 --- a/neutron/plugins/hyperv/agent/hyperv_neutron_agent.py +++ b/neutron/plugins/hyperv/agent/hyperv_neutron_agent.py @@ -110,11 +110,6 @@ class HyperVSecurityCallbackMixin(sg_rpc.SecurityGroupAgentRpcCallbackMixin): self.sg_agent = sg_agent -class HyperVPluginApi(agent_rpc.PluginApi, - sg_rpc.SecurityGroupServerRpcApiMixin): - pass - - class HyperVNeutronAgent(object): # Set RPC API version to 1.1 by default. target = messaging.Target(version='1.1') @@ -150,7 +145,8 @@ class HyperVNeutronAgent(object): def _setup_rpc(self): self.agent_id = 'hyperv_%s' % platform.node() self.topic = topics.AGENT - self.plugin_rpc = HyperVPluginApi(topics.PLUGIN) + self.plugin_rpc = agent_rpc.PluginApi(topics.PLUGIN) + self.sg_plugin_rpc = sg_rpc.SecurityGroupServerRpcApi(topics.PLUGIN) self.state_rpc = agent_rpc.PluginReportStateAPI(topics.PLUGIN) @@ -168,7 +164,7 @@ class HyperVNeutronAgent(object): consumers) self.sec_groups_agent = HyperVSecurityAgent( - self.context, self.plugin_rpc) + self.context, self.sg_plugin_rpc) report_interval = CONF.AGENT.report_interval if report_interval: heartbeat = loopingcall.FixedIntervalLoopingCall(