Skip to content

Commit

Permalink
Remove addons CLI command
Browse files Browse the repository at this point in the history
subscription-manager addons is no longer recognized.
  • Loading branch information
Glutexo committed Jul 1, 2024
1 parent dd68e24 commit c3e42fe
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 14 deletions.
3 changes: 1 addition & 2 deletions etc-conf/subscription-manager.completion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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|\
Expand Down
6 changes: 1 addition & 5 deletions man/subscription-manager.8
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
8 changes: 4 additions & 4 deletions src/subscription_manager/cli_command/syspurpose.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions src/subscription_manager/managercli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -60,7 +59,6 @@ def __init__(self):
commands: List[Type[CliCommand]] = [
RegisterCommand,
UnRegisterCommand,
AddonsCommand,
ConfigCommand,
ListCommand,
IdentityCommand,
Expand Down
2 changes: 1 addition & 1 deletion test/cli_command/test_addons.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c3e42fe

Please sign in to comment.