Bug 728326 - list errata consumer web services call needs to be changed to GET and makes the type field optional
Summary: list errata consumer web services call needs to be changed to GET and makes t...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: user-experience
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: Sprint 27
Assignee: Sayli Karmarkar
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-08-04 17:55 UTC by Pradeep Kilambi
Modified: 2015-03-23 01:10 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description Pradeep Kilambi 2011-08-04 17:55:21 UTC
Description of problem:

The pulp/api/consumers/<id>/listerrata/ is a POST instead of GET which is more restful. Also the API expects the errata type to be a required field, which could be optional.

Comment 1 Sayli Karmarkar 2011-08-21 07:58:33 UTC
Fixed. Replaced by GET call to pulp/api/consumers/<id>/errata/.

Comment 2 Jeff Ortel 2011-08-24 19:46:21 UTC
build: 0.227

Comment 3 Preethi Thomas 2011-08-31 15:02:59 UTC
fails_qa
[root@preethi ~]# rpm -q pulp
pulp-0.0.228-1.fc15.noarch

[root@preethi ~]# curl -k -u admin:admin --request GET  --header 'accept: application/json' --header 'content-type: application/json' https://localhost/pulp/api/consumers/pulp-client/errata/
"Traceback (most recent call last):\n  File \"/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/decorators.py\", line 48, in report_error\n    return method(self, *args, **kwargs)\n  File \"/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/decorators.py\", line 127, in _auth_decorator\n    value = method(self, *args, **kwargs)\n  File \"/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/consumers.py\", line 295, in GET\n    return field(id)\n  File \"/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/consumers.py\", line 283, in errata\n    types = filters.pop('types')\nKeyError: 'types'\n"[root@preethi ~]# 
[root@preethi ~]#

Comment 4 Preethi Thomas 2011-08-31 15:18:29 UTC
[root@preethi ~]# curl -k -u admin:admin --request GET  --header 'accept: application/json' --header 'content-type: application/json' https://localhost/pulp/api/consumers/errata/
"No consumer errata"[root@preethi ~]#

Comment 5 Sayli Karmarkar 2011-09-02 07:48:59 UTC
This should be fixed by the fix for 734839. GET call was resulting in an error when type is not specified, but after adding the fix it seems to be working fine.

Comment 6 Jeff Ortel 2011-09-02 19:18:10 UTC
build: 0.230

Comment 7 Preethi Thomas 2011-09-07 15:02:30 UTC
verified

[root@preethi ~]# rpm -q pulp
pulp-0.0.230-1.fc15.noarch

[root@preethi ~]# 
[root@preethi ~]#  curl -k -u admin:admin https://localhost/pulp/api/consumers/pulp-client/errata/
[{"_id": "FEDORA-2011-0316", "type": "security", "id": "FEDORA-2011-0316", "title": "libuser-0.56.18-3.fc14"}, {"_id": "FEDORA-2011-1937", "type": "bugfix", "id": "FEDORA-2011-1937", "title": "lua-5.1.4-7.fc14"}, {"_id": "FEDORA-2011-7861", "type": "bugfix", "id": "FEDORA-2011-7861", "title": "sudo-1.7.4p5-2.fc14"}, {"_id": "FEDORA-2011-9403", "type": "bugfix", "id": "FEDORA-2011-9403", "title": "python-simplejson-2.1.6-1.fc14.1"}, {"_id": "FEDORA-2011-4682", "type": "bugfix", "id": "FEDORA-2011-4682", "title": "boost-1.44.0-8.fc14"}, {"_id": "FEDORA-2011-6904", "type": "bugfix", "id": "FEDORA-2011-6904", "title": "apr-util-1.3.12-1.fc14"}, {"_id": "FEDORA-2011-8382", "type": "bugfix", "id": "FEDORA-2011-8382", "title": "fedora-logos-14.0.2-1.fc14"}, {"_id": "FEDORA-2011-9523", "type": "security", "id": "FEDORA-2011-9523", "title": "java-1.6.0-openjdk-1.6.0.0-54.1.9.9.fc14"}, {"_id": "FEDORA-2011-9525", "type": "security", "id": "FEDORA-2011-9525", "title": "freetype-2.4.2-5.fc14"}, {"_id": "FEDORA-2011-4997", "type": "bugfix", "id": "FEDORA-2011-4997", "title": "strace-4.6-1.fc14"}, {"_id": "FEDORA-2011-8021", "type": "security", "id": "FEDORA-2011-8021", "title": "fetchmail-6.3.20-1.fc14"}, {"_id": "FEDORA-2011-11103", "type": "security", "id": "FEDORA-2011-11103", "title": "kernel-2.6.35.14-95.fc14"}, {"_id": "FEDORA-2011-10372", "type": "bugfix", "id": "FEDORA-2011-10372", "title": "selinux-policy-3.9.7-44.fc14"},

Comment 8 Preethi Thomas 2012-02-24 20:18:30 UTC
Pulp v1.0 is released
Closed Current Release.

Comment 9 Preethi Thomas 2012-02-24 20:19:15 UTC
Pulp v1.0 is released.


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