CSIT-611: HC Test: Lisp suite updates + LispGPE
[csit.git] / tests / vpp / func / honeycomb / mgmt-cfg-lispgpe-apihc-apivat-func.robot
1 # Copyright (c) 2017 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 | ${interface}= | ${node['interfaces']['port1']['name']}
16
17 *** Settings ***
18 | Library | resources.libraries.python.Trace.Trace
19 | Resource | resources/libraries/robot/shared/default.robot
20 | Resource | resources/libraries/robot/shared/testing_path.robot
21 | Resource | resources/libraries/robot/shared/traffic.robot
22 | Resource | resources/libraries/robot/honeycomb/honeycomb.robot
23 | Resource | resources/libraries/robot/honeycomb/interfaces.robot
24 | Resource | resources/libraries/robot/honeycomb/lisp_gpe.robot
25 | Variables | resources/test_data/honeycomb/lisp/lisp_gpe.py
26 | ...
27 | Documentation | *Honeycomb LISP GPE test suite.*
28 | ...
29 | Suite Setup | Set Up Honeycomb Functional Test Suite | ${node}
30 | ...
31 | Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node}
32 | ...
33 | Force Tags | HC_FUNC
34
35 *** Test Cases ***
36 | TC01: Honeycomb enables LISP GPE feature
37 | | [Documentation] | Check if Honeycomb can enable the LISP GPE feature.
38 | | ...
39 | | [Tags] | HC_FUNC | test
40 | | Given LISP GPE Should Not Be Configured | ${node}
41 | | When Honeycomb enables LISP GPE | ${node}
42 | | Then LISP GPE state from Honeycomb should be | ${node} | enabled
43 | | And LISP GPE state from VAT should be | ${node} | enabled
44
45 | TC02: Honeycomb disable LISP GPE feature
46 | | [Documentation] | Check if Honeycomb can enable the LISP GPE feature.
47 | | ...
48 | | [Tags] | HC_FUNC
49 | | [Teardown] | Honeycomb enables LISP GPE | ${node}
50 | | Given LISP GPE state from Honeycomb should be | ${node} | enabled
51 | | And LISP GPE state from VAT should be | ${node} | enabled
52 | | When Honeycomb disables LISP GPE | ${node}
53 | | Then LISP GPE state from Honeycomb should be | ${node} | disabled
54 | | And LISP GPE state from VAT should be | ${node} | disabled
55
56 | TC03: Honeycomb configures LISP GPE mapping - negative, IPv4
57 | | [Documentation] | Check if Honeycomb can configure a LISP mapping\
58 | | ... | with VRF.
59 | | ...
60 | | [Tags] | HC_FUNC
61 | | Given LISP GPE mappings from Honeycomb should not exist
62 | | ... | ${node}
63 | | When Honeycomb adds first LISP GPE mapping
64 | | ... | ${node} | ${negative_mapping_ip4}
65 | | Then LISP GPE mapping from Honeycomb should be
66 | | ... | ${node} | ${negative_mapping_ip4}
67
68 | TC04: Honeycomb can remove LISP GPE mapping
69 | | [Documentation] | Check if Honeycomb can remove a configured LISP GPE\
70 | | ... | mapping.
71 | | ...
72 | | [Tags] | HC_FUNC
73 | | Given LISP GPE mapping from Honeycomb should be
74 | | ... | ${node} | ${negative_mapping_ip4}
75 | | When Honeycomb removes LISP GPE mapping
76 | | ... | ${node} | ${negative_mapping_ip4['id']}
77 | | Then LISP GPE mappings from Honeycomb should not exist
78 | | ... | ${node}
79
80 | TC05: Honeycomb configures LISP GPE mapping - positive, IPv4
81 | | [Documentation] | Check if Honeycomb can configure a LISP mapping\
82 | | ... | with VRF.
83 | | ...
84 # | | [Tags] | HC_FUNC
85 # Disabled due to VPP-915 - configuring positive entry crashes VPP
86 | | [Teardown] | Honeycomb removes LISP GPE mapping
87 | | ... | ${node} | ${positive_mapping_ip4['id']}
88 | | Given LISP GPE mappings from Honeycomb should not exist
89 | | ... | ${node}
90 | | When Honeycomb adds first LISP GPE mapping
91 | | ... | ${node} | ${positive_mapping_ip4}
92 | | Then LISP GPE mapping from Honeycomb should be
93 | | ... | ${node} | ${positive_mapping_ip4}
94
95 | TC06: Honeycomb configures LISP GPE mapping - negative, IPv6
96 | | [Documentation] | Check if Honeycomb can configure a LISP mapping\
97 | | ... | with VRF.
98 | | ...
99 | | [Tags] | HC_FUNC
100 | | [Teardown] | Honeycomb removes LISP GPE mapping
101 | | ... | ${node} | ${negative_mapping_ip6['id']}
102 | | Given LISP GPE mappings from Honeycomb should not exist
103 | | ... | ${node}
104 | | When Honeycomb adds first LISP GPE mapping
105 | | ... | ${node} | ${negative_mapping_ip6}
106 | | Then LISP GPE mapping from Honeycomb should be
107 | | ... | ${node} | ${negative_mapping_ip6}
108
109 | TC07: Honeycomb configures LISP GPE mapping - positive, IPv6
110 | | [Documentation] | Check if Honeycomb can configure a LISP mapping\
111 | | ... | with VRF.
112 | | ...
113 # | | [Tags] | HC_FUNC
114 # Disabled due to VPP-915 - configuring positive entry crashes VPP
115 | | [Teardown] | Honeycomb removes LISP GPE mapping
116 | | ... | ${node} | ${positive_mapping_ip6['id']}
117 | | Given LISP GPE mappings from Honeycomb should not exist
118 | | ... | ${node}
119 | | When Honeycomb adds first LISP GPE mapping
120 | | ... | ${node} | ${positive_mapping_ip6}
121 | | Then LISP GPE mapping from Honeycomb should be
122 | | ... | ${node} | ${positive_mapping_ip6}
123
124 | TC08: Honeycomb can modify existing LISP GPE mappping
125 | | [Documentation] | Check if Honeycomb can modify and existing LISP GPE\
126 | | ... | mapping.
127 | | ...
128 | | [Tags] | HC_FUNC
129 | | [Teardown] | Honeycomb removes LISP GPE mapping
130 | | ... | ${node} | ${negative_mapping_ip4_edit['id']}
131 | | Given LISP GPE mappings from Honeycomb should not exist
132 | | ... | ${node}
133 | | When Honeycomb adds first LISP GPE mapping
134 | | ... | ${node} | ${negative_mapping_ip4}
135 | | Then LISP GPE mapping from Honeycomb should be
136 | | ... | ${node} | ${negative_mapping_ip4}
137 | | When Honeycomb adds first LISP GPE mapping | ${node}
138 | | ... | ${negative_mapping_ip4_edit}
139 | | Then LISP GPE mapping from Honeycomb should be
140 | | ... | ${node} | ${negative_mapping_ip4_edit}
141
142 | TC09: Honeycomb can configure multiple LISP GPE mapppings
143 | | [Documentation] | Check if Honeycomb can configure multiple LISP GPE\
144 | | ... | mappings at the same time.
145 | | ...
146 | | [Tags] | HC_FUNC
147 | | [Teardown] | Run Keywords
148 | | ... | Honeycomb removes LISP GPE mapping
149 | | ... | ${node} | ${negative_mapping_ip4['id']}
150 | | ... | AND | Honeycomb removes LISP GPE mapping
151 | | ... | ${node} | ${negative_mapping_ip4_2['id']}
152 | | Given LISP GPE mappings from Honeycomb should not exist
153 | | ... | ${node}
154 | | When Honeycomb adds first LISP GPE mapping
155 | | ... | ${node} | ${negative_mapping_ip4}
156 | | And Honeycomb adds LISP GPE mapping | ${node} | ${negative_mapping_ip4_2}
157 | | Then LISP GPE mapping from Honeycomb should be
158 | | ... | ${node} | ${negative_mapping_ip4}
159 | | And LISP GPE mapping from Honeycomb should be
160 | | ... | ${node} | ${negative_mapping_ip4_2}
161
162 | TC10: Honeycomb can disable all LISP GPE features
163 | | [Documentation] | Check if Honeycomb can disable all LISP GPE features.
164 | | ...
165 | | [Tags] | HC_FUNC
166 | | Given Honeycomb adds first LISP GPE mapping
167 | | ... | ${node} | ${negative_mapping_ip4}
168 | | When Honeycomb disables all LISP GPE features | ${node}
169 | | Then LISP GPE mappings from Honeycomb should not exist
170 | | ... | ${node}
171 | | And LISP GPE state from Honeycomb should be | ${node} | disabled
172 | | And LISP GPE state from VAT should be | ${node} | disabled
173
174 | TC11: Honeycomb can configure LISP GPE for traffic test - IPv4
175 | | [Documentation]
176 | | ... | [Top] TG-DUT1-TG.
177 | | ... | [Enc] Eth-IPv4-LISPGPE-IPv4-ICMPv4
178 | | ... | [Cfg] Configure IPv4 LISP static adjacencies on DUT1.
179 | | ... | [Ver] Case: ip4-lispgpe-ip4 - phy2lisp
180 | | ... | Make TG send ICMPv4 Echo Req between its interfaces through DUT1\
181 | | ... | LISP GPE tunnel verify LISP encapsulation of received packet.
182 | | ... | [Ref] RFC6830.
183 | | ...
184 | | [Tags] | test
185 | | [Teardown] | LISPGPE functional traffic test teardown
186 | | Given Configure path in 2-node circular topology
187 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
188 | | And Honeycomb configures interface state
189 | | ... | ${dut_node} | ${dut_to_tg_if1} | up
190 | | And Honeycomb configures interface state
191 | | ... | ${dut_node} | ${dut_to_tg_if2} | up
192 | | And Honeycomb sets interface IPv4 address with prefix | ${dut_node}
193 | | ... | ${dut_to_tg_if1} | ${dut_to_tg_if1_ip4} | ${prefix_len4}
194 | | And Honeycomb sets interface IPv4 address with prefix | ${dut_node}
195 | | ... | ${dut_to_tg_if2} | ${dut_to_tg_if2_ip4} | ${prefix_len4}
196 | | And Honeycomb adds interface IPv4 neighbor | ${dut_node} | ${dut_to_tg_if1}
197 | | ... | ${src_ip4} | ${tg_to_dut_if1_mac}
198 | | And Honeycomb adds interface IPv4 neighbor | ${dut_node} | ${dut_to_tg_if2}
199 | | ... | ${tg_to_dut_if2_ip4} | ${tg_to_dut_if2_mac}
200 | | When Honeycomb enables LISP GPE | ${node}
201 | | And Honeycomb adds LISP GPE mapping | ${node} | ${lisp_traffic_ip4}
202 | | Then send packet and verify LISP GPE encap
203 | | ... | ${tg_node} | ${src_ip4} | ${dst_ip4}
204 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac}
205 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if2_mac} | ${tg_to_dut_if2_mac}
206 | | ... | ${src_rloc4} | ${dst_rloc4}
207
208 | TC12: Honeycomb can configure LISP GPE for traffic test - IPv6
209 | | [Documentation]
210 | | ... | [Top] TG-DUT1-TG.
211 | | ... | [Enc] Eth-IPv6-LISPGPE-IPv6-ICMPv6
212 | | ... | [Cfg] Configure IPv6 LISP static adjacencies on DUT1.
213 | | ... | [Ver] Case: ip6-lispgpe-ip6 - phy2lisp
214 | | ... | Make TG send ICMPv6 Echo Req between its interfaces through DUT1\
215 | | ... | LISP GPE tunnel verify LISP encapsulation of received packet.
216 | | ... | [Ref] RFC6830.
217 | | ...
218 | | [Tags] | test
219 | | [Teardown] | LISPGPE functional traffic test teardown
220 | | Given Configure path in 2-node circular topology
221 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
222 | | And Honeycomb configures interface state
223 | | ... | ${dut_node} | ${dut_to_tg_if1} | up
224 | | And Honeycomb configures interface state
225 | | ... | ${dut_node} | ${dut_to_tg_if2} | up
226 | | And Honeycomb sets interface IPv6 address | ${dut_node}
227 | | ... | ${dut_to_tg_if1} | ${dut_to_tg_if1_ip6} | ${prefix_len6}
228 | | And Honeycomb sets interface IPv6 address | ${dut_node}
229 | | ... | ${dut_to_tg_if2} | ${dut_to_tg_if2_ip6} | ${prefix_len6}
230 | | And Honeycomb adds interface IPv6 neighbor | ${dut_node} | ${dut_to_tg_if1}
231 | | ... | ${src_ip6} | ${tg_to_dut_if1_mac}
232 | | And Honeycomb adds interface IPv6 neighbor | ${dut_node} | ${dut_to_tg_if2}
233 | | ... | ${tg_to_dut_if2_ip6} | ${tg_to_dut_if2_mac}
234 | | When Honeycomb enables LISP GPE | ${node}
235 | | And Honeycomb adds LISP GPE mapping | ${node} | ${lisp_traffic_ip6}
236 | | Then send packet and verify LISP GPE encap
237 | | ... | ${tg_node} | ${src_ip6} | ${dst_ip6}
238 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac}
239 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if2_mac} | ${tg_to_dut_if2_mac}
240 | | ... | ${src_rloc6} | ${dst_rloc6}