Merge "Add description to policies in used_limits"

This commit is contained in:
Jenkins 2017-03-28 18:27:55 +00:00 committed by Gerrit Code Review
commit 640b152004
1 changed files with 16 additions and 3 deletions

View File

@ -26,9 +26,22 @@ used_limits_policies = [
policy.RuleDefault(
name=POLICY_ROOT % 'discoverable',
check_str=base.RULE_ANY),
policy.RuleDefault(
name=BASE_POLICY_NAME,
check_str=base.RULE_ADMIN_API),
# TODO(aunnam): Remove this rule after we seperate the scope check from
# policies, as this is only checking the scope.
base.create_rule_default(
BASE_POLICY_NAME,
base.RULE_ADMIN_API,
"""Shows rate and absolute limits for the project.
This policy only checks if the user has access to the requested
project limits. And this check is performed only after the check
os_compute_api:limits passes""",
[
{
'method': 'GET',
'path': '/limits'
}
]),
]