#NEWLINE# def targets( self , tgt , tgt_type ) : #NEWLINE# #INDENT# "\n        Return a dict of {'id': {'ipv4': <ipaddr>}} data sets to be used as\n        targets given the passed tgt and tgt_type\n        " #NEWLINE# targets = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for back in self . _gen_back ( ) : #NEWLINE# #INDENT# f_str = '{0}.targets' . format ( back ) #NEWLINE# if ( f_str not in self . rosters ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# targets . update ( self . rosters [ f_str ] ( tgt , tgt_type ) ) #NEWLINE# #UNINDENT# except salt . exceptions . SaltRenderError as exc : #NEWLINE# #INDENT# log . error ( 'Unable to render roster file: {0}' . format ( exc ) ) #NEWLINE# #UNINDENT# except IOError as exc : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# #UNINDENT# if ( not targets ) : #NEWLINE# #INDENT# raise salt . exceptions . SaltSystemExit ( 'No hosts found with target {0} of type {1}' . format ( tgt , tgt_type ) ) #NEWLINE# #UNINDENT# log . debug ( 'Matched minions: {0}' . format ( targets ) ) #NEWLINE# return tgt_type