glance.quota.keystone module

glance.quota.keystone.enforce_image_count_total(context, project_id)[source]

Enforce the image_count_total quota.

This enforces the total count of non-deleted images owned by the supplied project_id.

glance.quota.keystone.enforce_image_count_uploading(context, project_id)[source]

Enforce the image_count_uploading quota.

This enforces the total count of images in any state of upload by the supplied project_id.

Parameters

delta – This defaults to one, but should be zero when checking an operation on an image that already counts against this quota (i.e. a stage operation of an existing queue image).

glance.quota.keystone.enforce_image_size_total(context, project_id, delta=0)[source]

Enforce the image_size_total quota.

This enforces the total image size quota for the supplied project_id.

glance.quota.keystone.enforce_image_staging_total(context, project_id, delta=0)[source]

Enforce the image_stage_total quota.

This enforces the total size of all images stored in staging areas for the supplied project_id.

glance.quota.keystone.get_usage(context, project_id=None)[source]