@decorators.which('blkid')
def blkid(device=None):
 args = ''
 if device:
  args = (' ' + device)
 ret = {}
 blkid_result = __salt__['cmd.run_all'](('blkid' + args), python_shell=False)
 if (blkid_result['retcode'] > 0):
  return ret
 for line in blkid_result['stdout'].splitlines():
  if (not line):
   continue
  comps = line.split()
  device = comps[0][:(-1)]
  info = {}
  device_attributes = re.split('"*"', line.partition(' ')[2])
  for (key, value) in zip(*([iter(device_attributes)] * 2)):
   key = key.strip('=').strip(' ')
   info[key] = value.strip('"')
  ret[device] = info
 return ret

@ decorators . which ( 'blkid' ) def blkid ( device = None ) : args = '' if device : args = ( ' ' + device ) ret = { } blkid_result = __salt__ [ 'cmd.run_all' ] ( ( 'blkid' + args ) , python_shell = False ) if ( blkid_result [ 'retcode' ] > 0 ) : return ret for line in blkid_result [ 'stdout' ] . splitlines ( ) : if ( not line ) : continue comps = line . split ( ) device = comps [ 0 ] [ : ( - 1 ) ] info = { } device_attributes = re . split ( '"*"' , line . partition ( ' ' ) [ 2 ] ) for ( key , value ) in zip ( * ( [ iter ( device_attributes ) ] * 2 ) ) : key = key . strip ( '=' ) . strip ( ' ' ) info [ key ] = value . strip ( '"' ) ret [ device ] = info return ret
return block device attributes: uuid .