diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-06-06 22:29:03 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-06-06 22:29:03 +0000 |
| commit | eeffd582f77db0160a075d84c34b82e5403f9ab2 (patch) | |
| tree | e4c32bd6f81ab604148a6844b57b13159cd7a4c6 /nova/compute | |
| parent | f1243fb1e2e2d088b10d3776839c627665977e3e (diff) | |
| parent | 53cb7ea71409dc7ecfe36f92df63e11231022455 (diff) | |
Merge "Make live_migration a first-class compute API."
Diffstat (limited to 'nova/compute')
| -rw-r--r-- | nova/compute/api.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/nova/compute/api.py b/nova/compute/api.py index a0672cfff..37f93f9b3 100644 --- a/nova/compute/api.py +++ b/nova/compute/api.py @@ -1824,6 +1824,20 @@ class API(base.Base): return self.db.block_device_mapping_get_all_by_instance(context, instance['uuid']) + @check_instance_state(vm_state=[vm_states.ACTIVE]) + def live_migrate(self, context, instance, block_migration, + disk_over_commit, host): + """Migrate a server lively to a new host.""" + instance_uuid = instance["uuid"] + LOG.debug(_("Going to try to live migrate instance"), + instance=instance) + self.scheduler_rpcapi.live_migration(context, + block_migration, + disk_over_commit, + instance["id"], + host, + topic=FLAGS.compute_topic) + class HostAPI(base.Base): def __init__(self): |
