forked from pool/python-napalm-asa
- Add patch napalm3.patch * make the package compatible with python-napalm 3.0.0 OBS-URL: https://build.opensuse.org/request/show/805805 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-napalm-asa?expand=0&rev=4
49 lines
1.7 KiB
Diff
49 lines
1.7 KiB
Diff
Index: napalm-asa-0.1.1/napalm_asa/asa.py
|
|
===================================================================
|
|
--- napalm-asa-0.1.1.orig/napalm_asa/asa.py
|
|
+++ napalm-asa-0.1.1/napalm_asa/asa.py
|
|
@@ -30,7 +30,6 @@ from collections import OrderedDict
|
|
from netaddr import IPNetwork
|
|
|
|
from napalm.base import NetworkDriver
|
|
-from napalm.base.utils import py23_compat
|
|
from napalm.base.exceptions import (
|
|
ConnectionException,
|
|
CommandErrorException,
|
|
@@ -70,7 +69,7 @@ class RespFetcherHttps:
|
|
else:
|
|
return (False, token_request.status_code)
|
|
except requests.exceptions.RequestException as e:
|
|
- raise ConnectionException(py23_compat.text_type(e))
|
|
+ raise ConnectionException(str(e))
|
|
|
|
def delete_token(self):
|
|
"""Delete auth token."""
|
|
@@ -85,7 +84,7 @@ class RespFetcherHttps:
|
|
else:
|
|
return (False, token_delete_request.status_code)
|
|
except requests.exceptions.RequestException as e:
|
|
- raise ConnectionException(py23_compat.text_type(e))
|
|
+ raise ConnectionException(str(e))
|
|
|
|
def get_resp(self, endpoint="", data=None):
|
|
"""Get response from device and returne parsed json."""
|
|
@@ -103,7 +102,7 @@ class RespFetcherHttps:
|
|
|
|
return f.json()
|
|
except requests.exceptions.RequestException as e:
|
|
- raise ConnectionException(py23_compat.text_type(e))
|
|
+ raise ConnectionException(str(e))
|
|
|
|
|
|
class ASADriver(NetworkDriver):
|
|
@@ -276,7 +275,7 @@ class ASADriver(NetworkDriver):
|
|
|
|
return interfaces
|
|
|
|
- def get_config(self, retrieve='all'):
|
|
+ def get_config(self, retrieve='all', full=False, sanitized=False):
|
|
"""Get config."""
|
|
config = {
|
|
'startup': '',
|