Ejemplo n.º 1
0
    def fetch_sla(self, schedule_id):
        """Fetch SLA command, intended to make the request to Azkaban and treat the response properly.

        This method makes the fetch SLA request to fetch and evaluates the response.
        """

        self.__check_if_logged()

        response = api.fetch_sla_request(self.__session, self.__host,
                                         self.__session_id, schedule_id)

        self.__catch_response_error(response, FetchSLAError)

        response_json = response.json()
        return response_json
Ejemplo n.º 2
0
    def fetch_sla(self, schedule_id):
        """
        Fetch SLA command, intended to make the request to Azkaban and treat the response properly.
        Given a schedule id, this API call fetches the SLA.

        :param str schedule_id: Schedule ID on Azkaban (Find on fetch_schedule)
        """

        self.__check_if_logged()

        response = api.fetch_sla_request(self.__session, self.__host,
                                         self.__session_id, schedule_id)

        self.__catch_response_error(response, FetchSLAError)

        response_json = response.json()
        return response_json