Max container list length of a get request for an account
Max object list length of a get request for a container
Query string format= values to their corresponding content-type values
Max file size allowed for objects
Max number of metadata items
Max length of the name of a key for metadata
Max overall size of metadata
Max length of the value of a key for metadata
Max object name length
Helper function for checking if a string can be converted to a float.
| Parameters: | string – string to be verified as a float |
|---|---|
| Returns: | True if the string can be converted to a float, False otherwise |
Check metadata sent in the request headers.
| Parameters: |
|
|---|---|
| Raises HTTPBadRequest: | |
bad metadata |
|
Verify that the path to the device is a mount point and mounted. This allows us to fast fail on drives that have been unmounted because of issues, and also prevents us for accidently filling up the root partition.
| Parameters: |
|
|---|---|
| Returns: | True if it is a valid mounted device, False otherwise |
Check to ensure that everything is alright about an object to be created.
| Parameters: |
|
|---|---|
| Raises: |
|
Validate if a string is valid UTF-8 str or unicode
| Parameters: | string – string to be validated |
|---|---|
| Returns: | True if the string is valid utf-8 str or unicode, False otherwise |
Lucid comes with memcached: v1.4.2. Protocol documentation for that version is at:
http://github.com/memcached/memcached/blob/1.4.2/doc/protocol.txt
Bases: object
Simple, consistent-hashed memcache client.
Decrements a key which has a numeric value by delta. Calls incr with -delta.
| Parameters: |
|
|---|---|
| Raises MemcacheConnectionError: | |
Deletes a key/value pair from memcache.
| Parameters: | key – key to be deleted |
|---|
Gets the object specified by key. It will also unserialize the object before returning if it is serialized in memcache with JSON, or if it is pickled and unpickling is allowed.
| Parameters: | key – key |
|---|---|
| Returns: | value of the key in memcache |
Gets multiple values from memcache for the given keys.
| Parameters: |
|
|---|---|
| Returns: | list of values |
Increments a key which has a numeric value by delta. If the key can’t be found, it’s added as delta or 0 if delta < 0. If passed a negative number, will use memcached’s decr. Returns the int stored in memcached Note: The data memcached stores as the result of incr/decr is an unsigned int. decr’s that result in a number below 0 are stored as 0.
| Parameters: |
|
|---|---|
| Raises MemcacheConnectionError: | |
Set a key/value pair in memcache
| Parameters: |
|
|---|
Sets multiple key/value pairs in memcache.
| Parameters: |
|
|---|
Domain Remap Middleware
Middleware that translates container and account parts of a domain to path parameters that the proxy server understands.
container.account.storageurl/object gets translated to container.account.storageurl/path_root/account/container/object
account.storageurl/path_root/container/object gets translated to account.storageurl/path_root/account/container/object
Browsers can convert a host header to lowercase, so check that reseller prefix on the account is the correct case. This is done by comparing the items in the reseller_prefixes config option to the found prefix. If they match except for case, the item from reseller_prefixes will be used instead of the found reseller prefix. The reseller_prefixes list is exclusive. If defined, any request with an account prefix not in that list will be ignored by this middleware. reseller_prefixes defaults to ‘AUTH’.
Note that this middleware requires that container names and account names (except as described above) must be DNS-compatible. This means that the account name created in the system and the containers created by users cannot exceed 63 characters or have UTF-8 characters. These are restrictions over and above what swift requires and are not explicitly checked. Simply put, the this middleware will do a best-effort attempt to derive account and container names from elements in the domain name and put those derived values into the URL path (leaving the Host header unchanged).
Also note that using container sync with remapped domain names is not advised. With container sync, you should use the true storage end points as sync destinations.
Bases: object
Domain Remap Middleware
See above for a full description.
| Parameters: |
|
|---|