[libvirt] [PATCH v3 6/7] virsh: add function to get the CPU models for an arch

Eric Blake eblake at redhat.com
Fri Sep 13 21:12:15 UTC 2013


On 09/11/2013 08:13 AM, Giuseppe Scrivano wrote:
> Signed-off-by: Giuseppe Scrivano <gscrivan at redhat.com>
> ---
>  tools/virsh-host.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  tools/virsh.pod    |  5 +++++
>  2 files changed, 59 insertions(+)

> +
> +static const vshCmdOptDef opts_cpu_models[] = {
> +    {.name = "arch",
> +     .type = VSH_OT_DATA,
> +     .flags = VSH_OFLAG_REQ,
> +     .help = N_("architecture")
> +    },

Question: would it make sense to have --arch be optional, and to default
it to the arch learned by uname() if not present?  I guess for local
systems, that's a convenience factor; for remote systems, it's not quite
the right thing (using virsh on a ppc box to manage a libvirtd on an
x86_64 box for example).  Or maybe if --arch is optional, we call
GetCapabilities under the hood, and enumerate over ALL possible arches
scraped from the capabilities (of course, with slightly different output
layout to distinguish which model names correspond to which arches)?
That could be a followup patch, though.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130913/dbbe664e/attachment-0001.sig>


More information about the libvir-list mailing list