Red Hat Bugzilla – Bug 1305059
[RFE] [Sat6] allow multiple rpms to be added via hammer content-view filter rule create
Last modified: 2018-02-21 07:33:41 EST
Description of problem: The `hammer content-view filter rule create` command can only handle one rpm name at a time. Version-Release number of selected component (if applicable): 6.1.6 How reproducible: 100% Steps to Reproduce: 1. Create an rpm include content view filter. 2. Attempt to add 2 packages at once # hammer --username=admin --password=<password> content-view filter rule create --organization=org-example --content-view='filter test' --content-view-filter='test_filter' --name c --name d Will only add package "d" to the included rpms 3. Attempt to add 2 packages at once, comma delimited # hammer --username=admin --password=<password> content-view filter rule create --organization=org-example --content-view='filter test' --content-view-filter='test_filter' --name c,d Will add the package "c,d" to the included rpms Actual results: As above Expected results: There should be a way of providing more than 1 rpm at a time to hammer. Additional info: This is causing my customer issues, because having to run hammer several hundred times to add a list of packages has significant overhead, and taking a long time to complete.
Given the prio score, I am removing this from 6.1.z. I am adding to 6.2 for condieration in the next release.
Created redmine issue http://projects.theforeman.org/issues/15536 from this bug
Upstream bug component is API
Moving to POST since upstream bug http://projects.theforeman.org/issues/15536 has been closed
VERIFIED on tfm-rubygem-hammer_cli-0.8.0-1 with problems, which was reported in bz1386726. Reproducer: 1. We have got a content view for testing. 2. > hammer content-view filter create --content-view "test view" --name "test" --inclusion=false --type=rpm --organization="Default Organization" Filter created 3. > hammer content-view filter rule list --content-view-id 2 --content-view-filter "test" --------|-----------|------|---------|-----------------|-----------------|-----------|------------|--------- RULE ID | FILTER ID | NAME | VERSION | MINIMUM VERSION | MAXIMUM VERSION | ERRATA ID | START DATE | END DATE --------|-----------|------|---------|-----------------|-----------------|-----------|------------|--------- 4. > hammer content-view filter rule create --content-view-id 2 --content-view-filter "test" --name c,d Filter rule created 5. > hammer content-view filter rule list --content-view-id 2 --content-view-filter "test" --------|-----------|------|---------|-----------------|-----------------|-----------|------------|--------- RULE ID | FILTER ID | NAME | VERSION | MINIMUM VERSION | MAXIMUM VERSION | ERRATA ID | START DATE | END DATE --------|-----------|------|---------|-----------------|-----------------|-----------|------------|--------- 4 | 1 | c | | | | | | 5 | 1 | d | | | | | | --------|-----------|------|---------|-----------------|-----------------|-----------|------------|---------
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