From 06d55449914f9cca8e94e0559e9d681330eafe51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Harald=20Jens=C3=A5s?= Date: Tue, 5 Oct 2021 14:22:13 +0200 Subject: [PATCH] Deprecate and ignore --skip-nodes-and-networks Based on discussions make '--baremtal-deployment' option control wheater nodes, networks and virtual IPs are provisioned and deprecate --skip-nodes-and-networks for removal. When '--baremetal-deployment' is used without an argument the dynamic default in the working dir is used. When a baremetal deployment file is passed as the argument the file passed is placed in the working dir as the dynamic default and then used for provisioning. Change-Id: Idaab1f28c4d645279eff0c01b24435bf8571299b --- tripleoclient/utils.py | 2 +- tripleoclient/v1/overcloud_deploy.py | 25 +++++++++++++++---------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/tripleoclient/utils.py b/tripleoclient/utils.py index 55a48a09f..a92c99cbb 100644 --- a/tripleoclient/utils.py +++ b/tripleoclient/utils.py @@ -1799,7 +1799,7 @@ def update_working_dir_defaults(working_dir, args): stack_name = args.stack tht_root = os.path.abspath(args.templates) - if args.baremetal_deployment: + if isinstance(args.baremetal_deployment, str): copy_to_wd(working_dir, args.baremetal_deployment, stack_name, 'baremetal') diff --git a/tripleoclient/v1/overcloud_deploy.py b/tripleoclient/v1/overcloud_deploy.py index dbf969081..96af9c59d 100644 --- a/tripleoclient/v1/overcloud_deploy.py +++ b/tripleoclient/v1/overcloud_deploy.py @@ -299,7 +299,7 @@ class DeployOvercloud(command.Command): new_tht_root, constants.DEPLOYED_SERVER_ENVIRONMENT)) - if not parsed_args.skip_nodes_and_networks: + if parsed_args.baremetal_deployment is not None: created_env_files.extend( self._provision_networks(parsed_args, new_tht_root, protected_overrides)) @@ -915,10 +915,16 @@ class DeployOvercloud(command.Command): 'the deployment actions. This may need to ' 'be used if deploying on a python2 host ' 'from a python3 system or vice versa.')) - parser.add_argument('-b', '--baremetal-deployment', - metavar='', - help=_('Configuration file describing the ' - 'baremetal deployment')) + parser.add_argument( + '-b', '--baremetal-deployment', + metavar='', + nargs='?', + const=True, + help=_('Deploy baremetal nodes, network and virtual IP addresses ' + 'as defined in baremetal_deployment.yaml along with ' + 'overcloud. If no baremetal_deployment YAML file is given, ' + 'the tripleo--baremetal-deployment.yaml file ' + 'in the working-dir will be used.')) parser.add_argument('--network-config', help=_('Apply network config to provisioned ' 'nodes.'), @@ -1024,11 +1030,10 @@ class DeployOvercloud(command.Command): '--skip-nodes-and-networks', action='store_true', default=False, - help=_('When this is set no Baremetal Nodes, Networks nor Virtual ' - 'IPs will be provisioned. The resources are assumed to ' - 'already be provisioned. The environment files including ' - 'the necessary input for the stack create must be provided ' - 'by the user.') + help=_('DEPRECATED - This option is ignored if used. ' + 'The --baremetal-deployment option must be used to enable ' + 'provisioning of all resources, Baremetal nodes as well as' + 'Networks and Virtual IPs') ) parser.add_argument( '--disable-protected-resource-types',