aboutsummaryrefslogtreecommitdiff
path: root/phpipam/backend.py
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2020-12-11 01:08:37 +0100
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2020-12-11 01:08:37 +0100
commit75204dcd93a06699669e51f6e34487aacbcde6a7 (patch)
tree9baca3c9b86c3d8563ef67fd87245447707e9243 /phpipam/backend.py
parent17bd5b60a6d1445d208c1486c5b937c7f7881154 (diff)
downloadpython-phpipam-75204dcd93a06699669e51f6e34487aacbcde6a7.tar.gz
error handling, doc
Diffstat (limited to 'phpipam/backend.py')
-rwxr-xr-xphpipam/backend.py20
1 files changed, 0 insertions, 20 deletions
diff --git a/phpipam/backend.py b/phpipam/backend.py
index 81af316..64dfcb0 100755
--- a/phpipam/backend.py
+++ b/phpipam/backend.py
@@ -14,24 +14,6 @@ class apiObjectNotFoundException(Exception):
class phpipamBackend:
def __init__(self, api_url, app_id, api_user, api_password):
- """
- Parameters
- ----------
- api_url : str
- URL of the phpIPAM instance. Example: https://phpipam.example.com/
- app_id : str
- AppID set in phpIPAM API settings
- api_user : str
- username, leave blank to use static token-authentication
- api_password : str
- user password or static auth token
-
- Raises
- ------
- apiConnectionException
- if the connection/authentification fails
- """
-
self.api_url = api_url.strip('/') + '/api/' + app_id
self.api_user = api_user
self.api_password = api_password
@@ -62,8 +44,6 @@ class phpipamBackend:
return expiration < datetime.datetime.now()
def request ( self, method, url, data = {} ):
- """Wrapper for _req for checking result and only returning data"""
-
if self._isTokenExpired():
self._getApiToken()