qemu: Add APIs for migrate-incoming QMP command

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
Jiri Denemark 2015-10-20 22:51:48 +02:00
parent 04c721f22d
commit 93d56e9df1
4 changed files with 45 additions and 0 deletions

View File

@ -3811,3 +3811,15 @@ qemuMonitorGetMemoryDeviceInfo(qemuMonitorPtr mon,
return ret;
}
int
qemuMonitorMigrateIncoming(qemuMonitorPtr mon,
const char *uri)
{
VIR_DEBUG("uri=%s", uri);
QEMU_CHECK_MONITOR_JSON(mon);
return qemuMonitorJSONMigrateIncoming(mon, uri);
}

View File

@ -924,6 +924,9 @@ int qemuMonitorGetMemoryDeviceInfo(qemuMonitorPtr mon,
virHashTablePtr *info)
ATTRIBUTE_NONNULL(2);
int qemuMonitorMigrateIncoming(qemuMonitorPtr mon,
const char *uri);
/**
* When running two dd process and using <> redirection, we need a
* shell that will not truncate files. These two strings serve that

View File

@ -6627,3 +6627,28 @@ qemuMonitorJSONFindLinkPath(qemuMonitorPtr mon,
VIR_FREE(linkname);
return ret;
}
int
qemuMonitorJSONMigrateIncoming(qemuMonitorPtr mon,
const char *uri)
{
int ret = -1;
virJSONValuePtr cmd;
virJSONValuePtr reply = NULL;
if (!(cmd = qemuMonitorJSONMakeCommand("migrate-incoming",
"s:uri", uri,
NULL)))
return -1;
if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
goto cleanup;
ret = qemuMonitorJSONCheckError(cmd, reply);
cleanup:
virJSONValueFree(cmd);
virJSONValueFree(reply);
return ret;
}

View File

@ -480,4 +480,9 @@ int qemuMonitorJSONFindLinkPath(qemuMonitorPtr mon,
const char *name,
char **path)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3);
int qemuMonitorJSONMigrateIncoming(qemuMonitorPtr mon,
const char *uri)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
#endif /* QEMU_MONITOR_JSON_H */