Bases: swift.proxy.server.Controller
WSGI controller for account requests
HTTP DELETE request handler.
Handler for HTTP GET/HEAD requests.
HTTP POST request handler.
HTTP PUT request handler.
Bases: swift.proxy.server.BaseApplication
WSGI application for the proxy server.
Wraps the BaseApplication.handle_request and logs the request.
Bases: object
Base WSGI application for the proxy server
Get the controller to handle a request.
Parameters: | path – path from request |
---|---|
Returns: | tuple of (controller class, path dictionary) |
Raises : | ValueError (thrown by split_path) id given invalid path |
Entry point for proxy server. Should return a WSGI-style callable (such as webob.Response).
Parameters: | req – webob.Request object |
---|
Bases: swift.proxy.server.Controller
WSGI controller for container requests
HTTP DELETE request handler.
Handler for HTTP GET requests.
Handler for HTTP GET/HEAD requests.
Handler for HTTP HEAD requests.
HTTP POST request handler.
HTTP PUT request handler.
Bases: object
Base WSGI controller class for the proxy
Handler for HTTP GET requests.
Base handler for HTTP GET or HEAD requests.
Parameters: |
|
---|---|
Returns: | webob.Response object |
Handler for HTTP HEAD requests.
Get account information, and also verify that the account exists.
Parameters: | account – name of the account to get the info for |
---|---|
Returns: | tuple of (account partition, account nodes) or (None, None) if it does not exist |
Given a list of responses from several servers, choose the best to return to the API.
Parameters: |
|
---|---|
Returns: | webob.Response object with the correct status, body, etc. set |
Get container information and thusly verify container existance. This will also make a call to account_info to verify that the account exists.
Parameters: |
|
---|---|
Returns: | tuple of (container partition, container nodes, container read acl, container write acl) or (None, None, None, None) if the container does not exist |
Handles incrementing error counts when talking to nodes.
Parameters: | node – dictionary of node to increment the error count for |
---|
Mark a node as error limited.
Parameters: | node – dictionary of node to error limit |
---|
Check if the node is currently error limited.
Parameters: | node – dictionary of node to check |
---|---|
Returns: | True if error limited, False otherwise |
Handle logging, and handling of errors.
Parameters: |
|
---|
Handle logging of generic exceptions.
Parameters: |
|
---|
Node iterator that will first iterate over the normal nodes for a partition and then the handoff partitions for the node.
Parameters: |
|
---|
Sends an HTTP request to multiple nodes and aggregates the results. It attempts the primary nodes concurrently, then iterates over the handoff nodes as needed.
Parameters: | headers – a list of dicts, where each dict represents one backend request that should be made. |
---|---|
Returns: | a webob Response object |
Bases: swift.proxy.server.Controller
WSGI controller for object requests.
HTTP COPY request handler.
HTTP DELETE request handler.
Handler for HTTP GET requests.
Handle HTTP GET or HEAD requests.
Handler for HTTP HEAD requests.
HTTP POST request handler.
HTTP PUT request handler.
Bases: object
Iterable that returns the object contents for a segmented object in Swift.
If set, the response’s bytes_transferred value will be updated (used to log the size of the request). Also, if there’s a failure that cuts the transfer short, the response’s status_int will be updated (again, just for logging since the original status would have already been sent to the client).
Parameters: |
|
---|
Non-standard iterator function for use with Webob in serving Range requests more quickly. This will skip over segments and do a range request on the first segment to return data from, if needed.
Parameters: |
|
---|
paste.deploy app factory for creating WSGI proxy apps.
Decorator to declare which methods should have any swift.authorize call delayed. This is so the method can load the Request object up with additional information that may be needed by the authorization system.
Parameters: | func – function to delay authorization on |
---|
Decorator to declare which methods are public accessible as HTTP requests
Parameters: | func – function to make public |
---|
Helper function to update headers in the response.
Parameters: |
|
---|