From c78fd09304c08a8d7c4852081206f5c49971ecb5 Mon Sep 17 00:00:00 2001 From: Brad Walker Date: Sat, 16 May 2020 13:02:21 -0600 Subject: [PATCH 1/2] Add invalid mtu to get_interfaces --- napalm_vyos/vyos.py | 1 + .../mocked_data/test_get_interfaces/normal/expected_result.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/napalm_vyos/vyos.py b/napalm_vyos/vyos.py index c2d87d8..670f4bb 100644 --- a/napalm_vyos/vyos.py +++ b/napalm_vyos/vyos.py @@ -349,6 +349,7 @@ class VyOSDriver(NetworkDriver): "is_enabled": bool(is_enabled), "description": py23_compat.text_type(description), "last_flapped": float(-1), + "mtu": -1, "speed": int(speed), "mac_address": py23_compat.text_type(hw_id) } diff --git a/test/unit/mocked_data/test_get_interfaces/normal/expected_result.json b/test/unit/mocked_data/test_get_interfaces/normal/expected_result.json index d4bf26f..2df2314 100644 --- a/test/unit/mocked_data/test_get_interfaces/normal/expected_result.json +++ b/test/unit/mocked_data/test_get_interfaces/normal/expected_result.json @@ -1 +1 @@ -{"lo": {"is_enabled": true, "description": "", "last_flapped": -1.0, "is_up": true, "mac_address": "00:00:00:00:00:00", "speed": 0}, "eth1": {"is_enabled": true, "description": "", "last_flapped": -1.0, "is_up": true, "mac_address": "...", "speed": 0}, "eth0": {"is_enabled": true, "description": "", "last_flapped": -1.0, "is_up": true, "mac_address": "...", "speed": 0}} +{"lo": {"is_enabled": true, "description": "", "last_flapped": -1.0, "is_up": true, "mac_address": "00:00:00:00:00:00", "mtu": -1, "speed": 0}, "eth1": {"is_enabled": true, "description": "", "last_flapped": -1.0, "is_up": true, "mac_address": "...", "mtu": -1, "speed": 0}, "eth0": {"is_enabled": true, "description": "", "last_flapped": -1.0, "is_up": true, "mac_address": "...", "mtu": -1, "speed": 0}} From b883dcbbb06f33941ef9d27bb0d0ebb4e2437666 Mon Sep 17 00:00:00 2001 From: Brad Walker Date: Sat, 16 May 2020 13:02:57 -0600 Subject: [PATCH 2/2] Bump to 0.1.7 and require NAPALM 2.5 --- .travis.yml | 5 +++-- requirements.txt | 4 ++-- setup.py | 6 +++--- tox.ini | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index c43fe17..d8982f9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,9 @@ language: python python: - 2.7 -- 3.4 -- 3.5 +- 3.6 +- 3.7 +- 3.8 install: - pip install tox-travis - pip install coveralls diff --git a/requirements.txt b/requirements.txt index 50c91a5..b8b9ff5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -napalm==2.* +napalm>=2.5,<3.0 paramiko -netmiko>=1.1.0 +netmiko<3.0 vyattaconfparser diff --git a/setup.py b/setup.py index bf90a64..e2a096a 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ __author__ = 'Piotr Pieprzycki ' setup( name="napalm-vyos", - version="0.1.6", + version="0.1.7", packages=find_packages(), author="Piotr Pieprzycki", author_email="piotr.pieprzycki@dreamlab.pl", @@ -22,9 +22,9 @@ setup( 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', 'Operating System :: POSIX :: Linux', 'Operating System :: MacOS', ], diff --git a/tox.ini b/tox.ini index 9a30816..46e039c 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py27,py35 +envlist = py27,py36,py37,py38 [testenv] deps =