HC Test: address and cleanup test failures
[csit.git] / tests / func / honeycomb / mgmt-cfg-intip4-intip6-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 # Interface to run tests on.
16 | ${interface}= | ${node['interfaces']['port1']['name']}
17 # Configuration which will be set and verified during tests.
18 | @{ipv4_address}= | 192.168.0.2 | ${24}
19 | @{ipv4_address2}= | 192.168.1.2 | ${24}
20 | ${ipv4_mask}= | 255.255.255.0
21 | ${ipv4_prefix}= | ${24}
22 | @{ipv4_neighbor}= | 192.168.0.4 | 08:00:27:c0:5d:37
23 | @{ipv4_neighbor2}= | 192.168.1.4 | 08:00:27:c0:5d:37
24 | &{ipv4_settings}= | mtu=${9000}
25 | @{ipv6_address}= | 10::10 | ${64}
26 | @{ipv6_address2}= | 11::10 | ${64}
27 | @{ipv6_neighbor}= | 10::11 | 08:00:27:c0:5d:37
28 | @{ipv6_neighbor2}= | 11::11 | 08:00:27:c0:5d:37
29 | &{ipv6_settings}= | enabled=${True} | forwarding=${True} | mtu=${9000}
30 | ... | dup-addr-detect-transmits=${5}
31 | &{ethernet}= | mtu=${9000}
32 | &{routing}= | vrf-id=${27}
33 | &{vxlan_settings}= | src=10.0.1.20 | dst=10.0.3.20 | vni=${1000}
34 | ... | encap-vrf-id=${1000}
35
36 *** Settings ***
37 | Resource | resources/libraries/robot/default.robot
38 | Resource | resources/libraries/robot/honeycomb/interfaces.robot
39 | Resource | resources/libraries/robot/honeycomb/honeycomb.robot
40 | Resource | resources/libraries/robot/testing_path.robot
41 | Resource | resources/libraries/robot/ipv6.robot
42 | Force Tags | honeycomb_sanity | honeycomb_odl
43 | Suite Teardown
44 | | ... | Restart Honeycomb and VPP | ${node}
45 | Documentation | *Honeycomb interface management test suite.*
46
47 *** Test Cases ***
48 | TC01: Honeycomb configures and reads interface state
49 | | [Documentation] | Check if Honeycomb API can modify the admin state of\
50 | | ... | VPP interfaces.
51 | | Given Interface state from Honeycomb should be
52 | | ... | ${node} | ${interface} | down
53 | | And Interface state from VAT should be | ${node} | ${interface} | down
54 | | When Honeycomb sets interface state | ${node} | ${interface} | up
55 | | Then Interface state from Honeycomb should be
56 | | ... | ${node} | ${interface} | up
57 | | And Interface state from VAT should be | ${node} | ${interface} | up
58 | | When Honeycomb sets interface state | ${node} | ${interface} | down
59 | | Then Interface state from Honeycomb should be
60 | | ... | ${node} | ${interface} | down
61 | | And Interface state from VAT should be | ${node} | ${interface} | down
62
63 | TC02: Honeycomb modifies interface IPv4 address with netmask
64 | | [Documentation] | Check if Honeycomb API can configure interfaces for ipv4\
65 | | ... | with address and netmask provided.
66 | | Given IPv4 address from Honeycomb should be empty | ${node} | ${interface}
67 | | And ipv4 address from VAT should be empty | ${node} | ${interface}
68 | | When Honeycomb sets interface ipv4 address | ${node} | ${interface}
69 | | ... | ${ipv4_address[0]} | ${ipv4_mask}
70 | | Then IPv4 address from Honeycomb should be
71 | | ... | ${node} | ${interface} | ${ipv4_address[0]} | ${ipv4_prefix}
72 | | And IPv4 address from VAT should be
73 | | ... | ${node} | ${interface} | @{ipv4_address} | ${ipv4_mask}
74
75 | TC03: Honeycomb removes IPv4 address from interface
76 | | [Documentation] | Check if Honeycomb API can remove configured ipv4\
77 | | ... | addresses from interface.
78 | | Given IPv4 address from Honeycomb should be
79 | | ... | ${node} | ${interface} | @{ipv4_address}
80 | | And IPv4 address from VAT should be
81 | | ... | ${node} | ${interface} | @{ipv4_address} | ${ipv4_mask}
82 | | When Honeycomb removes interface ipv4 addresses | ${node} | ${interface}
83 | | Then IPv4 address from Honeycomb should be empty | ${node} | ${interface}
84 | | And ipv4 address from VAT should be empty | ${node} | ${interface}
85
86 | TC04: Honeycomb modifies interface IPv4 address with prefix
87 | | [Documentation] | Check if Honeycomb API can configure interfaces for ipv4\
88 | | ... | with address and prefix provided.
89 | | [Teardown] | Honeycomb removes interface ipv4 addresses | ${node}
90 | | ... | ${interface}
91 | | Given IPv4 address from Honeycomb should be empty | ${node} | ${interface}
92 | | And ipv4 address from VAT should be empty | ${node} | ${interface}
93 | | When Honeycomb sets interface ipv4 address with prefix
94 | | ... | ${node} | ${interface} | @{ipv4_address2}
95 | | Then IPv4 address from Honeycomb should be
96 | | ... | ${node} | ${interface} | @{ipv4_address2}
97 | | And IPv4 address from VAT should be
98 | | ... | ${node} | ${interface} | @{ipv4_address2} | ${ipv4_mask}
99
100 | TC05: Honeycomb modifies IPv4 neighbor table
101 | | [Documentation] | Check if Honeycomb API can add and remove ARP entries.
102 | | [Teardown] | Honeycomb clears all interface ipv4 neighbors
103 | | ... | ${node} | ${interface}
104 | | Given IPv4 neighbor from Honeycomb should be empty
105 | | ... | ${node} | ${interface}
106 | | When Honeycomb adds interface ipv4 neighbor
107 | | ... | ${node} | ${interface} | @{ipv4_neighbor}
108 | | Then IPv4 neighbor from Honeycomb should be
109 | | ... | ${node} | ${interface} | @{ipv4_neighbor}
110
111 | TC06: Honeycomb modifies interface configuration - IPv6
112 | | [Documentation] | Check if Honeycomb API can configure interfaces for ipv6.
113 | | [Teardown] | Honeycomb removes interface ipv6 addresses | ${node}
114 | | ... | ${interface}
115 | | Given IPv6 address from Honeycomb should be empty
116 | | ... | ${node} | ${interface}
117 | | And IPv6 address from VAT should be empty
118 | | ... | ${node} | ${interface}
119 | | When Honeycomb sets interface ipv6 address
120 | | ... | ${node} | ${interface} | @{ipv6_address}
121 | | Then IPv6 address from Honeycomb should contain
122 | | ... | ${node} | ${interface} | @{ipv6_address}
123 | | And IPv6 address from VAT should contain
124 | | ... | ${node} | ${interface} | @{ipv6_address}
125
126 | TC07: Honeycomb modifies IPv6 neighbor table
127 | | [Documentation] | Check if Honeycomb API can add and remove ARP entries.
128 | | [Teardown] | Honeycomb clears all interface ipv6 neighbors
129 | | ... | ${node} | ${interface}
130 | | Given IPv6 neighbor from Honeycomb should be empty
131 | | ... | ${node} | ${interface}
132 | | When Honeycomb adds interface ipv6 neighbor
133 | | ... | ${node} | ${interface} | @{ipv6_neighbor}
134 | | Then IPv6 neighbor from Honeycomb should be
135 | | ... | ${node} | ${interface} | @{ipv6_neighbor}
136
137 | TC08: Honeycomb modifies interface configuration - MTU
138 | | [Documentation] | Check if Honeycomb API can configure interface\
139 | | ... | MTU value.
140 | | When Honeycomb sets interface ethernet configuration
141 | | ... | ${node} | ${interface} | ${ethernet}
142 | | Then Interface ethernet configuration from Honeycomb should be
143 | | ... | ${node} | ${interface} | ${ethernet}
144 | | And Interface ethernet configuration from VAT should be
145 | | ... | ${node} | ${interface} | ${ethernet['mtu']}
146
147 | TC09: Honeycomb modifies interface configuration - vrf
148 | | [Documentation] | Check if Honeycomb API can configure interface\
149 | | ... | vrf ID.
150 | | [Teardown] | Honeycomb sets interface vrf ID
151 | | ... | ${node} | ${interface} | ${0} | ipv4
152 | | When Honeycomb sets interface vrf ID
153 | | ... | ${node} | ${interface} | ${1} | ipv4
154 | | Then Interface vrf ID from Honeycomb should be
155 | | ... | ${node} | ${interface} | ${1} | ipv4
156 | | And Interface vrf ID from VAT should be
157 | | ... | ${node} | ${interface} | ${1}
158
159 | TC10: Honeycomb can configure multiple IP addresses on one interface
160 | | [Documentation] | [Top] TG=DUT1=TG.
161 | | ... | [Enc] Eth-IPv4-ICMP; Eth-IPv6-ICMPv6
162 | | ... | [Cfg] (Using Honeycomb API) On DUT1 set two IPv4 addresses\
163 | | ... | and two IPv6 addresses on first interfaces to TG and add ARP entries\
164 | | ... | for each address.
165 | | ... | [Ver] Send ICMP packets from TG to DUT, using different sets\
166 | | ... | of source and destination IP addresses. Receive an ICMP reply\
167 | | ... | for every packet sent.
168 | | ...
169 | | Given Path for 2-node testing is set
170 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
171 | | When Honeycomb sets interface ipv4 address with prefix
172 | | ... | ${dut_node} | ${dut_to_tg_if1} | @{ipv4_address}
173 | | And Honeycomb adds interface ipv4 address
174 | | ... | ${dut_node} | ${dut_to_tg_if1} | @{ipv4_address2}
175 | | And Honeycomb sets interface ipv6 address
176 | | ... | ${dut_node} | ${dut_to_tg_if1} | @{ipv6_address}
177 | | And Honeycomb adds interface ipv6 address
178 | | ... | ${dut_node} | ${dut_to_tg_if1} | @{ipv6_address2}
179 | | Then IPv4 address from Honeycomb should be
180 | | ... | ${dut_node} | ${dut_to_tg_if1} | @{ipv4_address}
181 | | And IPv4 address from VAT should be
182 | | ... | ${dut_node} | ${dut_to_tg_if1} | @{ipv4_address} | ${ipv4_mask}
183 | | And IPv6 address from Honeycomb should contain
184 | | ... | ${dut_node} | ${dut_to_tg_if1} | @{ipv6_address}
185 | | And IPv6 address from VAT should contain
186 | | ... | ${dut_node} | ${dut_to_tg_if1} | @{ipv6_address}
187 | | And Honeycomb sets interface state | ${dut_node} | ${dut_to_tg_if1} | up
188 | | And Honeycomb adds interface ipv4 neighbor | ${dut_node} | ${dut_to_tg_if1}
189 | | ... | @{ipv4_neighbor}
190 | | And Honeycomb adds interface ipv4 neighbor | ${dut_node} | ${dut_to_tg_if1}
191 | | ... | @{ipv4_neighbor2}
192 | | And Honeycomb adds interface ipv6 neighbor | ${dut_node} | ${dut_to_tg_if1}
193 | | ... | @{ipv6_neighbor}
194 | | And Honeycomb adds interface ipv6 neighbor | ${dut_node} | ${dut_to_tg_if1}
195 | | ... | @{ipv6_neighbor2}
196 | | And Vpp nodes ra suppress link layer | ${nodes}
197 | | Then Ping and Verify IP address | ${nodes['TG']}
198 | | ... | ${ipv4_neighbor[0]} | ${ipv4_address[0]}
199 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
200 | | ... | ${tg_to_dut_if1} | ${dut_to_tg_if1_mac}
201 | | And Ping and Verify IP address | ${nodes['TG']}
202 | | ... | ${ipv4_neighbor2[0]} | ${ipv4_address2[0]}
203 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
204 | | ... | ${tg_to_dut_if1} | ${dut_to_tg_if1_mac}
205 | | And Ping and Verify IP address | ${nodes['TG']}
206 | | ... | ${ipv6_neighbor[0]} | ${ipv6_address[0]}
207 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
208 | | ... | ${tg_to_dut_if1} | ${dut_to_tg_if1_mac}
209 | | And Ping and Verify IP address | ${nodes['TG']}
210 | | ... | ${ipv6_neighbor2[0]} | ${ipv6_address2[0]}
211 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
212 | | ... | ${tg_to_dut_if1} | ${dut_to_tg_if1_mac}
213
214 TC11: Honeycomb fails to configure two IPv4 addresses from the same subnet
215 | | [Documentation] | Check if Honeycomb can configure two IPv4 addresses in\
216 | | ... | the same subnet onto a single interface. It should not be possible.
217 | | [Teardown] | Honeycomb removes interface ipv4 addresses | ${node}
218 | | ... | ${interface}
219 | | [Tags] | EXPECTED_FAILING
220 # VPP API does not configure the second address, but returns success. VPP-649
221 | | When Honeycomb sets interface ipv4 address with prefix
222 | | ... | ${node} | ${interface} | 192.168.0.1 | ${9}
223 | | Then Honeycomb fails to add interface ipv4 address
224 | | ... | ${node} | ${interface} | 192.168.0.2 | ${9}
225 | | And Honeycomb fails to add interface ipv4 address
226 | | ... | ${node} | ${interface} | 192.232.0.2 | ${9}
227
228 TC12: Honeycomb fails to configure two IPv6 addresses from the same subnet
229 | | [Documentation] | Check if Honeycomb can configure two IPv6 addresses in\
230 | | ... | the same subnet onto a single interface. It should not be possible.
231 | | [Tags] | EXPECTED_FAILING
232 # VPP API does not configure the second address, but returns success. VPP-649
233 | | [Teardown] | Honeycomb removes interface ipv6 addresses | ${node}
234 | | ... | ${interface}
235 | | When Honeycomb sets interface ipv6 address
236 | | ... | ${node} | ${interface} | 10::FF10 | ${64}
237 | | Then Honeycomb fails to add interface ipv6 address
238 | | ... | ${node} | ${interface} | 10::FF11 | ${64}
239 | | And Honeycomb fails to add interface ipv6 address
240 | | ... | ${node} | ${interface} | 10::FFFF | ${64}

©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.