Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1343583 - Pagination control not supported for listing content hosts in host collection with Satellite 6 command-line
Summary: Pagination control not supported for listing content hosts in host collection...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hammer
Version: 6.1.8
Hardware: All
OS: Linux
medium
medium
Target Milestone: Unspecified
Assignee: Andrew Kofink
QA Contact: Renzo Nuccitelli
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-06-07 13:53 UTC by Akshay Mankumbare
Modified: 2021-07-22 07:42 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-03 17:08:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 15542 0 None None None 2016-06-29 15:04:04 UTC

Description Akshay Mankumbare 2016-06-07 13:53:47 UTC
Description of problem:

Pagination control seems to be unsupported for content hosts added in host collection.. 

Version-Release number of selected component (if applicable):

How reproducible:

1. modifying the file '/etc/hammer/cli_config.yaml'
with :per_page: 25

2. Execute command :
host-collection content-hosts --name hostcollection-name --organization ORGNAME

Actual results:

The list for content hosts is restricted to '20' which is default.

Expected results:

It should be restricted to the value defined for parameter 'with :per_page:' in 
'/etc/hammer/cli_config.yaml

Comment 3 Andrew Kofink 2016-06-29 14:08:09 UTC
Created redmine issue http://projects.theforeman.org/issues/15542 from this bug

Comment 4 Andrew Kofink 2016-07-05 19:03:35 UTC
Fixed in 6.2 using the new `hammer host-collection hosts` syntax.

Comment 5 Stephen Benjamin 2016-07-15 13:43:17 UTC
This is officially marked against 6.2.z, so it should not have been switched to ON_QA yet. I guess the best thing to do is move it back to MODIFIED so it gets picked up in the first z-Stream.


---------
I can confirm it works already in 6.2.0 though:

[root@sat-snap-rhel7 ~]# grep per_page /etc/hammer/cli_config.yml 
  :per_page: 1
[root@sat-snap-rhel7 ~]# hammer -u admin -p changeme host-collection hosts --organization-id 1 --name BZ1343583
---|--------------------
ID | NAME               
---|--------------------
5  | centos7.example.com
---|--------------------
Page 1 of 4 (use --page and --per-page for navigation)
[root@sat-snap-rhel7 ~]# hammer -u admin -p changeme host-collection hosts --organization-id 1 --name BZ1343583 --page 2
---|---------------------------
ID | NAME                      
---|---------------------------
1  | sat-snap-rhel7.example.com
---|---------------------------
Page 2 of 4 (use --page and --per-page for navigation)

Comment 6 Brad Buckingham 2016-07-27 17:53:50 UTC
Moving back to ON_QA based on comment 5.

Comment 7 Renzo Nuccitelli 2016-08-02 20:43:43 UTC
I have made an automatic test to check per-page parameter on hammer command overrides global configuration defined on cli_config.yml:

https://github.com/SatelliteQE/robottelo/pull/3680/files#diff-f08885ce2fc39e0b8617a983ead73af7R364


Once it was not viable automating cli_config.yml I at least tested it manually:


------------------------
[root@foo ~]# grep per_page /etc/hammer/cli_config.yml 
  # :per_page: 20

[root@foo ~]# hammer -u admin -p changeme host-collection hosts --organization-id 3 --id 1 
---|----------------
ID | NAME           
---|----------------
2  | bizndtpogcpxiah
3  | wihfxmdfmpzxdjq
---|----------------

[root@foo ~]# hammer -u admin -p changeme host-collection hosts --organization-id 3 --id 1 --per-page 1
---|----------------
ID | NAME           
---|----------------
2  | bizndtpogcpxiah
---|----------------
Page 1 of 2 (use --page and --per-page for navigation)

[root@foo ~]# grep per_page /etc/hammer/cli_config.yml 
  :per_page: 1

[root@foo ~]# hammer -u admin -p changeme host-collection hosts --organization-id 3 --id 1 --per-page 2
---|----------------
ID | NAME           
---|----------------
2  | bizndtpogcpxiah
3  | wihfxmdfmpzxdjq
---|----------------

[root@foo ~]# hammer -u admin -p changeme host-collection hosts --organization-id 3 --id 1 
---|----------------
ID | NAME           
---|----------------
2  | bizndtpogcpxiah
---|----------------
Page 1 of 2 (use --page and --per-page for navigation)

[root@foo ~]# rpm -q satellite
satellite-6.2.0-21.1.el7sat.noarch

---------------------------------

So I am moving this bug to verified

Comment 10 Bryan Kearney 2016-08-03 17:08:44 UTC
This was delivered with Satellite 6.2 which was released on 27 July, 2016.


Note You need to log in before you can comment on or make changes to this bug.