]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Export qemuMigrationParams{To,From}JSON for tests
authorJiri Denemark <jdenemar@redhat.com>
Mon, 19 Mar 2018 22:44:53 +0000 (23:44 +0100)
committerJiri Denemark <jdenemar@redhat.com>
Tue, 17 Apr 2018 08:46:23 +0000 (10:46 +0200)
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/Makefile.inc.am
src/qemu/qemu_migration_params.c
src/qemu/qemu_migration_paramspriv.h [new file with mode: 0644]

index 25706ba4bc4199234e2e7a11b788c791db8387b3..63e7c878d10a93133d8b2e904d157efdcc4e449b 100644 (file)
@@ -35,6 +35,7 @@ QEMU_DRIVER_SOURCES = \
        qemu/qemu_migration_cookie.h \
         qemu/qemu_migration_params.c \
         qemu/qemu_migration_params.h \
+        qemu/qemu_migration_paramspriv.h \
        qemu/qemu_monitor.c \
        qemu/qemu_monitor.h \
        qemu/qemu_monitor_text.c \
index 560c2d3ea598e955536ebe1ba520eb0276ae164d..e9908cf8d4f38188c38e76f26f4e2fafd2a272da 100644 (file)
@@ -30,6 +30,7 @@
 #include "qemu_hotplug.h"
 #include "qemu_migration.h"
 #include "qemu_migration_params.h"
+#include "qemu_migration_paramspriv.h"
 #include "qemu_monitor.h"
 
 #define VIR_FROM_THIS VIR_FROM_QEMU
@@ -314,7 +315,7 @@ qemuMigrationParamsDump(qemuMigrationParamsPtr migParams,
 }
 
 
-static qemuMigrationParamsPtr
+qemuMigrationParamsPtr
 qemuMigrationParamsFromJSON(virJSONValuePtr params)
 {
     qemuMigrationParamsPtr migParams = NULL;
@@ -375,7 +376,7 @@ qemuMigrationParamsFromJSON(virJSONValuePtr params)
 }
 
 
-static virJSONValuePtr
+virJSONValuePtr
 qemuMigrationParamsToJSON(qemuMigrationParamsPtr migParams)
 {
     virJSONValuePtr params = NULL;
diff --git a/src/qemu/qemu_migration_paramspriv.h b/src/qemu/qemu_migration_paramspriv.h
new file mode 100644 (file)
index 0000000..350973b
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * qemu_migration_paramspriv.h: private declarations for migration parameters
+ *
+ * Copyright (C) 2006-2018 Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library.  If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef __QEMU_MIGRATION_PARAMSPRIV_H__
+# define __QEMU_MIGRATION_PARAMSPRIV_H__
+
+virJSONValuePtr
+qemuMigrationParamsToJSON(qemuMigrationParamsPtr migParams);
+
+qemuMigrationParamsPtr
+qemuMigrationParamsFromJSON(virJSONValuePtr params);
+
+#endif /* __QEMU_MIGRATION_PARAMSPRIV_H__ */