Re: [PATCH] Use camelCase for XML attribute numQueues

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/18/2013 10:27 AM, Eric Blake wrote:
> On 04/18/2013 03:02 AM, Martin Kletzander wrote:
>> In commit d4bf0a9, we used num_queues for an attribute in the XML, but
>> the consensus is that we use camelCase for that.  Since there was no
>> release yet (the above commit describes as v1.0.4-65-gd4bf0a9), we
>> still have time to change it.
> You may want to wait for DV's opinion on naming, but I wasn't aware that
> we had a consensus on camelCase.  In fact, '_' is currently winning,
> although it's hard to say whether that is limited to older interfaces.
>
> $ prefix='\(attribute\|element\) name=.[^'\''"]*'
> $ git grep "${prefix}[A-Z]" docs/schemas/ | wc
>      14      42     977
> $ git grep "${prefix}-" docs/schemas/ | wc
>      29      87    1925
> $ git grep "${prefix}_" docs/schemas/ | wc
>      45     135    3075
>
> But I personally don't like _, and think camelCase or - is nicer, so I
> could live with this change if we get consensus.
>
>> Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx>
>> ---
>> This patch applies on top of Laine's RNG tightening patch [1] and it
>> was proposed in that thread as well.
>>
>> [1] http://www.redhat.com/archives/libvir-list/2013-April/msg01320.html
>> ---
>>  docs/formatdomain.html.in                                           | 2 +-
>>  docs/schemas/domaincommon.rng                                       | 2 +-
>>  src/conf/domain_conf.c                                              | 6 +++---
>>  src/qemu/qemu_command.c                                             | 2 +-
>>  tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-scsi-num_queues.xml | 2 +-
>>  5 files changed, 7 insertions(+), 7 deletions(-)
>>
> The patch is accurate, but I don't want to give ACK without more
> agreement on what naming convention we want for new XML (we should
> probably patch HACKING to enforce a style if we have consensus).

I would agree with that - I've brought this up a couple of times, but
always am a bit uncomfortable of being possibly perceived as some sort
of obsessive-compulsive person, since it really is an aesthetic choice
and there are no written rules to back it up. (and actually I personally
have no preference).


>   You
> are correct that once 1.0.5 is released it will be too late to change,
> so now is the time to decide.


I'm now also wondering if numQueues should go in a <driver> subelement,
since it is a tuning parameter specific to the backend of one particular
scsi controller model. Similar attributes for the virtio <interface> and
[some disk model I don't feel like looking up right now] <disk> have
also been put in <driver>, and as I understand there will be a similar
attribute added to <interface> (only for virtio with vhost-net
enabled?), and it will most likely fit best in the <driver> subelement.

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]