Issue #325
closedMissingresource consumer_id not raised when retieval of schedules if performed on invalid consumer
Description
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:--:-- --:--:-- --:--:-- 1246
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 394 100 394 0 0 1242 0 -
{
"_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
}
Updated by ipanova@redhat.com over 8 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to ipanova@redhat.com
Updated by bmbouter over 8 years ago
- Triaged changed from No to Yes
- Severity set to Low
Updated by ipanova@redhat.com over 8 years ago
- Status changed from ASSIGNED to POST
Updated by ipanova@redhat.com over 8 years ago
- Status changed from POST to MODIFIED
Updated by dkliban@redhat.com over 8 years ago
- Status changed from MODIFIED to 5
Updated by igulina@redhat.com over 8 years ago
- 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
}
Updated by amacdona@redhat.com almost 8 years ago
- Status changed from 6 to CLOSED - CURRENTRELEASE
Updated by bmbouter over 3 years ago
- Category deleted (
14)
We are removing the 'API' category per open floor discussion June 16, 2020.