bc56f4e85cc9e7488d4c4c8bda6b72a09c8de67e
[csit.git] / tests / suites / honeycomb / 9 - l2_fib.robot
1 # Copyright (c) 2016 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
5 #
6 #     http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
13
14 *** Settings ***
15 | Resource | resources/libraries/robot/default.robot
16 | Resource | resources/libraries/robot/honeycomb/interfaces.robot
17 | Resource | resources/libraries/robot/honeycomb/bridge_domain.robot
18 | Resource | resources/libraries/robot/honeycomb/l2_fib.robot
19 | Variables | tests/suites/honeycomb/resources/l2_fib.py
20 | Documentation | *Honeycomb L2 FIB management test suite.*
21 | Suite Setup | Run keywords
22 | ... | Set test interface down
23 | ... | AND
24 | ... | Honeycomb removes all bridge domains | ${node}
25 | Suite Teardown | Honeycomb removes all bridge domains | ${node}
26 | Force tags | honeycomb_sanity
27
28 *** Variables ***
29 # Node and interface used in tests.
30 | ${node}= | ${nodes['DUT1']}
31 | ${interface}= | GigabitEthernet0/8/0
32
33 *** Test Cases ***
34 | Honeycomb adds L2 FIB entry (forward)
35 | | [Documentation] | Honeycomb creates a bridge domain and assignes an \
36 | | ... | interface to it. Then adds an L2 FIB entry (forward) to the bridge \
37 | | ... | domain.
38 | | ...
39 | | [Teardown] | Honeycomb removes L2 FIB entry
40 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_oper['phys-address']}
41 | | ...
42 | | Given Interface state from Honeycomb should be
43 | | ... | ${node} | ${interface} | down
44 | | When Honeycomb sets interface state
45 | | ... | ${node} | ${interface} | up
46 | | Then Interface state from Honeycomb should be
47 | | ... | ${node} | ${interface} | up
48 | | When Honeycomb creates first l2 bridge domain
49 | | ... | ${node} | ${bd_name} | ${bd_settings}
50 | | Then Bridge domain configuration from Honeycomb should be
51 | | ... | ${node} | ${bd_name} | ${bd_settings}
52 | | Given Bridge domain configuration in interface operational data should be empty
53 | | ... | ${node} | ${interface}
54 | | When Honeycomb adds interface to bridge domain
55 | | ... | ${node} | ${interface} | ${bd_name} | ${if_bd_settings}
56 | | Then Bridge domain configuration in interface operational data should be
57 | | ... | ${node} | ${interface} | ${if_bd_settings}
58 | | Given L2 FIB Table from Honeycomb should be empty
59 | | ... | ${node} | ${bd_name}
60 | | And L2 FIB Table from VAT should be empty
61 | | ... | ${node} | ${bd_index}
62 | | When Honeycomb adds L2 FIB entry to bridge domain
63 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_cfg}
64 | | Then L2 FIB Entry from Honeycomb should be
65 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_oper}
66 | | And L2 FIB entry from VAT should be
67 | | ... | ${node} | ${bd_index} | ${l2_fib_forward_vat}
68
69 | Honeycomb adds L2 FIB entry (static, forward)
70 | | [Documentation] | Honeycomb adds an L2 FIB entry (static, forward) to the \
71 | | ... | bridge domain.
72 | | ...
73 | | [Teardown] | Honeycomb removes L2 FIB entry
74 | | ... | ${node} | ${bd_name} | ${l2_fib_static_forward_oper['phys-address']}
75 | | ...
76 | | Given Bridge domain configuration in interface operational data should be
77 | | ... | ${node} | ${interface} | ${if_bd_settings}
78 | | And L2 FIB Table from Honeycomb should be empty
79 | | ... | ${node} | ${bd_name}
80 | | And L2 FIB Table from VAT should be empty
81 | | ... | ${node} | ${bd_index}
82 | | When Honeycomb adds L2 FIB entry to bridge domain
83 | | ... | ${node} | ${bd_name} | ${l2_fib_static_forward_cfg}
84 | | Then L2 FIB Entry from Honeycomb should be
85 | | ... | ${node} | ${bd_name} | ${l2_fib_static_forward_oper}
86 | | And L2 FIB entry from VAT should be
87 | | ... | ${node} | ${bd_index} | ${l2_fib_static_forward_vat}
88
89 | Honeycomb adds L2 FIB entry (static, filter)
90 | | [Documentation] | Honeycomb adds an L2 FIB entry (static, filter) to the \
91 | | ... | bridge domain.
92 | | ...
93 | | [Teardown] | Honeycomb removes L2 FIB entry
94 | | ... | ${node} | ${bd_name} | ${l2_fib_filter_oper['phys-address']}
95 | | ...
96 | | Given Bridge domain configuration in interface operational data should be
97 | | ... | ${node} | ${interface} | ${if_bd_settings}
98 | | And L2 FIB Table from Honeycomb should be empty
99 | | ... | ${node} | ${bd_name}
100 | | And L2 FIB Table from VAT should be empty
101 | | ... | ${node} | ${bd_index}
102 | | When Honeycomb adds L2 FIB entry to bridge domain
103 | | ... | ${node} | ${bd_name} | ${l2_fib_filter_cfg}
104 | | Then L2 FIB Entry from Honeycomb should be
105 | | ... | ${node} | ${bd_name} | ${l2_fib_filter_oper}
106 | | And L2 FIB entry from VAT should be
107 | | ... | ${node} | ${bd_index} | ${l2_fib_filter_vat}
108
109 | Honeycomb adds and removes L2 FIB entry (forward)
110 | | [Documentation] | Honeycomb adds an L2 FIB entry (forward) to the bridge \
111 | | ... | domain and then Honeycomb removes it from the bridge domain.
112 | | ...
113 | | [Teardown] | Honeycomb removes L2 FIB entry
114 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_oper['phys-address']}
115 | | ...
116 | | Given Bridge domain configuration in interface operational data should be
117 | | ... | ${node} | ${interface} | ${if_bd_settings}
118 | | And L2 FIB Table from Honeycomb should be empty
119 | | ... | ${node} | ${bd_name}
120 | | And L2 FIB Table from VAT should be empty
121 | | ... | ${node} | ${bd_index}
122 | | When Honeycomb adds L2 FIB entry to bridge domain
123 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_cfg}
124 | | Then L2 FIB Entry from Honeycomb should be
125 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_oper}
126 | | And L2 FIB entry from VAT should be
127 | | ... | ${node} | ${bd_index} | ${l2_fib_forward_vat}
128 | | When Honeycomb removes L2 FIB entry
129 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_oper['phys-address']}
130 | | Then L2 FIB Table from Honeycomb should be empty
131 | | ... | ${node} | ${bd_name}
132 | | And L2 FIB Table from VAT should be empty
133 | | ... | ${node} | ${bd_index}
134
135 | Honeycomb adds more than one L2 FIB entry
136 | | [Documentation] | Honeycomb adds three L2 FIB entries to the bridge domain.
137 | | ...
138 | | [Teardown] | Honeycomb removes all L2 FIB entries
139 | | ... | ${node} | ${bd_name}
140 | | ...
141 | | Given Bridge domain configuration in interface operational data should be
142 | | ... | ${node} | ${interface} | ${if_bd_settings}
143 | | And L2 FIB Table from Honeycomb should be empty
144 | | ... | ${node} | ${bd_name}
145 | | And L2 FIB Table from VAT should be empty
146 | | ... | ${node} | ${bd_index}
147 | | When Honeycomb adds L2 FIB entry to bridge domain
148 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_cfg}
149 | | And Honeycomb adds L2 FIB entry to bridge domain
150 | | ... | ${node} | ${bd_name} | ${l2_fib_static_forward_cfg}
151 | | And Honeycomb adds L2 FIB entry to bridge domain
152 | | ... | ${node} | ${bd_name} | ${l2_fib_filter_cfg}
153 | | Then L2 FIB Entry from Honeycomb should be
154 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_oper}
155 | | And L2 FIB Entry from Honeycomb should be
156 | | ... | ${node} | ${bd_name} | ${l2_fib_static_forward_oper}
157 | | And L2 FIB Entry from Honeycomb should be
158 | | ... | ${node} | ${bd_name} | ${l2_fib_filter_oper}
159 | | And L2 FIB entry from VAT should be
160 | | ... | ${node} | ${bd_index} | ${l2_fib_forward_vat}
161 | | And L2 FIB entry from VAT should be
162 | | ... | ${node} | ${bd_index} | ${l2_fib_static_forward_vat}
163 | | And L2 FIB entry from VAT should be
164 | | ... | ${node} | ${bd_index} | ${l2_fib_filter_vat}
165
166 | Honeycomb fails to set wrong L2 FIB entry
167 | | [Documentation] | Honeycomb tries to add an L2 FIB entry with wrong \
168 | | ... | parameters to the bridge domain. It must fail.
169 | | ...
170 | | [Teardown] | Honeycomb removes all L2 FIB entries
171 | | ... | ${node} | ${bd_name}
172 | | ...
173 | | Given Bridge domain configuration in interface operational data should be
174 | | ... | ${node} | ${interface} | ${if_bd_settings}
175 | | And L2 FIB Table from Honeycomb should be empty
176 | | ... | ${node} | ${bd_name}
177 | | And L2 FIB Table from VAT should be empty
178 | | ... | ${node} | ${bd_index}
179 | | When Honeycomb fails to add wrong L2 FIB entry
180 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_cfg_wrong_mac}
181 | | Then L2 FIB Table from Honeycomb should be empty
182 | | ... | ${node} | ${bd_name}
183 | | And L2 FIB Table from VAT should be empty
184 | | ... | ${node} | ${bd_index}
185 | | When Honeycomb fails to add wrong L2 FIB entry
186 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_cfg_wrong_if}
187 | | Then L2 FIB Table from Honeycomb should be empty
188 | | ... | ${node} | ${bd_name}
189 | | And L2 FIB Table from VAT should be empty
190 | | ... | ${node} | ${bd_index}
191 | | When Honeycomb fails to add wrong L2 FIB entry
192 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_cfg_wrong_action}
193 | | Then L2 FIB Table from Honeycomb should be empty
194 | | ... | ${node} | ${bd_name}
195 | | And L2 FIB Table from VAT should be empty
196 | | ... | ${node} | ${bd_index}
197
198 | Honeycomb fails to modify existing L2 FIB entry
199 | | [Documentation] | Honeycomb tries to modify an existing L2 FIB entry. It \
200 | | ... | must fail.
201 | | ...
202 | | [Teardown] | Honeycomb removes all L2 FIB entries
203 | | ... | ${node} | ${bd_name}
204 | | ...
205 | | Given Bridge domain configuration in interface operational data should be
206 | | ... | ${node} | ${interface} | ${if_bd_settings}
207 | | And L2 FIB Table from Honeycomb should be empty
208 | | ... | ${node} | ${bd_name}
209 | | And L2 FIB Table from VAT should be empty
210 | | ... | ${node} | ${bd_index}
211 | | When Honeycomb adds L2 FIB entry to bridge domain
212 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_cfg}
213 | | Then L2 FIB Entry from Honeycomb should be
214 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_oper}
215 | | When Honeycomb fails to modify L2 FIB entry
216 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_oper['phys-address']}
217 | | ... | outgoing-interface
218 | | ... | ${l2_fib_forward_modified_cfg['outgoing-interface']}
219 | | Then L2 FIB Entry from Honeycomb should be
220 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_oper}
221 | | And L2 FIB entry from VAT should be
222 | | ... | ${node} | ${bd_index} | ${l2_fib_forward_vat}
223
224 *** Keywords ***
225 | Set test interface down
226 | | [Documentation] | Set the interface used in tests down.
227 | | ...
228 | | Honeycomb sets interface state
229 | | ... | ${node} | ${interface} | down