From a3e69769b2ed899a6562b2e67580726b48fc2b34 Mon Sep 17 00:00:00 2001 From: Joshua Harlow Date: Fri, 26 Apr 2013 16:10:30 -0700 Subject: Rename _check_image_size to _get_and_check_image_metadata This method has functionality which doesn't seem to match what it actually does (which is getting image metadata and performing basic checks on that data). Change-Id: I818fb5079105cca8acbdf464d47a92f7b1ebb398 --- nova/compute/manager.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/nova/compute/manager.py b/nova/compute/manager.py index 3f6d828e1..d548d7e42 100755 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -887,7 +887,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, @@ -1082,9 +1082,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: -- cgit