diff options
author | Tim Rozet <trozet@redhat.com> | 2016-08-31 01:40:12 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@172.30.200.206> | 2016-08-31 01:40:13 +0000 |
commit | f01595f801e1d78f84b43c111f2955f67573e263 (patch) | |
tree | 37d553b3b2ced09a87923fd9e1328d7608aec048 /lib/python/apex_python_utils.py | |
parent | 04a7bf2596ea69def02e8aaedd32f091b35ba7ce (diff) | |
parent | 4b84887ed2322db6b04924bdee7b44d3dcf7c32d (diff) |
Merge "Adds ability to power off nodes in clean"
Diffstat (limited to 'lib/python/apex_python_utils.py')
-rwxr-xr-x | lib/python/apex_python_utils.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/python/apex_python_utils.py b/lib/python/apex_python_utils.py index b6aaafaa..1f5e407c 100755 --- a/lib/python/apex_python_utils.py +++ b/lib/python/apex_python_utils.py @@ -7,6 +7,7 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## +import apex import argparse import sys import logging @@ -61,6 +62,10 @@ def parse_deploy_settings(args): settings.dump_bash() +def run_clean(args): + apex.clean_nodes(args.file) + + def find_ip(args): """ Get and print the IP from a specific interface @@ -192,6 +197,12 @@ def get_parser(): help='path to deploy settings file') deploy_settings.set_defaults(func=parse_deploy_settings) + clean = subparsers.add_parser('clean', + help='Parse deploy settings file') + clean.add_argument('-f', '--file', + help='path to inventory file') + clean.set_defaults(func=run_clean) + return parser |