Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1422552 - `hammer package list --product-id 1` returns all packages for all products
Summary: `hammer package list --product-id 1` returns all packages for all products
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hammer - Content
Version: 6.2.7
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: Unspecified
Assignee: Andrew Kofink
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-02-15 14:24 UTC by Andrew Kofink
Modified: 2019-04-01 20:27 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-21 16:49:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 18702 0 None None None 2017-02-27 18:33:32 UTC

Description Andrew Kofink 2017-02-15 14:24:41 UTC
Description of problem:
The `--product-id` flag in `hammer package list` command does not filter the search by product.

Version-Release number of selected component (if applicable):
6.2.7

How reproducible:
Always

Steps to Reproduce:
1. Create or sync some products
2. Run `hammer package list --product-id 1` for a single product ID

Actual results:
All packages are returned.

Expected results:
The API endpoint katello/api/v2/repositories/:id/packages is used, or a new API endpoint, katello/api/v2/products/:id/packages is used to return filtered results.

Comment 2 Brad Buckingham 2017-02-27 18:33:30 UTC
Created redmine issue http://projects.theforeman.org/issues/18702 from this bug

Comment 3 Satellite Program 2017-03-02 15:06:26 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/18702 has been resolved.

Comment 4 Oleksandr Shtaier 2017-06-28 16:08:53 UTC
Verified on latest 6.3. Only necessary packages are displayed
Test automation case is added:

hammer package list --product-id 49
------|-------------------------------|---------------------------
ID    | FILENAME                      | SOURCE RPM                
------|-------------------------------|---------------------------
19427 | bear-4.1-1.noarch.rpm         | bear-4.1-1.src.rpm        
19410 | camel-0.1-1.noarch.rpm        | camel-0.1-1.src.rpm       
19419 | cat-1.0-1.noarch.rpm          | cat-1.0-1.src.rpm         
19429 | cheetah-1.25.3-5.noarch.rpm   | cheetah-1.25.3-5.src.rpm  
19411 | chimpanzee-0.21-1.noarch.rpm  | chimpanzee-0.21-1.src.rpm 
19412 | cockateel-3.1-1.noarch.rpm    | cockateel-3.1-1.src.rpm   
19436 | cow-2.2-3.noarch.rpm          | cow-2.2-3.src.rpm
...
19424 | wolf-9.4-2.noarch.rpm         | wolf-9.4-2.src.rpm        
19435 | zebra-0.1-2.noarch.rpm        | zebra-0.1-2.src.rpm

hammer package list --product-id 50
------|----------------------------------------|------------------------------------
ID    | FILENAME                               | SOURCE RPM                         
------|----------------------------------------|------------------------------------
19512 | acme-package-1.0.1-1.elfake.noarch.rpm | acme-package-1.0.1-1.elfake.src.rpm
19522 | acme-package-1.0.2-1.elfake.noarch.rpm | acme-package-1.0.2-1.elfake.src.rpm
19524 | acme-package-1.1.2-1.elfake.noarch.rpm | acme-package-1.1.2-1.elfake.src.rpm
19599 | Antelope-10.6.6-1.elfake.noarch.rpm    | Antelope-10.6.6-1.elfake.src.rpm   
19487 | Antelope-10.6.7-1.elfake.noarch.rpm    | Antelope-10.6.7-1.elfake.src.rpm   
19588 | Antelope-10.6.8-1.elfake.noarch.rpm    | Antelope-10.6.8-1.elfake.src.rpm   
19476 | Antelope-10.6.9-1.elfake.noarch.rpm    | Antelope-10.6.9-1.elfake.src.rpm   
19564 | Ass-8.2.0-1.elfake.noarch.rpm          | Ass-8.2.0-1.elfake.src.rpm         
19571 | Bat-1.0.5-1.elfake.noarch.rpm          | Bat-1.0.5-1.elfake.src.rpm         
19600 | Bat-7.0.1-1.elfake.noarch.rpm          | Bat-7.0.1-1.elfake.src.rpm
...
19509 | Zebra-8.5.5-1.elfake.noarch.rpm        | Zebra-8.5.5-1.elfake.src.rpm       
19517 | Zebra-8.5.6-1.elfake.noarch.rpm        | Zebra-8.5.6-1.elfake.src.rpm       
19536 | Zebra-8.5.7-1.elfake.noarch.rpm        | Zebra-8.5.7-1.elfake.src.rpm

Comment 5 Satellite Program 2018-02-21 16:49:54 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://access.redhat.com/errata/RHSA-2018:0336


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