Commit e3ac8406 authored by Andrea Spadaccini's avatar Andrea Spadaccini
Browse files

Add missing get_migration_status RPC definition

Add the instance_get_migration_status RPC definition and the needed
Signed-off-by: default avatarAndrea Spadaccini <>
Reviewed-by: default avatarMichael Hanselmann <>
parent 7e5a72a0
......@@ -146,6 +146,9 @@ _INSTANCE_CALLS = [
("success", None, "Whether the migration succeeded or not"),
("live", None, "Whether the user requested a live migration or not"),
], None, "Finalize the instance migration on the source node"),
("instance_get_migration_status", SINGLE, TMO_SLOW, [
("instance", INST_TO_DICT, "Instance object"),
], "self._MigrationStatusPostProc", "Report migration status"),
("instance_start", SINGLE, TMO_NORMAL, [
("instance_hvp_bep", "self._InstDictHvpBep(%s)", None),
("startup_paused", None, None),
......@@ -493,6 +493,12 @@ class RpcRunner(_generated_rpc.RpcClientDefault,
return self._proc(node_list, procedure, body, read_timeout=timeout)
def _MigrationStatusPostProc(result):
if not result.fail_msg and result.payload is not None:
result.payload = objects.MigrationStatus.FromDict(result.payload)
return result
def _BlockdevFindPostProc(result):
if not result.fail_msg and result.payload is not None:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment