Bug 736083

Summary: subscription manager - automate unregistration of a host which is no longer online
Product: Red Hat Enterprise Linux 6 Reporter: Scott Spurrier <spurrier>
Component: subscription-managerAssignee: Bryan Kearney <bkearney>
Status: CLOSED WONTFIX QA Contact: John Sefler <jsefler>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1CC: andriusb, jwest, xdmoon
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-01-03 21:08:14 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: 756082    

Description Scott Spurrier 2011-09-06 16:01:52 UTC
Description of problem:

Requesting the ability to unsubscribe a host with subscription manager using another system.  We are looking for a way to unsubscribe a host using another system mainly because we need to do this after the host has already been retired.  If the subscription-manager command would allow you to pass in the consumerid, that would do the trick. Something like:

# subscription-manager unsubscribe --username <USERNAME> --password <PASSWORD> --consumerid=XXXXXXXXXXXXX

Comment 3 Bryan Kearney 2011-09-06 16:30:44 UTC
This can be done using python-rhsm. Please see the ungregisterConsumer method on the UEPConnection class.