summaryrefslogtreecommitdiffstats
path: root/scripts/automation/regression/misc_methods.py
diff options
context:
space:
mode:
authorYaroslav Brustinov <ybrustin@cisco.com>2017-03-13 11:01:55 +0200
committerYaroslav Brustinov <ybrustin@cisco.com>2017-03-13 11:01:55 +0200
commitdbff547f4d9360d3c48c7b269255234cd31271df (patch)
tree1bbee86b5a4d9d54fa20140f96ea62b7474f8db2 /scripts/automation/regression/misc_methods.py
parentc8d1f318e2d322626e401c9599ba75006d2e8e6c (diff)
i40e fix of workaround of stuck counters + regression test
Change-Id: I251cb8d346461ccfa4eee8abfda113410160a602 Signed-off-by: Yaroslav Brustinov <ybrustin@cisco.com>
Diffstat (limited to 'scripts/automation/regression/misc_methods.py')
-rwxr-xr-xscripts/automation/regression/misc_methods.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/scripts/automation/regression/misc_methods.py b/scripts/automation/regression/misc_methods.py
index d879b038..e8859779 100755
--- a/scripts/automation/regression/misc_methods.py
+++ b/scripts/automation/regression/misc_methods.py
@@ -129,15 +129,13 @@ def load_complete_config_file (filepath):
try:
with open(filepath, 'r') as f:
config = yaml.safe_load(f)
-
+
# Handle TRex configuration
trex_config['trex_name'] = config["trex"]["hostname"]
- trex_config['trex_password'] = config["trex"].get("password")
- #trex_config['trex_is_dual'] = config["trex"]["is_dual"]
trex_config['trex_cores'] = int(config["trex"]["cores"])
- #trex_config['trex_latency'] = int(config["trex"]["latency"])
-# trex_config['trex_version_path'] = config["trex"]["version_path"]
trex_config['modes'] = config['trex'].get('modes', [])
+ for key, val in config['trex'].items():
+ trex_config[key] = val
if 'loopback' not in trex_config['modes']:
trex_config['router_interface'] = config["router"]["ip_address"]
@@ -225,10 +223,10 @@ def load_benchmark_config_file (filepath):
"""
# create response dictionary
- benchmark_config = {}
+ benchmark_config = {}
try:
- with open(filepath, 'r') as f:
+ with open(filepath) as f:
benchmark_config = yaml.safe_load(f)
except Exception as inst: