mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 17:34:18 +03:00
Wire protocol and dispatcher for virDomainMigrateSetMaxDowntime
This commit is contained in:
parent
68f63673da
commit
20ffaf59dc
@ -5495,6 +5495,35 @@ remoteDispatchDomainAbortJob (struct qemud_server *server ATTRIBUTE_UNUSED,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static int
|
||||||
|
remoteDispatchDomainMigrateSetMaxDowntime(struct qemud_server *server ATTRIBUTE_UNUSED,
|
||||||
|
struct qemud_client *client ATTRIBUTE_UNUSED,
|
||||||
|
virConnectPtr conn,
|
||||||
|
remote_message_header *hdr ATTRIBUTE_UNUSED,
|
||||||
|
remote_error *rerr,
|
||||||
|
remote_domain_migrate_set_max_downtime_args *args,
|
||||||
|
void *ret ATTRIBUTE_UNUSED)
|
||||||
|
{
|
||||||
|
virDomainPtr dom;
|
||||||
|
|
||||||
|
dom = get_nonnull_domain(conn, args->dom);
|
||||||
|
if (dom == NULL) {
|
||||||
|
remoteDispatchConnError(rerr, conn);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (virDomainMigrateSetMaxDowntime(dom, args->downtime, args->flags) == -1) {
|
||||||
|
virDomainFree(dom);
|
||||||
|
remoteDispatchConnError(rerr, conn);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
virDomainFree(dom);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*----- Helpers. -----*/
|
/*----- Helpers. -----*/
|
||||||
|
|
||||||
/* get_nonnull_domain and get_nonnull_network turn an on-wire
|
/* get_nonnull_domain and get_nonnull_network turn an on-wire
|
||||||
|
@ -141,3 +141,4 @@
|
|||||||
remote_domain_get_job_info_args val_remote_domain_get_job_info_args;
|
remote_domain_get_job_info_args val_remote_domain_get_job_info_args;
|
||||||
remote_domain_abort_job_args val_remote_domain_abort_job_args;
|
remote_domain_abort_job_args val_remote_domain_abort_job_args;
|
||||||
remote_storage_vol_wipe_args val_remote_storage_vol_wipe_args;
|
remote_storage_vol_wipe_args val_remote_storage_vol_wipe_args;
|
||||||
|
remote_domain_migrate_set_max_downtime_args val_remote_domain_migrate_set_max_downtime_args;
|
||||||
|
@ -378,6 +378,14 @@ static int remoteDispatchDomainMigratePrepareTunnel(
|
|||||||
remote_error *err,
|
remote_error *err,
|
||||||
remote_domain_migrate_prepare_tunnel_args *args,
|
remote_domain_migrate_prepare_tunnel_args *args,
|
||||||
void *ret);
|
void *ret);
|
||||||
|
static int remoteDispatchDomainMigrateSetMaxDowntime(
|
||||||
|
struct qemud_server *server,
|
||||||
|
struct qemud_client *client,
|
||||||
|
virConnectPtr conn,
|
||||||
|
remote_message_header *hdr,
|
||||||
|
remote_error *err,
|
||||||
|
remote_domain_migrate_set_max_downtime_args *args,
|
||||||
|
void *ret);
|
||||||
static int remoteDispatchDomainPinVcpu(
|
static int remoteDispatchDomainPinVcpu(
|
||||||
struct qemud_server *server,
|
struct qemud_server *server,
|
||||||
struct qemud_client *client,
|
struct qemud_client *client,
|
||||||
|
@ -832,3 +832,8 @@
|
|||||||
.args_filter = (xdrproc_t) xdr_remote_storage_vol_wipe_args,
|
.args_filter = (xdrproc_t) xdr_remote_storage_vol_wipe_args,
|
||||||
.ret_filter = (xdrproc_t) xdr_void,
|
.ret_filter = (xdrproc_t) xdr_void,
|
||||||
},
|
},
|
||||||
|
{ /* DomainMigrateSetMaxDowntime => 166 */
|
||||||
|
.fn = (dispatch_fn) remoteDispatchDomainMigrateSetMaxDowntime,
|
||||||
|
.args_filter = (xdrproc_t) xdr_remote_domain_migrate_set_max_downtime_args,
|
||||||
|
.ret_filter = (xdrproc_t) xdr_void,
|
||||||
|
},
|
||||||
|
@ -3019,6 +3019,19 @@ xdr_remote_domain_abort_job_args (XDR *xdrs, remote_domain_abort_job_args *objp)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool_t
|
||||||
|
xdr_remote_domain_migrate_set_max_downtime_args (XDR *xdrs, remote_domain_migrate_set_max_downtime_args *objp)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (!xdr_remote_nonnull_domain (xdrs, &objp->dom))
|
||||||
|
return FALSE;
|
||||||
|
if (!xdr_uint64_t (xdrs, &objp->downtime))
|
||||||
|
return FALSE;
|
||||||
|
if (!xdr_u_int (xdrs, &objp->flags))
|
||||||
|
return FALSE;
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
bool_t
|
bool_t
|
||||||
xdr_remote_procedure (XDR *xdrs, remote_procedure *objp)
|
xdr_remote_procedure (XDR *xdrs, remote_procedure *objp)
|
||||||
{
|
{
|
||||||
|
@ -1710,6 +1710,13 @@ struct remote_domain_abort_job_args {
|
|||||||
remote_nonnull_domain dom;
|
remote_nonnull_domain dom;
|
||||||
};
|
};
|
||||||
typedef struct remote_domain_abort_job_args remote_domain_abort_job_args;
|
typedef struct remote_domain_abort_job_args remote_domain_abort_job_args;
|
||||||
|
|
||||||
|
struct remote_domain_migrate_set_max_downtime_args {
|
||||||
|
remote_nonnull_domain dom;
|
||||||
|
uint64_t downtime;
|
||||||
|
u_int flags;
|
||||||
|
};
|
||||||
|
typedef struct remote_domain_migrate_set_max_downtime_args remote_domain_migrate_set_max_downtime_args;
|
||||||
#define REMOTE_PROGRAM 0x20008086
|
#define REMOTE_PROGRAM 0x20008086
|
||||||
#define REMOTE_PROTOCOL_VERSION 1
|
#define REMOTE_PROTOCOL_VERSION 1
|
||||||
|
|
||||||
@ -1879,6 +1886,7 @@ enum remote_procedure {
|
|||||||
REMOTE_PROC_DOMAIN_GET_JOB_INFO = 163,
|
REMOTE_PROC_DOMAIN_GET_JOB_INFO = 163,
|
||||||
REMOTE_PROC_DOMAIN_ABORT_JOB = 164,
|
REMOTE_PROC_DOMAIN_ABORT_JOB = 164,
|
||||||
REMOTE_PROC_STORAGE_VOL_WIPE = 165,
|
REMOTE_PROC_STORAGE_VOL_WIPE = 165,
|
||||||
|
REMOTE_PROC_DOMAIN_MIGRATE_SET_MAX_DOWNTIME = 166,
|
||||||
};
|
};
|
||||||
typedef enum remote_procedure remote_procedure;
|
typedef enum remote_procedure remote_procedure;
|
||||||
|
|
||||||
@ -2189,6 +2197,7 @@ extern bool_t xdr_remote_cpu_baseline_ret (XDR *, remote_cpu_baseline_ret*);
|
|||||||
extern bool_t xdr_remote_domain_get_job_info_args (XDR *, remote_domain_get_job_info_args*);
|
extern bool_t xdr_remote_domain_get_job_info_args (XDR *, remote_domain_get_job_info_args*);
|
||||||
extern bool_t xdr_remote_domain_get_job_info_ret (XDR *, remote_domain_get_job_info_ret*);
|
extern bool_t xdr_remote_domain_get_job_info_ret (XDR *, remote_domain_get_job_info_ret*);
|
||||||
extern bool_t xdr_remote_domain_abort_job_args (XDR *, remote_domain_abort_job_args*);
|
extern bool_t xdr_remote_domain_abort_job_args (XDR *, remote_domain_abort_job_args*);
|
||||||
|
extern bool_t xdr_remote_domain_migrate_set_max_downtime_args (XDR *, remote_domain_migrate_set_max_downtime_args*);
|
||||||
extern bool_t xdr_remote_procedure (XDR *, remote_procedure*);
|
extern bool_t xdr_remote_procedure (XDR *, remote_procedure*);
|
||||||
extern bool_t xdr_remote_message_type (XDR *, remote_message_type*);
|
extern bool_t xdr_remote_message_type (XDR *, remote_message_type*);
|
||||||
extern bool_t xdr_remote_message_status (XDR *, remote_message_status*);
|
extern bool_t xdr_remote_message_status (XDR *, remote_message_status*);
|
||||||
@ -2473,6 +2482,7 @@ extern bool_t xdr_remote_cpu_baseline_ret ();
|
|||||||
extern bool_t xdr_remote_domain_get_job_info_args ();
|
extern bool_t xdr_remote_domain_get_job_info_args ();
|
||||||
extern bool_t xdr_remote_domain_get_job_info_ret ();
|
extern bool_t xdr_remote_domain_get_job_info_ret ();
|
||||||
extern bool_t xdr_remote_domain_abort_job_args ();
|
extern bool_t xdr_remote_domain_abort_job_args ();
|
||||||
|
extern bool_t xdr_remote_domain_migrate_set_max_downtime_args ();
|
||||||
extern bool_t xdr_remote_procedure ();
|
extern bool_t xdr_remote_procedure ();
|
||||||
extern bool_t xdr_remote_message_type ();
|
extern bool_t xdr_remote_message_type ();
|
||||||
extern bool_t xdr_remote_message_status ();
|
extern bool_t xdr_remote_message_status ();
|
||||||
|
@ -1522,6 +1522,13 @@ struct remote_domain_abort_job_args {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
struct remote_domain_migrate_set_max_downtime_args {
|
||||||
|
remote_nonnull_domain dom;
|
||||||
|
unsigned hyper downtime;
|
||||||
|
unsigned flags;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/*----- Protocol. -----*/
|
/*----- Protocol. -----*/
|
||||||
|
|
||||||
/* Define the program number, protocol version and procedure numbers here. */
|
/* Define the program number, protocol version and procedure numbers here. */
|
||||||
@ -1709,7 +1716,8 @@ enum remote_procedure {
|
|||||||
REMOTE_PROC_CPU_BASELINE = 162,
|
REMOTE_PROC_CPU_BASELINE = 162,
|
||||||
REMOTE_PROC_DOMAIN_GET_JOB_INFO = 163,
|
REMOTE_PROC_DOMAIN_GET_JOB_INFO = 163,
|
||||||
REMOTE_PROC_DOMAIN_ABORT_JOB = 164,
|
REMOTE_PROC_DOMAIN_ABORT_JOB = 164,
|
||||||
REMOTE_PROC_STORAGE_VOL_WIPE = 165
|
REMOTE_PROC_STORAGE_VOL_WIPE = 165,
|
||||||
|
REMOTE_PROC_DOMAIN_MIGRATE_SET_MAX_DOWNTIME = 166
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Notice how the entries are grouped in sets of 10 ?
|
* Notice how the entries are grouped in sets of 10 ?
|
||||||
|
Loading…
Reference in New Issue
Block a user