Exemple #1
0
    def _generate(self, lim):
        for i in xrange(0, 10):
            if i == lim:
                raise InvalidObject("cut at %d" % i)
            yield ["row", i]

        if i == lim:
            raise InvalidObject("cut at %d" % i)
Exemple #2
0
    def get(self, lim, etag):
        if etag:
            response.headers["ETag"] = '"%s"' % etag

        if lim == 0:
            raise InvalidObject("cut at 0")

        return self._generate(lim)
Exemple #3
0
from WMCore.REST.Error import NoSuchInstance
from WMCore.REST.Error import DatabaseError
from WMCore.REST.Error import DatabaseUnavailable
from WMCore.REST.Error import DatabaseConnectionError
from WMCore.REST.Error import DatabaseExecutionError
from WMCore.REST.Error import MissingParameter
from WMCore.REST.Error import InvalidParameter
from WMCore.REST.Error import MissingObject
from WMCore.REST.Error import TooManyObjects
from WMCore.REST.Error import ObjectAlreadyExists
from WMCore.REST.Error import InvalidObject
from WMCore.REST.Error import ExecutionError
RESTError()
NotAcceptable()
UnsupportedMethod()
MethodWithoutQueryString()
APIMethodMismatch()
APINotSpecified()
NoSuchInstance()
DatabaseError()
DatabaseUnavailable()
DatabaseConnectionError()
DatabaseExecutionError()
MissingParameter()
InvalidParameter()
MissingObject()
TooManyObjects()
ObjectAlreadyExists()
InvalidObject()
ExecutionError()