Module Expr Str Import alias ImportFrom alias identifier ImportFrom alias ImportFrom alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr ClassDef bases NameLoad body Expr Str Assign NameStore Num FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Dict Assign NameStore Call AttributeLoad NameLoad attr NameLoad For NameStore Call AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Dict Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad For NameStore Call AttributeLoad NameLoad attr body If BoolOpOr NameLoad CompareIn AttributeLoad NameLoad attr NameLoad body Assign SubscriptStore NameLoad Index AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad body Assign NameStore Dict If CompareEq NameLoad AttributeLoad NameLoad attr body Assign NameStore AttributeLoad NameLoad attr If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad orelse Assign NameStore Dict Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad For NameStore Call AttributeLoad NameLoad attr body If BoolOpAnd UnaryOpNot NameLoad CompareNotIn AttributeLoad NameLoad attr NameLoad body Continue Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr SubscriptLoad NameLoad Index AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index AttributeLoad NameLoad attr Call NameLoad keyword NameLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Expr Call AttributeLoad SubscriptLoad NameLoad Index AttributeLoad NameLoad attr attr keyword Call AttributeLoad NameLoad attr Str Num keyword Call AttributeLoad NameLoad attr Str Num If NameLoad body Expr Call AttributeLoad SubscriptLoad NameLoad Index AttributeLoad NameLoad attr attr keyword NameLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad For NameStore NameLoad body If CompareIn AttributeLoad NameLoad attr NameLoad body AugAssignSub SubscriptStore SubscriptLoad NameLoad Index AttributeLoad NameLoad attr Index Str AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr orelse Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Assign NameStore BoolOpOr NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad body If CompareNotIn NameLoad Call AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index NameLoad NameLoad Assign NameStore NameLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Return Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore BoolOpOr NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Return Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return CompareLtE NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If BoolOpOr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad body Return AttributeLoad NameLoad attr Return BinOpAdd NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If BoolOpOr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad body Return AttributeLoad NameLoad attr Return BinOpSub NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Dict Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Str Call AttributeLoad NameLoad attr NameLoad Num Assign NameStore BinOpAdd SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str Assign SubscriptStore NameLoad Index NameLoad Dict Str Str NameLoad NameLoad orelse For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign NameStore Call NameLoad Call NameLoad Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str Call NameLoad BinOpAdd SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str Assign SubscriptStore NameLoad Index NameLoad Dict Str Str NameLoad Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str If NameLoad body Assign NameStore Lambda arguments args NameParam defaults Call NameLoad NameLoad Str orelse Assign NameStore Lambda arguments args NameParam defaults UnaryOpNot Call NameLoad NameLoad Str Assign NameStore Call NameLoad NameLoad Assign NameStore DictComp NameLoad NameLoad comprehension TupleStore NameStore NameStore Call AttributeLoad NameLoad attr BoolOpAnd CompareIn NameLoad NameLoad Call NameLoad NameLoad If CompareNotEq Call NameLoad NameLoad Call NameLoad NameLoad body Assign NameStore BinOpSub NameLoad Call NameLoad Call AttributeLoad NameLoad attr Raise Call AttributeLoad NameLoad attr keyword Call NameLoad NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr Str Dict Str Str Str NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad orelse Expr Call AttributeLoad NameLoad attr Str Dict Str Str NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad Return DictComp NameLoad SubscriptLoad NameLoad Index Str comprehension TupleStore NameStore NameStore Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Expr Call NameLoad NameLoad Str Assign NameStore ListComp NameLoad comprehension TupleStore NameStore NameStore Call AttributeLoad NameLoad attr CompareLt NameLoad Num If NameLoad body Raise Call AttributeLoad NameLoad attr keyword Call NameLoad NameLoad If CompareIs NameLoad NameLoad body Assign NameStore AttributeLoad NameLoad attr If CompareIs NameLoad NameLoad body Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assign NameStore ListComp NameLoad comprehension TupleStore NameStore NameStore Call AttributeLoad NameLoad attr BoolOpOr BoolOpAnd CompareGtE SubscriptLoad NameLoad Index NameLoad Num CompareLt SubscriptLoad NameLoad Index NameLoad NameLoad BoolOpAnd CompareGtE SubscriptLoad NameLoad Index NameLoad Num CompareLt SubscriptLoad NameLoad Index NameLoad NameLoad If NameLoad body Assign NameStore Dict For NameStore NameLoad body Assign SubscriptStore NameLoad Index NameLoad Call NameLoad GeneratorExp NameLoad comprehension NameStore TupleLoad Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad CompareIsNot NameLoad NameLoad Raise Call AttributeLoad NameLoad attr keyword Call NameLoad NameLoad keyword NameLoad keyword Dict keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str Expr Call NameLoad NameLoad Str If CompareIs NameLoad NameLoad body Assign NameStore AttributeLoad NameLoad attr If Call NameLoad NameLoad AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad If Call NameLoad NameLoad AttributeLoad NameLoad attr body Assign NameStore BinOpAdd Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot Call NameLoad NameLoad AttributeLoad NameLoad attr body Raise Call AttributeLoad NameLoad attr keyword NameLoad If CompareIs NameLoad NameLoad body Assign NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str NameLoad If CompareIs NameLoad NameLoad body Assign NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str Dict Str Str Str NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str Dict Str Str NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr Str Dict Str Str NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr Str Dict Str Str Str NameLoad NameLoad NameLoad Return Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore AttributeLoad NameLoad attr If CompareIs NameLoad NameLoad body Assign NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore AttributeLoad NameLoad attr If CompareIs NameLoad NameLoad body Assign NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr For NameStore NameLoad body TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad keyword Num handlers ExceptHandler type AttributeLoad NameLoad attr body Pass decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Return Num decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Return Num decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Return Num decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Dict For NameStore Call AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index AttributeLoad NameLoad attr Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Dict For NameStore Call AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index AttributeLoad NameLoad attr Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Assign NameStore Dict For NameStore Call AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index AttributeLoad NameLoad attr Dict Assign SubscriptStore SubscriptLoad NameLoad Index AttributeLoad NameLoad attr Index Str Num If NameLoad body Assign SubscriptStore SubscriptLoad NameLoad Index AttributeLoad NameLoad attr Index Str Num Assign SubscriptStore SubscriptLoad NameLoad Index AttributeLoad NameLoad attr Index Str Num If NameLoad body Assign SubscriptStore SubscriptLoad NameLoad Index AttributeLoad NameLoad attr Index Str Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str Return Call AttributeLoad NameLoad attr NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad body Expr Str Return Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Dict For NameStore Call AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index AttributeLoad NameLoad attr Dict Str Str Num Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Pass decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str Return ListLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Pass decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Pass decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Pass decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Pass decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Pass decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Pass decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults kwarg body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr If NameLoad body TryExcept body Return Call AttributeLoad NameLoad attr NameLoad NameLoad AttributeLoad NameLoad attr handlers ExceptHandler type AttributeLoad NameLoad attr body Pass If NameLoad body TryExcept body Return Call AttributeLoad NameLoad attr NameLoad NameLoad AttributeLoad NameLoad attr handlers ExceptHandler type AttributeLoad NameLoad attr body Pass Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return IfExp AttributeLoad NameLoad attr SubscriptLoad NameLoad Index AttributeLoad NameLoad attr Num decorator_list NameLoad decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad keyword NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Str decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad keyword NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body If AttributeLoad NameLoad attr body Return AttributeLoad NameLoad attr If UnaryOpNot AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr If Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Return CompareIn NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareIn NameLoad AttributeLoad NameLoad attr body Return SubscriptLoad AttributeLoad NameLoad attr Index NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign SubscriptStore AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad NameLoad attr NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad body Expr Str Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad NameLoad attr NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults vararg kwarg body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If BoolOpOr UnaryOpNot NameLoad UnaryOpNot Call NameLoad NameLoad Str body Raise Call AttributeLoad NameLoad attr keyword ListLoad NameLoad Return Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad kwarg body Expr Str Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad kwarg body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str TryExcept body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad keyword NameLoad keyword NameLoad handlers ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad Str NameLoad Return Expr Call AttributeLoad NameLoad attr Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str TryExcept body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad keyword NameLoad keyword NameLoad handlers ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad Str NameLoad Return Expr Call AttributeLoad NameLoad attr Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list NameLoad decorator_list FunctionDef arguments args defaults vararg kwarg body Expr Str Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr NameLoad decorator_list Assign NameStore Call NameLoad Assign NameStore ListLoad Call NameLoad Str Str Str Call NameLoad Str Str Str Call NameLoad Str Str Str Call NameLoad Str Str Str Call NameLoad Str Str Str Call NameLoad Str Str Str Call NameLoad Str Str Call NameLoad Str Str Call NameLoad Str Str Call NameLoad Str Str Call NameLoad Str AttributeLoad NameLoad attr Str Call NameLoad Str NameLoad Str Call NameLoad Str Str Str Call NameLoad Str NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad FunctionDef arguments args NameParam NameParam defaults body If CompareNotIn NameLoad NameLoad body Raise Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad If CompareNotEq AttributeLoad NameLoad attr NameLoad body Raise Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str For NameStore Call AttributeLoad NameLoad attr body Expr Call NameLoad NameLoad NameLoad decorator_list
N/A N/A Quotas for resources per project. N/A datetime oslo_log log logging oslo_utils importutils oslo_utils timeutils N/A six N/A nova.conf nova db nova exception nova.i18n _LE nova objects N/A LOG N/A N/A logging getLogger __name__ N/A CONF N/A N/A nova conf CONF DbQuotaDriver N/A object N/A N/A Driver to perform necessary checks to enforce quotas and obtain
    quota information.  The default driver utilizes the local
    database.
     N/A UNLIMITED_VALUE -1 get_by_project_and_user N/A N/A self context project_id user_id resource N/A N/A N/A Get a specific quota by project and user. N/A N/A N/A db quota_get context project_id resource user_id user_id N/A get_by_project N/A N/A self context project_id resource N/A N/A N/A Get a specific quota by project. N/A N/A N/A db quota_get context project_id resource N/A get_by_class N/A N/A self context quota_class resource N/A N/A N/A Get a specific quota by quota class. N/A N/A N/A db quota_class_get context quota_class resource N/A get_defaults N/A N/A self context resources N/A N/A N/A Given a list of resources, retrieve the default quotas.
        Use the class quotas named `_DEFAULT_QUOTA_NAME` as default quotas,
        if it exists.

        :param context: The request context, for access checks.
        :param resources: A dictionary of the registered resources.
         N/A quotas N/A N/A default_quotas N/A N/A db quota_class_get_default context N/A resource N/A N/A resources values N/A N/A N/A quotas N/A N/A resource name N/A N/A default_quotas get N/A resource name N/A resource default N/A quotas N/A get_class_quotas N/A N/A self context resources quota_class defaults N/A True N/A N/A Given a list of resources, retrieve the quotas for the given
        quota class.

        :param context: The request context, for access checks.
        :param resources: A dictionary of the registered resources.
        :param quota_class: The name of the quota class to return
                            quotas for.
        :param defaults: If True, the default value will be reported
                         if there is no specific value for the
                         resource.
         N/A quotas N/A N/A class_quotas N/A N/A db quota_class_get_all_by_name context quota_class N/A resource N/A N/A resources values N/A N/A N/A defaults N/A N/A resource name class_quotas N/A N/A N/A quotas N/A N/A resource name N/A N/A class_quotas get N/A resource name N/A resource default N/A quotas N/A _process_quotas N/A N/A self context resources project_id quotas quota_class defaults usages remains N/A None True None False N/A N/A modified_quotas N/A N/A N/A project_id N/A context project_id N/A N/A quota_class N/A context quota_class N/A quota_class N/A N/A class_quotas N/A N/A db quota_class_get_all_by_name context quota_class N/A N/A class_quotas N/A N/A default_quotas N/A N/A self get_defaults context resources N/A resource N/A N/A resources values N/A N/A N/A N/A defaults N/A N/A resource name quotas N/A N/A N/A limit N/A N/A quotas get N/A resource name N/A N/A class_quotas get N/A resource name N/A default_quotas N/A N/A resource name N/A N/A modified_quotas N/A N/A resource name N/A dict limit limit N/A usages N/A N/A usage N/A N/A usages get N/A resource name N/A N/A N/A N/A N/A modified_quotas N/A N/A resource name update in_use N/A N/A usage get in_use 0 reserved N/A N/A usage get reserved 0 N/A remains N/A N/A N/A N/A N/A modified_quotas N/A N/A resource name update remains limit N/A remains N/A N/A all_quotas N/A N/A db quota_get_all context project_id N/A quota all_quotas N/A N/A N/A N/A quota resource modified_quotas N/A N/A N/A N/A modified_quotas N/A N/A quota resource N/A remains N/A quota hard_limit N/A modified_quotas N/A get_user_quotas N/A N/A self context resources project_id user_id quota_class defaults usages project_quotas user_quotas N/A None True True None None N/A N/A Given a list of resources, retrieve the quotas for the given
        user and project.

        :param context: The request context, for access checks.
        :param resources: A dictionary of the registered resources.
        :param project_id: The ID of the project to return quotas for.
        :param user_id: The ID of the user to return quotas for.
        :param quota_class: If project_id != context.project_id, the
                            quota class cannot be determined.  This
                            parameter allows it to be specified.  It
                            will be ignored if project_id ==
                            context.project_id.
        :param defaults: If True, the quota class value (or the
                         default value, if there is no value from the
                         quota class) will be reported if there is no
                         specific value for the resource.
        :param usages: If True, the current in_use and reserved counts
                       will also be returned.
        :param project_quotas: Quotas dictionary for the specified project.
        :param user_quotas: Quotas dictionary for the specified project
                            and user.
         N/A user_quotas N/A N/A user_quotas N/A N/A user_quotas copy N/A N/A user_quotas N/A N/A db quota_get_all_by_project_and_user context project_id user_id N/A proj_quotas N/A project_quotas N/A N/A db quota_get_all_by_project context project_id N/A N/A key value N/A N/A six iteritems proj_quotas N/A N/A N/A key N/A N/A user_quotas keys N/A N/A N/A user_quotas N/A key value N/A user_usages None N/A usages N/A N/A user_usages N/A N/A db quota_usage_get_all_by_project_and_user context project_id user_id N/A N/A N/A self _process_quotas context resources project_id user_quotas quota_class defaults defaults usages user_usages N/A get_project_quotas N/A N/A self context resources project_id quota_class defaults usages remains project_quotas N/A None True True False None N/A N/A Given a list of resources, retrieve the quotas for the given
        project.

        :param context: The request context, for access checks.
        :param resources: A dictionary of the registered resources.
        :param project_id: The ID of the project to return quotas for.
        :param quota_class: If project_id != context.project_id, the
                            quota class cannot be determined.  This
                            parameter allows it to be specified.  It
                            will be ignored if project_id ==
                            context.project_id.
        :param defaults: If True, the quota class value (or the
                         default value, if there is no value from the
                         quota class) will be reported if there is no
                         specific value for the resource.
        :param usages: If True, the current in_use and reserved counts
                       will also be returned.
        :param remains: If True, the current remains of the project will
                        will be returned.
        :param project_quotas: Quotas dictionary for the specified project.
         N/A project_quotas N/A project_quotas N/A N/A db quota_get_all_by_project context project_id N/A project_usages None N/A usages N/A N/A N/A N/A LOG debug Getting all quota usages for project: %s project_id N/A project_usages N/A N/A db quota_usage_get_all_by_project context project_id N/A N/A N/A self _process_quotas context resources project_id project_quotas quota_class defaults defaults usages project_usages remains remains N/A _is_unlimited_value N/A N/A self v N/A N/A N/A A helper method to check for unlimited value.
         N/A N/A v N/A self UNLIMITED_VALUE N/A _sum_quota_values N/A N/A self v1 v2 N/A N/A N/A A helper method that handles unlimited values when performing
        sum operation.
         N/A N/A N/A N/A self _is_unlimited_value v1 N/A N/A self _is_unlimited_value v2 N/A N/A N/A self UNLIMITED_VALUE N/A N/A v1 v2 N/A _sub_quota_values N/A N/A self v1 v2 N/A N/A N/A A helper method that handles unlimited values when performing
        subtraction operation.
         N/A N/A N/A N/A self _is_unlimited_value v1 N/A N/A self _is_unlimited_value v2 N/A N/A N/A self UNLIMITED_VALUE N/A N/A v1 v2 N/A get_settable_quotas N/A N/A self context resources project_id user_id N/A None N/A N/A Given a list of resources, retrieve the range of settable quotas for
        the given user or project.

        :param context: The request context, for access checks.
        :param resources: A dictionary of the registered resources.
        :param project_id: The ID of the project to return quotas for.
        :param user_id: The ID of the user to return quotas for.
         N/A settable_quotas N/A N/A db_proj_quotas N/A N/A db quota_get_all_by_project context project_id N/A project_quotas N/A N/A self get_project_quotas context resources project_id remains True project_quotas db_proj_quotas N/A user_id N/A N/A setted_quotas N/A N/A db quota_get_all_by_project_and_user context project_id user_id N/A user_quotas N/A N/A self get_user_quotas context resources project_id user_id project_quotas db_proj_quotas user_quotas setted_quotas N/A N/A key value N/A N/A user_quotas items N/A N/A maximum N/A N/A self _sum_quota_values N/A N/A project_quotas N/A key N/A remains N/A N/A setted_quotas get key 0 N/A minimum N/A N/A value N/A in_use N/A value N/A reserved N/A N/A settable_quotas N/A key N/A minimum maximum minimum maximum N/A N/A N/A key value N/A N/A project_quotas items N/A N/A minimum N/A max N/A int N/A N/A self _sub_quota_values N/A value N/A limit N/A value N/A remains N/A int N/A N/A value N/A in_use N/A value N/A reserved N/A N/A settable_quotas N/A key N/A minimum maximum minimum -1 N/A settable_quotas N/A _get_quotas N/A N/A self context resources keys has_sync project_id user_id project_quotas N/A None None None N/A N/A A helper method which retrieves the quotas for the specific
        resources identified by keys, and which apply to the current
        context.

        :param context: The request context, for access checks.
        :param resources: A dictionary of the registered resources.
        :param keys: A list of the desired quotas to retrieve.
        :param has_sync: If True, indicates that the resource must
                         have a sync function; if False, indicates
                         that the resource must NOT have a sync
                         function.
        :param project_id: Specify the project_id if current context
                           is admin and admin wants to impact on
                           common user's tenant.
        :param user_id: Specify the user_id if current context
                        is admin and admin wants to impact on
                        common user.
        :param project_quotas: Quotas dictionary for the specified project.
         N/A has_sync N/A N/A sync_filt N/A N/A N/A x N/A N/A hasattr x sync N/A N/A sync_filt N/A N/A N/A x N/A N/A N/A hasattr x sync N/A desired N/A set keys N/A sub_resources N/A k v N/A N/A k v N/A N/A resources items N/A N/A k desired N/A sync_filt v N/A N/A N/A len keys N/A len sub_resources N/A N/A unknown N/A desired N/A set N/A N/A sub_resources keys N/A N/A N/A exception QuotaResourceUnknown unknown N/A sorted unknown N/A user_id N/A N/A N/A N/A LOG debug Getting quotas for user %(user_id)s and project %(project_id)s. Resources: %(keys)s N/A user_id project_id keys user_id project_id keys N/A quotas N/A N/A self get_user_quotas context sub_resources project_id user_id N/A context quota_class usages False project_quotas project_quotas N/A N/A N/A N/A LOG debug Getting quotas for project %(project_id)s. Resources: %(keys)s N/A project_id keys project_id keys N/A quotas N/A N/A self get_project_quotas context sub_resources project_id N/A context quota_class usages False project_quotas project_quotas N/A N/A k N/A v N/A limit N/A N/A k v N/A N/A quotas items N/A limit_check N/A N/A self context resources values project_id user_id N/A None None N/A N/A Check simple quota limits.

        For limits--those quotas for which there is no usage
        synchronization function--this method checks that a set of
        proposed values are permitted by the limit restriction.

        This method will raise a QuotaResourceUnknown exception if a
        given resource is unknown or if it is not a simple limit
        resource.

        If any of the proposed values is over the defined quota, an
        OverQuota exception will be raised with the sorted list of the
        resources which are too high.  Otherwise, the method returns
        nothing.

        :param context: The request context, for access checks.
        :param resources: A dictionary of the registered resources.
        :param values: A dictionary of the values to check against the
                       quota.
        :param project_id: Specify the project_id if current context
                           is admin and admin wants to impact on
                           common user's tenant.
        :param user_id: Specify the user_id if current context
                        is admin and admin wants to impact on
                        common user.
         N/A N/A _valid_method_call_check_resources values check N/A unders N/A key N/A N/A key val N/A N/A values items N/A val 0 N/A unders N/A N/A N/A N/A exception InvalidQuotaValue unders N/A sorted unders N/A N/A project_id None N/A N/A project_id N/A context project_id N/A N/A user_id None N/A N/A user_id N/A context user_id N/A project_quotas N/A N/A db quota_get_all_by_project context project_id N/A quotas N/A N/A self _get_quotas context resources N/A N/A values keys has_sync False project_id project_id project_quotas project_quotas N/A user_quotas N/A N/A self _get_quotas context resources N/A N/A values keys has_sync False project_id project_id user_id user_id project_quotas project_quotas N/A overs N/A key N/A N/A key val N/A N/A values items N/A N/A N/A N/A quotas N/A key 0 N/A N/A quotas N/A key val N/A N/A N/A user_quotas N/A key 0 N/A N/A user_quotas N/A key val N/A overs N/A N/A headroom N/A N/A key overs N/A N/A N/A headroom N/A key N/A min N/A val N/A val N/A N/A N/A quotas get key N/A N/A project_quotas get key N/A val None N/A N/A N/A exception OverQuota overs N/A sorted overs quotas quotas usages N/A headroom headroom N/A reserve N/A N/A self context resources deltas expire project_id user_id N/A None None None N/A N/A Check quotas and reserve resources.

        For counting quotas--those quotas for which there is a usage
        synchronization function--this method checks quotas against
        current usage and the desired deltas.

        This method will raise a QuotaResourceUnknown exception if a
        given resource is unknown or if it does not have a usage
        synchronization function.

        If any of the proposed values is over the defined quota, an
        OverQuota exception will be raised with the sorted list of the
        resources which are too high.  Otherwise, the method returns a
        list of reservation UUIDs which were created.

        :param context: The request context, for access checks.
        :param resources: A dictionary of the registered resources.
        :param deltas: A dictionary of the proposed delta changes.
        :param expire: An optional parameter specifying an expiration
                       time for the reservations.  If it is a simple
                       number, it is interpreted as a number of
                       seconds and added to the current time; if it is
                       a datetime.timedelta object, it will also be
                       added to the current time.  A datetime.datetime
                       object will be interpreted as the absolute
                       expiration time.  If None is specified, the
                       default expiration time set by
                       --default-reservation-expire will be used (this
                       value will be treated as a number of seconds).
        :param project_id: Specify the project_id if current context
                           is admin and admin wants to impact on
                           common user's tenant.
        :param user_id: Specify the user_id if current context
                        is admin and admin wants to impact on
                        common user.
         N/A N/A _valid_method_call_check_resources deltas reserve N/A N/A expire None N/A N/A expire N/A CONF reservation_expire N/A N/A isinstance expire N/A six integer_types N/A N/A expire N/A N/A datetime timedelta seconds expire N/A N/A isinstance expire N/A datetime timedelta N/A N/A expire N/A N/A N/A timeutils utcnow expire N/A N/A N/A isinstance expire N/A datetime datetime N/A N/A N/A N/A exception InvalidReservationExpiration expire expire N/A N/A project_id None N/A N/A project_id N/A context project_id N/A N/A N/A LOG debug Reserving resources using context.project_id: %s project_id N/A N/A user_id None N/A N/A user_id N/A context user_id N/A N/A N/A LOG debug Reserving resources using context.user_id: %s user_id N/A N/A N/A LOG debug Attempting to reserve resources for project %(project_id)s and user %(user_id)s. Deltas: %(deltas)s N/A project_id user_id deltas project_id user_id deltas N/A project_quotas N/A N/A db quota_get_all_by_project context project_id N/A N/A N/A LOG debug Quota limits for project %(project_id)s: %(project_quotas)s N/A project_id project_quotas project_id project_quotas N/A quotas N/A N/A self _get_quotas context resources N/A N/A deltas keys has_sync True project_id project_id project_quotas project_quotas N/A N/A N/A LOG debug Quotas for project %(project_id)s after resource sync: %(quotas)s N/A project_id quotas project_id quotas N/A user_quotas N/A N/A self _get_quotas context resources N/A N/A deltas keys has_sync True project_id project_id user_id user_id project_quotas project_quotas N/A N/A N/A LOG debug Quotas for project %(project_id)s and user %(user_id)s after resource sync: %(quotas)s N/A project_id user_id quotas project_id user_id quotas N/A N/A N/A db quota_reserve context resources quotas user_quotas deltas expire N/A CONF until_refresh N/A CONF max_age project_id project_id user_id user_id N/A commit N/A N/A self context reservations project_id user_id N/A None None N/A N/A Commit reservations.

        :param context: The request context, for access checks.
        :param reservations: A list of the reservation UUIDs, as
                             returned by the reserve() method.
        :param project_id: Specify the project_id if current context
                           is admin and admin wants to impact on
                           common user's tenant.
        :param user_id: Specify the user_id if current context
                        is admin and admin wants to impact on
                        common user.
         N/A N/A project_id None N/A N/A project_id N/A context project_id N/A N/A user_id None N/A N/A user_id N/A context user_id N/A N/A N/A db reservation_commit context reservations project_id project_id user_id user_id N/A rollback N/A N/A self context reservations project_id user_id N/A None None N/A N/A Roll back reservations.

        :param context: The request context, for access checks.
        :param reservations: A list of the reservation UUIDs, as
                             returned by the reserve() method.
        :param project_id: Specify the project_id if current context
                           is admin and admin wants to impact on
                           common user's tenant.
        :param user_id: Specify the user_id if current context
                        is admin and admin wants to impact on
                        common user.
         N/A N/A project_id None N/A N/A project_id N/A context project_id N/A N/A user_id None N/A N/A user_id N/A context user_id N/A N/A N/A db reservation_rollback context reservations project_id project_id user_id user_id N/A usage_reset N/A N/A self context resources N/A N/A N/A Reset the usage records for a particular user on a list of
        resources.  This will force that user's usage records to be
        refreshed the next time a reservation is made.

        Note: this does not affect the currently outstanding
        reservations the user has; those reservations must be
        committed or rolled back (or expired).

        :param context: The request context, for access checks.
        :param resources: A list of the resource names for which the
                          usage must be reset.
         N/A elevated N/A N/A context elevated N/A resource resources N/A N/A N/A N/A N/A N/A db quota_usage_update elevated N/A context project_id N/A context user_id resource in_use -1 N/A N/A N/A N/A exception QuotaUsageNotFound N/A N/A N/A destroy_all_by_project_and_user N/A N/A self context project_id user_id N/A N/A N/A Destroy all quotas, usages, and reservations associated with a
        project and user.

        :param context: The request context, for access checks.
        :param project_id: The ID of the project being deleted.
        :param user_id: The ID of the user being deleted.
         N/A N/A N/A db quota_destroy_all_by_project_and_user context project_id user_id N/A destroy_all_by_project N/A N/A self context project_id N/A N/A N/A Destroy all quotas, usages, and reservations associated with a
        project.

        :param context: The request context, for access checks.
        :param project_id: The ID of the project being deleted.
         N/A N/A N/A db quota_destroy_all_by_project context project_id N/A expire N/A N/A self context N/A N/A N/A Expire reservations.

        Explores all currently existing reservations and rolls back
        any that have expired.

        :param context: The request context, for access checks.
         N/A N/A N/A db reservation_expire context N/A N/A NoopQuotaDriver N/A object N/A N/A Driver that turns quotas calls into no-ops and pretends that quotas
    for all resources are unlimited.  This can be used if you do not
    wish to have any quota checking.  For instance, with nova compute
    cells, the parent cell should do quota checking, but the child cell
    should not.
     get_by_project_and_user N/A N/A self context project_id user_id resource N/A N/A N/A Get a specific quota by project and user. N/A -1 N/A get_by_project N/A N/A self context project_id resource N/A N/A N/A Get a specific quota by project. N/A -1 N/A get_by_class N/A N/A self context quota_class resource N/A N/A N/A Get a specific quota by quota class. N/A -1 N/A get_defaults N/A N/A self context resources N/A N/A N/A Given a list of resources, retrieve the default quotas.

        :param context: The request context, for access checks.
        :param resources: A dictionary of the registered resources.
         N/A quotas N/A N/A resource N/A N/A resources values N/A N/A N/A quotas N/A N/A resource name -1 N/A quotas N/A get_class_quotas N/A N/A self context resources quota_class defaults N/A True N/A N/A Given a list of resources, retrieve the quotas for the given
        quota class.

        :param context: The request context, for access checks.
        :param resources: A dictionary of the registered resources.
        :param quota_class: The name of the quota class to return
                            quotas for.
        :param defaults: If True, the default value will be reported
                         if there is no specific value for the
                         resource.
         N/A quotas N/A N/A resource N/A N/A resources values N/A N/A N/A quotas N/A N/A resource name -1 N/A quotas N/A _get_noop_quotas N/A N/A self resources usages remains N/A None False N/A N/A quotas N/A N/A resource N/A N/A resources values N/A N/A N/A quotas N/A N/A resource name N/A N/A N/A N/A quotas N/A N/A resource name N/A limit -1 N/A usages N/A N/A N/A N/A quotas N/A N/A resource name N/A in_use -1 N/A N/A N/A quotas N/A N/A resource name N/A reserved -1 N/A remains N/A N/A N/A N/A quotas N/A N/A resource name N/A remains -1 N/A quotas N/A get_user_quotas N/A N/A self context resources project_id user_id quota_class defaults usages N/A None True True N/A N/A Given a list of resources, retrieve the quotas for the given
        user and project.

        :param context: The request context, for access checks.
        :param resources: A dictionary of the registered resources.
        :param project_id: The ID of the project to return quotas for.
        :param user_id: The ID of the user to return quotas for.
        :param quota_class: If project_id != context.project_id, the
                            quota class cannot be determined.  This
                            parameter allows it to be specified.  It
                            will be ignored if project_id ==
                            context.project_id.
        :param defaults: If True, the quota class value (or the
                         default value, if there is no value from the
                         quota class) will be reported if there is no
                         specific value for the resource.
        :param usages: If True, the current in_use and reserved counts
                       will also be returned.
         N/A N/A N/A self _get_noop_quotas resources usages usages N/A get_project_quotas N/A N/A self context resources project_id quota_class defaults usages remains N/A None True True False N/A N/A Given a list of resources, retrieve the quotas for the given
        project.

        :param context: The request context, for access checks.
        :param resources: A dictionary of the registered resources.
        :param project_id: The ID of the project to return quotas for.
        :param quota_class: If project_id != context.project_id, the
                            quota class cannot be determined.  This
                            parameter allows it to be specified.  It
                            will be ignored if project_id ==
                            context.project_id.
        :param defaults: If True, the quota class value (or the
                         default value, if there is no value from the
                         quota class) will be reported if there is no
                         specific value for the resource.
        :param usages: If True, the current in_use and reserved counts
                       will also be returned.
        :param remains: If True, the current remains of the project will
                        will be returned.
         N/A N/A N/A self _get_noop_quotas resources usages usages remains remains N/A get_settable_quotas N/A N/A self context resources project_id user_id N/A None N/A N/A Given a list of resources, retrieve the range of settable quotas for
        the given user or project.

        :param context: The request context, for access checks.
        :param resources: A dictionary of the registered resources.
        :param project_id: The ID of the project to return quotas for.
        :param user_id: The ID of the user to return quotas for.
         N/A quotas N/A N/A resource N/A N/A resources values N/A N/A N/A quotas N/A N/A resource name N/A minimum maximum 0 -1 N/A quotas N/A limit_check N/A N/A self context resources values project_id user_id N/A None None N/A N/A Check simple quota limits.

        For limits--those quotas for which there is no usage
        synchronization function--this method checks that a set of
        proposed values are permitted by the limit restriction.

        This method will raise a QuotaResourceUnknown exception if a
        given resource is unknown or if it is not a simple limit
        resource.

        If any of the proposed values is over the defined quota, an
        OverQuota exception will be raised with the sorted list of the
        resources which are too high.  Otherwise, the method returns
        nothing.

        :param context: The request context, for access checks.
        :param resources: A dictionary of the registered resources.
        :param values: A dictionary of the values to check against the
                       quota.
        :param project_id: Specify the project_id if current context
                           is admin and admin wants to impact on
                           common user's tenant.
        :param user_id: Specify the user_id if current context
                        is admin and admin wants to impact on
                        common user.
         N/A N/A reserve N/A N/A self context resources deltas expire project_id user_id N/A None None None N/A N/A Check quotas and reserve resources.

        For counting quotas--those quotas for which there is a usage
        synchronization function--this method checks quotas against
        current usage and the desired deltas.

        This method will raise a QuotaResourceUnknown exception if a
        given resource is unknown or if it does not have a usage
        synchronization function.

        If any of the proposed values is over the defined quota, an
        OverQuota exception will be raised with the sorted list of the
        resources which are too high.  Otherwise, the method returns a
        list of reservation UUIDs which were created.

        :param context: The request context, for access checks.
        :param resources: A dictionary of the registered resources.
        :param deltas: A dictionary of the proposed delta changes.
        :param expire: An optional parameter specifying an expiration
                       time for the reservations.  If it is a simple
                       number, it is interpreted as a number of
                       seconds and added to the current time; if it is
                       a datetime.timedelta object, it will also be
                       added to the current time.  A datetime.datetime
                       object will be interpreted as the absolute
                       expiration time.  If None is specified, the
                       default expiration time set by
                       --default-reservation-expire will be used (this
                       value will be treated as a number of seconds).
        :param project_id: Specify the project_id if current context
                           is admin and admin wants to impact on
                           common user's tenant.
        :param user_id: Specify the user_id if current context
                        is admin and admin wants to impact on
                        common user.
         N/A N/A N/A commit N/A N/A self context reservations project_id user_id N/A None None N/A N/A Commit reservations.

        :param context: The request context, for access checks.
        :param reservations: A list of the reservation UUIDs, as
                             returned by the reserve() method.
        :param project_id: Specify the project_id if current context
                           is admin and admin wants to impact on
                           common user's tenant.
        :param user_id: Specify the user_id if current context
                        is admin and admin wants to impact on
                        common user.
         N/A N/A rollback N/A N/A self context reservations project_id user_id N/A None None N/A N/A Roll back reservations.

        :param context: The request context, for access checks.
        :param reservations: A list of the reservation UUIDs, as
                             returned by the reserve() method.
        :param project_id: Specify the project_id if current context
                           is admin and admin wants to impact on
                           common user's tenant.
        :param user_id: Specify the user_id if current context
                        is admin and admin wants to impact on
                        common user.
         N/A N/A usage_reset N/A N/A self context resources N/A N/A N/A Reset the usage records for a particular user on a list of
        resources.  This will force that user's usage records to be
        refreshed the next time a reservation is made.

        Note: this does not affect the currently outstanding
        reservations the user has; those reservations must be
        committed or rolled back (or expired).

        :param context: The request context, for access checks.
        :param resources: A list of the resource names for which the
                          usage must be reset.
         N/A N/A destroy_all_by_project_and_user N/A N/A self context project_id user_id N/A N/A N/A Destroy all quotas, usages, and reservations associated with a
        project and user.

        :param context: The request context, for access checks.
        :param project_id: The ID of the project being deleted.
        :param user_id: The ID of the user being deleted.
         N/A N/A destroy_all_by_project N/A N/A self context project_id N/A N/A N/A Destroy all quotas, usages, and reservations associated with a
        project.

        :param context: The request context, for access checks.
        :param project_id: The ID of the project being deleted.
         N/A N/A expire N/A N/A self context N/A N/A N/A Expire reservations.

        Explores all currently existing reservations and rolls back
        any that have expired.

        :param context: The request context, for access checks.
         N/A N/A N/A BaseResource N/A object N/A N/A Describe a single resource for quota checking. __init__ N/A N/A self name flag N/A None N/A N/A Initializes a Resource.

        :param name: The name of the resource, i.e., "instances".
        :param flag: The name of the flag or configuration option
                     which specifies the default value of the quota
                     for this resource.
         N/A N/A self name name N/A N/A self flag flag N/A quota N/A N/A self driver context N/A kwargs N/A N/A Given a driver and context, obtain the quota for this
        resource.

        :param driver: A quota driver.
        :param context: The request context.
        :param project_id: The project to obtain the quota value for.
                           If not provided, it is taken from the
                           context.  If it is given as None, no
                           project-specific quota will be searched
                           for.
        :param quota_class: The quota class corresponding to the
                            project, or for which the quota is to be
                            looked up.  If not provided, it is taken
                            from the context.  If it is given as None,
                            no quota class-specific quota will be
                            searched for.  Note that the quota class
                            defaults to the value in the context,
                            which may not correspond to the project if
                            project_id is not the same as the one in
                            the context.
         N/A project_id N/A N/A kwargs get project_id N/A context project_id N/A quota_class N/A N/A kwargs get quota_class N/A context quota_class N/A project_id N/A N/A N/A N/A N/A N/A driver get_by_project context project_id N/A self name N/A N/A N/A N/A exception ProjectQuotaNotFound N/A N/A N/A quota_class N/A N/A N/A N/A N/A N/A driver get_by_class context quota_class N/A self name N/A N/A N/A N/A exception QuotaClassNotFound N/A N/A N/A N/A self default N/A default N/A N/A self N/A N/A N/A Return the default value of the quota. N/A N/A N/A self flag N/A CONF N/A N/A self flag -1 N/A property N/A ReservableResource N/A BaseResource N/A N/A Describe a reservable resource. N/A valid_method reserve __init__ N/A N/A self name sync flag N/A None N/A N/A Initializes a ReservableResource.

        Reservable resources are those resources which directly
        correspond to objects in the database, i.e., instances,
        cores, etc.

        Usage synchronization function must be associated with each
        object. This function will be called to determine the current
        counts of one or more resources. This association is done in
        database backend.

        The usage synchronization function will be passed three
        arguments: an admin context, the project ID, and an opaque
        session object, which should in turn be passed to the
        underlying database function.  Synchronization functions
        should return a dictionary mapping resource names to the
        current in_use count for those resources; more than one
        resource and resource count may be returned.  Note that
        synchronization functions may be associated with more than one
        ReservableResource.

        :param name: The name of the resource, i.e., "volumes".
        :param sync: A dbapi methods name which returns a dictionary
                     to resynchronize the in_use count for one or more
                     resources, as described above.
        :param flag: The name of the flag or configuration option
                     which specifies the default value of the quota
                     for this resource.
         N/A N/A N/A N/A super ReservableResource self __init__ name flag flag N/A N/A self sync sync N/A N/A AbsoluteResource N/A BaseResource N/A N/A Describe a non-reservable resource. N/A valid_method check N/A CountableResource N/A AbsoluteResource N/A N/A Describe a resource where the counts aren't based solely on the
    project ID.
     __init__ N/A N/A self name count flag N/A None N/A N/A Initializes a CountableResource.

        Countable resources are those resources which directly
        correspond to objects in the database, i.e., instances, cores,
        etc., but for which a count by project ID is inappropriate.  A
        CountableResource must be constructed with a counting
        function, which will be called to determine the current counts
        of the resource.

        The counting function will be passed the context, along with
        the extra positional and keyword arguments that are passed to
        Quota.count().  It should return an integer specifying the
        count.

        Note that this counting is not performed in a transaction-safe
        manner.  This resource class is a temporary measure to provide
        required functionality, until a better approach to solving
        this problem can be evolved.

        :param name: The name of the resource, i.e., "instances".
        :param count: A callable which returns the count of the
                      resource.  The arguments passed are as described
                      above.
        :param flag: The name of the flag or configuration option
                     which specifies the default value of the quota
                     for this resource.
         N/A N/A N/A N/A super CountableResource self __init__ name flag flag N/A N/A self count count N/A N/A QuotaEngine N/A object N/A N/A Represent the set of recognized quotas. __init__ N/A N/A self quota_driver_class N/A None N/A N/A Initialize a Quota object. N/A N/A self _resources N/A N/A N/A self _driver_cls quota_driver_class N/A N/A self __driver None N/A _driver N/A N/A self N/A N/A N/A N/A self __driver N/A N/A N/A self __driver N/A N/A N/A self _driver_cls N/A N/A N/A self _driver_cls N/A CONF quota_driver N/A N/A isinstance N/A self _driver_cls N/A six string_types N/A N/A N/A self _driver_cls N/A N/A importutils import_object N/A self _driver_cls N/A N/A self __driver N/A self _driver_cls N/A N/A self __driver N/A property __contains__ N/A N/A self resource N/A N/A N/A N/A resource N/A self _resources N/A __getitem__ N/A N/A self key N/A N/A N/A N/A key N/A self _resources N/A N/A N/A N/A self _resources N/A key N/A register_resource N/A N/A self resource N/A N/A N/A Register a resource. N/A N/A N/A self _resources N/A N/A resource name resource N/A register_resources N/A N/A self resources N/A N/A N/A Register a list of resources. N/A resource resources N/A N/A N/A N/A self register_resource resource N/A get_by_project_and_user N/A N/A self context project_id user_id resource N/A N/A N/A Get a specific quota by project and user. N/A N/A N/A N/A self _driver get_by_project_and_user context project_id user_id resource N/A get_by_project N/A N/A self context project_id resource N/A N/A N/A Get a specific quota by project. N/A N/A N/A N/A self _driver get_by_project context project_id resource N/A get_by_class N/A N/A self context quota_class resource N/A N/A N/A Get a specific quota by quota class. N/A N/A N/A N/A self _driver get_by_class context quota_class resource N/A get_defaults N/A N/A self context N/A N/A N/A Retrieve the default quotas.

        :param context: The request context, for access checks.
         N/A N/A N/A N/A self _driver get_defaults context N/A self _resources N/A get_class_quotas N/A N/A self context quota_class defaults N/A True N/A N/A Retrieve the quotas for the given quota class.

        :param context: The request context, for access checks.
        :param quota_class: The name of the quota class to return
                            quotas for.
        :param defaults: If True, the default value will be reported
                         if there is no specific value for the
                         resource.
         N/A N/A N/A N/A self _driver get_class_quotas context N/A self _resources quota_class defaults defaults N/A get_user_quotas N/A N/A self context project_id user_id quota_class defaults usages N/A None True True N/A N/A Retrieve the quotas for the given user and project.

        :param context: The request context, for access checks.
        :param project_id: The ID of the project to return quotas for.
        :param user_id: The ID of the user to return quotas for.
        :param quota_class: If project_id != context.project_id, the
                            quota class cannot be determined.  This
                            parameter allows it to be specified.
        :param defaults: If True, the quota class value (or the
                         default value, if there is no value from the
                         quota class) will be reported if there is no
                         specific value for the resource.
        :param usages: If True, the current in_use and reserved counts
                       will also be returned.
         N/A N/A N/A N/A self _driver get_user_quotas context N/A self _resources project_id user_id quota_class quota_class defaults defaults usages usages N/A get_project_quotas N/A N/A self context project_id quota_class defaults usages remains N/A None True True False N/A N/A Retrieve the quotas for the given project.

        :param context: The request context, for access checks.
        :param project_id: The ID of the project to return quotas for.
        :param quota_class: If project_id != context.project_id, the
                            quota class cannot be determined.  This
                            parameter allows it to be specified.
        :param defaults: If True, the quota class value (or the
                         default value, if there is no value from the
                         quota class) will be reported if there is no
                         specific value for the resource.
        :param usages: If True, the current in_use and reserved counts
                       will also be returned.
        :param remains: If True, the current remains of the project will
                        will be returned.
         N/A N/A N/A N/A self _driver get_project_quotas context N/A self _resources project_id quota_class quota_class defaults defaults usages usages remains remains N/A get_settable_quotas N/A N/A self context project_id user_id N/A None N/A N/A Given a list of resources, retrieve the range of settable quotas for
        the given user or project.

        :param context: The request context, for access checks.
        :param project_id: The ID of the project to return quotas for.
        :param user_id: The ID of the user to return quotas for.
         N/A N/A N/A N/A self _driver get_settable_quotas context N/A self _resources project_id user_id user_id N/A count N/A N/A self context resource N/A args kwargs N/A N/A Count a resource.

        For countable resources, invokes the count() function and
        returns its result.  Arguments following the context and
        resource are passed directly to the count function declared by
        the resource.

        :param context: The request context, for access checks.
        :param resource: The name of the resource, as a string.
         N/A res N/A N/A N/A self _resources get resource N/A N/A N/A res N/A N/A hasattr res count N/A N/A N/A N/A exception QuotaResourceUnknown unknown N/A resource N/A N/A N/A res count context args kwargs N/A limit_check N/A N/A self context project_id user_id N/A None None values N/A N/A Check simple quota limits.

        For limits--those quotas for which there is no usage
        synchronization function--this method checks that a set of
        proposed values are permitted by the limit restriction.  The
        values to check are given as keyword arguments, where the key
        identifies the specific quota limit to check, and the value is
        the proposed value.

        This method will raise a QuotaResourceUnknown exception if a
        given resource is unknown or if it is not a simple limit
        resource.

        If any of the proposed values is over the defined quota, an
        OverQuota exception will be raised with the sorted list of the
        resources which are too high.  Otherwise, the method returns
        nothing.

        :param context: The request context, for access checks.
        :param project_id: Specify the project_id if current context
                           is admin and admin wants to impact on
                           common user's tenant.
        :param user_id: Specify the user_id if current context
                        is admin and admin wants to impact on
                        common user.
         N/A N/A N/A N/A self _driver limit_check context N/A self _resources values project_id project_id user_id user_id N/A reserve N/A N/A self context expire project_id user_id N/A None None None deltas N/A N/A Check quotas and reserve resources.

        For counting quotas--those quotas for which there is a usage
        synchronization function--this method checks quotas against
        current usage and the desired deltas.  The deltas are given as
        keyword arguments, and current usage and other reservations
        are factored into the quota check.

        This method will raise a QuotaResourceUnknown exception if a
        given resource is unknown or if it does not have a usage
        synchronization function.

        If any of the proposed values is over the defined quota, an
        OverQuota exception will be raised with the sorted list of the
        resources which are too high.  Otherwise, the method returns a
        list of reservation UUIDs which were created.

        :param context: The request context, for access checks.
        :param expire: An optional parameter specifying an expiration
                       time for the reservations.  If it is a simple
                       number, it is interpreted as a number of
                       seconds and added to the current time; if it is
                       a datetime.timedelta object, it will also be
                       added to the current time.  A datetime.datetime
                       object will be interpreted as the absolute
                       expiration time.  If None is specified, the
                       default expiration time set by
                       --default-reservation-expire will be used (this
                       value will be treated as a number of seconds).
        :param project_id: Specify the project_id if current context
                           is admin and admin wants to impact on
                           common user's tenant.
         N/A reservations N/A N/A N/A self _driver reserve context N/A self _resources deltas expire expire project_id project_id user_id user_id N/A N/A N/A LOG debug Created reservations %s reservations N/A reservations N/A commit N/A N/A self context reservations project_id user_id N/A None None N/A N/A Commit reservations.

        :param context: The request context, for access checks.
        :param reservations: A list of the reservation UUIDs, as
                             returned by the reserve() method.
        :param project_id: Specify the project_id if current context
                           is admin and admin wants to impact on
                           common user's tenant.
         N/A N/A N/A N/A N/A N/A self _driver commit context reservations project_id project_id user_id user_id N/A N/A N/A Exception N/A N/A N/A N/A LOG exception N/A _LE Failed to commit reservations %s reservations N/A N/A N/A N/A LOG debug Committed reservations %s reservations N/A rollback N/A N/A self context reservations project_id user_id N/A None None N/A N/A Roll back reservations.

        :param context: The request context, for access checks.
        :param reservations: A list of the reservation UUIDs, as
                             returned by the reserve() method.
        :param project_id: Specify the project_id if current context
                           is admin and admin wants to impact on
                           common user's tenant.
         N/A N/A N/A N/A N/A N/A self _driver rollback context reservations project_id project_id user_id user_id N/A N/A N/A Exception N/A N/A N/A N/A LOG exception N/A _LE Failed to roll back reservations %s reservations N/A N/A N/A N/A LOG debug Rolled back reservations %s reservations N/A usage_reset N/A N/A self context resources N/A N/A N/A Reset the usage records for a particular user on a list of
        resources.  This will force that user's usage records to be
        refreshed the next time a reservation is made.

        Note: this does not affect the currently outstanding
        reservations the user has; those reservations must be
        committed or rolled back (or expired).

        :param context: The request context, for access checks.
        :param resources: A list of the resource names for which the
                          usage must be reset.
         N/A N/A N/A N/A self _driver usage_reset context resources N/A destroy_all_by_project_and_user N/A N/A self context project_id user_id N/A N/A N/A Destroy all quotas, usages, and reservations associated with a
        project and user.

        :param context: The request context, for access checks.
        :param project_id: The ID of the project being deleted.
        :param user_id: The ID of the user being deleted.
         N/A N/A N/A N/A self _driver destroy_all_by_project_and_user context project_id user_id N/A destroy_all_by_project N/A N/A self context project_id N/A N/A N/A Destroy all quotas, usages, and reservations associated with a
        project.

        :param context: The request context, for access checks.
        :param project_id: The ID of the project being deleted.
         N/A N/A N/A N/A self _driver destroy_all_by_project context project_id N/A expire N/A N/A self context N/A N/A N/A Expire reservations.

        Explores all currently existing reservations and rolls back
        any that have expired.

        :param context: The request context, for access checks.
         N/A N/A N/A N/A self _driver expire context N/A resources N/A N/A self N/A N/A N/A N/A sorted N/A N/A N/A self _resources keys N/A property N/A _keypair_get_count_by_user N/A N/A N/A args kwargs N/A N/A Helper method to avoid referencing objects.KeyPairList on import. N/A N/A N/A N/A objects KeyPairList get_count_by_user args kwargs N/A _server_group_count_members_by_user N/A N/A context group user_id N/A N/A N/A Helper method to avoid referencing objects.InstanceGroup on import. N/A N/A N/A group count_members_by_user user_id N/A N/A QUOTAS N/A QuotaEngine N/A resources N/A N/A ReservableResource instances _sync_instances quota_instances N/A ReservableResource cores _sync_instances quota_cores N/A ReservableResource ram _sync_instances quota_ram N/A ReservableResource security_groups _sync_security_groups quota_security_groups N/A ReservableResource floating_ips _sync_floating_ips quota_floating_ips N/A ReservableResource fixed_ips _sync_fixed_ips quota_fixed_ips N/A AbsoluteResource metadata_items quota_metadata_items N/A AbsoluteResource injected_files quota_injected_files N/A AbsoluteResource injected_file_content_bytes quota_injected_file_content_bytes N/A AbsoluteResource injected_file_path_bytes quota_injected_file_path_length N/A CountableResource security_group_rules N/A db security_group_rule_count_by_group quota_security_group_rules N/A CountableResource key_pairs _keypair_get_count_by_user quota_key_pairs N/A ReservableResource server_groups _sync_server_groups quota_server_groups N/A CountableResource server_group_members _server_group_count_members_by_user quota_server_group_members N/A N/A N/A QUOTAS register_resources resources _valid_method_call_check_resource N/A N/A name method N/A N/A N/A N/A name QUOTAS N/A N/A N/A N/A exception InvalidQuotaMethodUsage method method res name N/A res N/A QUOTAS N/A name N/A N/A N/A res valid_method method N/A N/A N/A N/A exception InvalidQuotaMethodUsage method method res name N/A _valid_method_call_check_resources N/A N/A resource method N/A N/A N/A A method to check whether the resource can use the quota method. N/A name N/A N/A resource keys N/A N/A N/A _valid_method_call_check_resource name method N/A