fc5069fee3078276b456fe1c8918261b4b0d2d0c
[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 Setup | Vpp nodes ra suppress link layer | ${nodes}
44 | Suite Teardown
45 | | ... | Restart Honeycomb and VPP | ${node}
46 | Documentation | *Honeycomb interface management test suite.*
47
48 *** Test Cases ***
49 | TC01: Honeycomb configures and reads interface state
50 | | [Documentation] | Check if Honeycomb API can modify the admin state of\
51 | | ... | VPP interfaces.
52 | | Given Interface state from Honeycomb should be
53 | | ... | ${node} | ${interface} | down
54 | | And Interface state from VAT should be | ${node} | ${interface} | down
55 | | When Honeycomb sets interface state | ${node} | ${interface} | up
56 | | Then Interface state from Honeycomb should be
57 | | ... | ${node} | ${interface} | up
58 | | And Interface state from VAT should be | ${node} | ${interface} | up
59 | | When Honeycomb sets interface state | ${node} | ${interface} | down
60 | | Then Interface state from Honeycomb should be
61 | | ... | ${node} | ${interface} | down
62 | | And Interface state from VAT should be | ${node} | ${interface} | down
63
64 | TC02: Honeycomb modifies interface IPv4 address with netmask
65 | | [Documentation] | Check if Honeycomb API can configure interfaces for ipv4\
66 | | ... | with address and netmask provided.
67 | | Given IPv4 address from Honeycomb should be empty | ${node} | ${interface}
68 | | And ipv4 address from VAT should be empty | ${node} | ${interface}
69 | | When Honeycomb sets interface ipv4 address | ${node} | ${interface}
70 | | ... | ${ipv4_address[0]} | ${ipv4_mask}
71 | | Then IPv4 address from Honeycomb should be
72 | | ... | ${node} | ${interface} | ${ipv4_address[0]} | ${ipv4_prefix}
73 | | And IPv4 address from VAT should be
74 | | ... | ${node} | ${interface} | @{ipv4_address} | ${ipv4_mask}
75
76 | TC03: Honeycomb removes IPv4 address from interface
77 | | [Documentation] | Check if Honeycomb API can remove configured ipv4\
78 | | ... | addresses from interface.
79 | | Given IPv4 address from Honeycomb should be
80 | | ... | ${node} | ${interface} | @{ipv4_address}
81 | | And IPv4 address from VAT should be
82 | | ... | ${node} | ${interface} | @{ipv4_address} | ${ipv4_mask}
83 | | When Honeycomb removes interface ipv4 addresses | ${node} | ${interface}
84 | | Then IPv4 address from Honeycomb should be empty | ${node} | ${interface}
85 | | And ipv4 address from VAT should be empty | ${node} | ${interface}
86
87 | TC04: Honeycomb modifies interface IPv4 address with prefix
88 | | [Documentation] | Check if Honeycomb API can configure interfaces for ipv4\
89 | | ... | with address and prefix provided.
90 | | [Teardown] | Honeycomb removes interface ipv4 addresses | ${node}
91 | | ... | ${interface}
92 | | Given IPv4 address from Honeycomb should be empty | ${node} | ${interface}
93 | | And ipv4 address from VAT should be empty | ${node} | ${interface}
94 | | When Honeycomb sets interface ipv4 address with prefix
95 | | ... | ${node} | ${interface} | @{ipv4_address2}
96 | | Then IPv4 address from Honeycomb should be
97 | | ... | ${node} | ${interface} | @{ipv4_address2}
98 | | And IPv4 address from VAT should be
99 | | ... | ${node} | ${interface} | @{ipv4_address2} | ${ipv4_mask}
100
101 | TC05: Honeycomb modifies IPv4 neighbor table
102 | | [Documentation] | Check if Honeycomb API can add and remove ARP entries.
103 | | [Teardown] | Honeycomb clears all interface ipv4 neighbors
104 | | ... | ${node} | ${interface}
105 | | Given IPv4 neighbor from Honeycomb should be empty
106 | | ... | ${node} | ${interface}
107 | | When Honeycomb adds interface ipv4 neighbor
108 | | ... | ${node} | ${interface} | @{ipv4_neighbor}
109 | | Then IPv4 neighbor from Honeycomb should be
110 | | ... | ${node} | ${interface} | @{ipv4_neighbor}
111
112 | TC06: Honeycomb modifies interface configuration - IPv6
113 | | [Documentation] | Check if Honeycomb API can configure interfaces for ipv6.
114 | | [Teardown] | Honeycomb removes interface ipv6 addresses | ${node}
115 | | ... | ${interface}
116 | | Given IPv6 address from Honeycomb should be empty
117 | | ... | ${node} | ${interface}
118 | | And IPv6 address from VAT should be empty
119 | | ... | ${node} | ${interface}
120 | | When Honeycomb sets interface ipv6 address
121 | | ... | ${node} | ${interface} | @{ipv6_address}
122 | | Then IPv6 address from Honeycomb should contain
123 | | ... | ${node} | ${interface} | @{ipv6_address}
124 | | And IPv6 address from VAT should contain
125 | | ... | ${node} | ${interface} | @{ipv6_address}
126
127 | TC07: Honeycomb modifies IPv6 neighbor table
128 | | [Documentation] | Check if Honeycomb API can add and remove ARP entries.
129 | | [Teardown] | Honeycomb clears all interface ipv6 neighbors
130 | | ... | ${node} | ${interface}
131 | | Given IPv6 neighbor from Honeycomb should be empty
132 | | ... | ${node} | ${interface}
133 | | When Honeycomb adds interface ipv6 neighbor
134 | | ... | ${node} | ${interface} | @{ipv6_neighbor}
135 | | Then IPv6 neighbor from Honeycomb should be
136 | | ... | ${node} | ${interface} | @{ipv6_neighbor}
137
138 | TC08: Honeycomb modifies interface configuration - MTU
139 | | [Documentation] | Check if Honeycomb API can configure interface\
140 | | ... | MTU value.
141 | | When Honeycomb sets interface ethernet configuration
142 | | ... | ${node} | ${interface} | ${ethernet}
143 | | Then Interface ethernet configuration from Honeycomb should be
144 | | ... | ${node} | ${interface} | ${ethernet}
145 | | And Interface ethernet configuration from VAT should be
146 | | ... | ${node} | ${interface} | ${ethernet['mtu']}
147
148 | TC09: Honeycomb modifies interface configuration - vrf
149 | | [Documentation] | Check if Honeycomb API can configure interface\
150 | | ... | vrf ID.
151 | | [Teardown] | Honeycomb sets interface vrf ID
152 | | ... | ${node} | ${interface} | ${0} | ipv4
153 | | When Honeycomb sets interface vrf ID
154 | | ... | ${node} | ${interface} | ${1} | ipv4
155 | | Then Interface vrf ID from Honeycomb should be
156 | | ... | ${node} | ${interface} | ${1} | ipv4
157 | | And Interface vrf ID from VAT should be
158 | | ... | ${node} | ${interface} | ${1}
159
160 | TC10: Honeycomb can configure multiple IP addresses on one interface
161 | | [Documentation] | [Top] TG=DUT1=TG.
162 | | ... | [Enc] Eth-IPv4-ICMP; Eth-IPv6-ICMPv6
163 | | ... | [Cfg] (Using Honeycomb API) On DUT1 set two IPv4 addresses\
164 | | ... | and two IPv6 addresses on first interfaces to TG and add ARP entries\
165 | | ... | for each address.
166 | | ... | [Ver] Send ICMP packets from TG to DUT, using different sets\
167 | | ... | of source and destination IP addresses. Receive an ICMP reply\
168 | | ... | for every packet sent.
169 | | When Honeycomb sets interface ipv4 address with prefix
170 | | ... | ${node} | ${interface} | @{ipv4_address}
171 | | And Honeycomb adds interface ipv4 address
172 | | ... | ${node} | ${interface} | @{ipv4_address2}
173 | | And Honeycomb sets interface ipv6 address
174 | | ... | ${node} | ${interface} | @{ipv6_address}
175 | | And Honeycomb adds interface ipv6 address
176 | | ... | ${node} | ${interface} | @{ipv6_address2}
177 | | Then IPv4 address from Honeycomb should be
178 | | ... | ${node} | ${interface} | @{ipv4_address}
179 | | And IPv4 address from VAT should be
180 | | ... | ${node} | ${interface} | @{ipv4_address} | ${ipv4_mask}
181 | | And IPv6 address from Honeycomb should contain
182 | | ... | ${node} | ${interface} | @{ipv6_address}
183 | | And IPv6 address from VAT should contain
184 | | ... | ${node} | ${interface} | @{ipv6_address}
185 | | When Path for 2-node testing is set
186 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
187 | | And Honeycomb sets interface state | ${dut_node} | ${interface} | up
188 | | And Honeycomb adds interface ipv4 neighbor | ${dut_node} | ${interface}
189 | | ... | @{ipv4_neighbor}
190 | | And Honeycomb adds interface ipv4 neighbor | ${dut_node} | ${interface}
191 | | ... | @{ipv4_neighbor2}
192 | | And Honeycomb adds interface ipv6 neighbor | ${dut_node} | ${interface}
193 | | ... | @{ipv6_neighbor}
194 | | And Honeycomb adds interface ipv6 neighbor | ${dut_node} | ${interface}
195 | | ... | @{ipv6_neighbor2}
196 | | Then Ping and Verify IP address | ${nodes['TG']}
197 | | ... | ${ipv4_neighbor[0]} | ${ipv4_address[0]}
198 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
199 | | ... | ${tg_to_dut_if1} | ${dut_to_tg_if1_mac}
200 | | And Ping and Verify IP address | ${nodes['TG']}
201 | | ... | ${ipv4_neighbor2[0]} | ${ipv4_address2[0]}
202 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
203 | | ... | ${tg_to_dut_if1} | ${dut_to_tg_if1_mac}
204 | | And Ping and Verify IP address | ${nodes['TG']}
205 | | ... | ${ipv6_neighbor[0]} | ${ipv6_address[0]}
206 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
207 | | ... | ${tg_to_dut_if1} | ${dut_to_tg_if1_mac}
208 | | And Ping and Verify IP address | ${nodes['TG']}
209 | | ... | ${ipv6_neighbor2[0]} | ${ipv6_address2[0]}
210 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
211 | | ... | ${tg_to_dut_if1} | ${dut_to_tg_if1_mac}
212
213 TC11: Honeycomb fails to configure two IPv4 addresses from the same subnet
214 | | [Documentation] | Check if Honeycomb can configure two IPv4 addresses in\
215 | | ... | the same subnet onto a single interface. It should not be possible.
216 | | [Teardown] | Honeycomb removes interface ipv4 addresses | ${node}
217 | | ... | ${interface}
218 | | When Honeycomb sets interface ipv4 address with prefix
219 | | ... | ${node} | ${interface} | 192.168.0.1 | ${9}
220 | | Then Honeycomb fails to add interface ipv4 address
221 | | ... | ${node} | ${interface} | 192.168.0.2 | ${9}
222 | | And Honeycomb fails to add interface ipv4 address
223 | | ... | ${node} | ${interface} | 192.232.0.2 | ${9}
224
225 TC12: Honeycomb fails to configure two IPv6 addresses from the same subnet
226 | | [Documentation] | Check if Honeycomb can configure two IPv6 addresses in\
227 | | ... | the same subnet onto a single interface. It should not be possible.
228 | | [Tags] | EXPECTED_FAILING
229 # Subnet validation on IPv6 not supported.
230 | | [Teardown] | Honeycomb removes interface ipv6 addresses | ${node}
231 | | ... | ${interface}
232 | | When Honeycomb sets interface ipv6 address
233 | | ... | ${node} | ${interface} | 10::FF10 | ${64}
234 | | Then Honeycomb fails to add interface ipv6 address
235 | | ... | ${node} | ${interface} | 10::FF11 | ${64}
236 | | And Honeycomb fails to add interface ipv6 address
237 | | ... | ${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.