summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Behrens <cbehrens@codestud.com>2012-10-26 07:39:11 -0700
committerChris Behrens <cbehrens@codestud.com>2012-10-26 07:39:39 -0700
commitf46911966d69bf64065270f4e7e1049e7bbe05c4 (patch)
tree97435e8af54378c01cf4ba9d8032388b817365fc
parent50a0f3efb6cc4ae9c94439eea346828d35080d6c (diff)
downloadnova-f46911966d69bf64065270f4e7e1049e7bbe05c4.tar.gz
nova-f46911966d69bf64065270f4e7e1049e7bbe05c4.tar.xz
nova-f46911966d69bf64065270f4e7e1049e7bbe05c4.zip
Send usage event on revert_resize
We send a usage event when we resize. revert_resize should also send one to note a resize back to the original size. Fixes bug 1071773 Change-Id: I96a14ef60fbfa98c75381c7251a217c3e65334ce
-rw-r--r--nova/compute/manager.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/nova/compute/manager.py b/nova/compute/manager.py
index 4acccf0a3..76483e683 100644
--- a/nova/compute/manager.py
+++ b/nova/compute/manager.py
@@ -1473,6 +1473,12 @@ class ComputeManager(manager.SchedulerDependentManager):
"""
context = context.elevated()
migration_ref = self.db.migration_get(context, migration_id)
+
+ # NOTE(comstud): A revert_resize is essentially a resize back to
+ # the old size, so we need to send a usage event here.
+ compute_utils.notify_usage_exists(
+ context, instance, current_period=True)
+
with self._error_out_instance_on_exception(context, instance['uuid'],
reservations):
# NOTE(tr3buchet): tear down networks on destination host