HC Test: re-enable NSH tests, minor fixes
[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 | | Given LISP GPE Should Not Be Configured | ${node}
40 | | When Honeycomb enables LISP GPE | ${node}
41 | | Then LISP GPE state from Honeycomb should be | ${node} | enabled
42 | | And LISP GPE state from VAT should be | ${node} | enabled
43
44 | TC02: Honeycomb disable LISP GPE feature
45 | | [Documentation] | Check if Honeycomb can enable the LISP GPE feature.
46 | | ...
47 | | [Teardown] | Honeycomb enables LISP GPE | ${node}
48 | | Given LISP GPE state from Honeycomb should be | ${node} | enabled
49 | | And LISP GPE state from VAT should be | ${node} | enabled
50 | | When Honeycomb disables LISP GPE | ${node}
51 | | Then LISP GPE state from Honeycomb should be | ${node} | disabled
52 | | And LISP GPE state from VAT should be | ${node} | disabled
53
54 | TC03: Honeycomb configures LISP GPE mapping - negative, IPv4
55 | | [Documentation] | Check if Honeycomb can configure a LISP mapping\
56 | | ... | with VRF.
57 | | ...
58 | | Given LISP GPE mappings from Honeycomb should not exist
59 | | ... | ${node}
60 | | When Honeycomb adds first LISP GPE mapping
61 | | ... | ${node} | ${negative_mapping_ip4}
62 | | Then LISP GPE mapping from Honeycomb should be
63 | | ... | ${node} | ${negative_mapping_ip4}
64
65 | TC04: Honeycomb can remove LISP GPE mapping
66 | | [Documentation] | Check if Honeycomb can remove a configured LISP GPE\
67 | | ... | mapping.
68 | | ...
69 | | Given LISP GPE mapping from Honeycomb should be
70 | | ... | ${node} | ${negative_mapping_ip4}
71 | | When Honeycomb removes LISP GPE mapping
72 | | ... | ${node} | ${negative_mapping_ip4['id']}
73 | | Then LISP GPE mappings from Honeycomb should not exist
74 | | ... | ${node}
75
76 | TC05: Honeycomb configures LISP GPE mapping - positive, IPv4
77 | | [Documentation] | Check if Honeycomb can configure a LISP mapping\
78 | | ... | with VRF.
79 | | ...
80 | | [Teardown] | Honeycomb removes LISP GPE mapping
81 | | ... | ${node} | ${positive_mapping_ip4['id']}
82 | | Given LISP GPE mappings from Honeycomb should not exist
83 | | ... | ${node}
84 | | When Honeycomb adds first LISP GPE mapping
85 | | ... | ${node} | ${positive_mapping_ip4}
86 | | Then LISP GPE mapping from Honeycomb should be
87 | | ... | ${node} | ${positive_mapping_ip4}
88
89 | TC06: Honeycomb configures LISP GPE mapping - negative, IPv6
90 | | [Documentation] | Check if Honeycomb can configure a LISP mapping\
91 | | ... | with VRF.
92 | | ...
93 | | [Tags] | HC_FUNC
94 | | [Teardown] | Honeycomb removes LISP GPE mapping
95 | | ... | ${node} | ${negative_mapping_ip6['id']}
96 | | Given LISP GPE mappings from Honeycomb should not exist
97 | | ... | ${node}
98 | | When Honeycomb adds first LISP GPE mapping
99 | | ... | ${node} | ${negative_mapping_ip6}
100 | | Then LISP GPE mapping from Honeycomb should be
101 | | ... | ${node} | ${negative_mapping_ip6}
102
103 | TC07: Honeycomb configures LISP GPE mapping - positive, IPv6
104 | | [Documentation] | Check if Honeycomb can configure a LISP mapping\
105 | | ... | with VRF.
106 | | ...
107 | | [Teardown] | Honeycomb removes LISP GPE mapping
108 | | ... | ${node} | ${positive_mapping_ip6['id']}
109 | | Given LISP GPE mappings from Honeycomb should not exist
110 | | ... | ${node}
111 | | When Honeycomb adds first LISP GPE mapping
112 | | ... | ${node} | ${positive_mapping_ip6}
113 | | Then LISP GPE mapping from Honeycomb should be
114 | | ... | ${node} | ${positive_mapping_ip6}
115
116 | TC08: Honeycomb can modify existing LISP GPE mappping
117 | | [Documentation] | Check if Honeycomb can modify and existing LISP GPE\
118 | | ... | mapping.
119 | | ...
120 | | [Teardown] | Honeycomb removes LISP GPE mapping
121 | | ... | ${node} | ${negative_mapping_ip4_edit['id']}
122 | | Given LISP GPE mappings from Honeycomb should not exist
123 | | ... | ${node}
124 | | When Honeycomb adds first LISP GPE mapping
125 | | ... | ${node} | ${negative_mapping_ip4}
126 | | Then LISP GPE mapping from Honeycomb should be
127 | | ... | ${node} | ${negative_mapping_ip4}
128 | | When Honeycomb adds first LISP GPE mapping | ${node}
129 | | ... | ${negative_mapping_ip4_edit}
130 | | Then LISP GPE mapping from Honeycomb should be
131 | | ... | ${node} | ${negative_mapping_ip4_edit}
132
133 | TC09: Honeycomb can configure multiple LISP GPE mapppings
134 | | [Documentation] | Check if Honeycomb can configure multiple LISP GPE\
135 | | ... | mappings at the same time.
136 | | ...
137 | | [Teardown] | Run Keywords
138 | | ... | Honeycomb removes LISP GPE mapping
139 | | ... | ${node} | ${negative_mapping_ip4['id']}
140 | | ... | AND | Honeycomb removes LISP GPE mapping
141 | | ... | ${node} | ${negative_mapping_ip4_2['id']}
142 | | Given LISP GPE mappings from Honeycomb should not exist
143 | | ... | ${node}
144 | | When Honeycomb adds first LISP GPE mapping
145 | | ... | ${node} | ${negative_mapping_ip4}
146 | | And Honeycomb adds LISP GPE mapping | ${node} | ${negative_mapping_ip4_2}
147 | | Then LISP GPE mapping from Honeycomb should be
148 | | ... | ${node} | ${negative_mapping_ip4}
149 | | And LISP GPE mapping from Honeycomb should be
150 | | ... | ${node} | ${negative_mapping_ip4_2}
151
152 | TC10: Honeycomb can disable all LISP GPE features
153 | | [Documentation] | Check if Honeycomb can disable all LISP GPE features.
154 | | ...
155 | | Given Honeycomb adds first LISP GPE mapping
156 | | ... | ${node} | ${negative_mapping_ip4}
157 | | When Honeycomb disables all LISP GPE features | ${node}
158 | | Then LISP GPE mappings from Honeycomb should not exist
159 | | ... | ${node}
160 | | And LISP GPE state from Honeycomb should be | ${node} | disabled
161 | | And LISP GPE state from VAT should be | ${node} | disabled
162
163 | TC11: Honeycomb can configure LISP GPE for traffic test - IPv4
164 | | [Documentation]
165 | | ... | [Top] TG-DUT1-TG.
166 | | ... | [Enc] Eth-IPv4-LISPGPE-IPv4-ICMPv4
167 | | ... | [Cfg] Configure IPv4 LISP static adjacencies on DUT1.
168 | | ... | [Ver] Case: ip4-lispgpe-ip4 - phy2lisp
169 | | ... | Make TG send ICMPv4 Echo Req between its interfaces through DUT1\
170 | | ... | LISP GPE tunnel verify LISP encapsulation of received packet.
171 | | ... | [Ref] RFC6830.
172 | | ...
173 | | [Teardown] | LISPGPE functional traffic test teardown
174 | | Given Configure path in 2-node circular topology
175 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
176 | | And Honeycomb configures interface state
177 | | ... | ${dut_node} | ${dut_to_tg_if1} | up
178 | | And Honeycomb configures interface state
179 | | ... | ${dut_node} | ${dut_to_tg_if2} | up
180 | | And Honeycomb sets interface IPv4 address with prefix | ${dut_node}
181 | | ... | ${dut_to_tg_if1} | ${dut_to_tg_if1_ip4} | ${prefix_len4}
182 | | And Honeycomb sets interface IPv4 address with prefix | ${dut_node}
183 | | ... | ${dut_to_tg_if2} | ${dut_to_tg_if2_ip4} | ${prefix_len4}
184 | | And Honeycomb adds interface IPv4 neighbor | ${dut_node} | ${dut_to_tg_if1}
185 | | ... | ${src_ip4} | ${tg_to_dut_if1_mac}
186 | | And Honeycomb adds interface IPv4 neighbor | ${dut_node} | ${dut_to_tg_if2}
187 | | ... | ${tg_to_dut_if2_ip4} | ${tg_to_dut_if2_mac}
188 | | When Honeycomb enables LISP GPE | ${node}
189 | | And Honeycomb adds LISP GPE mapping | ${node} | ${lisp_traffic_ip4}
190 | | Then send packet and verify LISP GPE encap
191 | | ... | ${tg_node} | ${src_ip4} | ${dst_ip4}
192 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac}
193 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if2_mac} | ${tg_to_dut_if2_mac}
194 | | ... | ${src_rloc4} | ${dst_rloc4}
195
196 | TC12: Honeycomb can configure LISP GPE for traffic test - IPv6
197 | | [Documentation]
198 | | ... | [Top] TG-DUT1-TG.
199 | | ... | [Enc] Eth-IPv6-LISPGPE-IPv6-ICMPv6
200 | | ... | [Cfg] Configure IPv6 LISP static adjacencies on DUT1.
201 | | ... | [Ver] Case: ip6-lispgpe-ip6 - phy2lisp
202 | | ... | Make TG send ICMPv6 Echo Req between its interfaces through DUT1\
203 | | ... | LISP GPE tunnel verify LISP encapsulation of received packet.
204 | | ... | [Ref] RFC6830.
205 | | ...
206 | | [Teardown] | LISPGPE functional traffic test teardown
207 | | Given Configure path in 2-node circular topology
208 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
209 | | And Honeycomb configures interface state
210 | | ... | ${dut_node} | ${dut_to_tg_if1} | up
211 | | And Honeycomb configures interface state
212 | | ... | ${dut_node} | ${dut_to_tg_if2} | up
213 | | And Honeycomb sets interface IPv6 address | ${dut_node}
214 | | ... | ${dut_to_tg_if1} | ${dut_to_tg_if1_ip6} | ${prefix_len6}
215 | | And Honeycomb sets interface IPv6 address | ${dut_node}
216 | | ... | ${dut_to_tg_if2} | ${dut_to_tg_if2_ip6} | ${prefix_len6}
217 | | And Honeycomb adds interface IPv6 neighbor | ${dut_node} | ${dut_to_tg_if1}
218 | | ... | ${src_ip6} | ${tg_to_dut_if1_mac}
219 | | And Honeycomb adds interface IPv6 neighbor | ${dut_node} | ${dut_to_tg_if2}
220 | | ... | ${tg_to_dut_if2_ip6} | ${tg_to_dut_if2_mac}
221 | | When Honeycomb enables LISP GPE | ${node}
222 | | And Honeycomb adds LISP GPE mapping | ${node} | ${lisp_traffic_ip6}
223 | | Then send packet and verify LISP GPE encap
224 | | ... | ${tg_node} | ${src_ip6} | ${dst_ip6}
225 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac}
226 | | ... | ${tg_to_dut_if2} | ${dut_to_tg_if2_mac} | ${tg_to_dut_if2_mac}
227 | | ... | ${src_rloc6} | ${dst_rloc6}