aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/DUTSetup.py
diff options
context:
space:
mode:
authorJan Gelety <jgelety@cisco.com>2017-12-19 09:15:14 +0100
committerJan Gelety <jgelety@cisco.com>2018-01-17 16:27:20 +0100
commit95998a67270ffd72f09ce6f3d43235c723edf36b (patch)
tree4e56b84fee35fcfb5a84538ec73caeb80eeae007 /resources/libraries/python/DUTSetup.py
parente81d599029f31fb433089eecf0d160ab01719383 (diff)
CSIT-675: SRv6 performance tests
- update L1 KWs - update L2 KWs - tests with one SID (no SRH insertion) - tests with two SIDs (SRH inserted) and decapsulation - tests with two SIDs (SRH inserted) without decapsulation - enabled packet traces and logged packet traces in the test case tear down if test failed Change-Id: I3a0f4c350eed3f42509c6d49e832faa78fe64dbb Signed-off-by: Jan Gelety <jgelety@cisco.com>
Diffstat (limited to 'resources/libraries/python/DUTSetup.py')
-rw-r--r--resources/libraries/python/DUTSetup.py31
1 files changed, 29 insertions, 2 deletions
diff --git a/resources/libraries/python/DUTSetup.py b/resources/libraries/python/DUTSetup.py
index d76a2f4096..e0479cfb60 100644
--- a/resources/libraries/python/DUTSetup.py
+++ b/resources/libraries/python/DUTSetup.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2016 Cisco and/or its affiliates.
+# Copyright (c) 2018 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:
@@ -26,7 +26,11 @@ class DUTSetup(object):
"""Contains methods for setting up DUTs."""
@staticmethod
def start_vpp_service_on_all_duts(nodes):
- """Start up the VPP service on all nodes."""
+ """Start up the VPP service on all nodes.
+
+ :param nodes: Nodes in the topology.
+ :type nodes: dict
+ """
ssh = SSH()
for node in nodes.values():
if node['type'] == NodeType.DUT:
@@ -402,3 +406,26 @@ class DUTSetup(object):
if int(ret_code) != 0:
raise RuntimeError('Failed to load {0} kernel module on host {1}'.
format(module, node['host']))
+
+ @staticmethod
+ def vpp_enable_traces_on_all_duts(nodes):
+ """Enable vpp packet traces on all DUTs in the given topology.
+
+ :param nodes: Nodes in the topology.
+ :type nodes: dict
+ """
+ for node in nodes.values():
+ if node['type'] == NodeType.DUT:
+ DUTSetup.vpp_enable_traces_on_dut(node)
+
+ @staticmethod
+ def vpp_enable_traces_on_dut(node):
+ """Enable vpp packet traces on the DUT node.
+
+ :param node: DUT node to set up.
+ :type node: dict
+ """
+
+ vat = VatExecutor()
+ vat.execute_script("enable_dpdk_traces.vat", node, json_out=False)
+ vat.execute_script("enable_vhost_user_traces.vat", node, json_out=False)