Bug 1123868 - [RFE] Missing search option for template kinds
Summary: [RFE] Missing search option for template kinds
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: API
Version: 6.0.3
Hardware: Unspecified
OS: Unspecified
medium
low vote
Target Milestone: Unspecified
Assignee: orabin
QA Contact: Tazim Kolhar
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks: 1122832
TreeView+ depends on / blocked
 
Reported: 2014-07-28 13:46 UTC by Peter Vreman
Modified: 2017-02-23 21:10 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-12 05:11:49 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:1592 normal SHIPPED_LIVE Important: Red Hat Satellite 6.1.1 on RHEL 6 2015-08-12 09:04:35 UTC
Foreman Issue Tracker 6794 None None None 2016-04-22 15:08:54 UTC

Description Peter Vreman 2014-07-28 13:46:57 UTC
Description of problem:
Missing search option for subscriptions. In the API documentation the search optional is also not mentioned.
Having a search option makes it easier to retrieve the correct version in a single query without parsing the complete JSON output.


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


How reproducible:


Steps to Reproduce:
1. curl -XGET --data-urlencode "search=name=provision" https://localhost/api/v2/template_kinds
{
  "total": 8,
  "subtotal": 8,
  "page": 1,
  "per_page": 20,
  "search": "name=provision",
  "sort": {
    "by": null,
    "order": null
  },
  "results": [{"name":"PXELinux","id":1,"created_at":"2014-07-11T09:07:16Z","updated_at":"2014-07-11T09:07:16Z"},{"name":"PXEGrub","id":2,"created_at":"2014-07-11T09:07:16Z","updated_at":"2014-07-11T09:07:16Z"},{"name":"iPXE","id":3,"created_at":"2014-07-11T09:07:16Z","updated_at":"2014-07-11T09:07:16Z"},{"name":"provision","id":4,"created_at":"2014-07-11T09:07:16Z","updated_at":"2014-07-11T09:07:16Z"},{"name":"finish","id":5,"created_at":"2014-07-11T09:07:16Z","updated_at":"2014-07-11T09:07:16Z"},{"name":"script","id":6,"created_at":"2014-07-11T09:07:16Z","updated_at":"2014-07-11T09:07:16Z"},{"name":"user_data","id":7,"created_at":"2014-07-11T09:07:16Z","updated_at":"2014-07-11T09:07:16Z"},{"name":"ZTP","id":8,"created_at":"2014-07-11T09:07:16Z","updated_at":"2014-07-11T09:07:16Z"}]
}

2.
3.

Actual results:
Return only the provision item

Expected results:


Additional info:

Comment 1 Dominic Cleal 2014-07-28 13:49:49 UTC
Created redmine issue http://projects.theforeman.org/issues/6794 from this bug

Comment 3 Bryan Kearney 2014-08-01 13:00:00 UTC
Upstream bug assigned to orabin@redhat.com

Comment 4 Bryan Kearney 2014-08-05 12:04:55 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/6794 has been closed
-------------
Ori Rabin
Applied in changeset commit:12bb385dedbadf20294338008dd240684e05b026.

Comment 5 Tazim Kolhar 2014-11-21 10:54:30 UTC
FAILEDQA:


*** This bug is verified in upstream. This fix should eventually land in future downstream builds ***

Version Tested:

# rpm -qa | grep foreman
ruby193-rubygem-foreman_hooks-0.3.7-2.el7.noarch
rubygem-hammer_cli_foreman_tasks-0.0.3-2.201409091410git163c264.git.0.988ca80.el7.noarch
ruby193-rubygem-foreman_abrt-0.0.4-1.el7.noarch
ruby193-rubygem-foreman_docker-0.2.0-2.el7.noarch
ruby193-rubygem-foreman_bootdisk-4.0.2-1.el7.noarch
rubygem-hammer_cli_foreman-0.1.3-1.201411121216git9381fc5.el7.noarch
hp-dl380pgen8-02-vm-6.lab.bos.redhat.com-foreman-client-1.0-1.noarch
foreman-1.8.0-0.develop.201411201054gitbe4602e.el7.noarch
foreman-ovirt-1.8.0-0.develop.201411201054gitbe4602e.el7.noarch
ruby193-rubygem-foreman-tasks-0.6.9-1.el7.noarch
ruby193-rubygem-foreman_discovery-1.4.0-2.el7.noarch
foreman-postgresql-1.8.0-0.develop.201411201054gitbe4602e.el7.noarch
foreman-compute-1.8.0-0.develop.201411201054gitbe4602e.el7.noarch
foreman-gce-1.8.0-0.develop.201411201054gitbe4602e.el7.noarch
foreman-libvirt-1.8.0-0.develop.201411201054gitbe4602e.el7.noarch
foreman-vmware-1.8.0-0.develop.201411201054gitbe4602e.el7.noarch
foreman-selinux-1.8.0-0.develop.201410280941git10de1c5.el7.noarch
foreman-proxy-1.8.0-0.develop.201411121327gitab6edc2.el7.noarch
hp-dl380pgen8-02-vm-6.lab.bos.redhat.com-foreman-proxy-1.0-1.noarch
foreman-release-1.8.0-0.develop.201411201054gitbe4602e.el7.noarch


#  curl -XGET --data-urlencode "search=name=provision" https://hp-dl380pgen8-02-vm-6.lab.bos.redhat.com/api/v2/template_kinds
{
  "error": {"message":"Unable to authenticate user "}
}

Comment 6 Dominic Cleal 2014-11-21 10:57:07 UTC
(In reply to Tazim Kolhar from comment #5)
> FAILEDQA:
> 
> 
> *** This bug is verified in upstream. This fix should eventually land in
> future downstream builds ***

Is it failed, or is it verified?

> #  curl -XGET --data-urlencode "search=name=provision"
> https://hp-dl380pgen8-02-vm-6.lab.bos.redhat.com/api/v2/template_kinds
> {
>   "error": {"message":"Unable to authenticate user "}
> }

You haven't authenticated.  This has nothing to do with searching!

Comment 7 Tazim Kolhar 2014-12-12 11:45:44 UTC
VERIFIED:

*** This bug is verified in upstream. This fix should eventually land in future downstream builds ***

# rpm -q | grep foreman
rpm: no arguments given for query
[root@qe-foreman-rhel66 ~]# rpm -qa | grep foreman
foreman-ovirt-1.8.0-0.develop.201412111740git287d974.el6.noarch
qe-foreman-rhel66.usersys.redhat.com-puppet-client-1.0-1.noarch
foreman-gce-1.8.0-0.develop.201412111740git287d974.el6.noarch
ruby193-rubygem-foreman-tasks-0.6.10-2.el6.noarch
rubygem-hammer_cli_foreman-0.1.4-1.201412111235git2131f5d.el6.noarch
foreman-release-1.8.0-0.develop.201412111740git287d974.el6.noarch
qe-foreman-rhel66.usersys.redhat.com-foreman-client-1.0-1.noarch
qe-foreman-rhel66.usersys.redhat.com-qpid-client-cert-1.0-1.noarch
ruby193-rubygem-foreman_docker-0.2.0-2.el6.noarch
ruby193-rubygem-foreman_discovery-1.4.1-1.el6.noarch
ruby193-rubygem-foreman_bootdisk-4.0.2-1.el6.noarch
foreman-libvirt-1.8.0-0.develop.201412111740git287d974.el6.noarch
qe-foreman-rhel66.usersys.redhat.com-apache-1.0-1.noarch
qe-foreman-rhel66.usersys.redhat.com-parent-cert-1.0-1.noarch
foreman-1.8.0-0.develop.201412111740git287d974.el6.noarch
foreman-vmware-1.8.0-0.develop.201412111740git287d974.el6.noarch
foreman-selinux-1.8.0-0.develop.201411281557gitf4a857f.el6.noarch
foreman-proxy-1.8.0-0.develop.201412111700gita7c8c34.el6.noarch
foreman-postgresql-1.8.0-0.develop.201412111740git287d974.el6.noarch
qe-foreman-rhel66.usersys.redhat.com-foreman-proxy-1.0-1.noarch
qe-foreman-rhel66.usersys.redhat.com-qpid-broker-1.0-1.noarch
foreman-compute-1.8.0-0.develop.201412111740git287d974.el6.noarch
ruby193-rubygem-foreman_hooks-0.3.7-2.el6.noarch
rubygem-hammer_cli_foreman_tasks-0.0.3-2.201409091410gitc96619d.git.0.37f3704.el6.noarch

https://qe-foreman-rhel66.usersys.redhat.com/api/v2/template_kinds?search=name=provision
{
  "total": 9,
  "subtotal": 1,
  "page": 1,
  "per_page": 20,
  "search": "name=provision",
  "sort": {
    "by": null,
    "order": null
  },
  "results": [{"created_at":"2014-12-12T10:51:04Z","updated_at":"2014-12-12T10:51:04Z","name":"provision","id":5}]
}

Comment 9 Bryan Kearney 2015-08-11 13:35:18 UTC
This bug is slated to be released with Satellite 6.1.

Comment 10 errata-xmlrpc 2015-08-12 05:11:49 UTC
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


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