<div dir="ltr"><div>Thank you Ben, I'll finish it, test it properly and submit the patch.<br><br></div><div>I don't know if it makes any sense to add a filter where the dictionary has only a key "enabled" and it's "false",<br></div><div>or it's really not worth it. I'll check out how it looks with a real deployment and get back here with the results.<br></div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Mar 8, 2018 at 7:12 PM Ben Pfaff <<a href="mailto:blp@ovn.org">blp@ovn.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Thu, Mar 08, 2018 at 04:43:50PM +0000, Miguel Angel Ajo Pelayo wrote:<br>
> Ok, looking at the code, it seems like we may only need to do this?<br>
><br>
> diff --git a/utilities/ovs-vsctl.c b/utilities/ovs-vsctl.c<br>
> index 21fa18d..2ac60bf 100644<br>
> --- a/utilities/ovs-vsctl.c<br>
> +++ b/utilities/ovs-vsctl.c<br>
> @@ -1018,7 +1018,9 @@ static struct cmd_show_table cmd_show_tables[] = {<br>
> &ovsrec_interface_col_name,<br>
> {&ovsrec_interface_col_type,<br>
> &ovsrec_interface_col_options,<br>
> - &ovsrec_interface_col_error},<br>
> + &ovsrec_interface_col_error,<br>
> + &ovsrec_interface_col_bfd,<br>
> + &ovsrec_interface_col_bfd_status},<br>
> {NULL, NULL, NULL}<br>
> },<br>
<br>
Yes, you also need to increase the size of columns[] in cmd_show_table:<br>
<br>
diff --git a/lib/db-ctl-base.h b/lib/db-ctl-base.h<br>
index eb444270535b..5d8532a7bde2 100644<br>
--- a/lib/db-ctl-base.h<br>
+++ b/lib/db-ctl-base.h<br>
@@ -197,7 +197,7 @@ struct weak_ref_table {<br>
struct cmd_show_table {<br>
const struct ovsdb_idl_table_class *table;<br>
const struct ovsdb_idl_column *name_column;<br>
- const struct ovsdb_idl_column *columns[3]; /* Seems like a good number. */<br>
+ const struct ovsdb_idl_column *columns[5]; /* Seems like a good number. */<br>
const struct weak_ref_table wref_table;<br>
};<br>
<br>
> But that would render something like:<br>
><br>
><br>
> [heat-admin@overcloud-novacompute-0 ~]$ sudo ovs-vsctl show<br>
> 5f35518a-ab34-49a4-a227-e487e251b7e3<br>
> Manager "ptcp:6640:127.0.0.1"<br>
> is_connected: true<br>
> Bridge br-int<br>
> fail_mode: secure<br>
> Port "ovn-14d60a-0"<br>
> Interface "ovn-14d60a-0"<br>
> type: geneve<br>
> options: {csum="true", key=flow, remote_ip="172.16.0.12"}<br>
> bfd: {enable="true"}<br>
> bfd_status: {diagnostic="No Diagnostic", flap_count="1",<br>
> forwarding="true", remote_diagnostic="No Diagnostic", remote_state=up,<br>
> state=up}<br>
><br>
><br>
> I'm partly guessing here based on what I see around lib/db-ctl-base.c and<br>
> doing a little bit of debugging.<br>
><br>
> @Ben is there any way of filtering out those columns when<br>
> bfd:enabled="false" or not set ?<br>
<br>
It appears that that's already what happens, at least for the "not set"<br>
case. I doubt there are many controllers that explicitly set enable to<br>
false.<br>
</blockquote></div>