From 838718c80735f625633387d8ce1318261cae89ea Mon Sep 17 00:00:00 2001 From: Miranda Zhang Date: Mon, 30 Dec 2013 08:03:41 +0000 Subject: [PATCH] Modify API ref for per-project-user quotas CRUD methods **tenant** is an entity that owns the resources, sometines called a project, sometimes the same as a user In addition to the owning entity (tenant), openstack stores the entity performing the action as the **user**. 1st tenant ID in the URI, is the ID of the admin user 2ed tenant ID in the URI, is the project ID/Name User ID is specified vis query string. (I tried my best to express what I mean using the current WADL markup.) Changed the url path structure. http://api.openstack.org/api-ref-compute.html#os-quota-sets Changed the sample responses to point to the new ones in /api_samples/os-user-quotas/ For the other part, in the original bug description: Add commands for project user quotas management. - Show user quotas: nova-manage project quota --project --user - Update/Create user quotas: nova-manage project quota --project --user --key --value I found this page: https://wiki.openstack.org/wiki/NovaManage "The nova-manage isn't properly documented, but it's going away in Folsom, so using this wiki page for quick docs on it." Looks like the usage of this method still needs further validation, so dose the API call. It may need to be futher documented in docs.openstack.org/trunk/openstack-ops/content/quotas.html In the response: "fixed_ips": -1 Does not seem to be right to have negative value for number of IPs. docs.openstack.org/user-guide-admin/content/cli_set_quotas.html "Number of fixed IP addresses allowed per tenant. This number must be equal to or greater than the number of allowed instances." Change-Id: Id4e08170ebf04ebb4ba846bf8b576a228b91441b Closes-Bug: #1187277 --- .../compute-api/src/ext/os-quota-sets.wadl | 69 +++++++++++++------ 1 file changed, 49 insertions(+), 20 deletions(-) diff --git a/api-ref/src/wadls/compute-api/src/ext/os-quota-sets.wadl b/api-ref/src/wadls/compute-api/src/ext/os-quota-sets.wadl index 83f6bd467..06022f9fe 100644 --- a/api-ref/src/wadls/compute-api/src/ext/os-quota-sets.wadl +++ b/api-ref/src/wadls/compute-api/src/ext/os-quota-sets.wadl @@ -9,7 +9,7 @@ xmlns:wadl="http://wadl.dev.java.net/2009/02"> - + - - + + - The user ID. Specify in the URI - as - user_id={user_id}. + xml:lang="EN" title="Project ID"> + The ID for the tenant for which + you want to show quotas. This ID is + different from the first tenant ID + that you specify in the URI: That + ID is for the admin tenant. - - + + + + The user ID. Specify in the + URI as a query string, like + user_id={user_id}. + + + + + - + + + + The user ID. Specify in the + URI as a query string, like + user_id={user_id}. + + + + @@ -140,8 +168,9 @@ Shows - quotas for a specified tenant and user. + title="Show quotas for user">Enables an admin user to show quotas for a specified + tenant and user. "aSetsRespParameters; @@ -149,7 +178,7 @@ xml:lang="EN" title="Show quotas for user: JSON response"> @@ -158,7 +187,7 @@ xml:lang="EN" title="Show quotas for user: XML response"> @@ -168,7 +197,7 @@ Updates quotas for a specified - tenant and user. + tenant/project and user. "aSetsReqParameters; @@ -176,7 +205,7 @@ xml:lang="EN" title="Update quotas for user: JSON request"> @@ -185,7 +214,7 @@ xml:lang="EN" title="Update quotas for user: XML request"> @@ -196,7 +225,7 @@ xml:lang="EN" title="Update quotas for user: JSON response"> @@ -205,7 +234,7 @@ xml:lang="EN" title="Show quotas for user: XML response">