Ejemplo n.º 1
0
  def _update_projects(self, project_ids):
    """ Watches for changes to list of existing projects.

    Args:
      project_ids: A list of strings specifying current project IDs.
    """
    persistent_update_projects = retry_children_watch_coroutine(
      '/appscale/projects', self._update_projects_sync)
    IOLoop.instance().add_callback(persistent_update_projects, project_ids)
Ejemplo n.º 2
0
    def _update_certs(self, cert_nodes):
        """ Updates the list of certificates.

        Args:
            cert_nodes: A list of strings specifying certificate nodes.
        """
        persistent_update_certs = retry_children_watch_coroutine(
            self._certs_node, self._update_certs_sync)
        IOLoop.instance().add_callback(persistent_update_certs, cert_nodes)
Ejemplo n.º 3
0
    def _update_certs(self, cert_nodes):
        """ Updates the list of certificates.

        Args:
            cert_nodes: A list of strings specifying certificate nodes.
        """
        persistent_update_certs = retry_children_watch_coroutine(
            self._certs_node, self._update_certs_sync)
        IOLoop.instance().add_callback(persistent_update_certs, cert_nodes)
Ejemplo n.º 4
0
  def _update_versions_watch(self, versions):
    """ Handles changes to list of registered versions.

    Args:
      versions: A list of strings specifying registered versions.
    """
    persistent_update_versions = retry_children_watch_coroutine(
      VERSION_REGISTRATION_NODE, self._update_versions)
    IOLoop.instance().add_callback(persistent_update_versions, versions)
Ejemplo n.º 5
0
    def _update_versions_watch(self, versions):
        """ Handles changes to list of registered versions.

    Args:
      versions: A list of strings specifying registered versions.
    """
        persistent_update_versions = retry_children_watch_coroutine(
            VERSION_REGISTRATION_NODE, self._update_versions)
        IOLoop.instance().add_callback(persistent_update_versions, versions)
Ejemplo n.º 6
0
  def _update_projects(self, project_ids):
    """ Watches for changes to list of existing projects.

    Args:
      project_ids: A list of strings specifying current project IDs.
    """
    persistent_setup_projects = retry_children_watch_coroutine(
      '/appscale/projects', self._update_projects_sync)
    IOLoop.instance().add_callback(persistent_setup_projects, project_ids)
Ejemplo n.º 7
0
    def _update_apps_watch(self, new_apps_list):
        """ Schedules fetch of new sources if there are any available.

    Args:
      new_apps_list: a list of revisions with archive
        available somewhere in deployment.
    """
        persistent_update_apps = retry_children_watch_coroutine(
            '/apps', self._handle_apps_update)
        main_io_loop = IOLoop.current()
        main_io_loop.add_callback(persistent_update_apps, new_apps_list)
Ejemplo n.º 8
0
  def _update_apps_watch(self, new_apps_list):
    """ Schedules fetch of new sources if there are any available.

    Args:
      new_apps_list: a list of revisions with archive
        available somewhere in deployment.
    """
    persistent_update_apps = retry_children_watch_coroutine(
      '/apps', self._handle_apps_update
    )
    main_io_loop = IOLoop.current()
    main_io_loop.add_callback(persistent_update_apps, new_apps_list)
Ejemplo n.º 9
0
    def _update_projects(self, new_projects):
        """ Handles creation and deletion of projects.

    Since this runs in a separate thread, it doesn't change any state directly.
    Instead, it just acts as a bridge back to the main IO loop.

    Args:
      new_projects: A list of strings specifying all existing project IDs.
    """
        persistent_update_project = retry_children_watch_coroutine(
            '/appscale/projects', self.update_projects)
        main_io_loop = IOLoop.instance()
        main_io_loop.add_callback(persistent_update_project, new_projects)
Ejemplo n.º 10
0
    def _update_projects_watch(self, new_projects_list):
        """ Handles the creation and deletion of projects.

    Since this runs in a separate thread, it doesn't change any state directly.
    Instead, it just acts as a bridge back to the main IO loop.

    Args:
      new_projects_list: A fresh list of strings specifying existing projects.
    """
        persistent_update_project = retry_children_watch_coroutine(
            self.PROJECTS_NODE, self.update_projects)
        main_io_loop = IOLoop.instance()
        main_io_loop.add_callback(persistent_update_project, new_projects_list)
Ejemplo n.º 11
0
  def _update_projects(self, new_projects):
    """ Handles creation and deletion of projects.

    Since this runs in a separate thread, it doesn't change any state directly.
    Instead, it just acts as a bridge back to the main IO loop.

    Args:
      new_projects: A list of strings specifying all existing project IDs.
    """
    persistent_update_project = retry_children_watch_coroutine(
      '/appscale/projects', self.update_projects
    )
    main_io_loop = IOLoop.instance()
    main_io_loop.add_callback(persistent_update_project, new_projects)
Ejemplo n.º 12
0
    def _update_services_watch(self, new_services_list):
        """ Handles the creation and deletion of a project's services.

    Since this runs in a separate thread, it doesn't change any state directly.
    Instead, it just acts as a bridge back to the main IO loop.

    Args:
      new_services_list: A fresh list of strings specifying a project's
        service IDs.
    """
        if self._stopped:
            return False

        persistent_update_services = retry_children_watch_coroutine(
            self.services_node, self.update_services)
        main_io_loop = IOLoop.instance()
        main_io_loop.add_callback(persistent_update_services,
                                  new_services_list)
Ejemplo n.º 13
0
  def _update_services_watch(self, new_services_list):
    """ Handles the creation and deletion of a project's services.

    Since this runs in a separate thread, it doesn't change any state directly.
    Instead, it just acts as a bridge back to the main IO loop.

    Args:
      new_services_list: A fresh list of strings specifying a project's
        service IDs.
    """
    if self._stopped:
      return False

    persistent_update_services = retry_children_watch_coroutine(
      self.services_node, self.update_services
    )
    main_io_loop = IOLoop.instance()
    main_io_loop.add_callback(persistent_update_services, new_services_list)
Ejemplo n.º 14
0
 def update_service_watch(locations):
     persistent_update_service = retry_children_watch_coroutine(
         SERVICE_DETAILS[service_id][0], self._update_service)
     IOLoop.instance().add_callback(persistent_update_service,
                                    service_id, locations)