On Mon, Jun 20, 2016 at 04:34:18PM +0200, Peter Krempa wrote:
Add a straightforward implementation for using the new APIs. --- tools/virsh-domain.c | 93 ++++++++++++++++++++++++++++++++++++++++++++++++++++ tools/virsh.pod | 10 ++++++ 2 files changed, 103 insertions(+)
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index bd6db47..ff2305f 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -6762,6 +6762,93 @@ cmdSetvcpus(vshControl *ctl, const vshCmd *cmd) return ret; }
+ +/* + * "guestvcpus" command + */ +static const vshCmdInfo info_guestvcpus[] = { + {.name = "help", + .data = N_("query or modify state of vcpu in the guest (via agent)") + }, + {.name = "desc", + .data = N_("Use the guest agent to query or set cpu state from guest's " + "point of view") + }, + {.name = NULL} +}; + +static const vshCmdOptDef opts_guestvcpus[] = { + VIRSH_COMMON_OPT_DOMAIN_FULL, + {.name = "cpumap", + .type = VSH_OT_STRING, + .help = N_("number of virtual CPUs") + },
I would go with "cpulist" and also change the help string, this is not correct.
+ {.name = "enable", + .type = VSH_OT_BOOL, + .help = N_("enable cpus specified by cpumap") + }, + {.name = "disable", + .type = VSH_OT_BOOL, + .help = N_("disable cpus specified by cpumap") + }, + {.name = NULL} +};
ACK