[ovs-dev] [PATCH ovn 3/3] ovn-nbd: Update Bindings for container integration.

Russell Bryant rbryant at redhat.com
Mon Apr 6 19:12:05 UTC 2015


ovn-nbd updates the Bindings table of the OVN database when there are
updates to the OVN_Northbound database.  This update makes ovn-nbd
copy over the container integration related fields from OVN_Northbound
into the Bindings table.

Signed-off-by: Russell Bryant <rbryant at redhat.com>
---
 ovn/ovn-nbd.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/ovn/ovn-nbd.c b/ovn/ovn-nbd.c
index 637d8cf..65aa0b4 100644
--- a/ovn/ovn-nbd.c
+++ b/ovn/ovn-nbd.c
@@ -181,6 +181,10 @@ set_bindings(struct nbd_context *ctx)
             ovnrec_bindings_set_logical_port(binding, lport->name);
             ovnrec_bindings_set_mac(binding,
                     (const char **) lport->macs, lport->n_macs);
+            if (lport->parent_name && lport->n_tag > 0) {
+                ovnrec_bindings_set_parent_port(binding, lport->parent_name);
+                ovnrec_bindings_set_tag(binding, lport->tag, lport->n_tag);
+            }
         }
     }
 
@@ -354,6 +358,8 @@ main(int argc, char *argv[])
     ovsdb_idl_add_column(ovn_idl, &ovnrec_bindings_col_logical_port);
     ovsdb_idl_add_column(ovn_idl, &ovnrec_bindings_col_chassis);
     ovsdb_idl_add_column(ovn_idl, &ovnrec_bindings_col_mac);
+    ovsdb_idl_add_column(ovn_idl, &ovnrec_bindings_col_tag);
+    ovsdb_idl_add_column(ovn_idl, &ovnrec_bindings_col_parent_port);
 
     /*
      * The loop here just runs the IDL in a loop waiting for the seqno to
-- 
2.1.0




More information about the dev mailing list