Project

General

Profile

Actions

Bug #14147

closed

hammer content-view filter create ignores repos if name used instead of ID

Added by Andrew Kofink about 8 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Hammer
Target version:

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:

Actions #1

Updated by The Foreman Bot about 8 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/hammer-cli-katello/pull/362 added
Actions #2

Updated by Eric Helms about 8 years ago

  • translation missing: en.field_release set to 86
Actions #3

Updated by The Foreman Bot about 8 years ago

  • Pull request https://github.com/Katello/hammer-cli-katello/pull/367 added
Actions #4

Updated by The Foreman Bot about 8 years ago

  • Pull request https://github.com/Katello/katello/pull/5950 added
Actions #5

Updated by Andrew Kofink about 8 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF