From a03519aca345fb95c2d0b7c3bbaab5924559ef49 Mon Sep 17 00:00:00 2001 From: Rick Harris Date: Thu, 23 May 2013 19:03:42 +0000 Subject: Remove tempest hack for create/rebuild checks A bug in Tempest required us to check quotas before requesting image information. Now that this has been fixed upstream, we can remove our hack to get around this. Change-Id: I7ef1cd2f4f641fb5616945b66740820a4003b66d --- nova/compute/api.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/nova/compute/api.py b/nova/compute/api.py index eccf13da6..58c43d979 100644 --- a/nova/compute/api.py +++ b/nova/compute/api.py @@ -530,6 +530,7 @@ class API(base.Base): def _checks_for_create_and_rebuild(self, context, image_id, image, instance_type, metadata, files_to_inject): + self._check_metadata_properties_quota(context, metadata) self._check_injected_file_quota(context, files_to_inject) self._check_requested_image(context, image_id, image, instance_type) @@ -592,13 +593,6 @@ class API(base.Base): instances = [] instance_uuids = [] - # FIXME(sirp): this check should go in - # `_checks_for_create_and_rebuild`, however Tempest has a bug in - # its quota checking test where its submitting a bad image ID. So - # if `_get_image` is called first, we get a `ImageNotFound` - # exception instead of a OverlimitException. - self._check_metadata_properties_quota(context, metadata) - image_id, image = self._get_image(context, image_href) self._checks_for_create_and_rebuild(context, image_id, image, @@ -1801,8 +1795,6 @@ class API(base.Base): metadata = kwargs.get('metadata', {}) instance_type = flavors.extract_instance_type(instance) - self._check_metadata_properties_quota(context, metadata) - image_id, image = self._get_image(context, image_href) self._checks_for_create_and_rebuild(context, image_id, image, -- cgit