diff --git a/nova/policies/quota_class_sets.py b/nova/policies/quota_class_sets.py index 240e8aef4434..2710436fcbd5 100644 --- a/nova/policies/quota_class_sets.py +++ b/nova/policies/quota_class_sets.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,12 +20,26 @@ POLICY_ROOT = 'os_compute_api:os-quota-class-sets:%s' quota_class_sets_policies = [ - policy.RuleDefault( - name=POLICY_ROOT % 'show', - check_str='is_admin:True or quota_class:%(quota_class)s'), - policy.RuleDefault( - name=POLICY_ROOT % 'update', - check_str=base.RULE_ADMIN_API), + base.create_rule_default( + POLICY_ROOT % 'show', + 'is_admin:True or quota_class:%(quota_class)s', + "List quotas for specific quota classs", + [ + { + 'method': 'GET', + 'path': '/os-quota-class-sets/{quota_class}' + } + ]), + base.create_rule_default( + POLICY_ROOT % 'update', + base.RULE_ADMIN_API, + 'Update quotas for specific quota class', + [ + { + 'method': 'PUT', + 'path': '/os-quota-class-sets/{quota_class}' + } + ]), ]