[libvirt] [PATCH v2] leaseshelper: improvements to support all events

Eric Blake eblake at redhat.com
Wed Jul 23 21:03:26 UTC 2014


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140723/18eb4bed/attachment-0001.sig>


More information about the libvir-list mailing list