Description of problem: Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: # hammer activation-key list --organization-id=1 --by='name' ---|--------------|----------------|-----------------------|------------- ID | NAME | CONSUMED | LIFECYCLE ENVIRONMENT | CONTENT VIEW ---|--------------|----------------|-----------------------|------------- 8 | ak1234 | 0 of Unlimited | | cv1 12 | ak12345678 | 0 of Unlimited | | cv1 5 | actkey | 0 of Unlimited | DEV | cv1 1 | actkey1 | 1 of Unlimited | DEV | cv1 4 | test1 | 0 of Unlimited | | 7 | ak123 | 0 of Unlimited | | cv1 11 | ak1234567 | 0 of Unlimited | | cv1 14 | ak1234567890 | 0 of Unlimited | | cv1 6 | ak | 0 of Unlimited | | cv1 9 | ak12345 | 0 of Unlimited | Library | cv1 10 | ak123456 | 0 of Unlimited | | cv1 13 | ak123456789 | 0 of 100 | | cv1 ---|--------------|----------------|-----------------------|------------- # hammer activation-key list --organization-id=1 --by='contentview' ---|--------------|----------------|-----------------------|------------- ID | NAME | CONSUMED | LIFECYCLE ENVIRONMENT | CONTENT VIEW ---|--------------|----------------|-----------------------|------------- 8 | ak1234 | 0 of Unlimited | | cv1 12 | ak12345678 | 0 of Unlimited | | cv1 5 | actkey | 0 of Unlimited | DEV | cv1 1 | actkey1 | 1 of Unlimited | DEV | cv1 4 | test1 | 0 of Unlimited | | 7 | ak123 | 0 of Unlimited | | cv1 11 | ak1234567 | 0 of Unlimited | | cv1 14 | ak1234567890 | 0 of Unlimited | | cv1 6 | ak | 0 of Unlimited | | cv1 9 | ak12345 | 0 of Unlimited | Library | cv1 10 | ak123456 | 0 of Unlimited | | cv1 13 | ak123456789 | 0 of 100 | | cv1 ---|--------------|----------------|-----------------------|------------- Actual results: Note that the above two results does not change Expected results: The --by attribute should sort the results on the given field Additional info: I also tried the following commands and the result was same: #hammer activation-key list --organization-id=1 --by='NAME' #hammer activation-key list --organization-id=1 --by='CONTENT VIEW'
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.
Missed the following info: Description of problem: hammer activation-key list --by does not work Version-Release number of selected component (if applicable): * apr-util-ldap-1.3.9-3.el6_0.1.x86_64 * candlepin-0.9.19-1.el6_5.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.9.19-1.el6_5.noarch * candlepin-tomcat6-0.9.19-1.el6_5.noarch * elasticsearch-0.90.10-4.el6sat.noarch * foreman-1.6.0.17-1.el6sat.noarch * foreman-compute-1.6.0.17-1.el6sat.noarch * foreman-gce-1.6.0.17-1.el6sat.noarch * foreman-libvirt-1.6.0.17-1.el6sat.noarch * foreman-ovirt-1.6.0.17-1.el6sat.noarch * foreman-postgresql-1.6.0.17-1.el6sat.noarch * foreman-proxy-1.6.0.7-1.el6sat.noarch * foreman-selinux-1.6.0-4.el6sat.noarch * foreman-vmware-1.6.0.17-1.el6sat.noarch * katello-1.5.0-26.el6sat.noarch * katello-ca-1.0-1.noarch * katello-certs-tools-1.5.5-1.el6sat.noarch * katello-installer-0.0.48-1.el6sat.noarch * openldap-2.4.23-32.el6_4.1.x86_64 * pulp-katello-0.3-3.el6sat.noarch * pulp-nodes-common-2.4.0-0.20.beta.el6sat.noarch * pulp-nodes-parent-2.4.0-0.20.beta.el6sat.noarch * pulp-puppet-plugins-2.4.0-0.20.beta.el6sat.noarch * pulp-puppet-tools-2.4.0-0.20.beta.el6sat.noarch * pulp-rpm-plugins-2.4.0-0.20.beta.el6sat.noarch * pulp-selinux-2.4.0-0.20.beta.el6sat.noarch * pulp-server-2.4.0-0.20.beta.el6sat.noarch * python-ldap-2.3.10-1.el6.x86_64 * ruby193-rubygem-net-ldap-0.3.1-3.el6sat.noarch * ruby193-rubygem-runcible-1.1.0-2.el6sat.noarch How reproducible: Always
@suresh, the syntax of using `--by` is incorrect now. i think it may have been in place at one time, but it has been removed in favor of the `--order` option, so i apologize if a doc didn't get updated somewhere. In the case of your examples, your commands should look like the following: hammer activation-key list --organization-id=1 --order='name ASC' hammer activation-key list --organization-id=1 --order='content view ASC' We don't have any kind of mechanism to let you know which fields are sortable and which fields are not, currently. Most objects in sat6 are sortable only by name at this time, which is also true for activation-keys. So attempting to sort by content view will result in an empty response from the server. i would prefer the server to respond with "Activation Keys cannot be sorted by 'content view'" or something to that effect.
@Adam, I agree to your recommendations in Comment 4. Also if --by option does not work anymore, please update the doc also. Currently it shows: # hammer activation-key list --help Usage: hammer activation-key list [OPTIONS] Options: --by BY Field to sort the results on --content-view CONTENT_VIEW_NAME --content-view-id CONTENT_VIEW_ID content view identifier --environment ENVIRONMENT_NAME --environment-id ENVIRONMENT_ID environment identifier --full-results FULL_RESULTS Whether or not to show all results --name NAME activation key name to filter by --order ORDER Sort field and order, eg. 'name DESC' --organization ORGANIZATION_NAME --organization-id ORGANIZATION_ID organization identifier --organization-label ORGANIZATION_LABEL --page PAGE Page number, starting at 1 --per-page PER_PAGE Number of results per page to return --search SEARCH Search string -h, --help print help
Created redmine issue http://projects.theforeman.org/issues/6573 from this bug
https://github.com/Katello/katello/pull/4420
Moving to POST since upstream bug http://projects.theforeman.org/issues/6573 has been closed ------------- Anonymous Applied in changeset commit:katello|3ec51c074a3decb6656f85195d98b39f57ccf430.
i'm reverting this commit because it's appearing to cause more problems than improve upon our sorting. walden pinged me about two separate times where this is preventing him from fixing or reproducing a bug. i'd prefer to revert it, and solve the problem in such a way that doesn't break other things. https://github.com/Katello/katello/pull/4540
Failed in GA Snap 4. Also I heard from Adam Price that this fix creates some side effects. Adam Price and Michael Mccune will talk about reverting this fix. hammer> hammer activation-key list --organization-id=3 --by='name' Error: No such sub-command 'hammer' See: ' --help' hammer> activation-key list --organization-id=3 --by='name' ---|------|----------|-----------------------|------------- ID | NAME | CONSUMED | LIFECYCLE ENVIRONMENT | CONTENT VIEW ---|------|----------|-----------------------|------------- 1 | ak1 | 1 of | DEV | cv1 2 | ak2 | 0 of | Library | cv1 9 | ak3 | 0 of | | 10 | ak4 | 0 of | | 11 | ak5 | 0 of | | 12 | ak6 | 0 of | | 13 | ak7 | 0 of | QE | cv1 ---|------|----------|-----------------------|------------- hammer> activation-key list --organization-id=3 --by='contentview' ---|------|----------|-----------------------|------------- ID | NAME | CONSUMED | LIFECYCLE ENVIRONMENT | CONTENT VIEW ---|------|----------|-----------------------|------------- 1 | ak1 | 1 of | DEV | cv1 2 | ak2 | 0 of | Library | cv1 9 | ak3 | 0 of | | 10 | ak4 | 0 of | | 11 | ak5 | 0 of | | 12 | ak6 | 0 of | | 13 | ak7 | 0 of | QE | cv1 ---|------|----------|-----------------------|------------- Version Tested: GA Snap 4 - Satellite-6.0.4-RHEL-6-20140806.0
Failed. The --by option still dont work. I am not sure on what was actually fixed with this bug. If we dont need --by option anymore, please remove it from hammer. Please note --order option works fine. Version Tested: Satellite-6.1.0-RHEL-6-20150210.0 hammer> activation-key list --help Usage: activation-key list [OPTIONS] Options: --by BY Field to sort the results on --content-view CONTENT_VIEW_NAME Content view name --content-view-id CONTENT_VIEW_ID content view numeric identifier --full-results FULL_RESULTS Whether or not to show all results One of true/false, yes/no, 1/0. --lifecycle-environment LIFECYCLE_ENVIRONMENT_NAME Name to search by --lifecycle-environment-id LIFECYCLE_ENVIRONMENT_ID --name NAME activation key name to filter by --order ORDER Sort field and order, eg. 'name DESC' --organization ORGANIZATION_NAME Organization name to search by --organization-id ORGANIZATION_ID organization ID --organization-label ORGANIZATION_LABEL Organization label to search by --page PAGE Page number, starting at 1 --per-page PER_PAGE Number of results per page to return --search SEARCH Search string -h, --help print help hammer> activation-key list --organization-id=1 --by='name' ---|------|----------------|-----------------------|-------------------------- ID | NAME | CONSUMED | LIFECYCLE ENVIRONMENT | CONTENT VIEW ---|------|----------------|-----------------------|-------------------------- 1 | ak1 | 0 of Unlimited | Library | Default Organization View 2 | ak2 | 0 of Unlimited | | 3 | ak3 | 0 of Unlimited | | 4 | ak4 | 0 of Unlimited | | 5 | ak5 | 0 of Unlimited | | ---|------|----------------|-----------------------|-------------------------- [FAILED SCENARIO] hammer> activation-key list --organization-id=1 --by='content view' ---|------|----------------|-----------------------|-------------------------- ID | NAME | CONSUMED | LIFECYCLE ENVIRONMENT | CONTENT VIEW ---|------|----------------|-----------------------|-------------------------- 1 | ak1 | 0 of Unlimited | Library | Default Organization View 2 | ak2 | 0 of Unlimited | | 3 | ak3 | 0 of Unlimited | QE | cv3 4 | ak4 | 0 of Unlimited | | 5 | ak5 | 0 of Unlimited | | ---|------|----------------|-----------------------|-------------------------- --order works fine: hammer> activation-key list --organization-id=1 --order='name asc' ---|------|----------------|-----------------------|-------------------------- ID | NAME | CONSUMED | LIFECYCLE ENVIRONMENT | CONTENT VIEW ---|------|----------------|-----------------------|-------------------------- 1 | ak1 | 0 of Unlimited | Library | Default Organization View 2 | ak2 | 0 of Unlimited | | 3 | ak3 | 0 of Unlimited | QE | cv3 4 | ak4 | 0 of Unlimited | | 5 | ak5 | 0 of Unlimited | | ---|------|----------------|-----------------------|-------------------------- hammer> activation-key list --organization-id=1 --order='name desc' ---|------|----------------|-----------------------|-------------------------- ID | NAME | CONSUMED | LIFECYCLE ENVIRONMENT | CONTENT VIEW ---|------|----------------|-----------------------|-------------------------- 5 | ak5 | 0 of Unlimited | | 4 | ak4 | 0 of Unlimited | | 3 | ak3 | 0 of Unlimited | QE | cv3 2 | ak2 | 0 of Unlimited | | 1 | ak1 | 0 of Unlimited | Library | Default Organization View ---|------|----------------|-----------------------|-------------------------- hammer> activation-key list --organization-id=1 --order='content view desc' sort_order must be ASC or DESC. hammer> activation-key list --organization-id=1 --order='contentview desc' Unable to order by column 'contentview'. hammer> activation-key list --organization-id=1 --order='contentview' Unable to order by column 'contentview'. hammer> activation-key list --organization-id=1 --order='id' ---|------|----------------|-----------------------|-------------------------- ID | NAME | CONSUMED | LIFECYCLE ENVIRONMENT | CONTENT VIEW ---|------|----------------|-----------------------|-------------------------- 1 | ak1 | 0 of Unlimited | Library | Default Organization View 2 | ak2 | 0 of Unlimited | | 3 | ak3 | 0 of Unlimited | QE | cv3 4 | ak4 | 0 of Unlimited | | 5 | ak5 | 0 of Unlimited | | ---|------|----------------|-----------------------|-------------------------- hammer> activation-key list --organization-id=1 --order='id desc' ---|------|----------------|-----------------------|-------------------------- ID | NAME | CONSUMED | LIFECYCLE ENVIRONMENT | CONTENT VIEW ---|------|----------------|-----------------------|-------------------------- 5 | ak5 | 0 of Unlimited | | 4 | ak4 | 0 of Unlimited | | 3 | ak3 | 0 of Unlimited | QE | cv3 2 | ak2 | 0 of Unlimited | | 1 | ak1 | 0 of Unlimited | Library | Default Organization View ---|------|----------------|-----------------------|--------------------------
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-2015:1592
Accidentally closed with 6.1.1 errata
Upstream bug component is API
Upstream bug component is API - Content
An upstream issue has been opened for this. When this is fixed, the next version of satellite will contain the fix. We will no longer be tracking this downstream. If you feel this was closed in error, please feel free to re-open with additional information.