summaryrefslogtreecommitdiffstats
path: root/lib/python/apex_python_utils.py
diff options
context:
space:
mode:
authorDan Radez <dradez@redhat.com>2016-12-21 19:39:51 +0000
committerGerrit Code Review <gerrit@opnfv.org>2016-12-21 19:39:51 +0000
commit6a6e2dee30562e14a99bf979b65e6817ad08d75a (patch)
treeb257d9833d2623a619341d5de7c25964f80b029f /lib/python/apex_python_utils.py
parentffb4f46e5ea022e0688cce672395f2dde409e88e (diff)
parent4e1320c4235476d7e2a0a90f80997e8371c5f399 (diff)
Merge "Adds declaring disk device to use on overcloud nodes"
Diffstat (limited to 'lib/python/apex_python_utils.py')
-rwxr-xr-xlib/python/apex_python_utils.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/python/apex_python_utils.py b/lib/python/apex_python_utils.py
index b0ebb270..e21d0464 100755
--- a/lib/python/apex_python_utils.py
+++ b/lib/python/apex_python_utils.py
@@ -22,7 +22,6 @@ from apex import NetworkEnvironment
from apex import DeploySettings
from apex import Inventory
from apex import ip_utils
-from apex.common.constants import ADMIN_NETWORK
def parse_net_settings(args):
@@ -66,7 +65,10 @@ def run_clean(args):
def parse_inventory(args):
inventory = Inventory(args.file, ha=args.ha, virtual=args.virtual)
- inventory.dump_instackenv_json()
+ if args.export_bash is True:
+ inventory.dump_bash()
+ else:
+ inventory.dump_instackenv_json()
def find_ip(args):
@@ -200,6 +202,11 @@ def get_parser():
default=False,
action='store_true',
help='Indicate if deployment inventory is virtual')
+ inventory.add_argument('--export-bash',
+ default=False,
+ dest='export_bash',
+ action='store_true',
+ help='Export bash variables from inventory')
inventory.set_defaults(func=parse_inventory)
clean = subparsers.add_parser('clean',