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

©2016 FD.io a Linux Foundation Collaborative Project. All Rights Reserved.
Linux Foundation is a registered trademark of The Linux Foundation. Linux is a registered trademark of Linus Torvalds.
Please see our privacy policy and terms of use.