finish raid screen
This commit is contained in:
@@ -258,6 +258,16 @@ p_node - xml node (parent node) '''
|
||||
if r.device == dev:
|
||||
return r.size
|
||||
|
||||
@staticmethod
|
||||
def get_next_device():
|
||||
''' get next available raid device name '''
|
||||
num_p = re.compile(r'md(\d+)')
|
||||
numbers = [ int(num_p.match(r.device).groups()[0]) for r in Raid.list ]
|
||||
max = 0
|
||||
for n in numbers:
|
||||
if n > max: max = n
|
||||
return 'md%d' %(max+1)
|
||||
|
||||
class MountPoint:
|
||||
''' mount-points '''
|
||||
list=[]
|
||||
|
||||
Reference in New Issue
Block a user