From 71650b91419c7e57c278df220e4ee572517fd7fa Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Tue, 28 Sep 2021 00:53:36 +0900 Subject: [PATCH] Remove --no-workflow option ... because it has been ineffective since Ussuri. Change-Id: I030bc2a46bec0f43201f295162e890b906385bd6 (cherry picked from commit d66861b236f215291c0394bce7be52943b029150) --- .../remove-no-workflow-b3ad07729d3768d1.yaml | 8 +++++ tripleoclient/command.py | 30 +++++++------------ tripleoclient/v1/overcloud_external_update.py | 6 ---- .../v1/overcloud_external_upgrade.py | 6 ---- tripleoclient/v1/overcloud_update.py | 5 ---- tripleoclient/v1/overcloud_upgrade.py | 6 ---- 6 files changed, 18 insertions(+), 43 deletions(-) create mode 100644 releasenotes/notes/remove-no-workflow-b3ad07729d3768d1.yaml diff --git a/releasenotes/notes/remove-no-workflow-b3ad07729d3768d1.yaml b/releasenotes/notes/remove-no-workflow-b3ad07729d3768d1.yaml new file mode 100644 index 000000000..34fba9a88 --- /dev/null +++ b/releasenotes/notes/remove-no-workflow-b3ad07729d3768d1.yaml @@ -0,0 +1,8 @@ +--- +upgrades: + - | + The ``--no-workflow`` option has been removed from the following command. + + - ``openstack overcloud external update run`` + - ``openstack overcloud external upgrade run`` + - ``openstack overcloud update run`` diff --git a/tripleoclient/command.py b/tripleoclient/command.py index edccc6852..8a32c9a28 100644 --- a/tripleoclient/command.py +++ b/tripleoclient/command.py @@ -39,12 +39,9 @@ class Command(command.Command): raise @staticmethod - def get_ansible_key_and_dir(no_workflow, stack, orchestration): + def get_ansible_key_and_dir(stack, orchestration): """Return the ansible directory and key path. - :param no_workflow: Enable or disable the mistral workflow code path. - :type no_workflow: Boolean - :oaram stack: Name of a given stack to run against. :type stack: String @@ -53,22 +50,15 @@ class Command(command.Command): :returns: Tuple """ - - if no_workflow: - key = utils.get_key(stack=stack) - stack_config = config.Config(orchestration) - with utils.TempDirs(chdir=False) as tmp: - stack_config.write_config( - stack_config.fetch_config(stack), - stack, - tmp - ) - return key, tmp - else: - # Assumes execution will take place from within a mistral - # container. - key = '.ssh/tripleo-admin-rsa' - return key, None + key = utils.get_key(stack=stack) + stack_config = config.Config(orchestration) + with utils.TempDirs(chdir=False) as tmp: + stack_config.write_config( + stack_config.fetch_config(stack), + stack, + tmp + ) + return key, tmp def get_key_pair(self, parsed_args): """Autodetect or return a user defined key file. diff --git a/tripleoclient/v1/overcloud_external_update.py b/tripleoclient/v1/overcloud_external_update.py index 914405085..8a23a1cad 100644 --- a/tripleoclient/v1/overcloud_external_update.py +++ b/tripleoclient/v1/overcloud_external_update.py @@ -88,11 +88,6 @@ class ExternalUpdateRun(command.Command): help=('Set additional variables as key=value or ' 'yaml/json'), default=[]) - parser.add_argument('--no-workflow', dest='no_workflow', - action='store_true', - default=True, - help=_('This option no longer has any effect.') - ) parser.add_argument('-y', '--yes', default=False, action='store_true', help=_("Use -y or --yes to skip the confirmation " @@ -137,7 +132,6 @@ class ExternalUpdateRun(command.Command): if parsed_args.refresh: _, ansible_dir = self.get_ansible_key_and_dir( - no_workflow=True, stack=parsed_args.stack, orchestration=self.app.client_manager.orchestration ) diff --git a/tripleoclient/v1/overcloud_external_upgrade.py b/tripleoclient/v1/overcloud_external_upgrade.py index 185a72e16..41fd4adde 100644 --- a/tripleoclient/v1/overcloud_external_upgrade.py +++ b/tripleoclient/v1/overcloud_external_upgrade.py @@ -85,11 +85,6 @@ class ExternalUpgradeRun(command.Command): help=('Set additional variables as key=value or ' 'yaml/json'), default=[]) - parser.add_argument('--no-workflow', dest='no_workflow', - action='store_true', - default=True, - help=_('This option no longer has any effect.') - ) parser.add_argument('-y', '--yes', default=False, action='store_true', help=_("Use -y or --yes to skip the confirmation " @@ -129,7 +124,6 @@ class ExternalUpgradeRun(command.Command): raise OvercloudUpgradeNotConfirmed(constants.UPGRADE_NO) _, ansible_dir = self.get_ansible_key_and_dir( - no_workflow=True, stack=parsed_args.stack, orchestration=self.app.client_manager.orchestration ) diff --git a/tripleoclient/v1/overcloud_update.py b/tripleoclient/v1/overcloud_update.py index 204a4349c..01f8add21 100644 --- a/tripleoclient/v1/overcloud_update.py +++ b/tripleoclient/v1/overcloud_update.py @@ -130,11 +130,6 @@ class UpdateRun(command.Command): default=utils.env('OVERCLOUD_STACK_NAME', default='overcloud') ) - parser.add_argument('--no-workflow', dest='no_workflow', - action='store_true', - default=True, - help=_('This option no longer has any effect.') - ) parser.add_argument( '--tags', action='store', diff --git a/tripleoclient/v1/overcloud_upgrade.py b/tripleoclient/v1/overcloud_upgrade.py index 12dcb686e..9b04709e6 100644 --- a/tripleoclient/v1/overcloud_upgrade.py +++ b/tripleoclient/v1/overcloud_upgrade.py @@ -187,11 +187,6 @@ class UpgradeRun(command.Command): default=utils.env('OVERCLOUD_STACK_NAME', default='overcloud') ) - parser.add_argument('--no-workflow', dest='no_workflow', - action='store_true', - default=True, - help=_('This option no longer has any effect.') - ) parser.add_argument('-y', '--yes', default=False, action='store_true', help=_("Use -y or --yes to skip the confirmation " @@ -228,7 +223,6 @@ class UpgradeRun(command.Command): playbook = parsed_args.playbook _, ansible_dir = self.get_ansible_key_and_dir( - no_workflow=parsed_args.no_workflow, stack=parsed_args.stack, orchestration=self.app.client_manager.orchestration )