diff mbox

[ovs-dev,v2,04/13] ovn-sbctl: Allow database commands to refer to datapaths by name.

Message ID 20170503154600.27401-5-blp@ovn.org
State Accepted
Headers show

Commit Message

Ben Pfaff May 3, 2017, 3:45 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(+)

Comments

Andy Zhou May 3, 2017, 10:09 p.m. UTC | #1
On Wed, May 3, 2017 at 8:45 AM, Ben Pfaff <blp@ovn.org> wrote:
> 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>

Acked-by: Andy Zhou <azhou@ovn.org>
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},