summaryrefslogtreecommitdiffstats
path: root/nova/tests
diff options
context:
space:
mode:
authorChris Yeoh <cyeoh@au1.ibm.com>2013-05-22 21:10:03 +0930
committerChris Yeoh <cyeoh@au1.ibm.com>2013-06-07 10:16:59 +0930
commitbc0a05dd4aa5e1eb104efd63fda7bbe939bc7cbe (patch)
treef1d197771e0965a3eb59e33983376ce8331e6cee /nova/tests
parent8b632660aff27582c9b8ced3e0642399f3139f81 (diff)
downloadnova-bc0a05dd4aa5e1eb104efd63fda7bbe939bc7cbe.tar.gz
nova-bc0a05dd4aa5e1eb104efd63fda7bbe939bc7cbe.tar.xz
nova-bc0a05dd4aa5e1eb104efd63fda7bbe939bc7cbe.zip
Handle security group quota exceeded gracefully
Handle the security group quota exceeded more gracefully so a traceback is not generated in the log files when this error occurs. This does not change the API as the HTTP status code returned remains the same. Fixes bug 1182859 Change-Id: Id3ac513048751759f01b328482b4f02e26ff66ee
Diffstat (limited to 'nova/tests')
-rw-r--r--nova/tests/api/openstack/compute/contrib/test_security_groups.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/nova/tests/api/openstack/compute/contrib/test_security_groups.py b/nova/tests/api/openstack/compute/contrib/test_security_groups.py
index 1406ed97a..6bd220198 100644
--- a/nova/tests/api/openstack/compute/contrib/test_security_groups.py
+++ b/nova/tests/api/openstack/compute/contrib/test_security_groups.py
@@ -273,7 +273,7 @@ class TestSecurityGroups(test.TestCase):
self.assertEqual(res_dict['security_group']['name'], name)
sg = security_group_template()
- self.assertRaises(exception.SecurityGroupLimitExceeded,
+ self.assertRaises(webob.exc.HTTPRequestEntityTooLarge,
self.controller.create,
req, {'security_group': sg})
@@ -1139,7 +1139,7 @@ class TestSecurityGroupRules(test.TestCase):
'ip_protocol': 'tcp', 'from_port': '121', 'to_port': '121',
'parent_group_id': self.sg2['id'], 'group_id': self.sg1['id']
}
- self.assertRaises(exception.SecurityGroupLimitExceeded,
+ self.assertRaises(webob.exc.HTTPRequestEntityTooLarge,
self.controller.create,
req, {'security_group_rule': rule})