42f5a84b8f5dbbb7d6d91c59ac11852fc9f4cf1d
[csit.git] / tests / 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 | Resource | resources/libraries/robot/default.robot
26 | Resource | resources/libraries/robot/honeycomb/honeycomb.robot
27 | Resource | resources/libraries/robot/honeycomb/lisp.robot
28 | Resource | resources/libraries/robot/honeycomb/bridge_domain.robot
29 | Variables | resources/test_data/honeycomb/lisp.py
30 | ...
31 | Documentation | *Honeycomb Lisp test suite.*
32 | ...
33 | Suite Teardown | Run Keyword If Any Tests Failed
34 | ... | Restart Honeycomb and VPP | ${node}
35 | ...
36 | Force Tags | HC_FUNC
37
38 *** Test Cases ***
39 | TC01: Honeycomb enables LISP feature
40 | | [Documentation] | Check if Honeycomb can enable the Lisp feature.
41 | | ...
42 | | Given Lisp Should Not Be Configured | ${node}
43 | | When Honeycomb enables LISP | ${node}
44 | | Then LISP state from Honeycomb should be | ${node} | ${state}
45 | | And LISP state from VAT should be | ${node} | ${state}
46
47 | TC02: Honeycomb adds locator set and locator
48 | | [Documentation] | Check if Honeycomb can configure a locator set.
49 | | ...
50 | | Given LISP state from Honeycomb should be | ${node} | ${state}
51 | | When Honeycomb adds locator set | ${node} | ${interface} | ${locator_set}
52 | | Then Locator Set From Honeycomb Should Be
53 | | ... | ${node} | ${interface} | ${locator_set}
54
55 | TC03: Honeycomb configures Lisp - remote mapping - Bridge Domain
56 | | [Documentation] | Check if Honeycomb can configure a remote Lisp mapping\
57 | | ... | with a bridge domain.
58 | | ...
59 | | Given LISP state from Honeycomb should be | ${node} | ${state}
60 | | And Honeycomb creates first l2 bridge domain
61 | | ... | ${node} | ${bd_name} | ${bd_settings}
62 | | When Honeycomb adds LISP mapping | ${node} | ${lisp_settings_remote_bd}
63 | | Then LISP mapping from Honeycomb should be
64 | | ... | ${node} | ${remote_bd_subtable}
65 | | And LISP mapping from VAT should be
66 | | ... | ${node} | ${vat_remote_bd}
67
68 | TC04: Honeycomb can remove Lisp mapping
69 | | [Documentation] | Check if Honeycomb can remove a configured Lisp mapping.
70 | | ...
71 | | Given LISP mapping from Honeycomb should be
72 | | ... | ${node} | ${remote_bd_subtable}
73 | | And LISP mapping from VAT should be
74 | | ... | ${node} | ${vat_remote_bd}
75 | | When Honeycomb removes all lisp mappings | ${node}
76 | | Then LISP mappings from Honeycomb should not exist
77 | | ... | ${node}
78 | | And LISP mappings from VAT should not exist
79 | | ... | ${node}
80
81 | TC05: Honeycomb configures Lisp - remote mapping - VRF
82 | | [Documentation] | Check if Honeycomb can configure a remote Lisp mapping\
83 | | ... | with VRF.
84 | | ...
85 | | [Teardown] | Honeycomb removes all lisp mappings | ${node}
86 | | ...
87 | | Given LISP mappings from Honeycomb should not exist
88 | | ... | ${node}
89 | | And LISP mappings from VAT should not exist
90 | | ... | ${node}
91 | | When Honeycomb adds LISP mapping | ${node} | ${lisp_settings_remote_vrf}
92 | | Then LISP mapping from Honeycomb should be
93 | | ... | ${node} | ${remote_vrf_subtable}
94 | | And LISP mapping from VAT should be | ${node} | ${vat_remote_vrf}
95
96 | TC06: Honeycomb configures Lisp - local mapping - Bridge Domain
97 | | [Documentation] | Check if Honeycomb can configure a local Lisp mapping\
98 | | ... | with a bridge domain.
99 | | ...
100 | | [Teardown] | Honeycomb removes all lisp mappings | ${node}
101 | | ...
102 | | Given Locator Set From Honeycomb Should Be
103 | | ... | ${node} | ${interface} | ${locator_set}
104 | | And LISP mappings from Honeycomb should not exist
105 | | ... | ${node}
106 | | And LISP mappings from VAT should not exist
107 | | ... | ${node}
108 | | And Honeycomb creates first l2 bridge domain
109 | | ... | ${node} | ${bd2_name} | ${bd_settings}
110 | | When Honeycomb adds LISP mapping | ${node} | ${lisp_settings_local_bd}
111 | | Then LISP mapping from Honeycomb should be | ${node} | ${local_bd_subtable}
112 | | And LISP mapping from VAT should be | ${node} | ${vat_local_bd}
113
114 | TC07: Honeycomb configures Lisp - local mapping - VRF
115 | | [Documentation] | Check if Honeycomb can configure a local Lisp mapping\
116 | | ... | with VRF.
117 | | ...
118 | | [Teardown] | Honeycomb removes all lisp mappings | ${node}
119 | | ...
120 | | Given Locator Set From Honeycomb Should Be
121 | | ... | ${node} | ${interface} | ${locator_set}
122 | | And LISP mappings from Honeycomb should not exist
123 | | ... | ${node}
124 | | And LISP mappings from VAT should not exist
125 | | ... | ${node}
126 | | When Honeycomb adds LISP mapping | ${node} | ${lisp_settings_local_vrf}
127 | | Then LISP mapping from Honeycomb should be | ${node} | ${local_vrf_subtable}
128 | | And LISP mapping from VAT should be | ${node} | ${vat_local_vrf}
129
130 | TC08: Honeycomb configures Lisp mapping with adjacency
131 | | [Documentation] | Check if Honeycomb can configure local and remote Lisp\
132 | | ... | mappings with VRF, and configure adjacency.
133 | | ...
134 | | [Teardown] | Honeycomb removes all lisp mappings | ${node}
135 | | ...
136 | | Given Locator Set From Honeycomb Should Be
137 | | ... | ${node} | ${interface} | ${locator_set}
138 | | And Honeycomb creates first l2 bridge domain
139 | | ... | ${node} | ${bd2_name} | ${bd_settings}
140 | | And LISP mappings from Honeycomb should not exist
141 | | ... | ${node}
142 | | And LISP mappings from VAT should not exist
143 | | ... | ${node}
144 | | And Honeycomb adds LISP mapping | ${node} | ${lisp_settings_both_vrf}
145 | | When Honeycomb adds LISP adjacency | ${node} | ${7} | remote_map_vrf
146 | | ... | adj01 | ${vrf_adjacency}
147 | | Then Lisp mapping from Honeycomb should be
148 | | ... | ${node} | ${adj_subtable}
149
150 | TC09: Honeycomb configures Lisp Map Resolver
151 | | [Documentation] | Check if Honeycomb can configure a Lisp Map Resolver.
152 | | ...
153 | | Given LISP state from Honeycomb should be | ${node} | ${state}
154 | | And LISP state from VAT should be | ${node} | ${state}
155 | | When Honeycomb adds Lisp Map Resolver | ${node} | ${ip_address}
156 | | Then Map Resolver from Honeycomb should be | ${node} | ${ip_address}
157 | | And Map Resolver from VAT should be | ${node} | ${ip_address}
158
159 | TC10: Honeycomb configures Lisp Map Server
160 | | [Documentation] | Check if Honeycomb can configure a Lisp Map Server.
161 | | ...
162 | | Given LISP state from Honeycomb should be | ${node} | ${state}
163 | | And LISP state from VAT should be | ${node} | ${state}
164 | | When Honeycomb adds Lisp Map Server | ${node} | @{ip_addresses}
165 | | Then Map Server from Honeycomb should be | ${node} | @{ip_addresses}
166 | | And Map Server from VAT should be | ${node} | @{ip_addresses}
167
168 | TC11: Honeycomb configures Lisp PETR configuration
169 | | [Documentation] | Check if Honeycomb can configure Lisp
170 | | ... | PETR configuration.
171 | | ...
172 | | Given LISP state from Honeycomb should be | ${node} | ${state}
173 | | And LISP state from VAT should be | ${node} | ${state}
174 | | When Honeycomb enables LISP PETR feature | ${node} | ${ip_address}
175 | | Then PETR configuration from Honeycomb should be | ${node} | ${ip_address}
176 | | And PETR configuration from VAT should be | ${node} | enabled
177
178 | TC12: Honeycomb configures Lisp RLOC Probing
179 | | [Documentation] | Check if Honeycomb can configure Lisp RLOC Probing.
180 | | ...
181 | | Given LISP state from Honeycomb should be | ${node} | ${state}
182 | | And LISP state from VAT should be | ${node} | ${state}
183 | | When Honeycomb enables LISP RLOC feature | ${node}
184 | | Then RLOC Probing from Honeycomb should be | ${node} | ${True}
185 | | And RLOC Probing from VAT should be | ${node} | enabled
186
187 | TC13: Honeycomb configures Lisp Map Register
188 | | [Documentation] | Check if Honeycomb can configure a Lisp Map Register.
189 | | ...
190 | | Given LISP state from Honeycomb should be | ${node} | ${state}
191 | | And LISP state from VAT should be | ${node} | ${state}
192 | | When Honeycomb adds Lisp Map Register | ${node} | ${True}
193 | | Then Map Register from Honeycomb should be | ${node} | ${True}
194 | | And Map Register from VAT should be | ${node} | enabled
195
196 | TC14: Honeycomb enabled Lisp PITR feature
197 | | [Documentation] | Check if Honeycomb can configure the Lisp PITR feature.
198 | | ...
199 | | Given Locator Set From Honeycomb Should Be
200 | | ... | ${node} | ${interface} | ${locator_set}
201 | | When Honeycomb enables LISP PITR feature | ${node} | ${locator_set}
202 | | Then PITR config from Honeycomb should be | ${node} | ${locator_set}
203 | | And PITR config from VAT should be | ${node} | ${locator_set}
204
205 | TC15: Honeycomb can remove configuration of Lisp features
206 | | [Documentation] | Check if Honeycomb can disable all Lisp features.
207 | | ...
208 | | Given Map resolver from Honeycomb should be | ${node} | ${ip_address}
209 | | And PITR config from Honeycomb should be | ${node} | ${locator_set}
210 | | When Honeycomb disables all LISP features | ${node}
211 | | Then Lisp Should Not Be Configured | ${node}
212
213 | TC16: Honeycomb configures Lisp Map Request Mode
214 | | [Documentation] | Check if Honeycomb can configure Lisp Map Request mode.
215 | | ... | Note: Map Request Mode cannot be removed once configured.
216 | | ...
217 | | [Teardown] | Honeycomb disables LISP | ${node}
218 | | ...
219 | | Given Honeycomb enables LISP | ${node}
220 | | When Honeycomb sets Lisp Map Request Mode | ${node} | ${True}
221 | | Then Map Request Mode from Honeycomb should be
222 | | ... | ${node} | source-destination
223 | | And Map Request Mode from VAT should be | ${node} | src-dst