Adds live migration support to cells API

Fixes bug 1153087

DocImpact: Cells now allows live migration within a cell,
but not between cells.

Change-Id: Ic8777c376883eaf6ff9cb4b379e0bacbfe5635b7
This commit is contained in:
Sam Morrison 2013-05-07 12:07:53 +10:00
parent 70638961bc
commit 6682d1617e
2 changed files with 10 additions and 3 deletions

View File

@ -559,6 +559,16 @@ class ComputeCellsAPI(compute_api.API):
pass
return rv
@validate_cell
def live_migrate(self, context, instance, block_migration,
disk_over_commit, host_name):
"""Migrate a server lively to a new host."""
super(ComputeCellsAPI, self).live_migrate(context,
instance, block_migration, disk_over_commit, host_name)
self._cast_to_cells(context, instance, 'live_migrate',
block_migration, disk_over_commit, host_name)
class HostAPI(compute_api.HostAPI):
"""HostAPI() class for cells.

View File

@ -145,9 +145,6 @@ class CellsComputeAPITestCase(test_compute.ComputeAPITestCase):
def test_instance_metadata(self):
self.skipTest("Test is incompatible with cells.")
def test_live_migrate(self):
self.skipTest("Test is incompatible with cells.")
def test_snapshot_given_image_uuid(self):
self.skipTest("Test doesn't apply to API cell.")