From d35c434e405022a5d6fb392a15f6c3271e910e01 Mon Sep 17 00:00:00 2001 From: ghanshyam Date: Wed, 17 May 2017 10:00:43 +0300 Subject: [PATCH] Add policy description for 'limits' This commit adds policy doc for 'limits' policies. Partial implement blueprint policy-docs Change-Id: Iba3ac6804f105e3ec9cc0bf8187fb35710c929f6 --- nova/policies/limits.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/nova/policies/limits.py b/nova/policies/limits.py index 7d47d786ff81..56c5b14575ce 100644 --- a/nova/policies/limits.py +++ b/nova/policies/limits.py @@ -13,8 +13,6 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_policy import policy - from nova.policies import base @@ -22,9 +20,16 @@ BASE_POLICY_NAME = 'os_compute_api:limits' limits_policies = [ - policy.RuleDefault( - name=BASE_POLICY_NAME, - check_str=base.RULE_ADMIN_OR_OWNER), + base.create_rule_default( + BASE_POLICY_NAME, + base.RULE_ADMIN_OR_OWNER, + """Shows rate and absolute limits for the project.""", + [ + { + 'method': 'GET', + 'path': '/limits' + } + ]), ]