mirror of
https://github.com/openvswitch/ovs
synced 2025-10-25 15:07:05 +00:00
Handle refTable values with setkey()
For columns like QoS.queues where we have a map containing refTable
values, assigning w/ __setattr__ e.g. qos.queues={1: $queue_row}
works, but using using qos.setkey('queues', 1, $queue_row) results
in an Exception. The opdat argument can essentially just be the
JSON representation of the map column instead of trying to build
it.
Signed-off-by: Terry Wilson <twilson@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
@@ -1567,10 +1567,9 @@ class Transaction(object):
|
||||
for col, val in row._mutations['_inserts'].items():
|
||||
column = row._table.columns[col]
|
||||
if column.type.is_map():
|
||||
opdat = ["map"]
|
||||
datum = data.Datum.from_python(column.type, val,
|
||||
_row_to_uuid)
|
||||
opdat.append(datum.as_list())
|
||||
opdat = self._substitute_uuids(datum.to_json())
|
||||
else:
|
||||
opdat = ["set"]
|
||||
inner_opdat = []
|
||||
|
||||
Reference in New Issue
Block a user