Commit 466c5df2 authored by Grégory Wisniewski's avatar Grégory Wisniewski

Any change on cells return the diff applied on the partition table.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2430 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 17692b76
......@@ -137,15 +137,14 @@ class PartitionTable(neo.pt.PartitionTable):
raise PartitionTableException('Non-assigned partition')
# update the partition table
self.setCell(offset, node, CellStates.UP_TO_DATE)
cell_list = [self.setCell(offset, node, CellStates.UP_TO_DATE)]
cell_list = [(offset, uuid, CellStates.UP_TO_DATE)]
# If the partition contains a feeding cell, drop it now.
for feeding_cell in self.getCellList(offset):
if feeding_cell.isFeeding():
self.removeCell(offset, feeding_cell.getNode())
cell = (offset, feeding_cell.getUUID(), CellStates.DISCARDED)
cell_list.append(cell)
cell_list.append(self.removeCell(offset,
feeding_cell.getNode()))
break
return cell_list
......
......@@ -183,6 +183,7 @@ class PartitionTable(object):
row.append(Cell(node, state))
if state != CellStates.FEEDING:
self.count_dict[node] += 1
return (offset, node.getUUID(), state)
def removeCell(self, offset, node):
row = self.partition_list[offset]
......@@ -193,6 +194,7 @@ class PartitionTable(object):
if not cell.isFeeding():
self.count_dict[node] -= 1
break
return (offset, node.getUUID(), CellStates.DISCARDED)
def load(self, ptid, row_list, nm):
"""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment