From: Mathieu Gagné Date: Sat, 31 Aug 2013 02:30:56 +0000 (-0400) Subject: Send notifications when extending volume X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=e0bc432b942bf52b1bf7f83c1cc0eece99a28961;p=openstack-build%2Fcinder-build.git Send notifications when extending volume - Send resize.start when volume extension begins. - Send resize.end with new size when volume extension ends. Fixes: bug #1219106 Change-Id: I729da1604668080ec1a5d096df211aa55913dc48 --- diff --git a/cinder/volume/manager.py b/cinder/volume/manager.py index 4dea45a4f..b48887ba7 100644 --- a/cinder/volume/manager.py +++ b/cinder/volume/manager.py @@ -795,6 +795,7 @@ class VolumeManager(manager.SchedulerDependentManager): 'd_quota': quotas['gigabytes']}) return + self._notify_about_volume_usage(context, volume, "resize.start") try: LOG.info(_("volume %s: extending"), volume['id']) self.driver.extend_volume(volume, new_size) @@ -812,3 +813,6 @@ class VolumeManager(manager.SchedulerDependentManager): QUOTAS.commit(context, reservations) self.db.volume_update(context, volume['id'], {'size': int(new_size), 'status': 'available'}) + self._notify_about_volume_usage( + context, volume, "resize.end", + extra_usage_info={'size': int(new_size)})