Paso 3: Configuración de DHCDETECT
de importación isc_dhcp_leases.iscdhcpleases IscDhcpLeases
leasepath = ' / var/insecure.lease'
DEF detect(oldlist): "" ":
rtype: tupla de listas "" "
checkthese =]
tmplist =]
leasefile = IscDhcpLeases(leasepath)
leaselist = leasefile.get()
alquiler en leaselist:
Si lease.valid:
tmplist.Append(Lease.ID)
Si lease.ip en oldlist: # TODO: decidir sobre las cosas
continuar
checkthese.Append(Lease.IP)
lostlist = list(set(oldlist) - set(tmplist))
regreso (tmplist, checkthese, lostlist)