]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
qemu: Add APIs for migrate-incoming QMP command
authorJiri Denemark <jdenemar@redhat.com>
Tue, 20 Oct 2015 20:51:48 +0000 (22:51 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Thu, 19 Nov 2015 08:41:23 +0000 (09:41 +0100)
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
src/qemu/qemu_monitor.c
src/qemu/qemu_monitor.h
src/qemu/qemu_monitor_json.c
src/qemu/qemu_monitor_json.h

index 49d4aa2c0f7f727c1e128b724b1deceb41bbd276..f63c4eadea36d951c6f7a83bf5ecd854bfa45054 100644 (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);
+}
index 2ce39581fb8dbd054cbb303ef389ca5f238f4bfc..ed4bd70dd65914ea029be13b672609e9e12c4cf8 100644 (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
index b39b29b77af64ccd0a04bed19e529d1436a3df1c..86b8c7ba813378d91a9c96329c5a4bd3d6f8f039 100644 (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;
+}
index 120bd935a43301be8141b496c3eb7082bf62607b..374c8ea7debec77548440f1795fc153b1ff35b4c 100644 (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 */