]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Merge "add ability to clone images"
authorJenkins <jenkins@review.openstack.org>
Thu, 16 Aug 2012 01:37:28 +0000 (01:37 +0000)
committerGerrit Code Review <review@openstack.org>
Thu, 16 Aug 2012 01:37:28 +0000 (01:37 +0000)
1  2 
cinder/volume/manager.py

index 680e480acd5c5023b899bf60c8ed9fd30651522c,a40948f175169a417eebd2a7dfe297e227d88d70..eee3d86317ae27c17d3afc836da642fa8c004b84
@@@ -150,10 -157,9 +159,10 @@@ class VolumeManager(manager.SchedulerDe
          LOG.debug(_("volume %s: created successfully"), volume_ref['name'])
          self._reset_stats()
  
-         if image_id:
+         if image_id and not cloned:
              #copy the image onto the volume.
              self._copy_image_to_volume(context, volume_ref, image_id)
 +        self._notify_about_volume_usage(context, volume_ref, "create.end")
          return volume_ref['id']
  
      def delete_volume(self, context, volume_id):