diff options
Diffstat (limited to 'yardstick/benchmark/contexts')
-rw-r--r-- | yardstick/benchmark/contexts/base.py | 5 | ||||
-rw-r--r-- | yardstick/benchmark/contexts/standalone/model.py | 6 |
2 files changed, 6 insertions, 5 deletions
diff --git a/yardstick/benchmark/contexts/base.py b/yardstick/benchmark/contexts/base.py index 022e365e4..796a14bc2 100644 --- a/yardstick/benchmark/contexts/base.py +++ b/yardstick/benchmark/contexts/base.py @@ -14,6 +14,7 @@ import os from yardstick.common import constants from yardstick.common import utils +from yardstick.common import yaml_loader from yardstick.common.constants import YARDSTICK_ROOT_PATH @@ -73,13 +74,13 @@ class Context(object): def read_pod_file(self, attrs): self.file_path = file_path = attrs.get("file", "pod.yaml") try: - cfg = utils.read_yaml_file(self.file_path) + cfg = yaml_loader.read_yaml_file(self.file_path) except IOError as io_error: if io_error.errno != errno.ENOENT: 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) self.nodes.extend(cfg["nodes"]) self.controllers.extend([node for node in cfg["nodes"] diff --git a/yardstick/benchmark/contexts/standalone/model.py b/yardstick/benchmark/contexts/standalone/model.py index 764cde3f7..ecddcbbe0 100644 --- a/yardstick/benchmark/contexts/standalone/model.py +++ b/yardstick/benchmark/contexts/standalone/model.py @@ -26,7 +26,7 @@ import xml.etree.ElementTree as ET from yardstick import ssh from yardstick.common import constants from yardstick.common import exceptions -from yardstick.common.utils import read_yaml_file +from yardstick.common import yaml_loader from yardstick.network_services.utils import PciAddress from yardstick.network_services.helpers.cpu import CpuSysCores @@ -399,13 +399,13 @@ class StandaloneContextHelper(object): nodes = [] nfvi_host = [] try: - cfg = read_yaml_file(self.file_path) + cfg = yaml_loader.read_yaml_file(self.file_path) except IOError as io_error: if io_error.errno != errno.ENOENT: raise self.file_path = os.path.join(constants.YARDSTICK_ROOT_PATH, file_path) - cfg = read_yaml_file(self.file_path) + cfg = yaml_loader.read_yaml_file(self.file_path) nodes.extend([node for node in cfg["nodes"] if str(node["role"]) != nfvi_role]) nfvi_host.extend([node for node in cfg["nodes"] if str(node["role"]) == nfvi_role]) |