From 23962074afab777391a317795e081c602c08b40b Mon Sep 17 00:00:00 2001 From: Torge Szczepanek Date: Fri, 17 Jan 2020 15:30:05 +0100 Subject: [PATCH 1/4] Fix markdown issues --- README.md | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) 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. From e1b71bb91a1cab640b260385f15a2b122a218c07 Mon Sep 17 00:00:00 2001 From: Torge Szczepanek Date: Fri, 17 Jan 2020 15:31:25 +0100 Subject: [PATCH 2/4] Remove old python versions --- .travis.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7a9dc3b..d23a920 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,6 @@ language: python python: - - 2.6 - 2.7 - - 3.3 - 3.4 - 3.5 - 3.6 From c91ea98dff2e4d40c647051432baf921107d0d26 Mon Sep 17 00:00:00 2001 From: Torge Szczepanek Date: Fri, 17 Jan 2020 15:32:44 +0100 Subject: [PATCH 3/4] Fix markdown issues --- README.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 92c023b..ac00619 100644 --- a/README.md +++ b/README.md @@ -139,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. @@ -156,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. From 4a7dc6703b753cd85e8f132b43111a29b6df86ec Mon Sep 17 00:00:00 2001 From: The Codacy Badger Date: Fri, 17 Jan 2020 14:44:40 +0000 Subject: [PATCH 4/4] Add Codacy badge --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index ac00619..c3c7f80 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +[![Codacy Badge](https://api.codacy.com/project/badge/Grade/eeca983d807b472fa8539506de47ffa6)](https://app.codacy.com/gh/CygnusNetworks/pypureomapi?utm_source=github.com&utm_medium=referral&utm_content=CygnusNetworks/pypureomapi&utm_campaign=Badge_Grade_Dashboard) [![Build Status](https://travis-ci.org/CygnusNetworks/pypureomapi.svg?branch=master)](https://travis-ci.org/CygnusNetworks/pypureomapi) [![Latest Version](https://img.shields.io/pypi/v/pypureomapi.svg)](https://pypi.python.org/pypi/pypureomapi) [![PyPi Status](https://img.shields.io/pypi/status/pypureomapi.svg)](https://pypi.python.org/pypi/pypureomapi) [![PyPi Versions](https://img.shields.io/pypi/pyversions/pypureomapi.svg)](https://pypi.python.org/pypi/pypureomapi)