'reading information from leases file which is needed to pass to
dhcp_release6 command line utility if some of these leases are not
needed anymore
in this method  ipv4 entries in leases file are ignored, as info in
hosts file is enough
each line in dnsmasq leases file is one of the following
* duid entry: duid server_duid
There MUST be single duid entry per file
* ipv4 entry: space separated list
- The expiration time (seconds since unix epoch) or duration
(if dnsmasq is compiled with HAVE_BROKEN_RTC) of the lease.
0 means infinite.
- The link address, in format XX-YY:YY:YY[...], where XX is the ARP
hardware type.  "XX-" may be omitted for Ethernet.
- The IPv4 address
- The hostname (sent by the client or assigned by dnsmasq)
or \'*\' for none.
- The client identifier (colon-separated hex bytes)
or \'*\' for none.
*  ipv6 entry: space separated list
- The expiration time or duration
- The IAID as a Big Endian decimal number, prefixed by T for
IA_TAs (temporary addresses).
- The IPv6 address
- The hostname or \'*\'
- The client DUID (colon-separated hex bytes) or \'*\' if unknown
original discussion is in dnsmasq mailing list
http://lists.thekelleys.org.uk/pipermail/        dnsmasq-discuss/2016q2/010595.html
:param filename: leases file
:return: dict, keys are IPv6 addresses, values are dicts containing
iaid, client_id and server_id'

def _read_v6_leases_file_leases(self, filename):

    leases = {}
    server_id = None
    if os.path.exists(filename):
        with open(filename) as f:
            for l in f.readlines():
                if l.startswith('duid'):
                    if (not server_id):
                        server_id = l.strip().split()[1]
                        continue
                    else:
                        LOG.warning(_LW('Multiple    DUID    entries    in    %s    lease    file,    dnsmasq    is    possibly    not    functioning    properly'), filename)
                        continue
                parts = l.strip().split()
                (iaid, ip, client_id) = (parts[1], parts[2], parts[4])
                ip = ip.strip('[]')
                if (netaddr.IPAddress(ip).version == constants.IP_VERSION_4):
                    continue
                leases[ip] = {'iaid': iaid, 'client_id': client_id, 'server_id': server_id}
    return leases
