summaryrefslogtreecommitdiffstats
path: root/lib/python/apex_python_utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/python/apex_python_utils.py')
-rwxr-xr-xlib/python/apex_python_utils.py11
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