cinder.quota_utils module

get_volume_type_reservation(ctxt, volume, type_id, reserve_vol_type_only=False, negative=False)
process_reserve_over_quota(context, over_quota_exception, resource, size=None)

Handle OverQuota exception.

Analyze OverQuota exception, and raise new exception related to resource type. If there are unexpected items in overs, UnexpectedOverQuota is raised.

Parameters:
  • context – security context

  • over_quota_exception – OverQuota exception

  • resource – can be backups, snapshots, and volumes

  • size – requested size in reservation