1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-13 08:58:33 +03:00

qemu: Export qemuMigrationParams{To,From}JSON for tests

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Jiri Denemark 2018-03-19 23:44:53 +01:00
parent fa0a1467c5
commit 11e214369f
3 changed files with 35 additions and 2 deletions

View 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 \

View 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;

View File

@ -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__ */