Commit f106a20c authored by Grégory Wisniewski's avatar Grégory Wisniewski

Add an update() method on the common partition table.


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@943 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 136132cf
...@@ -164,6 +164,16 @@ class PartitionTable(object): ...@@ -164,6 +164,16 @@ class PartitionTable(object):
self.count_dict[node] = self.count_dict.get(node, 0) - 1 self.count_dict[node] = self.count_dict.get(node, 0) - 1
break break
# XXX: node manager is given here just to verify that any node in the
# partition table is known, this will be removed when checked.
def update(self, cell_list, nm):
for offset, uuid, state in cell_list:
node = nm.getNodeByUUID(uuid)
assert node is not None
self.setCell(offset, node, state)
logging.debug('partition table updated')
self.log()
def filled(self): def filled(self):
return self.num_filled_rows == self.np return self.num_filled_rows == self.np
......
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