[ovs-dev] [monitor2 v2 7/9] ovsdb-client: support monitor2

Liran Schour LIRANS at il.ibm.com
Mon Dec 14 06:55:01 UTC 2015


Andy Zhou <azhou at ovn.org> wrote on 12/12/2015 12:37:32 AM:

> On Tue, Dec 1, 2015 at 6:20 AM, Liran Schour <LIRANS at il.ibm.com> wrote:
> "dev" <dev-bounces at openvswitch.org> wrote on 25/11/2015 12:16:01 AM:
> 
> > From: Andy Zhou <azhou at nicira.com>
> > @@ -617,6 +621,101 @@ monitor_print(struct json *table_updates,
> > }
> >
> > static void
> > +monitor2_print_row(struct json *row, const char *type, const char
> *uuid,
> > +                   const struct ovsdb_column_set *columns, struct 
table
> *t)
> > +{
> > +    if (!strcmp(type, "delete")) {
> > +        if (row->type != JSON_NULL) {
> > +            ovs_error(0, "delete method does not expect <row>");
> > +            return;
> > +        }
> > +
> > +        table_add_row(t);
> > +        table_add_cell(t)->text = xstrdup(uuid);
> > +        table_add_cell(t)->text = xstrdup(type);
> > +    } else {
> > +        if (!row || row->type != JSON_OBJECT) {
> > +            ovs_error(0, "<row> is not object");
> > +            return;
> > +        }
> > +        monitor_print_row(row, type, uuid, columns, t);
> > +    }
> > +}
> 
> Update2 does not send default values, therefore we will miss these 
values
> on ovsdb-client.
> I can fix it on monitor_cond or you can send an updated patch.
> 
> What changes do you have in mind? 

> The goal of "monitor" command is to show what's being transmitted 
> per ovsdb remote protocol. Since
> the default values are not being transmitted, I'd think it is O.K. 
> not to show them. No?
> 

OK. I thought the user expects to see the real outcome of the updates. If 
not and "monitor" command should show only what is being transmitted it is 
OK like it is now.

Thanks 




More information about the dev mailing list