Bug 1151925
| Summary: | [RFE] Display appropriate message when no repos found by --list-enabled/disable filters | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Rehana <redakkan> |
| Component: | subscription-manager | Assignee: | Chris "Ceiu" Rog <crog> |
| Status: | CLOSED ERRATA | QA Contact: | John Sefler <jsefler> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.1 | CC: | crog, wpoteat |
| Target Milestone: | rc | Keywords: | FutureFeature |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Enhancement | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-03-05 13:15:34 UTC | 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: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1005618 | ||
commit 2e6faa56ecb0ddb5a0b7b9bb4ac381a537a24cfe
Merge: cc35586 72e2193
Author: Adrian Likins <alikins>
Date: Thu Oct 23 11:19:05 2014 -0400
Merge pull request #1039 from candlepin/crog/1151925
1151925: Improved filtered listing output when results are empty.
Retester on,
# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 0.9.32-1
subscription management rules: 5.11
subscription-manager: 1.13.7-1.el7
python-rhsm: 1.13.6-1.el7
1) Registered and attached pool
# subscription-manager attach --auto
Installed Product Current Status:
Product Name: Awesome OS Server Bits
Status: Subscribed
2) Repo list
# subscription-manager repos --list
+----------------------------------------------------------+
Available Repositories in /etc/yum.repos.d/redhat.repo
+----------------------------------------------------------+
Repo ID: content-label-empty-gpg
Repo Name: content-emptygpg
Repo URL: https://cdn.redhat.com/foo/path
Enabled: 0
Repo ID: content-label
Repo Name: content
Repo URL: https://cdn.redhat.com/foo/path
Enabled: 0
Repo ID: content-label-no-gpg
Repo Name: content-nogpg
Repo URL: https://cdn.redhat.com/foo/path
Enabled: 0
Repo ID: never-enabled-content
Repo Name: never-enabled-content
Repo URL: https://cdn.redhat.com/foo/path/never
Enabled: 0
3) --list-enabled on the client
# subscription-manager repos --list-enabled
There were no available repositories matching the specified criteria.
Observed that ^^ above message is displayed when no repositories found by the list-enabled
4) Now enable all repos and try --list-disabled
# subscription-manager repos --enable=*
Repository 'content-label-empty-gpg' is enabled for this system.
Repository 'content-label' is enabled for this system.
Repository 'content-label-no-gpg' is enabled for this system.
Repository 'never-enabled-content' is enabled for this system.
# subscription-manager repos --list-disabled
There were no available repositories matching the specified criteria.
Observed that ^^ above message is displayed when no repositories found by the list-disabled
Marking verified.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-0502.html |
Description of problem: Observed that when no "Repositories" found by the --list-enabled/disabled filters,it displays a empty "Available repositories" list.I Suggest to display message instead of displaying an empty list Version-Release number of selected component (if applicable): subscription-manager version server type: Red Hat Subscription Management subscription management server: 0.9.32-1 subscription management rules: 5.11 subscription-manager: 1.13.5-1.git.0.1e307d9.el7 python-rhsm: 1.13.3-1.git.0.14a214e.el7 How reproducible: 100% Steps to Reproduce: 1.Register and attach a pool # subscription-manager attach --auto Installed Product Current Status: Product Name: Awesome OS for All Arch (x86 content) Bits Status: Subscribed # subscription-manager list --consumed +-------------------------------------------+ Consumed Subscriptions +-------------------------------------------+ Subscription Name: Awesome OS for All Arch (x86content) Provides: Awesome OS for All Arch (x86 content) Bits SKU: awesomeos-all-x86-cont Contract: 0 Account: 12331131231 Serial: 6671365991574071606 Pool ID: ff80808148efdeee0148efdf83c30f27 Active: True Quantity Used: 2 Service Level: Service Type: Status Details: Subscription Type: Stackable Starts: 10/07/2014 Ends: 10/07/2015 System Type: Physical 2.Repo list # subscription-manager repos --list +----------------------------------------------------------+ Available Repositories in /etc/yum.repos.d/redhat.repo +----------------------------------------------------------+ Repo ID: never-enabled-content Repo Name: never-enabled-content Repo URL: https://cdn.redhat.com/foo/path/never Enabled: 1 Repo ID: awesomeos-x86_64-i386-content Repo Name: awesomeos-x86_64-i386-content Repo URL: https://cdn.redhat.com/path/to/awesomeos/all Enabled: 1 3. Repo --list-disabled, Observed that empty list was displayed ]# subscription-manager repos --list-disabled +----------------------------------------------------------+ Available Repositories in /etc/yum.repos.d/redhat.repo +----------------------------------------------------------+ [root@dell-per620-02 ~]# Actual results: Observed that when no "Repositories" found by the --list-enabled/disabled filters,it displays a empty "Available repositories" list Expected results: Appropriate error message should display ,like when --list-disabled filter is used "This system has no disabled repositories available through subscriptions" similarly it should show for --list-enabled filter as well Additional info: