Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.29] feat: deprecate attach/auto-attach #3415

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 14 additions & 11 deletions man/subscription-manager.8
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,6 @@ must be passed as system arguments in a non-interactive session.
.IP
2. unregister

.IP
3. attach

.IP
4. auto-attach

.IP
5. remove

Expand Down Expand Up @@ -138,7 +132,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: addons, attach, auto-attach, role, service-level, subscribe, unsubscribe, usage, and activate

.SS COMMON OPTIONS
.TP
Expand Down Expand Up @@ -259,8 +253,7 @@ subscription-manager register --org="IT Dept" --activationkey=1234abcd

.TP
.B --auto-attach
Automatically attaches compatible subscriptions to this system.

Deprecated, this option will be removed in future major releases. Automatically attaches compatible subscriptions to this system.

.TP
.B --servicelevel=LEVEL
Expand Down Expand Up @@ -301,7 +294,7 @@ command does two important things. Firstly, it will implicitly remove all of the
This command has no options.

.SS ATTACH OPTIONS
The
This command is \fBdeprecated\fP and will be removed from the future major releases. The
.B attach
command applies a specific subscription to the system. This command is not possible to use, when the content access mode of the organization to which the system is registered is simple content access mode.

Expand Down Expand Up @@ -338,7 +331,7 @@ or
.B --file.

.SS AUTO-ATTACH OPTIONS
The
This command is \fBdeprecated\fP and will be removed from the future major releases. 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.

Expand Down Expand Up @@ -1043,6 +1036,14 @@ This has been replaced with \fBredeem\fP.
.B addons
This has been replaced with \fBsyspurpose addons\fP.

.TP
.B attach
This option is not used for systems registered using \fBsimple content access\fP.

.TP
.B auto-attach
This option is not used for systems registered using \fBsimple content access\fP.

.TP
.B role
This has been replaced with \fBsyspurpose role\fP.
Expand Down Expand Up @@ -1171,6 +1172,8 @@ An option with registration,
.B --auto-attach,
will automatically attach the subscriptions pool which best matches the system architecture and configuration to the newly-registered system. This option attaches subscriptions as part of the registration process, rather than separately managing subscriptions.

This option is deprecated and will be removed in future major releases. This option should only be used with systems that are not registered using simple content access.

.RS
.nf
subscription-manager register --username=admin --password=secret
Expand Down
3 changes: 2 additions & 1 deletion src/subscription_manager/cli_command/attach.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ def _read_pool_ids(self, f):

def _short_description(self):
return _(
"Deprecated, this command will be removed from the future major releases. "
"Attach a specified subscription to the registered system, when system does not use "
"Simple Content Access mode"
)
Expand All @@ -103,7 +104,7 @@ def _command_name(self):
return "attach"

def _primary(self):
return True
return False
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point.


def _validate_options(self):
if self.options.pool or self.options.file:
Expand Down
5 changes: 4 additions & 1 deletion src/subscription_manager/cli_command/autoheal.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ 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. "
"Set if subscriptions are attached on a schedule (default of daily)"
)
self._org_help_text = _("specify whether to enable or disable auto-attaching of subscriptions")
super(AutohealCommand, self).__init__("auto-attach", shortdesc, False)

Expand Down
6 changes: 5 additions & 1 deletion src/subscription_manager/cli_command/register.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,11 @@ def __init__(self):
"--auto-attach",
action="store_true",
dest="autoattach",
help=_("automatically attach compatible subscriptions to this system"),
help=_(
"Deprecated, this option will be removed from the future major releases. "
"This option is no-op when simple content access is used. "
"Automatically attach compatible subscriptions to this system"
),
)
self.parser.add_argument(
"--force",
Expand Down
Loading