b2e4aec725b976080a17afdb251c68ac7f4b9723
[csit.git] / tests / vpp / 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/shared/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 | Set Up Honeycomb Functional Test Suite | ${node}
26 | ...
27 | Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node}
28 | ...
29 | Force Tags | HC_FUNC
30
31 *** Variables ***
32 # Interface to run tests on.
33 | ${interface}= | ${node['interfaces']['port1']['name']}
34 | ${interface2}= | ${node['interfaces']['port3']['name']}
35
36 *** Test Cases ***
37 | TC01: Honeycomb adds L2 FIB entry (forward)
38 | | [Documentation] | Honeycomb creates a bridge domain and assignes an \
39 | | ... | interface to it. Then adds an L2 FIB entry (forward) to the bridge \
40 | | ... | domain.
41 | | ...
42 | | [Teardown] | Honeycomb removes L2 FIB entry
43 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_oper['phys-address']}
44 | | ...
45 | | Given Interface state from Honeycomb should be
46 | | ... | ${node} | ${interface} | down
47 | | When Honeycomb configures interface state
48 | | ... | ${node} | ${interface} | up
49 | | Then Interface state from Honeycomb should be
50 | | ... | ${node} | ${interface} | up
51 | | When Honeycomb creates first l2 bridge domain
52 | | ... | ${node} | ${bd_name} | ${bd_settings}
53 | | Then Bridge domain Operational Data From Honeycomb Should Be
54 | | ... | ${node} | ${bd_name} | ${bd_settings}
55 | | Given Bridge domain Operational Interface Assignment should be empty
56 | | ... | ${node} | ${interface}
57 | | When Honeycomb adds interface to bridge domain
58 | | ... | ${node} | ${interface} | ${bd_name} | ${if_bd_settings}
59 | | Then Bridge domain Operational Interface Assignment should be
60 | | ... | ${node} | ${interface} | ${if_bd_settings}
61 | | Given L2 FIB Table from Honeycomb should be empty
62 | | ... | ${node} | ${bd_name}
63 | | And L2 FIB Table from VAT should be empty
64 | | ... | ${node} | ${bd_index}
65 | | When Honeycomb adds L2 FIB entry to bridge domain
66 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_cfg}
67 | | Then L2 FIB Entry from Honeycomb should be
68 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_oper}
69 | | And L2 FIB entry from VAT should be
70 | | ... | ${node} | ${bd_index} | ${l2_fib_forward_vat}
71
72 | TC02: Honeycomb adds L2 FIB entry (static, forward)
73 | | [Documentation] | Honeycomb adds an L2 FIB entry (static, forward) to the \
74 | | ... | bridge domain.
75 | | ...
76 | | [Teardown] | Honeycomb removes L2 FIB entry
77 | | ... | ${node} | ${bd_name} | ${l2_fib_static_forward_oper['phys-address']}
78 | | ...
79 | | Given Bridge domain Operational Interface Assignment should be
80 | | ... | ${node} | ${interface} | ${if_bd_settings}
81 | | And L2 FIB Table from Honeycomb should be empty
82 | | ... | ${node} | ${bd_name}
83 | | And L2 FIB Table from VAT should be empty
84 | | ... | ${node} | ${bd_index}
85 | | When Honeycomb adds L2 FIB entry to bridge domain
86 | | ... | ${node} | ${bd_name} | ${l2_fib_static_forward_cfg}
87 | | Then L2 FIB Entry from Honeycomb should be
88 | | ... | ${node} | ${bd_name} | ${l2_fib_static_forward_oper}
89 | | And L2 FIB entry from VAT should be
90 | | ... | ${node} | ${bd_index} | ${l2_fib_static_forward_vat}
91
92 | TC03: Honeycomb adds L2 FIB entry (static, filter)
93 | | [Documentation] | Honeycomb adds an L2 FIB entry (static, filter) to the \
94 | | ... | bridge domain.
95 | | ...
96 | | [Teardown] | Honeycomb removes L2 FIB entry
97 | | ... | ${node} | ${bd_name} | ${l2_fib_filter_oper['phys-address']}
98 | | ...
99 | | Given Bridge domain Operational Interface Assignment should be
100 | | ... | ${node} | ${interface} | ${if_bd_settings}
101 | | And L2 FIB Table from Honeycomb should be empty
102 | | ... | ${node} | ${bd_name}
103 | | And L2 FIB Table from VAT should be empty
104 | | ... | ${node} | ${bd_index}
105 | | When Honeycomb adds L2 FIB entry to bridge domain
106 | | ... | ${node} | ${bd_name} | ${l2_fib_filter_cfg}
107 | | Then L2 FIB Entry from Honeycomb should be
108 | | ... | ${node} | ${bd_name} | ${l2_fib_filter_oper}
109 | | And L2 FIB entry from VAT should be
110 | | ... | ${node} | ${bd_index} | ${l2_fib_filter_vat}
111
112 | TC04: Honeycomb adds and removes L2 FIB entry (forward)
113 | | [Documentation] | Honeycomb adds an L2 FIB entry (forward) to the bridge \
114 | | ... | domain and then Honeycomb removes it from the bridge domain.
115 | | ...
116 | | [Teardown] | Honeycomb removes L2 FIB entry
117 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_oper['phys-address']}
118 | | ...
119 | | Given Bridge domain Operational Interface Assignment should be
120 | | ... | ${node} | ${interface} | ${if_bd_settings}
121 | | And L2 FIB Table from Honeycomb should be empty
122 | | ... | ${node} | ${bd_name}
123 | | And L2 FIB Table from VAT should be empty
124 | | ... | ${node} | ${bd_index}
125 | | When Honeycomb adds L2 FIB entry to bridge domain
126 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_cfg}
127 | | Then L2 FIB Entry from Honeycomb should be
128 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_oper}
129 | | And L2 FIB entry from VAT should be
130 | | ... | ${node} | ${bd_index} | ${l2_fib_forward_vat}
131 | | When Honeycomb removes L2 FIB entry
132 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_oper['phys-address']}
133 | | Then L2 FIB Table from Honeycomb should be empty
134 | | ... | ${node} | ${bd_name}
135 | | And L2 FIB Table from VAT should be empty
136 | | ... | ${node} | ${bd_index}
137
138 | TC05: Honeycomb adds more than one L2 FIB entry
139 | | [Documentation] | Honeycomb adds three L2 FIB entries to the bridge domain.
140 | | ...
141 | | [Teardown] | Honeycomb removes all L2 FIB entries
142 | | ... | ${node} | ${bd_name}
143 | | ...
144 | | Given Bridge domain Operational Interface Assignment should be
145 | | ... | ${node} | ${interface} | ${if_bd_settings}
146 | | And L2 FIB Table from Honeycomb should be empty
147 | | ... | ${node} | ${bd_name}
148 | | And L2 FIB Table from VAT should be empty
149 | | ... | ${node} | ${bd_index}
150 | | When Honeycomb adds L2 FIB entry to bridge domain
151 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_cfg}
152 | | And Honeycomb adds L2 FIB entry to bridge domain
153 | | ... | ${node} | ${bd_name} | ${l2_fib_static_forward_cfg}
154 | | And Honeycomb adds L2 FIB entry to bridge domain
155 | | ... | ${node} | ${bd_name} | ${l2_fib_filter_cfg}
156 | | Then L2 FIB Entry from Honeycomb should be
157 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_oper}
158 | | And L2 FIB Entry from Honeycomb should be
159 | | ... | ${node} | ${bd_name} | ${l2_fib_static_forward_oper}
160 | | And L2 FIB Entry from Honeycomb should be
161 | | ... | ${node} | ${bd_name} | ${l2_fib_filter_oper}
162 | | And L2 FIB entry from VAT should be
163 | | ... | ${node} | ${bd_index} | ${l2_fib_forward_vat}
164 | | And L2 FIB entry from VAT should be
165 | | ... | ${node} | ${bd_index} | ${l2_fib_static_forward_vat}
166 | | And L2 FIB entry from VAT should be
167 | | ... | ${node} | ${bd_index} | ${l2_fib_filter_vat}
168
169 | TC06: Honeycomb fails to set wrong L2 FIB entry
170 | | [Documentation] | Honeycomb tries to add an L2 FIB entry with wrong \
171 | | ... | parameters to the bridge domain. It must fail.
172 | | ...
173 | | [Teardown] | Honeycomb removes all L2 FIB entries
174 | | ... | ${node} | ${bd_name}
175 | | ...
176 | | Given Bridge domain Operational Interface Assignment should be
177 | | ... | ${node} | ${interface} | ${if_bd_settings}
178 | | And L2 FIB Table from Honeycomb should be empty
179 | | ... | ${node} | ${bd_name}
180 | | And L2 FIB Table from VAT should be empty
181 | | ... | ${node} | ${bd_index}
182 | | When Honeycomb fails to add wrong L2 FIB entry
183 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_cfg_wrong_mac}
184 | | Then L2 FIB Table from Honeycomb should be empty
185 | | ... | ${node} | ${bd_name}
186 | | And L2 FIB Table from VAT should be empty
187 | | ... | ${node} | ${bd_index}
188 | | When Honeycomb fails to add wrong L2 FIB entry
189 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_cfg_wrong_if}
190 | | Then L2 FIB Table from Honeycomb should be empty
191 | | ... | ${node} | ${bd_name}
192 | | And L2 FIB Table from VAT should be empty
193 | | ... | ${node} | ${bd_index}
194 | | When Honeycomb fails to add wrong L2 FIB entry
195 | | ... | ${node} | ${bd_name} | ${l2_fib_forward_cfg_wrong_action}
196 | | Then L2 FIB Table from Honeycomb should be empty
197 | | ... | ${node} | ${bd_name}
198 | | And L2 FIB Table from VAT should be empty
199 | | ... | ${node} | ${bd_index}
200
201 | TC07: Honeycomb fails to modify existing L2 FIB entry
202 | | [Documentation] | Honeycomb tries to modify an existing L2 FIB entry. It \
203 | | ... | must fail.
204 | | ...
205 # HC2VPP-228 - operation does not revert on error
206 | | [Tags] | EXPECTED_FAILING
207 | | [Teardown] | Honeycomb removes all L2 FIB entries
208 | | ... | ${node} | ${bd_name}
209 | | ...
210 | | Given Bridge domain Operational Interface Assignment 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 configures 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.