def get_all_stats():
 all_stats = {}
 secret = appscale_info.get_secret()
 logging.debug('Retrieved deployment secret: {}'.format(secret))
 for ip in appscale_info.get_all_ips():
  appcontroller_endpoint = 'https://{}:{}'.format(ip, hermes_constants.APPCONTROLLER_PORT)
  logging.debug('Connecting to AC at: {}'.format(appcontroller_endpoint))
  server = SOAPpy.SOAPProxy(appcontroller_endpoint)
  try:
   all_stats[ip] = json.loads(server.get_all_stats(secret))
  except SOAPpy.SOAPException as soap_exception:
   logging.exception('Exception while performing SOAP call to {}'.format(appcontroller_endpoint))
   logging.exception(soap_exception)
   all_stats[ip] = {JSONTags.ERROR: JSONTags.UNREACHABLE}
  except socket_error as serr:
   logging.error('Socket error while performing SOAP call to {}'.format(appcontroller_endpoint))
   logging.error(serr)
   all_stats[ip] = {JSONTags.ERROR: JSONTags.UNREACHABLE}
 return all_stats

def get_all_stats ( ) : all_stats = { } secret = appscale_info . get_secret ( ) logging . debug ( 'Retrieved deployment secret: {}' . format ( secret ) ) for ip in appscale_info . get_all_ips ( ) : appcontroller_endpoint = 'https://{}:{}' . format ( ip , hermes_constants . APPCONTROLLER_PORT ) logging . debug ( 'Connecting to AC at: {}' . format ( appcontroller_endpoint ) ) server = SOAPpy . SOAPProxy ( appcontroller_endpoint ) try : all_stats [ ip ] = json . loads ( server . get_all_stats ( secret ) ) except SOAPpy . SOAPException as soap_exception : logging . exception ( 'Exception while performing SOAP call to {}' . format ( appcontroller_endpoint ) ) logging . exception ( soap_exception ) all_stats [ ip ] = { JSONTags . ERROR : JSONTags . UNREACHABLE } except socket_error as serr : logging . error ( 'Socket error while performing SOAP call to {}' . format ( appcontroller_endpoint ) ) logging . error ( serr ) all_stats [ ip ] = { JSONTags . ERROR : JSONTags . UNREACHABLE } return all_stats
collects platform stats from all deployment nodes .