#NEWLINE# def check_minions( self , expr , expr_form = 'glob' , delimiter = DEFAULT_TARGET_DELIM , greedy = True ) : #NEWLINE# #INDENT# "\n        Check the passed regex against the available minions' public keys\n        stored for authentication. This should return a set of ids which\n        match the regex, this will then be used to parse the returns to\n        make sure everyone has checked back in.\n        " #NEWLINE# try : #NEWLINE# #INDENT# check_func = getattr ( self , '_check_{0}_minions' . format ( expr_form ) , None ) #NEWLINE# if ( expr_form in ( 'grain' , 'grain_pcre' , 'pillar' , 'pillar_pcre' , 'pillar_exact' , 'compound' , 'compound_pillar_exact' ) ) : #NEWLINE# #INDENT# minions = check_func ( expr , delimiter , greedy ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# minions = check_func ( self , greedy ) #NEWLINE# #UNINDENT# #UNINDENT# except Exception : #NEWLINE# #INDENT# log . exception ( 'Failed matching available minions with {0} pattern: {1}' . format ( expr_form , expr ) ) #NEWLINE# minions = [ ] #NEWLINE# #UNINDENT# return minions