Bug #15272
'hammer activation-key subscriptions' shows already removed subscriptions
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1339211
Description of problem:
After successful subscription removal from activation key, hammer's 'activation-key subscriptions' command still shows subscription is associated to activation key.
It's not an issue with removal, as changes are reflected correctly via WebUI (and subscription will be shown by 'activation-key subscriptions' command even if you removed it via WebUI)
Version-Release number of selected component (if applicable):
Satellite 6.2.0 GA SNAP 12.1
How reproducible:
Always
Steps to Reproduce:
1. Add subscription to activation key:
hammer activation-key add-subscription --subscription-id="10" --id="2"
2. Make sure subscription was added:
hammer activation-key subscriptions --id="2" --organization-id="47"
3. Remove subscription:
hammer activation-key remove-subscription --subscription-id="10" --id="2"
4. Ensure subscription was removed with 'hammer activation-key subscriptions' command:
hammer activation-key subscriptions --id="2" --organization-id="47"
Actual results:
Subscription is still listed:
---|-----------------------------------------------------------|----------|----------|---------------------|---------------------|--------------|----------|--------
ID | NAME | ATTACHED | QUANTITY | START DATE | END DATE | SUPPORT | CONTRACT | ACCOUNT
---|-----------------------------------------------------------|----------|----------|---------------------|---------------------|--------------|----------|--------
10 | Red Hat Enterprise Linux Server Entry Level, Self-support | 0 of 25 | | 2015/10/14 04:00:00 | 2016/10/14 03:59:59 | Self-Support | 10800893 | 477931
---|-----------------------------------------------------------|----------|----------|---------------------|---------------------|--------------|----------|--------
Expected results:
'hammer activation-key subscriptions' should not show the subscription, which was removed from activation key.
Additional info:
Related issues
Associated revisions
History
#1
Updated by The Foreman Bot over 4 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/Katello/hammer-cli-katello/pull/405 added
#2
Updated by Andrew Kofink over 4 years ago
- Related to Refactor #15410: Move activation_keys#subscriptions to subscriptions#index added
#3
Updated by Dominic Cleal over 4 years ago
- Project changed from Hammer CLI to Katello
#4
Updated by Justin Sherrill over 4 years ago
- Legacy Backlogs Release (now unused) set to 162
#5
Updated by Justin Sherrill over 4 years ago
- Category set to Hammer
- Assignee set to Andrew Kofink
- Difficulty set to easy
#6
Updated by Andrew Kofink over 4 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset hammer-cli-katello|9e72e0c8a3759016112b4445d38a2bc55a020aeb.
Fixes #15272 - Only show subscriptions added to...
...the activation key specified.
- Add some rudimentary tests for the `activation-key subscriptions`
command.
- Add some rudimentary tests for `subscription list`