From patchwork Wed May 3 15:45:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Pfaff X-Patchwork-Id: 758131 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wJ2kN4FGRz9rxj for ; Thu, 4 May 2017 01:53:16 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 6582CC82; Wed, 3 May 2017 15:46:22 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 67D3FC7B for ; Wed, 3 May 2017 15:46:20 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id E22E9143 for ; Wed, 3 May 2017 15:46:19 +0000 (UTC) Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by relay7-d.mail.gandi.net (Postfix) with ESMTPS id DB701384B; Wed, 3 May 2017 17:46:17 +0200 (CEST) Received: from mfilter5-d.gandi.net (mfilter5-d.gandi.net [217.70.178.132]) by relay3-d.mail.gandi.net (Postfix) with ESMTP id C436FA80F5; Wed, 3 May 2017 17:46:17 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter5-d.gandi.net Received: from relay3-d.mail.gandi.net ([IPv6:::ffff:217.70.183.195]) by mfilter5-d.gandi.net (mfilter5-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id gDNpFeeHYgEp; Wed, 3 May 2017 17:46:16 +0200 (CEST) X-Originating-IP: 173.228.112.23 Received: from sigabrt.gateway.sonic.net (173-228-112-23.dsl.dynamic.fusionbroadband.com [173.228.112.23]) (Authenticated sender: blp@ovn.org) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 9FE33A80D8; Wed, 3 May 2017 17:46:14 +0200 (CEST) From: Ben Pfaff To: dev@openvswitch.org Date: Wed, 3 May 2017 08:45:51 -0700 Message-Id: <20170503154600.27401-5-blp@ovn.org> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170503154600.27401-1-blp@ovn.org> References: <20170503154600.27401-1-blp@ovn.org> X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Ben Pfaff Subject: [ovs-dev] [PATCH v2 04/13] ovn-sbctl: Allow database commands to refer to datapaths by name. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org 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 Acked-by: Andy Zhou --- ovn/utilities/ovn-sbctl.c | 5 +++++ 1 file changed, 5 insertions(+) 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},