cinder.quota_utils module

cinder.quota_utils module

class GenericProjectInfo(project_id, project_keystone_api_version, project_parent_id=None, project_subtree=None, project_parent_tree=None, is_admin_project=False, domain_id=None)

Bases: object

Abstraction layer for Keystone V2 and V3 project objects

get_project_hierarchy(context, project_id, subtree_as_ids=False, parents_as_ids=False, is_admin_project=False)

A Helper method to get the project hierarchy.

Along with hierarchical multitenancy in keystone API v3, projects can be hierarchically organized. Therefore, we need to know the project hierarchy, if any, in order to do default volume type operations properly.

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

Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.