Commit aa48adf9 authored by Julien Muchembled's avatar Julien Muchembled

PartitionTable: rename getAssignedPartitionList to getReadableOffsetList

parent fa581be5
...@@ -118,7 +118,7 @@ class PartitionTable(object): ...@@ -118,7 +118,7 @@ class PartitionTable(object):
added_list.append(node) added_list.append(node)
return added_list return added_list
def getAssignedPartitionList(self, uuid): def getReadableOffsetList(self, uuid):
""" Return the partition assigned to the specified UUID """ """ Return the partition assigned to the specified UUID """
assigned_partitions = [] assigned_partitions = []
for offset in xrange(self.np): for offset in xrange(self.np):
......
...@@ -163,7 +163,7 @@ class ClientOperationHandler(BaseHandler): ...@@ -163,7 +163,7 @@ class ClientOperationHandler(BaseHandler):
app = self.app app = self.app
if partition == INVALID_PARTITION: if partition == INVALID_PARTITION:
partition_list = app.pt.getAssignedPartitionList(app.uuid) partition_list = app.pt.getReadableOffsetList(app.uuid)
else: else:
partition_list = [partition] partition_list = [partition]
......
...@@ -82,7 +82,7 @@ class ReplicationTests(NEOThreadedTest): ...@@ -82,7 +82,7 @@ class ReplicationTests(NEOThreadedTest):
if storage.pt is None: if storage.pt is None:
storage.loadPartitionTable() storage.loadPartitionTable()
self.assertEqual(np, storage.pt.getPartitions()) self.assertEqual(np, storage.pt.getPartitions())
for partition in pt.getAssignedPartitionList(storage.uuid): for partition in pt.getReadableOffsetList(storage.uuid):
cell_list = upstream_pt.getCellList(partition, readable=True) cell_list = upstream_pt.getCellList(partition, readable=True)
source = source_dict[random.choice(cell_list).getUUID()] source = source_dict[random.choice(cell_list).getUUID()]
self.checkPartitionReplicated(source, storage, partition, **kw) self.checkPartitionReplicated(source, storage, partition, **kw)
......
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