-
Bug
-
Resolution: Unresolved
-
Undefined
-
None
-
None
Description of problem:
See https://issues.redhat.com/browse/SAT-29198 for a related bug on API side. Fixing that bug determines how to tackle this one.
`hammer package list` does not honour `--content-view` option in most use cases.
How reproducible:
100%
Is this issue a regression from an earlier version:
probably not
Steps to Reproduce:
1. Have a few bigger repos synced, and a tiny CV promoted to a LE
2. Try package searches like:
```
hammer package list --content-view cv_sos --lifecycle-environment-id 1 --organization-id 1 --per-page 1
hammer package list --content-view cv_sos --lifecycle-environment Library --organization-id 1 --per-page 1
```
3. Meantime, monitor `/var/log/foreman/production.log` for `Started` and `Parameters` logs.
Actual behavior:
Providing LE with ID does work well. hammer queries for
```
GET /katello/api/packages?organization_id=1&content_view_version_id=2423&environment_id=1&page=1&per_page=1
```
and returns expected CV/LE content.
BUT providing LE via name does not work due to two reasons:
1) hammer queries:
```
GET /katello/api/packages?organization_id=1&environment_id=1&page=1&per_page=1
```
so without CV identification. And moreover, due to https://issues.redhat.com/browse/SAT-29198 bug, the underlying query even ignores the LE parameter.
Expected behavior:
hammer should respect LE search by name, not only by ID.
Business Impact / Additional info: