184f3619476f205545134b70d63f7ba24014139d
[csit.git] / tests / func / honeycomb / mgmt-cfg-l2fib-apihc-apivat-func.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/honeycomb.robot
17 | Resource | resources/libraries/robot/honeycomb/interfaces.robot
18 | Resource | resources/libraries/robot/honeycomb/bridge_domain.robot
19 | Resource | resources/libraries/robot/honeycomb/l2_fib.robot
20 | Variables | resources/test_data/honeycomb/l2_fib.py | ${node} | ${interface}
21 | ... | ${interface2}
22 | ...
23 | Documentation | *Honeycomb L2 FIB management test suite.*
24 | ...
25 | Suite Setup | Run keywords | Set test interface down
26 | ...
27 | Suite Teardown | Run keywords
28 | ... | Run Keyword If Any Tests Failed
29 | ... | Restart Honeycomb and VPP | ${node}
30 | ... | AND
31 | ... | Honeycomb removes all bridge domains
32 | ... | ${node} | ${interface} | ${interface2}
33 | ...
34 | Force tags | HC_FUNC
35
36 *** Variables ***
37 # Interface to run tests on.
38 | ${interface}= | ${node['interfaces']['port1']['name']}
39 | ${interface2}= | ${node['interfaces']['port3']['name']}
40
41 *** Test Cases ***
42 | TC01: Honeycomb adds L2 FIB entry (forward)
43 | | [Documentation] | Honeycomb creates a bridge domain and assignes an \
44 | | ... | interface to it. Then adds an L2 FIB entry (forward) to the bridge \
45 | | ... | domain.
46 | | ...
47 | | [Teardown] | Honeycomb removes L2 FIB entry
48 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_oper['phys-address']}
49 | | ...
50 | | Given Interface state from Honeycomb should be
51 | | ... | ${node} | ${interface} | down
52 | | When Honeycomb configures interface state
53 | | ... | ${node} | ${interface} | up
54 | | Then Interface state from Honeycomb should be
55 | | ... | ${node} | ${interface} | up
56 | | When Honeycomb creates first l2 bridge domain
57 | | ... | ${node} | ${bd_name} | ${bd_settings}
58 | | Then Bridge domain Operational Data From Honeycomb Should Be
59 | | ... | ${node} | ${bd_name} | ${bd_settings}
60 | | Given Bridge domain Operational Interface Assignment should be empty
61 | | ... | ${node} | ${interface}
62 | | When Honeycomb adds interface to bridge domain
63 | | ... | ${node} | ${interface} | ${bd_name} | ${if_bd_settings}
64 | | Then Bridge domain Operational Interface Assignment should be
65 | | ... | ${node} | ${interface} | ${if_bd_settings}
66 | | Given L2 FIB Table from Honeycomb should be empty
67 | | ... | ${node} | ${bd_name}
68 | | And L2 FIB Table from VAT should be empty
69 | | ... | ${node} | ${bd_index}
70 | | When Honeycomb adds L2 FIB entry to bridge domain
71 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_cfg}
72 | | Then L2 FIB Entry from Honeycomb should be
73 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_oper}
74 | | And L2 FIB entry from VAT should be
75 | | ... | ${node} | ${bd_index} | ${l2_fib_forward_vat}
76
77 | TC02: Honeycomb adds L2 FIB entry (static, forward)
78 | | [Documentation] | Honeycomb adds an L2 FIB entry (static, forward) to the \
79 | | ... | bridge domain.
80 | | ...
81 | | [Teardown] | Honeycomb removes L2 FIB entry
82 | | ... | ${node} | ${bd_name} | ${l2_fib_static_forward_oper['phys-address']}
83 | | ...
84 | | Given Bridge domain Operational Interface Assignment should be
85 | | ... | ${node} | ${interface} | ${if_bd_settings}
86 | | And L2 FIB Table from Honeycomb should be empty
87 | | ... | ${node} | ${bd_name}
88 | | And L2 FIB Table from VAT should be empty
89 | | ... | ${node} | ${bd_index}
90 | | When Honeycomb adds L2 FIB entry to bridge domain
91 | | ... | ${node} | ${bd_name} | ${l2_fib_static_forward_cfg}
92 | | Then L2 FIB Entry from Honeycomb should be
93 | | ... | ${node} | ${bd_name} | ${l2_fib_static_forward_oper}
94 | | And L2 FIB entry from VAT should be
95 | | ... | ${node} | ${bd_index} | ${l2_fib_static_forward_vat}
96
97 | TC03: Honeycomb adds L2 FIB entry (static, filter)
98 | | [Documentation] | Honeycomb adds an L2 FIB entry (static, filter) to the \
99 | | ... | bridge domain.
100 | | ...
101 | | [Teardown] | Honeycomb removes L2 FIB entry
102 | | ... | ${node} | ${bd_name} | ${l2_fib_filter_oper['phys-address']}
103 | | ...
104 | | Given Bridge domain Operational Interface Assignment should be
105 | | ... | ${node} | ${interface} | ${if_bd_settings}
106 | | And L2 FIB Table from Honeycomb should be empty
107 | | ... | ${node} | ${bd_name}
108 | | And L2 FIB Table from VAT should be empty
109 | | ... | ${node} | ${bd_index}
110 | | When Honeycomb adds L2 FIB entry to bridge domain
111 | | ... | ${node} | ${bd_name} | ${l2_fib_filter_cfg}
112 | | Then L2 FIB Entry from Honeycomb should be
113 | | ... | ${node} | ${bd_name} | ${l2_fib_filter_oper}
114 | | And L2 FIB entry from VAT should be
115 | | ... | ${node} | ${bd_index} | ${l2_fib_filter_vat}
116
117 | TC04: Honeycomb adds and removes L2 FIB entry (forward)
118 | | [Documentation] | Honeycomb adds an L2 FIB entry (forward) to the bridge \
119 | | ... | domain and then Honeycomb removes it from the bridge domain.
120 | | ...
121 | | [Teardown] | Honeycomb removes L2 FIB entry
122 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_oper['phys-address']}
123 | | ...
124 | | Given Bridge domain Operational Interface Assignment should be
125 | | ... | ${node} | ${interface} | ${if_bd_settings}
126 | | And L2 FIB Table from Honeycomb should be empty
127 | | ... | ${node} | ${bd_name}
128 | | And L2 FIB Table from VAT should be empty
129 | | ... | ${node} | ${bd_index}
130 | | When Honeycomb adds L2 FIB entry to bridge domain
131 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_cfg}
132 | | Then L2 FIB Entry from Honeycomb should be
133 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_oper}
134 | | And L2 FIB entry from VAT should be
135 | | ... | ${node} | ${bd_index} | ${l2_fib_forward_vat}
136 | | When Honeycomb removes L2 FIB entry
137 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_oper['phys-address']}
138 | | Then L2 FIB Table from Honeycomb should be empty
139 | | ... | ${node} | ${bd_name}
140 | | And L2 FIB Table from VAT should be empty
141 | | ... | ${node} | ${bd_index}
142
143 | TC05: Honeycomb adds more than one L2 FIB entry
144 | | [Documentation] | Honeycomb adds three L2 FIB entries to the bridge domain.
145 | | ...
146 | | [Teardown] | Honeycomb removes all L2 FIB entries
147 | | ... | ${node} | ${bd_name}
148 | | ...
149 | | Given Bridge domain Operational Interface Assignment should be
150 | | ... | ${node} | ${interface} | ${if_bd_settings}
151 | | And L2 FIB Table from Honeycomb should be empty
152 | | ... | ${node} | ${bd_name}
153 | | And L2 FIB Table from VAT should be empty
154 | | ... | ${node} | ${bd_index}
155 | | When Honeycomb adds L2 FIB entry to bridge domain
156 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_cfg}
157 | | And Honeycomb adds L2 FIB entry to bridge domain
158 | | ... | ${node} | ${bd_name} | ${l2_fib_static_forward_cfg}
159 | | And Honeycomb adds L2 FIB entry to bridge domain
160 | | ... | ${node} | ${bd_name} | ${l2_fib_filter_cfg}
161 | | Then L2 FIB Entry from Honeycomb should be
162 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_oper}
163 | | And L2 FIB Entry from Honeycomb should be
164 | | ... | ${node} | ${bd_name} | ${l2_fib_static_forward_oper}
165 | | And L2 FIB Entry from Honeycomb should be
166 | | ... | ${node} | ${bd_name} | ${l2_fib_filter_oper}
167 | | And L2 FIB entry from VAT should be
168 | | ... | ${node} | ${bd_index} | ${l2_fib_forward_vat}
169 | | And L2 FIB entry from VAT should be
170 | | ... | ${node} | ${bd_index} | ${l2_fib_static_forward_vat}
171 | | And L2 FIB entry from VAT should be
172 | | ... | ${node} | ${bd_index} | ${l2_fib_filter_vat}
173
174 | TC06: Honeycomb fails to set wrong L2 FIB entry
175 | | [Documentation] | Honeycomb tries to add an L2 FIB entry with wrong \
176 | | ... | parameters to the bridge domain. It must fail.
177 | | ...
178 | | [Teardown] | Honeycomb removes all L2 FIB entries
179 | | ... | ${node} | ${bd_name}
180 | | ...
181 | | Given Bridge domain Operational Interface Assignment should be
182 | | ... | ${node} | ${interface} | ${if_bd_settings}
183 | | And L2 FIB Table from Honeycomb should be empty
184 | | ... | ${node} | ${bd_name}
185 | | And L2 FIB Table from VAT should be empty
186 | | ... | ${node} | ${bd_index}
187 | | When Honeycomb fails to add wrong L2 FIB entry
188 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_cfg_wrong_mac}
189 | | Then L2 FIB Table from Honeycomb should be empty
190 | | ... | ${node} | ${bd_name}
191 | | And L2 FIB Table from VAT should be empty
192 | | ... | ${node} | ${bd_index}
193 | | When Honeycomb fails to add wrong L2 FIB entry
194 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_cfg_wrong_if}
195 | | Then L2 FIB Table from Honeycomb should be empty
196 | | ... | ${node} | ${bd_name}
197 | | And L2 FIB Table from VAT should be empty
198 | | ... | ${node} | ${bd_index}
199 | | When Honeycomb fails to add wrong L2 FIB entry
200 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_cfg_wrong_action}
201 | | Then L2 FIB Table from Honeycomb should be empty
202 | | ... | ${node} | ${bd_name}
203 | | And L2 FIB Table from VAT should be empty
204 | | ... | ${node} | ${bd_index}
205
206 | TC07: Honeycomb fails to modify existing L2 FIB entry
207 | | [Documentation] | Honeycomb tries to modify an existing L2 FIB entry. It \
208 | | ... | must fail.
209 | | ...
210 | | [Teardown] | Honeycomb removes all L2 FIB entries
211 | | ... | ${node} | ${bd_name}
212 | | ...
213 | | Given Bridge domain Operational Interface Assignment should be
214 | | ... | ${node} | ${interface} | ${if_bd_settings}
215 | | And L2 FIB Table from Honeycomb should be empty
216 | | ... | ${node} | ${bd_name}
217 | | And L2 FIB Table from VAT should be empty
218 | | ... | ${node} | ${bd_index}
219 | | When Honeycomb adds L2 FIB entry to bridge domain
220 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_cfg}
221 | | Then L2 FIB Entry from Honeycomb should be
222 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_oper}
223 | | When Honeycomb fails to modify L2 FIB entry
224 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_oper['phys-address']}
225 | | ... | outgoing-interface
226 | | ... | ${l2_fib_forward_modified_cfg['outgoing-interface']}
227 | | Then L2 FIB Entry from Honeycomb should be
228 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_oper}
229 | | And L2 FIB entry from VAT should be
230 | | ... | ${node} | ${bd_index} | ${l2_fib_forward_vat}
231
232 *** Keywords ***
233 | Set test interface down
234 | | [Documentation] | Set the interface used in tests down.
235 | | ...
236 | | Honeycomb configures interface state
237 | | ... | ${node} | ${interface} | down