コード例 #1
0
ファイル: operations.py プロジェクト: pferreir/indico-backup
    def queryRoom(cls, booking, roomId):
        """ Searches for room information via the admin api's getRoom function and the
            user api's search function (currently the admin api's getRoom is not reliable
            to retrieve name, description and groupName).
            Tries to find the room providing the extension as query (since only
            the room name and extension are checked by the search op).
            Returns None if not found
        """
        confId = booking.getConference().getId()
        bookingId = booking.getId()

        roomId = booking.getRoomId()

        try:
            adminApiRoom = AdminApi.getRoom(roomId)
        except WebFault, e:
            faultString = e.fault.faultstring
            if faultString.startswith('Room not found for roomID'):
                return VidyoError("unknownRoom", "checkStatus")
            else:
                Logger.get('Vidyo').exception("""Evt:%s, booking:%s, Admin API's getRoom operation got WebFault: %s""" %
                            (confId, bookingId, e.fault.faultstring))
                raise
コード例 #2
0
    def queryRoom(cls, booking, roomId):
        """ Searches for room information via the admin api's getRoom function and the
            user api's search function (currently the admin api's getRoom is not reliable
            to retrieve name, description and groupName).
            Tries to find the room providing the extension as query (since only
            the room name and extension are checked by the search op).
            Returns None if not found
        """
        confId = booking.getConference().getId()
        bookingId = booking.getId()

        roomId = booking.getRoomId()

        try:
            adminApiRoom = AdminApi.getRoom(roomId)
        except WebFault, e:
            faultString = e.fault.faultstring
            if faultString.startswith('Room not found for roomID'):
                return VidyoError("unknownRoom", "checkStatus")
            else:
                Logger.get('Vidyo').exception(
                    """Evt:%s, booking:%s, Admin API's getRoom operation got WebFault: %s"""
                    % (confId, bookingId, e.fault.faultstring))
                raise
コード例 #3
0
ファイル: operations.py プロジェクト: pferreir/indico-backup
                        return VidyoError("PINLength", "modify")

                else:
                    Logger.get('Vidyo').exception("""Evt:%s, booking:%s, Admin API's updateRoom operation got WebFault: %s""" %
                                    (confId, bookingId, e.fault.faultstring))
                    raise

        #if we could not create the room, the owner did not have any Vidyo accounts
        if not roomModified and loginToUse == len(possibleLogins):
            return VidyoError("badOwner", "modify")


        # we retrieve the just created room; we need to do this because Vidyo will have
        # added extra data like the room id, the url
        try:
            modifiedRoom = AdminApi.getRoom(roomId)
        except WebFault, e:
            faultString = e.fault.faultstring
            if faultString.startswith('Room not found for roomID'):
                return VidyoError("unknownRoom", "modify")
            else:
                Logger.get('Vidyo').exception("""Evt:%s, booking:%s, Admin API's getRoom operation got WebFault: %s""" %
                            (confId, bookingId, e.fault.faultstring))
                raise

        return modifiedRoom

    @classmethod
    def setAutomute(cls, booking):
        confId = booking.getConference().getId()
        bookingId = booking.getId()
コード例 #4
0
ファイル: operations.py プロジェクト: vstitches/indico
                        loginToUse = loginToUse + 1

                else:
                    Logger.get('Vidyo').exception("""Evt:%s, booking:%s, Admin API's updateRoom operation got WebFault: %s""" %
                                    (confId, bookingId, e.fault.faultstring))
                    raise

        #if we could not create the room, the owner did not have any Vidyo accounts
        if not roomModified and loginToUse == len(possibleLogins):
            return VidyoError("badOwner", "modify")


        # we retrieve the just created room; we need to do this because Vidyo will have
        # added extra data like the room id, the url
        try:
            modifiedRoom = AdminApi.getRoom(roomId, confId, bookingId)
        except WebFault, e:
            faultString = e.fault.faultstring
            if faultString.startswith('Room not found for roomID'):
                return VidyoError("unknownRoom", "modify")
            else:
                Logger.get('Vidyo').exception("""Evt:%s, booking:%s, Admin API's getRoom operation got WebFault: %s""" %
                            (confId, bookingId, e.fault.faultstring))
                raise

        return modifiedRoom

    @classmethod
    def setAutomute(cls, booking):
        confId = booking.getConference().getId()
        bookingId = booking.getId()
コード例 #5
0
                    return VidyoError("PINLength", "modify")

                else:
                    Logger.get('Vidyo').exception(
                        """Evt:%s, booking:%s, Admin API's updateRoom operation got WebFault: %s"""
                        % (confId, bookingId, e.fault.faultstring))
                    raise

        #if we could not create the room, the owner did not have any Vidyo accounts
        if not roomModified and loginToUse == len(possibleLogins):
            return VidyoError("badOwner", "modify")

        # we retrieve the just created room; we need to do this because Vidyo will have
        # added extra data like the room id, the url
        try:
            modifiedRoom = AdminApi.getRoom(roomId)
        except WebFault, e:
            faultString = e.fault.faultstring
            if faultString.startswith('Room not found for roomID'):
                return VidyoError("unknownRoom", "modify")
            else:
                Logger.get('Vidyo').exception(
                    """Evt:%s, booking:%s, Admin API's getRoom operation got WebFault: %s"""
                    % (confId, bookingId, e.fault.faultstring))
                raise

        return modifiedRoom

    @classmethod
    def setAutomute(cls, booking):
        confId = booking.getConference().getId()
コード例 #6
0
ファイル: operations.py プロジェクト: arturodr/indico
                        loginToUse = loginToUse + 1

                else:
                    Logger.get('Vidyo').exception(
                        """Evt:%s, booking:%s, Admin API's updateRoom operation got WebFault: %s"""
                        % (confId, bookingId, e.fault.faultstring))
                    raise

        #if we could not create the room, the owner did not have any Vidyo accounts
        if not roomModified and loginToUse == len(possibleLogins):
            return VidyoError("badOwner", "modify")

        # we retrieve the just created room; we need to do this because Vidyo will have
        # added extra data like the room id, the url
        try:
            modifiedRoom = AdminApi.getRoom(roomId, confId, bookingId)
        except WebFault, e:
            faultString = e.fault.faultstring
            if faultString.startswith('Room not found for roomID'):
                return VidyoError("unknownRoom", "modify")
            else:
                Logger.get('Vidyo').exception(
                    """Evt:%s, booking:%s, Admin API's getRoom operation got WebFault: %s"""
                    % (confId, bookingId, e.fault.faultstring))
                raise

        return modifiedRoom

    @classmethod
    def setAutomute(cls, booking):
        confId = booking.getConference().getId()