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

Re: [libvirt] [PATCH] Use camelCase for XML attribute numQueues

On 04/18/2013 04:27 PM, 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.

At first I mistaken '-' and '_' in the other thread, but I explained
that later on.  However, this commit message didn't reflect that.  I
also had the feeling that the naming was mainly restricted for
attributes, not that much for elements, but of course it makes sense to
make it global.

>> Signed-off-by: Martin Kletzander <mkletzan redhat com>
>> ---
>> 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).  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 should've made myself clear enough that it is understandable that this
patch is more of a proposal, but I couldn't predict that the discussion
in the other thread will grow so fast in reactions (I hoped that this
will be the place to talk about our decision).

Sorry for rushing it so much, we have enough time before 1.0.5 and I'll
wait (of course) for some final decision on how the final XML should
look like.


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