diff options
author | Chornyi, TarasX <tarasx.chornyi@intel.com> | 2018-06-11 15:18:54 +0300 |
---|---|---|
committer | Chornyi, TarasX <tarasx.chornyi@intel.com> | 2018-06-26 11:05:27 +0300 |
commit | 595212edf5ccd71af1bf7ef57a8d260fb1ec0c9e (patch) | |
tree | dc032e0dc4f32b5d158a0d72f1bfe9629fd48677 /yardstick/common/utils.py | |
parent | 4c4edf05781b0a7d7368cb29d27ae2e92230c194 (diff) |
Extended Context class with get_physical_nodes functionality
JIRA: YARDSTICK-1255
Change-Id: I446d715dc6cf716a4fcbc1b809c1b1d6303071e0
Signed-off-by: Chornyi, TarasX <tarasx.chornyi@intel.com>
Diffstat (limited to 'yardstick/common/utils.py')
-rw-r--r-- | yardstick/common/utils.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/yardstick/common/utils.py b/yardstick/common/utils.py index f9fe0e336..251e5cc6c 100644 --- a/yardstick/common/utils.py +++ b/yardstick/common/utils.py @@ -37,6 +37,7 @@ from oslo_utils import encodeutils import yardstick from yardstick.common import exceptions +from yardstick.common.yaml_loader import yaml_load logger = logging.getLogger(__name__) @@ -527,3 +528,11 @@ def wait_until_true(predicate, timeout=60, sleep=1, exception=None): if exception and issubclass(exception, Exception): raise exception # pylint: disable=raising-bad-type raise exceptions.WaitTimeout + + +def read_yaml_file(path): + """Read yaml file""" + + with open(path) as stream: + data = yaml_load(stream) + return data |