summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2013-04-26 16:10:30 -0700
committerJoshua Harlow <harlowja@yahoo-inc.com>2013-04-30 22:12:49 -0700
commita3e69769b2ed899a6562b2e67580726b48fc2b34 (patch)
tree9092889ada2710008bd92b63e3030c826f08bb7e
parentb19e4cb460cb7b6dff59c75e3a4f00eb16e4b17a (diff)
downloadnova-a3e69769b2ed899a6562b2e67580726b48fc2b34.tar.gz
nova-a3e69769b2ed899a6562b2e67580726b48fc2b34.tar.xz
nova-a3e69769b2ed899a6562b2e67580726b48fc2b34.zip
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
-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 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: