Module dedicated functions/classes dealing with rate limiting requests.
Bases: object
Stores information about a limit for HTTP requests.
Return a useful representation of this class.
Display the string name of the unit.
Bases: object
Rate-limit checking class which handles limits in memory.
Check the given verb/user/user triplet for limit.
@return: Tuple of delay (in seconds) and error message (or None, None)
Return the limits for a given user.
Convert a string into a list of Limit instances.
This implementation expects a semicolon-separated sequence of parenthesized groups, where each group contains a comma-separated sequence consisting of HTTP method, user-readable URI, a URI reg-exp, an integer number of requests which can be made, and a unit of measure. Valid values for the latter are “SECOND”, “MINUTE”, “HOUR”, and “DAY”.
@return: List of Limit instances.
Bases: Controller
Controller for accessing limits in the OpenStack API.
Return all global and rate limit information.
Bases: Middleware
Rate-limits requests passing through this middleware.
All limit information is stored in memory for this implementation.
Bases: object
Rate-limit checking from a WSGI application.
Uses an in-memory Limiter.
To use, POST /<username>
with JSON data such as:
{
"verb" : GET,
"path" : "/servers"
}
and receive a 204 No Content, or a 403 Forbidden with an X-Wait-Seconds header containing the number of seconds to wait before the action would succeed.
Bases: object
Rate-limit requests based on answers from a remote source.
Ignore a limits string–simply doesn’t apply for the limit proxy.
@return: Empty list.
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.