diff --git a/nova/exception.py b/nova/exception.py index 129dc775f..d749d89a0 100644 --- a/nova/exception.py +++ b/nova/exception.py @@ -871,3 +871,8 @@ class NoValidHost(NovaException): class WillNotSchedule(NovaException): message = _("Host %(host)s is not up or doesn't exist.") + + +class QuotaError(ApiError): + """Quota Exceeded.""" + pass diff --git a/nova/quota.py b/nova/quota.py index 771477747..e9ec4142f 100644 --- a/nova/quota.py +++ b/nova/quota.py @@ -162,8 +162,3 @@ def allowed_injected_file_content_bytes(context, requested_bytes): def allowed_injected_file_path_bytes(context): """Return the number of bytes allowed in an injected file path.""" return FLAGS.quota_max_injected_file_path_bytes - - -class QuotaError(exception.ApiError): - """Quota Exceeded.""" - pass diff --git a/nova/tests/test_network.py b/nova/tests/test_network.py index 759650839..3b043e793 100644 --- a/nova/tests/test_network.py +++ b/nova/tests/test_network.py @@ -20,7 +20,6 @@ from nova import context from nova import db from nova import exception from nova import log as logging -from nova import quota from nova import rpc from nova import test from nova.network import manager as network_manager @@ -463,7 +462,7 @@ class VlanNetworkTestCase(test.TestCase): # this time should raise self.stubs.Set(self.network.db, 'floating_ip_count_by_project', fake2) - self.assertRaises(quota.QuotaError, + self.assertRaises(exception.QuotaError, self.network.allocate_floating_ip, ctxt, ctxt.project_id)