axsh/wakame-vdc — pull request #147 by unakatsuo (2012-12-19 05:10:45+00:00)
Title: Quota evaluation missing for request amount.

Quota evaluation looks up missing value for the resources to be created/updated. Only current resource total is compared to the limit so that the user has chance to add larger resource which should not be accepted.

We say the newly created resource size the request amount. Since the request amount can be retrieved in different way based on API call, the quota definition syntax for each Sinatra endpoint method will be extended as below.

```
quota 'instance.quota_weight' do
request_amount do
# returns value from quota_weight query string.
params[:quota_weight]
end
end
post '/instaces' do
.....

```