Actions
Bug #29066
closedAPI call api/compute_resources/:id/images?operatingsystem_id=:id returns too many results
Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
Compute resources
Target version:
-
Description
When I request the API call api/compute_resources/6/images?operatingsystem_id=2 I receive the results below.
2 images belong to compute resource id 6 and 1 images belongs to compute resource id 5
I'd expect to receive only images matching the compute_resource id 6.
{ "page": 1, "per_page": 20, "results": [ { "architecture_id": 1, "architecture_name": "x86_64", "compute_resource_id": 5, "compute_resource_name": "AWS", "created_at": "2020-02-15 12:48:45 UTC", "iam_role": null, "id": 5, "name": "CentOS", "operatingsystem_id": 2, "operatingsystem_name": "CentOS 7.X", "updated_at": "2020-02-15 12:48:45 UTC", "user_data": false, "username": "centos", "uuid": "ami-0ff760d16d9497662" }, { "architecture_id": 1, "architecture_name": "x86_64", "compute_resource_id": 6, "compute_resource_name": "Azure", "created_at": "2020-02-17 16:58:42 UTC", "id": 9, "name": "CentOS2", "operatingsystem_id": 2, "operatingsystem_name": "CentOS 7.X", "updated_at": "2020-02-17 16:58:42 UTC", "username": "centos", "uuid": "azure-123" }, { "architecture_id": 1, "architecture_name": "x86_64", "compute_resource_id": 6, "compute_resource_name": "Azure", "created_at": "2020-02-18 16:10:17 UTC", "id": 11, "name": "CentOS", "operatingsystem_id": 2, "operatingsystem_name": "CentOS 7.X", "updated_at": "2020-02-18 16:10:17 UTC", "username": "centos", "uuid": "azure-456" } ], "search": null, "sort": { "by": null, "order": null }, "subtotal": 3, "total": 3 }
Actions