summaryrefslogtreecommitdiffstats
path: root/nova/tests
diff options
context:
space:
mode:
authorMichael Still <mikal@stillhq.com>2013-03-29 09:00:46 +1100
committerMichael Still <mikal@stillhq.com>2013-03-29 14:23:13 +1100
commit78c7edc52efdf31d844b8bb38c2460add4c864fb (patch)
tree6089eea48759e9124f6ba6b2487d25e2a91232f5 /nova/tests
parent2134199856dc66284925d024b053a639818b0181 (diff)
Set default fixed_ip quota to unlimited.
DocImpact: our previous default quota of ten was poorly thought through and resulted in upgrade problems. Instead, let's have operators opt into fixed IP quotas. This change should be mentioned in release notes please. Resolves bug 1161190. Change-Id: I2f066a0129461899fe330a628cf49ee5273eaba4
Diffstat (limited to 'nova/tests')
-rw-r--r--nova/tests/api/openstack/compute/contrib/test_quota_classes.py16
-rw-r--r--nova/tests/api/openstack/compute/contrib/test_quotas.py26
-rw-r--r--nova/tests/integrated/api_samples/os-quota-class-sets/quota-classes-show-get-resp.json.tpl2
-rw-r--r--nova/tests/integrated/api_samples/os-quota-class-sets/quota-classes-show-get-resp.xml.tpl2
-rw-r--r--nova/tests/integrated/api_samples/os-quota-class-sets/quota-classes-update-post-req.json.tpl2
-rw-r--r--nova/tests/integrated/api_samples/os-quota-class-sets/quota-classes-update-post-req.xml.tpl2
-rw-r--r--nova/tests/integrated/api_samples/os-quota-class-sets/quota-classes-update-post-resp.json.tpl4
-rw-r--r--nova/tests/integrated/api_samples/os-quota-class-sets/quota-classes-update-post-resp.xml.tpl4
-rw-r--r--nova/tests/integrated/api_samples/os-quota-sets/quotas-show-defaults-get-resp.json.tpl2
-rw-r--r--nova/tests/integrated/api_samples/os-quota-sets/quotas-show-defaults-get-resp.xml.tpl2
-rw-r--r--nova/tests/integrated/api_samples/os-quota-sets/quotas-show-get-resp.json.tpl2
-rw-r--r--nova/tests/integrated/api_samples/os-quota-sets/quotas-show-get-resp.xml.tpl2
-rw-r--r--nova/tests/integrated/api_samples/os-quota-sets/quotas-update-post-resp.json.tpl2
-rw-r--r--nova/tests/integrated/api_samples/os-quota-sets/quotas-update-post-resp.xml.tpl2
14 files changed, 35 insertions, 35 deletions
diff --git a/nova/tests/api/openstack/compute/contrib/test_quota_classes.py b/nova/tests/api/openstack/compute/contrib/test_quota_classes.py
index 8286661a0..c4f79118e 100644
--- a/nova/tests/api/openstack/compute/contrib/test_quota_classes.py
+++ b/nova/tests/api/openstack/compute/contrib/test_quota_classes.py
@@ -25,7 +25,7 @@ from nova.tests.api.openstack import fakes
def quota_set(class_name):
return {'quota_class_set': {'id': class_name, 'metadata_items': 128,
'ram': 51200, 'floating_ips': 10,
- 'fixed_ips': 10, 'instances': 10,
+ 'fixed_ips': -1, 'instances': 10,
'injected_files': 5, 'cores': 20,
'injected_file_content_bytes': 10240,
'security_groups': 10,
@@ -45,7 +45,7 @@ class QuotaClassSetsTest(test.TestCase):
'cores': 20,
'ram': 51200,
'floating_ips': 10,
- 'fixed_ips': 10,
+ 'fixed_ips': -1,
'metadata_items': 128,
'injected_files': 5,
'injected_file_path_bytes': 255,
@@ -64,7 +64,7 @@ class QuotaClassSetsTest(test.TestCase):
self.assertEqual(qs['cores'], 20)
self.assertEqual(qs['ram'], 51200)
self.assertEqual(qs['floating_ips'], 10)
- self.assertEqual(qs['fixed_ips'], 10)
+ self.assertEqual(qs['fixed_ips'], -1)
self.assertEqual(qs['metadata_items'], 128)
self.assertEqual(qs['injected_files'], 5)
self.assertEqual(qs['injected_file_path_bytes'], 255)
@@ -90,7 +90,7 @@ class QuotaClassSetsTest(test.TestCase):
def test_quotas_update_as_admin(self):
body = {'quota_class_set': {'instances': 50, 'cores': 50,
'ram': 51200, 'floating_ips': 10,
- 'fixed_ips': 10, 'metadata_items': 128,
+ 'fixed_ips': -1, 'metadata_items': 128,
'injected_files': 5,
'injected_file_content_bytes': 10240,
'injected_file_path_bytes': 255,
@@ -108,7 +108,7 @@ class QuotaClassSetsTest(test.TestCase):
def test_quotas_update_as_user(self):
body = {'quota_class_set': {'instances': 50, 'cores': 50,
'ram': 51200, 'floating_ips': 10,
- 'fixed_ips': 10, 'metadata_items': 128,
+ 'fixed_ips': -1, 'metadata_items': 128,
'injected_files': 5,
'injected_file_content_bytes': 10240,
'security_groups': 10,
@@ -136,7 +136,7 @@ class QuotaTemplateXMLSerializerTest(test.TestCase):
injected_file_content_bytes=20,
ram=50,
floating_ips=60,
- fixed_ips=10,
+ fixed_ips=-1,
instances=70,
injected_files=80,
security_groups=10,
@@ -161,7 +161,7 @@ class QuotaTemplateXMLSerializerTest(test.TestCase):
injected_file_content_bytes='20',
ram='50',
floating_ips='60',
- fixed_ips='10',
+ fixed_ips='-1',
instances='70',
injected_files='80',
security_groups='10',
@@ -175,7 +175,7 @@ class QuotaTemplateXMLSerializerTest(test.TestCase):
'</injected_file_content_bytes>'
'<ram>50</ram>'
'<floating_ips>60</floating_ips>'
- '<fixed_ips>10</fixed_ips>'
+ '<fixed_ips>-1</fixed_ips>'
'<instances>70</instances>'
'<injected_files>80</injected_files>'
'<cores>90</cores>'
diff --git a/nova/tests/api/openstack/compute/contrib/test_quotas.py b/nova/tests/api/openstack/compute/contrib/test_quotas.py
index 1ff7e60ab..c95c41614 100644
--- a/nova/tests/api/openstack/compute/contrib/test_quotas.py
+++ b/nova/tests/api/openstack/compute/contrib/test_quotas.py
@@ -26,7 +26,7 @@ from nova.tests.api.openstack import fakes
def quota_set(id):
return {'quota_set': {'id': id, 'metadata_items': 128,
- 'ram': 51200, 'floating_ips': 10, 'fixed_ips': 10,
+ 'ram': 51200, 'floating_ips': 10, 'fixed_ips': -1,
'instances': 10, 'injected_files': 5, 'cores': 20,
'injected_file_content_bytes': 10240,
'security_groups': 10, 'security_group_rules': 20,
@@ -45,7 +45,7 @@ class QuotaSetsTest(test.TestCase):
'cores': 20,
'ram': 51200,
'floating_ips': 10,
- 'fixed_ips': 10,
+ 'fixed_ips': -1,
'metadata_items': 128,
'injected_files': 5,
'injected_file_path_bytes': 255,
@@ -62,7 +62,7 @@ class QuotaSetsTest(test.TestCase):
self.assertEqual(qs['cores'], 20)
self.assertEqual(qs['ram'], 51200)
self.assertEqual(qs['floating_ips'], 10)
- self.assertEqual(qs['fixed_ips'], 10)
+ self.assertEqual(qs['fixed_ips'], -1)
self.assertEqual(qs['metadata_items'], 128)
self.assertEqual(qs['injected_files'], 5)
self.assertEqual(qs['injected_file_path_bytes'], 255)
@@ -83,7 +83,7 @@ class QuotaSetsTest(test.TestCase):
'cores': 20,
'ram': 51200,
'floating_ips': 10,
- 'fixed_ips': 10,
+ 'fixed_ips': -1,
'metadata_items': 128,
'injected_files': 5,
'injected_file_path_bytes': 255,
@@ -109,13 +109,13 @@ class QuotaSetsTest(test.TestCase):
def test_quotas_update_as_admin(self):
body = {'quota_set': {'instances': 50, 'cores': 50,
'ram': 51200, 'floating_ips': 10,
- 'fixed_ips': 10, 'metadata_items': 128,
+ 'fixed_ips': -1, 'metadata_items': 128,
'injected_files': 5,
'injected_file_content_bytes': 10240,
'injected_file_path_bytes': 255,
'security_groups': 10,
'security_group_rules': 20,
- 'key_pairs': 100, 'fixed_ips': 10}}
+ 'key_pairs': 100, 'fixed_ips': -1}}
req = fakes.HTTPRequest.blank('/v2/fake4/os-quota-sets/update_me',
use_admin_context=True)
@@ -126,7 +126,7 @@ class QuotaSetsTest(test.TestCase):
def test_quotas_update_as_user(self):
body = {'quota_set': {'instances': 50, 'cores': 50,
'ram': 51200, 'floating_ips': 10,
- 'fixed_ips': 10, 'metadata_items': 128,
+ 'fixed_ips': -1, 'metadata_items': 128,
'injected_files': 5,
'injected_file_content_bytes': 10240,
'security_groups': 10,
@@ -163,7 +163,7 @@ class QuotaSetsTest(test.TestCase):
expected_resp = {'quota_set': {
'instances': 50, 'cores': 50,
'ram': 51200, 'floating_ips': 10,
- 'fixed_ips': 10, 'metadata_items': 128,
+ 'fixed_ips': -1, 'metadata_items': 128,
'injected_files': 5,
'injected_file_content_bytes': 10240,
'injected_file_path_bytes': 255,
@@ -174,7 +174,7 @@ class QuotaSetsTest(test.TestCase):
# when PUT JSON format with empty string for quota
body = {'quota_set': {'instances': 50, 'cores': 50,
'ram': '', 'floating_ips': 10,
- 'fixed_ips': 10, 'metadata_items': 128,
+ 'fixed_ips': -1, 'metadata_items': 128,
'injected_files': 5,
'injected_file_content_bytes': 10240,
'injected_file_path_bytes': 255,
@@ -189,7 +189,7 @@ class QuotaSetsTest(test.TestCase):
# when PUT XML format with empty string for quota
body = {'quota_set': {'instances': 50, 'cores': 50,
'ram': {}, 'floating_ips': 10,
- 'fixed_ips': 10, 'metadata_items': 128,
+ 'fixed_ips': -1, 'metadata_items': 128,
'injected_files': 5,
'injected_file_content_bytes': 10240,
'injected_file_path_bytes': 255,
@@ -216,7 +216,7 @@ class QuotaXMLSerializerTest(test.TestCase):
injected_file_content_bytes=20,
ram=50,
floating_ips=60,
- fixed_ips=10,
+ fixed_ips=-1,
instances=70,
injected_files=80,
security_groups=10,
@@ -240,7 +240,7 @@ class QuotaXMLSerializerTest(test.TestCase):
injected_file_content_bytes='20',
ram='50',
floating_ips='60',
- fixed_ips='10',
+ fixed_ips='-1',
instances='70',
injected_files='80',
security_groups='10',
@@ -254,7 +254,7 @@ class QuotaXMLSerializerTest(test.TestCase):
'</injected_file_content_bytes>'
'<ram>50</ram>'
'<floating_ips>60</floating_ips>'
- '<fixed_ips>10</fixed_ips>'
+ '<fixed_ips>-1</fixed_ips>'
'<instances>70</instances>'
'<injected_files>80</injected_files>'
'<security_groups>10</security_groups>'
diff --git a/nova/tests/integrated/api_samples/os-quota-class-sets/quota-classes-show-get-resp.json.tpl b/nova/tests/integrated/api_samples/os-quota-class-sets/quota-classes-show-get-resp.json.tpl
index c393ab0c7..f9a94e760 100644
--- a/nova/tests/integrated/api_samples/os-quota-class-sets/quota-classes-show-get-resp.json.tpl
+++ b/nova/tests/integrated/api_samples/os-quota-class-sets/quota-classes-show-get-resp.json.tpl
@@ -2,7 +2,7 @@
"quota_class_set": {
"cores": 20,
"floating_ips": 10,
- "fixed_ips": 10,
+ "fixed_ips": -1,
"id": "%(set_id)s",
"injected_file_content_bytes": 10240,
"injected_file_path_bytes": 255,
diff --git a/nova/tests/integrated/api_samples/os-quota-class-sets/quota-classes-show-get-resp.xml.tpl b/nova/tests/integrated/api_samples/os-quota-class-sets/quota-classes-show-get-resp.xml.tpl
index 8ab8436d7..fb8e7992a 100644
--- a/nova/tests/integrated/api_samples/os-quota-class-sets/quota-classes-show-get-resp.xml.tpl
+++ b/nova/tests/integrated/api_samples/os-quota-class-sets/quota-classes-show-get-resp.xml.tpl
@@ -2,7 +2,7 @@
<quota_class_set id="%(set_id)s">
<cores>20</cores>
<floating_ips>10</floating_ips>
- <fixed_ips>10</fixed_ips>
+ <fixed_ips>-1</fixed_ips>
<injected_file_content_bytes>10240</injected_file_content_bytes>
<injected_file_path_bytes>255</injected_file_path_bytes>
<injected_files>5</injected_files>
diff --git a/nova/tests/integrated/api_samples/os-quota-class-sets/quota-classes-update-post-req.json.tpl b/nova/tests/integrated/api_samples/os-quota-class-sets/quota-classes-update-post-req.json.tpl
index 3974f65db..483fda8c5 100644
--- a/nova/tests/integrated/api_samples/os-quota-class-sets/quota-classes-update-post-req.json.tpl
+++ b/nova/tests/integrated/api_samples/os-quota-class-sets/quota-classes-update-post-req.json.tpl
@@ -4,7 +4,7 @@
"cores": 50,
"ram": 51200,
"floating_ips": 10,
- "fixed_ips": 10,
+ "fixed_ips": -1,
"metadata_items": 128,
"injected_files": 5,
"injected_file_content_bytes": 10240,
diff --git a/nova/tests/integrated/api_samples/os-quota-class-sets/quota-classes-update-post-req.xml.tpl b/nova/tests/integrated/api_samples/os-quota-class-sets/quota-classes-update-post-req.xml.tpl
index f27082ab3..150fb6a42 100644
--- a/nova/tests/integrated/api_samples/os-quota-class-sets/quota-classes-update-post-req.xml.tpl
+++ b/nova/tests/integrated/api_samples/os-quota-class-sets/quota-classes-update-post-req.xml.tpl
@@ -2,7 +2,7 @@
<quota_class_set>
<cores>50</cores>
<floating_ips>10</floating_ips>
- <fixed_ips>10</fixed_ips>
+ <fixed_ips>-1</fixed_ips>
<injected_file_content_bytes>10240</injected_file_content_bytes>
<injected_file_path_bytes>255</injected_file_path_bytes>
<injected_files>5</injected_files>
diff --git a/nova/tests/integrated/api_samples/os-quota-class-sets/quota-classes-update-post-resp.json.tpl b/nova/tests/integrated/api_samples/os-quota-class-sets/quota-classes-update-post-resp.json.tpl
index 8d195b924..c36783f2f 100644
--- a/nova/tests/integrated/api_samples/os-quota-class-sets/quota-classes-update-post-resp.json.tpl
+++ b/nova/tests/integrated/api_samples/os-quota-class-sets/quota-classes-update-post-resp.json.tpl
@@ -2,7 +2,7 @@
"quota_class_set": {
"cores": 50,
"floating_ips": 10,
- "fixed_ips": 10,
+ "fixed_ips": -1,
"injected_file_content_bytes": 10240,
"injected_file_path_bytes": 255,
"injected_files": 5,
@@ -13,4 +13,4 @@
"security_group_rules": 20,
"security_groups": 10
}
-} \ No newline at end of file
+}
diff --git a/nova/tests/integrated/api_samples/os-quota-class-sets/quota-classes-update-post-resp.xml.tpl b/nova/tests/integrated/api_samples/os-quota-class-sets/quota-classes-update-post-resp.xml.tpl
index 5c12a81e7..cd674a24d 100644
--- a/nova/tests/integrated/api_samples/os-quota-class-sets/quota-classes-update-post-resp.xml.tpl
+++ b/nova/tests/integrated/api_samples/os-quota-class-sets/quota-classes-update-post-resp.xml.tpl
@@ -2,7 +2,7 @@
<quota_class_set>
<cores>50</cores>
<floating_ips>10</floating_ips>
- <fixed_ips>10</fixed_ips>
+ <fixed_ips>-1</fixed_ips>
<injected_file_content_bytes>10240</injected_file_content_bytes>
<injected_file_path_bytes>255</injected_file_path_bytes>
<injected_files>5</injected_files>
@@ -12,4 +12,4 @@
<ram>51200</ram>
<security_group_rules>20</security_group_rules>
<security_groups>10</security_groups>
-</quota_class_set> \ No newline at end of file
+</quota_class_set>
diff --git a/nova/tests/integrated/api_samples/os-quota-sets/quotas-show-defaults-get-resp.json.tpl b/nova/tests/integrated/api_samples/os-quota-sets/quotas-show-defaults-get-resp.json.tpl
index 364a59f7a..2f0fd9857 100644
--- a/nova/tests/integrated/api_samples/os-quota-sets/quotas-show-defaults-get-resp.json.tpl
+++ b/nova/tests/integrated/api_samples/os-quota-sets/quotas-show-defaults-get-resp.json.tpl
@@ -2,7 +2,7 @@
"quota_set": {
"cores": 20,
"floating_ips": 10,
- "fixed_ips": 10,
+ "fixed_ips": -1,
"id": "fake_tenant",
"injected_file_content_bytes": 10240,
"injected_file_path_bytes": 255,
diff --git a/nova/tests/integrated/api_samples/os-quota-sets/quotas-show-defaults-get-resp.xml.tpl b/nova/tests/integrated/api_samples/os-quota-sets/quotas-show-defaults-get-resp.xml.tpl
index 36e6da544..f56987563 100644
--- a/nova/tests/integrated/api_samples/os-quota-sets/quotas-show-defaults-get-resp.xml.tpl
+++ b/nova/tests/integrated/api_samples/os-quota-sets/quotas-show-defaults-get-resp.xml.tpl
@@ -2,7 +2,7 @@
<quota_set id="fake_tenant">
<cores>20</cores>
<floating_ips>10</floating_ips>
- <fixed_ips>10</fixed_ips>
+ <fixed_ips>-1</fixed_ips>
<injected_file_content_bytes>10240</injected_file_content_bytes>
<injected_file_path_bytes>255</injected_file_path_bytes>
<injected_files>5</injected_files>
diff --git a/nova/tests/integrated/api_samples/os-quota-sets/quotas-show-get-resp.json.tpl b/nova/tests/integrated/api_samples/os-quota-sets/quotas-show-get-resp.json.tpl
index 364a59f7a..2f0fd9857 100644
--- a/nova/tests/integrated/api_samples/os-quota-sets/quotas-show-get-resp.json.tpl
+++ b/nova/tests/integrated/api_samples/os-quota-sets/quotas-show-get-resp.json.tpl
@@ -2,7 +2,7 @@
"quota_set": {
"cores": 20,
"floating_ips": 10,
- "fixed_ips": 10,
+ "fixed_ips": -1,
"id": "fake_tenant",
"injected_file_content_bytes": 10240,
"injected_file_path_bytes": 255,
diff --git a/nova/tests/integrated/api_samples/os-quota-sets/quotas-show-get-resp.xml.tpl b/nova/tests/integrated/api_samples/os-quota-sets/quotas-show-get-resp.xml.tpl
index 36e6da544..f56987563 100644
--- a/nova/tests/integrated/api_samples/os-quota-sets/quotas-show-get-resp.xml.tpl
+++ b/nova/tests/integrated/api_samples/os-quota-sets/quotas-show-get-resp.xml.tpl
@@ -2,7 +2,7 @@
<quota_set id="fake_tenant">
<cores>20</cores>
<floating_ips>10</floating_ips>
- <fixed_ips>10</fixed_ips>
+ <fixed_ips>-1</fixed_ips>
<injected_file_content_bytes>10240</injected_file_content_bytes>
<injected_file_path_bytes>255</injected_file_path_bytes>
<injected_files>5</injected_files>
diff --git a/nova/tests/integrated/api_samples/os-quota-sets/quotas-update-post-resp.json.tpl b/nova/tests/integrated/api_samples/os-quota-sets/quotas-update-post-resp.json.tpl
index 43525cfd5..34df1fe01 100644
--- a/nova/tests/integrated/api_samples/os-quota-sets/quotas-update-post-resp.json.tpl
+++ b/nova/tests/integrated/api_samples/os-quota-sets/quotas-update-post-resp.json.tpl
@@ -2,7 +2,7 @@
"quota_set": {
"cores": 20,
"floating_ips": 10,
- "fixed_ips": 10,
+ "fixed_ips": -1,
"injected_file_content_bytes": 10240,
"injected_file_path_bytes": 255,
"injected_files": 5,
diff --git a/nova/tests/integrated/api_samples/os-quota-sets/quotas-update-post-resp.xml.tpl b/nova/tests/integrated/api_samples/os-quota-sets/quotas-update-post-resp.xml.tpl
index 3c411e8e5..91ac3a0dd 100644
--- a/nova/tests/integrated/api_samples/os-quota-sets/quotas-update-post-resp.xml.tpl
+++ b/nova/tests/integrated/api_samples/os-quota-sets/quotas-update-post-resp.xml.tpl
@@ -2,7 +2,7 @@
<quota_set>
<cores>20</cores>
<floating_ips>10</floating_ips>
- <fixed_ips>10</fixed_ips>
+ <fixed_ips>-1</fixed_ips>
<injected_file_content_bytes>10240</injected_file_content_bytes>
<injected_file_path_bytes>255</injected_file_path_bytes>
<injected_files>5</injected_files>