CSIT-1459: Migrate IP libraries from VAT to PAPI
[csit.git] / tests / vpp / func / ip4_tunnels / lisp / eth2p-ethip4lispgpe-ip4basevrf-func.robot
1 # Copyright (c) 2019 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 *** Settings ***
15 | Library | resources.libraries.python.InterfaceUtil
16 | Library | resources.libraries.python.IPUtil
17 | Library | resources.libraries.python.NodePath
18 | Library | resources.libraries.python.topology.Topology
19 | Library | resources.libraries.python.Trace
20 | Library | resources.libraries.python.VhostUser
21 | Library | resources.libraries.python.VPPUtil
22 | ...
23 | Resource | resources/libraries/robot/ip/ip4.robot
24 | Resource | resources/libraries/robot/l2/l2_bridge_domain.robot
25 | Resource | resources/libraries/robot/overlay/lispgpe.robot
26 | Resource | resources/libraries/robot/shared/default.robot
27 | Resource | resources/libraries/robot/shared/interfaces.robot
28 | Resource | resources/libraries/robot/shared/testing_path.robot
29 | Resource | resources/libraries/robot/shared/traffic.robot
30 | Resource | resources/libraries/robot/vm/qemu.robot
31 | ...
32 # Import configuration and test data:
33 | Variables | resources/test_data/lisp/ipv4_lispgpe_ipv4/ipv4_lispgpe_ipv4.py
34 | ...
35 | Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | LISP
36 | ...
37 | Test Setup | Set up functional test
38 | ...
39 | Test Teardown | Tear down LISP functional test
40 | ...
41 | Documentation | *ip4-lispgpe-ip4 encapsulation test cases*
42 | ...
43 | ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology\
44 | ... | with single links between nodes.
45 | ... | *[Enc] Packet Encapsulations:* Eth-IPv4-LISP-IPv4-ICMPv4 on DUT1-DUT2,\
46 | ... | Eth-IPv4-ICMPv4 on TG-DUTn for IPv4 routing over LISPoIPv4 tunnel.
47 | ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with IPv4\
48 | ... | routing and static routes. LISPoIPv4 tunnel is configured between\
49 | ... | DUT1 and DUT2.
50 | ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets are sent in\
51 | ... | both directions by TG on links to DUT1 and DUT2; on receive\
52 | ... | TG verifies packets for correctness and their IPv4 src-addr, dst-addr\
53 | ... | and MAC addresses.
54 | ... | *[Ref] Applicable standard specifications:* RFC6830.
55
56 *** Test Cases ***
57 | TC01: DUT1 and DUT2 route IPv4 bidirectionally over LISP GPE tunnel using physical interfaces and VRF is enabled
58 | | [Documentation]
59 | | ... | [Top] TG-DUT1-DUT2-TG.
60 | | ... | [Enc] Eth-IPv4-LISPGPE-IPv4-ICMPv4 on DUT1-DUT2, Eth-IPv4-ICMPv4 on\
61 | | ... | TG-DUTn.
62 | | ... | [Cfg] Configure IPv4 LISP static adjacencies on DUT1 and DUT2.
63 | | ... | [Ver] Case: ip4-lispgpe-ip4 - vrf, phy2lisp
64 | | ... | Make TG send ICMPv4 Echo Req between its interfaces across both\
65 | | ... | DUTs and LISP GPE tunnel between them; verify IPv4 headers on\
66 | | ... | received packets are correct.
67 | | ... | [Ref] RFC6830.
68 | | ...
69 | | Given Configure path in 3-node circular topology
70 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
71 | | And Set interfaces in 3-node circular topology up
72 | | And Add Fib Table | ${dut1_node} | ${fib_table_1}
73 | | And Add Fib Table | ${dut2_node} | ${fib_table_1}
74 | | And Assign Interface To Fib Table | ${dut1_node}
75 | | ... | ${dut1_to_tg} | ${fib_table_1}
76 | | And Assign Interface To Fib Table | ${dut2_node}
77 | | ... | ${dut2_to_tg} | ${fib_table_1}
78 | | And Add IP Neighbors
79 | | And Configure IP addresses on interfaces
80 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip4} | ${prefix4}
81 | | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_to_tg_ip4} | ${prefix4}
82 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_dut1_ip4} | ${prefix4}
83 | | ... | ${dut2_node} | ${dut2_to_tg} | ${dut2_to_tg_ip4} | ${prefix4}
84 | | When Configure LISP GPE topology in 3-node circular topology
85 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE}
86 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE}
87 | | ... | ${duts_locator_set} | ${dut1_ip4_eid} | ${dut2_ip4_eid}
88 | | ... | ${dut1_to_dut2_ip4_static_adjacency}
89 | | ... | ${dut2_to_dut1_ip4_static_adjacency}
90 | | ... | ${dut1_dut2_vni} | ${fib_table_1}
91 | | Then Send packet and verify headers
92 | | ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4}
93 | | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac}
94 | | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac}
95 | | And Send packet and verify headers
96 | | ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4}
97 | | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac}
98 | | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac}
99
100 *** Keywords ***
101 | Add IP Neighbors
102 | | [Documentation]
103 | | ... | Add IP neighbors to physical interfaces on DUTs.
104 | | ...
105 | | VPP Add IP Neighbor
106 | | ... | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip4} | ${tg_to_dut1_mac}
107 | | VPP Add IP Neighbor
108 | | ... | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip4} | ${tg_to_dut2_mac}
109 | | VPP Add IP Neighbor | ${dut1_node}
110 | | ... | ${dut1_to_dut2} | ${dut2_to_dut1_ip4} | ${dut2_to_dut1_mac}
111 | | VPP Add IP Neighbor | ${dut2_node}
112 | | ... | ${dut2_to_dut1} | ${dut1_to_dut2_ip4} | ${dut1_to_dut2_mac}