aboutsummaryrefslogtreecommitdiffstats
path: root/resources
diff options
context:
space:
mode:
authorPeter Mikus <pmikus@cisco.com>2018-10-15 14:28:19 +0000
committerPeter Mikus <pmikus@cisco.com>2018-10-25 09:25:24 +0000
commit3c9040f9a7a72abd149b403a95b8d12946ba69db (patch)
tree4d4067a165fa614f5b1cba6a843b7365eed1e960 /resources
parentda8fb7d7ab386fdefb728d71bfce9bb73624977c (diff)
CSIT-1339 Create initial l2xc test
- L2XC ping ICMPv4/ICMPv6 test Change-Id: I1c1708e8c1050f140a02d56012f63b683fc3eec1 Signed-off-by: Peter Mikus <pmikus@cisco.com>
Diffstat (limited to 'resources')
-rw-r--r--resources/libraries/python/InterfaceUtil.py17
-rw-r--r--resources/libraries/robot/shared/default.robot22
2 files changed, 33 insertions, 6 deletions
diff --git a/resources/libraries/python/InterfaceUtil.py b/resources/libraries/python/InterfaceUtil.py
index c0f37f38de..cff2c9f695 100644
--- a/resources/libraries/python/InterfaceUtil.py
+++ b/resources/libraries/python/InterfaceUtil.py
@@ -520,7 +520,7 @@ class InterfaceUtil(object):
InterfaceUtil.update_nic_interface_names(node)
@staticmethod
- def update_tg_interface_data_on_node(node):
+ def update_tg_interface_data_on_node(node, skip_tg_udev=False):
"""Update interface name for TG/linux node in DICT__nodes.
.. note::
@@ -531,10 +531,10 @@ class InterfaceUtil(object):
"52:54:00:e1:8a:0f": "eth2"
"00:00:00:00:00:00": "lo"
- .. note:: TODO: parse lshw -json instead
-
:param node: Node selected from DICT__nodes.
+ :param skip_tg_udev: Skip udev rename on TG node.
:type node: dict
+ :type skip_tg_udev: bool
:raises RuntimeError: If getting of interface name and MAC fails.
"""
# First setup interface driver specified in yaml file
@@ -559,7 +559,8 @@ class InterfaceUtil(object):
interface['name'] = name
# Set udev rules for interfaces
- InterfaceUtil.tg_set_interfaces_udev_rules(node)
+ if not skip_tg_udev:
+ InterfaceUtil.tg_set_interfaces_udev_rules(node)
@staticmethod
def iface_update_numa_node(node):
@@ -617,6 +618,7 @@ class InterfaceUtil(object):
@staticmethod
def update_all_interface_data_on_all_nodes(nodes, skip_tg=False,
+ skip_tg_udev=False,
numa_node=False):
"""Update interface names on all nodes in DICT__nodes.
@@ -624,17 +626,20 @@ class InterfaceUtil(object):
of all nodes mentioned in the topology dictionary.
:param nodes: Nodes in the topology.
- :param skip_tg: Skip TG node
+ :param skip_tg: Skip TG node.
+ :param skip_tg_udev: Skip udev rename on TG node.
:param numa_node: Retrieve numa_node location.
:type nodes: dict
:type skip_tg: bool
+ :type skip_tg_udev: bool
:type numa_node: bool
"""
for node_data in nodes.values():
if node_data['type'] == NodeType.DUT:
InterfaceUtil.update_vpp_interface_data_on_node(node_data)
elif node_data['type'] == NodeType.TG and not skip_tg:
- InterfaceUtil.update_tg_interface_data_on_node(node_data)
+ InterfaceUtil.update_tg_interface_data_on_node(
+ node_data, skip_tg_udev)
if numa_node:
if node_data['type'] == NodeType.DUT:
diff --git a/resources/libraries/robot/shared/default.robot b/resources/libraries/robot/shared/default.robot
index f734516005..614c873709 100644
--- a/resources/libraries/robot/shared/default.robot
+++ b/resources/libraries/robot/shared/default.robot
@@ -472,6 +472,28 @@
| | Vpp Show Errors On All DUTs | ${nodes}
| | Verify VPP PID in Teardown
+| Set up VPP device test
+# TODO: Generalize this KW if it will not diverge from Functional derivate too
+# much
+| | [Documentation] | Common test setup for vpp-device tests.
+| | ...
+| | Configure all DUTs before test
+| | Save VPP PIDs
+| | Configure all TGs for traffic script
+| | Update All Interface Data On All Nodes | ${nodes} | skip_tg_udev=${True}
+| | Reset VAT History On All DUTs | ${nodes}
+
+| Tear down VPP device test
+# TODO: Generalize this KW if it will not diverge from Functional derivate too
+# much
+| | [Documentation] | Common test teardown for vpp-device tests.
+| | ...
+| | Remove All Added Ports On All DUTs From Topology | ${nodes}
+| | Show Packet Trace on All DUTs | ${nodes}
+| | Show VAT History On All DUTs | ${nodes}
+| | Vpp Show Errors On All DUTs | ${nodes}
+| | Verify VPP PID in Teardown
+
| Tear down LISP functional test
| | [Documentation] | Common test teardown for functional tests with LISP.
| | ...