15
0
forked from pool/python-napalm

Compare commits

7 Commits

Author SHA256 Message Date
b1de697a1f Accepting request 1305957 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1305957
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-napalm?expand=0&rev=19
2025-09-20 20:04:00 +00:00
eaab8fded1 - Update to 5.1.0
* fix: documentation build
  * fix: documentation build (#2066)
  * Fixes #2086 stripping whitespace
  * Bump types-setuptools from 69.2.0.20240317 to 69.5.0.20240519
  * Bump pytest from 7.3.1 to 8.2.1
  * Bump sphinx from 7.2.6 to 7.3.7
  * Bump black from 24.3.0 to 24.4.2
  * Bump mypy from 1.9.0 to 1.10.0
  * Closes #2028: Fix typo
  * Bump jinja2 from 3.1.3 to 3.1.4
  * Bump types-six from 1.16.21.20240311 to 1.16.21.20240513
  * Bump coveralls from 3.3.1 to 4.0.1
  * Bump ansible from 9.4.0 to 9.6.0
  * Bump types-requests from 2.31.0.20240406 to 2.32.0.20240521
  * Bump types-setuptools from 69.5.0.20240519 to 69.5.0.20240522
  * Rework eos.get_bgp_neighbor
  * added pyenv .python-version file to the gitignore
  * Small fixes for nxos_ssh
  * Improve nxos_ssh version handling
  * Bump ansible version in docs requirements
  * Draft: Update eos CLI vrf command
  * use plain dict in IOSDriver.get_bgp_neighbors_detail()
  * Support NTP server details in base, EOS
  * Bump urllib3 from 2.2.1 to 2.2.2
  * Bump types-requests from 2.32.0.20240521 to 2.32.0.20240712
  * Bump pytest from 8.2.1 to 8.3.2
  * Bump mypy from 1.10.0 to 1.11.1
  * Bump types-pyyaml from 6.0.12.20240311 to 6.0.12.20240808
  * Bump types-requests from 2.32.0.20240712 to 2.32.0.20241016

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-napalm?expand=0&rev=39
2025-09-19 08:53:54 +00:00
baa24d4fd0 Accepting request 1269789 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1269789
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-napalm?expand=0&rev=18
2025-04-16 18:41:35 +00:00
3af8d75fe6 - Enable sle15_python_module_pythons (project is Python 3.8+)
- No longer remove Junos tests

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-napalm?expand=0&rev=37
2025-04-16 07:58:36 +00:00
cd9f540a39 Accepting request 1229703 from devel:languages:python
- Update to 5.0.0:
  * New features
    + Add format optional variable to core drivers to support get_config()
      options
    + [Junos] Add huge_tree as an optional_arg in junos to fix xml huge
      tree node
    + [Validate] Add tolerance percentage
  * Improvements and bug fixes
    + [NX-OS] Update nxos.py to expose file transfer errors
    + [Validate] Use isinstance(list) instead of types comparison
    + [Junos] Do not try to parse a "none" value and convert it to "" for
      get_ipv6_neighbors_table
    + [JUNOS] Fix call to lxml.etree.ElementBase.getparent erroneously
      using get_parent
    + [NX-OS SSH, IOS] IPv6 Regex update
    + [IOS] Make get_vlans name whitespace aware
    + [NX-OS] Fix get_bgp_neighbor when neighbor is admin shut
    + [JUNOS] get_bgp_config() - ValueError: Can't convert with callable None
    + [IOS] get_bgp_neighbors same IP different VRF
    + [NX-OS] Handle non standard output for PSU's in get_environment
    + [IOS-XR] Use LastStateTransitionTime to populate last_flapped for
      get_interfaces() in IOS-XR
    + [Junos] Fix Can't convert with callable None
- Refreshed python-napalm-no-mock.patch
- Removed patches, included upstream: 
  * napalm-gh-pr1796-xmlgetparent.patch
  * remove-future-requirement.patch
- Add patch support-python-313.patch:
  * Use vendored telnetlib provided by netmiko

OBS-URL: https://build.opensuse.org/request/show/1229703
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-napalm?expand=0&rev=17
2024-12-10 22:43:46 +00:00
20b911d37d make patch apply harder
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-napalm?expand=0&rev=35
2024-12-10 08:07:42 +00:00
6cd1f46004 - Update to 5.0.0:
* New features
    + Add format optional variable to core drivers to support get_config()
      options
    + [Junos] Add huge_tree as an optional_arg in junos to fix xml huge
      tree node
    + [Validate] Add tolerance percentage
  * Improvements and bug fixes
    + [NX-OS] Update nxos.py to expose file transfer errors
    + [Validate] Use isinstance(list) instead of types comparison
    + [Junos] Do not try to parse a "none" value and convert it to "" for
      get_ipv6_neighbors_table
    + [JUNOS] Fix call to lxml.etree.ElementBase.getparent erroneously
      using get_parent
    + [NX-OS SSH, IOS] IPv6 Regex update
    + [IOS] Make get_vlans name whitespace aware
    + [NX-OS] Fix get_bgp_neighbor when neighbor is admin shut
    + [JUNOS] get_bgp_config() - ValueError: Can't convert with callable None
    + [IOS] get_bgp_neighbors same IP different VRF
    + [NX-OS] Handle non standard output for PSU's in get_environment
    + [IOS-XR] Use LastStateTransitionTime to populate last_flapped for
      get_interfaces() in IOS-XR
    + [Junos] Fix Can't convert with callable None
- Refreshed python-napalm-no-mock.patch
- Removed patches, included upstream: 
  * napalm-gh-pr1796-xmlgetparent.patch
  * remove-future-requirement.patch
- Add patch support-python-313.patch:
  * Use vendored telnetlib provided by netmiko

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-napalm?expand=0&rev=34
2024-12-10 01:27:43 +00:00
7 changed files with 119 additions and 101 deletions

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3ee779fa3949bc34efa1a32ae7b81074bc916c4b9b5a9c8bcd289660bddee6ef
size 1565210

3
napalm-5.1.0.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:888a736ad3b4de2b6eb69f79dfd6538bc6e66e29443db5ea4e20b4aea3bc8d97
size 1569227

View File

@@ -1,25 +0,0 @@
From adb91dffa829127319903fee985a02d127fe13fc Mon Sep 17 00:00:00 2001
From: Chris Moore <cmoore79@depaul.edu>
Date: Fri, 11 Nov 2022 15:46:47 -0600
Subject: [PATCH] fix call to lxml.etree._ElementTree.getparent
lxml.etree._ElementTree.get_parent() doesn't exist - it's getparent() - https://lxml.de/apidoc/lxml.etree.html#lxml.etree.ElementBase.getparent
This enables fetching junos command output as XML through `<command> | display xml`
---
napalm/junos/junos.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/napalm/junos/junos.py b/napalm/junos/junos.py
index 8d56b0fbc..81c83a6c4 100644
--- a/napalm/junos/junos.py
+++ b/napalm/junos/junos.py
@@ -1136,7 +1136,7 @@ def _process_pipe(cmd, txt):
)
raw_txt = self.device.cli(safe_command, warning=False, format=encoding)
if isinstance(raw_txt, etree._Element):
- raw_txt = etree.tostring(raw_txt.get_parent()).decode()
+ raw_txt = etree.tostring(raw_txt.getparent()).decode()
cli_output[str(command)] = raw_txt
else:
cli_output[str(command)] = str(_process_pipe(command, raw_txt))

View File

@@ -1,36 +0,0 @@
Index: napalm-4.0.0/test/nxos/test_getters.py
===================================================================
--- napalm-4.0.0.orig/test/nxos/test_getters.py
+++ napalm-4.0.0/test/nxos/test_getters.py
@@ -5,7 +5,7 @@ from napalm.base.test import helpers
from napalm.base import models
import pytest
-from mock import patch
+from unittest.mock import patch
def mock_time():
Index: napalm-4.0.0/test/nxos_ssh/test_getters.py
===================================================================
--- napalm-4.0.0.orig/test/nxos_ssh/test_getters.py
+++ napalm-4.0.0/test/nxos_ssh/test_getters.py
@@ -5,7 +5,7 @@ from napalm.base.test import helpers
from napalm.base import models
import pytest
-from mock import patch
+from unittest.mock import patch
def mock_time():
Index: napalm-4.0.0/test/eos/test_heredoc.py
===================================================================
--- napalm-4.0.0.orig/test/eos/test_heredoc.py
+++ napalm-4.0.0/test/eos/test_heredoc.py
@@ -1,4 +1,4 @@
-import mock
+import unittest.mock as mock
import pytest
from textwrap import dedent

View File

@@ -1,3 +1,111 @@
-------------------------------------------------------------------
Thu Sep 18 13:46:04 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
- Update to 5.1.0
* fix: documentation build
* fix: documentation build (#2066)
* Fixes #2086 stripping whitespace
* Bump types-setuptools from 69.2.0.20240317 to 69.5.0.20240519
* Bump pytest from 7.3.1 to 8.2.1
* Bump sphinx from 7.2.6 to 7.3.7
* Bump black from 24.3.0 to 24.4.2
* Bump mypy from 1.9.0 to 1.10.0
* Closes #2028: Fix typo
* Bump jinja2 from 3.1.3 to 3.1.4
* Bump types-six from 1.16.21.20240311 to 1.16.21.20240513
* Bump coveralls from 3.3.1 to 4.0.1
* Bump ansible from 9.4.0 to 9.6.0
* Bump types-requests from 2.31.0.20240406 to 2.32.0.20240521
* Bump types-setuptools from 69.5.0.20240519 to 69.5.0.20240522
* Rework eos.get_bgp_neighbor
* added pyenv .python-version file to the gitignore
* Small fixes for nxos_ssh
* Improve nxos_ssh version handling
* Bump ansible version in docs requirements
* Draft: Update eos CLI vrf command
* use plain dict in IOSDriver.get_bgp_neighbors_detail()
* Support NTP server details in base, EOS
* Bump urllib3 from 2.2.1 to 2.2.2
* Bump types-requests from 2.32.0.20240521 to 2.32.0.20240712
* Bump pytest from 8.2.1 to 8.3.2
* Bump mypy from 1.10.0 to 1.11.1
* Bump types-pyyaml from 6.0.12.20240311 to 6.0.12.20240808
* Bump types-requests from 2.32.0.20240712 to 2.32.0.20241016
* Bump pytest from 8.3.2 to 8.3.4
* Bump urllib3 from 2.2.2 to 2.3.0
* Bump ansible from 9.6.1 to 11.2.0
* Bump markupsafe from 2.1.5 to 3.0.2
* Bump ansible from 11.2.0 to 11.3.0
* Bump ttp-templates from 0.3.6 to 0.3.7
* Bump jinja2 from 3.1.4 to 3.1.5
* Bump types-pyyaml from 6.0.12.20240808 to 6.0.12.20241230
* Bump types-six from 1.16.21.20240513 to 1.17.0.20241205
* Bump pytest from 8.3.4 to 8.3.5
* Bump mock from 5.1.0 to 5.2.0
* [EOS] Fix confirm_commit for ssh transport
* Discard unexpected NTP strings
* Remove external mock dependency
* Bump jinja2 from 3.1.5 to 3.1.6
* Add support for PY3.13; use vendored version of telnetlib
* Bump pytest-cov from 5.0.0 to 6.0.0
* Bump mypy from 1.11.1 to 1.15.0
* Bump sphinx from 7.3.7 to 8.2.3
* Bump types-six from 1.17.0.20241205 to 1.17.0.20250304
* Bump types-requests from 2.32.0.20241016 to 2.32.0.20250306
* Rename ssh_config_file to ssh_config for iosxr_netconf driver
* [eos] fix banner when transport is ssh
* Explicitly close IOSXR connection
* Remove calls to deprecated pkg_resources
* pytest wrapper should return None, not result
* Remove transitive dependency scp from requirements.txt
* Fix pyez dependency issue
* Dependabot updates
* More dependabot updates
* Prep for napalm 5.1.0 release
* Release 5.1.0 (attempt 2)
- Drop python-napalm-no-mock.patch, merged upstream
- Drop support-python-313.patch, merged upstream
- Remove zero-length file from source tree
-------------------------------------------------------------------
Tue Apr 15 11:37:04 UTC 2025 - Georg Pfuetzenreuter <georg.pfuetzenreuter@suse.com>
- Enable sle15_python_module_pythons (project is Python 3.8+)
- No longer remove Junos tests
-------------------------------------------------------------------
Tue Dec 10 08:07:24 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
- Update to 5.0.0:
* New features
+ Add format optional variable to core drivers to support get_config()
options
+ [Junos] Add huge_tree as an optional_arg in junos to fix xml huge
tree node
+ [Validate] Add tolerance percentage
* Improvements and bug fixes
+ [NX-OS] Update nxos.py to expose file transfer errors
+ [Validate] Use isinstance(list) instead of types comparison
+ [Junos] Do not try to parse a "none" value and convert it to "" for
get_ipv6_neighbors_table
+ [JUNOS] Fix call to lxml.etree.ElementBase.getparent erroneously
using get_parent
+ [NX-OS SSH, IOS] IPv6 Regex update
+ [IOS] Make get_vlans name whitespace aware
+ [NX-OS] Fix get_bgp_neighbor when neighbor is admin shut
+ [JUNOS] get_bgp_config() - ValueError: Can't convert with callable None
+ [IOS] get_bgp_neighbors same IP different VRF
+ [NX-OS] Handle non standard output for PSU's in get_environment
+ [IOS-XR] Use LastStateTransitionTime to populate last_flapped for
get_interfaces() in IOS-XR
+ [Junos] Fix Can't convert with callable None
- Refreshed python-napalm-no-mock.patch
- Removed patches, included upstream:
* napalm-gh-pr1796-xmlgetparent.patch
* remove-future-requirement.patch
- Add patch support-python-313.patch:
* Use vendored telnetlib provided by netmiko
-------------------------------------------------------------------
Wed Sep 6 02:57:22 UTC 2023 - Steve Kowalik <steven.kowalik@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-napalm
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,19 +16,15 @@
#
%{?sle15_python_module_pythons}
Name: python-napalm
Version: 4.1.0
Version: 5.1.0
Release: 0
Summary: Network Automation and Programmability Abstraction Layer
License: Apache-2.0
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
# https://github.com/napalm-automation/napalm/pull/1796
Patch1: napalm-gh-pr1796-xmlgetparent.patch
# https://github.com/napalm-automation/napalm/pull/2002
Patch2: remove-future-requirement.patch
BuildRequires: %{python_module base >= 3.9}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
@@ -41,7 +37,7 @@ Requires: python-junos-eznc >= 2.6.3
Requires: python-lxml >= 4.3.0
Requires: python-ncclient
Requires: python-netaddr
Requires: python-netmiko >= 4.0.0
Requires: python-netmiko >= 4.4.0
Requires: python-netutils >= 1.0.0
Requires: python-paramiko >= 2.6.0
Requires: python-pyeapi >= 0.8.2
@@ -53,7 +49,7 @@ Requires: python-ttp
Requires: python-ttp-templates
Requires: python-typing_extensions
Requires(post): update-alternatives
Requires(postun):update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
# SECTION test requirements
BuildRequires: %{python_module Jinja2}
@@ -64,7 +60,7 @@ BuildRequires: %{python_module junos-eznc >= 2.6.3}
BuildRequires: %{python_module lxml >= 4.3.0}
BuildRequires: %{python_module ncclient}
BuildRequires: %{python_module netaddr}
BuildRequires: %{python_module netmiko >= 4.0.0}
BuildRequires: %{python_module netmiko >= 4.4.0}
BuildRequires: %{python_module netutils >= 1.0.0}
BuildRequires: %{python_module paramiko >= 2.6.0}
BuildRequires: %{python_module pyeapi >= 0.8.2}
@@ -86,6 +82,7 @@ interact with different router vendor devices using a unified API.
%prep
%autosetup -p1 -n napalm-%{version}
sed -i '1{/env python/d}' napalm/pyIOSXR/*.py
rm napalm/junos/templates/schedule_probes.j2
%build
%pyproject_wheel
@@ -99,9 +96,6 @@ sed -i '1{/env python/d}' napalm/pyIOSXR/*.py
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
# FIXME: JunOS related unit tests are know to be broken with junos-eznc-2.3.0.
# Do not run those for now. https://github.com/napalm-automation/napalm/issues/1060
rm -Rf test/junos/
%pytest
%post

View File

@@ -1,23 +0,0 @@
From e384ae2dd6a2e157788f325f3e4fdf92349daec5 Mon Sep 17 00:00:00 2001
From: Steve Kowalik <steven@wedontsleep.org>
Date: Wed, 6 Sep 2023 12:52:41 +1000
Subject: [PATCH] Remove future requirement
Now that we support Python >= 3.7, we can remove the requirement on
the future module, which appears to be unused.
---
requirements.txt | 1 -
1 file changed, 1 deletion(-)
diff --git a/requirements.txt b/requirements.txt
index 57ecd72eb..3359b30a6 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -2,7 +2,6 @@ setuptools>=38.4.0
cffi>=1.11.3
paramiko>=2.6.0
requests>=2.7.0
-future
textfsm
jinja2
netaddr