From 391f345dfff174108e330de1ed4c7ed18f8ff923 Mon Sep 17 00:00:00 2001 From: Kylin CG Date: Mon, 4 Jun 2012 22:21:41 +0800 Subject: Adds per-user-quotas support for more detailed quotas management Implements blueprint per-user-quotas. Based on the original quotas structure. NOTE: quota_instances, quota_cores, quota_ram, quota_volumes, quota_gigabytes, quota_key_pairs and quota_security_groups are supported per user. Allow 'projectadmin' role to access the user quota setting methods. Add commands 'nova-manage quota project/user' for quotas management. Change-Id: I07a39499432571fedd819c53ae414240cefc3354 --- etc/nova/policy.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'etc/nova') diff --git a/etc/nova/policy.json b/etc/nova/policy.json index dc8ed5b8f..b0a20ee94 100644 --- a/etc/nova/policy.json +++ b/etc/nova/policy.json @@ -1,5 +1,6 @@ { "admin_or_owner": [["role:admin"], ["project_id:%(project_id)s"]], + "admin_or_projectadmin": [["role:projectadmin"], ["role:admin"]], "default": [["rule:admin_or_owner"]], @@ -48,7 +49,8 @@ "compute_extension:networks": [["rule:admin_api"]], "compute_extension:networks:view": [], "compute_extension:quotas:show": [], - "compute_extension:quotas:update": [["rule:admin_api"]], + "compute_extension:quotas:update_for_project": [["rule:admin_api"]], + "compute_extension:quotas:update_for_user": [["rule:admin_or_projectadmin"]], "compute_extension:quota_classes": [], "compute_extension:rescue": [], "compute_extension:security_groups": [], -- cgit