VPP_Device - add baseline tests - part IIa) 72/16372/25
authorJan Gelety <jgelety@cisco.com>
Thu, 6 Dec 2018 12:23:05 +0000 (13:23 +0100)
committerJan Gelety <jgelety@cisco.com>
Thu, 10 Jan 2019 07:22:57 +0000 (07:22 +0000)
CSIT-1372

Add following baseline tests to VPP_Device:
- ip4
  eth2p-ethip4-ip4base-eth-2vhost-1vm-dev

- ip6
  eth2p-ethip6-ip6base-eth-2vhost-1vm-dev

- l2bd
  eth2p-eth-l2bdbasemaclrn-eth-2vhost-1vm-dev

- l2xc
  eth2p-eth-l2xcbase-eth-2vhost-1vm-dev

+ fix doc strings in all vpp_device tests

Change-Id: Icc5ed801f3e8f6dedaa611779bd86fc20102fa74
Signed-off-by: Jan Gelety <jgelety@cisco.com>
13 files changed:
resources/libraries/bash/function/device.sh
resources/libraries/python/L2Util.py
resources/libraries/python/QemuUtils.py
resources/libraries/python/ssh.py
tests/vpp/device/__init__.robot
tests/vpp/device/ip4/eth2p-ethip4-ip4base-dev.robot
tests/vpp/device/ip6/eth2p-ethip6-ip6base-dev.robot
tests/vpp/device/l2bd/eth2p-eth-l2bdbasemaclrn-dev.robot
tests/vpp/device/l2xc/eth2p-ethicmp-l2xcbase-dev.robot
tests/vpp/device/vm_vhost/ip4/eth2p-ethip4-ip4base-eth-2vhost-1vm-dev.robot [new file with mode: 0644]
tests/vpp/device/vm_vhost/ip6/eth2p-ethip6-ip6base-eth-2vhost-1vm-dev.robot [new file with mode: 0644]
tests/vpp/device/vm_vhost/l2bd/eth2p-eth-l2bdbasemaclrn-eth-2vhost-1vm-dev.robot [new file with mode: 0644]
tests/vpp/device/vm_vhost/l2xc/eth2p-eth-l2xcbase-eth-2vhost-1vm-dev.robot [new file with mode: 0644]

index e4ed319..7363dc0 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2018 Cisco and/or its affiliates.
+# Copyright (c) 2019 Cisco and/or its affiliates.
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at:
@@ -517,6 +517,8 @@ function start_topology_containers () {
     # Mount vfio to be able to bind to see binded interfaces. We cannot use
     # --device=/dev/vfio as this does not see newly binded interfaces.
     dcr_stc_params+="--volume /dev/vfio:/dev/vfio "
+    # Mount nested_vm image to be able to run VM tests.
+    dcr_stc_params+="--volume /var/lib/vm/vhost-nested.img:/var/lib/vm/vhost-nested.img "
 
     # Docker Container UUIDs.
     declare -gA DCR_UUIDS
index 97cef61..52d1385 100644 (file)
@@ -283,7 +283,7 @@ class L2Util(object):
         :param br_name: Bridge name.
         :param set_down: Change bridge interface state to down before delbr
             command. Optional. Default: True.
-        :type node: str
+        :type node: dict
         :type br_name: str
         :type set_down: bool
         """
index ff3a00f..037d0de 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2018 Cisco and/or its affiliates.
+# Copyright (c) 2019 Cisco and/or its affiliates.
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at:
@@ -213,7 +213,10 @@ class QemuUtils(object):
         self._ssh = SSH()
         self._ssh.connect(node)
         self._vm_info['host'] = node['host']
-
+        if node['port'] != 22:
+            self._vm_info['host_port'] = node['port']
+            self._vm_info['host_username'] = node['username']
+            self._vm_info['host_password'] = node['password']
         arch = Topology.get_node_arch(node)
         self._qemu_opt['qemu_bin'] = 'qemu-system-{arch}'.format(arch=arch)
 
index 108c1e4..4beec5a 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2018 Cisco and/or its affiliates.
+# Copyright (c) 2019 Cisco and/or its affiliates.
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at:
 
 """Library for SSH connection management."""
 
+import paramiko
+import socket
 import StringIO
-from time import time, sleep
 
-import socket
-import paramiko
 from paramiko import RSAKey
-from paramiko.ssh_exception import SSHException
-from scp import SCPClient
+from paramiko.ssh_exception import SSHException, NoValidConnectionsError
 from robot.api import logger
+from scp import SCPClient
+from time import time, sleep
 
 __all__ = ["exec_cmd", "exec_cmd_no_error"]
 
@@ -104,6 +104,10 @@ class SSH(object):
             except SSHException:
                 raise IOError('Cannot connect to {host}'.
                               format(host=node['host']))
+            except NoValidConnectionsError as err:
+                logger.error(repr(err))
+                raise IOError('Unable to connect to port {port} on {host}'.
+                              format(port=node['port'], host=node['host']))
 
     def disconnect(self, node):
         """Close SSH connection to the node.
@@ -320,7 +324,7 @@ class SSH(object):
     def interactive_terminal_close(chan):
         """Close interactive terminal SSH channel.
 
-        :param: chan: SSH channel to be closed.
+        :param chan: SSH channel to be closed.
         """
         chan.close()
 
@@ -371,6 +375,17 @@ def exec_cmd(node, cmd, timeout=600, sudo=False):
     """Convenience function to ssh/exec/return rc, out & err.
 
     Returns (rc, stdout, stderr).
+
+    :param node: The node to execute command on.
+    :param cmd: Command to execute.
+    :param timeout: Timeout value in seconds. Default: 600.
+    :param sudo: Sudo privilege execution flag. Default: False.
+    :type node: dict
+    :type cmd: str
+    :type timeout: int
+    :type sudo: bool
+    :returns: RC, Stdout, Stderr.
+    :rtype: tuple(int, str, str)
     """
     if node is None:
         raise TypeError('Node parameter is None')
@@ -380,10 +395,35 @@ def exec_cmd(node, cmd, timeout=600, sudo=False):
         raise ValueError('Empty command parameter')
 
     ssh = SSH()
+
+    if node.get('host_port') is not None:
+        ssh_node = dict()
+        ssh_node['host'] = '127.0.0.1'
+        ssh_node['port'] = node['port']
+        ssh_node['username'] = node['username']
+        ssh_node['password'] = node['password']
+        import pexpect
+        options = '-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null'
+        tnl = '-L {port}:127.0.0.1:{port}'.format(port=node['port'])
+        ssh_cmd = 'ssh {tnl} {op} {user}@{host} -p {host_port}'.\
+            format(tnl=tnl, op=options, user=node['host_username'],
+                   host=node['host'], host_port=node['host_port'])
+        logger.trace('Initializing local port forwarding:\n{ssh_cmd}'.
+                     format(ssh_cmd=ssh_cmd))
+        child = pexpect.spawn(ssh_cmd)
+        child.expect('.* password: ')
+        logger.trace(child.after)
+        child.sendline(node['host_password'])
+        child.expect('Welcome .*')
+        logger.trace(child.after)
+        logger.trace('Local port forwarding finished.')
+    else:
+        ssh_node = node
+
     try:
-        ssh.connect(node)
+        ssh.connect(ssh_node)
     except SSHException as err:
-        logger.error("Failed to connect to node" + str(err))
+        logger.error("Failed to connect to node" + repr(err))
         return None, None, None
 
     try:
@@ -393,7 +433,7 @@ def exec_cmd(node, cmd, timeout=600, sudo=False):
             (ret_code, stdout, stderr) = ssh.exec_command_sudo(cmd,
                                                                timeout=timeout)
     except SSHException as err:
-        logger.error(err)
+        logger.error(repr(err))
         return None, None, None
 
     return ret_code, stdout, stderr
@@ -416,7 +456,7 @@ def exec_cmd_no_error(node, cmd, timeout=600, sudo=False, message=None):
     :type message: str
     :returns: Stdout, Stderr.
     :rtype: tuple(str, str)
-    :raise RuntimeError: If bash return code is not 0.
+    :raises RuntimeError: If bash return code is not 0.
     """
     ret_code, stdout, stderr = exec_cmd(node, cmd, timeout=timeout, sudo=sudo)
     msg = ('Command execution failed: "{cmd}"\n{stderr}'.
index 916a903..8b0788c 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2018 Cisco and/or its affiliates.
+# Copyright (c) 2019 Cisco and/or its affiliates.
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at:
@@ -17,6 +17,7 @@
 | Library | resources.libraries.python.SetupFramework
 | Library | resources.libraries.python.SetupFramework.CleanupFramework
 | Library | resources.libraries.python.CpuUtils
+| ...
 | Suite Setup | Run Keywords | Setup Global Variables
 | ... | AND | Setup Framework | ${nodes}
 | ... | AND | Install Vpp On All Duts | ${nodes} | ${packages_dir}
@@ -25,6 +26,7 @@
 | ... | AND | Get CPU Layout from all nodes | ${nodes}
 | ... | AND | Update All Interface Data On All Nodes | ${nodes}
 | ...       | skip_tg_udev=${True}
+| ...
 | Suite Teardown | Cleanup Framework | ${nodes}
 
 *** Keywords ***
index 3456079..22bb4c3 100644 (file)
 | ...
 | Documentation | *IPv4 routing test cases*
 | ...
-| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology\
+| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology \
 | ... | with single links between nodes.
-| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 for IPv4 routing on both\
-| ... | links.
-| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4 routing and two\
-| ... | static IPv4 /24 route entries.
-| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets are sent in\
-| ... | one direction by TG on links to DUT1; on receive TG verifies packets\
+| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 for IPv4 routing on \
+| ... | both links.
+| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4 routing and \
+| ... | two static IPv4 /24 route entries.
+| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets are sent in \
+| ... | one direction by TG on links to DUT1; on receive TG verifies packets \
 | ... | for correctness and their IPv4 src-addr, dst-addr and MAC addresses.
 | ... | *[Ref] Applicable standard specifications:* RFC791, RFC826, RFC792
 
@@ -49,7 +49,7 @@
 *** Test Cases ***
 | tc01-eth2p-ethicmpv4-ip4base-device_echo-req-to-dut-ingress-interface
 | | [Documentation]
-| | ... | Make TG send ICMPv4 Echo Req to DUT1 ingress interface. Make TG\
+| | ... | Make TG send ICMPv4 Echo Req to DUT1 ingress interface. Make TG \
 | | ... | verify ICMP Echo Reply is correct.
 | | ...
 | | ${hops}= | Set Variable | ${0}
@@ -66,7 +66,7 @@
 
 | tc02-eth2p-ethicmpv4-ip4base-device_echo-req-to-dut-egress-interface
 | | [Documentation]
-| | ... | Make TG send ICMPv4 Echo Req towards DUT1 egress interface. Make TG\
+| | ... | Make TG send ICMPv4 Echo Req towards DUT1 egress interface. Make TG \
 | | ... | verify ICMP Echo Reply is correct.
 | | ...
 | | ${hops}= | Set Variable | ${0}
@@ -83,8 +83,8 @@
 
 | tc03-eth2p-ethicmpv4-ip4base-device_echo-req-to-tg-interface-for-local-ipv4-address
 | | [Documentation]
-| | ... | Make TG send ICMPv4 Echo Req between its interfaces across DUT1 for\
-| | ... | locally connected IPv4 addresses. Make TG verify ICMPv4 Echo Replies\
+| | ... | Make TG send ICMPv4 Echo Req between its interfaces across DUT1 for \
+| | ... | locally connected IPv4 addresses. Make TG verify ICMPv4 Echo Replies \
 | | ... | are correct.
 | | ...
 | | ${hops}= | Set Variable | ${1}
 
 | tc04-eth2p-ethicmpv4-ip4base-device_echo-req-to-tg-interface-for-remote-host-ipv4-address
 | | [Documentation]
-| | ... | Make TG send ICMPv4 Echo Req between its interfaces across DUT1 for\
-| | ... | remote host IPv4 addresses. Make TG verify ICMPv4 Echo Replies are\
+| | ... | Make TG send ICMPv4 Echo Req between its interfaces across DUT1 for \
+| | ... | remote host IPv4 addresses. Make TG verify ICMPv4 Echo Replies are \
 | | ... | correct.
 | | ...
 | | ${hops}= | Set Variable | ${1}
index e1ba73b..9993c92 100644 (file)
 | ...
 | Documentation | *IPv6 routing test cases*
 | ...
-| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology\
+| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology \
 | ... | with single links between nodes.
-| ... | *[Enc] Packet Encapsulations:* Eth-IPv6-ICMPv6 for IPv6 routing on both\
-| ... | links.
-| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv6 routing and two\
-| ... | static IPv6 /64 route entries.
-| ... | *[Ver] TG verification:* Test ICMPv6 Echo Request packets are sent in\
-| ... | one direction by TG on links to DUT1; on receive TG verifies packets\
+| ... | *[Enc] Packet Encapsulations:* Eth-IPv6-ICMPv6 for IPv6 routing on \
+| ... | both links.
+| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv6 routing and \
+| ... | two static IPv6 /64 route entries.
+| ... | *[Ver] TG verification:* Test ICMPv6 Echo Request packets are sent in \
+| ... | one direction by TG on links to DUT1; on receive TG verifies packets \
 | ... | for correctness and their IPv6 src-addr, dst-addr and MAC addresses.
 | ... | *[Ref] Applicable standard specifications:* RFC2460, RFC4443, RFC4861
 
@@ -49,7 +49,7 @@
 *** Test Cases ***
 | tc01-eth2p-ethicmpv6-ip6base-device_echo-req-to-dut-ingress-interface
 | | [Documentation]
-| | ... | Make TG send ICMPv6 Echo Req to DUT1 ingress interface. Make TG\
+| | ... | Make TG send ICMPv6 Echo Req to DUT1 ingress interface. Make TG \
 | | ... | verify ICMPv6 Echo Reply is correct.
 | | ...
 | | ${hops}= | Set Variable | ${0}
@@ -67,7 +67,7 @@
 
 | tc02-eth2p-ethicmpv6-ip6base-device_echo-req-to-dut-egress-interface
 | | [Documentation]
-| | ... | Make TG send ICMPv6 Echo Req towards DUT1 egress interface. Make TG\
+| | ... | Make TG send ICMPv6 Echo Req towards DUT1 egress interface. Make TG \
 | | ... | verify ICMPv6 Echo Reply is correct.
 | | ...
 | | ${hops}= | Set Variable | ${0}
@@ -85,8 +85,8 @@
 
 | tc03-eth2p-ethicmpv6-ip6base-device_echo-req-to-tg-interface-for-local-ipv4-address
 | | [Documentation]
-| | ... | Make TG send ICMPv6 Echo Req between its interfaces across DUT1 for\
-| | ... | locally connected IPv6 addresses. Make TG verify ICMPv6 Echo Replies\
+| | ... | Make TG send ICMPv6 Echo Req between its interfaces across DUT1 for \
+| | ... | locally connected IPv6 addresses. Make TG verify ICMPv6 Echo Replies \
 | | ... | are correct.
 | | ...
 | | ${hops}= | Set Variable | ${1}
 
 | tc04-eth2p-ethicmpv6-ip6base-device_echo-req-to-tg-interface-for-remote-host-ipv4-address
 | | [Documentation]
-| | ... | Make TG send ICMPv6 Echo Req between its interfaces across DUT1 for\
-| | ... | remote host IPv6 addresses. Make TG verify ICMPv6 Echo Replies are\
+| | ... | Make TG send ICMPv6 Echo Req between its interfaces across DUT1 for \
+| | ... | remote host IPv6 addresses. Make TG verify ICMPv6 Echo Replies are \
 | | ... | correct.
 | | ...
 | | ${hops}= | Set Variable | ${1}
index 2eca319..2565320 100644 (file)
 | ...
 | Documentation | *L2 bridge-domain test cases*
 | ...
-| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology\
+| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology \
 | ... | with single links between nodes.
-| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 for L2 switching of\
-| ... | IPv4; Eth-IPv6-ICMPv6 for L2 switching of IPv6 use. Both apply to all\
+| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 for L2 switching of \
+| ... | IPv4; Eth-IPv6-ICMPv6 for L2 switching of IPv6 use. Both apply to all \
 | ... | links.
-| ... | *[Cfg] DUT configuration:* DUT1 is configured with L2 bridge-domain\
+| ... | *[Cfg] DUT configuration:* DUT1 is configured with L2 bridge-domain \
 | ... | switching.
-| ... | *[Ver] TG verification:* Test ICMPv4 (or ICMPv6) Echo Request packets\
-| ... | are sent in both directions by TG on links to DUT1; on receive TG\
-| ... | verifies packets for correctness and their IPv4 (IPv6) src-addr,\
+| ... | *[Ver] TG verification:* Test ICMPv4 (or ICMPv6) Echo Request packets \
+| ... | are sent in both directions by TG on links to DUT1; on receive TG \
+| ... | verifies packets for correctness and their IPv4 (IPv6) src-addr, \
 | ... | dst-addr and MAC addresses.
 | ... | *[Ref] Applicable standard specifications:* RFC792
 
 | tc01-eth2p-ethicmpv4-l2bdbase-device
 | | [Documentation]
 | | ... | [Top] TG-DUT1-TG. [Enc] Eth-IPv4-ICMPv4.
-| | ... | [Cfg] Configure L2 bridge-domain (L2BD) with MAC learning enabled on\
+| | ... | [Cfg] Configure L2 bridge-domain (L2BD) with MAC learning enabled on \
 | | ... | DUT1. Add both interfaces towards TG to this L2BD.
-| | ... | [Ver] Make TG send ICMPv4 Echo Req in both directions between two of\
-| | ... | its interfaces to be switched by DUT1; verify all packets are\
+| | ... | [Ver] Make TG send ICMPv4 Echo Req in both directions between two of \
+| | ... | its interfaces to be switched by DUT1; verify all packets are \
 | | ... | received.
 | | ...
 | | Given Configure path in 2-node circular topology
 | tc02-eth2p-ethicmpv6-l2bdbase-device
 | | [Documentation]
 | | ... | [Top] TG-DUT1-TG. [Enc] Eth-IPv6-ICMPv6.
-| | ... | [Cfg] Configure L2 bridge-domain (L2BD) with MAC learning enabled on\
+| | ... | [Cfg] Configure L2 bridge-domain (L2BD) with MAC learning enabled on \
 | | ... | DUT1. Add both interfaces towards TG to this L2BD.
-| | ... | [Ver] Make TG send ICMPv6 Echo Req in both directions between two of\
-| | ... | its interfaces to be switched by DUT1; verify all packets are\
+| | ... | [Ver] Make TG send ICMPv6 Echo Req in both directions between two of \
+| | ... | its interfaces to be switched by DUT1; verify all packets are \
 | | ... | received.
 | | ...
 | | Given Configure path in 2-node circular topology
index 5417448..47e3d96 100644 (file)
 | ...
 | Documentation | *L2 cross-connect test cases*
 | ...
-| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology\
+| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology \
 | ... | with single links between nodes.
-| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 for L2 switching of\
-| ... | IPv4; Eth-IPv6-ICMPv6 for L2 switching of IPv6 use. Both apply to all\
+| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 for L2 switching of \
+| ... | IPv4; Eth-IPv6-ICMPv6 for L2 switching of IPv6 use. Both apply to all \
 | ... | links.
-| ... | *[Cfg] DUT configuration:* DUT1 is configured with L2 cross-connect\
+| ... | *[Cfg] DUT configuration:* DUT1 is configured with L2 cross-connect \
 | ... | switching.
-| ... | *[Ver] TG verification:* Test ICMPv4 (or ICMPv6) Echo Request packets\
-| ... | are sent in both directions by TG on links to DUT1; on receive TG\
-| ... | verifies packets for correctness and their IPv4 (IPv6) src-addr,\
+| ... | *[Ver] TG verification:* Test ICMPv4 (or ICMPv6) Echo Request packets \
+| ... | are sent in both directions by TG on links to DUT1; on receive TG \
+| ... | verifies packets for correctness and their IPv4 (IPv6) src-addr, \
 | ... | dst-addr and MAC addresses.
 | ... | *[Ref] Applicable standard specifications:* RFC792
 
 | tc01-eth2p-ethicmpv4-l2xcbase-device
 | | [Documentation]
 | | ... | [Top] TG-DUT1-TG. [Enc] Eth-IPv4-ICMPv4.
-| | ... | [Cfg] Configure L2 cross-connects (L2XC) between both interfaces\
+| | ... | [Cfg] Configure L2 cross-connects (L2XC) between both interfaces \
 | | ... | towards TG on DUT1.
-| | ... | [Ver] Make TG send ICMPv4 Echo Req in both directions between two of\
-| | ... | its interfaces to be switched by DUT1; verify all packets are\
+| | ... | [Ver] Make TG send ICMPv4 Echo Req in both directions between two of \
+| | ... | its interfaces to be switched by DUT1; verify all packets are \
 | | ... | received.
 | | ...
 | | Given Configure path in 2-node circular topology
 | tc02-eth2p-ethicmpv6-l2xcbase-device
 | | [Documentation]
 | | ... | [Top] TG-DUT1-TG. [Enc] Eth-IPv6-ICMPv6.
-| | ... | [Cfg] Configure L2 cross-connects (L2XC) between both interfaces\
+| | ... | [Cfg] Configure L2 cross-connects (L2XC) between both interfaces \
 | | ... | towards TG on DUT1.
-| | ... | [Ver] Make TG send ICMPv6 Echo Req in both directions between two of\
-| | ... | its interfaces to be switched by DUT1; verify all packets are\
+| | ... | [Ver] Make TG send ICMPv6 Echo Req in both directions between two of \
+| | ... | its interfaces to be switched by DUT1; verify all packets are \
 | | ... | received.
 | | ...
 | | Given Configure path in 2-node circular topology
diff --git a/tests/vpp/device/vm_vhost/ip4/eth2p-ethip4-ip4base-eth-2vhost-1vm-dev.robot b/tests/vpp/device/vm_vhost/ip4/eth2p-ethip4-ip4base-eth-2vhost-1vm-dev.robot
new file mode 100644 (file)
index 0000000..f421f59
--- /dev/null
@@ -0,0 +1,108 @@
+# Copyright (c) 2019 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+*** Settings ***
+| Library | resources.libraries.python.InterfaceUtil
+| Library | resources.libraries.python.IPUtil
+| Library | resources.libraries.python.NodePath
+| Library | resources.libraries.python.topology.Topology
+| Library | resources.libraries.python.Trace
+| Library | resources.libraries.python.VhostUser
+| Library | resources.libraries.python.VPPUtil
+| Resource | resources/libraries/robot/ip/ip4.robot
+| Resource | resources/libraries/robot/l2/l2_bridge_domain.robot
+| Resource | resources/libraries/robot/shared/default.robot
+| Resource | resources/libraries/robot/shared/interfaces.robot
+| Resource | resources/libraries/robot/shared/testing_path.robot
+| Resource | resources/libraries/robot/shared/traffic.robot
+| Resource | resources/libraries/robot/vm/qemu.robot
+| ...
+| Force Tags | 2_NODE_SINGLE_LINK_TOPO | DEVICETEST | HW_ENV | DCR_ENV
+| ... | FUNCTEST | IP4FWD | BASE | ETH | VHOST | 1VM
+| ...
+| Test Setup | Set up VPP device test
+| ...
+| Test Teardown | Run Keywords
+| ... | Stop and clear QEMU | ${dut_node} | ${vm_node}
+| ... | AND | Tear down VPP device test
+| ...
+| Documentation | *IPv4 routing test cases with vhost user interface*
+| ...
+| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology with \
+| ... | VM and single links between nodes.
+| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 for IPv4 routing on \
+| ... | both links.
+| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4 routing and \
+| ... | two static IPv4 /24 route entries. Qemu Guest is connected to VPP via \
+| ... | vhost-user interfaces. Guest is configured with linux bridge \
+| ... | interconnecting vhost-user interfaces.
+| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets are sent in \
+| ... | one direction by TG on links to DUT1; on receive TG verifies packets \
+| ... | for correctness and their IPv4 src-addr, dst-addr and MAC addresses.
+| ... | *[Ref] Applicable standard specifications:* RFC791, RFC826, RFC792
+
+*** Variables ***
+| ${net1}= | 10.0.1.0
+| ${net3}= | 10.0.3.0
+| ${net1_ip1}= | 10.0.1.1
+| ${net1_ip2}= | 10.0.1.2
+| ${net2_ip1}= | 10.0.2.1
+| ${net2_ip2}= | 10.0.2.2
+| ${net3_ip1}= | 10.0.3.1
+| ${net3_ip2}= | 10.0.3.2
+| ${prefix_length}= | 24
+| ${fib_table_2}= | 20
+| ${sock1}= | /tmp/sock1
+| ${sock2}= | /tmp/sock2
+
+*** Test Cases ***
+| tc01-eth2p-ethip4-ip4base-eth-2vhost-1vm-device
+| | [Documentation]
+| | ... | Test uses two VRFs to route IPv4 traffic through two vhost-user \
+| | ... | interfaces. Both interfaces are configured with IP addresses from \
+| | ... | the same network. There is created linux bridge on VM to pass packet \
+| | ... | from one vhost-user interface to another one.
+| | ...
+| | Given Configure path in 2-node circular topology
+| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
+| | And Configure interfaces in path up
+| | ${vhost1}= | And Vpp Create Vhost User Interface | ${dut_node} | ${sock1}
+| | ${vhost2}= | And Vpp Create Vhost User Interface | ${dut_node} | ${sock2}
+| | And Set Interface State | ${dut_node} | ${vhost1} | up
+| | And Set Interface State | ${dut_node} | ${vhost2} | up
+| | And Add Fib Table | ${dut_node} | ${fib_table_2}
+| | And Assign Interface To Fib Table | ${dut_node}
+| | ... | ${vhost2} | ${fib_table_2}
+| | And Assign Interface To Fib Table | ${dut_node}
+| | ... | ${dut_to_tg_if2} | ${fib_table_2}
+| | And Configure IP addresses on interfaces
+| | ... | ${dut_node} | ${dut_to_tg_if1} | ${net1_ip1} | ${prefix_length}
+| | ... | ${dut_node} | ${vhost1} | ${net2_ip1} | ${prefix_length}
+| | ... | ${dut_node} | ${vhost2} | ${net2_ip2} | ${prefix_length}
+| | ... | ${dut_node} | ${dut_to_tg_if2} | ${net3_ip1} | ${prefix_length}
+| | ${vhost2_mac}= | And Get Vhost User Mac By SW Index
+| | ... | ${dut_node} | ${vhost2}
+| | And Vpp Route Add | ${dut_node} | ${net3} | ${prefix_length} | ${net2_ip2}
+| | ... | ${vhost1} | resolve_attempts=${NONE} | count=${NONE}
+| | And Vpp Route Add | ${dut_node} | ${net1} | ${prefix_length} | ${net2_ip1}
+| | ... | ${vhost2} | resolve_attempts=${NONE} | count=${NONE}
+| | ... | vrf=${fib_table_2}
+| | Add IP Neighbor | ${dut_node} | ${vhost1} | ${net2_ip2} | ${vhost2_mac}
+| | Add IP Neighbor | ${dut_node} | ${dut_to_tg_if2} | ${net3_ip2}
+| | ... | ${tg_to_dut_if2_mac}
+| | When Configure VM for vhost L2BD forwarding
+| | ... | ${dut_node} | ${sock1} | ${sock2}
+| | Then Send packet and verify headers
+| | ... | ${tg_node} | ${net1_ip2} | ${net3_ip2}
+| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac}
+| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if2_mac} | ${tg_to_dut_if2_mac}
diff --git a/tests/vpp/device/vm_vhost/ip6/eth2p-ethip6-ip6base-eth-2vhost-1vm-dev.robot b/tests/vpp/device/vm_vhost/ip6/eth2p-ethip6-ip6base-eth-2vhost-1vm-dev.robot
new file mode 100644 (file)
index 0000000..b1dd998
--- /dev/null
@@ -0,0 +1,112 @@
+# Copyright (c) 2019 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+*** Settings ***
+| Library | resources.libraries.python.InterfaceUtil
+| Library | resources.libraries.python.IPUtil
+| Library | resources.libraries.python.NodePath
+| Library | resources.libraries.python.topology.Topology
+| Library | resources.libraries.python.Trace
+| Library | resources.libraries.python.VhostUser
+| Library | resources.libraries.python.VPPUtil
+| Resource | resources/libraries/robot/ip/ip6.robot
+| Resource | resources/libraries/robot/l2/l2_bridge_domain.robot
+| Resource | resources/libraries/robot/shared/default.robot
+| Resource | resources/libraries/robot/shared/interfaces.robot
+| Resource | resources/libraries/robot/shared/testing_path.robot
+| Resource | resources/libraries/robot/shared/traffic.robot
+| Resource | resources/libraries/robot/vm/qemu.robot
+| ...
+| Force Tags | 2_NODE_SINGLE_LINK_TOPO | DEVICETEST | HW_ENV | DCR_ENV
+| ... | FUNCTEST | IP6FWD | BASE | ETH | VHOST | 1VM
+| ...
+| Test Setup | Set up VPP device test
+| ...
+| Test Teardown | Run Keywords
+| ... | Stop and clear QEMU | ${dut_node} | ${vm_node}
+| ... | AND | Tear down VPP device test
+| ...
+| Documentation | *IPv4 routing test cases with vhost user interface*
+| ...
+| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology with \
+| ... | VM and single links between nodes.
+| ... | *[Enc] Packet Encapsulations:* Eth-IPv6-ICMPv6 for IPv6 routing on \
+| ... | both links.
+| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv6 routing and \
+| ... | two static IPv6 /64 route entries. Qemu Guest is connected to VPP via \
+| ... | vhost-user interfaces. Guest is configured with linux bridge \
+| ... | interconnecting vhost-user interfaces.
+| ... | *[Ver] TG verification:* Test ICMPv6 Echo Request packets are sent in \
+| ... | one direction by TG on links to DUT1; on receive TG verifies packets \
+| ... | for correctness and their IPv6 src-addr, dst-addr and MAC addresses.
+| ... | *[Ref] Applicable standard specifications:* RFC2460, RFC4443, RFC4861
+
+*** Variables ***
+| ${net1}= | 2001:1::0
+| ${net3}= | 2001:3::0
+| ${net1_ip1}= | 2001:1::1
+| ${net1_ip2}= | 2001:1::2
+| ${net2_ip1}= | 2001:2::1
+| ${net2_ip2}= | 2001:2::2
+| ${net3_ip1}= | 2001:3::1
+| ${net3_ip2}= | 2001:3::2
+| ${prefix_length}= | 64
+| ${fib_table_2}= | 20
+| ${sock1}= | /tmp/sock1
+| ${sock2}= | /tmp/sock2
+
+*** Test Cases ***
+| tc01-eth2p-ethip6-ip6base-eth-2vhost-1vm-device
+| | [Documentation]
+| | ... | Test uses two VRFs to route IPv6 traffic through two vhost-user \
+| | ... | interfaces. Both interfaces are configured with IP addresses from \
+| | ... | the same network. There is created linux bridge on VM to pass packet \
+| | ... | from one vhost-user interface to another one.
+| | ...
+| | Given Configure path in 2-node circular topology
+| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
+| | And Configure interfaces in path up
+| | ${vhost1}= | And Vpp Create Vhost User Interface | ${dut_node} | ${sock1}
+| | ${vhost2}= | And Vpp Create Vhost User Interface | ${dut_node} | ${sock2}
+| | And Set Interface State | ${dut_node} | ${vhost1} | up
+| | And Set Interface State | ${dut_node} | ${vhost2} | up
+| | And Add Fib Table | ${dut_node} | ${fib_table_2}
+| | And Assign Interface To Fib Table | ${dut_node}
+| | ... | ${vhost2} | ${fib_table_2}
+| | And Assign Interface To Fib Table | ${dut_node}
+| | ... | ${dut_to_tg_if2} | ${fib_table_2}
+| | And Vpp Set If IPv6 Addr
+| | ... | ${dut_node} | ${dut_to_tg_if1} | ${net1_ip1} | ${prefix_length}
+| | And Vpp Set If IPv6 Addr
+| | ... | ${dut_node} | ${vhost1} | ${net2_ip1} | ${prefix_length}
+| | And Vpp Set If IPv6 Addr
+| | ... | ${dut_node} | ${vhost2} | ${net2_ip2} | ${prefix_length}
+| | And Vpp Set If IPv6 Addr
+| | ... | ${dut_node} | ${dut_to_tg_if2} | ${net3_ip1} | ${prefix_length}
+| | And Suppress ICMPv6 router advertisement message | ${nodes}
+| | ${vhost2_mac}= | And Get Vhost User Mac By SW Index
+| | ... | ${dut_node} | ${vhost2}
+| | And Vpp Route Add | ${dut_node} | ${net3} | ${prefix_length} | ${net2_ip2}
+| | ... | ${vhost1} | resolve_attempts=${NONE} | count=${NONE}
+| | And Vpp Route Add | ${dut_node} | ${net1} | ${prefix_length} | ${net2_ip1}
+| | ... | ${vhost2} | resolve_attempts=${NONE} | count=${NONE}
+| | ... | vrf=${fib_table_2}
+| | Add IP Neighbor | ${dut_node} | ${vhost1} | ${net2_ip2} | ${vhost2_mac}
+| | Add IP Neighbor | ${dut_node} | ${dut_to_tg_if2} | ${net3_ip2}
+| | ... | ${tg_to_dut_if2_mac}
+| | When Configure VM for vhost L2BD forwarding
+| | ... | ${dut_node} | ${sock1} | ${sock2}
+| | Then Send packet and verify headers
+| | ... | ${tg_node} | ${net1_ip2} | ${net3_ip2}
+| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac}
+| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if2_mac} | ${tg_to_dut_if2_mac}
diff --git a/tests/vpp/device/vm_vhost/l2bd/eth2p-eth-l2bdbasemaclrn-eth-2vhost-1vm-dev.robot b/tests/vpp/device/vm_vhost/l2bd/eth2p-eth-l2bdbasemaclrn-eth-2vhost-1vm-dev.robot
new file mode 100644 (file)
index 0000000..7b7d3fb
--- /dev/null
@@ -0,0 +1,112 @@
+# Copyright (c) 2019 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+*** Settings ***
+| Library  | resources.libraries.python.Trace
+| Resource | resources/libraries/robot/shared/default.robot
+| Resource | resources/libraries/robot/l2/l2_bridge_domain.robot
+| Resource | resources/libraries/robot/shared/testing_path.robot
+| Resource | resources/libraries/robot/vm/qemu.robot
+| ...
+| Force Tags | 2_NODE_SINGLE_LINK_TOPO | DEVICETEST | HW_ENV | DCR_ENV
+| ... | FUNCTEST | L2BDMACLRN | BASE | ETH | VHOST | 1VM
+| ...
+| Test Setup | Set up VPP device test
+| ...
+| Test Teardown | Run Keywords
+| ... | Stop and clear QEMU | ${dut_node} | ${vm_node}
+| ... | AND | Tear down VPP device test
+| ...
+| Documentation | *L2 bridge-domain test cases with vhost user interface*
+| ...
+| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology with \
+| ... | VM and single links between nodes.
+| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 for L2 switching of \
+| ... | IPv4; Eth-IPv6-ICMPv6 for L2 switching of IPv6.
+| ... | *[Cfg] DUT configuration:* DUT1 is configured with two L2 \
+| ... | bridge-domains (L2BD) switching combined with MAC learning enabled. \
+| ... | Qemu Guest is connected to VPP via vhost-user interfaces. Guest is \
+| ... | configured with linux bridge interconnecting vhost-user interfaces.
+| ... | *[Ver] TG verification:* Test ICMPv4 (or ICMPv6) Echo Request packets \
+| ... | are sent in both directions by TG on links to DUT1 via VM; on \
+| ... | receive TG verifies packets for correctness and their IPv4 (IPv6) \
+| ... | src-addr, dst-addr and MAC addresses.
+| ... | *[Ref] Applicable standard specifications:* RFC792
+
+*** Variables ***
+| ${bd_id1}= | 1
+| ${bd_id2}= | 2
+
+| ${sock1}= | /tmp/sock1
+| ${sock2}= | /tmp/sock2
+
+*** Test Cases ***
+| tc01-eth2p-ethip4-l2bdbasemaclrn-eth-2vhost-1vm-device
+| | [Documentation]
+| | ... | [Top] TG=DUT=VM. [Enc] Eth-IPv4-ICMPv4. [Cfg] On DUT1 configure \
+| | ... | two L2BDs with MAC learning, each with vhost-user i/f to local \
+| | ... | VM and i/f to TG; configure VM to loop pkts back betwen its two \
+| | ... | virtio i/fs. [Ver] Make TG verify ICMPv4 Echo Req pkts are \
+| | ... | switched thru DUT1 and VM in both directions and are correct on \
+| | ... | receive. [Ref]
+| | ...
+| | Given Configure path in 2-node circular topology
+| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
+| | And Configure interfaces in path up
+| | When Configure vhost interfaces for L2BD forwarding | ${dut_node}
+| | ... | ${sock1}
+| | ... | ${sock2}
+| | And Create bridge domain | ${dut_node} | ${bd_id1}
+| | And Add interface to bridge domain | ${dut_node} | ${dut_to_tg_if1}
+| | ... | ${bd_id1}
+| | And Add interface to bridge domain | ${dut_node} | ${vhost_if1}
+| | ... | ${bd_id1}
+| | And Create bridge domain | ${dut_node} | ${bd_id2}
+| | And Add interface to bridge domain | ${dut_node} | ${dut_to_tg_if2}
+| | ... | ${bd_id2}
+| | And Add interface to bridge domain | ${dut_node} | ${vhost_if2}
+| | ... | ${bd_id2}
+| | And Configure VM for vhost L2BD forwarding | ${dut_node} | ${sock1}
+| | ... | ${sock2}
+| | Then Send ICMPv4 bidirectionally and verify received packets | ${tg_node}
+| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if2}
+
+| tc02-eth2p-ethip6-l2bdbasemaclrn-eth-2vhost-1vm-device
+| | [Documentation]
+| | ... | [Top] TG=DUT=VM. [Enc] Eth-IPv6-ICMPv6. [Cfg] On DUT1 configure \
+| | ... | two L2BDs with MAC learning, each with vhost-user i/f to local \
+| | ... | VM and i/f to TG; configure VM to loop pkts back betwen its two \
+| | ... | virtio i/fs. [Ver] Make TG verify ICMPv6 Echo Req pkts are \
+| | ... | switched thru DUT1 and VM in both directions and are correct on \
+| | ... | receive. [Ref]
+| | ...
+| | Given Configure path in 2-node circular topology
+| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
+| | And Configure interfaces in path up
+| | When Configure vhost interfaces for L2BD forwarding | ${dut_node}
+| | ... | ${sock1}
+| | ... | ${sock2}
+| | And Create bridge domain | ${dut_node} | ${bd_id1}
+| | And Add interface to bridge domain | ${dut_node} | ${dut_to_tg_if1}
+| | ... | ${bd_id1}
+| | And Add interface to bridge domain | ${dut_node} | ${vhost_if1}
+| | ... | ${bd_id1}
+| | And Create bridge domain | ${dut_node} | ${bd_id2}
+| | And Add interface to bridge domain | ${dut_node} | ${dut_to_tg_if2}
+| | ... | ${bd_id2}
+| | And Add interface to bridge domain | ${dut_node} | ${vhost_if2}
+| | ... | ${bd_id2}
+| | And Configure VM for vhost L2BD forwarding | ${dut_node} | ${sock1}
+| | ... | ${sock2}
+| | Then Send ICMPv6 bidirectionally and verify received packets | ${tg_node}
+| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if2}
diff --git a/tests/vpp/device/vm_vhost/l2xc/eth2p-eth-l2xcbase-eth-2vhost-1vm-dev.robot b/tests/vpp/device/vm_vhost/l2xc/eth2p-eth-l2xcbase-eth-2vhost-1vm-dev.robot
new file mode 100644 (file)
index 0000000..3c71136
--- /dev/null
@@ -0,0 +1,95 @@
+# Copyright (c) 2019 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+*** Settings ***
+| Library | resources.libraries.python.Trace
+| Library | resources.libraries.python.NodePath
+| Resource | resources/libraries/robot/shared/default.robot
+| Resource | resources/libraries/robot/l2/l2_xconnect.robot
+| Resource | resources/libraries/robot/l2/l2_traffic.robot
+| Resource | resources/libraries/robot/shared/testing_path.robot
+| Resource | resources/libraries/robot/shared/interfaces.robot
+| Resource | resources/libraries/robot/l2/l2_bridge_domain.robot
+| Resource | resources/libraries/robot/vm/qemu.robot
+| ...
+| Force Tags | 2_NODE_SINGLE_LINK_TOPO | DEVICETEST | HW_ENV | DCR_ENV
+| ... | FUNCTEST | L2XCFWD | BASE | ETH | VHOST | 1VM
+| ...
+| Test Setup | Set up VPP device test
+| ...
+| Test Teardown | Run Keywords
+| ... | Stop and clear QEMU | ${dut_node} | ${vm_node}
+| ... | AND | Tear down VPP device test
+| ...
+| Documentation | *L2 cross-connect test cases with vhost user interface*
+| ...
+| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology with \
+| ... | VM and single links between nodes.
+| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 for L2 switching of \
+| ... | IPv4; Eth-IPv6-ICMPv6 for L2 switching of IPv6.
+| ... | *[Cfg] DUT configuration:* DUT1 is configured with L2 cross-connect \
+| ... | (L2XC) switching. Qemu Guest is connected to VPP via vhost-user \
+| ... | interfaces. Guest is configured with linux bridge interconnecting \
+| ... | vhost-user interfaces.
+| ... | *[Ver] TG verification:* Test ICMPv4 (or ICMPv6) Echo Request packets \
+| ... | are sent in both directions by TG on links to DUT1 via VM; on receive \
+| ... | TG verifies packets for correctness and their IPv4 (IPv6) src-addr, \
+| ... | dst-addr and MAC addresses.
+| ... | *[Ref] Applicable standard specifications:* RFC792
+
+*** Variables ***
+| ${sock1}= | /tmp/sock1
+| ${sock2}= | /tmp/sock2
+
+*** Test Cases ***
+| tc01-eth2p-ethip4-l2xcbase-eth-2vhost-1vm-device
+| | [Documentation]
+| | ... | [Top] TG=DUT=VM. [Enc] Eth-IPv4-ICMPv4. [Cfg] On DUT configure \
+| | ... | two L2 cross-connects (L2XC), each with one untagged interface \
+| | ... | to TG and untagged i/f to local VM over vhost-user. [Ver] Make \
+| | ... | TG send ICMPv4 Echo Reqs in both directions between two of its \
+| | ... | i/fs to be switched by DUT to and from VM; verify all packets \
+| | ... | are received. [Ref]
+| | ...
+| | Given Configure path in 2-node circular topology
+| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
+| | And Configure interfaces in path up
+| | When Configure vhost interfaces for L2BD forwarding | ${dut_node}
+| | ... | ${sock1} | ${sock2}
+| | And Configure L2XC | ${dut_node} | ${dut_to_tg_if1} | ${vhost_if1}
+| | And Configure L2XC | ${dut_node} | ${dut_to_tg_if2} | ${vhost_if2}
+| | And Configure VM for vhost L2BD forwarding | ${dut_node} | ${sock1}
+| | ... | ${sock2}
+| | Then Send ICMPv4 bidirectionally and verify received packets | ${tg_node}
+| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if2}
+
+| tc02-eth2p-ethip6-l2xcbase-eth-2vhost-1vm-device
+| | [Documentation]
+| | ... | [Top] TG=DUT=VM. [Enc] Eth-IPv6-ICMPv6. [Cfg] On DUT configure \
+| | ... | two L2 cross-connects (L2XC), each with one untagged i/f to TG \
+| | ... | and untagged i/f to local VM over vhost-user. [Ver] Make TG send \
+| | ... | ICMPv6 Echo Reqs in both directions between two of its i/fs to \
+| | ... | be switched by DUT to and from VM; verify all packets are \
+| | ... | received. [Ref]
+| | ...
+| | Given Configure path in 2-node circular topology
+| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
+| | And Configure interfaces in path up
+| | When Configure vhost interfaces for L2BD forwarding | ${dut_node}
+| | ... | ${sock1} | ${sock2}
+| | And Configure L2XC | ${dut_node} | ${dut_to_tg_if1} | ${vhost_if1}
+| | And Configure L2XC | ${dut_node} | ${dut_to_tg_if2} | ${vhost_if2}
+| | And Configure VM for vhost L2BD forwarding | ${dut_node} | ${sock1}
+| | ... | ${sock2}
+| | Then Send ICMPv6 bidirectionally and verify received packets | ${tg_node}
+| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if2}