parameters: ()
return_statement: return daemons
docstring: Retrieve RGW daemon info from MGR.
docstring_summary: Retrieve RGW daemon info from MGR.
docstring_tokens: Retrieve RGW daemon info from MGR .
function: def _get_daemons() -> Dict[str, RgwDaemon]:
      """
      Retrieve RGW daemon info from MGR.
      """
      service_map = mgr.get('service_map')
      if not dict_contains_path(service_map, ['services', 'rgw', 'daemons']):
          raise NoRgwDaemonsException
  
      daemons = {}
      daemon_map = service_map['services']['rgw']['daemons']
      for key in daemon_map.keys():
          if dict_contains_path(daemon_map[key], ['metadata', 'frontend_config#0']):
              daemon = _determine_rgw_addr(daemon_map[key])
              daemon.name = daemon_map[key]['metadata']['id']
              daemon.realm_name = daemon_map[key]['metadata']['realm_name']
              daemon.zonegroup_name = daemon_map[key]['metadata']['zonegroup_name']
              daemon.zone_name = daemon_map[key]['metadata']['zone_name']
              daemons[daemon.name] = daemon
              logger.info('Found RGW daemon with configuration: host=%s, port=%d, ssl=%s',
                          daemon.host, daemon.port, str(daemon.ssl))
      if not daemons:
          raise NoRgwDaemonsException
  
      return daemons
function_tokens: def _get_daemons ( ) -> Dict [ str , RgwDaemon ] : service_map = mgr . get ( 'service_map' ) if not dict_contains_path ( service_map , [ 'services' , 'rgw' , 'daemons' ] ) : raise NoRgwDaemonsException daemons = { } daemon_map = service_map [ 'services' ] [ 'rgw' ] [ 'daemons' ] for key in daemon_map . keys ( ) : if dict_contains_path ( daemon_map [ key ] , [ 'metadata' , 'frontend_config#0' ] ) : daemon = _determine_rgw_addr ( daemon_map [ key ] ) daemon . name = daemon_map [ key ] [ 'metadata' ] [ 'id' ] daemon . realm_name = daemon_map [ key ] [ 'metadata' ] [ 'realm_name' ] daemon . zonegroup_name = daemon_map [ key ] [ 'metadata' ] [ 'zonegroup_name' ] daemon . zone_name = daemon_map [ key ] [ 'metadata' ] [ 'zone_name' ] daemons [ daemon . name ] = daemon logger . info ( 'Found RGW daemon with configuration: host=%s, port=%d, ssl=%s' , daemon . host , daemon . port , str ( daemon . ssl ) ) if not daemons : raise NoRgwDaemonsException return daemons