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
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Hammer - Content   
(Show other bugs)
Version: 6.2.7
Hardware: Unspecified
OS: Unspecified
medium
medium vote
Target Milestone: Unspecified
Assignee: Andrew Kofink
QA Contact: Katello QA List
URL:
Whiteboard:
Keywords: Triaged
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:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-02-21 16:49:54 UTC
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 18702 None None None 2017-02-27 18:33 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 pm-sat@redhat.com 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 pm-sat@redhat.com 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.