[ovs-dev] [PATCH v2]: ovsdb: add capability to dump table content in ovsdb-client

2015-06-30 Thread Sabyasachi Sengupta
v2: fixed a bug in do_dump that was calling print_table incorrectly when 'table' option is specified Added capability of displaying tables through an optional 'table' argument to 'ovsdb-client dump'. When specified, ovsdb-client will iterate through all tables in the chosen ovsdb, and create a t

Re: [ovs-dev] [PATCH v2]: ovsdb: add capability to dump table content in ovsdb-client

2015-06-30 Thread Andy Zhou
On Tue, Jun 30, 2015 at 10:36 AM, Sabyasachi Sengupta wrote: > > v2: fixed a bug in do_dump that was calling print_table incorrectly when > 'table' option is specified > > Added capability of displaying tables through an optional 'table' argument > to 'ovsdb-client dump'. When specified, ovsdb-cli

Re: [ovs-dev] [PATCH v2]: ovsdb: add capability to dump table content in ovsdb-client

2015-06-30 Thread Sabyasachi Sengupta
Is actually adding a new feature rather than fix a bug? Actually v2 fixes a bug that was in the original patch (v1) that was sent out. If so, you may also want to update the man pages with the new usage and add unit tests for it. I'll add the manpage extension and resend v3, but I'm not

Re: [ovs-dev] [PATCH v2]: ovsdb: add capability to dump table content in ovsdb-client

2015-06-30 Thread Andy Zhou
On Tue, Jun 30, 2015 at 4:43 PM, Sabyasachi Sengupta wrote: > >> Is actually adding a new feature rather than fix a bug? > > > Actually v2 fixes a bug that was in the original patch (v1) that was sent > out. > Ah, We usually write version delta comments in a separate section, with a heading of "v1

Re: [ovs-dev] [PATCH v2]: ovsdb: add capability to dump table content in ovsdb-client

2015-06-30 Thread Andy Zhou
> > Currently 'ovsdb-client dump' dumps the whole db, which can be lot of > output. Cannot think of an easier way than writing a python script that goes > over the entire output, then parses and prints the particular table in > question. Bash scripting may not be so easy to write as tables can have

Re: [ovs-dev] [PATCH v2]: ovsdb: add capability to dump table content in ovsdb-client

2015-06-30 Thread Sabyasachi Sengupta
It seems we just need to extract the text between the table name and the first blank line below it. this should pretty easy with either awk or sed. As for efficiency, the db files I have access to are sufficiently small that the script should work in practise, especially used only for debugging

Re: [ovs-dev] [PATCH v2]: ovsdb: add capability to dump table content in ovsdb-client

2015-06-30 Thread Andy Zhou
On Tue, Jun 30, 2015 at 7:47 PM, Sabyasachi Sengupta wrote: > >> It seems we just need to extract the text between the table name and the >> first >> blank line below it. this should pretty easy with either awk or sed. >> >> As for efficiency, the db files I have access to are sufficiently >> smal

Re: [ovs-dev] [PATCH v2]: ovsdb: add capability to dump table content in ovsdb-client

2015-07-02 Thread Russell Bryant
On 06/30/2015 11:17 PM, Andy Zhou wrote: > On Tue, Jun 30, 2015 at 7:47 PM, Sabyasachi Sengupta > wrote: >> >>> It seems we just need to extract the text between the table name and the >>> first >>> blank line below it. this should pretty easy with either awk or sed. >>> >>> As for efficiency, the

Re: [ovs-dev] [PATCH v2]: ovsdb: add capability to dump table content in ovsdb-client

2015-07-02 Thread Russell Bryant
On 07/02/2015 09:50 AM, Russell Bryant wrote: > On 06/30/2015 11:17 PM, Andy Zhou wrote: >> On Tue, Jun 30, 2015 at 7:47 PM, Sabyasachi Sengupta >> wrote: >>> It seems we just need to extract the text between the table name and the first blank line below it. this should pretty easy

Re: [ovs-dev] [PATCH v2]: ovsdb: add capability to dump table content in ovsdb-client

2015-07-02 Thread Justin Pettit
> On Jul 2, 2015, at 7:21 AM, Russell Bryant wrote: > > Writing this message inspired me to just go solve my problem with a > quick Python script. :-) > > Here it is in case anyone else wants it: > > https://gist.github.com/russellb/cebb06ec3a099b46b678 That's great. We should probably buil