debian: Fix exit status of openvswitch-switch init script "status" command.
[openvswitch] / tests / lacp.at
1 AT_BANNER([lacp])
2
3 AT_SETUP([lacp - config])
4 OVS_VSWITCHD_START([\
5         add-port br0 p1 --\
6         set Port p1 lacp=active --\
7         set Interface p1 type=dummy ])
8
9 AT_CHECK([ovs-appctl lacp/show], [0], [dnl
10 ---- p1 ----
11         status: active negotiated
12         sys_id: aa:55:aa:55:00:00
13         sys_priority: 65535
14         aggregation key: 1
15         lacp_time: slow
16
17 slave: p1: expired attached
18         port_id: 1
19         port_priority: 65535
20
21         actor sys_id: aa:55:aa:55:00:00
22         actor sys_priority: 65535
23         actor port_id: 1
24         actor port_priority: 65535
25         actor key: 1
26         actor state: activity synchronized collecting distributing expired
27
28         partner sys_id: 00:00:00:00:00:00
29         partner sys_priority: 0
30         partner port_id: 0
31         partner port_priority: 0
32         partner key: 0
33         partner state: timeout
34 ])
35 AT_CHECK([ovs-appctl bond/show])
36 OVS_VSWITCHD_STOP
37 AT_CLEANUP
38
39 AT_SETUP([lacp - multi port config])
40 OVS_VSWITCHD_START([dnl
41         add-bond br0 bond p1 p2 --\
42         set Port bond lacp=active \
43             other_config:lacp-time="fast" \
44             other_config:lacp-system-id=11:22:33:44:55:66 \
45             other_config:lacp-system-priority=54321 --\
46         set Interface p1 type=dummy \
47             other_config:lacp-port-id=11 \
48             other_config:lacp-port-priority=111 \
49             other_config:lacp-aggregation-key=3333 --\
50         set Interface p2 type=dummy \
51             other_config:lacp-port-id=22 \
52             other_config:lacp-port-priority=222 \
53             other_config:lacp-aggregation-key=3333 ])
54
55 AT_CHECK([ovs-appctl lacp/show], [0], [stdout])
56 AT_CHECK([sed -e 's/aggregation key:.*/aggregation key: <omitted>/' < stdout], [0], [dnl
57 ---- bond ----
58         status: active negotiated
59         sys_id: 11:22:33:44:55:66
60         sys_priority: 54321
61         aggregation key: <omitted>
62         lacp_time: fast
63
64 slave: p1: expired attached
65         port_id: 11
66         port_priority: 111
67
68         actor sys_id: 11:22:33:44:55:66
69         actor sys_priority: 54321
70         actor port_id: 11
71         actor port_priority: 111
72         actor key: 3333
73         actor state: activity timeout aggregation synchronized collecting distributing expired
74
75         partner sys_id: 00:00:00:00:00:00
76         partner sys_priority: 0
77         partner port_id: 0
78         partner port_priority: 0
79         partner key: 0
80         partner state: timeout
81
82 slave: p2: expired attached
83         port_id: 22
84         port_priority: 222
85
86         actor sys_id: 11:22:33:44:55:66
87         actor sys_priority: 54321
88         actor port_id: 22
89         actor port_priority: 222
90         actor key: 3333
91         actor state: activity timeout aggregation synchronized collecting distributing expired
92
93         partner sys_id: 00:00:00:00:00:00
94         partner sys_priority: 0
95         partner port_id: 0
96         partner port_priority: 0
97         partner key: 0
98         partner state: timeout
99 ])
100 AT_CHECK([ovs-appctl bond/show], [0], [dnl
101 ---- bond ----
102 bond_mode: active-backup
103 bond-hash-basis: 0
104 updelay: 0 ms
105 downdelay: 0 ms
106 lacp_status: negotiated
107
108 slave p1: disabled
109         may_enable: false
110
111 slave p2: disabled
112         may_enable: false
113
114 ])
115 OVS_VSWITCHD_STOP
116 AT_CLEANUP