tunneling: Remove gre64 tunnel support.
[cascardo/ovs.git] / tests / ovs-vsctl.at
index 4ea47ef..435116a 100644 (file)
@@ -483,6 +483,9 @@ AT_CHECK([RUN_OVS_VSCTL([--may-exist add-br xapi1 xxx $1])], [1], [],
 AT_CHECK([RUN_OVS_VSCTL([--may-exist add-br xapi1 xenbr0 10])], [1], [],
   [ovs-vsctl: "--may-exist add-br xapi1 xenbr0 10" but xapi1 is a VLAN bridge for the wrong VLAN $1
 ], [OVS_VSCTL_CLEANUP])
+AT_CHECK([RUN_OVS_VSCTL([--may-exist add-br dup xenbr0 $1])], [1], [],
+  [ovs-vsctl: bridge xenbr0 already has a child VLAN bridge xapi1 on VLAN $1
+], [OVS_VSCTL_CLEANUP])
 CHECK_BRIDGES([xapi1, xenbr0, $1], [xenbr0, xenbr0, 0])
 CHECK_PORTS([xenbr0], [eth0])
 CHECK_IFACES([xenbr0], [eth0])
@@ -632,7 +635,8 @@ AT_SETUP([database commands -- positive checks])
 AT_KEYWORDS([ovs-vsctl])
 OVS_VSCTL_SETUP
 AT_CHECK(
-  [RUN_OVS_VSCTL_TOGETHER([--id=@br0 create bridge name=br0],
+  [RUN_OVS_VSCTL_TOGETHER([--id=@br0 create bridge name=br123],
+                          [set b br123 name=br0],
                           [set o . bridges=@br0])],
   [0], [stdout], [], [OVS_VSCTL_CLEANUP])
 cp stdout out1
@@ -642,10 +646,13 @@ cp stdout out2
 AT_CHECK([${PERL} $srcdir/uuidfilt.pl out1 out2], [0],
   [[<0>
 
+
 _uuid               : <0>
+auto_attach         : []
 controller          : []
 datapath_id         : []
 datapath_type       : ""
+datapath_version    : ""
 external_ids        : {}
 fail_mode           : []
 flood_vlans         : []
@@ -658,6 +665,8 @@ netflow             : []
 other_config        : {}
 ports               : []
 protocols           : []
+rstp_enable         : false
+rstp_status         : {}
 sflow               : []
 status              : {}
 stp_enable          : false
@@ -845,10 +854,10 @@ AT_CHECK([RUN_OVS_VSCTL([destroy bridge br2])],
 AT_CHECK([RUN_OVS_VSCTL([add in br1 name x])],
   [1], [], [ovs-vsctl: cannot modify read-only column name in table Interface
 ], [OVS_VSCTL_CLEANUP])
-AT_CHECK([RUN_OVS_VSCTL([set port br1 name br2])],
+AT_CHECK([RUN_OVS_VSCTL([set port br0 name=br2])],
   [1], [], [ovs-vsctl: cannot modify read-only column name in table Port
 ], [OVS_VSCTL_CLEANUP])
-AT_CHECK([RUN_OVS_VSCTL([remove bridge br1 name br1])],
+AT_CHECK([RUN_OVS_VSCTL([remove bridge br0 name br1])],
   [1], [], [ovs-vsctl: cannot modify read-only column name in table Bridge
 ], [OVS_VSCTL_CLEANUP])
 AT_CHECK([RUN_OVS_VSCTL([remove bridge br1 flood-vlans true])],
@@ -1104,7 +1113,7 @@ AT_CHECK(
   [ovs-vsctl -vPATTERN:console:'%c|%p|%m' --no-wait -vreconnect:emer --db=unix:socket \
      -- create Bridge name=br0 | ${PERL} $srcdir/uuidfilt.pl],
   [0], [<0>
-], [vsctl|WARN|applying "create" command to table Bridge without --id option will have no effect
+], [db_ctl_base|WARN|applying "create" command to table Bridge without --id option will have no effect
 ], [OVS_VSCTL_CLEANUP])
 AT_CHECK(
   [ovs-vsctl -vPATTERN:console:'%c|%p|%m' --no-wait -vreconnect:emer --db=unix:socket \
@@ -1139,9 +1148,11 @@ AT_CHECK([RUN_OVS_VSCTL([--id=@br0 create Bridge name=br0 -- add Open_vSwitch .
 AT_CHECK([${PERL} $srcdir/uuidfilt.pl stdout], [0],
   [[<0>
 _uuid               : <1>
+auto_attach         : []
 controller          : []
 datapath_id         : []
 datapath_type       : ""
+datapath_version    : ""
 external_ids        : {}
 fail_mode           : []
 flood_vlans         : []
@@ -1154,6 +1165,8 @@ netflow             : []
 other_config        : {}
 ports               : []
 protocols           : []
+rstp_enable         : false
+rstp_status         : {}
 sflow               : []
 status              : {}
 stp_enable          : false
@@ -1223,7 +1236,6 @@ m4_foreach(
 [ovs-dummy],
 [genev_sys],
 [gre_sys],
-[gre64_sys],
 [lisp_sys],
 [vxlan_sys]],
 [
@@ -1231,6 +1243,8 @@ m4_foreach(
 AT_CHECK([ovs-vsctl add-port br0 reserved_name], [0], [], [dnl
 ovs-vsctl: Error detected while setting up 'reserved_name'.  See ovs-vswitchd log for details.
 ])
+# Prevent race.
+OVS_WAIT_UNTIL([test `grep -- "|WARN|" ovs-vswitchd.log | wc -l` -ge 1])
 # Detect the warning log message
 AT_CHECK([sed -n "s/^.*\(|bridge|WARN|.*\)$/\1/p" ovs-vswitchd.log], [0], [dnl
 |bridge|WARN|could not create interface reserved_name, name is reserved
@@ -1246,9 +1260,6 @@ AT_SETUP([add-port -- reserved names 2])
 # Creates all type of tunnel ports
 OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=gre \
                     options:remote_ip=1.1.1.1 ofport_request=1\
-                    -- add-port br0 p2 -- set Interface p2 type=gre64 \
-                    options:local_ip=2.2.2.2 options:remote_ip=1.1.1.1 \
-                    ofport_request=2 \
                     -- add-port br0 p3 -- set Interface p3 type=lisp \
                     options:remote_ip=2.2.2.2 ofport_request=3 \
                     -- add-port br0 p4 -- set Interface p4 type=vxlan \
@@ -1261,7 +1272,6 @@ m4_foreach(
 [reserved_name],
 [[genev_sys],
 [gre_sys],
-[gre64_sys],
 [lisp_sys],
 [vxlan_sys]],
 [
@@ -1269,6 +1279,8 @@ m4_foreach(
 AT_CHECK([ovs-vsctl add-port br0 reserved_name], [0], [], [dnl
 ovs-vsctl: Error detected while setting up 'reserved_name'.  See ovs-vswitchd log for details.
 ])
+# Prevent race.
+OVS_WAIT_UNTIL([test `grep -- "|WARN|" ovs-vswitchd.log | wc -l` -ge 1])
 # Detect the warning log message
 AT_CHECK([sed -n "s/^.*\(|bridge|WARN|.*\)$/\1/p" ovs-vswitchd.log], [0], [dnl
 |bridge|WARN|could not create interface reserved_name, name is reserved
@@ -1279,3 +1291,21 @@ AT_CHECK([sed "/|bridge|WARN|/d" ovs-vswitchd.log > ovs-vswitchd.log], [0], [],
 AT_CHECK([ovs-vsctl del-port br0 reserved_name], [0], [], [])])
 OVS_VSWITCHD_STOP
 AT_CLEANUP
+
+AT_SETUP([naming in db commands])
+OVS_VSCTL_SETUP
+
+dnl First check that the database commands can refer to row by database UUID.
+AT_CHECK([RUN_OVS_VSCTL([add-br br0])])
+uuid=`[]RUN_OVS_VSCTL(get port br0 _uuid)`
+AT_CHECK([RUN_OVS_VSCTL([get port $uuid name])], [0], ["br0"
+])
+
+dnl Next check that, if a database row is given a name that has the same form
+dnl as the database UUIDs, the name can still be used to refer to rows.
+AT_CHECK([RUN_OVS_VSCTL([add-br 0fcd11a1-2ba8-4b38-a358-4bccf2bf3057])])
+AT_CHECK([RUN_OVS_VSCTL([get interface 0fcd11a1-2ba8-4b38-a358-4bccf2bf3057 type])], [0], [internal
+])
+
+OVS_VSCTL_CLEANUP
+AT_CLEANUP