On 07/23/2014 02:32 PM, Eric Blake wrote:
I think the enhanced format should look like:
{
"server-duid": "...",
"leases": [
{
"iaid": "1221229",
"ip-address": "2001:db8:ca2:2:1::95",
"mac-address": "52:54:00:12:a2:6d",
"hostname": "Fedora20",
"client-id":
"00:04:1a:c1:d9:6b:5a:0a:e2:bc:f8:4b:1e:37:2e:38:22:55"
"expiry-time": 1393244216
},
...
]
}
Another idea: make it easier for any future changes. In your top-level
object, add some other fields:
{
"file-format": 1,
"comment": "leases file generated by leaseshelper from libvirt
1.2.7",
"server-duid"...
where file-format was implicitly 0 for the old style, and where you can
bump it to 2 if we have to make future changes; and where the comment is
free-form (human-readable, not machine-parseable) information that makes
it easier to debug what the file contains and which build of
leaseshelper generated it (since the leaseshelper version might be
different than libvirtd).
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org