diff options
author | 2016-08-31 01:40:12 +0000 | |
---|---|---|
committer | 2016-08-31 01:40:13 +0000 | |
commit | f01595f801e1d78f84b43c111f2955f67573e263 (patch) | |
tree | 37d553b3b2ced09a87923fd9e1328d7608aec048 /lib/python/apex/common/utils.py | |
parent | 04a7bf2596ea69def02e8aaedd32f091b35ba7ce (diff) | |
parent | 4b84887ed2322db6b04924bdee7b44d3dcf7c32d (diff) |
Merge "Adds ability to power off nodes in clean"
Diffstat (limited to 'lib/python/apex/common/utils.py')
-rw-r--r-- | lib/python/apex/common/utils.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/python/apex/common/utils.py b/lib/python/apex/common/utils.py index b7678a20..fe34096d 100644 --- a/lib/python/apex/common/utils.py +++ b/lib/python/apex/common/utils.py @@ -7,9 +7,17 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## +import yaml + def str2bool(var): if isinstance(var, bool): return var else: return var.lower() in ("true", "yes") + + +def parse_yaml(yaml_file): + with open(yaml_file) as f: + parsed_dict = yaml.load(f) + return parsed_dict |