Skip to content

Commit

Permalink
ovn-sbctl: Change lport-(un)bind to lsp-(un)bind.
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Amitabha Biswas <[email protected]>
Acked-by: Ben Pfaff <[email protected]>
  • Loading branch information
russellb committed Jul 7, 2016
1 parent dd52c85 commit f0f96ba
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 24 deletions.
4 changes: 2 additions & 2 deletions ovn/utilities/ovn-sbctl.8.in
Original file line number Diff line number Diff line change
Expand Up @@ -135,15 +135,15 @@ delete a chassis that does not exist has no effect.
.
These commands manipulate \fBOVN_Southbound\fR port bindings.
.
.IP "[\fB\-\-may\-exist\fR] \fBlport\-bind \fIlogical\-port\fR \fIchassis\fR"
.IP "[\fB\-\-may\-exist\fR] \fBlsp\-bind \fIlogical\-port\fR \fIchassis\fR"
Binds the logical port named \fIlogical\-port\fR to \fIchassis\fR.
.IP
Without \fB\-\-may\-exist\fR, attempting to bind a logical port that
has already been bound is an error. With \fB\-\-may\-exist\fR, this
command does nothing if \fIlogical\-port\fR has already been bound to
a chassis.
.
.IP "[\fB\-\-if\-exists\fR] \fBlport\-unbind\fR \fIlogical\-port\fR"
.IP "[\fB\-\-if\-exists\fR] \fBlsp\-unbind\fR \fIlogical\-port\fR"
Resets the binding of \fIlogical\-port\fR to \fINULL\fR.
.IP
Without \fB\-\-if\-exists\fR, attempting to unbind a logical port
Expand Down
12 changes: 6 additions & 6 deletions ovn/utilities/ovn-sbctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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\
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -1026,9 +1026,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 */
Expand Down
10 changes: 5 additions & 5 deletions tests/ovn-controller-vtep.at
Original file line number Diff line number Diff line change
Expand Up @@ -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'.
Expand All @@ -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.
Expand Down Expand Up @@ -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'.
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tests/ovn-sbctl.at
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion tests/ovn.at
Original file line number Diff line number Diff line change
Expand Up @@ -1356,7 +1356,7 @@ net_attach n2 br-phys2
ovs-vsctl set open . external_ids:ovn-bridge-mappings="physnet1:br-phys2"

# Bind our gateway port to the hv_gw chassis
ovn-sbctl lport-bind lp-gw hv_gw
ovn-sbctl lsp-bind lp-gw hv_gw

# Add hv3 on the other side of the GW
sim_add hv3
Expand Down
4 changes: 2 additions & 2 deletions tutorial/ovn/env3/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions tutorial/ovn/env4/setup2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 4 additions & 4 deletions tutorial/ovn/env5/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit f0f96ba

Please sign in to comment.