mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Merge pull request #1203 from kadel/develop
more generic way to do raid.list
This commit is contained in:
commit
bfc4fe7ee3
@ -30,15 +30,12 @@ def list():
|
||||
if ' ' not in line:
|
||||
continue
|
||||
comps = line.split()
|
||||
metadata = comps[2].split('=')
|
||||
raidname = comps[3].split('=')
|
||||
raiduuid = comps[4].split('=')
|
||||
ret[comps[1]] = {
|
||||
'device': comps[1],
|
||||
'metadata': metadata[1],
|
||||
'name': raidname[1],
|
||||
'uuid': raiduuid[1],
|
||||
}
|
||||
device = comps[1]
|
||||
ret[device] = {"device": device}
|
||||
for comp in comps[2:]:
|
||||
key = comp.split('=')[0].lower()
|
||||
value = comp.split('=')[1]
|
||||
ret[device][key] = value
|
||||
return ret
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user