Beispiel #1
0
 def handle_update_note(self, req):
     update = DataSourceUpdateEntry.get_by_id(req.POST['id'])
     if not update:
         raise exc.HTTPGone()
     update.note = req.POST['value']
     meta.Session.commit()
     return {'value': update.note}
Beispiel #2
0
 def handle_update_note(self, req):
     wuid = req.POST['id']
     update = WorkbookUpdateEntry.get_by_id(wuid)
     if not update:
         raise exc.HTTPGone()
     update.note = req.POST['value']
     meta.Session.commit()
     return {'value': update.note}
Beispiel #3
0
def code2exception(code, detail):
    """Transforms a code + detail into a WebOb exception"""
    if code == 400:
        return exc.HTTPBadRequest(detail)
    if code == 401:
        return exc.HTTPUnauthorized(detail)
    if code == 402:
        return exc.HTTPPaymentRequired(detail)
    if code == 403:
        return exc.HTTPForbidden(detail)
    if code == 404:
        return exc.HTTPNotFound(detail)
    if code == 405:
        return exc.HTTPMethodNotAllowed(detail)
    if code == 406:
        return exc.HTTPNotAcceptable(detail)
    if code == 407:
        return exc.HTTPProxyAuthenticationRequired(detail)
    if code == 408:
        return exc.HTTPRequestTimeout(detail)
    if code == 409:
        return exc.HTTPConflict(detail)
    if code == 410:
        return exc.HTTPGone(detail)
    if code == 411:
        return exc.HTTPLengthRequired(detail)
    if code == 412:
        return exc.HTTPPreconditionFailed(detail)
    if code == 413:
        return exc.HTTPRequestEntityTooLarge(detail)
    if code == 414:
        return exc.HTTPRequestURITooLong(detail)
    if code == 415:
        return exc.HTTPUnsupportedMediaType(detail)
    if code == 416:
        return exc.HTTPRequestRangeNotSatisfiable(detail)
    if code == 417:
        return exc.HTTPExpectationFailed(detail)
    if code == 500:
        return exc.HTTPInternalServerError(detail)
    if code == 501:
        return exc.HTTPNotImplemented(detail)
    if code == 502:
        return exc.HTTPBadGateway(detail)
    if code == 503:
        return exc.HTTPServiceUnavailable(detail)
    if code == 504:
        return exc.HTTPGatewayTimeout(detail)
    if code == 505:
        return exc.HTTPVersionNotSupported(detail)

    raise NotImplementedError(code)
Beispiel #4
0
 def update(self, req, id, body):
     """Configure cloudpipe parameters for the project."""
     raise exc.HTTPGone()
Beispiel #5
0
 def index(self, req):
     """List running cloudpipe instances."""
     raise exc.HTTPGone()
 def info(self, req):
     raise exc.HTTPGone()
Beispiel #7
0
 def create(self, req, body):
     raise exc.HTTPGone()
Beispiel #8
0
 def _disassociate_host_and_project(self, req, id, body):
     raise exc.HTTPGone()
 def show(self, req, id):
     raise exc.HTTPGone()
Beispiel #10
0
 def index(self, req):
     raise exc.HTTPGone()
 def _associate_host(self, req, id, body):
     raise exc.HTTPGone()
 def _disassociate_project_only(self, req, id, body):
     raise exc.HTTPGone()
 def sync_instances(self, req, body):
     raise exc.HTTPGone()
 def capacities(self, req, id=None):
     raise exc.HTTPGone()
Beispiel #15
0
 def index(self, req, server_id):
     raise exc.HTTPGone()
Beispiel #16
0
 def _reset_network(self, req, id, body):
     """(Removed) Permit admins to reset networking on a server."""
     raise exc.HTTPGone()
Beispiel #17
0
 def create(self, req, server_id, body):
     raise exc.HTTPGone()
Beispiel #18
0
 def update(self, req, id, body):
     raise exc.HTTPGone()
Beispiel #19
0
 def show(self, req, server_id, id):
     raise exc.HTTPGone()
 def unreserve(self, req, id, body):
     raise exc.HTTPGone()
Beispiel #21
0
 def delete(self, req, server_id, id):
     raise exc.HTTPGone()
Beispiel #22
0
 def delete(self, req, id):
     raise exc.HTTPGone()
Beispiel #23
0
    def create(self, req, body):
        """Create a new cloudpipe instance, if none exists.

        Parameters: {cloudpipe: {'project_id': ''}}
        """
        raise exc.HTTPGone()
Beispiel #24
0
 def add(self, req, body):
     raise exc.HTTPGone()
 def detail(self, req):
     raise exc.HTTPGone()