diff options
author | Numan Siddique <numans@ovn.org> | 2022-11-27 22:56:13 -0500 |
---|---|---|
committer | Ilya Maximets <i.maximets@ovn.org> | 2022-11-30 15:15:57 +0100 |
commit | 55b9507e6824b935ffa0205fc7c7bebfe4e54279 (patch) | |
tree | 6793b9321b9c5653ebc627648b256900d1d98a05 /lib/ovsdb-idl-provider.h | |
parent | 954ae38a12f0c0d7bab1334c9ba353da94de887c (diff) | |
download | openvswitch-55b9507e6824b935ffa0205fc7c7bebfe4e54279.tar.gz |
ovsdb-idl: Add the support to specify the uuid for row insert.
ovsdb-server allows the OVSDB clients to specify the uuid for
the row inserts [1]. Both the C IDL client library and Python
IDL are missing this feature. This patch adds this support.
In C IDL, for each schema table, a new function is generated -
<schema_table>insert_persistent_uuid(txn, uuid) which can
be used the clients to persist the uuid.
ovs-vsctl and other derivatives of ctl now supports the same
in the generic 'create' command with the option "--id=<UUID>".
In Python IDL, the uuid to persist can be specified in
the Transaction.insert() function.
[1] - a529e3cd1f("ovsdb-server: Allow OVSDB clients to specify the UUID for inserted rows.:)
Acked-by: Adrian Moreno <amorenoz@redhat.com>
Acked-by: Han Zhou <hzhou@ovn.org>
Acked-by: Terry Wilson <twilson@redhat.com>
Signed-off-by: Numan Siddique <numans@ovn.org>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to 'lib/ovsdb-idl-provider.h')
-rw-r--r-- | lib/ovsdb-idl-provider.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/ovsdb-idl-provider.h b/lib/ovsdb-idl-provider.h index 8797686f9..8d2b7d6b9 100644 --- a/lib/ovsdb-idl-provider.h +++ b/lib/ovsdb-idl-provider.h @@ -74,6 +74,7 @@ struct ovsdb_idl_row { struct ovs_list dst_arcs; /* Backward arcs (ovsdb_idl_arc.dst_node). */ struct ovsdb_idl_table *table; /* Containing table. */ struct ovsdb_datum *old_datum; /* Committed data (null if orphaned). */ + bool persist_uuid; /* Persist 'uuid' during insert txn if set. */ bool parsed; /* Whether the row is parsed. */ struct ovs_list reparse_node; /* Rows that needs to be re-parsed due to * insertion of a referenced row. */ |