9263ebbc2a5dbfcd096eaf5474788fd8e2f8a0a4
[csit.git] / tests / func / honeycomb / mgmt-cfg-proxyarp-apihc-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 to run tests on.
16 | ${interface}= | ${node['interfaces']['port1']['name']}
17 | &{proxyarp_settings_ipv4}= | vrf-id=${0}
18 | ... | low-addr=192.168.1.2 | high-addr=192.168.1.10
19 | ${tg_to_dut_ip}= | 192.168.1.100
20 | ${dut_to_tg_ip}= | 192.168.1.1
21 | ${prefix_length}= | ${24}
22 | ${test_ip}= | 192.168.1.5
23
24 *** Settings ***
25 | Resource | resources/libraries/robot/default.robot
26 | Resource | resources/libraries/robot/honeycomb/honeycomb.robot
27 | Resource | resources/libraries/robot/honeycomb/interfaces.robot
28 | Resource | resources/libraries/robot/honeycomb/proxyarp.robot
29 | Resource | resources/libraries/robot/testing_path.robot
30 | Resource | resources/libraries/robot/ipv4.robot
31 | Resource | resources/libraries/robot/traffic.robot
32 | Library | resources.libraries.python.Trace
33 | Suite Teardown
34 | ... | Run Keyword If Any Tests Failed
35 | ... | Restart Honeycomb And VPP | ${node}
36 | Force Tags | honeycomb_sanity | honeycomb_odl
37 | Documentation | *Honeycomb proxyARP management test suite.*
38
39 *** Test Cases ***
40 # TODO: Add operational data and VAT dump verification if/when avaliable
41 | TC01: Honeycomb can configure ipv4 proxyARP
42 | | [Documentation] | Check if Honeycomb can configure the proxyARP feature.
43 | | [Teardown] | Honeycomb removes proxyARP configuration | ${node}
44 | | Honeycomb configures proxyARP | ${node} | ${proxyarp_settings_ipv4}
45
46 | TC02: Honeycomb can enable proxyarp on an interface
47 | | [Documentation] | Check if Honeycomb can enable the proxyARP feature\
48 | | ... | on an interface.
49 | | [Teardown] | Honeycomb disables proxyARP on interface
50 | | ... | ${node} | ${interface}
51 | | Honeycomb enables proxyARP on interface | ${node} | ${interface}
52
53 | TC03: DUT sends ARP reply on behalf of another machine from the IP range
54 | | [Documentation]
55 | | ... | [Top] TG-DUT1.
56 | | ... | [Ref] RFC1027.
57 | | ... | [Cfg] On DUT1 configure interface IPv4 address and proxy ARP
58 | | ... | for IP range, using Honeycomb API.
59 | | ... | [Ver] Make TG send ARP request to DUT1 interface,
60 | | ... | verify if DUT1 sends correct ARP reply on behalf of machine whose
61 | | ... | IP is in the configured range.
62 | | [Teardown] | Run Keywords
63 | | ... | Honeycomb removes proxyARP configuration | ${node}
64 | | ... | AND | Honeycomb sets interface state
65 | | ... | ${dut_node} | ${dut_to_tg_if1} | down
66 | | ... | AND | Honeycomb removes interface ipv4 addresses
67 | | ... | ${node} | ${interface}
68 | | Given Path for 2-node testing is set
69 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
70 | | ${tg_to_dut_if1_name}= | Get interface name | ${tg_node} | ${tg_to_dut_if1}
71 | | And Honeycomb sets interface state | ${dut_node} | ${dut_to_tg_if1} | up
72 | | And Honeycomb sets interface ipv4 address with prefix | ${dut_node}
73 | | ... | ${dut_to_tg_if1} | ${dut_to_tg_ip} | ${prefix_length}
74 | | When Honeycomb configures proxyARP | ${dut_node} | ${proxyarp_settings_ipv4}
75 | | And Honeycomb enables proxyARP on interface | ${node} | ${dut_to_tg_if1}
76 | | Then Send ARP Request | ${tg_node} | ${tg_to_dut_if1_name}
77 | | ...                   | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac}
78 | | ...                   | ${tg_to_dut_ip} | ${test_ip}