glance.api.common.
check_quota
(context, image_size, db_api, image_id=None)[source]¶Method called to see if the user is allowed to store an image.
Checks if it is allowed based on the given size in glance based on their quota and current usage.
Parameters: |
|
---|---|
Returns: |
glance.api.common.
get_remaining_quota
(context, db_api, image_id=None)[source]¶Method called to see if the user is allowed to store an image.
Checks if it is allowed based on the given size in glance based on their quota and current usage.
Parameters: |
|
---|---|
Returns: | The number of bytes the user has remaining under their quota. None means infinity |
glance.api.common.
get_thread_pool
(lock_name, size=1024)[source]¶Initializes eventlet thread pool.
If thread pool is present in cache, then returns it from cache else create new pool, stores it in cache and return newly created pool.
@param lock_name: Name of the lock. @param size: Size of eventlet pool.
@return: eventlet pool
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.