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 1138559 - Hammer Cli role list filters does not work if 'name' is provided
Summary: Hammer Cli role list filters does not work if 'name' is provided
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hammer
Version: 6.0.0
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: Unspecified
Assignee: Martin Bacovsky
QA Contact: Katello QA List
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-05 07:47 UTC by Tazim Kolhar
Modified: 2019-09-26 13:50 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-03 13:23:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 7411 0 None None None 2016-04-22 15:01:45 UTC

Description Tazim Kolhar 2014-09-05 07:47:36 UTC
Description of problem:
role list filters does not work if 'name' is provided

Version-Release number of selected component (if applicable):
foreman-gce-1.6.0.44-1.el7sat.noarch
rubygem-hammer_cli_foreman-0.1.1-16.el7sat.noarch
foreman-selinux-1.6.0.14-1.el7sat.noarch
ruby193-rubygem-foreman_hooks-0.3.5-2.el7sat.noarch
ruby193-rubygem-foreman_discovery-1.3.0-2.el7sat.noarch
foreman-ovirt-1.6.0.44-1.el7sat.noarch
ruby193-rubygem-foreman-redhat_access-0.0.4-2.el7sat.noarch
rubygem-hammer_cli_foreman_tasks-0.0.3-3.el7sat.noarch
qe-sat6-rhel7.usersys.redhat.com-foreman-client-1.0-1.noarch
foreman-compute-1.6.0.44-1.el7sat.noarch
ruby193-rubygem-foreman-tasks-0.6.9-1.1.el7sat.noarch
ruby193-rubygem-foreman_bootdisk-2.0.5-2.el7sat.noarch
foreman-libvirt-1.6.0.44-1.el7sat.noarch
foreman-proxy-1.6.0.30-1.el7sat.noarch
foreman-1.6.0.44-1.el7sat.noarch
foreman-vmware-1.6.0.44-1.el7sat.noarch
foreman-postgresql-1.6.0.44-1.el7sat.noarch
qe-sat6-rhel7.usersys.redhat.com-foreman-proxy-1.0-1.noarch


How reproducible:
everytime

Steps to Reproduce:
1.# hammer role filters --name testrole
[Foreman] username: admin
[Foreman] password for admin: 
Error: Missing options to search filter

2.# hammer role filters --id 41
[Foreman] username: admin
[Foreman] password for admin: 
----|---------------|--------|------------|----------|----------------------
ID  | RESOURCE TYPE | SEARCH | UNLIMITED? | ROLE     | PERMISSIONS          
----|---------------|--------|------------|----------|----------------------
121 | Architecture  | none   | yes        | testrole | destroy_architectures
----|---------------|--------|------------|----------|----------------------

3.

Actual results:
roles list filter fails if name is provided
it works if we use 'id' instead of name

Expected results:
roles list filter should work in both cases (id and name)

Additional info:

Comment 1 RHEL Program Management 2014-09-05 08:03:03 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 4 Dominic Cleal 2014-09-11 13:42:38 UTC
Created redmine issue http://projects.theforeman.org/issues/7411 from this bug

Comment 8 Martin Bacovsky 2016-08-03 13:23:08 UTC
This bug was fixed in foreman 1.7 and probably in Satellite 6.1.

# hammer role filters --name Viewer
[Foreman] Password for admin: 
---|--------------------|--------|------------|--------|---------------------------------------------------------------------------------
ID | RESOURCE TYPE      | SEARCH | UNLIMITED? | ROLE   | PERMISSIONS                                                                     
---|--------------------|--------|------------|--------|---------------------------------------------------------------------------------
42 | Architecture       | none   | yes        | Viewer | view_architectures                                                              
43 | Audit              | none   | yes        | Viewer | view_audit_logs                                                                 
44 | AuthSourceLdap     | none   | yes        | Viewer | view_authenticators                                                             
45 | Bookmark           | none   | yes        | Viewer | view_bookmarks                                                                  
46 | CommonParameter    | none   | yes        | Viewer | view_globals                                                                    
47 | ComputeProfile     | none   | yes        | Viewer | view_compute_profiles                                                           
48 | ComputeResource    | none   | yes        | Viewer | view_compute_resources, view_compute_resources_vms                              
49 | ConfigGroup        | none   | yes        | Viewer | view_config_groups                                                              
50 | (Miscellaneous)    | none   | yes        | Viewer | access_dashboard, view_plugins, access_settings, view_statistics, view_tasks,...
51 | Domain             | none   | yes        | Viewer | view_domains                                                                    
52 | Environment        | none   | yes        | Viewer | view_environments                                                               
53 | ExternalUsergroups | none   | yes        | Viewer | view_external_usergroups                                                        
54 | FactValue          | none   | yes        | Viewer | view_facts                                                                      
55 | Filter             | none   | yes        | Viewer | view_filters                                                                    
56 | Hostgroup          | none   | yes        | Viewer | view_hostgroups                                                                 
57 | Host               | none   | yes        | Viewer | view_hosts                                                                      
58 | Image              | none   | yes        | Viewer | view_images                                                                     
59 | Location           | none   | yes        | Viewer | view_locations                                                                  
60 | LookupKey          | none   | yes        | Viewer | view_external_variables                                                         
61 | MailNotification   | none   | yes        | Viewer | view_mail_notifications                                                         
---|--------------------|--------|------------|--------|---------------------------------------------------------------------------------
Page 1 of 3 (use --page and --per-page for navigation)

Tested on Sat 6.2
# rpm -q satellite foreman
satellite-6.2.0-21.1.el7sat.noarch
foreman-1.11.0.49-1.el7sat.noarch


Cloasing as CURRENTRELEASE


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