Issue #455
closedWrong code status to update an event listener
Description
Description of problem:
Here https://pulp-dev-guide.readthedocs.org/en/latest/integration/rest-api/event/crud.html#update-an-event-listener-configuration
According to docs we can update only:
notifier_config (object) and event_types (array) proporties of a task listener.
I tried to update other three proporties. I got a code 200 OK. However, nothing was updated except _href in each case. In /var/log/messages it returns 1 with no details.
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
Actual results:
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 PUT -k https://admin:admin@localhost/pulp/api/v2/events/53a1ba0fb7e943519221158a/ --data '{"notifier_type
_id":"httpz"}'
HTTP/1.1 200 OK
Date: Thu, 19 Jun 2014 12:06:24 GMT
Server: Apache/2.2.15 (Red Hat)
Content-Length: 279
Connection: close
Content-Type: application/json
{"_href": "/pulp/api/v2/events/53a1ba0fb7e943519221158a/", "notifier_config": {"url": "http://localhost/api"}, "_ns": "event_listeners", "event_types": ["repo.sync.start"], "_id": {"$oid": "53a1ba0fb7e9435192211
58a"}, "id": "53a1ba0fb7e943519221158a", "notifier_type_id": "http"}
curl -i -H "Accept: application/json" -X PUT -k https://admin:admin@localhost/pulp/api/v2/events/53a1ba0fb7e943519221158a/ --data '{"_href": "/pulp/api/v2/"}'
HTTP/1.1 200 OK
Date: Thu, 19 Jun 2014 12:07:15 GMT
Server: Apache/2.2.15 (Red Hat)
Content-Length: 279
Connection: close
Content-Type: application/json
{"_href": "/pulp/api/v2/events/53a1ba0fb7e943519221158a/", "notifier_config": {"url": "http://localhost/api"}, "_ns": "event_listeners", "event_types": ["repo.sync.start"], "_id": {"$oid": "53a1ba0fb7e9435192211
58a"}, "id": "53a1ba0fb7e943519221158a", "notifier_type_id": "http"}
curl -i -H "Accept: application/json" -X PUT -k https://admin:admin@localhost/pulp/api/v2/events/53a1ba0fb7e943519221158a/ --data '{"_ns": "chebur
ashka"}'
HTTP/1.1 200 OK
Date: Thu, 19 Jun 2014 12:07:59 GMT
Server: Apache/2.2.15 (Red Hat)
Content-Length: 279
Connection: close
Content-Type: application/json
{"_href": "/pulp/api/v2/events/53a1ba0fb7e943519221158a/", "notifier_config": {"url": "http://localhost/api"}, "_ns": "event_listeners", "event_types": ["repo.sync.start"], "_id": {"$oid": "53a1ba0fb7e9435192211
58a"}, "id": "53a1ba0fb7e943519221158a", "notifier_type_id": "http"}
less /var/log/messages
init: ttyS0 (/dev/ttyS0) main process (20712) terminated with status 1
init: ttyS0 (/dev/ttyS0) main process ended, respawning
init: ttyS0 (/dev/ttyS0) main process (20713) terminated with status 1
init: ttyS0 (/dev/ttyS0) main process ended, respawning
Expected results:
HTTP/1.1 400 Bad Request
...
and with
less /var/log/messages
Invalid properties: ['property_name']
+ This bug was cloned from Bugzilla Bug #1111224 +