Skip to content

Commit

Permalink
feat: Remove auto-attach command
Browse files Browse the repository at this point in the history
* Card ID: CCT-717
* Removed command that enabled/disabled autoheal option of
  consumer object on server side. The autoheal is useless
  in SCA mode and it will be removed later too.
* Updated creation of UEPConnection class and related
  stub class for unit testing
* Updated man page
* Updated bash completion script
  • Loading branch information
jirihnidek authored and ptoscano committed Sep 6, 2024
1 parent d9204e3 commit f39d07f
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 107 deletions.
12 changes: 1 addition & 11 deletions etc-conf/subscription-manager.completion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ _subscription_manager_common_opts="--proxy --proxyuser --proxypassword --noproxy
_subscription_manager_common_url_opts="--insecure --serverurl"
# complete functions for subcommands ($1 - current opt, $2 - previous opt)

_subscription_manager_auto_attach()
{
local opts="--enable --disable --show ${_subscription_manager_common_opts}"
COMPREPLY=($(compgen -W "${opts}" -- ${1}))
}

_subscription_manager_syspurpose()
{
local opts="role service-level usage --show ${_subscription_manager_common_opts}"
Expand Down Expand Up @@ -206,7 +200,7 @@ _subscription_manager()
done

# top-level commands and options
opts="auto-attach clean config environments facts identity list orgs
opts="clean config environments facts identity list orgs
repo-override plugins refresh register release repos status
syspurpose unregister version ${_subscription_manager_help_opts}"

Expand All @@ -230,10 +224,6 @@ _subscription_manager()
"_subscription_manager_$first" "${cur}" "${prev}"
return 0
;;
auto-attach)
"_subscription_manager_auto_attach" "${cur}" "${prev}"
return 0
;;
repo-override)
"_subscription_manager_repo_override" "${cur}" "${prev}"
return 0
Expand Down
20 changes: 0 additions & 20 deletions man/subscription-manager.8
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,6 @@ must be passed as system arguments in a non-interactive session.
.IP
2. unregister

.IP
4. auto-attach

.IP
6. release

Expand Down Expand Up @@ -279,23 +276,6 @@ command does two important things. Firstly, it will implicitly remove all of the
.PP
This command has no options.

.SS AUTO-ATTACH OPTIONS
The
.B auto-attach
command sets whether the ability to check, attach, and update subscriptions occurs automatically on the system. Auto-attaching subscriptions checks the currently-installed products, attached subscriptions, and any changes in available subscriptions every four hours using the \fBrhsmcertd\fP daemon.

.TP
.B --enable
Enables the auto-attach option for the system. If there is any change in the subscriptions for the system, any subscriptions expire, or any new products are installed, then \fBsubscription-manager\fP detects the changes and automatically attaches the appropriate subscriptions so that the system remains covered.

.TP
.B --disable
Disables the auto-attach option for the system. If auto-attach is disabled, then any changes in installed products or subscriptions for the system (including expired subscriptions) must be addressed manually by the administrator.

.TP
.B --show
Shows whether auto-attach is enabled on the systems.

.SS RELEASE OPTIONS
The
.B release
Expand Down
3 changes: 0 additions & 3 deletions src/rhsm/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -1676,7 +1676,6 @@ def updateConsumer(
guest_uuids: Union[List[str], List[dict]] = None,
service_level: str = None,
release: str = None,
autoheal: bool = None,
hypervisor_id: str = None,
content_tags: set = None,
role: str = None,
Expand Down Expand Up @@ -1707,8 +1706,6 @@ def updateConsumer(
params["facts"] = facts
if release is not None:
params["releaseVer"] = release
if autoheal is not None:
params["autoheal"] = autoheal
if hypervisor_id is not None:
params["hypervisorId"] = {"hypervisorId": hypervisor_id}
if content_tags is not None:
Expand Down
70 changes: 0 additions & 70 deletions src/subscription_manager/cli_command/autoheal.py

This file was deleted.

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.autoheal import AutohealCommand
from subscription_manager.cli_command.clean import CleanCommand
from subscription_manager.cli_command.config import ConfigCommand
from subscription_manager.cli_command.environments import EnvironmentsCommand
Expand Down Expand Up @@ -64,7 +63,6 @@ def __init__(self):
EnvironmentsCommand,
VersionCommand,
PluginsCommand,
AutohealCommand,
OverrideCommand,
FactsCommand,
SyspurposeCommand,
Expand Down
1 change: 0 additions & 1 deletion test/stubs.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,6 @@ def updateConsumer(
guest_uuids=None,
service_level=None,
release=None,
autoheal=None,
content_tags=None,
addons=None,
role=None,
Expand Down

0 comments on commit f39d07f

Please sign in to comment.