From 2ed2c411a982e297d6b756f8a21939fadb2a0a93 Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Fri, 3 Aug 2012 23:01:18 -0400 Subject: Add underscore in front of post_live_migration. Rename this method of the compute manager by just adding an underscore in front of the name. This is a private method and is not part of the rpc api. Make that more apparent by using the private method naming convention. Change-Id: I66633ffd59c6d670ccc748855fb1dcbac7df222d --- nova/compute/manager.py | 6 +++--- nova/tests/compute/test_compute.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/nova/compute/manager.py b/nova/compute/manager.py index f34a4aea8..e57881e88 100644 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -2243,11 +2243,11 @@ class ComputeManager(manager.SchedulerDependentManager): # live_migration might raises exceptions, but # nothing must be recovered in this version. self.driver.live_migration(context, instance_ref, dest, - self.post_live_migration, + self._post_live_migration, self.rollback_live_migration, block_migration) - def post_live_migration(self, ctxt, instance_ref, + def _post_live_migration(self, ctxt, instance_ref, dest, block_migration=False): """Post operations for live migration. @@ -2260,7 +2260,7 @@ class ComputeManager(manager.SchedulerDependentManager): :param block_migration: if true, prepare for block migration """ - LOG.info(_('post_live_migration() is started..'), + LOG.info(_('_post_live_migration() is started..'), instance=instance_ref) # Detaching volumes. diff --git a/nova/tests/compute/test_compute.py b/nova/tests/compute/test_compute.py index e0305cadc..8561d5124 100644 --- a/nova/tests/compute/test_compute.py +++ b/nova/tests/compute/test_compute.py @@ -1765,7 +1765,7 @@ class ComputeTestCase(BaseTestCase): # start test self.mox.ReplayAll() - self.compute.post_live_migration(c, inst_ref, dest) + self.compute._post_live_migration(c, inst_ref, dest) # make sure floating ips are rewritten to destinatioin hostname. flo_refs = db.floating_ip_get_all_by_host(c, dest) -- cgit