CSIT-604: Bootstrap file for vpp-csit-verify-master-centos7-nightly
[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}= | 10.0.0.100
20 | ${dut_to_tg_ip}= | 10.0.0.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 | ...
34 | Suite Setup | Set Up Honeycomb Functional Test Suite | ${node}
35 | ...
36 | Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node}
37 | ...
38 | Force Tags | HC_FUNC
39 | ...
40 | Documentation | *Honeycomb proxyARP management test suite.*
41
42 *** Test Cases ***
43 # TODO: Add operational data and VAT dump verification if/when avaliable
44 | TC01: Honeycomb can configure ipv4 proxyARP
45 | | [Documentation] | Check if Honeycomb can configure the proxyARP feature.
46 | | ...
47 | | [Teardown] | Honeycomb removes proxyARP configuration | ${node}
48 | | ...
49 | | Honeycomb configures proxyARP | ${node} | ${proxyarp_settings_ipv4}
50
51 | TC02: Honeycomb can enable proxyarp on an interface
52 | | [Documentation] | Check if Honeycomb can enable the proxyARP feature\
53 | | ... | on an interface.
54 | | ...
55 | | [Teardown] | Honeycomb disables proxyARP on interface
56 | | ... | ${node} | ${interface}
57 | | ...
58 | | Honeycomb enables proxyARP on interface | ${node} | ${interface}
59
60 | TC03: DUT sends ARP reply on behalf of another machine from the IP range
61 | | [Documentation]
62 | | ... | [Top] TG-DUT1.
63 | | ... | [Ref] RFC1027.
64 | | ... | [Cfg] On DUT1 configure interface IPv4 address and proxy ARP
65 | | ... | for IP range, using Honeycomb API.
66 | | ... | [Ver] Make TG send ARP request to DUT1 interface,
67 | | ... | verify if DUT1 sends correct ARP reply on behalf of machine whose
68 | | ... | IP is in the configured range.
69 | | ...
70 | | [Teardown] | Run Keywords
71 | | ... | Show Packet Trace on all DUTs | ${nodes}
72 | | ... | AND | Honeycomb removes proxyARP configuration | ${node}
73 | | ... | AND | Honeycomb configures interface state
74 | | ... | ${dut_node} | ${dut_to_tg_if1} | down
75 | | ... | AND | Honeycomb removes interface IPv4 addresses
76 | | ... | ${node} | ${interface}
77 | | ...
78 | | Given Configure path in 2-node circular topology
79 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
80 | | ${dut_to_tg_name}= | Get interface name | ${dut_node} | ${dut_to_tg_if1}
81 | | ${tg_to_dut_name}= | Get interface name | ${tg_node} | ${tg_to_dut_if1}
82 | | And Honeycomb configures interface state | ${dut_node} | ${dut_to_tg_if1} | up
83 | | And Honeycomb sets interface IPv4 address with prefix | ${dut_node}
84 | | ... | ${dut_to_tg_if1} | ${dut_to_tg_ip} | ${prefix_length}
85 | | When Honeycomb configures proxyARP | ${dut_node} | ${proxyarp_settings_ipv4}
86 | | And Honeycomb enables proxyARP on interface | ${node} | ${dut_to_tg_name}
87 | | Then Send ARP Request | ${tg_node} | ${tg_to_dut_name}
88 | | ... | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac}
89 | | ... | ${tg_to_dut_ip} | ${test_ip}