Bug 1119648 - [RFE] add parameters for filtering enabled/disabled repos for subscription-manager repos --list
Summary: [RFE] add parameters for filtering enabled/disabled repos for subscription-ma...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 7.1
Assignee: Chris "Ceiu" Rog
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks: rhsm-rhel71
TreeView+ depends on / blocked
 
Reported: 2014-07-15 08:33 UTC by Daniel Horák
Modified: 2015-03-05 13:17 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-05 13:17:34 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0502 normal SHIPPED_LIVE subscription-manager bug fix and enhancement update 2015-03-05 16:20:39 UTC

Description Daniel Horák 2014-07-15 08:33:52 UTC
Description of problem:
  It is not easily possible to list only enabled/disabled repositories via "subscription-manager repos --list" command.

Version-Release number of selected component (if applicable):
# subscription-manager version
  server type: Red Hat Subscription Management
  subscription management server: 0.9.20.1-1
  subscription-manager: 1.9.11-1.el6
  python-rhsm: 1.9.7-1.el6_5


Actual results:
  Only possible way to list enabled/disabled repositories is grep the output, which is quite nasty for interactive usage and really horrible for scripting (because the output line "Enabled:   0" sometime looks "Enabled:0 - this happen in automatic beaker tests).

Expected results:
  It will be possible to list only enabled/disabled repos e.g.:
  # subscription-manager repos --list --enabled
  # subscription-manager repos --list --disabled

Comment 2 Bryan Kearney 2014-08-13 18:55:05 UTC
Acking 7.1

Comment 3 John Sefler 2014-09-26 17:49:58 UTC
If this RFE is implemented, don't forget to update the repos module section of the subscription-manager man page with the new --enabled and --disabled options.

Comment 4 Chris "Ceiu" Rog 2014-10-01 17:55:10 UTC
commit 8ba41573e896b33fccf891dc70f790061bb1f0ef
Author: Chris Rog <crog@redhat.com>
Date:   Fri Sep 26 13:22:33 2014 -0400

    1119648: Added additional functionality to repo listing.
    
    Added the --list-enabled and --list-disabled options for explicitly
    specifying only enabled or disabled repos. --list now acts as a
    shorthand for specifying both.

Comment 6 Rehana 2014-11-05 07:27:25 UTC
Retested on,
python-rhsm-1.13.6-1.el7.x86_64
subscription-manager-gui-1.13.7-1.el7.x86_64
subscription-manager-firstboot-1.13.7-1.el7.x86_64
subscription-manager-migration-1.13.7-1.el7.x86_64
subscription-manager-plugin-container-1.13.7-1.el7.x86_64
subscription-manager-migration-data-2.0.13-1.el7.noarch
subscription-manager-plugin-ostree-1.13.7-1.el7.x86_64
subscription-manager-debuginfo-1.13.7-1.el7.x86_64
subscription-manager-1.13.7-1.el7.x86_64


New filter options (--list-enabled and --list-disabled) are available for listing only the enabled//disabled repos.

1) --list-enabled 

# subscription-manager repos --list-enabled 
+----------------------------------------------------------+
    Available Repositories in /etc/yum.repos.d/redhat.repo
+----------------------------------------------------------+
Repo ID:   rhel-7-server-optional-debug-rpms
Repo Name: Red Hat Enterprise Linux 7 Server - Optional (Debug RPMs)
Repo URL:  https://cdn.qa.redhat.com/content/dist/rhel/server/7/$releasever/$basearch/optional/debug
Enabled:   1

Repo ID:   rhel-7-server-rhn-tools-beta-debug-rpms
Repo Name: RHN Tools for Red Hat Enterprise Linux 7 Server Beta (Debug RPMs)
Repo URL:  https://cdn.qa.redhat.com/content/beta/rhel/server/7/$basearch/rhn-tools/debug
Enabled:   1

Repo ID:   rhel-7-server-v2vwin-1-debug-rpms
Repo Name: Red Hat Virt V2V Tool for RHEL 7 (Debug RPMs)
Repo URL:  https://cdn.qa.redhat.com/content/dist/rhel/server/7/$releasever/$basearch/v2vwin/debug
Enabled:   1

Repo ID:   rhel-7-server-rhn-tools-debug-rpms
Repo Name: RHN Tools for Red Hat Enterprise Linux 7 Server (Debug RPMs)
Repo URL:  https://cdn.qa.redhat.com/content/dist/rhel/server/7/$releasever/$basearch/rhn-tools/debug
Enabled:   1
<snip>
2) # subscription-manager repos --list-disabled 
+----------------------------------------------------------+
    Available Repositories in /etc/yum.repos.d/redhat.repo
+----------------------------------------------------------+
Repo ID:   rhel-rs-for-rhel-7-server-beta-source-rpms
Repo Name: Red Hat Enterprise Linux Resilient Storage (for RHEL 7 Server) Beta (Source RPMs)
Repo URL:  https://cdn.qa.redhat.com/content/beta/rhel/server/7/$basearch/resilientstorage/source/SRPMS
Enabled:   0

Repo ID:   rhel-rs-for-rhel-7-server-fastrack-debug-rpms
Repo Name: Red Hat Enterprise Linux Resilient Storage (for RHEL 7 Server) - Fastrack (Debug RPMs)
Repo URL:  https://cdn.qa.redhat.com/content/fastrack/rhel/server/7/$basearch/resilientstorage/debug
Enabled:   0

Repo ID:   rhel-ha-for-rhel-7-server-beta-debug-rpms
Repo Name: Red Hat Enterprise Linux High Availability (for RHEL 7 Server) Beta (Debug RPMs)
Repo URL:  https://cdn.qa.redhat.com/content/beta/rhel/server/7/$basearch/highavailability/debug
Enabled:   0
<snip>

3)# subscription-manager repos --list ( displays all the repos avaiable)

# subscription-manager repos --list
+----------------------------------------------------------+
    Available Repositories in /etc/yum.repos.d/redhat.repo
+----------------------------------------------------------+
Repo ID:   rhel-7-server-optional-debug-rpms
Repo Name: Red Hat Enterprise Linux 7 Server - Optional (Debug RPMs)
Repo URL:  https://cdn.qa.redhat.com/content/dist/rhel/server/7/$releasever/$basearch/optional/debug
Enabled:   1

Repo ID:   rhel-7-server-rhn-tools-beta-debug-rpms
Repo Name: RHN Tools for Red Hat Enterprise Linux 7 Server Beta (Debug RPMs)
Repo URL:  https://cdn.qa.redhat.com/content/beta/rhel/server/7/$basearch/rhn-tools/debug
Enabled:   1

Repo ID:   rhel-7-server-v2vwin-1-debug-rpms
Repo Name: Red Hat Virt V2V Tool for RHEL 7 (Debug RPMs)
Repo URL:  https://cdn.qa.redhat.com/content/dist/rhel/server/7/$releasever/$basearch/v2vwin/debug
Enabled:   1

Repo ID:   rhel-rs-for-rhel-7-server-beta-source-rpms
Repo Name: Red Hat Enterprise Linux Resilient Storage (for RHEL 7 Server) Beta (Source RPMs)
Repo URL:  https://cdn.qa.redhat.com/content/beta/rhel/server/7/$basearch/resilientstorage/source/SRPMS
Enabled:   0

Repo ID:   rhel-7-server-rhn-tools-debug-rpms
Repo Name: RHN Tools for Red Hat Enterprise Linux 7 Server (Debug RPMs)
Repo URL:  https://cdn.qa.redhat.com/content/dist/rhel/server/7/$releasever/$basearch/rhn-tools/debug
Enabled:   1

Repo ID:   rhel-rs-for-rhel-7-server-fastrack-debug-rpms
Repo Name: Red Hat Enterprise Linux Resilient Storage (for RHEL 7 Server) - Fastrack (Debug RPMs)
Repo URL:  https://cdn.qa.redhat.com/content/fastrack/rhel/server/7/$basearch/resilientstorage/debug
Enabled:   0
<snip>

Marking Verified!!!

Comment 8 errata-xmlrpc 2015-03-05 13:17:34 UTC
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


Note You need to log in before you can comment on or make changes to this bug.