From 7930e4596107e567681de8798c92cb69cd6fbe09 Mon Sep 17 00:00:00 2001 From: Babu Shanmugam Date: Fri, 29 May 2015 07:07:03 +0000 Subject: [PATCH] Setting quotas to 0 to avoid a tenant from creating a resource Change-Id: Iade93b5c2042c8df336660fb2a01df2d1e4fc585 Fixes-bug: #1459939 --- src/config/api-server/vnc_quota.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config/api-server/vnc_quota.py b/src/config/api-server/vnc_quota.py index 72cd8142855..9f7eb8e0477 100644 --- a/src/config/api-server/vnc_quota.py +++ b/src/config/api-server/vnc_quota.py @@ -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)