From: Rodolfo Alonso Hernandez Date: Thu, 5 Jul 2018 08:00:09 +0000 (+0000) Subject: Merge "Move "read_yaml_file" to common.yaml_loader" X-Git-Tag: opnfv-7.0.0~192 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=43eb5e0b4a03278b12c002ff5a5d1c6f58da35d6;p=yardstick.git Merge "Move "read_yaml_file" to common.yaml_loader" --- 43eb5e0b4a03278b12c002ff5a5d1c6f58da35d6 diff --cc yardstick/benchmark/contexts/base.py index 1c798fbb3,796a14bc2..f3f5879eb --- a/yardstick/benchmark/contexts/base.py +++ b/yardstick/benchmark/contexts/base.py @@@ -79,11 -80,8 +80,11 @@@ class Context(object) raise self.file_path = os.path.join(YARDSTICK_ROOT_PATH, file_path) - cfg = utils.read_yaml_file(self.file_path) + cfg = yaml_loader.read_yaml_file(self.file_path) + for node in cfg["nodes"]: + node["ctx_type"] = self.__context_type__ + self.nodes.extend(cfg["nodes"]) self.controllers.extend([node for node in cfg["nodes"] if node.get("role") == "Controller"])