[ovs-dev] [PATCH] ovn-nbctl: Split parent and tag in "show" output.

Russell Bryant rbryant at redhat.com
Tue Oct 6 03:48:14 UTC 2015


> On Oct 5, 2015, at 11:37 PM, Ben Pfaff <blp at nicira.com> wrote:
> 
>> On Sun, Oct 04, 2015 at 10:14:50PM -0400, Russell Bryant wrote:
>> 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 <rbryant at redhat.com>
>> ---
>> 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]);
>>         }
> 
> Any reason why "parent: " gets a space but "tag:" doesn't?

Not a good one. I just copied how it was before but I think it's just a typo. I'll send a v2 with the space. 

--
Russell


More information about the dev mailing list