summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2013-05-02 02:42:08 +0000
committerGerrit Code Review <review@openstack.org>2013-05-02 02:42:08 +0000
commit4d8b68ad58f2b005cbec7b7d3abbef4eae66e885 (patch)
tree4dc75fed949602210aaf6a5e85e90c638caa5e7b
parentb6aac988e46147154d49e938ecf9b67831613636 (diff)
parenta3e69769b2ed899a6562b2e67580726b48fc2b34 (diff)
downloadnova-4d8b68ad58f2b005cbec7b7d3abbef4eae66e885.tar.gz
nova-4d8b68ad58f2b005cbec7b7d3abbef4eae66e885.tar.xz
nova-4d8b68ad58f2b005cbec7b7d3abbef4eae66e885.zip
Merge "Rename _check_image_size to _get_and_check_image_metadata"
-rwxr-xr-xnova/compute/manager.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/nova/compute/manager.py b/nova/compute/manager.py
index 86079a661..b1f493a9e 100755
--- a/nova/compute/manager.py
+++ b/nova/compute/manager.py
@@ -888,7 +888,7 @@ class ComputeManager(manager.SchedulerDependentManager):
raise exception.BuildAbortException(instance_uuid=instance['uuid'],
reason=msg)
- return self._check_image_size(context, instance)
+ return self._get_and_check_image_metadata(context, instance)
def _build_instance(self, context, request_spec, filter_properties,
requested_networks, injected_files, admin_password, is_first_time,
@@ -1083,9 +1083,10 @@ class ComputeManager(manager.SchedulerDependentManager):
if self.driver.instance_exists(instance['name']):
raise exception.InstanceExists(name=instance['name'])
- def _check_image_size(self, context, instance):
- """Ensure image is smaller than the maximum size allowed by the
- instance_type.
+ def _get_and_check_image_metadata(self, context, instance):
+ """Get the image metadata and do basic sanity checks on said image
+ like ensuring the image is smaller than the maximum size allowed by
+ the instance_type.
The image stored in Glance is potentially compressed, so we use two
checks to ensure that the size isn't exceeded: