Instead of trying to fix OverQuota logic in _check_num_instances_quota(), why not just repeatedly call QUOTAS.reserve with a decrementing valued until it works ? That would leave all of the quota checking logic inside the quota class - which is better from an abstraction perspective.
Instead of trying to fix OverQuota logic in _check_ num_instances_ quota() , why not just repeatedly call QUOTAS.reserve with a decrementing valued until it works ? That would leave all of the quota checking logic inside the quota class - which is better from an abstraction perspective.