Ayal Baron has posted comments on this change.

Change subject: getAllTasksList\Status with spUUID retrieves info only if host 
is the SPM
......................................................................


Patch Set 11: (4 inline comments)

....................................................
Commit Message
Line 7: getAllTasksList\Status with spUUID retrieves info only if host is the 
SPM
Line 8: 
Line 9: Request for tasks statuses or list with the optional argument spUUID
Line 10: will return only if the host is the SPM. Without spUUID param vdsm 
will return
Line 11: all tasks it can find.
This is just enhancing the interface (i.e. if you use it the same way as today 
then the behaviour is the same, if you pass the new optional param then 
behaviour is new).
Not clear what you mean by 'the right thing'
Line 12: 
Line 13: Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=880547
Line 14: Signed-off-by: Yaniv Bronhaim <[email protected]>


....................................................
File vdsm/storage/hsm.py
Line 2035:         taskStatus = self.taskMng.getTaskStatus(taskID=taskID)
Line 2036:         return dict(taskStatus=taskStatus)
Line 2037: 
Line 2038:     @public
Line 2039:     def getAllTasksStatuses(self, spUUID=None):
it should not be mandatory.
the alternative is to add a new API call getAllPoolTasksStatuses(self, spUUID) 
where it's mandatory.
Line 2040:         """
Line 2041:         Gets the status of all public tasks.
Line 2042: 
Line 2043:         :param spUUID: if specified returns pool specific tasks,


Line 2045: 
Line 2046:         :returns: a dict of all the tasks information.
Line 2047:         """
Line 2048:         # getSharedLock(tasksResource...)
Line 2049:         if spUUID:
That is not the logic nor the purpose.  The spUUID is used to get all the 
*pool* tasks.  Currently on SPM can do that, but that is an implementation 
detail and is kept that way here.
Line 2050:             # Currently pool tasks can only be retrieved by SPM
Line 2051:             self.validateSPM(spUUID)
Line 2052:         allTasksStatus = self.taskMng.getAllTasksStatuses("spm")
Line 2053:         return dict(allTasksStatus=allTasksStatus)


Line 2073:         inf = self.taskMng.getTaskInfo(taskID=taskID)
Line 2074:         return dict(TaskInfo=inf)
Line 2075: 
Line 2076:     @public
Line 2077:     def getAllTasksInfo(self, spUUID=None):
ditto
Line 2078:         """
Line 2079:         Get the information of all the tasks in a storage pool.
Line 2080: 
Line 2081:         :param spUUID: if specified returns pool specific tasks,


--
To view, visit http://gerrit.ovirt.org/12517
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I4cbc11c924f0bd078749fea26d79b39c0dd48094
Gerrit-PatchSet: 11
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Barak Azulay <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Daniel P. Berrange <[email protected]>
Gerrit-Reviewer: Eduardo <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Saggi Mizrahi <[email protected]>
Gerrit-Reviewer: Shu Ming <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to