aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/benchmark/core/task.py
diff options
context:
space:
mode:
authorRex Lee <limingjiang@huawei.com>2017-03-09 01:25:24 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-03-09 01:25:24 +0000
commit0e66fce9e830e2bc188ba3ccb070132fb6bffb4e (patch)
tree1a31a3b9990394c557620bdec0b6c34c8ef83bed /yardstick/benchmark/core/task.py
parentcd393f1255f09c836461be06edee7e950081fe7e (diff)
parent45b08fc48c15d8d424c925d4534f7ac1bbfcb23c (diff)
Merge "move external_network auto-assign to Heat context"
Diffstat (limited to 'yardstick/benchmark/core/task.py')
-rw-r--r--yardstick/benchmark/core/task.py12
1 files changed, 1 insertions, 11 deletions
diff --git a/yardstick/benchmark/core/task.py b/yardstick/benchmark/core/task.py
index 6bc10050f..2794d84f4 100644
--- a/yardstick/benchmark/core/task.py
+++ b/yardstick/benchmark/core/task.py
@@ -367,18 +367,8 @@ class TaskParser(object): # pragma: no cover
name_suffix)
except KeyError:
pass
+ # default to Heat context because we are testing OpenStack
context_type = cfg_attrs.get("type", "Heat")
- if "Heat" == context_type and "networks" in cfg_attrs:
- # bugfix: if there are more than one network,
- # only add "external_network" on first one.
- # the name of netwrok should follow this rule:
- # test, test2, test3 ...
- # sort network with the length of network's name
- sorted_networks = sorted(cfg_attrs["networks"])
- # config external_network based on env var
- cfg_attrs["networks"][sorted_networks[0]]["external_network"] \
- = os.environ.get("EXTERNAL_NETWORK", "net04_ext")
-
context = Context.get(context_type)
context.init(cfg_attrs)
contexts.append(context)