Signed-off-by: Alex Wang <al...@nicira.com> --- V5: - new patch. --- ovn/northd/ovn-northd.c | 2 ++ tests/ovn-sbctl.at | 13 +++++++++++++ 2 files changed, 15 insertions(+)
diff --git a/ovn/northd/ovn-northd.c b/ovn/northd/ovn-northd.c index cf8e222..796070f 100644 --- a/ovn/northd/ovn-northd.c +++ b/ovn/northd/ovn-northd.c @@ -397,6 +397,8 @@ join_logical_ports(struct northd_context *ctx, static void ovn_port_update_sbrec(const struct ovn_port *op) { + sbrec_port_binding_set_type(op->sb, op->nb->type); + sbrec_port_binding_set_options(op->sb, &op->nb->options); sbrec_port_binding_set_datapath(op->sb, op->od->sb); sbrec_port_binding_set_parent_port(op->sb, op->nb->parent_name); sbrec_port_binding_set_tag(op->sb, op->nb->tag, op->nb->n_tag); diff --git a/tests/ovn-sbctl.at b/tests/ovn-sbctl.at index a8d0fe8..6bda181 100644 --- a/tests/ovn-sbctl.at +++ b/tests/ovn-sbctl.at @@ -57,5 +57,18 @@ mac : [["f0:ab:cd:ef:01:02"]] chassis : ${uuid} ]) +# test the passing down of logical port type and options. +AT_CHECK([ovn-nbctl lport-add br-test vtep0]) +AT_CHECK([ovn-nbctl lport-set-type vtep0 vtep]) +AT_CHECK([ovn-nbctl lport-set-options vtep0 vtep_physical_switch=p0 vtep_logical_switch=l0]) + +OVS_WAIT_UNTIL([test -n "`ovn-sbctl --columns=logical_port list Port_Binding | grep vtep0`" ]) +AT_CHECK_UNQUOTED([ovn-sbctl --columns=logical_port,mac,type,options list Port_Binding vtep0], [0], [dnl +logical_port : "vtep0" +mac : [[]] +type : vtep +options : {vtep_logical_switch="l0", vtep_physical_switch="p0"} +]) + OVN_SBCTL_TEST_STOP AT_CLEANUP -- 1.7.9.5 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev