From 4e1320c4235476d7e2a0a90f80997e8371c5f399 Mon Sep 17 00:00:00 2001 From: Tim Rozet Date: Wed, 30 Nov 2016 11:03:02 -0500 Subject: Adds declaring disk device to use on overcloud nodes Now in inventory file a user can declare 'disk_device' which will allow the user to specify which disk on their overcloud server to use for installation. The variable can be a comma delimited list, which will search in order post-introspection for the first device on the node that exists. The default disk used will be sda for deployments. Currently defining a per node disk is not supported by OSCLI, so although defined that way in Apex inventory, only the last definition will be used for all nodes. Other changes include: - Various fixes in inventory parsing - Makes bash writing a common function - Introspection now enabled for baremetal deployments JIRA: APEX-296 Change-Id: I330d91eb17408ccfceb7a99c25edbae5ce6d848d Signed-off-by: Tim Rozet --- lib/python/apex_python_utils.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'lib/python/apex_python_utils.py') 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', -- cgit 1.2.3-korg