#NEWLINE# def mddisplay( names = None ) : #NEWLINE# #INDENT# mdnames = ( names or get_mdnames ( ) ) #NEWLINE# mds = [ ] #NEWLINE# for mdname in mdnames : #NEWLINE# #INDENT# md = { #NEWLINE# #INDENT# 'name' : md , #NEWLINE# #UNINDENT# } #NEWLINE# try : #NEWLINE# #INDENT# output = utils . execute ( 'mdadm' , '--detail' , mdname , check_exit_code = [ 0 ] ) [ 0 ] #NEWLINE# LOG . debug ( 'mdadm --detail %s output:\n%s' , mdname , output ) #NEWLINE# md . update ( mddetail_parse ( output ) ) #NEWLINE# #UNINDENT# except errors . ProcessExecutionError as exc : #NEWLINE# #INDENT# LOG . debug ( exc ) #NEWLINE# continue #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# mds . append ( md ) #NEWLINE# #UNINDENT# #UNINDENT# LOG . debug ( 'Found md devices: {0}' . format ( mds ) ) #NEWLINE# return mds