Bug 1305059

Summary: [RFE] [Sat6] allow multiple rpms to be added via hammer content-view filter rule create
Product: Red Hat Satellite Reporter: Stuart Auchterlonie <sauchter>
Component: APIAssignee: Andrew Kofink <akofink>
Status: CLOSED ERRATA QA Contact: Martin Korbel <mkorbel>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.1.6CC: akofink, bbuckingham, bkearney, mkorbel, sthirugn, xdmoon
Target Milestone: UnspecifiedKeywords: FutureFeature, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/15536
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-21 12:33:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1316897    

Description Stuart Auchterlonie 2016-02-05 13:50:09 UTC
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.

Comment 3 Bryan Kearney 2016-02-17 20:42:27 UTC
Given the prio score, I am removing this from 6.1.z. I am adding to 6.2 for condieration in the next release.

Comment 8 Andrew Kofink 2016-06-28 15:26:58 UTC
Created redmine issue http://projects.theforeman.org/issues/15536 from this bug

Comment 9 Bryan Kearney 2016-06-28 18:12:30 UTC
Upstream bug component is API

Comment 10 Bryan Kearney 2016-07-29 00:11:15 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/15536 has been closed

Comment 14 Martin Korbel 2016-10-19 14:11:21 UTC
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    |         |                 |                 |           |            |         
--------|-----------|------|---------|-----------------|-----------------|-----------|------------|---------

Comment 17 errata-xmlrpc 2018-02-21 12:33:41 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