def core_status(host=None, core_name=None):
 ret = _get_return_dict()
 if (not _check_for_cores()):
  err = ['solr.reload_core can only be called by "multi-core" minions']
  return ret.update({'success': False, 'errors': err})
 if ((_get_none_or_value(core_name) is None) and _check_for_cores()):
  success = True
  for name in __opts__['solr.cores']:
   resp = reload_core(host, name)
   if (not resp['success']):
    success = False
   data = {name: {'data': resp['data']}}
   ret = _update_return_dict(ret, success, data, resp['errors'], resp['warnings'])
  return ret
 extra = ['action=STATUS', 'core={0}'.format(core_name)]
 url = _format_url('admin/cores', host=host, core_name=None, extra=extra)
 return _http_request(url)

def core_status ( host = None , core_name = None ) : ret = _get_return_dict ( ) if ( not _check_for_cores ( ) ) : err = [ 'solr.reload_core can only be called by "multi-core" minions' ] return ret . update ( { 'success' : False , 'errors' : err } ) if ( ( _get_none_or_value ( core_name ) is None ) and _check_for_cores ( ) ) : success = True for name in __opts__ [ 'solr.cores' ] : resp = reload_core ( host , name ) if ( not resp [ 'success' ] ) : success = False data = { name : { 'data' : resp [ 'data' ] } } ret = _update_return_dict ( ret , success , data , resp [ 'errors' ] , resp [ 'warnings' ] ) return ret extra = [ 'action=STATUS' , 'core={0}' . format ( core_name ) ] url = _format_url ( 'admin/cores' , host = host , core_name = None , extra = extra ) return _http_request ( url )
multi-core hosts only get the status for a given core or all cores if no core is specified host : str the solr host to query .