c3e0b346be99eede6b9d79d8f35d0d0eac28fb2b
[sliver-openvswitch.git] / tests / autopath.at
1 AT_BANNER([autopath link selection])
2
3 AT_SETUP([autopath basic])
4 AT_CHECK([ovs-ofctl parse-flow 'actions=autopath(1, NXM_NX_REG0[[]])'], [0],
5   [usable protocols: any
6 chosen protocol: OpenFlow10-table_id
7 OFPT_FLOW_MOD (xid=0x1): ADD actions=autopath(1,NXM_NX_REG0[[]])
8 ])
9 AT_CHECK([ovs-ofctl parse-flow 'actions=autopath(2, NXM_NX_REG0[[2..30]])'], [0],
10   [usable protocols: any
11 chosen protocol: OpenFlow10-table_id
12 OFPT_FLOW_MOD (xid=0x1): ADD actions=autopath(2,NXM_NX_REG0[[2..30]])
13 ])
14 AT_CLEANUP
15
16 AT_SETUP([autopath action missing argument])
17 AT_CHECK([ovs-ofctl parse-flow actions=autopath], [1], [],
18   [ovs-ofctl: : not enough arguments to autopath action
19 ])
20 AT_CLEANUP
21
22 AT_SETUP([autopath action bad port])
23 AT_CHECK([ovs-ofctl parse-flow 'actions=autopath(bad, NXM_NX_REG0[[]])'], [1], [],
24   [ovs-ofctl: bad, NXM_NX_REG0[[]]: autopath id 0 is not in valid range 1 to 4294967295
25 ])
26 AT_CLEANUP
27
28 AT_SETUP([autopath action destination too narrow])
29 AT_CHECK([ovs-ofctl parse-flow 'actions=autopath(1,NXM_NX_REG0[[0..7]])'], [1], [],
30   [ovs-ofctl: 1,NXM_NX_REG0[[0..7]]: 8-bit destination field has 256 possible values, less than required 65536
31 ])
32 AT_CLEANUP
33