diff --git a/README.md b/README.md index b5f402e..92c023b 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ omapi-key defomapi; omapi-port 7911; ``` -**Replace the given secret by a key created on your own!** +Replace the given secret by a key created on your own! To generate a key use the following command: @@ -80,7 +80,6 @@ ip = omapi.lookup_ip(mac) print("%s mac currently has ip %s assigned" % (mac, ip)) ``` - If you need full lease information, you can also query the full lease directly by using **lookup_by_lease**, which gives you the full lease details as output: ``` @@ -140,16 +139,16 @@ b'ip-address': b'\xc0\xa8\n\xa7' The following lookup functions are implemented, allowing directly querying the different types: - * lookup_ip_host(mac) - lookups up a host object (static defined host) by mac - * lookup_ip(mac) - lookups a lease object by mac and returns the ip - * lookup_host(name) - lookups a host object by name and returns the ip, mac and hostname - * lookup_host_host(mac) - lookups a host object by mac and returns the ip, mac and name - * lookup_hostname(ip) - lookups a lease object by ip and returns the client-hostname +* lookup_ip_host(mac) - lookups up a host object (static defined host) by mac +* lookup_ip(mac) - lookups a lease object by mac and returns the ip +* lookup_host(name) - lookups a host object by name and returns the ip, mac and hostname +* lookup_host_host(mac) - lookups a host object by mac and returns the ip, mac and name +* lookup_hostname(ip) - lookups a lease object by ip and returns the client-hostname These special functions use: - * lookup_by_host - generic lookup function for host objects - * lookup_by_lease - generic lookup function for lease objects +* lookup_by_host - generic lookup function for host objects +* lookup_by_lease - generic lookup function for lease objects which provide full access to complete lease data. @@ -157,12 +156,12 @@ which provide full access to complete lease data. For adding and deleting host objects (static DHCP leases), there are multiple functions: - * add_host(ip, mac) - * add_host_supersede_name(ip, mac, name) - * add_host_without_ip(mac) - * add_host_supersede(ip, mac, name, hostname=None, router=None, domain=None) - * add_group(groupname, statements) - * add_host_with_group(ip, mac, groupname)) +* add_host(ip, mac) +* add_host_supersede_name(ip, mac, name) +* add_host_without_ip(mac) +* add_host_supersede(ip, mac, name, hostname=None, router=None, domain=None) +* add_group(groupname, statements) +* add_host_with_group(ip, mac, groupname)) See http://jpmens.net/2011/07/20/dynamically-add-static-leases-to-dhcpd/ for original idea (which is now merged) and detailed explanation.