diff options
| author | Jenkins <jenkins@review.openstack.org> | 2013-05-02 02:42:08 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2013-05-02 02:42:08 +0000 |
| commit | 4d8b68ad58f2b005cbec7b7d3abbef4eae66e885 (patch) | |
| tree | 4dc75fed949602210aaf6a5e85e90c638caa5e7b | |
| parent | b6aac988e46147154d49e938ecf9b67831613636 (diff) | |
| parent | a3e69769b2ed899a6562b2e67580726b48fc2b34 (diff) | |
| download | nova-4d8b68ad58f2b005cbec7b7d3abbef4eae66e885.tar.gz nova-4d8b68ad58f2b005cbec7b7d3abbef4eae66e885.tar.xz nova-4d8b68ad58f2b005cbec7b7d3abbef4eae66e885.zip | |
Merge "Rename _check_image_size to _get_and_check_image_metadata"
| -rwxr-xr-x | nova/compute/manager.py | 9 |
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: |
