From 88294feff3f130701ff3e3d4312f6602296ae3af9b46e903ded3267f970edcfa Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Fri, 5 Aug 2022 04:59:58 +0000 Subject: [PATCH] - Add patch netmiko-4-support.patch: * Support netmiko >= 4 * As a consequence, bump {Build,}Requires on netmiko to >= 4. - Remove unneeded BuildRequires on mock OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-napalm?expand=0&rev=22 --- netmiko-4-support.patch | 15 +++++++++++++++ python-napalm.changes | 8 ++++++++ python-napalm.spec | 6 +++--- 3 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 netmiko-4-support.patch diff --git a/netmiko-4-support.patch b/netmiko-4-support.patch new file mode 100644 index 0000000..098ce08 --- /dev/null +++ b/netmiko-4-support.patch @@ -0,0 +1,15 @@ +Index: napalm-3.4.0/napalm/pyIOSXR/iosxr.py +=================================================================== +--- napalm-3.4.0.orig/napalm/pyIOSXR/iosxr.py ++++ napalm-3.4.0/napalm/pyIOSXR/iosxr.py +@@ -35,8 +35,8 @@ from xml.sax.saxutils import escape as e + # third party lib + from lxml import etree as ET + from netmiko import ConnectHandler +-from netmiko.ssh_exception import NetMikoTimeoutException +-from netmiko.ssh_exception import NetMikoAuthenticationException ++from netmiko.exceptions import NetMikoTimeoutException ++from netmiko.exceptions import NetMikoAuthenticationException + + # local modules + from napalm.pyIOSXR.exceptions import LockError diff --git a/python-napalm.changes b/python-napalm.changes index b8b42a9..6a1ff34 100644 --- a/python-napalm.changes +++ b/python-napalm.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri Aug 5 04:58:33 UTC 2022 - Steve Kowalik + +- Add patch netmiko-4-support.patch: + * Support netmiko >= 4 + * As a consequence, bump {Build,}Requires on netmiko to >= 4. +- Remove unneeded BuildRequires on mock + ------------------------------------------------------------------- Thu Mar 24 12:42:56 UTC 2022 - pgajdos@suse.com diff --git a/python-napalm.spec b/python-napalm.spec index 5448171..f490ee1 100644 --- a/python-napalm.spec +++ b/python-napalm.spec @@ -28,6 +28,7 @@ URL: https://github.com/napalm-automation/napalm Source: https://github.com/napalm-automation/napalm/archive/%{version}.tar.gz#/napalm-%{version}.tar.gz # https://github.com/napalm-automation/napalm/issues/1594 Patch0: python-napalm-no-mock.patch +Patch1: netmiko-4-support.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -40,7 +41,7 @@ Requires: python-junos-eznc >= 2.2.1 Requires: python-lxml >= 4.3.0 Requires: python-ncclient Requires: python-netaddr -Requires: python-netmiko >= 3.1.0 +Requires: python-netmiko >= 4.0.0 Requires: python-paramiko >= 2.6.0 Requires: python-pyeapi >= 0.8.2 Requires: python-requests >= 2.7.0 @@ -60,10 +61,9 @@ BuildRequires: %{python_module ddt} BuildRequires: %{python_module future} BuildRequires: %{python_module junos-eznc >= 2.2.1} BuildRequires: %{python_module lxml >= 4.3.0} -BuildRequires: %{python_module mock >= 4.0.3} BuildRequires: %{python_module ncclient} BuildRequires: %{python_module netaddr} -BuildRequires: %{python_module netmiko >= 3.1.0} +BuildRequires: %{python_module netmiko >= 4.0.0} BuildRequires: %{python_module paramiko >= 2.6.0} BuildRequires: %{python_module pyeapi >= 0.8.2} BuildRequires: %{python_module pytest >= 5.4.3}