Change method _sort_key_for to static
This method does not reference to any attribute of this class, so it's better to change it to classstatic. Change-Id: I3ea0ca83cb29ceae9afb20da0c9817a9b044c084 Signed-off-by: Lin Yang <lin.a.yang@intel.com>
This commit is contained in:
parent
f35cd631e3
commit
72385a6981
@ -931,7 +931,8 @@ class RingBuilder(object):
|
||||
del dev['sort_key']
|
||||
del dev['tiers']
|
||||
|
||||
def _sort_key_for(self, dev):
|
||||
@staticmethod
|
||||
def _sort_key_for(dev):
|
||||
return (dev['parts_wanted'], random.randint(0, 0xFFFF), dev['id'])
|
||||
|
||||
def _build_max_replicas_by_tier(self):
|
||||
|
Loading…
Reference in New Issue
Block a user