From c3e42fe03a6579eb6a7cd47311152d7692a79e84 Mon Sep 17 00:00:00 2001 From: Glutexo Date: Mon, 17 Jun 2024 16:41:52 +0200 Subject: [PATCH] Remove addons CLI command subscription-manager addons is no longer recognized. --- etc-conf/subscription-manager.completion.sh | 3 +-- man/subscription-manager.8 | 6 +----- src/subscription_manager/cli_command/syspurpose.py | 8 ++++---- src/subscription_manager/managercli.py | 2 -- test/cli_command/test_addons.py | 2 +- 5 files changed, 7 insertions(+), 14 deletions(-) diff --git a/etc-conf/subscription-manager.completion.sh b/etc-conf/subscription-manager.completion.sh index 592e47b3c5..0e0f25047f 100644 --- a/etc-conf/subscription-manager.completion.sh +++ b/etc-conf/subscription-manager.completion.sh @@ -268,12 +268,11 @@ _subscription_manager() done # top-level commands and options - opts="addons attach auto-attach clean config environments facts identity import list orgs + opts="attach auto-attach clean config environments facts identity import list orgs repo-override plugins redeem refresh register release remove repos role service-level status syspurpose unregister usage version ${_subscription_manager_help_opts}" case "${first}" in - addons|\ clean|\ config|\ environments|\ diff --git a/man/subscription-manager.8 b/man/subscription-manager.8 index 427d005e8f..4fb88b58b7 100644 --- a/man/subscription-manager.8 +++ b/man/subscription-manager.8 @@ -138,7 +138,7 @@ must be passed as system arguments in a non-interactive session. .RE -Following commands were deprecated: addons, role, service-level, subscribe, unsubscribe, usage, and activate +Following commands were deprecated: role, service-level, subscribe, unsubscribe, usage, and activate .SS COMMON OPTIONS .TP @@ -1039,10 +1039,6 @@ This has been replaced with \fBremove\fP. .B activate This has been replaced with \fBredeem\fP. -.TP -.B addons -This has been replaced with \fBsyspurpose addons\fP. - .TP .B role This has been replaced with \fBsyspurpose role\fP. diff --git a/src/subscription_manager/cli_command/syspurpose.py b/src/subscription_manager/cli_command/syspurpose.py index 40d5a76440..3b98242c7b 100644 --- a/src/subscription_manager/cli_command/syspurpose.py +++ b/src/subscription_manager/cli_command/syspurpose.py @@ -36,10 +36,10 @@ class SyspurposeCommand(CliCommand): """ - Syspurpose command for generic actions. This command will be used for all - syspurpose actions in the future and it will replace addons, role, - service-level and usage commands. It will be possible to set service-type - using this command. + Syspurpose command for generic actions. This command replaced the addons + command and will be used for all syspurpose actions in the future. It will + replace role, service-level and usage commands too. It will be possible to + set service-type using this command. Note: when the system is not registered, then it doesn't make any sense to synchronize syspurpose values with candlepin server, because consumer diff --git a/src/subscription_manager/managercli.py b/src/subscription_manager/managercli.py index 64957ebc31..2b6a03bdb1 100644 --- a/src/subscription_manager/managercli.py +++ b/src/subscription_manager/managercli.py @@ -23,7 +23,6 @@ from subscription_manager import managerlib from subscription_manager.cli import CLI -from subscription_manager.cli_command.addons import AddonsCommand from subscription_manager.cli_command.attach import AttachCommand from subscription_manager.cli_command.autoheal import AutohealCommand from subscription_manager.cli_command.clean import CleanCommand @@ -60,7 +59,6 @@ def __init__(self): commands: List[Type[CliCommand]] = [ RegisterCommand, UnRegisterCommand, - AddonsCommand, ConfigCommand, ListCommand, IdentityCommand, diff --git a/test/cli_command/test_addons.py b/test/cli_command/test_addons.py index 641c648edd..d3318f8149 100644 --- a/test/cli_command/test_addons.py +++ b/test/cli_command/test_addons.py @@ -29,7 +29,7 @@ def setUp(self): sp_patch = syspurpose_patch.start() self.addCleanup(sp_patch.stop) super(TestAddonsCommand, self).setUp() - argv_patcher = patch.object(sys, "argv", ["subscription-manager", "addons"]) + argv_patcher = patch.object(sys, "argv", ["subscription-manager", "syspurpose", "addons"]) argv_patcher.start() self.addCleanup(argv_patcher.stop) syspurposelib.USER_SYSPURPOSE = self.write_tempfile("{}").name