@staticmethod
    def translate_reservation(status):
        if status.status == WSS.WebLabSchedulingStatus.WAITING:
            reservation = WaitingReservation(status.reservation_id, status.position)
        elif status.status == WSS.WebLabSchedulingStatus.WAITING_CONFIRMATION:
            reservation = WaitingConfirmationReservation(status.reservation_id, status.url)
        elif status.status == WSS.WebLabSchedulingStatus.RESERVED_REMOTE:
            reservation = ConfirmedReservation(status.reservation_id, status.remaining_time, status.initial_configuration, status.url, status.remote_reservation_id)
        elif status.status == WSS.WebLabSchedulingStatus.RESERVED_LOCAL:
            reservation = ConfirmedReservation(status.reservation_id, status.remaining_time, status.initial_configuration, status.url, "")
        elif status.status == WSS.WebLabSchedulingStatus.WAITING_INSTANCES:
            reservation = WaitingInstances(status.reservation_id, status.position)
        elif status.status == WSS.WebLabSchedulingStatus.POST_RESERVATION:
            reservation = PostReservationReservation(status.reservation_id, status.finished, status.initial_data, status.end_data)
        else:
            raise InvalidReservationStatusError( "Invalid reservation status.status: '%s'" % status.status)
        return reservation
dataset/ETHPy150Open weblabdeusto/weblabdeusto/server/src/weblab/core/reservations.py/Reservation.translate_reservation/original