CSIT-664: Refactor setups and teardowns
[csit.git] / tests / func / lisp / eth2p-ethip4lispgpe-ip6base-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 *** Settings ***
15 | Resource | resources/libraries/robot/default.robot
16 | Resource | resources/libraries/robot/testing_path.robot
17 | Resource | resources/libraries/robot/ipv4.robot
18 | Resource | resources/libraries/robot/traffic.robot
19 | Resource | resources/libraries/robot/lisp/lisp_static_adjacency.robot
20 | Resource | resources/libraries/robot/l2_traffic.robot
21 | Resource | resources/libraries/robot/lisp/lispgpe.robot
22 | Resource | resources/libraries/robot/bridge_domain.robot
23 | Resource | resources/libraries/robot/qemu.robot
24 | Library  | resources.libraries.python.IPUtil
25 | Library | resources.libraries.python.VhostUser
26 | Library  | resources.libraries.python.Trace
27 | Library  | resources.libraries.python.VPPUtil
28 # import additional Lisp settings from resource file
29 | Variables | resources/test_data/lisp/static_adjacency/lisp_static_adjacency.py
30 | ...
31 | Force Tags | 3_NODE_SINGLE_LINK_TOPO | 3_NODE_DOUBLE_LINK_TOPO
32 | ... | VM_ENV | HW_ENV
33 | ...
34 | Test Setup | Set up functional test
35 | ...
36 | Test Teardown | Tear down functional test
37 | ...
38 | Documentation | *LISP static adjacency test cases*
39 | ...
40 | ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology\
41 | ... | with single links between nodes.
42 | ... | *[Enc] Packet Encapsulations:* Eth-IPv4-LISP-IPv6-ICMPv6 on DUT1-DUT2,\
43 | ... | Eth-IPv6-ICMPv6 on TG-DUTn for IPv6 routing over LISPoIPv4 tunnel.
44 | ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with IPv6\
45 | ... | routing and static routes. LISPoIPv4 tunnel is configured\
46 | ... | between DUT1 and DUT2.
47 | ... | *[Ver] TG verification:* Test ICMPv6 Echo Request packets\
48 | ... | are sent in both directions by TG on links to DUT1 and DUT2; on receive\
49 | ... | TG verifies packets for correctness and their IPv6 src-addr,\
50 | ... | dst-addr and MAC addresses.
51 | ... | *[Ref] Applicable standard specifications:* RFC6830.
52
53 *** Test Cases ***
54 | TC01: DUT1 and DUT2 route IPv6 bidirectionally over LISPoIPv4 tunnel
55 | | [Documentation]
56 | | ... | [Top] TG-DUT1-DUT2-TG.
57 | | ... | [Enc] Eth-IPv4-LISP-IPv6-ICMPv6 on DUT1-DUT2, Eth-IPv6-ICMPv6 on\
58 | | ... | TG-DUTn.
59 | | ... | [Cfg] On DUT1 and DUT2 configure IPv4 LISP static adjacencies.
60 | | ... | [Ver] Make TG send ICMPv6 Echo Req between its interfaces across both\
61 | | ... | DUTs and LISP tunnel between them; verify IPv6 headers on received\
62 | | ... | packets are correct.
63 | | ... | [Cfg2] Reconf LISP.
64 | | ... | [Ver2] Verify packets are received again via LISP tunnel.
65 | | ... | [Ref] RFC6830.
66 | | Given Configure path in 3-node circular topology
67 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
68 | | And Set interfaces in 3-node circular topology up
69 | | And Configure IP addresses on interfaces
70 | | ... | ${dut1_node} | ${dut1_to_dut2}
71 | | ... | ${dut1_to_dut2_ip6o4} | ${dut_prefix6o4}
72 | | ... | ${dut1_node} | ${dut1_to_tg}
73 | | ... | ${dut1_to_tg_ip6o4} | ${tg_prefix6o4}
74 | | ... | ${dut2_node} | ${dut2_to_dut1}
75 | | ... | ${dut2_to_dut1_ip6o4} | ${dut_prefix6o4}
76 | | ... | ${dut2_node} | ${dut2_to_tg}
77 | | ... | ${dut2_to_tg_ip6o4} | ${tg_prefix6o4}
78 | | And Add IP Neighbors
79 | | And Vpp All RA Suppress Link Layer | ${nodes}
80 | | When Configure LISP topology in 3-node circular topology
81 | | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE}
82 | | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE}
83 | | ... | ${duts_locator_set} | ${dut1_ip6o4_eid} | ${dut2_ip6o4_eid}
84 | | ... | ${dut1_ip6o4_static_adjacency} | ${dut2_ip6o4_static_adjacency}
85 | | Then Send packet and verify headers
86 | | ... | ${tg_node} | ${tg1_ip6o4} | ${tg2_ip6o4}
87 | | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac}
88 | | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac}
89 | | And Send packet and verify headers
90 | | ... | ${tg_node} | ${tg2_ip6o4} | ${tg1_ip6o4}
91 | | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac}
92 | | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac}
93 | | When Change LISP Configuration | ${dut1_node} | ${dut2_node}
94 | | ... | ${dut1_to_dut2} | ${dut2_to_dut1} | ${dut1_to_dut2_mac}
95 | | ... | ${dut2_to_dut1_mac} | ${dut1_to_dut2_ip6o4}
96 | | ... | ${dut2_to_dut1_ip6o4_reconf} | ${dut_prefix6o4}
97 | | ... | ${dut1_ip6o4_static_adjacency}
98 | | ... | ${dut1_ip6o4_static_adjacency_reconf}
99 | | Then Send packet and verify headers
100 | | ... | ${tg_node} | ${tg1_ip6o4} | ${tg2_ip6o4}
101 | | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac}
102 | | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac}
103 | | And Send packet and verify headers
104 | | ... | ${tg_node} | ${tg2_ip6o4} | ${tg1_ip6o4}
105 | | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac}
106 | | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac}
107
108 *** Keywords ***
109 | Add IP Neighbors
110 | | [Documentation]
111 | | ... | Add IP neighbors to physical interfaces on DUTs.
112 | | ...
113 | | Add IP Neighbor | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip6o4}
114 | | ... | ${tg_to_dut1_mac}
115 | | Add IP Neighbor | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip6o4}
116 | | ... | ${tg_to_dut2_mac}
117 | | Add IP Neighbor | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip6o4}
118 | | ... | ${dut2_to_dut1_mac}
119 | | Add IP Neighbor | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip6o4}
120 | | ... | ${dut1_to_dut2_mac}