Exemplo n.º 1
0
 def reset(self, worker_api, host_type='docker'):
     """
     Clean a host's free clusters.
     :param worker_api:
     :param host_type:
     :return:
     """
     return reset_container_host(host_type=host_type, worker_api=worker_api)
Exemplo n.º 2
0
    def reset(self, host_type, daemon_url):
        """
        Clean a host's free clusters.

        :param id: host id
        :return: True or False
        """
        return reset_container_host(host_type=host_type, daemon_url=daemon_url)
Exemplo n.º 3
0
    def reset(self, host_type, worker_api):
        """
        Clean a host's free clusters.

        :param id: host id
        :return: True or False
        """
        return reset_container_host(host_type=host_type, worker_api=worker_api)
Exemplo n.º 4
0
 def reset(self, worker_api, host_type='docker'):
     """
     Clean a host's free clusters.
     :param worker_api:
     :param host_type:
     :return:
     """
     return reset_container_host(host_type=host_type,
                                 worker_api=worker_api)
Exemplo n.º 5
0
    def reset(self, host_type, worker_api):
        """
        Clean a host's free clusters.

        :param id: host id
        :return: True or False
        """
        return reset_container_host(host_type=host_type,
                                    worker_api=worker_api)
Exemplo n.º 6
0
    def reset(self, id):
        """
        Clean a host's free clusters.

        :param id: host id
        :return: True or False
        """
        logger.debug("clean host with id = {}".format(id))
        host = self.get_by_id(id)
        if not host or len(host.get("clusters")) > 0:
            logger.warning("No find resettable host with id ={}".format(id))
            return False
        return reset_container_host(host_type=host.get("type"),
                                    daemon_url=host.get("daemon_url"))
Exemplo n.º 7
0
    def reset(self, id):
        """
        Clean a host's free clusters.

        :param id: host id
        :return: True or False
        """
        logger.debug("clean host with id = {}".format(id))
        host = self.get_by_id(id)
        if not host or len(host.get("clusters")) > 0:
            logger.warning("No find resettable host with id ={}".format(id))
            return False
        return reset_container_host(host_type=host.get("type"),
                                    daemon_url=host.get("daemon_url"))