def get_indices(client):
 try:
  indices = list(client.indices.get_settings(index='_all', params={'expand_wildcards': 'open,closed'}))
  version_number = get_version(client)
  logger.debug('Detected Elasticsearch version {0}'.format('.'.join(map(str, version_number))))
  if ((version_number >= (2, 4, 2)) and (version_number < (5, 0, 0))):
   logger.debug('Using Elasticsearch >= 2.4.2 < 5.0.0')
   if client.indices.exists(index='.security'):
    logger.debug('Found the ".security" index.  Adding to list of all indices')
    if (not ('.security' in indices)):
     indices.append('.security')
  logger.debug('All indices: {0}'.format(indices))
  return indices
 except Exception as e:
  raise FailedExecution('Failed to get indices. Error: {0}'.format(e))

def get_indices ( client ) : try : indices = list ( client . indices . get_settings ( index = '_all' , params = { 'expand_wildcards' : 'open,closed' } ) ) version_number = get_version ( client ) logger . debug ( 'Detected Elasticsearch version {0}' . format ( '.' . join ( map ( str , version_number ) ) ) ) if ( ( version_number >= ( 2 , 4 , 2 ) ) and ( version_number < ( 5 , 0 , 0 ) ) ) : logger . debug ( 'Using Elasticsearch >= 2.4.2 < 5.0.0' ) if client . indices . exists ( index = '.security' ) : logger . debug ( 'Found the ".security" index.  Adding to list of all indices' ) if ( not ( '.security' in indices ) ) : indices . append ( '.security' ) logger . debug ( 'All indices: {0}' . format ( indices ) ) return indices except Exception as e : raise FailedExecution ( 'Failed to get indices. Error: {0}' . format ( e ) )
get the current list of indices from the cluster .