From patchwork Mon Oct 5 02:14:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Russell Bryant X-Patchwork-Id: 526226 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (unknown [IPv6:2600:3c00::f03c:91ff:fe6e:bdf7]) by ozlabs.org (Postfix) with ESMTP id 2D1451402A8 for ; Mon, 5 Oct 2015 13:14:59 +1100 (AEDT) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 58AFD109C1; Sun, 4 Oct 2015 19:14:58 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx1e3.cudamail.com (mx1.cudamail.com [69.90.118.67]) by archives.nicira.com (Postfix) with ESMTPS id 44E15109BA for ; Sun, 4 Oct 2015 19:14:57 -0700 (PDT) Received: from bar5.cudamail.com (localhost [127.0.0.1]) by mx1e3.cudamail.com (Postfix) with ESMTPS id C2CF3420448 for ; Sun, 4 Oct 2015 20:14:56 -0600 (MDT) X-ASG-Debug-ID: 1444011295-09eadd14162468e0001-byXFYA Received: from mx1-pf1.cudamail.com ([192.168.24.1]) by bar5.cudamail.com with ESMTP id 2jTW5o5iWQDEPPhf (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 04 Oct 2015 20:14:55 -0600 (MDT) X-Barracuda-Envelope-From: rbryant@redhat.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.24.1 Received: from unknown (HELO mx1.redhat.com) (209.132.183.28) by mx1-pf1.cudamail.com with ESMTPS (DHE-RSA-AES256-SHA encrypted); 5 Oct 2015 02:14:54 -0000 Received-SPF: pass (mx1-pf1.cudamail.com: SPF record at _spf1.redhat.com designates 209.132.183.28 as permitted sender) X-Barracuda-Apparent-Source-IP: 209.132.183.28 X-Barracuda-RBL-IP: 209.132.183.28 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id CD3A72FAA78 for ; Mon, 5 Oct 2015 02:14:53 +0000 (UTC) Received: from x1c.redhat.com (ovpn-112-24.ams2.redhat.com [10.36.112.24]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t952EpqI000437; Sun, 4 Oct 2015 22:14:52 -0400 X-CudaMail-Envelope-Sender: rbryant@redhat.com From: Russell Bryant To: dev@openvswitch.org X-CudaMail-MID: CM-E1-1003027842 X-CudaMail-DTE: 100415 X-CudaMail-Originating-IP: 209.132.183.28 Date: Sun, 4 Oct 2015 22:14:50 -0400 X-ASG-Orig-Subj: [##CM-E1-1003027842##][PATCH] ovn-nbctl: Split parent and tag in "show" output. Message-Id: <1444011290-22165-1-git-send-email-rbryant@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-GBUdb-Analysis: 0, 209.132.183.28, Ugly c=0.113212 p=-0.333333 Source Normal X-MessageSniffer-Rules: 0-0-0-3657-c X-Barracuda-Connect: UNKNOWN[192.168.24.1] X-Barracuda-Start-Time: 1444011295 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.60 X-Barracuda-Spam-Status: No, SCORE=0.60 using per-user scores of TAG_LEVEL=3.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=3.0 tests=BSF_SC5_MJ1963, RDNS_NONE X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.23184 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.10 RDNS_NONE Delivered to trusted network by a host with no rDNS 0.50 BSF_SC5_MJ1963 Custom Rule MJ1963 Subject: [ovs-dev] [PATCH] ovn-nbctl: Split parent and tag in "show" output. X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dev-bounces@openvswitch.org Sender: "dev" As of 779e72cc57a106251cc9e6696e8c9aabb56d30b5, localnet ports may have the tag column set. This case does not make use of the parent column, so output these fields independently of each other. Signed-off-by: Russell Bryant --- ovn/utilities/ovn-nbctl.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ovn/utilities/ovn-nbctl.c b/ovn/utilities/ovn-nbctl.c index 2d2a5ee..45fc7d0 100644 --- a/ovn/utilities/ovn-nbctl.c +++ b/ovn/utilities/ovn-nbctl.c @@ -404,9 +404,11 @@ print_lswitch(const struct nbrec_logical_switch *lswitch, struct ds *s) const struct nbrec_logical_port *lport = lswitch->ports[i]; ds_put_format(s, " lport %s\n", lport->name); - if (lport->parent_name && lport->n_tag) { - ds_put_format(s, " parent: %s, tag:%"PRIu64"\n", - lport->parent_name, lport->tag[0]); + if (lport->parent_name) { + ds_put_format(s, " parent: %s\n", lport->parent_name); + } + if (lport->n_tag) { + ds_put_format(s, " tag:%"PRIu64"\n", lport->tag[0]); } if (lport->n_macs) { ds_put_cstr(s, " macs:");