X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=yardstick%2Fcommon%2Futils.py;h=251e5cc6c4ec28a93fc601bea70ed8565ec91df5;hb=bbced563ad9ceca5021c65a2e6284861d36db4f8;hp=f9fe0e336e9e39267c35b6c4c88e05d338ad9b18;hpb=d64760d051ec14002847352a20da02774a8bda05;p=yardstick.git 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