mirror of
https://github.com/openvswitch/ovs
synced 2025-09-05 08:45:23 +00:00
python: ovsdb-idl: Fix persist_uuid references.
When inserting a Row with persist_uuid=True, the Row will have
a 'uuid' element and not a 'named-uuid' element, so ensure that
other operations in the transaction refer to the row by 'uuid'.
Fixes: 55b9507e68
("ovsdb-idl: Add the support to specify the uuid for row insert.")
Signed-off-by: Terry Wilson <twilson@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
This commit is contained in:
committed by
Ilya Maximets
parent
5ee2a38928
commit
d56a5bacda
@@ -1731,7 +1731,7 @@ class Transaction(object):
|
||||
and ovs.ovsuuid.is_valid_string(json[1])):
|
||||
uuid = ovs.ovsuuid.from_string(json[1])
|
||||
row = self._txn_rows.get(uuid, None)
|
||||
if row and row._data is None:
|
||||
if row and row._data is None and not row._persist_uuid:
|
||||
return ["named-uuid", _uuid_name_from_uuid(uuid)]
|
||||
else:
|
||||
return [self._substitute_uuids(elem) for elem in json]
|
||||
|
Reference in New Issue
Block a user