[OVN] MetadataProxyHandler to conditionally monitor both Chassis's tables
If both Chassis and Chassis_Private tables are passed to the MetadataProxyHandler class we should conditionally monitor both of them. Change-Id: Iffd1deb977e92b9a600ab2603408ddf2eb387e18 Co-Authored-By: Terry Wilson <twilson@redhat.com> Closes-Bug: #1925836 Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
This commit is contained in:
parent
c0e917505e
commit
ce2c0010b9
|
@ -39,9 +39,9 @@ class MetadataAgentOvnSbIdl(ovsdb_monitor.OvnIdl):
|
||||||
super(MetadataAgentOvnSbIdl, self).__init__(
|
super(MetadataAgentOvnSbIdl, self).__init__(
|
||||||
None, connection_string, helper)
|
None, connection_string, helper)
|
||||||
if chassis:
|
if chassis:
|
||||||
table = ('Chassis_Private' if 'Chassis_Private' in tables
|
for table in set(tables).intersection({'Chassis',
|
||||||
else 'Chassis')
|
'Chassis_Private'}):
|
||||||
self.tables[table].condition = [['name', '==', chassis]]
|
self.tables[table].condition = [['name', '==', chassis]]
|
||||||
if events:
|
if events:
|
||||||
self.notify_handler.watch_events(events)
|
self.notify_handler.watch_events(events)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue