Bug #14147
closedhammer content-view filter create ignores repos if name used instead of ID
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1228890
Description of problem:
If I create and apply a filter rule (have tried include and exclude) and use the --repositories option to limit this filter to a particular repo there is no error message but the filter rules applies for all repos inside the CV:
hammer content-view filter create --type rpm --name 'excluding-emacs' --description 'Excluding emacs package' --inclusion=false --organization "$ORG" --repositories 'Red Hat Enterprise Linux 6 Server RPMs x86_64 6.5' --content-view "cv-os-rhel-6Server"
hammer content-view filter rule create --name 'emacs*' --organization "$ORG" --content-view "cv-os-rhel-6Server" --content-view-filter 'excluding-emacs'
If I use the --repository-id option instead of name it works as expected:
REPOID=$(hammer --csv repository list --name 'Red Hat Enterprise Linux 6 Server RPMs x86_64 6.5' --organization $ORG | grep -vi '^ID' | awk -F',' '{print $1}')
hammer content-view filter create --type rpm --name 'excluding-emacs' --description 'Excluding emacs package' --inclusion=false --organization "$ORG" --repository-ids ${REPOID} --content-view "cv-os-rhel-6Server"
hammer content-view filter rule create --name 'emacs*' --organization "$ORG" --content-view "cv-os-rhel-6Server" --content-view-filter 'excluding-emacs'
Version-Release number of selected component (if applicable):
6.1 Beta
How reproducible:
See above.
Steps to Reproduce:
1. create a CV and add repos
2. create a filter + rule using --repositories option
3. publish CV and check if the filter affects only this or all repos inside CV
Actual results:
Affected Repositories: all
Expected results:
Affected Repositories: the one I've specified
Additional info:
Updated by The Foreman Bot over 8 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/Katello/hammer-cli-katello/pull/362 added
Updated by Eric Helms over 8 years ago
- Translation missing: en.field_release set to 86
Updated by The Foreman Bot over 8 years ago
- Pull request https://github.com/Katello/hammer-cli-katello/pull/367 added
Updated by The Foreman Bot over 8 years ago
- Pull request https://github.com/Katello/katello/pull/5950 added
Updated by Andrew Kofink over 8 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset hammer-cli-katello|76dd9c5576363a90a79800e730676f9aac8c523f.