@staticmethod
    def translate_reservation_from_data(status_text, reservation_id, position, time, initial_configuration, end_data, url, finished, initial_data, remote_reservation_id):
        if status_text == Reservation.WAITING:
            reservation = WaitingReservation(reservation_id, position)
        elif status_text == Reservation.WAITING_CONFIRMATION:
            reservation = WaitingConfirmationReservation(reservation_id, url)
        elif status_text == Reservation.WAITING_INSTANCES:
            reservation = WaitingInstances(reservation_id, position)
        elif status_text == Reservation.CONFIRMED:
            reservation = ConfirmedReservation(reservation_id, time, initial_configuration, url, remote_reservation_id)
        elif status_text == Reservation.POST_RESERVATION:
            reservation = PostReservationReservation(reservation_id, finished, initial_data, end_data)
        else:
            raise InvalidReservationStatusError("Invalid reservation status_text: '%s'." % ( status_text ) )
        return reservation

    # XXX TODO: a new state would be required, but I don't have to deal with that
dataset/ETHPy150Open weblabdeusto/weblabdeusto/server/src/weblab/core/reservations.py/Reservation.translate_reservation_from_data/original