Skip to content

Commit

Permalink
Setting quotas to 0 to avoid a tenant from creating a resource
Browse files Browse the repository at this point in the history
Change-Id: Iade93b5c2042c8df336660fb2a01df2d1e4fc585
Fixes-bug: #1459939
(cherry picked from commit 7930e45)
  • Loading branch information
anbu-enovance authored and eonpatapon committed Mar 25, 2016
1 parent 52282db commit 2afa734
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/config/api-server/vnc_quota.py
Expand Up @@ -30,7 +30,7 @@ def get_quota_limit(cls, proj_dict, obj_type):
@classmethod
def check_quota_limit(cls, proj_dict, obj_type, quota_count):
quota_limit = cls.get_quota_limit(proj_dict, obj_type)
if quota_limit > 0 and quota_count >= quota_limit:
if quota_limit >= 0 and quota_count >= quota_limit:
return (False, 'quota limit (%d) exceeded for resource %s'
% (quota_limit, obj_type))
return (True, quota_limit)
Expand Down

0 comments on commit 2afa734

Please sign in to comment.