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

index 0f993d4673ac369f23693b55bb15fd7016fd3719..21517c61e5a61613e30ee58fc376fe68fa2bded8 100644 (file)
@@ -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(