]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Remove redundant initialization and check from DVR RPC mixin
authorarmando-migliaccio <armamig@gmail.com>
Wed, 15 Oct 2014 06:25:58 +0000 (23:25 -0700)
committerArmando Migliaccio <armamig@gmail.com>
Sun, 19 Oct 2014 13:56:00 +0000 (13:56 +0000)
The initialization, as well as the recurrent checks on whether the agent
is able to handle DVR requests, are not necessary; this is because the
dvr_agent is going to be set at the time the L2 agent starts receiving
RPC messages.

Change-Id: I9caad965d0ff507e2ed93d6432997ad86139ac04

neutron/api/rpc/handlers/dvr_rpc.py

index f4d0233a56c1497591ba3abfe6c025298169b21b..e9028cf6475d67cc94522b5adc409c5cd412d7f4 100644 (file)
@@ -115,8 +115,6 @@ class DVRAgentRpcApiMixin(object):
 class DVRAgentRpcCallbackMixin(object):
     """Agent-side RPC (implementation) for plugin-to-agent interaction."""
 
-    dvr_agent = None
-
     def dvr_mac_address_update(self, context, **kwargs):
         """Callback for dvr_mac_addresses update.
 
@@ -124,7 +122,4 @@ class DVRAgentRpcCallbackMixin(object):
         """
         dvr_macs = kwargs.get('dvr_macs', [])
         LOG.debug("dvr_macs updated on remote: %s", dvr_macs)
-        if not self.dvr_agent:
-            LOG.warn(_("DVR agent binding currently not set."))
-            return
         self.dvr_agent.dvr_mac_address_update(dvr_macs)