Bug 1926836
| Summary: | RFE: provide an API to get integrated subscription/repository state info | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Michal Reznik <mreznik> |
| Component: | subscription-manager | Assignee: | candlepin-bugs |
| Status: | NEW --- | QA Contact: | Red Hat subscription-manager QE Team <rhsm-qe> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 8.4 | CC: | pstodulk, redakkan |
| Target Milestone: | rc | Keywords: | FutureFeature, Triaged |
| Target Release: | 8.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | Type: | Bug | |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
Hi Michal , Can you please let us know what are the subscription manager commands that leapp tool is currently using ? We would also like to know does the leapp tool preserve the consumer details after the upgrades ? thanks, Rehana Hi Rehana, here is the list of rhsm commands we are actually using: ----- (to get some data) # subscription-manager list --consumed # subscription-manager status # subscription-manager repos --list-enabled # subscription-manager release ----- (to "configure" system as needed) # subscription-manager refresh # subscription-manager release --unset # subscription-manager release --set ... # subscription-manager repos --enable .... ---------------- I guess you asked just about the first set of commands, which we use to get the data about system. From that commands we get right now this info: - The release the subscription-manager is set to - SKUs the system is attached to - Repositories that are available to the current system through the subscription-manager - Repositories that are enabled on the current system through the subscription-manager - Whether the SCA is used or not And separately out-of rhsm utility, we get info about the installed product certificate(s). I am not sure what exactly are you asking about the preservation of consumer details. Can you elaborate on that a little bit? I will try to answer, that expactation is that the upgraded system is still subscribe and user can use it. If this is what you are asking about. |
Use case: Leapp (RHEL in-place upgrades) is frequently using RHSM to get various info about subscriptions and repositories. In order to limit number of RHSM calls and avoid parsing the test output, it would be nice to have a one place our tool could call, to get the info in machine consumable format. E.g. # subcription-manager summary --json { "list": [ 1, 2, 3 ], "repos": [ 1, 2, 3 ], "is_sca": true, "release": "8.2", “purpose”: “...”, ... }