[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC 00/11]: QMP feature negotiation support
From: |
Jamie Lokier |
Subject: |
Re: [Qemu-devel] [RFC 00/11]: QMP feature negotiation support |
Date: |
Tue, 26 Jan 2010 15:57:46 +0000 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Daniel P. Berrange wrote:
> On Tue, Jan 26, 2010 at 12:57:54PM +0000, Jamie Lokier wrote:
> > Luiz Capitulino wrote:
> > > capability_enable [ "foo", "bar" ]
> > >
> > > Now, only one command is not terrible difficult, but we would
> > > have to accept an array of objects, like:
> > >
> > > [ { "name": "foo", "enabled": true }, { "name": "bar", "enabled": true } ]
> >
> > That looks like XML-itis.
> >
> > Why not { "foo": true, "bar": true }?
>
> It depends on whether we think we're going to need to add more metadata
> beyond just the enabled/disabled status. If we did want to add a further
> item against foo & bar, then having the array of hashes makes that
> extension easier becaue you add easily add more key/value pairs to
> each.
Sure, extensibility is good, and I personally don't care which
format/function are used. Just wanted to question the padded
structure, because sometimes that style is done unintentially.
Look at the argument leading up here - Luiz says let's use separate,
non-extensible enable/disable commands taking a list, because if it
were a single command it'd be important to make it extensible. Does
that make sense? I don't understand that reasoning.
On that topic: In the regular monitor, commands are often extensible
because they take command-line-style options, and you can always add
more options. What about QMP - are QMP commands all future-extensible
with options in a similar way?
-- Jamie
(ps. XML-itis: a tendancy to write
<element><name>tag</name><attribute><attr-name>name</attr-name><attr-value>value</attr-value></attribute></element>,
when <tag name=value/> would do).
- [Qemu-devel] [PATCH 11/11] QMP: Enable feature negotiation support, (continued)
- [Qemu-devel] [PATCH 11/11] QMP: Enable feature negotiation support, Luiz Capitulino, 2010/01/21
- Re: [Qemu-devel] [RFC 00/11]: QMP feature negotiation support, Markus Armbruster, 2010/01/22
- Re: [Qemu-devel] [RFC 00/11]: QMP feature negotiation support, Anthony Liguori, 2010/01/22
- Re: [Qemu-devel] [RFC 00/11]: QMP feature negotiation support, Markus Armbruster, 2010/01/25
- Re: [Qemu-devel] [RFC 00/11]: QMP feature negotiation support, Luiz Capitulino, 2010/01/26
- Re: [Qemu-devel] [RFC 00/11]: QMP feature negotiation support, Jamie Lokier, 2010/01/26
- Re: [Qemu-devel] [RFC 00/11]: QMP feature negotiation support, Luiz Capitulino, 2010/01/26
- Re: [Qemu-devel] [RFC 00/11]: QMP feature negotiation support, Daniel P. Berrange, 2010/01/26
- Re: [Qemu-devel] [RFC 00/11]: QMP feature negotiation support,
Jamie Lokier <=
- Re: [Qemu-devel] [RFC 00/11]: QMP feature negotiation support, Luiz Capitulino, 2010/01/26