Handle OVS 2.17 change to Idl.tables
The update_tables() method needs to be updated to handle the new IdlTable structure. Ultimately, we should move the update_tables functionality into python_ovs. Until then, this should work with both old and new versions of OVS. Closes-Bug: #1972989 Co-authored-by: Rodolfo Alonso <ralonsoh@redhat.com> Change-Id: I173032f7cc63f79ee72ac7263188253e1cb6ff76
This commit is contained in:
parent
8dc5192650
commit
2e10d78ba3
|
@ -220,9 +220,13 @@ class OvsdbIdl(idl.Idl):
|
|||
self.cond_change(table, [False])
|
||||
del self.tables[table]
|
||||
|
||||
try:
|
||||
_tables = idl.IdlTable.schema_tables(self, schema)
|
||||
except AttributeError:
|
||||
_tables = None
|
||||
# add new tables as Idl.__init__ does
|
||||
for table in (schema.tables[table] for table in added):
|
||||
self.tables[table.name] = table
|
||||
self.tables[table.name] = _tables[table.name] if _tables else table
|
||||
for column in table.columns.values():
|
||||
if not hasattr(column, 'alert'):
|
||||
column.alert = True
|
||||
|
|
Loading…
Reference in New Issue