Bug 1111255 - no id in _href in a response body when retrive all event listeners
Summary: no id in _href in a response body when retrive all event listeners
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Pulp
Classification: Retired
Component: API/integration
Version: 2.4 Beta
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: ---
: ---
Assignee: Ina Panova
QA Contact: Irina Gulina
URL:
Whiteboard:
: 1192102 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-06-19 14:59 UTC by Irina Gulina
Modified: 2015-02-28 22:10 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-28 22:10:56 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Pulp Redmine 456 0 None None None Never

Description Irina Gulina 2014-06-19 14:59:50 UTC
Description of problem:

Here https://pulp-dev-guide.readthedocs.org/en/latest/integration/rest-api/event/crud.html#retrieve-all-event-listeners

According docs _href in a response body should contain id of an event listener. 
In fact, it doesn't. 


Version-Release number of selected component (if applicable):
>>rpm -qa pulp-server
pulp-server-2.4.0-0.20.beta.el6.noarch

How reproducible:
always


Steps to Reproduce:
 
>>curl -k -X GET https://admin:admin@localhost/pulp/api/v2/events/                                                                                   
[{"_href": "/pulp/api/v2/events/", "notifier_config": {"url": "http://localhost/api"}, "_ns": "event_listeners", "event_types": ["repo.sync.start"], "_id": {"$oid": "53a1ba0fb7e943519221158a"}, "id": "53a1ba0fb7
e943519221158a", "notifier_type_id": "http"}]

>>curl -i -H "Accept: application/json" -X POST -k -u admin:admin -d '{"notifier_type_id" : "http", "notifier_config" : {"url" : "http://localhost/api"},"event_types" : ["repo.sync.finish
", "repo.publish.finish"]}' 'https://localhost/pulp/api/v2/events/'

HTTP/1.1 201 Created
Date: Thu, 19 Jun 2014 14:11:45 GMT
Server: Apache/2.2.15 (Red Hat)
Location: /pulp/api/v2/events/53a2efa1b7e943519470c186/
Content-Length: 303
Connection: close
Content-Type: application/json

{"_href": "/pulp/api/v2/events/53a2efa1b7e943519470c186/", "notifier_config": {"url": "http://localhost/api"}, "_ns": "event_listeners", "event_types": ["repo.sync.finish", "repo.publish.finish"], "_id": {"$oid"
: "53a2efa1b7e943519470c186"}, "id": "53a2efa1b7e943519470c186", "notifier_type_id": "http"}

>>curl -k -X GET https://admin:admin@localhost/pulp/api/v2/events/                                                                                   
[{"_href": "/pulp/api/v2/events/", "notifier_config": {"url": "http://localhost/api"}, "_ns": "event_listeners", "event_types": ["repo.sync.start"], "_id": {"$oid": "53a1ba0fb7e943519221158a"}, "id": "53a1ba0fb7
e943519221158a", "notifier_type_id": "http"}, {"_href": "/pulp/api/v2/events/", "notifier_config": {"url": "http://localhost/api"}, "_ns": "event_listeners", "event_types": ["repo.sync.finish", "repo.publish.fin
ish"], "_id": {"$oid": "53a2efa1b7e943519470c186"}, "id": "53a2efa1b7e943519470c186", "notifier_type_id": "http"}]


Expected results:
[{"_href": "/pulp/api/v2/events/53a1ba0fb7e943519221158a/", "notifier_config": {"url": "http://localhost/api"}, "_ns": "event_listeners", "event_types": ["repo.sync.start"], "_id": {"$oid": "53a1ba0fb7e943519221158a"}, "id": "53a1ba0fb7
e943519221158a", "notifier_type_id": "http"}, {"_href": "/pulp/api/v2/events/53a2efa1b7e943519470c186/", "notifier_config": {"url": "http://localhost/api"}, "_ns": "event_listeners", "event_types": ["repo.sync.finish", "repo.publish.fin
ish"], "_id": {"$oid": "53a2efa1b7e943519470c186"}, "id": "53a2efa1b7e943519470c186", "notifier_type_id": "http"}]

Comment 1 Ina Panova 2015-02-12 19:08:43 UTC
*** Bug 1192102 has been marked as a duplicate of this bug. ***

Comment 2 Ina Panova 2015-02-16 16:58:42 UTC
https://github.com/pulp/pulp/pull/1640

Comment 3 Brian Bouterse 2015-02-28 22:10:56 UTC
Moved to https://pulp.plan.io/issues/456


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