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
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.
"""
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)