def _get_splunk(profile):
 config = __salt__['config.option'](profile)
 key = 'splunk_search.{0}:{1}:{2}:{3}'.format(config.get('host'), config.get('port'), config.get('username'), config.get('password'))
 if (key not in __context__):
  __context__[key] = splunklib.client.connect(host=config.get('host'), port=config.get('port'), username=config.get('username'), password=config.get('password'))
 return __context__[key]

def _get_splunk ( profile ) : config = __salt__ [ 'config.option' ] ( profile ) key = 'splunk_search.{0}:{1}:{2}:{3}' . format ( config . get ( 'host' ) , config . get ( 'port' ) , config . get ( 'username' ) , config . get ( 'password' ) ) if ( key not in __context__ ) : __context__ [ key ] = splunklib . client . connect ( host = config . get ( 'host' ) , port = config . get ( 'port' ) , username = config . get ( 'username' ) , password = config . get ( 'password' ) ) return __context__ [ key ]
return the splunk client .