-
Notifications
You must be signed in to change notification settings - Fork 119
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
feat: Removed attach command #3409
Conversation
Coverage (computed on Fedora latest) •
|
61b4637
to
371a666
Compare
371a666
to
b667da0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are still many references to attaching in the code, but that would be out of scope for the command. However, I found
subscription-manager/src/subscription_manager/cli_command/cli.py
Lines 118 to 135 in b667da0
def _print_ignore_auto_attach_message(self): | |
""" | |
This message is shared by attach command and register command, because | |
both commands can do auto-attach. | |
:return: None | |
""" | |
owner = get_current_owner(self.cp, self.identity) | |
# We displayed Owner name: `owner_name = owner['displayName']`, but such behavior | |
# was not consistent with rest of subscription-manager | |
# Look at this comment: https://bugzilla.redhat.com/show_bug.cgi?id=1826300#c8 | |
owner_id = owner["key"] | |
print( | |
_( | |
"Ignoring the request to auto-attach. " | |
'Attaching subscriptions is disabled for organization "{owner_id}" ' | |
"because Simple Content Access (SCA) is enabled." | |
).format(owner_id=owner_id) | |
) |
that I believe should be part of this patch.
Otherwise LGTM. I won't block this PR on this change, we'll find it later during cleanup work.
b261e4f
to
02b3c62
Compare
This must not be merged before candlepin/subscription-manager-cockpit#68 is merged, otherwise the cockpit tests will fail (like they currently do). |
02b3c62
to
34f9232
Compare
* Card ID: CCT-425 * Removed attach command * Removed --auto-attach and --autosubscribe CLI options of register command * Removed --servicelevel CLI option of register command too, because this CLI option was possible to use only with --auto-attach CLI option. Thus, it does not make sense to keep this option * Removed unit tests for attach command * Modified unit tests for register command. Only SCA mode is considered.
* Card ID: CCT-425 * Removed interface: com.redhat.RHSM1.Attach * Removed AutoAttach and PoolAttach * Modified Register method * Removed unit tests related to removed methods * Modified unit tests of register D-Bus methods
* Card ID: CCT-425 * Removed attach service * Removed unit tests related to attach service
* Card ID: CCT-425 * Removed relevant references on auto-attach in man pages of subscription-manager * Note: references on auto-atach (autoheal) was not removed, because it is different command and it only enable/disable autoheal option of rhsmcertd
* Card ID: CCT-425 * Attach command was removed from bash complition script as well --auto-attach CLI option and --autosubscribe from register command
34f9232
to
3d1e806
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is OK, so I can merge this.
There are few more things related to these changes to fix:
etc-conf/dbus/system.d/com.redhat.RHSM1.conf
: traces of the removed D-Bus interfacesrc/rhsmlib/dbus/constants.py
: the now unusedATTACH_INTERFACE
andATTACH_DBUS_PATH
constants
One or more followup PRs would be nice, thanks!
Attach command
--auto-attach
and--autosubscribe
CLI options ofregister command
--servicelevel
CLI option of register command too,because this CLI option was possible to use only with
--auto-attach
CLI option. Thus, it does not make senseto keep this option
is considered.
D-Bus
Attach service