Napalm 4 compatibility, newer dependencies
This commit is contained in:
1 parent
7e1d345af6
commit
f3d13a5e31
5 files changed
+22
-31
No files matched your search
+5
-12
@@ -45,6 +45,8 @@ s350_base_interfaces = {
|
||||
"te": "TengigabitEthernet",
|
||||
}
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
class S350Driver(NetworkDriver):
|
||||
"""Napalm driver for S350."""
|
||||
@@ -121,16 +123,6 @@ class S350Driver(NetworkDriver):
|
||||
"""Close the connection to the device."""
|
||||
self.device.disconnect()
|
||||
|
||||
def cli(self, commands):
|
||||
output = {}
|
||||
try:
|
||||
for cmd in commands:
|
||||
output[cmd] = self.device.send_command(cmd)
|
||||
|
||||
return output
|
||||
except (socket.error, EOFError) as e:
|
||||
raise ConnectionClosedException(str(e))
|
||||
|
||||
def _send_command(self, command):
|
||||
"""Wrapper for self.device.send.command().
|
||||
|
||||
@@ -291,7 +283,8 @@ class S350Driver(NetworkDriver):
|
||||
fqdn = "{0}.{1}".format(hostname, domainname)
|
||||
|
||||
# interface_list
|
||||
interfaces = []
|
||||
|
||||
interfaces: List[str] = []
|
||||
show_int_st = show_int_st.strip()
|
||||
# remove the header information
|
||||
show_int_st = re.sub(
|
||||
@@ -312,7 +305,7 @@ class S350Driver(NetworkDriver):
|
||||
"model": str(model),
|
||||
"os_version": str(os_version),
|
||||
"serial_number": str(serial_number),
|
||||
"uptime": uptime,
|
||||
"uptime": float(uptime),
|
||||
"vendor": "Cisco",
|
||||
}
|
||||
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
napalm>=3.0.0, <4.0.0
|
||||
netmiko>=3.1.0, <4.0.0
|
||||
black
|
||||
napalm<=4.0.0
|
||||
netmiko<=4.0.0
|
||||
black<=24.3.0 # CVE-2024-21503
|
||||
coveralls
|
||||
ddt
|
||||
flake8-import-order
|
||||
pytest==6.2.5
|
||||
# pytest==6.2.5
|
||||
pytest
|
||||
pytest-cov
|
||||
pytest-json
|
||||
pytest-pythonpath
|
||||
pylama
|
||||
pyflakes==2.4.0 #prevent problems
|
||||
# pyflakes==2.4.0 #prevent problems
|
||||
pyflakes
|
||||
mock
|
||||
tox
|
||||
+3
-3
@@ -1,3 +1,3 @@
|
||||
napalm>=3.0.0, <4.0.0
|
||||
netmiko>=3.1.0, <4.0.0
|
||||
netaddr
|
||||
napalm<=4.0.0
|
||||
netmiko<=4.0.0
|
||||
netaddr<=1.2.1
|
||||
@@ -12,7 +12,7 @@ with open("README.md", "r") as fs:
|
||||
|
||||
setup(
|
||||
name="napalm-s350",
|
||||
version="0.3.1",
|
||||
version="0.4.0",
|
||||
packages=find_packages(exclude=("test*",)),
|
||||
author="Jasper Lievisse Adriaanse, Petr Klíma, Daniel Bacher",
|
||||
author_email="j@jasper.la, qaxi@seznam.cz, mail@phill93.de",
|
||||
@@ -25,9 +25,12 @@ setup(
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.6",
|
||||
"Programming Language :: Python :: 3.7",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Programming Language :: Python :: 3.12",
|
||||
"Programming Language :: Python :: 3.13",
|
||||
"Operating System :: POSIX :: Linux",
|
||||
"Operating System :: MacOS",
|
||||
],
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
[tox]
|
||||
#envlist = py3{6,7,8},black,pylama,sphinx
|
||||
envlist = py3{8,9,10,11,12},pylama,black
|
||||
envlist = py3{8,9,10,11,12,13},pylama,black
|
||||
skip_missing_interpreters = true
|
||||
|
||||
[testenv]
|
||||
@@ -20,9 +19,3 @@ commands =
|
||||
commands =
|
||||
pylama .
|
||||
|
||||
[testenv:sphinx]
|
||||
commands =
|
||||
make doctest
|
||||
|
||||
whitelist_externals =
|
||||
make
|
||||
Reference in new issue
Block a user