Bug 782775
Summary: | Different params for unsubscription in RHSM and Katello CLI | ||
---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Martin Bacovsky <mbacovsk> |
Component: | katello-agent | Assignee: | Martin Bacovsky <mbacovsk> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Katello QA List <katello-qa-list> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 6.0.0 | CC: | bkearney, sghai |
Target Milestone: | Unspecified | Keywords: | Triaged |
Target Release: | Unused | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2012-08-22 18:20:41 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 747354 |
Description
Martin Bacovsky
2012-01-18 12:24:33 UTC
Copied from inecas's comment on mailing list (for tracking purposes) There are 3 ways how to unsubscribe in CP: 1. DELETE "/candlepin/consumers/d4b32e09-4bab-4fe2-a98b-ce7ec96cb8cb/certificates/6444937435662822417" (used by subscription-manager unsubscribe --serial) AND 2. DELETE /candlepin/consumers/d4b32e09-4bab-4fe2-a98b-ce7ec96cb8cb/entitlements/4028fa8134f045a10134f048a0ed0026 (used by katello unsubscribe) AND 3. DELETE /candlepin/consumers/d4b32e09-4bab-4fe2-a98b-ce7ec96cb8cb/entitlements (used by subscription-manager unsubscribe --all) Since katello-0.1.195-1 and katello-cli-0.1.41-1 the CLI is fixed as follows CLI: system unsubscribe --org <org> --name <name> --entitlement <ent_id> system unsubscribe --org <org> --name <name> --serial <serial_id> system unsubscribe --org <org> --name <name> --all Serial and entitlement ids are listed via: system subscrptions --org <org> --name <name> Available pools via system subscrptions --org <org> --name <name> --available Verified with following katello build: katello-cli-0.1.42-1.el6.noarch katello-0.1.195-1.el6.noarch Now we can unsubscribe a product with entitlement id as well as serial cert id. And for unsubscription katello cli has same params as for rhsm ( i.e. --serial) Help text is updated and includes entitlement instead of pool id. Also include the serial id of certificate to unsubscribe the product. katello> system unsubscribe --help Usage: katello [options] Options: -h, --help show this help message and exit -g grep friendly output -v verbose, more structured output -d DELIMITER grep friendly output column delimiter --org=ORG organization name (required) --name=NAME system name (required) --entitlement=ENTITLEMENT entitlement id to unsubscribe from (either entitlement or serial or all is required) --serial=SERIAL serial id of a certificate to unsubscribe from (either entitlement or serial or all is required) --all unsubscribe from all currently subscribed certificates (either entitlement or serial or all is required) katello> katello> system subscriptions --org ACME_Corporation --name dhcp193-78.pnq.redhat.com ---------------------------------------------------------------------------------------------- Current Subscriptions for System [ dhcp193-78.pnq.redhat.com ] ---------------------------------------------------------------------------------------------- EntitlementId: 8ac1490f35138547013514be662b003b Serial Id: 3219094884821188044 PoolName: pulp Expires: 01/17/2042 Consumed: 1 Quantity: 1 Sla: ContractNumber: Provided products: Unsubscribing the system with entitlement id :success ====================================================== katello> system subscriptions --name dhcp193-78.pnq.redhat.com --org ACME_Corporation ---------------------------------------------------------------------------------------------- Current Subscriptions for System [ dhcp193-78.pnq.redhat.com ] ---------------------------------------------------------------------------------------------- EntitlementId: 8ac1490f35138547013514c8ce10003f Serial Id: 7988125811537418628 PoolName: pulp Expires: 01/17/2042 Consumed: 1 Quantity: 1 Sla: ContractNumber: Provided products: katello> system unsubscribe --org ACME_Corporation --name dhcp193-78.pnq.redhat.com --entitlement 8ac1490f35138547013514c8ce10003f Successfully unsubscribed System [ dhcp193-78.pnq.redhat.com ] Unsubscribing the system with serial cert id is also a success: ====================================================== katello> system subscriptions --org ACME_Corporation --name dhcp193-78.pnq.redhat.com ---------------------------------------------------------------------------------------------- Current Subscriptions for System [ dhcp193-78.pnq.redhat.com ] ---------------------------------------------------------------------------------------------- EntitlementId: 8ac1490f35138547013514be662b003b Serial Id: 3219094884821188044 PoolName: pulp Expires: 01/17/2042 Consumed: 1 Quantity: 1 Sla: ContractNumber: Provided products: katello> system unsubscribe --org ACME_Corporation --name dhcp193-78.pnq.redhat.com --serial 3219094884821188044 Successfully unsubscribed System [ dhcp193-78.pnq.redhat.com ] |