----- 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). > > > commit 72621b2ffe5a0a21ba1023dada36b405bf2111f2 > Author: Adam Litke <[email protected]> > Date: Mon Apr 16 13:56:55 2012 -0500 > > Don't hardcode the 'spm' tag when getting information for all > tasks. > > diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py > index 2755aef..51ee17c 100644 > --- a/vdsm/storage/hsm.py > +++ b/vdsm/storage/hsm.py > @@ -1694,7 +1694,7 @@ class HSM: > :options: ? > """ > #getSharedLock(tasksResource...) > - allTasksStatus = self.taskMng.getAllTasksStatuses("spm") > + allTasksStatus = self.taskMng.getAllTasksStatuses() > return dict(allTasksStatus=allTasksStatus) > > > @@ -1733,7 +1733,7 @@ class HSM: > """ > #getSharedLock(tasksResource...) > # TODO: if spUUID passed, make sure tasks are relevant only > to pool > - allTasksInfo = self.taskMng.getAllTasksInfo("spm") > + allTasksInfo = self.taskMng.getAllTasksInfo() > return dict(allTasksInfo=allTasksInfo) > > > > -- > Adam Litke <[email protected]> > IBM Linux Technology Center > > _______________________________________________ > vdsm-devel mailing list > [email protected] > https://fedorahosted.org/mailman/listinfo/vdsm-devel > _______________________________________________ vdsm-devel mailing list [email protected] https://fedorahosted.org/mailman/listinfo/vdsm-devel
