Issue #325
closed
Missingresource consumer_id not raised when retieval of schedules if performed on invalid consumer
Status:
CLOSED - CURRENTRELEASE
Description
http://pulp.readthedocs.org/en/latest/dev-guide/integration/rest-api/consumer/scheduled_content.html#listing-schedules
404 - if the consumer does not exist
$ curl H "Accept: application/json" -H "WebFrameworkSwitch: webpy" -X GET -k -u admin:admin "https://localhost/pulp/api/v2/consumers/no-consumer/schedules/content/install/"| python -m json.tool
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 394 100 394 0 0 1242 0 -:--:-- --:--:-- --:--:-- 1246
{
"_href": "/pulp/api/v2/consumers/no-consumer/schedules/content/install/",
"error": {
"code": "PLP0009",
"data": {
"resources": {
"schedule": null
}
},
"description": "Missing resource(s): schedule=None",
"sub_errors": []
},
"error_message": "Missing resource(s): schedule=None",
"exception": null,
"http_request_method": "GET",
"http_status": 404,
"resources": {
"schedule": null
},
"traceback": null
}
- Status changed from NEW to ASSIGNED
- Assignee set to ipanova@redhat.com
- Triaged changed from No to Yes
- Severity set to Low
- Status changed from ASSIGNED to POST
- Severity changed from Low to 1. Low
- Status changed from POST to MODIFIED
- Platform Release set to 2.7.0
- Status changed from MODIFIED to 5
- Status changed from 5 to 6
Verified. Checked on f20 and rhel6 on pulp 2.7.0
>> rpm -qa pulp-server
pulp-server-2.7.0-0.3.beta.fc20.noarch
>> curl H "Accept: application/json" -H "WebFrameworkSwitch: webpy" -X GET -k -u admin:admin "https://localhost/pulp/api/v2/consumers/cheburashka/schedules/content/install/"| python -m json.tool
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (6) Could not resolve host: H
curl: (6) Could not resolve host: Accept
100 2 100 2 0 0 5 0 --:--:-- --:--:-- --:--:-- 5
[]
>> curl H "Accept: application/json" -H "WebFrameworkSwitch: webpy" -X GET -k -u admin:admin "https://localhost/pulp/api/v2/consumers/no_such_consumer/schedules/content/install/"| python -m json.tool
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (6) Could not resolve host: H
curl: (6) Could not resolve host: Accept
100 463 100 463 0 0 1392 0 --:--:-- --:--:-- --:--:-- 1394
{
"_href": "/pulp/api/v2/consumers/no_such_consumer/schedules/content/install/",
"error": {
"code": "PLP0009",
"data": {
"resources": {
"consumer_id": "no_such_consumer"
}
},
"description": "Missing resource(s): consumer_id=no_such_consumer",
"sub_errors": []
},
"error_message": "Missing resource(s): consumer_id=no_such_consumer",
"exception": null,
"http_request_method": "GET",
"http_status": 404,
"resources": {
"consumer_id": "no_such_consumer"
},
"traceback": null
}
- Status changed from 6 to CLOSED - CURRENTRELEASE
We are removing the 'API' category per open floor discussion June 16, 2020.
Also available in: Atom
PDF