Issue #768
closedAPI call to Update a scheduled publish returns 400 with invalid schedule_id
Description
A PUT request to /v2/repositories/<repo_id>/distributors/<distributor_id>/schedules/publish/invalid_schedule_id/
returns a 400. Since the invalid param is in the URL, this should be a 404.
Unfortunately the problem is in the manager so this will not be fixed by the Django conversion.
https://github.com/pulp/pulp/blob/master/server/pulp/server/managers/schedule/utils.py#L147
curl -s -H "Accept: application/json" -H "WebFrameworkSwitch: django" -X PUT -d '{"schedule": "P1DT"}' -D- -k -u admin:admin https://localhost/pulp/api/v2/repositories/test/distributors/9ce77df7-63b6-405a-a6ae-15332efcb433/schedules/publish/fake_sched/
HTTP/1.1 400 BAD REQUEST
Date: Tue, 17 Mar 2015 14:14:03 GMT
Server: Apache/2.4.10 (Fedora) OpenSSL/1.0.1k-fips mod_wsgi/4.3.2 Python/2.7.8
Content-Encoding: utf-8
Content-Length: 482
Connection: close
Content-Type: application/json
{
"_href": "/pulp/api/v2/repositories/test/distributors/9ce77df7-63b6-405a-a6ae-15332efcb433/schedules/publish/fake_sched/",
"error": {
"code": "PLP0015",
"data": {
"properties": "['schedule_id']",
"property_names": [
"schedule_id"
]
},
"description": "Invalid properties: ['schedule_id']",
"sub_errors": []
},
"error_message": "Invalid properties: ['schedule_id']",
"exception": null,
"http_request_method": "PUT",
"http_status": 400,
"property_names": [
"schedule_id"
],
"traceback": null
}
Updated by dkliban@redhat.com over 8 years ago
- Severity set to Low
- Triaged changed from No to Yes
Updated by ipanova@redhat.com over 8 years ago
- Status changed from NEW to ASSIGNED
- Platform Release set to 2.7.0
Updated by ipanova@redhat.com over 8 years ago
- Status changed from ASSIGNED to POST
Updated by ipanova@redhat.com over 8 years ago
- Assignee set to ipanova@redhat.com
Added by ipanova@redhat.com over 8 years ago
Added by ipanova@redhat.com over 8 years ago
Revision 7c2e70b1 | View on GitHub
API call to Update a scheduled publish returns 400 with invalid schedule_id
closes #768 This issue also was present in update/delete methods in schedule sync/publish and in consumer schedule content install/update/uninstall.
Updated by ipanova@redhat.com over 8 years ago
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
Applied in changeset pulp|7c2e70b10ad6672a8aac50bb209161b5acbe1d8b.
Updated by dkliban@redhat.com over 8 years ago
- Status changed from MODIFIED to 5
Updated by pthomas@redhat.com over 8 years ago
- Status changed from 5 to 6
verified
[root@qe-blade-10 ~]# rpm -qa pulp-server
pulp-server-2.7.0-0.3.beta.el6.noarch
[root@qe-blade-10 ~]#
<\pre>
<pre>
[root@qe-blade-10 ~]#
[root@qe-blade-10 ~]# curl -s -H "Accept: application/json" -H "WebFrameworkSwitch: django" -X PUT -d '{"schedule": "P1DT"}' -D- -k -u admin:admin https://localhost/pulp/api/v2/repositories/zoo/distributors/9ce77df7-63b6-405a-a6ae-15332efcb433/schedules/publish/fake_sched/
HTTP/1.1 404 NOT FOUND
Date: Thu, 02 Jul 2015 15:50:16 GMT
Server: Apache/2.2.15 (Red Hat)
Content-Encoding: utf-8
Content-Length: 586
Connection: close
Content-Type: application/json
{"http_request_method": "PUT", "exception": null, "error_message": "Missing resource(s): distributor=9ce77df7-63b6-405a-a6ae-15332efcb433", "_href": "/pulp/api/v2/repositories/zoo/distributors/9ce77df7-63b6-405a-a6ae-15332efcb433/schedules/publish/fake_sched/", "http_status": 404, "error": {"code": "PLP0009", "data": {"resources": {"distributor": "9ce77df7-63b6-405a-a6ae-15332efcb433"}}, "description": "Missing resource(s): distributor=9ce77df7-63b6-405a-a6ae-15332efcb433", "sub_errors": []}, "traceback": null, "resources": {"distributor": "9ce77df7-63b6-405a-a6ae-15332efcb433"}}[root@qe-blade-10 ~]#
[root@qe-blade-10 ~]#
[root@qe-blade-10 ~]#
<\pre>
Updated by amacdona@redhat.com about 8 years ago
- Status changed from 6 to CLOSED - CURRENTRELEASE
API call to Update a scheduled publish returns 400 with invalid schedule_id
closes #768 This issue also was present in update/delete methods in schedule sync/publish and in consumer schedule content install/update/uninstall.