blob: daba668216f7e719754ed6aaefe9069b5025f3d8 [file] [log] [blame]
/* AUTOMATICALLY GENERATED, DO NOT MODIFY */
/*
* Schema-defined QAPI/QMP commands
*
* Copyright IBM, Corp. 2011
* Copyright (C) 2014-2018 Red Hat, Inc.
*
* This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
* See the COPYING.LIB file in the top-level directory.
*/
#include "qemu/osdep.h"
#include "qemu-common.h"
#include "qemu/module.h"
#include "qapi/visitor.h"
#include "qapi/qmp/qdict.h"
#include "qapi/qobject-output-visitor.h"
#include "qapi/qobject-input-visitor.h"
#include "qapi/dealloc-visitor.h"
#include "qapi/error.h"
#include "qapi-visit-migration.h"
#include "qapi-commands-migration.h"
static void qmp_marshal_output_MigrationInfo(MigrationInfo *ret_in, QObject **ret_out, Error **errp)
{
Error *err = NULL;
Visitor *v;
v = qobject_output_visitor_new(ret_out);
visit_type_MigrationInfo(v, "unused", &ret_in, &err);
if (!err) {
visit_complete(v, ret_out);
}
error_propagate(errp, err);
visit_free(v);
v = qapi_dealloc_visitor_new();
visit_type_MigrationInfo(v, "unused", &ret_in, NULL);
visit_free(v);
}
void qmp_marshal_query_migrate(QDict *args, QObject **ret, Error **errp)
{
Error *err = NULL;
MigrationInfo *retval;
Visitor *v = NULL;
if (args) {
v = qobject_input_visitor_new(QOBJECT(args));
visit_start_struct(v, NULL, NULL, 0, &err);
if (err) {
goto out;
}
if (!err) {
visit_check_struct(v, &err);
}
visit_end_struct(v, NULL);
if (err) {
goto out;
}
}
retval = qmp_query_migrate(&err);
if (err) {
goto out;
}
qmp_marshal_output_MigrationInfo(retval, ret, &err);
out:
error_propagate(errp, err);
visit_free(v);
if (args) {
v = qapi_dealloc_visitor_new();
visit_start_struct(v, NULL, NULL, 0, NULL);
visit_end_struct(v, NULL);
visit_free(v);
}
}
void qmp_marshal_migrate_set_capabilities(QDict *args, QObject **ret, Error **errp)
{
Error *err = NULL;
Visitor *v;
q_obj_migrate_set_capabilities_arg arg = {0};
v = qobject_input_visitor_new(QOBJECT(args));
visit_start_struct(v, NULL, NULL, 0, &err);
if (err) {
goto out;
}
visit_type_q_obj_migrate_set_capabilities_arg_members(v, &arg, &err);
if (!err) {
visit_check_struct(v, &err);
}
visit_end_struct(v, NULL);
if (err) {
goto out;
}
qmp_migrate_set_capabilities(arg.capabilities, &err);
out:
error_propagate(errp, err);
visit_free(v);
v = qapi_dealloc_visitor_new();
visit_start_struct(v, NULL, NULL, 0, NULL);
visit_type_q_obj_migrate_set_capabilities_arg_members(v, &arg, NULL);
visit_end_struct(v, NULL);
visit_free(v);
}
static void qmp_marshal_output_MigrationCapabilityStatusList(MigrationCapabilityStatusList *ret_in, QObject **ret_out, Error **errp)
{
Error *err = NULL;
Visitor *v;
v = qobject_output_visitor_new(ret_out);
visit_type_MigrationCapabilityStatusList(v, "unused", &ret_in, &err);
if (!err) {
visit_complete(v, ret_out);
}
error_propagate(errp, err);
visit_free(v);
v = qapi_dealloc_visitor_new();
visit_type_MigrationCapabilityStatusList(v, "unused", &ret_in, NULL);
visit_free(v);
}
void qmp_marshal_query_migrate_capabilities(QDict *args, QObject **ret, Error **errp)
{
Error *err = NULL;
MigrationCapabilityStatusList *retval;
Visitor *v = NULL;
if (args) {
v = qobject_input_visitor_new(QOBJECT(args));
visit_start_struct(v, NULL, NULL, 0, &err);
if (err) {
goto out;
}
if (!err) {
visit_check_struct(v, &err);
}
visit_end_struct(v, NULL);
if (err) {
goto out;
}
}
retval = qmp_query_migrate_capabilities(&err);
if (err) {
goto out;
}
qmp_marshal_output_MigrationCapabilityStatusList(retval, ret, &err);
out:
error_propagate(errp, err);
visit_free(v);
if (args) {
v = qapi_dealloc_visitor_new();
visit_start_struct(v, NULL, NULL, 0, NULL);
visit_end_struct(v, NULL);
visit_free(v);
}
}
void qmp_marshal_migrate_set_parameters(QDict *args, QObject **ret, Error **errp)
{
Error *err = NULL;
Visitor *v;
MigrateSetParameters arg = {0};
v = qobject_input_visitor_new(QOBJECT(args));
visit_start_struct(v, NULL, NULL, 0, &err);
if (err) {
goto out;
}
visit_type_MigrateSetParameters_members(v, &arg, &err);
if (!err) {
visit_check_struct(v, &err);
}
visit_end_struct(v, NULL);
if (err) {
goto out;
}
qmp_migrate_set_parameters(&arg, &err);
out:
error_propagate(errp, err);
visit_free(v);
v = qapi_dealloc_visitor_new();
visit_start_struct(v, NULL, NULL, 0, NULL);
visit_type_MigrateSetParameters_members(v, &arg, NULL);
visit_end_struct(v, NULL);
visit_free(v);
}
static void qmp_marshal_output_MigrationParameters(MigrationParameters *ret_in, QObject **ret_out, Error **errp)
{
Error *err = NULL;
Visitor *v;
v = qobject_output_visitor_new(ret_out);
visit_type_MigrationParameters(v, "unused", &ret_in, &err);
if (!err) {
visit_complete(v, ret_out);
}
error_propagate(errp, err);
visit_free(v);
v = qapi_dealloc_visitor_new();
visit_type_MigrationParameters(v, "unused", &ret_in, NULL);
visit_free(v);
}
void qmp_marshal_query_migrate_parameters(QDict *args, QObject **ret, Error **errp)
{
Error *err = NULL;
MigrationParameters *retval;
Visitor *v = NULL;
if (args) {
v = qobject_input_visitor_new(QOBJECT(args));
visit_start_struct(v, NULL, NULL, 0, &err);
if (err) {
goto out;
}
if (!err) {
visit_check_struct(v, &err);
}
visit_end_struct(v, NULL);
if (err) {
goto out;
}
}
retval = qmp_query_migrate_parameters(&err);
if (err) {
goto out;
}
qmp_marshal_output_MigrationParameters(retval, ret, &err);
out:
error_propagate(errp, err);
visit_free(v);
if (args) {
v = qapi_dealloc_visitor_new();
visit_start_struct(v, NULL, NULL, 0, NULL);
visit_end_struct(v, NULL);
visit_free(v);
}
}
void qmp_marshal_client_migrate_info(QDict *args, QObject **ret, Error **errp)
{
Error *err = NULL;
Visitor *v;
q_obj_client_migrate_info_arg arg = {0};
v = qobject_input_visitor_new(QOBJECT(args));
visit_start_struct(v, NULL, NULL, 0, &err);
if (err) {
goto out;
}
visit_type_q_obj_client_migrate_info_arg_members(v, &arg, &err);
if (!err) {
visit_check_struct(v, &err);
}
visit_end_struct(v, NULL);
if (err) {
goto out;
}
qmp_client_migrate_info(arg.protocol, arg.hostname, arg.has_port, arg.port, arg.has_tls_port, arg.tls_port, arg.has_cert_subject, arg.cert_subject, &err);
out:
error_propagate(errp, err);
visit_free(v);
v = qapi_dealloc_visitor_new();
visit_start_struct(v, NULL, NULL, 0, NULL);
visit_type_q_obj_client_migrate_info_arg_members(v, &arg, NULL);
visit_end_struct(v, NULL);
visit_free(v);
}
void qmp_marshal_migrate_start_postcopy(QDict *args, QObject **ret, Error **errp)
{
Error *err = NULL;
Visitor *v = NULL;
if (args) {
v = qobject_input_visitor_new(QOBJECT(args));
visit_start_struct(v, NULL, NULL, 0, &err);
if (err) {
goto out;
}
if (!err) {
visit_check_struct(v, &err);
}
visit_end_struct(v, NULL);
if (err) {
goto out;
}
}
qmp_migrate_start_postcopy(&err);
out:
error_propagate(errp, err);
visit_free(v);
if (args) {
v = qapi_dealloc_visitor_new();
visit_start_struct(v, NULL, NULL, 0, NULL);
visit_end_struct(v, NULL);
visit_free(v);
}
}
void qmp_marshal_x_colo_lost_heartbeat(QDict *args, QObject **ret, Error **errp)
{
Error *err = NULL;
Visitor *v = NULL;
if (args) {
v = qobject_input_visitor_new(QOBJECT(args));
visit_start_struct(v, NULL, NULL, 0, &err);
if (err) {
goto out;
}
if (!err) {
visit_check_struct(v, &err);
}
visit_end_struct(v, NULL);
if (err) {
goto out;
}
}
qmp_x_colo_lost_heartbeat(&err);
out:
error_propagate(errp, err);
visit_free(v);
if (args) {
v = qapi_dealloc_visitor_new();
visit_start_struct(v, NULL, NULL, 0, NULL);
visit_end_struct(v, NULL);
visit_free(v);
}
}
void qmp_marshal_migrate_cancel(QDict *args, QObject **ret, Error **errp)
{
Error *err = NULL;
Visitor *v = NULL;
if (args) {
v = qobject_input_visitor_new(QOBJECT(args));
visit_start_struct(v, NULL, NULL, 0, &err);
if (err) {
goto out;
}
if (!err) {
visit_check_struct(v, &err);
}
visit_end_struct(v, NULL);
if (err) {
goto out;
}
}
qmp_migrate_cancel(&err);
out:
error_propagate(errp, err);
visit_free(v);
if (args) {
v = qapi_dealloc_visitor_new();
visit_start_struct(v, NULL, NULL, 0, NULL);
visit_end_struct(v, NULL);
visit_free(v);
}
}
void qmp_marshal_migrate_continue(QDict *args, QObject **ret, Error **errp)
{
Error *err = NULL;
Visitor *v;
q_obj_migrate_continue_arg arg = {0};
v = qobject_input_visitor_new(QOBJECT(args));
visit_start_struct(v, NULL, NULL, 0, &err);
if (err) {
goto out;
}
visit_type_q_obj_migrate_continue_arg_members(v, &arg, &err);
if (!err) {
visit_check_struct(v, &err);
}
visit_end_struct(v, NULL);
if (err) {
goto out;
}
qmp_migrate_continue(arg.state, &err);
out:
error_propagate(errp, err);
visit_free(v);
v = qapi_dealloc_visitor_new();
visit_start_struct(v, NULL, NULL, 0, NULL);
visit_type_q_obj_migrate_continue_arg_members(v, &arg, NULL);
visit_end_struct(v, NULL);
visit_free(v);
}
void qmp_marshal_migrate_set_downtime(QDict *args, QObject **ret, Error **errp)
{
Error *err = NULL;
Visitor *v;
q_obj_migrate_set_downtime_arg arg = {0};
v = qobject_input_visitor_new(QOBJECT(args));
visit_start_struct(v, NULL, NULL, 0, &err);
if (err) {
goto out;
}
visit_type_q_obj_migrate_set_downtime_arg_members(v, &arg, &err);
if (!err) {
visit_check_struct(v, &err);
}
visit_end_struct(v, NULL);
if (err) {
goto out;
}
qmp_migrate_set_downtime(arg.value, &err);
out:
error_propagate(errp, err);
visit_free(v);
v = qapi_dealloc_visitor_new();
visit_start_struct(v, NULL, NULL, 0, NULL);
visit_type_q_obj_migrate_set_downtime_arg_members(v, &arg, NULL);
visit_end_struct(v, NULL);
visit_free(v);
}
void qmp_marshal_migrate_set_speed(QDict *args, QObject **ret, Error **errp)
{
Error *err = NULL;
Visitor *v;
q_obj_migrate_set_speed_arg arg = {0};
v = qobject_input_visitor_new(QOBJECT(args));
visit_start_struct(v, NULL, NULL, 0, &err);
if (err) {
goto out;
}
visit_type_q_obj_migrate_set_speed_arg_members(v, &arg, &err);
if (!err) {
visit_check_struct(v, &err);
}
visit_end_struct(v, NULL);
if (err) {
goto out;
}
qmp_migrate_set_speed(arg.value, &err);
out:
error_propagate(errp, err);
visit_free(v);
v = qapi_dealloc_visitor_new();
visit_start_struct(v, NULL, NULL, 0, NULL);
visit_type_q_obj_migrate_set_speed_arg_members(v, &arg, NULL);
visit_end_struct(v, NULL);
visit_free(v);
}
void qmp_marshal_migrate_set_cache_size(QDict *args, QObject **ret, Error **errp)
{
Error *err = NULL;
Visitor *v;
q_obj_migrate_set_cache_size_arg arg = {0};
v = qobject_input_visitor_new(QOBJECT(args));
visit_start_struct(v, NULL, NULL, 0, &err);
if (err) {
goto out;
}
visit_type_q_obj_migrate_set_cache_size_arg_members(v, &arg, &err);
if (!err) {
visit_check_struct(v, &err);
}
visit_end_struct(v, NULL);
if (err) {
goto out;
}
qmp_migrate_set_cache_size(arg.value, &err);
out:
error_propagate(errp, err);
visit_free(v);
v = qapi_dealloc_visitor_new();
visit_start_struct(v, NULL, NULL, 0, NULL);
visit_type_q_obj_migrate_set_cache_size_arg_members(v, &arg, NULL);
visit_end_struct(v, NULL);
visit_free(v);
}
static void qmp_marshal_output_int(int64_t ret_in, QObject **ret_out, Error **errp)
{
Error *err = NULL;
Visitor *v;
v = qobject_output_visitor_new(ret_out);
visit_type_int(v, "unused", &ret_in, &err);
if (!err) {
visit_complete(v, ret_out);
}
error_propagate(errp, err);
visit_free(v);
v = qapi_dealloc_visitor_new();
visit_type_int(v, "unused", &ret_in, NULL);
visit_free(v);
}
void qmp_marshal_query_migrate_cache_size(QDict *args, QObject **ret, Error **errp)
{
Error *err = NULL;
int64_t retval;
Visitor *v = NULL;
if (args) {
v = qobject_input_visitor_new(QOBJECT(args));
visit_start_struct(v, NULL, NULL, 0, &err);
if (err) {
goto out;
}
if (!err) {
visit_check_struct(v, &err);
}
visit_end_struct(v, NULL);
if (err) {
goto out;
}
}
retval = qmp_query_migrate_cache_size(&err);
if (err) {
goto out;
}
qmp_marshal_output_int(retval, ret, &err);
out:
error_propagate(errp, err);
visit_free(v);
if (args) {
v = qapi_dealloc_visitor_new();
visit_start_struct(v, NULL, NULL, 0, NULL);
visit_end_struct(v, NULL);
visit_free(v);
}
}
void qmp_marshal_migrate(QDict *args, QObject **ret, Error **errp)
{
Error *err = NULL;
Visitor *v;
q_obj_migrate_arg arg = {0};
v = qobject_input_visitor_new(QOBJECT(args));
visit_start_struct(v, NULL, NULL, 0, &err);
if (err) {
goto out;
}
visit_type_q_obj_migrate_arg_members(v, &arg, &err);
if (!err) {
visit_check_struct(v, &err);
}
visit_end_struct(v, NULL);
if (err) {
goto out;
}
qmp_migrate(arg.uri, arg.has_blk, arg.blk, arg.has_inc, arg.inc, arg.has_detach, arg.detach, &err);
out:
error_propagate(errp, err);
visit_free(v);
v = qapi_dealloc_visitor_new();
visit_start_struct(v, NULL, NULL, 0, NULL);
visit_type_q_obj_migrate_arg_members(v, &arg, NULL);
visit_end_struct(v, NULL);
visit_free(v);
}
void qmp_marshal_migrate_incoming(QDict *args, QObject **ret, Error **errp)
{
Error *err = NULL;
Visitor *v;
q_obj_migrate_incoming_arg arg = {0};
v = qobject_input_visitor_new(QOBJECT(args));
visit_start_struct(v, NULL, NULL, 0, &err);
if (err) {
goto out;
}
visit_type_q_obj_migrate_incoming_arg_members(v, &arg, &err);
if (!err) {
visit_check_struct(v, &err);
}
visit_end_struct(v, NULL);
if (err) {
goto out;
}
qmp_migrate_incoming(arg.uri, &err);
out:
error_propagate(errp, err);
visit_free(v);
v = qapi_dealloc_visitor_new();
visit_start_struct(v, NULL, NULL, 0, NULL);
visit_type_q_obj_migrate_incoming_arg_members(v, &arg, NULL);
visit_end_struct(v, NULL);
visit_free(v);
}
void qmp_marshal_xen_save_devices_state(QDict *args, QObject **ret, Error **errp)
{
Error *err = NULL;
Visitor *v;
q_obj_xen_save_devices_state_arg arg = {0};
v = qobject_input_visitor_new(QOBJECT(args));
visit_start_struct(v, NULL, NULL, 0, &err);
if (err) {
goto out;
}
visit_type_q_obj_xen_save_devices_state_arg_members(v, &arg, &err);
if (!err) {
visit_check_struct(v, &err);
}
visit_end_struct(v, NULL);
if (err) {
goto out;
}
qmp_xen_save_devices_state(arg.filename, arg.has_live, arg.live, &err);
out:
error_propagate(errp, err);
visit_free(v);
v = qapi_dealloc_visitor_new();
visit_start_struct(v, NULL, NULL, 0, NULL);
visit_type_q_obj_xen_save_devices_state_arg_members(v, &arg, NULL);
visit_end_struct(v, NULL);
visit_free(v);
}
void qmp_marshal_xen_set_replication(QDict *args, QObject **ret, Error **errp)
{
Error *err = NULL;
Visitor *v;
q_obj_xen_set_replication_arg arg = {0};
v = qobject_input_visitor_new(QOBJECT(args));
visit_start_struct(v, NULL, NULL, 0, &err);
if (err) {
goto out;
}
visit_type_q_obj_xen_set_replication_arg_members(v, &arg, &err);
if (!err) {
visit_check_struct(v, &err);
}
visit_end_struct(v, NULL);
if (err) {
goto out;
}
qmp_xen_set_replication(arg.enable, arg.primary, arg.has_failover, arg.failover, &err);
out:
error_propagate(errp, err);
visit_free(v);
v = qapi_dealloc_visitor_new();
visit_start_struct(v, NULL, NULL, 0, NULL);
visit_type_q_obj_xen_set_replication_arg_members(v, &arg, NULL);
visit_end_struct(v, NULL);
visit_free(v);
}
static void qmp_marshal_output_ReplicationStatus(ReplicationStatus *ret_in, QObject **ret_out, Error **errp)
{
Error *err = NULL;
Visitor *v;
v = qobject_output_visitor_new(ret_out);
visit_type_ReplicationStatus(v, "unused", &ret_in, &err);
if (!err) {
visit_complete(v, ret_out);
}
error_propagate(errp, err);
visit_free(v);
v = qapi_dealloc_visitor_new();
visit_type_ReplicationStatus(v, "unused", &ret_in, NULL);
visit_free(v);
}
void qmp_marshal_query_xen_replication_status(QDict *args, QObject **ret, Error **errp)
{
Error *err = NULL;
ReplicationStatus *retval;
Visitor *v = NULL;
if (args) {
v = qobject_input_visitor_new(QOBJECT(args));
visit_start_struct(v, NULL, NULL, 0, &err);
if (err) {
goto out;
}
if (!err) {
visit_check_struct(v, &err);
}
visit_end_struct(v, NULL);
if (err) {
goto out;
}
}
retval = qmp_query_xen_replication_status(&err);
if (err) {
goto out;
}
qmp_marshal_output_ReplicationStatus(retval, ret, &err);
out:
error_propagate(errp, err);
visit_free(v);
if (args) {
v = qapi_dealloc_visitor_new();
visit_start_struct(v, NULL, NULL, 0, NULL);
visit_end_struct(v, NULL);
visit_free(v);
}
}
void qmp_marshal_xen_colo_do_checkpoint(QDict *args, QObject **ret, Error **errp)
{
Error *err = NULL;
Visitor *v = NULL;
if (args) {
v = qobject_input_visitor_new(QOBJECT(args));
visit_start_struct(v, NULL, NULL, 0, &err);
if (err) {
goto out;
}
if (!err) {
visit_check_struct(v, &err);
}
visit_end_struct(v, NULL);
if (err) {
goto out;
}
}
qmp_xen_colo_do_checkpoint(&err);
out:
error_propagate(errp, err);
visit_free(v);
if (args) {
v = qapi_dealloc_visitor_new();
visit_start_struct(v, NULL, NULL, 0, NULL);
visit_end_struct(v, NULL);
visit_free(v);
}
}
/* Dummy declaration to prevent empty .o file */
char dummy_qapi_commands_migration_c;