summaryrefslogtreecommitdiffstats
path: root/yardstick/common/utils.py
diff options
context:
space:
mode:
authorRodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>2018-06-28 16:17:27 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-06-28 16:17:27 +0000
commiteb54a9e65e838e092e5acb5a8bd4119dd2e9f556 (patch)
tree41af1dad6cd4fe99638f29b92cb7cfbb70987fdb /yardstick/common/utils.py
parent931c7d87597fd61f9e300be2637a0bdd485001d9 (diff)
parent90919566f056e1881c7d35c45ef6dc9725dcf18e (diff)
Merge "Extended Context class with get_physical_nodes functionality" into stable/fraser
Diffstat (limited to 'yardstick/common/utils.py')
-rw-r--r--yardstick/common/utils.py9
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