Actions
Issue #749
closedAPI call to /repositories/repo_id/importers/importer_id/ with incorrect importer id returns a 200
Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
2.7.0
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:
Description
Summary
Since each repository can only have a single importer, the manager only uses the repo_id to get the importer. However, since the importer_id is in the url, a 404 should be returned if it does not exist.
Actual behavior
$ curl -s -H "Accept: application/json" -H "WebFrameworkSwitch: webpy" -X GET -k -u admin:admin https://localhost/pulp/api/v2/repositories/test/importers/fake/ | python -mjson.tool
{
"_id": {
"$oid": "55005943e138230e5890f837"
},
"_ns": "repo_importers",
"config": null,
"id": "yum_importer",
"importer_type_id": "yum_importer",
"last_sync": null,
"repo_id": "test",
"scheduled_syncs": [],
"scratchpad": null
}
Expected Behavior
$ curl -s -H "Accept: application/json" -H "WebFrameworkSwitch: django" -X GET -k -u admin:admin https://localhost/pulp/api/v2/repositories/test/importers/fake/ | python -mjson.tool
{
"_href": "/pulp/api/v2/repositories/test/importers/fake/",
"error": {
"code": "PLP0009",
"data": {
"resources": {
"importer_id": "fake"
}
},
"description": "Missing resource(s): importer_id=fake",
"sub_errors": []
},
"error_message": "Missing resource(s): importer_id=fake",
"exception": null,
"http_request_method": "GET",
"http_status": 404,
"resources": {
"importer_id": "fake"
},
"traceback": null
}
Note
As indicated in the "expected behavior", this will be fixed in the Django conversion.
Actions
django conversion - repositories
closes #707 closes #749 closes #756 closes #804 closes #805 closes #812