diff options
author | Deepak S <deepak.s@linux.intel.com> | 2017-06-20 14:31:19 -0700 |
---|---|---|
committer | Ross Brattain <ross.b.brattain@intel.com> | 2017-08-08 08:54:23 -0700 |
commit | 5ce3b6f8c8b3217091e51a6041455738603d90b8 (patch) | |
tree | ca34e15a85d69e2b23ce498fead47761624ae42c /yardstick/benchmark/core/task.py | |
parent | 72778951d6b8968f562fb8fefa02a57159ea1b83 (diff) |
NSB update
Refactored main NSB VNF classes accroding to class diagram
https://wiki.opnfv.org/display/yardstick/NSB+class+diagram
All the SampleVNFs have been separated and placed under
the SampleVNF class.
Added AutoConnectSSH to automatically create SSH conneciton on demand.
Added VnfdHelper class to wrap the VNFD dictionary in prepartion for
class-based modeling.
Extracted DpdkVnfSetupEnvHelper for DPDK based VNF setup.
Extracted Stats and other client config to ResourceHelper
Had to replace dict_key_flatten with deepgetitem due to Python 2.7
Jinja2 infinite recursion.
Change-Id: Ia8840e9c44cdbdf39aab6b02e6d2176b31937dc9
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
Signed-off-by: Edward MacGillivray <edward.s.macgillivray@intel.com>
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
Diffstat (limited to 'yardstick/benchmark/core/task.py')
-rw-r--r-- | yardstick/benchmark/core/task.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/yardstick/benchmark/core/task.py b/yardstick/benchmark/core/task.py index af508496f..2b10c61b3 100644 --- a/yardstick/benchmark/core/task.py +++ b/yardstick/benchmark/core/task.py @@ -13,6 +13,8 @@ from __future__ import absolute_import from __future__ import print_function import sys import os +from collections import OrderedDict + import yaml import atexit import ipaddress @@ -121,6 +123,7 @@ class Task(object): # pragma: no cover except KeyboardInterrupt: raise except Exception: + LOG.exception('') testcases[case_name] = {'criteria': 'FAIL', 'tc_data': []} else: testcases[case_name] = {'criteria': 'PASS', 'tc_data': data} @@ -591,8 +594,9 @@ def _is_background_scenario(scenario): def parse_nodes_with_context(scenario_cfg): """parse the 'nodes' fields in scenario """ - nodes = scenario_cfg["nodes"] - return {nodename: Context.get_server(node) for nodename, node in nodes.items()} + # ensure consistency in node instantiation order + return OrderedDict((nodename, Context.get_server(scenario_cfg["nodes"][nodename])) + for nodename in sorted(scenario_cfg["nodes"])) def get_networks_from_nodes(nodes): |