HC Test: update proxyARP test case
[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 | Suite Teardown
34 | ... | Run Keyword If Any Tests Failed
35 | ... | Restart Honeycomb And VPP | ${node}
36 | Force Tags | HC_FUNC
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 | | ... | Show Packet Trace on all DUTs | ${nodes}
64 | | ... | AND | Honeycomb removes proxyARP configuration | ${node}
65 | | ... | AND | Honeycomb sets interface state
66 | | ... | ${dut_node} | ${dut_to_tg_if1} | down
67 | | ... | AND | Honeycomb removes interface ipv4 addresses
68 | | ... | ${node} | ${interface}
69 | | Given Path for 2-node testing is set
70 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
71 | | ${dut_to_tg_name}= | Get interface name | ${dut_node} | ${dut_to_tg_if1}
72 | | ${tg_to_dut_name}= | Get interface name | ${tg_node} | ${tg_to_dut_if1}
73 | | And Honeycomb sets interface state | ${dut_node} | ${dut_to_tg_if1} | up
74 | | And Honeycomb sets interface ipv4 address with prefix | ${dut_node}
75 | | ... | ${dut_to_tg_if1} | ${dut_to_tg_ip} | ${prefix_length}
76 | | When Honeycomb configures proxyARP | ${dut_node} | ${proxyarp_settings_ipv4}
77 | | And Honeycomb enables proxyARP on interface | ${node} | ${dut_to_tg_name}
78 | | Then Send ARP Request | ${tg_node} | ${tg_to_dut_name}
79 | | ...                   | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac}
80 | | ...                   | ${tg_to_dut_ip} | ${test_ip}

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