aljamima / python-isc-dhcp-leases

Small python module for reading /var/lib/dhcp/dhcpd.leases from isc-dhcp-server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

python-isc-dhcp-leases

Build Status PyPI version Coverage Status

Small python module for reading /var/lib/dhcp/dhcpd.leases from isc-dhcp-server. This module works in Python 2.7 and 3.x

This module also supports reading lease files from the isc dhcp daemon running in IPv6 mode (Since version 0.4.0).

Installation

Through pypi

Through your distribution package manager

This python module is currently packaged in Debian unstable (release for Debian 9) and will be packaged in Ubuntu 17.04 (Zesty Zapus)

Through git

Usage

Or read a gzip'ed file:

The Lease object has the following fields (only for IPv4 leases):

The Lease6 object has the following fields (only for IPv6):

Unit tests

The unit tests can be run with setup.py:

About

Small python module for reading /var/lib/dhcp/dhcpd.leases from isc-dhcp-server

License:MIT License


Languages

Language:Python 100.0%