All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: Programmingkid <programmingkidx@gmail.com>
Cc: qemu-devel@nongnu.org, Markus Armbruster <armbru@redhat.com>,
	Gonglei <arei.gonglei@huawei.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v3] monitor: allow object_del & device_del to accept QOM paths
Date: Tue, 1 Sep 2015 18:00:52 +0200	[thread overview]
Message-ID: <55E5CBB4.6060109@suse.de> (raw)
In-Reply-To: <649D6DBF-36CB-4292-AAE6-C8A7454B55D0@gmail.com>

Am 01.09.2015 um 17:58 schrieb Programmingkid:
> On Sep 1, 2015, at 11:55 AM, Eric Blake wrote:
>> On 09/01/2015 07:23 AM, Daniel P. Berrange wrote:
>>>>> +Remove device @var{id}. @var{id} may be a short ID
>>>>> +or a QOM object path.
>>>>
>>>> Have you considered using two alternative parameters, id and qom-path?
>>>> (qom_path was used elsewhere)
>>>
>>> I'm not fussed either way, but I thought it simpler to not try to change
>>> the accepted parameters of the existing commands.  Looking, the only
>>> place I notice that uses a 'qom_path' is the return data in the CpuInfo
>>> struct.
>>>
>>> Does anyone have strong feelings either way about use of id for both vs
>>> qom-path or id ?
>>
>> Reusing 'id':
>> - Pros
>>  - less complicated interface (don't have to check for mutual exclusion)
>> - Cons
>>  - not introspectible (can't tell by introspection alone whether id can
>> take a QOM path)
>>  - confusing name (but not the first time we've had that issue)
>>
>> Adding 'qom-path':
>> - Pros
>>  - introspectible
>>  - JSON expresses everything (we don't have to parse the first
>> character of the string to know which style was meant, as the choice of
>> key already decided it)
>> - Cons
>>  - Have to implement mutual exclusion ourselves (can't take 'id' and
>> 'qom-path' at the same time, and at least one must be specified), unless
>> we invent a new way for qapi to express mutual exclusion (there are
>> other existing commands that would benefit from such an extension)
> 
> Don't forget having a really long command to type up just to find out
> what qom path you need. 
> 
> Also the qom path itself is very long. A simple ID is much easier to type out.

That's besides the point: IDs can already be specified without this
patch. This patch is shoehorning QOM paths into an existing ID argument.

Regards,
Andreas

-- 
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton; HRB 21284 (AG Nürnberg)

  reply	other threads:[~2015-09-01 16:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-01  9:50 [Qemu-devel] [PATCH v3] monitor: allow object_del & device_del to accept QOM paths Daniel P. Berrange
2015-09-01 13:13 ` Gonglei
2015-09-01 13:17 ` Andreas Färber
2015-09-01 13:23   ` Daniel P. Berrange
2015-09-01 15:55     ` Eric Blake
2015-09-01 15:58       ` Programmingkid
2015-09-01 16:00         ` Andreas Färber [this message]
2015-09-01 15:57 ` Eric Blake
2015-09-02  9:40 ` Paolo Bonzini

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=55E5CBB4.6060109@suse.de \
    --to=afaerber@suse.de \
    --cc=arei.gonglei@huawei.com \
    --cc=armbru@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=programmingkidx@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /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.