From 5ce3b6f8c8b3217091e51a6041455738603d90b8 Mon Sep 17 00:00:00 2001 From: Deepak S Date: Tue, 20 Jun 2017 14:31:19 -0700 Subject: 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 Signed-off-by: Edward MacGillivray Signed-off-by: Ross Brattain --- yardstick/benchmark/core/task.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'yardstick/benchmark/core/task.py') 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): -- cgit 1.2.3-korg