[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4] qemu-ga: Add guest-network-info command
From: |
Luiz Capitulino |
Subject: |
Re: [Qemu-devel] [PATCH v4] qemu-ga: Add guest-network-info command |
Date: |
Tue, 28 Feb 2012 14:41:42 -0300 |
On Tue, 28 Feb 2012 11:09:38 -0600
Michael Roth <address@hidden> wrote:
> On Tue, Feb 28, 2012 at 11:22:22AM -0300, Luiz Capitulino wrote:
> > On Mon, 27 Feb 2012 20:07:28 -0600
> > Michael Roth <address@hidden> wrote:
> >
> > > What about something like this instead:
> > >
> > > { 'enum': 'GuestIpAddressType',
> > > 'data': [ 'ipv4', 'ipv6' ] }
> > >
> > > { 'type': 'GuestIpAddress',
> > > 'data': {'ip-address': 'str',
> > > 'ip-address-type': 'GuestIpAddressType',
> > > 'prefix': 'int'} }
> > >
> > > { 'type': 'GuestNetworkInterface',
> > > 'data': {'interface': {'name': 'str',
> > > '*hardware-address': 'str',
> > > '*ip-addresses': ['GuestIpAddress'] } } }
> > >
> > > { 'type': 'GuestNetworkInfo',
> > > 'data': { 'interfaces': ['GuestNetworkInterfaces'] } }
> > >
> > > { 'command': 'guest-network-info',
> > > 'returns': 'GuestNetworkInfo' }
> > >
> > > In the future we might have:
> > >
> > > { 'type': 'GuestNetworkInfo',
> > > 'data': { 'interfaces': ['GuestNetworkInterfaces'],
> > > 'routes': ['GuestNetworkRoute'],
> > > 'bridges': ['GuestNetworkBridge'],
> > > 'firewall-rules': ['firewall-rule'], # yikes
> > > etc. } }
> >
> > Both approaches are fine to me, but another possibility is to split this
> > into
> > multiple commands, like guest-interfaces-info, guest-routes-info etc. This
> > would
> > allow for simpler commands with less clutter.
>
> Hmm, I know Michal already sent a new version with my suggestions, but
> you're right, splitting out the commands simplified both the responses,
> and makes it easier to discover whether or not that information is
> available, since you can look for the command in guest-info before
> attempting it, rather than attempting it and then looking at the result.
>
> So maybe just something this?:
>
> { 'type': 'GuestNetworkInterface',
> 'data': { 'name': 'str',
> '*hardware-address': 'str',
> '*ip-addresses': ['GuestIpAddress'] } } }
>
> { 'command': 'guest-network-interfaces',
> 'returns': ['GuestNetworkInterface'] }
Looks good to me, the only nitpick is that I think command names should be
verbs.
- [Qemu-devel] [PATCH v4] qemu-ga: Add guest-network-info command, Michal Privoznik, 2012/02/19
- Re: [Qemu-devel] [PATCH v4] qemu-ga: Add guest-network-info command, Michal Privoznik, 2012/02/22
- Re: [Qemu-devel] [PATCH v4] qemu-ga: Add guest-network-info command, Luiz Capitulino, 2012/02/23
- Re: [Qemu-devel] [PATCH v4] qemu-ga: Add guest-network-info command, Michal Privoznik, 2012/02/27
- Re: [Qemu-devel] [PATCH v4] qemu-ga: Add guest-network-info command, Michael Roth, 2012/02/27
- Re: [Qemu-devel] [PATCH v4] qemu-ga: Add guest-network-info command, Luiz Capitulino, 2012/02/28
- Re: [Qemu-devel] [PATCH v4] qemu-ga: Add guest-network-info command, Michael Roth, 2012/02/28
- Re: [Qemu-devel] [PATCH v4] qemu-ga: Add guest-network-info command,
Luiz Capitulino <=
- Re: [Qemu-devel] [PATCH v4] qemu-ga: Add guest-network-info command, Michal Privoznik, 2012/02/29
- Re: [Qemu-devel] [PATCH v4] qemu-ga: Add guest-network-info command, Luiz Capitulino, 2012/02/29
- Re: [Qemu-devel] [PATCH v4] qemu-ga: Add guest-network-info command, Michael Roth, 2012/02/29