#NEWLINE# def _resolve_user_group_names( opts ) : #NEWLINE# #INDENT# '\n    Resolve user and group names in related opts\n    ' #NEWLINE# name_id_opts = { #NEWLINE# #INDENT# 'uid' : 'user.info' , #NEWLINE# 'gid' : 'group.info' , #NEWLINE# #UNINDENT# } #NEWLINE# for ( ind , opt ) in enumerate ( opt ) : #NEWLINE# #INDENT# if ( opt . split ( '=' ) [ 0 ] in name_id_opts ) : #NEWLINE# #INDENT# _givenid = opt . split ( '=' ) [ 1 ] #NEWLINE# _param = opt . split ( '=' ) [ 0 ] #NEWLINE# _id = _givenid #NEWLINE# if ( not re . match ( '[0-9]+$' , _givenid ) ) : #NEWLINE# #INDENT# _info = __salt__ [ name_id_opts [ _param ] ] ( _givenid ) #NEWLINE# if ( _info and ( _param in _info ) ) : #NEWLINE# #INDENT# _id = _info [ _param ] #NEWLINE# #UNINDENT# #UNINDENT# opts [ ind ] = ( ( _param + '=' ) + str ( _id ) ) #NEWLINE# #UNINDENT# #UNINDENT# return opts