16 Commits
Author SHA1 Message Date
Petr Klíma b4fd77df46 Merge pull request #86 from napalm-automation-community/develop
Add security changes for black CVE-2024-21503, update test tools
2024-03-26 14:43:07 +01:00
Petr Klima 7e1d345af6 Add scheduled check on develop branch 2024-03-26 14:30:07 +01:00
Petr Klima de857ba48a Update information about required versions to Py3.8+ and napalm 3 2024-03-26 14:22:01 +01:00
Petr Klíma d1b960a407 Merge pull request #85 from napalm-automation-community/dependabot/pip/black-24.3.0
Bump black from 20.8b1 to 24.3.0 to address CVE-2024-21503
2024-03-26 14:14:18 +01:00
Petr Klima 7929c6411c FIX force interface speed as a float 2024-03-26 14:08:17 +01:00
Petr Klima 751126a1f5 FIX add platform name to driver s350 2024-03-26 14:07:10 +01:00
Petr Klima 7a32595838 Allow testing on all supported Py versions 2024-03-26 14:05:20 +01:00
Petr Klima 5049dcdfd6 FIX minor formating fixes raised by pylama 2024-03-26 14:04:04 +01:00
Petr Klima 9787347098 FIX limit napalm and netmiko o version 3.*, soften version requirements 2024-03-26 14:01:31 +01:00
Petr Klima 7023c590e4 FIX minor formating fixes raised by pylama 2024-03-26 14:00:02 +01:00
Petr Klima 593f998376 remove demjson - blocking tests 2024-03-26 12:55:55 +01:00
dependabot[bot] 7206990ee1 Bump black from 20.8b1 to 24.3.0
Bumps [black](https://github.com/psf/black) from 20.8b1 to 24.3.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/commits/24.3.0)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-20 15:48:51 +00:00
Petr Klíma 5da4d3d784 Merge pull request #84 from davama/develop
adding read_timeout_override and session_log optional_args for netmiko
2023-08-28 09:12:30 +02:00
Dave a0b28c9678 adding netmiko option session_log 2023-02-16 16:19:07 -05:00
Dave c74e972691 adding read_timeout_override netmiko option 2023-01-30 08:48:15 -05:00
Petr Klima f30528f14f Merge branch 'master' into develop 2021-03-09 09:48:09 +01:00
8 changed files with 32 additions and 23 deletions

No files matched your search

+3 -1
View File
@@ -11,7 +11,9 @@ on:
branches:
- develop
- master
# check every 14 days
schedule:
- cron: '0 6 5,20 * *'
jobs:
build:
+1 -1
View File
@@ -11,7 +11,7 @@ PyPi: [![Upload](https://github.com/napalm-automation-community/napalm-s350/work
## Requirements
Python 3.6+, napalm 3+
Python 3.8+, napalm 3
## Installation
+9 -6
View File
@@ -77,6 +77,8 @@ class S350Driver(NetworkDriver):
"alt_key_file": "",
"ssh_config_file": None,
"allow_agent": False,
"session_log": None,
"read_timeout_override": None,
}
# Allow for passing additional Netmiko arguments
@@ -87,6 +89,7 @@ class S350Driver(NetworkDriver):
except KeyError:
pass
self.platform = "s350"
self.port = optional_args.get("port", 22)
self.device = None
self.force_no_enable = optional_args.get("force_no_enable", False)
@@ -364,7 +367,7 @@ class S350Driver(NetworkDriver):
return uptime_str
def _get_facts_parse_inventory(self, show_inventory):
""" inventory can list more modules/devices """
"""inventory can list more modules/devices"""
# make 1 module 1 line
show_inventory = re.sub(r"\nPID", " PID", show_inventory, re.M)
# delete empty lines
@@ -471,7 +474,7 @@ class S350Driver(NetworkDriver):
entry = {
"is_up": is_up,
"is_enabled": is_enabled,
"speed": speed,
"speed": float(speed),
"mtu": mtu,
"last_flapped": -1.0,
"description": description,
@@ -523,7 +526,7 @@ class S350Driver(NetworkDriver):
return interfaces
def _get_ip_int_line_to_fields(self, line, fields_end):
""" dynamic fields lenghts """
"""dynamic fields lenghts"""
line_elems = {}
index = 0
f_start = 0
@@ -534,7 +537,7 @@ class S350Driver(NetworkDriver):
return line_elems
def _get_ip_int_fields_end(self, dashline):
""" fields length are diferent device to device, detect them on horizontal lin """
"""fields length are diferent device to device, detect them on horizontal line"""
fields_end = [m.start() for m in re.finditer(" ", dashline.strip())]
# fields_position.insert(0,0)
@@ -588,7 +591,7 @@ class S350Driver(NetworkDriver):
return neighbors
def _get_lldp_neighbors_line_to_fields(self, line, fields_end):
""" dynamic fields lenghts """
"""dynamic fields lenghts"""
line_elems = {}
index = 0
f_start = 0
@@ -599,7 +602,7 @@ class S350Driver(NetworkDriver):
return line_elems
def _get_lldp_neighbors_fields_end(self, dashline):
""" fields length are diferent device to device, detect them on horizontal lin """
"""fields length are diferent device to device, detect them on horizontal line"""
fields_end = [m.start() for m in re.finditer(" ", dashline)]
fields_end.append(len(dashline))
+14 -12
View File
@@ -1,12 +1,14 @@
black==20.8b1
coveralls==2.1.2
ddt==1.4.1
flake8-import-order==0.18.1
pytest==5.4.3
pytest-cov==2.10.1
pytest-json==0.4.0
pytest-pythonpath==0.7.3
pylama==7.7.1
mock==4.0.2
tox==3.20.1
demjson
napalm>=3.0.0, <4.0.0
netmiko>=3.1.0, <4.0.0
black
coveralls
ddt
flake8-import-order
pytest==6.2.5
pytest-cov
pytest-json
pytest-pythonpath
pylama
pyflakes==2.4.0 #prevent problems
mock
tox
+2 -2
View File
@@ -1,3 +1,3 @@
napalm>=3.0.0
netmiko>=3.1.0
napalm>=3.0.0, <4.0.0
netmiko>=3.1.0, <4.0.0
netaddr
+1
View File
@@ -1,4 +1,5 @@
"""Test fixtures."""
from builtins import super
import pytest
+1
View File
@@ -1,4 +1,5 @@
"""Tests for getters."""
from napalm.base.test.getters import BaseTestGetters
import pytest
+1 -1
View File
@@ -1,6 +1,6 @@
[tox]
#envlist = py3{6,7,8},black,pylama,sphinx
envlist = py3{6,7,8},pylama,black
envlist = py3{8,9,10,11,12},pylama,black
skip_missing_interpreters = true
[testenv]