CSIT-611: HC Test: Lisp suite updates + LispGPE
[csit.git] / tests / vpp / func / honeycomb / mgmt-cfg-lisp-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 *** Variables***
15 | ${ip_address}= | 192.168.0.4
16 | @{ip_addresses}= | 192.168.0.4 | 192.168.0.5 | 192.168.0.6 | 192.168.0.7
17 | ${state}= | enabled
18 | ${interface}= | ${node['interfaces']['port1']['name']}
19 | ${bd_name}= | bd_lisp
20 | ${bd2_name}= | bd2_lisp
21 | &{bd_settings}= | flood=${True} | forward=${True} | learn=${True}
22 | ... | unknown-unicast-flood=${True} | arp-termination=${True}
23
24 *** Settings ***
25 | Library | resources.libraries.python.Trace.Trace
26 | Resource | resources/libraries/robot/shared/default.robot
27 | Resource | resources/libraries/robot/shared/testing_path.robot
28 | Resource | resources/libraries/robot/shared/traffic.robot
29 | Resource | resources/libraries/robot/honeycomb/honeycomb.robot
30 | Resource | resources/libraries/robot/honeycomb/interfaces.robot
31 | Resource | resources/libraries/robot/honeycomb/lisp.robot
32 | Resource | resources/libraries/robot/honeycomb/bridge_domain.robot
33 | Variables | resources/test_data/honeycomb/lisp/lisp.py
34 | ...
35 | Documentation | *Honeycomb Lisp test suite.*
36 | ...
37 | Suite Setup | Set Up Honeycomb Functional Test Suite | ${node}
38 | ...
39 | Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node}
40 | ...
41 | Force Tags | HC_FUNC
42
43 *** Test Cases ***
44 | TC01: Honeycomb enables LISP feature
45 | | [Documentation] | Check if Honeycomb can enable the LISP feature.
46 | | ...
47 | | Given LISP Should Not Be Configured | ${node}
48 | | When Honeycomb enables LISP | ${node}
49 | | Then LISP state from Honeycomb should be | ${node} | ${state}
50 | | And LISP state from VAT should be | ${node} | ${state}
51
52 | TC02: Honeycomb adds locator set and locator
53 | | [Documentation] | Check if Honeycomb can configure a locator set.
54 | | ...
55 | | Given LISP state from Honeycomb should be | ${node} | ${state}
56 | | When Honeycomb adds locator set | ${node} | ${interface} | ${locator_set}
57 | | Then Locator Set From Honeycomb Should Be
58 | | ... | ${node} | ${interface} | ${locator_set}
59
60 | TC03: Honeycomb configures LISP - remote mapping - Bridge Domain
61 | | [Documentation] | Check if Honeycomb can configure a remote LISP mapping\
62 | | ... | with a bridge domain.
63 | | ...
64 | | Given LISP state from Honeycomb should be | ${node} | ${state}
65 | | And Honeycomb creates first l2 bridge domain
66 | | ... | ${node} | ${bd_name} | ${bd_settings}
67 | | When Honeycomb adds LISP mapping | ${node} | ${lisp_settings_remote_bd}
68 | | Then LISP mapping from Honeycomb should be
69 | | ... | ${node} | ${remote_bd_subtable}
70 | | And LISP mapping from VAT should be
71 | | ... | ${node} | ${vat_remote_bd}
72
73 | TC04: Honeycomb can remove LISP mapping
74 | | [Documentation] | Check if Honeycomb can remove a configured LISP mapping.
75 | | ...
76 | | Given LISP mapping from Honeycomb should be
77 | | ... | ${node} | ${remote_bd_subtable}
78 | | And LISP mapping from VAT should be
79 | | ... | ${node} | ${vat_remote_bd}
80 | | When Honeycomb removes all LISP mappings | ${node}
81 | | Then LISP mappings from Honeycomb should not exist
82 | | ... | ${node}
83 | | And LISP mappings from VAT should not exist
84 | | ... | ${node}
85
86 | TC05: Honeycomb configures LISP - remote mapping - VRF
87 | | [Documentation] | Check if Honeycomb can configure a remote LISP mapping\
88 | | ... | with VRF.
89 | | ...
90 | | [Teardown] | Honeycomb removes all LISP mappings | ${node}
91 | | ...
92 | | Given LISP mappings from Honeycomb should not exist
93 | | ... | ${node}
94 | | And LISP mappings from VAT should not exist
95 | | ... | ${node}
96 | | When Honeycomb adds LISP mapping | ${node} | ${lisp_settings_remote_vrf}
97 | | Then LISP mapping from Honeycomb should be
98 | | ... | ${node} | ${remote_vrf_subtable}
99 | | And LISP mapping from VAT should be | ${node} | ${vat_remote_vrf}
100
101 | TC06: Honeycomb configures LISP - local mapping - Bridge Domain
102 | | [Documentation] | Check if Honeycomb can configure a local LISP mapping\
103 | | ... | with a bridge domain.
104 | | ...
105 | | [Teardown] | Honeycomb removes all LISP mappings | ${node}
106 | | ...
107 | | Given Locator Set From Honeycomb Should Be
108 | | ... | ${node} | ${interface} | ${locator_set}
109 | | And LISP mappings from Honeycomb should not exist
110 | | ... | ${node}
111 | | And LISP mappings from VAT should not exist
112 | | ... | ${node}
113 | | And Honeycomb creates first l2 bridge domain
114 | | ... | ${node} | ${bd2_name} | ${bd_settings}
115 | | When Honeycomb adds LISP mapping | ${node} | ${lisp_settings_local_bd}
116 | | Then LISP mapping from Honeycomb should be | ${node} | ${local_bd_subtable}
117 | | And LISP mapping from VAT should be | ${node} | ${vat_local_bd}
118
119 | TC07: Honeycomb configures LISP - local mapping - VRF
120 | | [Documentation] | Check if Honeycomb can configure a local LISP mapping\
121 | | ... | with VRF.
122 | | ...
123 | | [Teardown] | Honeycomb removes all LISP mappings | ${node}
124 | | ...
125 | | Given Locator Set From Honeycomb Should Be
126 | | ... | ${node} | ${interface} | ${locator_set}
127 | | And LISP mappings from Honeycomb should not exist
128 | | ... | ${node}
129 | | And LISP mappings from VAT should not exist
130 | | ... | ${node}
131 | | When Honeycomb adds LISP mapping | ${node} | ${lisp_settings_local_vrf}
132 | | Then LISP mapping from Honeycomb should be | ${node} | ${local_vrf_subtable}
133 | | And LISP mapping from VAT should be | ${node} | ${vat_local_vrf}
134
135 | TC08: Honeycomb configures LISP mapping with adjacency
136 | | [Documentation] | Check if Honeycomb can configure local and remote LISP\
137 | | ... | mappings with VRF, and configure adjacency.
138 | | ...
139 | | [Teardown] | Honeycomb removes all LISP mappings | ${node}
140 | | ...
141 | | Given Locator Set From Honeycomb Should Be
142 | | ... | ${node} | ${interface} | ${locator_set}
143 | | And LISP mappings from Honeycomb should not exist
144 | | ... | ${node}
145 | | And LISP mappings from VAT should not exist
146 | | ... | ${node}
147 | | And Honeycomb adds LISP mapping | ${node} | ${lisp_settings_both_vrf}
148 | | When Honeycomb adds LISP adjacency | ${node} | ${7} | remote_map_vrf
149 | | ... | adj01 | ${vrf_adjacency}
150 | | Then LISP mapping from Honeycomb should be
151 | | ... | ${node} | ${adj_subtable}
152
153 | TC09: Honeycomb configures LISP Map Resolver
154 | | [Documentation] | Check if Honeycomb can configure a LISP Map Resolver.
155 | | ...
156 | | Given LISP state from Honeycomb should be | ${node} | ${state}
157 | | And LISP state from VAT should be | ${node} | ${state}
158 | | When Honeycomb adds LISP Map Resolver | ${node} | ${ip_address}
159 | | Then Map Resolver from Honeycomb should be | ${node} | ${ip_address}
160 | | And Map Resolver from VAT should be | ${node} | ${ip_address}
161
162 | TC10: Honeycomb configures LISP Map Server
163 | | [Documentation] | Check if Honeycomb can configure a LISP Map Server.
164 | | ...
165 | | Given LISP state from Honeycomb should be | ${node} | ${state}
166 | | And LISP state from VAT should be | ${node} | ${state}
167 | | When Honeycomb adds LISP Map Server | ${node} | @{ip_addresses}
168 | | Then Map Server from Honeycomb should be | ${node} | @{ip_addresses}
169 | | And Map Server from VAT should be | ${node} | @{ip_addresses}
170
171 | TC11: Honeycomb configures LISP PETR configuration
172 | | [Documentation] | Check if Honeycomb can configure LISP
173 | | ... | PETR configuration.
174 | | ...
175 | | Given LISP state from Honeycomb should be | ${node} | ${state}
176 | | And LISP state from VAT should be | ${node} | ${state}
177 | | When Honeycomb enables LISP PETR feature | ${node} | ${ip_address}
178 | | Then PETR configuration from Honeycomb should be | ${node} | ${ip_address}
179 | | And PETR configuration from VAT should be | ${node} | enabled
180
181 | TC12: Honeycomb configures LISP RLOC Probing
182 | | [Documentation] | Check if Honeycomb can configure LISP RLOC Probing.
183 | | ...
184 | | Given LISP state from Honeycomb should be | ${node} | ${state}
185 | | And LISP state from VAT should be | ${node} | ${state}
186 | | When Honeycomb enables LISP RLOC feature | ${node}
187 | | Then RLOC Probing from Honeycomb should be | ${node} | ${True}
188 | | And RLOC Probing from VAT should be | ${node} | enabled
189
190 | TC13: Honeycomb configures LISP Map Register
191 | | [Documentation] | Check if Honeycomb can configure a LISP Map Register.
192 | | ...
193 | | Given LISP state from Honeycomb should be | ${node} | ${state}
194 | | And LISP state from VAT should be | ${node} | ${state}
195 | | When Honeycomb adds LISP Map Register | ${node} | ${True}
196 | | Then Map Register from Honeycomb should be | ${node} | ${True}
197 | | And Map Register from VAT should be | ${node} | enabled
198
199 | TC14: Honeycomb enabled LISP PITR feature
200 | | [Documentation] | Check if Honeycomb can configure the LISP PITR feature.
201 | | ...
202 | | Given Locator Set From Honeycomb Should Be
203 | | ... | ${node} | ${interface} | ${locator_set}
204 | | When Honeycomb enables LISP PITR feature | ${node} | ${locator_set}
205 | | Then PITR config from Honeycomb should be | ${node} | ${locator_set}
206 | | And PITR config from VAT should be | ${node} | ${locator_set}
207
208 | TC15: Honeycomb can remove configuration of LISP features
209 | | [Documentation] | Check if Honeycomb can disable all LISP features.
210 | | ...
211 | | Given Map Resolver from Honeycomb should be | ${node} | ${ip_address}
212 | | And PITR config from Honeycomb should be | ${node} | ${locator_set}
213 | | And Map Register from Honeycomb should be | ${node} | ${True}
214 | | When Honeycomb disables all LISP features | ${node}
215 | | Then LISP Should Not Be Configured | ${node}
216
217 | TC16: Honeycomb can configure LISP for traffic test - IPv4
218 | | [Documentation]
219 | | ... | [Top] TG-DUT1-TG.
220 | | ... | [Enc] Eth-IPv4-LISP.
221 | | ... | [Cfg] On DUT1 configure IPv4 LISP static adjacencies with TG.
222 | | ... | [Ver] Make TG send ICMPv4 Echo Req between its interfaces through\
223 | | ... | DUT1 and verify LISP encapsulation of received packet.
224 | | ... | [Ref] RFC6830.
225 | | ...
226 | | [Teardown] | LISP Functional Traffic Test Teardown
227 | | Given Configure path in 2-node circular topology
228 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
229 | | And Honeycomb configures interface state
230 | | ... | ${dut_node} | ${dut_to_tg_if1} | up
231 | | And Honeycomb configures interface state
232 | | ... | ${dut_node} | ${dut_to_tg_if2} | up
233 | | And Honeycomb sets interface IPv4 address with prefix | ${dut_node}
234 | | ... | ${dut_to_tg_if1} | ${dut_to_tg_if1_ip4} | ${prefix_len4}
235 | | And Honeycomb sets interface IPv4 address with prefix | ${dut_node}
236 | | ... | ${dut_to_tg_if2} | ${dut_to_tg_if2_ip4} | ${prefix_len4}
237 | | And Honeycomb adds interface IPv4 neighbor | ${dut_node} | ${dut_to_tg_if1}
238 | | ... | ${src_ip4} | ${tg_to_dut_if1_mac}
239 | | And Honeycomb adds interface IPv4 neighbor | ${dut_node} | ${dut_to_tg_if2}
240 | | ... | ${tg_to_dut_if2_ip4} | ${tg_to_dut_if2_mac}
241 | | When Honeycomb enables LISP | ${node}
242 | | And Honeycomb adds locator set | ${node} | ${dut_to_tg_if2} | ${locator_set}
243 | | And Honeycomb adds LISP mapping | ${node} | ${lisp_traffic_ip4}
244 | | Then send packet and verify LISP encap
245 | | ... | ${tg_node} | ${src_ip4} | ${dst_ip4}
246 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac}
247 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if2_mac} | ${tg_to_dut_if2_mac}
248 | | ... | ${src_rloc4} | ${dst_rloc4}
249
250 | TC17: Honeycomb can configure LISP for traffic test - IPv6
251 | | [Documentation]
252 | | ... | [Top] TG-DUT1-TG.
253 | | ... | [Enc] Eth-IPv6-LISP.
254 | | ... | [Cfg] On DUT1 configure IPv6 LISP static adjacencies with TG.
255 | | ... | [Ver] Make TG send ICMPv6 Echo Req between its interfaces through\
256 | | ... | DUT1 and verify LISP encapsulation of received packet.
257 | | ... | [Ref] RFC6830.
258 | | ...
259 | | [Teardown] | LISP Functional Traffic Test Teardown
260 | | Given Configure path in 2-node circular topology
261 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
262 | | And Honeycomb configures interface state
263 | | ... | ${dut_node} | ${dut_to_tg_if1} | up
264 | | And Honeycomb configures interface state
265 | | ... | ${dut_node} | ${dut_to_tg_if2} | up
266 | | And Honeycomb sets interface IPv6 address | ${dut_node}
267 | | ... | ${dut_to_tg_if1} | ${dut_to_tg_if1_ip6} | ${prefix_len6}
268 | | And Honeycomb sets interface IPv6 address | ${dut_node}
269 | | ... | ${dut_to_tg_if2} | ${dut_to_tg_if2_ip6} | ${prefix_len6}
270 | | And Honeycomb adds interface IPv6 neighbor | ${dut_node} | ${dut_to_tg_if1}
271 | | ... | ${src_ip6} | ${tg_to_dut_if1_mac}
272 | | And Honeycomb adds interface IPv6 neighbor | ${dut_node} | ${dut_to_tg_if2}
273 | | ... | ${tg_to_dut_if2_ip6} | ${tg_to_dut_if2_mac}
274 | | When Honeycomb enables LISP | ${node}
275 | | And Honeycomb adds locator set | ${node} | ${dut_to_tg_if2} | ${locator_set}
276 | | And Honeycomb adds LISP mapping | ${node} | ${lisp_traffic_ip6}
277 | | Then send packet and verify LISP encap
278 | | ... | ${tg_node} | ${src_ip6} | ${dst_ip6}
279 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac}
280 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if2_mac} | ${tg_to_dut_if2_mac}
281 | | ... | ${src_rloc6} | ${dst_rloc6}
282
283 | TC18: Honeycomb configures LISP Map Request Mode
284 | | [Documentation] | Check if Honeycomb can configure LISP Map Request mode.
285 | | ... | Note: Map Request Mode cannot be removed once configured.
286 | | ...
287 | | [Teardown] | Honeycomb disables LISP | ${node}
288 | | ...
289 | | Given Honeycomb Enables LISP | ${node}
290 | | When Honeycomb sets LISP Map Request Mode | ${node} | ${True}
291 | | Then Map Request Mode from Honeycomb should be
292 | | ... | ${node} | source-destination
293 | | And Map Request Mode from VAT should be | ${node} | src-dst