From ca5139211ffa6e77de3fb09b682d7b4abd12129c Mon Sep 17 00:00:00 2001 From: Fernando Diaz Date: Thu, 1 Dec 2022 14:19:49 +0100 Subject: [PATCH] bnr - Deprecation note Backup and restore is deprecated and will be removed in the next release. This change informs adds a deprecation note everytime a backup command is executed. Change-Id: Ief36bd72fe58e2b0ac9709ce427407339454afbf --- tripleoclient/v1/overcloud_backup.py | 8 ++++++++ tripleoclient/v1/undercloud_backup.py | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/tripleoclient/v1/overcloud_backup.py b/tripleoclient/v1/overcloud_backup.py index f4a8ff332..32db6fb26 100644 --- a/tripleoclient/v1/overcloud_backup.py +++ b/tripleoclient/v1/overcloud_backup.py @@ -213,6 +213,14 @@ class BackupOvercloud(command.Command): parsed_args.cron is False and parsed_args.init is None): + self.log.warning( + '\n' + ' ########################################################\n' + ' # Deprecation note #\n' + ' # Backup and restore feature is deprecated and will be #\n' + ' # removed in the next release. Please consider using #\n' + ' # snapshot and revert feature. #\n' + ' ########################################################\n') self.log.debug(_('Starting Overcloud Backup')) self._run_ansible_playbook( playbook='cli-overcloud-backup.yaml', diff --git a/tripleoclient/v1/undercloud_backup.py b/tripleoclient/v1/undercloud_backup.py index abac6fc02..58b26c861 100644 --- a/tripleoclient/v1/undercloud_backup.py +++ b/tripleoclient/v1/undercloud_backup.py @@ -175,6 +175,14 @@ class BackupUndercloud(command.Command): extra_vars = self._parse_extra_vars(parsed_args.extra_vars) + LOG.warning( + '\n' + ' #############################################################\n' + ' # Deprecation note #\n' + ' # Backup and restore feature is deprecated and will be #\n' + ' # removed in the next release. #\n' + ' #############################################################\n') + if not (os.path.isfile(parsed_args.inventory) and os.access(parsed_args.inventory, os.R_OK)): raise RuntimeError(