def _get_top_file_envs():
 try:
  return __context__['saltutil._top_file_envs']
 except KeyError:
  try:
   st_ = salt.state.HighState(__opts__)
   top = st_.get_top()
   if top:
    envs = (list(st_.top_matches(top).keys()) or 'base')
   else:
    envs = 'base'
  except SaltRenderError as exc:
   raise CommandExecutionError('Unable to render top file(s): {0}'.format(exc))
  __context__['saltutil._top_file_envs'] = envs
  return envs

def _get_top_file_envs ( ) : try : return __context__ [ 'saltutil._top_file_envs' ] except KeyError : try : st_ = salt . state . HighState ( __opts__ ) top = st_ . get_top ( ) if top : envs = ( list ( st_ . top_matches ( top ) . keys ( ) ) or 'base' ) else : envs = 'base' except SaltRenderError as exc : raise CommandExecutionError ( 'Unable to render top file(s): {0}' . format ( exc ) ) __context__ [ 'saltutil._top_file_envs' ] = envs return envs
get all environments from the top file .