Merge "use payload for OVSDB_RESOURCE"

This commit is contained in:
Zuul 2021-08-31 13:44:13 +00:00 committed by Gerrit Code Review
commit 7e5e6d4929
2 changed files with 8 additions and 6 deletions

View File

@ -2460,11 +2460,12 @@ class OVSNeutronAgent(l2population_rpc.L2populationRpcCallBackTunnelMixin,
failed_devices,
failed_ancillary_devices,
updated_ports_copy))
registry.notify(
constants.OVSDB_RESOURCE,
callback_events.AFTER_READ,
self,
ovsdb_events=events)
registry.publish(constants.OVSDB_RESOURCE,
callback_events.AFTER_READ,
self,
payload=callback_events.EventPayload(
context=None,
states=(events,)))
return (port_info, ancillary_port_info, consecutive_resyncs,
ports_not_ready_yet)

View File

@ -131,8 +131,9 @@ class OVSDBHandler(object):
@registry.receives(ovs_agent_constants.OVSDB_RESOURCE, [events.AFTER_READ])
def process_trunk_port_events(
self, resource, event, trigger, ovsdb_events):
self, resource, event, trigger, payload):
"""Process added and removed port events coming from OVSDB monitor."""
ovsdb_events = payload.latest_state
for port_event in ovsdb_events['added']:
port_name = port_event['name']
if is_trunk_bridge(port_name):