From e7b1dcd8bec2e6a1d85a982c2319cf93180493e2 Mon Sep 17 00:00:00 2001 From: Jason Jerome Date: Fri, 7 Jun 2024 09:16:46 -0400 Subject: [PATCH] feat: deprecate attach/auto-attach modules This patch adds a deprecation notice to the attach/auto-attach command descriptions. This patch also moves the attach command to the 'Other Modules' section in the sub-man help text from the 'Primary Modules' section. The attach command already displays an error message when attempting to attach subscriptions with an SCA registered system, so no changes are required to implement this. Signed-off-by: Jason Jerome --- src/subscription_manager/cli_command/attach.py | 7 ++----- src/subscription_manager/cli_command/autoheal.py | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/subscription_manager/cli_command/attach.py b/src/subscription_manager/cli_command/attach.py index 1796b164aa..0e9953148f 100644 --- a/src/subscription_manager/cli_command/attach.py +++ b/src/subscription_manager/cli_command/attach.py @@ -94,16 +94,13 @@ def _read_pool_ids(self, f): self.options.pool.append(pool) def _short_description(self): - return _( - "Attach a specified subscription to the registered system, when system does not use " - "Simple Content Access mode" - ) + return _("Deprecated, this command will be removed from the future major releases") def _command_name(self): return "attach" def _primary(self): - return True + return False def _validate_options(self): if self.options.pool or self.options.file: diff --git a/src/subscription_manager/cli_command/autoheal.py b/src/subscription_manager/cli_command/autoheal.py index d4ead1f2fd..b79e82623b 100644 --- a/src/subscription_manager/cli_command/autoheal.py +++ b/src/subscription_manager/cli_command/autoheal.py @@ -24,7 +24,7 @@ class AutohealCommand(CliCommand): def __init__(self): self.uuid = inj.require(inj.IDENTITY).uuid - shortdesc = _("Set if subscriptions are attached on a schedule (default of daily)") + shortdesc = _("Deprecated, this option will be removed from the future major releases") self._org_help_text = _("specify whether to enable or disable auto-attaching of subscriptions") super(AutohealCommand, self).__init__("auto-attach", shortdesc, False)