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