Bug 860089 - RFE: Allow tasks to be queries by specifying multiple ids
Summary: RFE: Allow tasks to be queries by specifying multiple ids
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: API/integration
Version: Master
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 2.1.0
Assignee: Jason Connor
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks: katello-v2-pulp
TreeView+ depends on / blocked
 
Reported: 2012-09-24 22:43 UTC by Justin Sherrill
Modified: 2014-03-31 01:40 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-04-08 15:58:29 UTC
Embargoed:


Attachments (Terms of Use)

Description Justin Sherrill 2012-09-24 22:43:57 UTC
Description of problem:

In pulpv1 you could query multiple tasks by providing multiple ids.  For example:

GET /pulp/api/tasks/?id=1&id=2

In Pulpv2 this isn't possible.  Katello uses this so that we can check sync statuses in bulk instead of one at a time.  This speeds up our sync status page.

Comment 1 Jason Connor 2013-02-27 20:54:01 UTC
ability added :)
Pull Request submitted in branch jconnor-860089-rfe-task-query-by-id

Comment 2 Jeff Ortel 2013-03-06 15:20:40 UTC
build: 2.1.0-0.20.beta

Comment 3 Jason Connor 2013-04-01 15:45:38 UTC
This adds the ability to filter the REST API tasks collection with multiple 'id' fields in the GET request.

For example:

GET /pulp/api/v2/tasks/?id=<task id>&id=<task id>&id=<task id>

Should only return the tasks with the ids listed, instead of all of the tasks on the system.

Comment 4 Preethi Thomas 2013-04-01 17:27:33 UTC
verified

[root@cloud-qe-8 ~]# rpm -q pulp-server
pulp-server-2.1.0-0.26.beta.noarch

[root@cloud-qe-8 ~]# curl -k -u admin:admin   "https://localhost//pulp/api/v2/tasks/?id=0dee869b-65c8-45a7-93ec-2514c42e1fe4&id=7f5de9dc-4701-4435-92ba-b35188c45ba8"
[{"task_group_id": null, "exception": null, "traceback": null, "task_id": "0dee869b-65c8-45a7-93ec-2514c42e1fe4", "call_request_tags": ["pulp:consumer:voyager", "pulp:content_unit:rpm", "pulp:action:profile_create"], "reasons": [], "start_time": "2013-04-01T16:47:30Z", "tags": ["pulp:consumer:voyager", "pulp:content_unit:rpm", "pulp:action:profile_create"], "state": "finished", "finish_time": "2013-04-01T16:47:30Z", "dependency_failures": {}, "schedule_id": null, "progress": {}, "call_request_group_id": null, "call_request_id": "0dee869b-65c8-45a7-93ec-2514c42e1fe4", "principal_login": "SYSTEM", "response": "accepted", "result": "****"}, {"task_group_id": "210b617f-8990-4f30-84dc-73fb47791e6b", "exception": null, "traceback": null, "task_id": "7f5de9dc-4701-4435-92ba-b35188c45ba8", "call_request_tags": ["pulp:consumer:client1", "pulp:repository:forge", "pulp:repository_distributor:puppet_distributor", "pulp:action:agent_unbind"], "reasons": [], "start_time": "2013-03-31T07:21:01Z", "tags": ["pulp:consumer:client1", "pulp:repository:forge", "pulp:repository_distributor:puppet_distributor", "pulp:action:agent_unbind"], "state": "running", "finish_time": null, "dependency_failures": {}, "schedule_id": null, "progress": {}, "call_request_group_id": "210b617f-8990-4f30-84dc-73fb47791e6b", "call_request_id": "7f5de9dc-4701-4435-92ba-b35188c45ba8", "principal_login": "admin", "response": "accepted", "result": null}][root@cloud-qe-8 ~]#

Comment 5 Preethi Thomas 2013-04-08 15:58:29 UTC
Pulp 2.1 released 


http://www.pulpproject.org/2013/04/05/pulp-2-1-0-released/


Note You need to log in before you can comment on or make changes to this bug.