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 1079587 - REGRESSION: Cannot search organizations by label via CLI
Summary: REGRESSION: Cannot search organizations by label via CLI
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hammer
Version: 6.0.3
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: Justin Sherrill
QA Contact: Sachin Ghai
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-03-21 22:00 UTC by Og Maciel
Modified: 2019-09-26 17:41 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-07-02 14:06:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 4797 0 None None None 2016-04-22 15:51:23 UTC

Description Og Maciel 2014-03-21 22:00:38 UTC
Description of problem:

Noticed that we can no longer search for an organization by label (this used to work before). Perhaps the fix for http://projects.theforeman.org/issues/4486 broke it?

2014-03-21 17:48:34 - robottelo - DEBUG - Running test TestOrg/test_redmine_4486_2_{'name': u'mEeGdLwQII'}
2014-03-21 17:48:34 - robottelo - DEBUG - >>> LANG=en_US hammer -v -u admin -p changeme  --output csv organization create --name='mEeGdLwQII'
2014-03-21 17:48:38 - robottelo - DEBUG - <<< [u'Message,Id,Name', u'Organization created,265,mEeGdLwQII', u'']
2014-03-21 17:48:38 - robottelo - DEBUG - >>> LANG=en_US hammer -v -u admin -p changeme  --output csv organization info --id='265'
2014-03-21 17:48:40 - robottelo - DEBUG - <<< [u'Id,Name,Created at,Updated at,Label,Description', u'265,mEeGdLwQII,2014/03/21 21:48:34,2014/03/21 21:48:34,mEeGdLwQII,""', u'']
2014-03-21 17:48:45 - robottelo - DEBUG - >>> LANG=en_US hammer -v -u admin -p changeme  --output csv organization list --search='label="mEeGdLwQII"'
2014-03-21 17:48:47 - robottelo - DEBUG - <<< [ERROR 2014-03-21 17:48:45 Exception] Error: 400 Bad Request
Error: 400 Bad Request
[ERROR 2014-03-21 17:48:45 Exception]

RestClient::BadRequest (400 Bad Request):
    /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/abstract_response.rb:48:in `return!'
    /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/request.rb:220:in `process_result'
    /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/request.rb:169:in `transmit'
    /usr/lib/ruby/1.8/net/http.rb:543:in `start'
    /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/request.rb:166:in `transmit'
    /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/request.rb:60:in `execute'
    /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/request.rb:31:in `execute'
    /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/resource.rb:54:in `get'
    /usr/lib/ruby/gems/1.8/gems/apipie-bindings-0.0.6/lib/apipie_bindings/api.rb:196:in `send'
    /usr/lib/ruby/gems/1.8/gems/apipie-bindings-0.0.6/lib/apipie_bindings/api.rb:196:in `http_call'
    /usr/lib/ruby/gems/1.8/gems/apipie-bindings-0.0.6/lib/apipie_bindings/api.rb:155:in `call'
    /usr/lib/ruby/gems/1.8/gems/apipie-bindings-0.0.6/lib/apipie_bindings/resource.rb:14:in `call'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.18/lib/hammer_cli/./apipie/read_command.rb:19:in `retrieve_data'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.0.18/lib/hammer_cli_foreman/commands.rb:93:in `retrieve_data'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.0.18/lib/hammer_cli_foreman/commands.rb:138:in `retrieve_and_print'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.0.18/lib/hammer_cli_foreman/commands.rb:125:in `browse_collection'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.0.18/lib/hammer_cli_foreman/commands.rb:111:in `execute'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.0.18/lib/hammer_cli_foreman/resource_supported_test.rb:9:in `execute'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.18/lib/hammer_cli/./apipie/../abstract.rb:22:in `run'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/subcommand/execution.rb:11:in `execute'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.18/lib/hammer_cli/./apipie/../abstract.rb:22:in `run'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/subcommand/execution.rb:11:in `execute'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.18/lib/hammer_cli/./apipie/../abstract.rb:22:in `run'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:125:in `run'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.18/bin/hammer:87
    /usr/bin/hammer:19:in `load'
    /usr/bin/hammer:19

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

* apr-util-ldap-1.3.9-3.el6_0.1.x86_64
* candlepin-0.8.25-1.el6sam.noarch
* candlepin-scl-1-5.el6_4.noarch
* candlepin-scl-quartz-2.1.5-5.el6_4.noarch
* candlepin-scl-rhino-1.7R3-1.el6_4.noarch
* candlepin-scl-runtime-1-5.el6_4.noarch
* candlepin-selinux-0.8.25-1.el6sam.noarch
* candlepin-tomcat6-0.8.25-1.el6sam.noarch
* elasticsearch-0.90.10-4.el6sat.noarch
* foreman-1.5.0.10-1.el6sat.noarch
* foreman-compute-1.5.0.10-1.el6sat.noarch
* foreman-libvirt-1.5.0.10-1.el6sat.noarch
* foreman-postgresql-1.5.0.10-1.el6sat.noarch
* foreman-proxy-1.5.3-1.el6sat.noarch
* foreman-selinux-1.5.0-0.develop.el6sat.noarch
* katello-1.5.0-18.el6sat.noarch
* katello-apache-1.0-1.noarch
* katello-ca-1.0-1.noarch
* katello-certs-tools-1.5.5-1.el6sat.noarch
* katello-installer-0.0.30-1.el6sat.noarch
* openldap-2.4.23-31.el6.x86_64
* pulp-katello-plugins-0.2-1.el6sat.noarch
* pulp-nodes-common-2.3.1-0.4.beta.el6sat.noarch
* pulp-nodes-parent-2.3.1-0.4.beta.el6sat.noarch
* pulp-puppet-plugins-2.3.1-0.4.beta.el6sat.noarch
* pulp-rpm-plugins-2.3.1-0.4.beta.el6sat.noarch
* pulp-selinux-2.3.1-0.4.beta.el6sat.noarch
* pulp-server-2.3.1-0.4.beta.el6sat.noarch
* python-ldap-2.3.10-1.el6.x86_64
* ruby193-rubygem-ldap_fluff-0.2.2-2.el6sat.noarch
* ruby193-rubygem-net-ldap-0.3.1-3.el6sat.noarch
* ruby193-rubygem-runcible-1.0.8-1.el6sat.noarch

How reproducible:


Steps to Reproduce:
1. Follow the steps mentioned above to create an org and search for it by name
2.
3.

Actual results:


Expected results:


Additional info:

Comment 4 Bryan Kearney 2014-03-26 21:26:03 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/4797 has been closed

Comment 6 Sachin Ghai 2014-05-06 08:54:34 UTC
Verified with Satellite-6.0.3-RHEL-6-20140430.4

[root@qetello02 yum.repos.d]# hammer organization create --name 'sghai123'
Organization created
[root@qetello02 yum.repos.d]# hammer organization info --name 'sghai123'
Id:                     564
Name:                   sghai123
Created at:             2014/05/06 08:39:01
Updated at:             2014/05/06 08:39:02
Label:                  sghai123
Description:            
Red Hat Repository URL: https://cdn.redhat.com

[root@qetello02 yum.repos.d]# hammer organization list --search='label="sghai123"'
----|----------|----------|------------
ID  | NAME     | LABEL    | DESCRIPTION
----|----------|----------|------------
564 | sghai123 | sghai123 |            
----|----------|----------|------------

Comment 7 Bryan Kearney 2014-07-02 14:06:08 UTC
This was delivered with 6.0.3, which is the Satellite 6 Beta.


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