diff options
author | Tim Rozet <trozet@redhat.com> | 2016-08-30 13:06:33 -0400 |
---|---|---|
committer | Tim Rozet <trozet@redhat.com> | 2016-08-30 15:34:04 -0400 |
commit | 4b84887ed2322db6b04924bdee7b44d3dcf7c32d (patch) | |
tree | 7500abe13324ba298ce0b6eff08bd04f87510bd3 /lib/python/apex/common | |
parent | d7ceff5d5eefef27f7c2dd23c9161cc8ddd7140b (diff) |
Adds ability to power off nodes in clean
Now if an inventory file is provided to clean, those nodes will be
powered off.
JIRA: APEX-250
Change-Id: I2d78285717726c3d1c9d7d88c38e706d4617e337
Signed-off-by: Tim Rozet <trozet@redhat.com>
Diffstat (limited to 'lib/python/apex/common')
-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 |