コード例 #1
0
ファイル: host.py プロジェクト: mittal201/fabric-ansible
    def delete(self, worker_api):
        """ Delete a host instance

        :param id: id of the host to delete
        :return:
        """

        cleanup_host(worker_api)
        return True
コード例 #2
0
    def delete(self, daemon_url):
        """ Delete a host instance

        :param id: id of the host to delete
        :return:
        """

        cleanup_host(daemon_url)
        return True
コード例 #3
0
ファイル: host.py プロジェクト: zhmz1326/cello
    def delete(self, worker_api):
        """ Delete a host instance

        :param id: id of the host to delete
        :return:
        """

        cleanup_host(worker_api)
        return True
コード例 #4
0
ファイル: host.py プロジェクト: feihujiang/cello
    def delete(self, id):
        """ Delete a host instance

        :param id: id of the host to delete
        :return:
        """
        logger.debug("Delete a host with id={0}".format(id))

        h = self.get_by_id(id)
        if not h:
            logger.warning("Cannot delete non-existed host")
            return False
        if h.get("clusters", ""):
            logger.warning("There are clusters on that host, cannot delete.")
            return False
        cleanup_host(h.get("daemon_url"))
        self.col.delete_one({"id": id})
        return True
コード例 #5
0
    def delete(self, id):
        """ Delete a host instance

        :param id: id of the host to delete
        :return:
        """
        logger.debug("Delete a host with id={0}".format(id))

        h = self.get_by_id(id)
        if not h:
            logger.warning("Cannot delete non-existed host")
            return False
        if h.get("clusters", ""):
            logger.warning("There are clusters on that host, cannot delete.")
            return False
        cleanup_host(h.get("daemon_url"))
        self.col.delete_one({"id": id})
        return True