CSIT-1386 KernelVM - Part I
[csit.git] / tests / vpp / func / vm_vhost / l2xc / eth2p-eth-l2xcbase-eth-2vhost-1vm-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/shared/default.robot
16 | Resource | resources/libraries/robot/l2/l2_xconnect.robot
17 | Resource | resources/libraries/robot/l2/l2_traffic.robot
18 | Resource | resources/libraries/robot/shared/testing_path.robot
19 | Resource | resources/libraries/robot/shared/interfaces.robot
20 | Resource | resources/libraries/robot/l2/l2_bridge_domain.robot
21 | Library  | resources.libraries.python.Trace
22 | Library | resources.libraries.python.NodePath
23 | Force Tags | 3_NODE_DOUBLE_LINK_TOPO | HW_ENV | VM_ENV | VPP_VM_ENV
24 | Test Setup | Set up functional test
25 | Test Teardown | Tear down functional test
26 | Documentation | *L2 cross-connect test cases*
27 | ...
28 | ... | *[Top] Network Topologies:* TG=DUT=VM 3-node topology with VM and
29 | ... | double parallel links.
30 | ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 for L2 switching of IPv4;
31 | ... | Eth-IPv6-ICMPv6 for L2 switching of IPv6 use. Both apply to all links.
32 | ... | *[Cfg] DUT configuration:* DUT1 is configured with L2 cross-connect
33 | ... | (L2XC) switching.
34 | ... | *[Ver] TG verification:* Test ICMPv4 (or ICMPv6) Echo Request packets are
35 | ... | sent in both directions by TG on links to DUT1 via VM; on receive TG
36 | ... | verifies packets for correctness and their IPv4 (IPv6) src-addr,
37 | ... | dst-addr and MAC addresses.
38 | ... | *[Ref] Applicable standard specifications:*
39
40 *** Variables ***
41 | ${sock1}= | /tmp/sock1
42 | ${sock2}= | /tmp/sock2
43
44 *** Test Cases ***
45 | TC01: DUT with two L2XCs switches ICMPv4 between TG and local VM links
46 | | [Documentation]
47 | | ... | [Top] TG=DUT=VM. [Enc] Eth-IPv4-ICMPv4. [Cfg] On DUT configure \
48 | | ... | two L2 cross-connects (L2XC), each with one untagged interface
49 | | ... | to TG and untagged i/f to local VM over vhost-user. [Ver] Make
50 | | ... | TG send ICMPv4 Echo Reqs in both directions between two of its
51 | | ... | i/fs to be switched by DUT to and from VM; verify all packets
52 | | ... | are received. [Ref]
53 | | ...
54 | | [Teardown] | Run Keywords | Stop and clear QEMU | ${dut_node}
55 | | ... | AND | Tear down functional test
56 | | ...
57 | | Given Configure path in 2-node circular topology
58 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
59 | | And Set interfaces in 2-node circular topology up
60 | | When Configure vhost interfaces for L2BD forwarding | ${dut_node}
61 | | ... | ${sock1} | ${sock2}
62 | | And Configure L2XC | ${dut_node} | ${dut_to_tg_if1} | ${vhost_if1}
63 | | And Configure L2XC | ${dut_node} | ${dut_to_tg_if2} | ${vhost_if2}
64 | | And Configure VM for vhost L2BD forwarding | ${dut_node} | ${sock1}
65 | | ... | ${sock2}
66 | | Then Send ICMPv4 bidirectionally and verify received packets | ${tg_node}
67 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if2}
68
69 | TC02: DUT with two L2XCs switches ICMPv6 between TG and local VM links
70 | | [Documentation]
71 | | ... | [Top] TG=DUT=VM. [Enc] Eth-IPv6-ICMPv6. [Cfg] On DUT configure \
72 | | ... | two L2 cross-connects (L2XC), each with one untagged i/f to TG
73 | | ... | and untagged i/f to local VM over vhost-user. [Ver] Make TG send
74 | | ... | ICMPv6 Echo Reqs in both directions between two of its i/fs to
75 | | ... | be switched by DUT to and from VM; verify all packets are
76 | | ... | received. [Ref]
77 | | ...
78 | | [Teardown] | Run Keywords | Stop and clear QEMU | ${dut_node}
79 | | ... | AND | Tear down functional test
80 | | ...
81 | | Given Configure path in 2-node circular topology
82 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
83 | | And Set interfaces in 2-node circular topology up
84 | | When Configure vhost interfaces for L2BD forwarding | ${dut_node}
85 | | ... | ${sock1} | ${sock2}
86 | | And Configure L2XC | ${dut_node} | ${dut_to_tg_if1} | ${vhost_if1}
87 | | And Configure L2XC | ${dut_node} | ${dut_to_tg_if2} | ${vhost_if2}
88 | | And Configure VM for vhost L2BD forwarding | ${dut_node} | ${sock1}
89 | | ... | ${sock2}
90 | | Then Send ICMPv6 bidirectionally and verify received packets | ${tg_node}
91 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if2}
92