summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2012-07-18 18:45:35 +0000
committerGerrit Code Review <review@openstack.org>2012-07-18 18:45:35 +0000
commit1cc28ed65bae2b48bb856a07e747ba06de620692 (patch)
tree562721682e0df26baa6c7adeb6a9c48e0adb822d
parent8a54a9fee3e96c4f43f3f293fda9f6844db5cfc7 (diff)
parentfafd1f1651907b9c57a8b944ea70f350e1b244a6 (diff)
downloadnova-1cc28ed65bae2b48bb856a07e747ba06de620692.tar.gz
nova-1cc28ed65bae2b48bb856a07e747ba06de620692.tar.xz
nova-1cc28ed65bae2b48bb856a07e747ba06de620692.zip
Merge "Show all absolute quota limits in /limits."
-rw-r--r--nova/api/openstack/compute/views/limits.py4
-rw-r--r--nova/tests/api/openstack/compute/test_limits.py11
2 files changed, 12 insertions, 3 deletions
diff --git a/nova/api/openstack/compute/views/limits.py b/nova/api/openstack/compute/views/limits.py
index 1c3590984..22e0272ad 100644
--- a/nova/api/openstack/compute/views/limits.py
+++ b/nova/api/openstack/compute/views/limits.py
@@ -47,6 +47,10 @@ class ViewBuilder(object):
"ram": ["maxTotalRAMSize"],
"instances": ["maxTotalInstances"],
"cores": ["maxTotalCores"],
+ "gigabytes": ["maxTotalVolumeGigabytes"],
+ "volumes": ["maxTotalVolumes"],
+ "key_pairs": ["maxTotalKeypairs"],
+ "floating_ips": ["maxTotalFloatingIps"],
"metadata_items": ["maxServerMeta", "maxImageMeta"],
"injected_files": ["maxPersonality"],
"injected_file_content_bytes": ["maxPersonalitySize"],
diff --git a/nova/tests/api/openstack/compute/test_limits.py b/nova/tests/api/openstack/compute/test_limits.py
index c08dc5cef..059deabf7 100644
--- a/nova/tests/api/openstack/compute/test_limits.py
+++ b/nova/tests/api/openstack/compute/test_limits.py
@@ -19,16 +19,13 @@ Tests dealing with HTTP rate-limiting.
import httplib
import StringIO
-import unittest
from xml.dom import minidom
from lxml import etree
-import stubout
import webob
from nova.api.openstack.compute import limits
from nova.api.openstack.compute import views
-from nova.api.openstack import wsgi
from nova.api.openstack import xmlutil
import nova.context
from nova.openstack.common import jsonutils
@@ -123,6 +120,10 @@ class LimitsControllerTest(BaseLimitTestSuite):
'ram': 512,
'instances': 5,
'cores': 21,
+ 'gigabytes': 512,
+ 'volumes': 5,
+ 'key_pairs': 10,
+ 'floating_ips': 10,
}
response = request.get_response(self.controller)
expected = {
@@ -167,6 +168,10 @@ class LimitsControllerTest(BaseLimitTestSuite):
"maxTotalRAMSize": 512,
"maxTotalInstances": 5,
"maxTotalCores": 21,
+ "maxTotalVolumeGigabytes": 512,
+ "maxTotalVolumes": 5,
+ "maxTotalKeypairs": 10,
+ "maxTotalFloatingIps": 10,
},
},
}