summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJustin Pettit <jpettit@ovn.org>2016-06-07 16:22:06 -0700
committerJustin Pettit <jpettit@ovn.org>2016-06-11 16:59:15 -0700
commit80f408f4cffb5c3e12a8e14c1a16343b0fecedbc (patch)
tree29dd124a71609ded4179d2f211ce639f4aabbfea /tests
parente48ccf3c7ce3ce36ef344b46588c4c4fd27da5a6 (diff)
downloadopenvswitch-80f408f4cffb5c3e12a8e14c1a16343b0fecedbc.tar.gz
ovn: Use Logical_Switch_Port in NB.
We have both logical switch and router ports. Router ports are referenced in "Logical_Router_Port" table, so this make it more consistent. Also change internal use of "lport" to "lsp". Signed-off-by: Justin Pettit <jpettit@ovn.org> Acked-by: Ryan Moats <rmoats@us.ibm.com> Acked-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/ovn-controller-vtep.at14
-rw-r--r--tests/ovn-nbctl.at2
-rw-r--r--tests/ovn.at67
3 files changed, 41 insertions, 42 deletions
diff --git a/tests/ovn-controller-vtep.at b/tests/ovn-controller-vtep.at
index 4228d929d..3eaf77ef5 100644
--- a/tests/ovn-controller-vtep.at
+++ b/tests/ovn-controller-vtep.at
@@ -183,7 +183,7 @@ OVN_CONTROLLER_VTEP_START
# adds logical switch 'lswitch0' and vlan_bindings.
AT_CHECK([vtep-ctl add-ls lswitch0 -- bind-ls br-vtep p0 100 lswitch0 -- bind-ls br-vtep p1 300 lswitch0])
-# adds lport in ovn-nb database, and sets the type and options.
+# adds logical switch port in ovn-nb database, and sets the type and options.
OVN_NB_ADD_VTEP_PORT([br-test], [br-vtep_lswitch0], [br-vtep], [lswitch0])
OVS_WAIT_UNTIL([test -n "`ovn-sbctl list Port_Binding | grep br-vtep_lswitch0`"])
# should see one binding, associated to chassis of 'br-vtep'.
@@ -194,7 +194,7 @@ ${chassis_uuid}
# adds another logical switch 'lswitch1' and vlan_bindings.
AT_CHECK([vtep-ctl add-ls lswitch1 -- bind-ls br-vtep p0 200 lswitch1])
-# adds lport in ovn-nb database for lswitch1.
+# adds logical switch port in ovn-nb database for lswitch1.
OVN_NB_ADD_VTEP_PORT([br-test], [br-vtep_lswitch1], [br-vtep], [lswitch1])
OVS_WAIT_UNTIL([test -n "`ovn-sbctl list Port_Binding | grep -- br-vtep_lswitch1`"])
# This is allowed, but not recommended, to have two vlan_bindings (to different vtep logical switches)
@@ -205,7 +205,7 @@ ${chassis_uuid}
${chassis_uuid}
])
-# adds another lport in ovn-nb database for lswitch0.
+# adds another logical switch port in ovn-nb database for lswitch0.
OVN_NB_ADD_VTEP_PORT([br-test], [br-vtep_lswitch0_dup], [br-vtep], [lswitch0])
OVS_WAIT_UNTIL([test -n "`ovn-sbctl list Port_Binding | grep -- br-vtep_lswitch0_dup`"])
# it is not allowed to have more than one ovn-nb logical port for the same
@@ -247,7 +247,7 @@ OVN_CONTROLLER_VTEP_START
# adds logical switch 'lswitch0' and vlan_bindings.
AT_CHECK([vtep-ctl add-ls lswitch0 -- bind-ls br-vtep p0 100 lswitch0])
-# adds lport in ovn-nb database, and sets the type and options.
+# adds logical switch port in ovn-nb database, and sets the type and options.
OVN_NB_ADD_VTEP_PORT([br-test], [br-vtep_lswitch0], [br-vtep], [lswitch0])
OVS_WAIT_UNTIL([test -n "`ovn-sbctl list Port_Binding | grep br-vtep_lswitch0`"])
@@ -376,7 +376,7 @@ AT_CHECK([ovs-vsctl --columns=options list Interface bfd1.2.3.5 | cut -d ':' -f2
{remote_ip="1.2.3.5"}
])
-# adds another mac to lport.
+# adds another mac to logical switch port.
AT_CHECK([ovn-nbctl lport-set-addresses vif0 f0:ab:cd:ef:01:02 f0:ab:cd:ef:01:03])
OVS_WAIT_UNTIL([test -n "`vtep-ctl list Ucast_Macs_Remote | grep 03`"])
AT_CHECK([vtep-ctl --columns=MAC list Ucast_Macs_Remote | cut -d ':' -f2- | tr -d ' ' | sort], [0], [dnl
@@ -385,14 +385,14 @@ AT_CHECK([vtep-ctl --columns=MAC list Ucast_Macs_Remote | cut -d ':' -f2- | tr -
"f0:ab:cd:ef:01:03"
])
-# removes one mac to lport.
+# removes one mac to logical switch port.
AT_CHECK([ovn-nbctl lport-set-addresses vif0 f0:ab:cd:ef:01:03])
OVS_WAIT_UNTIL([test -z "`vtep-ctl --columns=MAC list Ucast_Macs_Remote | grep 02`"])
AT_CHECK([vtep-ctl --columns=MAC list Ucast_Macs_Remote | cut -d ':' -f2- | tr -d ' ' | sort], [0], [dnl
"f0:ab:cd:ef:01:03"
])
-# migrates mac to lport vif1 on 'br-void'.
+# migrates mac to logical switch port vif1 on 'br-void'.
AT_CHECK([ovn-nbctl lport-set-addresses vif0])
AT_CHECK([ovn-nbctl lport-set-addresses vif1 f0:ab:cd:ef:01:03])
OVS_WAIT_UNTIL([test -z "`vtep-ctl --columns=MAC list Ucast_Macs_Remote | grep 03`"])
diff --git a/tests/ovn-nbctl.at b/tests/ovn-nbctl.at
index 34ece98a2..7f01b4d44 100644
--- a/tests/ovn-nbctl.at
+++ b/tests/ovn-nbctl.at
@@ -129,7 +129,7 @@ AT_CHECK([ovn-nbctl --may-exist lport-add ls0 lp2 lp4 5], [1], [],
AT_CHECK([ovn-nbctl --may-exist lport-add ls0 lp2 lp3 10], [1], [],
[ovn-nbctl: lp2: lport already exists with different tag 5
])
-AT_CHECK([ovn-nbctl clear Logical_Port lp2 tag])
+AT_CHECK([ovn-nbctl clear Logical_Switch_Port lp2 tag])
AT_CHECK([ovn-nbctl --may-exist lport-add ls0 lp2 lp3 5], [1], [],
[ovn-nbctl: lp2: lport already exists but has no tag
])
diff --git a/tests/ovn.at b/tests/ovn.at
index 652f0a686..b14203fcf 100644
--- a/tests/ovn.at
+++ b/tests/ovn.at
@@ -1270,13 +1270,13 @@ for i in 1 2 3; do
192.168.$i$j.254/24 lrp$i$j-attachment
ovn-nbctl \
-- lport-add ls$i lrp$i$j-attachment \
- -- set Logical_Port lrp$i$j-attachment type=router \
+ -- set Logical_Switch_Port lrp$i$j-attachment type=router \
options:router-port=lrp$i$j \
addresses='"00:00:00:00:ff:'$i$j'"'
done
done
-ovn-nbctl set Logical_Port lrp33-attachment \
+ovn-nbctl set Logical_Switch_Port lrp33-attachment \
addresses='"00:00:00:00:ff:33 192.168.33.254"'
# Physical network:
@@ -2084,13 +2084,13 @@ ovn-nbctl lswitch-add ls2
# Connect ls1 to R1
ovn-nbctl lrp-add R1 ls1 00:00:00:01:02:03 192.168.1.1/24 rp-ls1
-ovn-nbctl lport-add ls1 rp-ls1 -- set Logical_port rp-ls1 type=router \
+ovn-nbctl lport-add ls1 rp-ls1 -- set Logical_Switch_Port rp-ls1 type=router \
options:router-port=ls1 addresses=\"00:00:00:01:02:03\"
# Connect ls2 to R2
ovn-nbctl lrp-add R2 ls2 00:00:00:01:02:04 172.16.1.1/24 rp-ls2
-ovn-nbctl lport-add ls2 rp-ls2 -- set Logical_port rp-ls2 type=router \
+ovn-nbctl lport-add ls2 rp-ls2 -- set Logical_Switch_Port rp-ls2 type=router \
options:router-port=ls2 addresses=\"00:00:00:01:02:04\"
# Connect R1 to R2
@@ -2227,12 +2227,12 @@ ovn-nbctl lswitch-add ls2
# Connect ls1 to R1
ovn-nbctl lrp-add R1 ls1 00:00:00:01:02:03 192.168.1.1/24 rp-ls1
-ovn-nbctl lport-add ls1 rp-ls1 -- set Logical_port rp-ls1 type=router \
+ovn-nbctl lport-add ls1 rp-ls1 -- set Logical_Switch_Port rp-ls1 type=router \
options:router-port=ls1 addresses=\"00:00:00:01:02:03\"
# Connect ls2 to R1
ovn-nbctl lrp-add R1 ls2 00:00:00:01:02:04 172.16.1.1/24 rp-ls2
-ovn-nbctl lport-add ls2 rp-ls2 -- set Logical_port rp-ls2 type=router \
+ovn-nbctl lport-add ls2 rp-ls2 -- set Logical_Switch_Port rp-ls2 type=router \
options:router-port=ls2 addresses=\"00:00:00:01:02:04\"
# Create logical port ls1-lp1 in ls1
@@ -2366,17 +2366,17 @@ ovn-nbctl lswitch-add bob
# Connect foo to R1
ovn-nbctl lrp-add R1 foo 00:00:00:01:02:03 192.168.1.1/24 rp-foo
-ovn-nbctl lport-add foo rp-foo -- set Logical_port rp-foo type=router \
+ovn-nbctl lport-add foo rp-foo -- set Logical_Switch_Port rp-foo type=router \
options:router-port=foo addresses=\"00:00:00:01:02:03\"
# Connect alice to R2
ovn-nbctl lrp-add R2 alice 00:00:00:01:02:04 172.16.1.1/24 rp-alice
-ovn-nbctl lport-add alice rp-alice -- set Logical_port rp-alice type=router \
- options:router-port=alice addresses=\"00:00:00:01:02:04\"
+ovn-nbctl lport-add alice rp-alice -- set Logical_Switch_Port rp-alice \
+ type=router options:router-port=alice addresses=\"00:00:00:01:02:04\"
# Connect bob to R2
ovn-nbctl lrp-add R2 bob 00:00:00:01:02:05 172.16.2.1/24 rp-bob
-ovn-nbctl lport-add bob rp-bob -- set Logical_port rp-bob type=router \
+ovn-nbctl lport-add bob rp-bob -- set Logical_Switch_Port rp-bob type=router \
options:router-port=bob addresses=\"00:00:00:01:02:05\"
# Connect R1 to R2
@@ -2611,34 +2611,33 @@ ovn-nbctl lswitch-add join
# Connect foo to R1
ovn-nbctl lrp-add R1 foo 00:00:01:01:02:03 192.168.1.1/24
-ovn-nbctl lport-add foo rp-foo -- set Logical_port rp-foo type=router \
+ovn-nbctl lport-add foo rp-foo -- set Logical_Switch_Port rp-foo type=router \
options:router-port=foo addresses=\"00:00:01:01:02:03\"
# Connect alice to R2
ovn-nbctl lrp-add R2 alice 00:00:02:01:02:03 172.16.1.1/24
-ovn-nbctl lport-add alice rp-alice -- set Logical_port rp-alice type=router \
- options:router-port=alice addresses=\"00:00:02:01:02:03\"
+ovn-nbctl lport-add alice rp-alice -- set Logical_Switch_Port rp-alice \
+ type=router options:router-port=alice addresses=\"00:00:02:01:02:03\"
# Connect bob to R3
ovn-nbctl lrp-add R3 bob 00:00:03:01:02:03 10.32.1.1/24
-ovn-nbctl lport-add bob rp-bob -- set Logical_port rp-bob type=router \
- options:router-port=bob addresses=\"00:00:03:01:02:03\"
+ovn-nbctl lport-add bob rp-bob -- set Logical_Switch_Port rp-bob \
+ type=router options:router-port=bob addresses=\"00:00:03:01:02:03\"
# Connect R1 to join
ovn-nbctl lrp-add R1 R1_join 00:00:04:01:02:03 20.0.0.1/24
-ovn-nbctl lport-add join r1-join -- set Logical_port r1-join type=router \
- options:router-port=R1_join addresses='"00:00:04:01:02:03"'
+ovn-nbctl lport-add join r1-join -- set Logical_Switch_Port r1-join \
+ type=router options:router-port=R1_join addresses='"00:00:04:01:02:03"'
# Connect R2 to join
ovn-nbctl lrp-add R2 R2_join 00:00:04:01:02:04 20.0.0.2/24
-ovn-nbctl lport-add join r2-join -- set Logical_port r2-join type=router \
- options:router-port=R2_join addresses='"00:00:04:01:02:04"'
-
+ovn-nbctl lport-add join r2-join -- set Logical_Switch_Port r2-join \
+ type=router options:router-port=R2_join addresses='"00:00:04:01:02:04"'
# Connect R3 to join
ovn-nbctl lrp-add R3 R3_join 00:00:04:01:02:05 20.0.0.3/24
-ovn-nbctl lport-add join r3-join -- set Logical_port r3-join type=router \
- options:router-port=R3_join addresses='"00:00:04:01:02:05"'
+ovn-nbctl lport-add join r3-join -- set Logical_Switch_Port r3-join \
+ type=router options:router-port=R3_join addresses='"00:00:04:01:02:05"'
#install static routes
ovn-nbctl lr-route-add R1 172.16.1.0/24 20.0.0.2
@@ -2845,23 +2844,23 @@ ovn-nbctl lswitch-add join
# Connect foo to R1
ovn-nbctl lrp-add R1 foo 00:00:01:01:02:03 192.168.1.1/24
-ovn-nbctl lport-add foo rp-foo -- set Logical_port rp-foo type=router \
- options:router-port=foo addresses=\"00:00:01:01:02:03\"
+ovn-nbctl lport-add foo rp-foo -- set Logical_Switch_Port rp-foo \
+ type=router options:router-port=foo addresses=\"00:00:01:01:02:03\"
# Connect alice to R2
ovn-nbctl lrp-add R2 alice 00:00:02:01:02:03 172.16.1.1/24
-ovn-nbctl lport-add alice rp-alice -- set Logical_port rp-alice type=router \
- options:router-port=alice addresses=\"00:00:02:01:02:03\"
+ovn-nbctl lport-add alice rp-alice -- set Logical_Switch_Port rp-alice \
+ type=router options:router-port=alice addresses=\"00:00:02:01:02:03\"
# Connect R1 to join
ovn-nbctl lrp-add R1 R1_join 00:00:04:01:02:03 20.0.0.1/24
-ovn-nbctl lport-add join r1-join -- set Logical_port r1-join type=router \
- options:router-port=R1_join addresses='"00:00:04:01:02:03"'
+ovn-nbctl lport-add join r1-join -- set Logical_Switch_Port r1-join \
+ type=router options:router-port=R1_join addresses='"00:00:04:01:02:03"'
# Connect R2 to join
ovn-nbctl lrp-add R2 R2_join 00:00:04:01:02:04 20.0.0.2/24
-ovn-nbctl lport-add join r2-join -- set Logical_port r2-join type=router \
- options:router-port=R2_join addresses='"00:00:04:01:02:04"'
+ovn-nbctl lport-add join r2-join -- set Logical_Switch_Port r2-join \
+ type=router options:router-port=R2_join addresses='"00:00:04:01:02:04"'
#install static routes
@@ -2980,13 +2979,13 @@ ovn-nbctl lswitch-add ls2
# Connect ls1 to R1
ovn-nbctl lrp-add R1 ls1 00:00:00:01:02:f1 192.168.1.1/24
-ovn-nbctl lport-add ls1 rp-ls1 -- set Logical_port rp-ls1 type=router \
- options:router-port=ls1 addresses=\"00:00:00:01:02:f1\"
+ovn-nbctl lport-add ls1 rp-ls1 -- set Logical_Switch_Port rp-ls1 \
+ type=router options:router-port=ls1 addresses=\"00:00:00:01:02:f1\"
# Connect ls2 to R1
ovn-nbctl lrp-add R1 ls2 00:00:00:01:02:f2 172.16.1.1/24
-ovn-nbctl lport-add ls2 rp-ls2 -- set Logical_port rp-ls2 type=router \
- options:router-port=ls2 addresses=\"00:00:00:01:02:f2\"
+ovn-nbctl lport-add ls2 rp-ls2 -- set Logical_Switch_Port rp-ls2 \
+ type=router options:router-port=ls2 addresses=\"00:00:00:01:02:f2\"
# Create logical port ls1-lp1 in ls1
ovn-nbctl lport-add ls1 ls1-lp1 \