From f46911966d69bf64065270f4e7e1049e7bbe05c4 Mon Sep 17 00:00:00 2001 From: Chris Behrens Date: Fri, 26 Oct 2012 07:39:11 -0700 Subject: 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 --- nova/compute/manager.py | 6 ++++++ 1 file changed, 6 insertions(+) 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 -- cgit