diff options
author | Ross Brattain <ross.b.brattain@intel.com> | 2018-03-20 23:04:07 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2018-03-20 23:04:07 +0000 |
commit | 38e14036886658e87d3c54d7bfc6a364ac5b75f3 (patch) | |
tree | 5b25b3d8a3130fb546d49e2efdcc25a426629b6b /yardstick/benchmark/core | |
parent | b38a0ef766ca5025a09b85573e770c34b389ea17 (diff) | |
parent | d07a9a7d18baa7dafbf12d2da9c554aa1718933f (diff) |
Merge "Fix retrieving "options" section in "scenario""
Diffstat (limited to 'yardstick/benchmark/core')
-rw-r--r-- | yardstick/benchmark/core/task.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/yardstick/benchmark/core/task.py b/yardstick/benchmark/core/task.py index e7acde696..4272a6db9 100644 --- a/yardstick/benchmark/core/task.py +++ b/yardstick/benchmark/core/task.py @@ -344,7 +344,8 @@ class Task(object): # pragma: no cover # TODO support get multi hosts/vms info context_cfg = {} - server_name = scenario_cfg.get('options', {}).get('server_name', {}) + options = scenario_cfg.get('options') or {} + server_name = options.get('server_name') or {} def config_context_target(cfg): target = cfg['target'] @@ -627,7 +628,8 @@ class TaskParser(object): # pragma: no cover scenario['host'] = qualified_name(scenario['host']) if 'target' in scenario: scenario['target'] = qualified_name(scenario['target']) - server_name = scenario.get('options', {}).get('server_name', {}) + options = scenario.get('options') or {} + server_name = options.get('server_name') or {} if 'host' in server_name: server_name['host'] = qualified_name(server_name['host']) if 'target' in server_name: |