On Tue, Apr 17, 2012 at 07:39:24AM -0400, Ayal Baron wrote:
>
>
> - Original Message -
> > Hi,
> >
> > While developing the REST API I was having trouble using the
> > getAllTasks(Info|Statuses) API to get tasks information. I found out
> > that hsm
> > is hard-coding a tagged search for 'spm' in the calls to the task
> > manager. Is
> > there a reason that this tag must be hard-coded or can we remove it
> > as in the
> > patch below? With this patch applied I am able to list all tasks.
> >
> > If this patch is acceptable, I would be happy to submit it to gerrit
> > for
> > approval. Thanks!
>
> It is (unfortunately) not.
> There is an API guarantee to engine to return only SPM tasks.
> But I would be totally fine with exposing this in another way (either a new
> API or a flag here to filter according to something).
Please see http://gerrit.ovirt.org/3613 for a solution that 'fixes' the API
while keeping the promise to ovirt-engine. Here is the commit message to permit
continued discussion here on the list:
API: getAllTasks{Info|Statuses} does not return all tasks
As discussed on the list, I found that the getAllTasks* APIs do not return all
tasks but instead filter to return only spm tasks. This is a requirement for
ovirt-engine. To make it possible to view all tasks while preserving
compatibility for ovirt-engine I propose the following changes to the API:
The public API in API.py will be modified to add a 'tag' parameter which
defaults to None. This will be passed all the way down into the taskManager
(which already expects such a parameter). In this way, the new default mode of
operation will be fixed to return all tasks as the name of the API states.
To maintain compatibility for ovirt-engine, the XMLRPC binding will pass the tag
"spm" to these APIs to get the current filtering behavior. Note that I have
also changed vdsClient so that it will return all tasks.
--
Adam Litke
IBM Linux Technology Center
___
vdsm-devel mailing list
vdsm-devel@lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/vdsm-devel