diff mbox

[ovs-dev] ovn-sbctl: Change lport-(un)bind to lsp-(un)bind.

Message ID 1466800678-13697-1-git-send-email-russell@ovn.org
State Changes Requested
Headers show

Commit Message

Russell Bryant June 24, 2016, 8:37 p.m. UTC
A previous commit changed the command names in ovn-nbctl from lport-* to
lsp-*.  Change lport-bind and lport-unbind in ovn-sbctl to match.

Signed-off-by: Russell Bryant <russell@ovn.org>
---
 ovn/utilities/ovn-sbctl.c    | 12 ++++++------
 tests/ovn-controller-vtep.at | 10 +++++-----
 tests/ovn-sbctl.at           |  4 ++--
 tutorial/ovn/env3/setup.sh   |  4 ++--
 tutorial/ovn/env4/setup2.sh  |  4 ++--
 tutorial/ovn/env5/setup.sh   |  8 ++++----
 6 files changed, 21 insertions(+), 21 deletions(-)

Comments

Amitabha Biswas June 24, 2016, 10:04 p.m. UTC | #1
> On Jun 24, 2016, at 1:37 PM, Russell Bryant <russell@ovn.org> wrote:
> 
> A previous commit changed the command names in ovn-nbctl from lport-* to
> lsp-*.  Change lport-bind and lport-unbind in ovn-sbctl to match.
> 
> Signed-off-by: Russell Bryant <russell@ovn.org>
> ---
> ovn/utilities/ovn-sbctl.c    | 12 ++++++------
> tests/ovn-controller-vtep.at | 10 +++++-----
> tests/ovn-sbctl.at           |  4 ++--
> tutorial/ovn/env3/setup.sh   |  4 ++--
> tutorial/ovn/env4/setup2.sh  |  4 ++--
> tutorial/ovn/env5/setup.sh   |  8 ++++----
> 6 files changed, 21 insertions(+), 21 deletions(-)
> 
> diff --git a/ovn/utilities/ovn-sbctl.c b/ovn/utilities/ovn-sbctl.c
> index c0ee518..80afa96 100644
> --- a/ovn/utilities/ovn-sbctl.c
> +++ b/ovn/utilities/ovn-sbctl.c
> @@ -317,8 +317,8 @@ Chassis commands:\n\
>                               and gateway_ports\n\
> \n\
> Port binding commands:\n\
> -  lport-bind LPORT CHASSIS    bind logical port LPORT to CHASSIS\n\
> -  lport-unbind LPORT          reset the port binding of logical port LPORT\n\
> +  lsp-bind PORT CHASSIS      bind logical port PORT to CHASSIS\n\
> +  lsp-unbind PORT            reset the port binding of logical port PORT\n\
> \n\
> Logical flow commands:\n\
>   lflow-list [DATAPATH]       List logical flows for all or a single datapath\n\
> @@ -602,7 +602,7 @@ cmd_chassis_del(struct ctl_context *ctx)
> }
> 
> static void
> -cmd_lport_bind(struct ctl_context *ctx)
> +cmd_lsp_bind(struct ctl_context *ctx)
> {
>     struct sbctl_context *sbctl_ctx = sbctl_context_cast(ctx);
>     bool may_exist = shash_find(&ctx->options, "--may-exist") != NULL;
> @@ -631,7 +631,7 @@ cmd_lport_bind(struct ctl_context *ctx)
> }
> 
> static void
> -cmd_lport_unbind(struct ctl_context *ctx)
> +cmd_lsp_unbind(struct ctl_context *ctx)
> {
>     struct sbctl_context *sbctl_ctx = sbctl_context_cast(ctx);
>     bool must_exist = !shash_find(&ctx->options, "--if-exists");
> @@ -1022,9 +1022,9 @@ static const struct ctl_command_syntax sbctl_commands[] = {
>      "--if-exists", RW},
> 
>     /* Port binding commands. */
> -    {"lport-bind", 2, 2, "LPORT CHASSIS", pre_get_info, cmd_lport_bind, NULL,
> +    {"lsp-bind", 2, 2, "PORT CHASSIS", pre_get_info, cmd_lsp_bind, NULL,
>      "--may-exist", RW},
> -    {"lport-unbind", 1, 1, "LPORT", pre_get_info, cmd_lport_unbind, NULL,
> +    {"lsp-unbind", 1, 1, "PORT", pre_get_info, cmd_lsp_unbind, NULL,
>      "--if-exists", RW},
> 
>     /* Logical flow commands */
> diff --git a/tests/ovn-controller-vtep.at b/tests/ovn-controller-vtep.at
> index 4bbda73..c296f0e 100644
> --- a/tests/ovn-controller-vtep.at
> +++ b/tests/ovn-controller-vtep.at
> @@ -341,7 +341,7 @@ OVN_CONTROLLER_VTEP_START
> AT_CHECK([ovn-nbctl lsp-add br-test vif0])
> AT_CHECK([ovn-nbctl lsp-set-addresses vif0 f0:ab:cd:ef:01:02])
> AT_CHECK([ovn-sbctl chassis-add ch0 vxlan 1.2.3.5])
> -AT_CHECK([ovn-sbctl lport-bind vif0 ch0])
> +AT_CHECK([ovn-sbctl lsp-bind vif0 ch0])
> 
> # creates the logical switch in vtep and adds the corresponding logical
> # port to 'br-test'.
> @@ -355,7 +355,7 @@ AT_CHECK([ovn-nbctl ls-add br-void])
> AT_CHECK([ovn-nbctl lsp-add br-void vif1])
> AT_CHECK([ovn-nbctl lsp-set-addresses vif1 f0:ab:cd:ef:01:02])
> AT_CHECK([ovn-sbctl chassis-add ch1 vxlan 1.2.3.6])
> -AT_CHECK([ovn-sbctl lport-bind vif1 ch1])
> +AT_CHECK([ovn-sbctl lsp-bind vif1 ch1])
> OVS_WAIT_UNTIL([test -n "`ovn-sbctl list Port_Binding | grep vif1`"])
> 
> # checks Ucast_Macs_Remote creation.
> @@ -412,12 +412,12 @@ OVN_CONTROLLER_VTEP_START
> AT_CHECK([ovn-nbctl lsp-add br-test vif0])
> AT_CHECK([ovn-nbctl lsp-set-addresses vif0 f0:ab:cd:ef:01:02])
> AT_CHECK([ovn-sbctl chassis-add ch0 vxlan 1.2.3.5])
> -AT_CHECK([ovn-sbctl lport-bind vif0 ch0])
> +AT_CHECK([ovn-sbctl lsp-bind vif0 ch0])
> 
> # creates another vif in the same logical switch with duplicate mac.
> AT_CHECK([ovn-nbctl lsp-add br-test vif1])
> AT_CHECK([ovn-nbctl lsp-set-addresses vif1 f0:ab:cd:ef:01:02])
> -AT_CHECK([ovn-sbctl lport-bind vif1 ch0])
> +AT_CHECK([ovn-sbctl lsp-bind vif1 ch0])
> 
> # creates the logical switch in vtep and adds the corresponding logical
> # port to 'br-test'.
> @@ -446,7 +446,7 @@ AT_CHECK([ovn-nbctl ls-add br-void])
> AT_CHECK([ovn-nbctl lsp-add br-void vif1])
> AT_CHECK([ovn-nbctl lsp-set-addresses vif1 f0:ab:cd:ef:01:02])
> AT_CHECK([ovn-sbctl chassis-add ch1 vxlan 1.2.3.6])
> -AT_CHECK([ovn-sbctl lport-bind vif1 ch1])
> +AT_CHECK([ovn-sbctl lsp-bind vif1 ch1])
> OVS_WAIT_UNTIL([test -n "`ovn-sbctl list Port_Binding | grep vif1`"])
> 
> # creates another logical switch in vtep and adds the corresponding logical
> diff --git a/tests/ovn-sbctl.at b/tests/ovn-sbctl.at
> index 5232933..3b61d9d 100644
> --- a/tests/ovn-sbctl.at
> +++ b/tests/ovn-sbctl.at
> @@ -83,7 +83,7 @@ AT_CHECK([ovn-nbctl ls-add br-test])
> AT_CHECK([ovn-nbctl lsp-add br-test vif0])
> AT_CHECK([ovn-nbctl lsp-set-addresses vif0 f0:ab:cd:ef:01:02])
> AT_CHECK([ovn-sbctl chassis-add ch0 stt 1.2.3.5])
> -AT_CHECK([ovn-sbctl lport-bind vif0 ch0])
> +AT_CHECK([ovn-sbctl lsp-bind vif0 ch0])
> 
> AT_CHECK([ovn-sbctl show], [0], [dnl
> Chassis "ch0"
> @@ -95,7 +95,7 @@ Chassis "ch0"
> # adds another 'vif1'
> AT_CHECK([ovn-nbctl lsp-add br-test vif1])
> AT_CHECK([ovn-nbctl lsp-set-addresses vif1 f0:ab:cd:ef:01:03])
> -AT_CHECK([ovn-sbctl lport-bind vif1 ch0])
> +AT_CHECK([ovn-sbctl lsp-bind vif1 ch0])
> 
> AT_CHECK([ovn-sbctl show | sed 's/vif[[0-9]]/vif/'], [0], [dnl
> Chassis "ch0"
> diff --git a/tutorial/ovn/env3/setup.sh b/tutorial/ovn/env3/setup.sh
> index 3f8ef54..d67b1c8 100755
> --- a/tutorial/ovn/env3/setup.sh
> +++ b/tutorial/ovn/env3/setup.sh
> @@ -40,5 +40,5 @@ ovs-vsctl add-port br-int lport2 -- set Interface lport2 external_ids:iface-id=s
> ovn-sbctl chassis-add fakechassis geneve 127.0.0.1
> 
> # Bind sw0-port3 and sw0-port4 to the fake remote chassis.
> -ovn-sbctl lport-bind sw0-port3 fakechassis
> -ovn-sbctl lport-bind sw0-port4 fakechassis
> +ovn-sbctl lsp-bind sw0-port3 fakechassis
> +ovn-sbctl lsp-bind sw0-port4 fakechassis
> diff --git a/tutorial/ovn/env4/setup2.sh b/tutorial/ovn/env4/setup2.sh
> index 2345083..aa8cc95 100755
> --- a/tutorial/ovn/env4/setup2.sh
> +++ b/tutorial/ovn/env4/setup2.sh
> @@ -43,5 +43,5 @@ done
> ovs-vsctl add-port br-int lport1 -- set Interface lport1 external_ids:iface-id=provnet1-1-port1
> ovs-vsctl add-port br-int lport2 -- set Interface lport2 external_ids:iface-id=provnet1-2-port1
> 
> -ovn-sbctl lport-bind provnet1-3-port1 fakechassis
> -ovn-sbctl lport-bind provnet1-4-port1 fakechassis
> +ovn-sbctl lsp-bind provnet1-3-port1 fakechassis
> +ovn-sbctl lsp-bind provnet1-4-port1 fakechassis
> diff --git a/tutorial/ovn/env5/setup.sh b/tutorial/ovn/env5/setup.sh
> index a1c5a8a..b5eee6a 100755
> --- a/tutorial/ovn/env5/setup.sh
> +++ b/tutorial/ovn/env5/setup.sh
> @@ -61,7 +61,7 @@ ovs-vsctl add-port br-int lport2 -- set Interface lport2 external_ids:iface-id=p
> ovs-vsctl add-port br-int lport5 -- set Interface lport5 external_ids:iface-id=provnet1-5-101-port1
> ovs-vsctl add-port br-int lport6 -- set Interface lport6 external_ids:iface-id=provnet1-6-101-port1
> 
> -ovn-sbctl lport-bind provnet1-3-port1 fakechassis
> -ovn-sbctl lport-bind provnet1-4-port1 fakechassis
> -ovn-sbctl lport-bind provnet1-7-101-port1 fakechassis
> -ovn-sbctl lport-bind provnet1-8-101-port1 fakechassis
> +ovn-sbctl lsp-bind provnet1-3-port1 fakechassis
> +ovn-sbctl lsp-bind provnet1-4-port1 fakechassis
> +ovn-sbctl lsp-bind provnet1-7-101-port1 fakechassis
> +ovn-sbctl lsp-bind provnet1-8-101-port1 fakechassis
> -- 
> 2.7.4
> 
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev

Acked-by: Amitabha Biswas <abiswas@us.ibm.com <mailto:abiswas@us.ibm.com>>

Amitabha
Ben Pfaff July 2, 2016, 5:27 p.m. UTC | #2
On Fri, Jun 24, 2016 at 04:37:58PM -0400, Russell Bryant wrote:
> A previous commit changed the command names in ovn-nbctl from lport-* to
> lsp-*.  Change lport-bind and lport-unbind in ovn-sbctl to match.
> 
> Signed-off-by: Russell Bryant <russell@ovn.org>

With this applied I still see one use of lport-bind, perhaps the patch
has rotted:

    blp@sigabrt:~/nicira/ovs/_build(0)$ git --no-pager grep lport-bind ..
    ../tests/ovn.at:ovn-sbctl lport-bind lp-gw hv_gw

In ovn-sbctl.c, this change shifts the usage message descriptions over
by one space, misaligning them.

Assuming you fix those,
Acked-by: Ben Pfaff <blp@ovn.org>

Thanks,

Ben.
Russell Bryant July 7, 2016, 8:13 p.m. UTC | #3
On Sat, Jul 2, 2016 at 12:27 PM, Ben Pfaff <blp@ovn.org> wrote:

> On Fri, Jun 24, 2016 at 04:37:58PM -0400, Russell Bryant wrote:
> > A previous commit changed the command names in ovn-nbctl from lport-* to
> > lsp-*.  Change lport-bind and lport-unbind in ovn-sbctl to match.
> >
> > Signed-off-by: Russell Bryant <russell@ovn.org>
>
> With this applied I still see one use of lport-bind, perhaps the patch
> has rotted:
>
>     blp@sigabrt:~/nicira/ovs/_build(0)$ git --no-pager grep lport-bind ..
>     ../tests/ovn.at:ovn-sbctl lport-bind lp-gw hv_gw
>
> In ovn-sbctl.c, this change shifts the usage message descriptions over
> by one space, misaligning them.
>
> Assuming you fix those,
> Acked-by: Ben Pfaff <blp@ovn.org>
>

I fixed these issues and applied this to master.  Thanks!
diff mbox

Patch

diff --git a/ovn/utilities/ovn-sbctl.c b/ovn/utilities/ovn-sbctl.c
index c0ee518..80afa96 100644
--- a/ovn/utilities/ovn-sbctl.c
+++ b/ovn/utilities/ovn-sbctl.c
@@ -317,8 +317,8 @@  Chassis commands:\n\
                               and gateway_ports\n\
 \n\
 Port binding commands:\n\
-  lport-bind LPORT CHASSIS    bind logical port LPORT to CHASSIS\n\
-  lport-unbind LPORT          reset the port binding of logical port LPORT\n\
+  lsp-bind PORT CHASSIS      bind logical port PORT to CHASSIS\n\
+  lsp-unbind PORT            reset the port binding of logical port PORT\n\
 \n\
 Logical flow commands:\n\
   lflow-list [DATAPATH]       List logical flows for all or a single datapath\n\
@@ -602,7 +602,7 @@  cmd_chassis_del(struct ctl_context *ctx)
 }
 
 static void
-cmd_lport_bind(struct ctl_context *ctx)
+cmd_lsp_bind(struct ctl_context *ctx)
 {
     struct sbctl_context *sbctl_ctx = sbctl_context_cast(ctx);
     bool may_exist = shash_find(&ctx->options, "--may-exist") != NULL;
@@ -631,7 +631,7 @@  cmd_lport_bind(struct ctl_context *ctx)
 }
 
 static void
-cmd_lport_unbind(struct ctl_context *ctx)
+cmd_lsp_unbind(struct ctl_context *ctx)
 {
     struct sbctl_context *sbctl_ctx = sbctl_context_cast(ctx);
     bool must_exist = !shash_find(&ctx->options, "--if-exists");
@@ -1022,9 +1022,9 @@  static const struct ctl_command_syntax sbctl_commands[] = {
      "--if-exists", RW},
 
     /* Port binding commands. */
-    {"lport-bind", 2, 2, "LPORT CHASSIS", pre_get_info, cmd_lport_bind, NULL,
+    {"lsp-bind", 2, 2, "PORT CHASSIS", pre_get_info, cmd_lsp_bind, NULL,
      "--may-exist", RW},
-    {"lport-unbind", 1, 1, "LPORT", pre_get_info, cmd_lport_unbind, NULL,
+    {"lsp-unbind", 1, 1, "PORT", pre_get_info, cmd_lsp_unbind, NULL,
      "--if-exists", RW},
 
     /* Logical flow commands */
diff --git a/tests/ovn-controller-vtep.at b/tests/ovn-controller-vtep.at
index 4bbda73..c296f0e 100644
--- a/tests/ovn-controller-vtep.at
+++ b/tests/ovn-controller-vtep.at
@@ -341,7 +341,7 @@  OVN_CONTROLLER_VTEP_START
 AT_CHECK([ovn-nbctl lsp-add br-test vif0])
 AT_CHECK([ovn-nbctl lsp-set-addresses vif0 f0:ab:cd:ef:01:02])
 AT_CHECK([ovn-sbctl chassis-add ch0 vxlan 1.2.3.5])
-AT_CHECK([ovn-sbctl lport-bind vif0 ch0])
+AT_CHECK([ovn-sbctl lsp-bind vif0 ch0])
 
 # creates the logical switch in vtep and adds the corresponding logical
 # port to 'br-test'.
@@ -355,7 +355,7 @@  AT_CHECK([ovn-nbctl ls-add br-void])
 AT_CHECK([ovn-nbctl lsp-add br-void vif1])
 AT_CHECK([ovn-nbctl lsp-set-addresses vif1 f0:ab:cd:ef:01:02])
 AT_CHECK([ovn-sbctl chassis-add ch1 vxlan 1.2.3.6])
-AT_CHECK([ovn-sbctl lport-bind vif1 ch1])
+AT_CHECK([ovn-sbctl lsp-bind vif1 ch1])
 OVS_WAIT_UNTIL([test -n "`ovn-sbctl list Port_Binding | grep vif1`"])
 
 # checks Ucast_Macs_Remote creation.
@@ -412,12 +412,12 @@  OVN_CONTROLLER_VTEP_START
 AT_CHECK([ovn-nbctl lsp-add br-test vif0])
 AT_CHECK([ovn-nbctl lsp-set-addresses vif0 f0:ab:cd:ef:01:02])
 AT_CHECK([ovn-sbctl chassis-add ch0 vxlan 1.2.3.5])
-AT_CHECK([ovn-sbctl lport-bind vif0 ch0])
+AT_CHECK([ovn-sbctl lsp-bind vif0 ch0])
 
 # creates another vif in the same logical switch with duplicate mac.
 AT_CHECK([ovn-nbctl lsp-add br-test vif1])
 AT_CHECK([ovn-nbctl lsp-set-addresses vif1 f0:ab:cd:ef:01:02])
-AT_CHECK([ovn-sbctl lport-bind vif1 ch0])
+AT_CHECK([ovn-sbctl lsp-bind vif1 ch0])
 
 # creates the logical switch in vtep and adds the corresponding logical
 # port to 'br-test'.
@@ -446,7 +446,7 @@  AT_CHECK([ovn-nbctl ls-add br-void])
 AT_CHECK([ovn-nbctl lsp-add br-void vif1])
 AT_CHECK([ovn-nbctl lsp-set-addresses vif1 f0:ab:cd:ef:01:02])
 AT_CHECK([ovn-sbctl chassis-add ch1 vxlan 1.2.3.6])
-AT_CHECK([ovn-sbctl lport-bind vif1 ch1])
+AT_CHECK([ovn-sbctl lsp-bind vif1 ch1])
 OVS_WAIT_UNTIL([test -n "`ovn-sbctl list Port_Binding | grep vif1`"])
 
 # creates another logical switch in vtep and adds the corresponding logical
diff --git a/tests/ovn-sbctl.at b/tests/ovn-sbctl.at
index 5232933..3b61d9d 100644
--- a/tests/ovn-sbctl.at
+++ b/tests/ovn-sbctl.at
@@ -83,7 +83,7 @@  AT_CHECK([ovn-nbctl ls-add br-test])
 AT_CHECK([ovn-nbctl lsp-add br-test vif0])
 AT_CHECK([ovn-nbctl lsp-set-addresses vif0 f0:ab:cd:ef:01:02])
 AT_CHECK([ovn-sbctl chassis-add ch0 stt 1.2.3.5])
-AT_CHECK([ovn-sbctl lport-bind vif0 ch0])
+AT_CHECK([ovn-sbctl lsp-bind vif0 ch0])
 
 AT_CHECK([ovn-sbctl show], [0], [dnl
 Chassis "ch0"
@@ -95,7 +95,7 @@  Chassis "ch0"
 # adds another 'vif1'
 AT_CHECK([ovn-nbctl lsp-add br-test vif1])
 AT_CHECK([ovn-nbctl lsp-set-addresses vif1 f0:ab:cd:ef:01:03])
-AT_CHECK([ovn-sbctl lport-bind vif1 ch0])
+AT_CHECK([ovn-sbctl lsp-bind vif1 ch0])
 
 AT_CHECK([ovn-sbctl show | sed 's/vif[[0-9]]/vif/'], [0], [dnl
 Chassis "ch0"
diff --git a/tutorial/ovn/env3/setup.sh b/tutorial/ovn/env3/setup.sh
index 3f8ef54..d67b1c8 100755
--- a/tutorial/ovn/env3/setup.sh
+++ b/tutorial/ovn/env3/setup.sh
@@ -40,5 +40,5 @@  ovs-vsctl add-port br-int lport2 -- set Interface lport2 external_ids:iface-id=s
 ovn-sbctl chassis-add fakechassis geneve 127.0.0.1
 
 # Bind sw0-port3 and sw0-port4 to the fake remote chassis.
-ovn-sbctl lport-bind sw0-port3 fakechassis
-ovn-sbctl lport-bind sw0-port4 fakechassis
+ovn-sbctl lsp-bind sw0-port3 fakechassis
+ovn-sbctl lsp-bind sw0-port4 fakechassis
diff --git a/tutorial/ovn/env4/setup2.sh b/tutorial/ovn/env4/setup2.sh
index 2345083..aa8cc95 100755
--- a/tutorial/ovn/env4/setup2.sh
+++ b/tutorial/ovn/env4/setup2.sh
@@ -43,5 +43,5 @@  done
 ovs-vsctl add-port br-int lport1 -- set Interface lport1 external_ids:iface-id=provnet1-1-port1
 ovs-vsctl add-port br-int lport2 -- set Interface lport2 external_ids:iface-id=provnet1-2-port1
 
-ovn-sbctl lport-bind provnet1-3-port1 fakechassis
-ovn-sbctl lport-bind provnet1-4-port1 fakechassis
+ovn-sbctl lsp-bind provnet1-3-port1 fakechassis
+ovn-sbctl lsp-bind provnet1-4-port1 fakechassis
diff --git a/tutorial/ovn/env5/setup.sh b/tutorial/ovn/env5/setup.sh
index a1c5a8a..b5eee6a 100755
--- a/tutorial/ovn/env5/setup.sh
+++ b/tutorial/ovn/env5/setup.sh
@@ -61,7 +61,7 @@  ovs-vsctl add-port br-int lport2 -- set Interface lport2 external_ids:iface-id=p
 ovs-vsctl add-port br-int lport5 -- set Interface lport5 external_ids:iface-id=provnet1-5-101-port1
 ovs-vsctl add-port br-int lport6 -- set Interface lport6 external_ids:iface-id=provnet1-6-101-port1
 
-ovn-sbctl lport-bind provnet1-3-port1 fakechassis
-ovn-sbctl lport-bind provnet1-4-port1 fakechassis
-ovn-sbctl lport-bind provnet1-7-101-port1 fakechassis
-ovn-sbctl lport-bind provnet1-8-101-port1 fakechassis
+ovn-sbctl lsp-bind provnet1-3-port1 fakechassis
+ovn-sbctl lsp-bind provnet1-4-port1 fakechassis
+ovn-sbctl lsp-bind provnet1-7-101-port1 fakechassis
+ovn-sbctl lsp-bind provnet1-8-101-port1 fakechassis