Bug #17325

hammer role filters show always only first 20 records

Added by Tomáš Strachota 9 months ago. Updated 4 months ago.

Status:Duplicate
Priority:Normal
Assigned To:-
Category:Users and roles
Target version:Foreman - Team Marek backlog
Difficulty: Bugzilla link:1394393
Found in release: Pull request:https://github.com/theforeman/hammer-cli-foreman/pull/288
Story points-
Velocity based estimate-

Description

`hammer role filters` ignore --page and --per-page settings from both command line and settings. It always prints only first 20 records (default server per_page setting).

Please note that `hammer role list` work as expected.

[~|vm 2.3]hammer role list
---|-----------------------|--------
ID | NAME                  | BUILTIN
---|-----------------------|--------
9  | Default role          | yes    
6  | Edit hosts            | no     
4  | Edit partition tables | no     
3  | Manager               | no     
8  | Site manager          | no     
1  | Tasks Manager         | no     
2  | Tasks Reader          | no     
7  | Viewer                | no     
5  | View hosts            | no     
---|-----------------------|--------

[~|vm 2.3]hammer role filters --id 8
----|----------------------|--------|------------|-----------|--------------|---------------------------------------------------------------------------------
ID  | RESOURCE TYPE        | SEARCH | UNLIMITED? | OVERRIDE? | ROLE         | PERMISSIONS                                                                     
----|----------------------|--------|------------|-----------|--------------|---------------------------------------------------------------------------------
88  | Architecture         | none   | yes        | no        | Site manager | view_architectures                                                              
89  | Audit                | none   | yes        | no        | Site manager | view_audit_logs                                                                 
90  | AuthSourceLdap       | none   | yes        | no        | Site manager | view_authenticators                                                             
91  | CommonParameter      | none   | yes        | no        | Site manager | view_globals                                                                    
92  | (Miscellaneous)      | none   | yes        | no        | Site manager | access_dashboard, access_settings, view_statistics                              
93  | Domain               | none   | yes        | no        | Site manager | view_domains                                                                    
94  | Environment          | none   | yes        | no        | Site manager | view_environments, import_environments                                          
95  | FactValue            | none   | yes        | no        | Site manager | view_facts                                                                      
96  | Hostgroup            | none   | yes        | no        | Site manager | view_hostgroups                                                                 
97  | Host                 | none   | yes        | no        | Site manager | view_hosts, create_hosts, edit_hosts, destroy_hosts, build_hosts                
98  | PuppetclassLookupKey | none   | yes        | no        | Site manager | view_external_parameters, create_external_parameters, edit_external_parameter...
99  | MailNotification     | none   | yes        | no        | Site manager | view_mail_notifications                                                         
100 | Medium               | none   | yes        | no        | Site manager | view_media, create_media, edit_media, destroy_media                             
101 | Model                | none   | yes        | no        | Site manager | view_models                                                                     
102 | Operatingsystem      | none   | yes        | no        | Site manager | view_operatingsystems                                                           
103 | VariableLookupKey    | none   | yes        | no        | Site manager | view_external_variables, create_external_variables, edit_external_variables, ...
104 | Parameter            | none   | yes        | no        | Site manager | view_params                                                                     
105 | Ptable               | none   | yes        | no        | Site manager | view_ptables                                                                    
106 | Puppetclass          | none   | yes        | no        | Site manager | view_puppetclasses, import_puppetclasses                                        
107 | Realm                | none   | yes        | no        | Site manager | view_realms                                                                     
----|----------------------|--------|------------|-----------|--------------|---------------------------------------------------------------------------------
Page 1 of 2 (use --page and --per-page for navigation)

[~|vm 2.3]hammer role filters --id 8 --page 2
----|----------------------|--------|------------|-----------|--------------|---------------------------------------------------------------------------------
ID  | RESOURCE TYPE        | SEARCH | UNLIMITED? | OVERRIDE? | ROLE         | PERMISSIONS                                                                     
----|----------------------|--------|------------|-----------|--------------|---------------------------------------------------------------------------------
88  | Architecture         | none   | yes        | no        | Site manager | view_architectures                                                              
89  | Audit                | none   | yes        | no        | Site manager | view_audit_logs                                                                 
90  | AuthSourceLdap       | none   | yes        | no        | Site manager | view_authenticators                                                             
91  | CommonParameter      | none   | yes        | no        | Site manager | view_globals                                                                    
92  | (Miscellaneous)      | none   | yes        | no        | Site manager | access_dashboard, access_settings, view_statistics                              
93  | Domain               | none   | yes        | no        | Site manager | view_domains                                                                    
94  | Environment          | none   | yes        | no        | Site manager | view_environments, import_environments                                          
95  | FactValue            | none   | yes        | no        | Site manager | view_facts                                                                      
96  | Hostgroup            | none   | yes        | no        | Site manager | view_hostgroups                                                                 
97  | Host                 | none   | yes        | no        | Site manager | view_hosts, create_hosts, edit_hosts, destroy_hosts, build_hosts                
98  | PuppetclassLookupKey | none   | yes        | no        | Site manager | view_external_parameters, create_external_parameters, edit_external_parameter...
99  | MailNotification     | none   | yes        | no        | Site manager | view_mail_notifications                                                         
100 | Medium               | none   | yes        | no        | Site manager | view_media, create_media, edit_media, destroy_media                             
101 | Model                | none   | yes        | no        | Site manager | view_models                                                                     
102 | Operatingsystem      | none   | yes        | no        | Site manager | view_operatingsystems                                                           
103 | VariableLookupKey    | none   | yes        | no        | Site manager | view_external_variables, create_external_variables, edit_external_variables, ...
104 | Parameter            | none   | yes        | no        | Site manager | view_params                                                                     
105 | Ptable               | none   | yes        | no        | Site manager | view_ptables                                                                    
106 | Puppetclass          | none   | yes        | no        | Site manager | view_puppetclasses, import_puppetclasses                                        
107 | Realm                | none   | yes        | no        | Site manager | view_realms                                                                     
----|----------------------|--------|------------|-----------|--------------|---------------------------------------------------------------------------------
Page 1 of 2 (use --page and --per-page for navigation)

[~|vm 2.3]hammer role filters --id 8 --per-page 5
----|----------------------|--------|------------|-----------|--------------|---------------------------------------------------------------------------------
ID  | RESOURCE TYPE        | SEARCH | UNLIMITED? | OVERRIDE? | ROLE         | PERMISSIONS                                                                     
----|----------------------|--------|------------|-----------|--------------|---------------------------------------------------------------------------------
88  | Architecture         | none   | yes        | no        | Site manager | view_architectures                                                              
89  | Audit                | none   | yes        | no        | Site manager | view_audit_logs                                                                 
90  | AuthSourceLdap       | none   | yes        | no        | Site manager | view_authenticators                                                             
91  | CommonParameter      | none   | yes        | no        | Site manager | view_globals                                                                    
92  | (Miscellaneous)      | none   | yes        | no        | Site manager | access_dashboard, access_settings, view_statistics                              
93  | Domain               | none   | yes        | no        | Site manager | view_domains                                                                    
94  | Environment          | none   | yes        | no        | Site manager | view_environments, import_environments                                          
95  | FactValue            | none   | yes        | no        | Site manager | view_facts                                                                      
96  | Hostgroup            | none   | yes        | no        | Site manager | view_hostgroups                                                                 
97  | Host                 | none   | yes        | no        | Site manager | view_hosts, create_hosts, edit_hosts, destroy_hosts, build_hosts                
98  | PuppetclassLookupKey | none   | yes        | no        | Site manager | view_external_parameters, create_external_parameters, edit_external_parameter...
99  | MailNotification     | none   | yes        | no        | Site manager | view_mail_notifications                                                         
100 | Medium               | none   | yes        | no        | Site manager | view_media, create_media, edit_media, destroy_media                             
101 | Model                | none   | yes        | no        | Site manager | view_models                                                                     
102 | Operatingsystem      | none   | yes        | no        | Site manager | view_operatingsystems                                                           
103 | VariableLookupKey    | none   | yes        | no        | Site manager | view_external_variables, create_external_variables, edit_external_variables, ...
104 | Parameter            | none   | yes        | no        | Site manager | view_params                                                                     
105 | Ptable               | none   | yes        | no        | Site manager | view_ptables                                                                    
106 | Puppetclass          | none   | yes        | no        | Site manager | view_puppetclasses, import_puppetclasses                                        
107 | Realm                | none   | yes        | no        | Site manager | view_realms                                                                     
----|----------------------|--------|------------|-----------|--------------|---------------------------------------------------------------------------------
Page 1 of 2 (use --page and --per-page for navigation)


Related issues

Duplicates Hammer CLI - Bug #18790: [Satellite 6.2.7] Per-page and page options do nothing on... Closed 03/03/2017

History

#1 Updated by Tomáš Strachota 9 months ago

  • Description updated (diff)

#2 Updated by Anand Agrawal 4 months ago

  • Pull request https://github.com/theforeman/hammer-cli-foreman/pull/288 added

#3 Updated by Anand Agrawal 4 months ago

This bug is already fixed in the upstream, with the PR https://github.com/theforeman/hammer-cli-foreman/pull/288

#4 Updated by Dominic Cleal 4 months ago

  • Duplicates Bug #18790: [Satellite 6.2.7] Per-page and page options do nothing on hammer role filters (--per-page --page) added

#5 Updated by Dominic Cleal 4 months ago

  • Status changed from New to Duplicate

Also available in: Atom PDF