753
760
external_ids : {}
754
761
targets : ["1.2.3.4:567"]
755
762
]], [ignore], [test ! -e pid || kill `cat pid`])
756
AT_CHECK([RUN_OVS_VSCTL([list interx x])],
763
AT_CHECK([RUN_OVS_VSCTL([list interx x])],
757
764
[1], [], [ovs-vsctl: unknown table "interx"
758
765
], [OVS_VSCTL_CLEANUP])
759
AT_CHECK([RUN_OVS_VSCTL([list b x])],
766
AT_CHECK([RUN_OVS_VSCTL([list b x])],
760
767
[1], [], [ovs-vsctl: no row "x" in table Bridge
761
768
], [OVS_VSCTL_CLEANUP])
762
769
AT_CHECK([RUN_OVS_VSCTL([get b x datapath_id])],
763
770
[1], [], [ovs-vsctl: no row "x" in table Bridge
764
771
], [OVS_VSCTL_CLEANUP])
765
AT_CHECK([RUN_OVS_VSCTL([get b br0 d])],
772
AT_CHECK([RUN_OVS_VSCTL([get b br0 d])],
766
773
[1], [], [ovs-vsctl: Bridge contains more than one column whose name matches "d"
767
774
], [OVS_VSCTL_CLEANUP])
768
AT_CHECK([RUN_OVS_VSCTL([get b br0 x])],
775
AT_CHECK([RUN_OVS_VSCTL([get b br0 x])],
769
776
[1], [], [ovs-vsctl: Bridge does not contain a column whose name matches "x"
770
777
], [OVS_VSCTL_CLEANUP])
771
AT_CHECK([RUN_OVS_VSCTL([get b br0 :y=z])],
778
AT_CHECK([RUN_OVS_VSCTL([get b br0 :y=z])],
772
779
[1], [], [ovs-vsctl: :y=z: missing column name
773
780
], [OVS_VSCTL_CLEANUP])
774
AT_CHECK([RUN_OVS_VSCTL([get b br0 datapath_id:y=z])],
781
AT_CHECK([RUN_OVS_VSCTL([get b br0 datapath_id:y=z])],
775
782
[1], [], [ovs-vsctl: datapath_id:y=z: trailing garbage "=z" in argument
776
783
], [OVS_VSCTL_CLEANUP])
777
AT_CHECK([RUN_OVS_VSCTL([set b br0 'datapath_id:y>=z'])],
784
AT_CHECK([RUN_OVS_VSCTL([set b br0 'datapath_id:y>=z'])],
778
785
[1], [], [ovs-vsctl: datapath_id:y>=z: argument does not end in "=" followed by a value.
779
786
], [OVS_VSCTL_CLEANUP])
780
787
AT_CHECK([RUN_OVS_VSCTL([set controller x connection_mode=standalone])],
781
788
[1], [], [ovs-vsctl: no row "x" in table Controller
782
789
], [OVS_VSCTL_CLEANUP])
783
AT_CHECK([RUN_OVS_VSCTL([wait-until b br0 datapath_id:y,z])],
790
AT_CHECK([RUN_OVS_VSCTL([wait-until b br0 datapath_id:y,z])],
784
791
[1], [], [ovs-vsctl: datapath_id:y,z: argument does not end in "=", "!=", "<", ">", "<=", ">=", "{=}", "{!=}", "{<}", "{>}", "{<=}", or "{>=}" followed by a value.
785
792
], [OVS_VSCTL_CLEANUP])
786
AT_CHECK([RUN_OVS_VSCTL([get b br0 datapath_id::])],
793
AT_CHECK([RUN_OVS_VSCTL([get b br0 datapath_id::])],
787
794
[1], [], [ovs-vsctl: datapath_id::: trailing garbage ":" in argument
788
795
], [OVS_VSCTL_CLEANUP])
789
AT_CHECK([RUN_OVS_VSCTL([get b br0 datapath_id:x])],
796
AT_CHECK([RUN_OVS_VSCTL([get b br0 datapath_id:x])],
790
797
[1], [], [ovs-vsctl: cannot specify key to get for non-map column datapath_id
791
798
], [OVS_VSCTL_CLEANUP])
792
AT_CHECK([RUN_OVS_VSCTL([get b br0 external_ids:x])],
799
AT_CHECK([RUN_OVS_VSCTL([get b br0 external_ids:x])],
793
800
[1], [], [ovs-vsctl: no key "x" in Bridge record "br0" column external_ids
794
801
], [OVS_VSCTL_CLEANUP])
795
AT_CHECK([RUN_OVS_VSCTL([set b br0 flood_vlans=-1])],
802
AT_CHECK([RUN_OVS_VSCTL([set b br0 flood_vlans=-1])],
796
803
[1], [], [ovs-vsctl: constraint violation: -1 is not in the valid range 0 to 4095 (inclusive)
797
804
], [OVS_VSCTL_CLEANUP])
798
AT_CHECK([RUN_OVS_VSCTL([set b br0 flood_vlans=4096])],
805
AT_CHECK([RUN_OVS_VSCTL([set b br0 flood_vlans=4096])],
799
806
[1], [], [ovs-vsctl: constraint violation: 4096 is not in the valid range 0 to 4095 (inclusive)
800
807
], [OVS_VSCTL_CLEANUP])
801
AT_CHECK([RUN_OVS_VSCTL([set c br1 'connection-mode=xyz'])],
808
AT_CHECK([RUN_OVS_VSCTL([set c br1 'connection-mode=xyz'])],
802
809
[1], [], [[ovs-vsctl: constraint violation: xyz is not one of the allowed values ([in-band, out-of-band])
803
810
]], [OVS_VSCTL_CLEANUP])
804
AT_CHECK([RUN_OVS_VSCTL([set c br1 connection-mode:x=y])],
811
AT_CHECK([RUN_OVS_VSCTL([set c br1 connection-mode:x=y])],
805
812
[1], [], [ovs-vsctl: cannot specify key to set for non-map column connection_mode
806
813
], [OVS_VSCTL_CLEANUP])
807
AT_CHECK([RUN_OVS_VSCTL([add b br1 datapath_id x y])],
814
AT_CHECK([RUN_OVS_VSCTL([add b br1 datapath_id x y])],
808
815
[1], [], [ovs-vsctl: "add" operation would put 2 values in column datapath_id of table Bridge but the maximum number is 1
809
816
], [OVS_VSCTL_CLEANUP])
810
AT_CHECK([RUN_OVS_VSCTL([remove netflow `cat netflow-uuid` targets '"1.2.3.4:567"'])],
817
AT_CHECK([RUN_OVS_VSCTL([remove netflow `cat netflow-uuid` targets '"1.2.3.4:567"'])],
811
818
[1], [], [ovs-vsctl: "remove" operation would put 0 values in column targets of table NetFlow but the minimum number is 1
812
819
], [OVS_VSCTL_CLEANUP])
813
AT_CHECK([RUN_OVS_VSCTL([remove netflow x targets '"1.2.3.4:567"'])],
820
AT_CHECK([RUN_OVS_VSCTL([remove netflow x targets '"1.2.3.4:567"'])],
814
821
[1], [], [ovs-vsctl: no row "x" in table NetFlow
815
822
], [OVS_VSCTL_CLEANUP])
816
823
AT_CHECK([RUN_OVS_VSCTL([clear netflow x targets])],
817
824
[1], [], [ovs-vsctl: no row "x" in table NetFlow
818
825
], [OVS_VSCTL_CLEANUP])
819
AT_CHECK([RUN_OVS_VSCTL([clear netflow `cat netflow-uuid` targets])],
826
AT_CHECK([RUN_OVS_VSCTL([clear netflow `cat netflow-uuid` targets])],
820
827
[1], [], [ovs-vsctl: "clear" operation cannot be applied to column targets of table NetFlow, which is not allowed to be empty
821
828
], [OVS_VSCTL_CLEANUP])
822
AT_CHECK([RUN_OVS_VSCTL([destroy b br2])],
829
AT_CHECK([RUN_OVS_VSCTL([destroy b br2])],
823
830
[1], [], [ovs-vsctl: no row "br2" in table Bridge
824
831
], [OVS_VSCTL_CLEANUP])
825
AT_CHECK([RUN_OVS_VSCTL([add i br1 name x])],
832
AT_CHECK([RUN_OVS_VSCTL([add in br1 name x])],
826
833
[1], [], [ovs-vsctl: cannot modify read-only column name in table Interface
827
834
], [OVS_VSCTL_CLEANUP])
828
835
AT_CHECK([RUN_OVS_VSCTL([set port br1 name br2])],
1183
1191
[-- list Queue])], [0], [], [], [OVS_VSCTL_CLEANUP])
1184
1192
OVS_VSCTL_CLEANUP
1195
dnl ----------------------------------------------------------------------
1196
AT_BANNER([ovs-vsctl add-port -- reserved port names])
1198
AT_SETUP([add-port -- reserved names 1])
1201
# Test creating all reserved port names
1211
# Try creating the port
1212
AT_CHECK([ovs-vsctl add-port br0 reserved_name], [0], [], [])
1213
# Detect the warning log message
1214
AT_CHECK([sed -n "s/^.*\(|bridge|WARN|.*\)$/\1/p" ovs-vswitchd.log], [0], [dnl
1215
|bridge|WARN|could not create interface reserved_name, name is reserved
1217
# Delete the warning log message
1218
AT_CHECK([sed "/|bridge|WARN|/d" ovs-vswitchd.log > ovs-vswitchd.log], [0], [], [])
1220
AT_CHECK([ovs-vsctl del-port br0 reserved_name], [0], [], [])])
1224
AT_SETUP([add-port -- reserved names 2])
1225
# Creates all type of tunnel ports
1226
OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=gre \
1227
options:remote_ip=1.1.1.1 ofport_request=1\
1228
-- add-port br0 p2 -- set Interface p2 type=gre64 \
1229
options:local_ip=2.2.2.2 options:remote_ip=1.1.1.1 \
1231
-- add-port br0 p3 -- set Interface p3 type=lisp \
1232
options:remote_ip=2.2.2.2 ofport_request=3 \
1233
-- add-port br0 p4 -- set Interface p4 type=vxlan \
1234
options:remote_ip=2.2.2.2 ofport_request=4])
1236
# Test creating all reserved tunnel port names
1244
# Try creating the port
1245
AT_CHECK([ovs-vsctl add-port br0 reserved_name], [0], [], [])
1246
# Detect the warning log message
1247
AT_CHECK([sed -n "s/^.*\(|bridge|WARN|.*\)$/\1/p" ovs-vswitchd.log], [0], [dnl
1248
|bridge|WARN|could not create interface reserved_name, name is reserved
1250
# Delete the warning log message
1251
AT_CHECK([sed "/|bridge|WARN|/d" ovs-vswitchd.log > ovs-vswitchd.log], [0], [], [])
1253
AT_CHECK([ovs-vsctl del-port br0 reserved_name], [0], [], [])])