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

Re: [libvirt] [PATCH v2] Add helper program to create custom leases



On Thu, Jan 16, 2014 at 9:07 AM, Doug Goldstein <cardoe cardoe com> wrote:
> On Jan 14, 2014, at 2:09 PM, Nehal J Wani <nehaljw kkd1 gmail com> wrote:
>>
>> Introduce helper program to catch events from dnsmasq and maintain a custom
>> lease file per network. It supports DHCPv4 and DHCPv6. The file is saved as
>> "<interface-name>.status".
>>
>> The format of each lease is:
>> <expiry-time (epoch time)> <mac> <iaid> <ip-address> <hostname> <clientid>
>>
>
> I feel like I'm bikesheding but is it the best idea to have a custom file format? I know our string handling code makes this really easy to do but it just has a slight code smell to make our own format. We link to stuff like yajl and libxml for JSON/XML support and its really simple to do so we could easily write out a JSON/XML file and read it in.
>
> Definitely don't rework the patch based on my comments because we'll 99.9% go with this way, I'm just asking a question I felt should be asked.
>

I understand the point you are trying to raise here. A similar
discussion had taken place when I had posted the RFC:
http://www.redhat.com/archives/libvir-list/2013-October/msg01024.html
. If y'all still think that we should be using a format we already
have a parser for, I'll be happy to rewrite the patch :-)


-- 
Nehal J Wani


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