Saggi Mizrahi has posted comments on this change.
Change subject: gluster: add task support
......................................................................
Patch Set 17:
(2 comments)
All in all much cleaner code.
Smart move moving the gritty bits into another function.
I'd still like the interface modified.
....................................................
File vdsm/gluster/tasks.py
Line 31: def _getTasksData(value):
Line 32: data = {}
Line 33: state = value['status']
Line 34: if value['taskType'] == TaskType.REBALANCE:
Line 35: data = cli.volumeRebalanceStatus(value['volumeName'])
still refetchin 'volumeName' and co instead of putting in a variable
Line 36: elif value['taskType'] == TaskType.REMOVE_BRICK:
Line 37: data = cli.volumeRemoveBrickStatus(value['volumeName'],
Line 38: value['bricks'])
Line 39: elif value['taskType'] == TaskType.REPLACE_BRICK:
Line 49: "data": summary}
Line 50:
Line 51:
Line 52: @makePublic
Line 53: def tasksList(taskId=None):
I understand that it wants to model the *bad* VDSM task fwk but there is a good reason why
we are getting rid of it as soon as we can. No reason to make the same mistakes. Please
change it to a list.
Line 54: details = {}
Line 55: tasks = cli.volumeStatusAll()
Line 56: for tid in tasks:
Line 57: if taskId and tid != taskId:
--
To view, visit
http://gerrit.ovirt.org/10200
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I154df353bc6f23001d7bf61b8f5345abd2019cb6
Gerrit-PatchSet: 17
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Bala.FA <barumuga(a)redhat.com>
Gerrit-Reviewer: Adam Litke <agl(a)us.ibm.com>
Gerrit-Reviewer: Aravinda VK <avishwan(a)redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron(a)redhat.com>
Gerrit-Reviewer: Bala.FA <barumuga(a)redhat.com>
Gerrit-Reviewer: Better Saggi <bettersaggi(a)gmail.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce(a)redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>
Gerrit-Reviewer: ShaoHe Feng <shaohef(a)linux.vnet.ibm.com>
Gerrit-Reviewer: Timothy Asir <tjeyasin(a)redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: ndarshan <dnarayan(a)redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes