All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Richard W.M. Jones" <rjones@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: lilei@linux.vnet.ibm.com, qemu-devel@nongnu.org,
	peter.huangpeng@huawei.com, lcapitulino@redhat.com,
	lersek@redhat.com, mdroth@linux.vnet.ibm.com,
	zhanghailiang <zhang.zhanghailiang@huawei.com>
Subject: Re: [Qemu-devel] [RFC PATCH 1/2] qga: Introduce guest-get-os-version command with stubs
Date: Sat, 3 Jan 2015 00:32:21 +0000	[thread overview]
Message-ID: <20150103003221.GA9693@redhat.com> (raw)
In-Reply-To: <54905C92.7070203@redhat.com>

On Tue, Dec 16, 2014 at 09:23:46AM -0700, Eric Blake wrote:
> On 12/16/2014 12:30 AM, zhanghailiang wrote:
> > +# Since: 2.3
> > +##
> > +{ 'type': 'GuestOSVersion',
> > +  'data': {'name': 'str', 'type': 'int'} }
> 
> 'name' feels a bit vague; it looks like you are intending to use the
> string as a free-form text field, where the guest can supply arbitrary
> strings.  Maybe name it 'info' instead? Is it worth being any stricter,
> such as having actual enums of known values?  On the other hand, tying
> to known enums means we have to update qemu-ga every time a new guest
> gains support for running the agent, while free-form string leaves us a
> bit more flexible.  Or maybe you want both, as in:
> 
> { 'enum': 'GuestOSFamily', 'data': ['Windows', 'Linux', 'other'] }
> { 'type': 'GuestOSVersion',
>   'data': { 'info': 'str', 'family': 'GuestOSFamily',
>     'word-width': 'int' } }

I think it's better to tie this to libosinfo, rather than
invent yet another new classification for OSes.

Rich.

> > +
> > +##
> > +# @guest-get-os-version:
> > +#
> > +# Get the guest's operating system version and bit.
> 
> s/bit/word width/
> 
> > +#
> > +# This is a read-only operation.
> > +#
> > +# Returns: version
> > +#
> > +# Since: 2.3
> > +##
> > +{ 'command': 'guest-get-os-version',
> > +  'returns': 'GuestOSVersion' }
> 
> with my suggestions, a usage might be:
> => { "execute": "guest-get-os-version" }
> <= { "return": { "family": "Windows",
>      "info": "Microsoft Windows Server 2012 R2",
>      "word-width": 64 } }
> 
> -- 
> Eric Blake   eblake redhat com    +1-919-301-3266
> Libvirt virtualization library http://libvirt.org
> 



-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html

  reply	other threads:[~2015-01-03  0:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-16  7:30 [Qemu-devel] [RFC PATCH 0/2] qga: add guest-get-os-version for windows zhanghailiang
2014-12-16  7:30 ` [Qemu-devel] [RFC PATCH 1/2] qga: Introduce guest-get-os-version command with stubs zhanghailiang
2014-12-16 16:23   ` Eric Blake
2015-01-03  0:32     ` Richard W.M. Jones [this message]
2014-12-16  7:30 ` [Qemu-devel] [RFC PATCH 2/2] qga: implement qmp_guest_get_os_version for windows zhanghailiang
2014-12-16 11:48   ` Yan Vugenfirer
2014-12-16 16:26     ` Eric Blake
2014-12-17  8:14       ` zhanghailiang
2014-12-16  9:38 ` [Qemu-devel] [RFC PATCH 0/2] qga: add guest-get-os-version " Yan Vugenfirer
2014-12-16 11:06   ` zhanghailiang
2014-12-16 16:25 ` Eric Blake
2014-12-17  8:12   ` zhanghailiang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150103003221.GA9693@redhat.com \
    --to=rjones@redhat.com \
    --cc=eblake@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=lersek@redhat.com \
    --cc=lilei@linux.vnet.ibm.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=peter.huangpeng@huawei.com \
    --cc=qemu-devel@nongnu.org \
    --cc=zhang.zhanghailiang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.