diff mbox

[ovs-dev,18/27] ovn-sbctl: Allow database commands to refer to datapaths by name.

Message ID 20170430232231.15151-19-blp@ovn.org
State Superseded
Headers show

Commit Message

Ben Pfaff April 30, 2017, 11:22 p.m. UTC
Until now, only the lflow-list command supported using UUIDs or names
for datapaths.  This commit extends that support to all the database
commands, as well as adding support for matching "logical-switch" or
"logical-router" in addition to "name".

Signed-off-by: Ben Pfaff <blp@ovn.org>
---
 ovn/utilities/ovn-sbctl.c | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox

Patch

diff --git a/ovn/utilities/ovn-sbctl.c b/ovn/utilities/ovn-sbctl.c
index 5d81b6b479de..c77121e39273 100644
--- a/ovn/utilities/ovn-sbctl.c
+++ b/ovn/utilities/ovn-sbctl.c
@@ -1052,6 +1052,11 @@  cmd_set_ssl(struct ctl_context *ctx)
 static const struct ctl_table_class tables[SBREC_N_TABLES] = {
     [SBREC_TABLE_CHASSIS].row_ids[0] = {&sbrec_chassis_col_name, NULL, NULL},
 
+    [SBREC_TABLE_DATAPATH_BINDING].row_ids
+     = {{&sbrec_datapath_binding_col_external_ids, "name", NULL},
+        {&sbrec_datapath_binding_col_external_ids, "logical-switch", NULL},
+        {&sbrec_datapath_binding_col_external_ids, "logical-router", NULL}},
+
     [SBREC_TABLE_PORT_BINDING].row_ids[0] =
     {&sbrec_port_binding_col_logical_port, NULL, NULL},