Compare commits

22 Commits

Author SHA256 Message Date
8f7d23cc98 Accepting request 1292516 from devel:languages:python
- update to 1.14.1:
  * 672 Update running configuration commands to be full
    versions. Flatbot OUI and PROTOCOL file updates.
- update to 1.14.0:
  * Library mapping updates and fixes.
  * NIST library updates and fixes for CVE reporting.
  * Documentation fixes.
  * Palo Alto brace configuration fixes.
  * 646 Add Additional SROS Tests.
  * 649 Add RUNNING_CONFIG_MAPPER to help map platform to running
    configuration command.
  * 652 Flatbot OUI File Updates.
  * 653 Flatbot PROTOCOL File Updates.
  * 662 NIST library updates and fixes.
  * 640 Fix documentation issues.
  * 641 Fix documentation for Jinja examples.
  * 651 Fix Palo set format config parsing for curly brace.

OBS-URL: https://build.opensuse.org/request/show/1292516
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-netutils?expand=0&rev=11
2025-07-14 08:52:14 +00:00
be17e3d639 Accepting request 1269145 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1269145
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-netutils?expand=0&rev=10
2025-04-14 14:07:59 +00:00
330d01df60 Enable sle15_python_module_pythons to build for Python 3.11 on Leap (project is now Python 3.9+)
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-netutils?expand=0&rev=20
2025-04-14 07:53:07 +00:00
230eedb276 Accepting request 1267107 from devel:languages:python
- Update to 1.13.0
  * Added is_reversible_wildcardmask, netmask_to_wildcardmask,
    and wildcardmask_to_netmask functions.
  * Added aruba_os and aruba_osswitch parsers.
- Drop fix-version-in-pyproject.patch, fixed upstream

OBS-URL: https://build.opensuse.org/request/show/1267107
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-netutils?expand=0&rev=9
2025-04-04 16:09:45 +00:00
b891bc20ed - Update to 1.13.0
* Added is_reversible_wildcardmask, netmask_to_wildcardmask,
    and wildcardmask_to_netmask functions.
  * Added aruba_os and aruba_osswitch parsers.
- Drop fix-version-in-pyproject.patch, fixed upstream

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-netutils?expand=0&rev=18
2025-04-04 10:53:32 +00:00
86e048839b Accepting request 1238027 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1238027
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-netutils?expand=0&rev=8
2025-01-15 16:45:20 +00:00
3d4458f2da - Update to 1.12.0
* Added Python 3.13 support.
  * Removed Python 3.8 support.
- from version 1.11.0
  * (no changes reported)
- Add fix-version-in-pyproject.patch to fix version in pyproject.toml
- Drop use-legacycrypt-if-required.patch, merged upstream
- Update BuildRequires from pyproject.toml

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-netutils?expand=0&rev=16
2025-01-15 11:45:46 +00:00
2c225b3e9e Accepting request 1227889 from devel:languages:python
- Update to 1.10.0:
  * Added Functionality to ip_network filter to support method calls
    with kwargs.
  * Fix configuration parsers to allow newlines, no longer auto strip
    all newlines.
  * Added NIST URL creation and platform mapper.
  * Added DNA Center platform mappings.
  * Improved error message when duplicate line is parsed.
- Add patch use-legacycrypt-if-required.patch:
  * Use the legacycrypt module where we need to.
- Switch to autosetup macros.

OBS-URL: https://build.opensuse.org/request/show/1227889
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-netutils?expand=0&rev=7
2024-12-03 19:46:26 +00:00
2a6450242f - Update to 1.10.0:
* Added Functionality to ip_network filter to support method calls
    with kwargs.
  * Fix configuration parsers to allow newlines, no longer auto strip
    all newlines.
  * Added NIST URL creation and platform mapper.
  * Added DNA Center platform mappings.
  * Improved error message when duplicate line is parsed.
- Add patch use-legacycrypt-if-required.patch:
  * Use the legacycrypt module where we need to.
- Switch to autosetup macros.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-netutils?expand=0&rev=14
2024-12-03 03:46:40 +00:00
26e6ffa8a7 Accepting request 1172449 from devel:languages:python
- update to 1.8.1:
  * Standard automated updates to Flatbot files: OUI File,
    PROTOCOL Files.
  * #509 Fixed parsing of empty banner, and dual banner for Cisco
    platforms.
- update to 1.8.0:
  * Added support for Python 3.12.
  * Added local support of `distutils.version` now that Python
    3.12 deprecates disutils.
  * Added functions `compare_version_loose` and
    `compare_version_strict` based on `distutils.version`.
  * Added function `paloalto_panos_clean_newlines`.
  * Added various lib_mapper updates.
  * Added HP Comware parser.

OBS-URL: https://build.opensuse.org/request/show/1172449
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-netutils?expand=0&rev=6
2024-05-07 16:05:10 +00:00
2a75c746ad - update to 1.8.1:
* Standard automated updates to Flatbot files: OUI File,
    PROTOCOL Files.
  * #509 Fixed parsing of empty banner, and dual banner for Cisco
    platforms.
- update to 1.8.0:
  * Added support for Python 3.12.
  * Added local support of `distutils.version` now that Python
    3.12 deprecates disutils.
  * Added functions `compare_version_loose` and
    `compare_version_strict` based on `distutils.version`.
  * Added function `paloalto_panos_clean_newlines`.
  * Added various lib_mapper updates.
  * Added HP Comware parser.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-netutils?expand=0&rev=12
2024-05-07 13:19:43 +00:00
4597924055 Accepting request 1158305 from devel:languages:python
- update to 1.7.0:
  * Added the ability to hash a value via `hash_data` function.
  * Added the ability to sort IPs a value via `get_ips_sorted`
    function.
  * Added lib_mapper entries for `ruckus_smartzone`, `cisco_xe`,
    `huawei` and `cisco_xr`.

OBS-URL: https://build.opensuse.org/request/show/1158305
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-netutils?expand=0&rev=5
2024-03-17 21:13:39 +00:00
8b72901ecd - update to 1.7.0:
* Added the ability to hash a value via `hash_data` function.
  * Added the ability to sort IPs a value via `get_ips_sorted`
    function.
  * Added lib_mapper entries for `ruckus_smartzone`, `cisco_xe`,
    `huawei` and `cisco_xr`.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-netutils?expand=0&rev=10
2024-03-15 21:08:08 +00:00
11993f665f Accepting request 1134333 from devel:languages:python
- update to 1.6.0:
  * Added `ubiquiti_airos` parser.
  * Added `ACLRule` and `ACLRules` classes.
  * Added the `ip` functions `is_ip_range`, `is_ip_within`,
    `is_network`, and `get_range_ips`.
  * Added the `asn` function `int_to_asn` in the function.
  * Added `NETUTILSPARSER_LIB_MAPPER` and
    `NETUTILSPARSER_LIB_MAPPER_REVERSE` to lib mapper.
  * Added classy docs to view config parser classes.
  * Added Mikrotik, fastiron, and Panos parsers.
  * Added function to allow conversion from Panos curly bracket
    to set format.
  * Updated Interface mappings for FourHundredGigabitEthernet and
    TwoGigabitEthernet.
  * Added Encryption/Decryption/Comparison for Cisco & Juniper
    Type 9.
  * Added Regex functions to primarily be used wihin your Jinja2
    environment.

  #122 Fixed encrypt type7

OBS-URL: https://build.opensuse.org/request/show/1134333
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-netutils?expand=0&rev=4
2023-12-21 22:38:26 +00:00
cceafab96f - update to 1.6.0:
* Added `ubiquiti_airos` parser.
  * Added `ACLRule` and `ACLRules` classes.
  * Added the `ip` functions `is_ip_range`, `is_ip_within`,
    `is_network`, and `get_range_ips`.
  * Added the `asn` function `int_to_asn` in the function.
  * Added `NETUTILSPARSER_LIB_MAPPER` and
    `NETUTILSPARSER_LIB_MAPPER_REVERSE` to lib mapper.
  * Added classy docs to view config parser classes.
  * Added Mikrotik, fastiron, and Panos parsers.
  * Added function to allow conversion from Panos curly bracket
    to set format.
  * Updated Interface mappings for FourHundredGigabitEthernet and
    TwoGigabitEthernet.
  * Added Encryption/Decryption/Comparison for Cisco & Juniper
    Type 9.
  * Added Regex functions to primarily be used wihin your Jinja2
    environment.
  #122 Fixed encrypt type7

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-netutils?expand=0&rev=8
2023-12-20 21:46:30 +00:00
55badb53f5 Accepting request 1085826 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1085826
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-netutils?expand=0&rev=3
2023-05-10 14:18:47 +00:00
7230ebb336 Accepting request 1085788 from home:bnavigator:branches:devel:languages:python
- Update to 1.4.1
  ## Changed
  * #171 Allow protocol mapper to be auto-generated.
  * #197 Prepend OUI Flatbot step to delete existing branch.
  * #200 Allow bandwith to be represented without "ps" in
    bandwidth.
  ## Fixed
  * #206 Fix Passwords docs that show ASN details.
  * #209 Fixed interface_range_expansion with trailing constant.
  * #210 Install black into flat environment, change flat action
    name.
- Release 1.4.0
  ## Added
  * #163 Added IP is_classfull utility function.
  * #172 Added Aruba AOS-CX Parser.
  * #177 Added IOS-XR Parser.
  * #182 Added Mrv Optiswitch Parser.
  * #182 Added Extreme Netiron Parser.
  ## Changed
  * #178 Update OUI flatbot CI process.
  ## Fixed
  * #173 Fixes classfull address naming.
  * #183 Updates parser folder info, fix aruba tests.
  * #181 Fixes incorrect behavior when calling tcp_ping with
    timeout >= 3.
  ## Removed
  * #184 Removed redundant __init__ methods on Parser classes.
- Release 1.3.0
  * Added IOS Config parsing for get_path and
    get_path_with_children methods.

OBS-URL: https://build.opensuse.org/request/show/1085788
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-netutils?expand=0&rev=6
2023-05-09 20:56:12 +00:00
4f71163a38 Accepting request 1007050 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1007050
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-netutils?expand=0&rev=2
2022-09-30 15:57:35 +00:00
15abbcff32 Accepting request 1007041 from home:yarunachalam:branches:devel:languages:python
- v1.2.0 - 2022-08
  Added
  #128 Documentation for Nokia SROS duplicate lines/duplicate line detection
  #138 Added nxos_ssh to Napalm mapper
  Changed
  #113 Updated lib mapping docs
  #115 Switched build backend to poetry-core
  #121 Update banner parsing for EOS
  #129 Add type hints to the whole project and mypy testing setup and CI
  #134 Updated CODEOWNERS
  Fixed
  #122 Fixed encrypt type7

OBS-URL: https://build.opensuse.org/request/show/1007041
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-netutils?expand=0&rev=4
2022-09-29 18:54:43 +00:00
385d386c38 Accepting request 990498 from devel:languages:python
dep of napalm

OBS-URL: https://build.opensuse.org/request/show/990498
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-netutils?expand=0&rev=1
2022-07-21 09:35:30 +00:00
09c8d591e6 - Tighten %%files.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-netutils?expand=0&rev=2
2022-07-21 07:31:26 +00:00
aad46dabe1 Accepting request 990489 from home:mcalabkova:branches:devel:languages:python
dep of napalm

OBS-URL: https://build.opensuse.org/request/show/990489
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-netutils?expand=0&rev=1
2022-07-21 07:14:02 +00:00
6 changed files with 0 additions and 117 deletions

View File

@@ -1,11 +0,0 @@
diff -Nru netutils-1.12.0.orig/pyproject.toml netutils-1.12.0/pyproject.toml
--- netutils-1.12.0.orig/pyproject.toml 2025-01-08 23:21:29.000000000 +0100
+++ netutils-1.12.0/pyproject.toml 2025-01-14 11:39:00.467478137 +0100
@@ -1,6 +1,6 @@
[tool.poetry]
name = "netutils"
-version = "1.11.0"
+version = "1.12.0"
description = "Common helper functions useful in network automation."
authors = ["Network to Code, LLC <opensource@networktocode.com>"]
license = "Apache-2.0"

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,94 +0,0 @@
From 3517bfc545e529869d72e1ed0977674d42da7148 Mon Sep 17 00:00:00 2001
From: Steve Kowalik <steven@wedontsleep.org>
Date: Tue, 3 Dec 2024 14:42:06 +1100
Subject: [PATCH] Use legacycrypt where crypt isn't available
Since Python 3.13 has removed the crypt module, add legacycrypt to the
requirements if we're using that version of Python, importing it if the
crypt module isn't found.
Fixes #594
---
netutils/password.py | 6 ++++--
poetry.lock | 17 ++++++++++++++---
pyproject.toml | 1 +
3 files changed, 19 insertions(+), 5 deletions(-)
diff --git a/netutils/password.py b/netutils/password.py
index 5a9026a7..02062e8d 100644
--- a/netutils/password.py
+++ b/netutils/password.py
@@ -1,7 +1,9 @@
"""Functions for working with Passwords."""
-# TODO: Swap out crypt prior to py3.13
-import crypt # pylint: disable=deprecated-module
+try:
+ import crypt # pylint: disable=deprecated-module
+except ModuleNotFoundError:
+ import legacycrypt as crypt
import random
import secrets
import string
diff --git a/poetry.lock b/poetry.lock
index 15109fb5..b75099e6 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -1,4 +1,4 @@
-# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand.
+# This file is automatically @generated by Poetry 1.8.4 and should not be changed by hand.
[[package]]
name = "astroid"
@@ -774,6 +774,17 @@ six = "*"
transitions = "*"
yamlordereddictloader = "*"
+[[package]]
+name = "legacycrypt"
+version = "0.3"
+description = "Wrapper to the POSIX crypt library call and associated functionality."
+optional = false
+python-versions = ">=3.5"
+files = [
+ {file = "legacycrypt-0.3-py3-none-any.whl", hash = "sha256:b5e373506ccb442f8d715e29fa75f53a11bbec3ca0d7b63445f4dbb656555218"},
+ {file = "legacycrypt-0.3.tar.gz", hash = "sha256:e76e7fd25666a451428b20d5afbbecf3654565b2e11511b53226be955c4d2292"},
+]
+
[[package]]
name = "lxml"
version = "5.2.1"
@@ -873,7 +884,6 @@ files = [
{file = "lxml-5.2.1-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:9e2addd2d1866fe112bc6f80117bcc6bc25191c5ed1bfbcf9f1386a884252ae8"},
{file = "lxml-5.2.1-cp37-cp37m-win32.whl", hash = "sha256:f51969bac61441fd31f028d7b3b45962f3ecebf691a510495e5d2cd8c8092dbd"},
{file = "lxml-5.2.1-cp37-cp37m-win_amd64.whl", hash = "sha256:b0b58fbfa1bf7367dde8a557994e3b1637294be6cf2169810375caf8571a085c"},
- {file = "lxml-5.2.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:3e183c6e3298a2ed5af9d7a356ea823bccaab4ec2349dc9ed83999fd289d14d5"},
{file = "lxml-5.2.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:804f74efe22b6a227306dd890eecc4f8c59ff25ca35f1f14e7482bbce96ef10b"},
{file = "lxml-5.2.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:08802f0c56ed150cc6885ae0788a321b73505d2263ee56dad84d200cab11c07a"},
{file = "lxml-5.2.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0f8c09ed18ecb4ebf23e02b8e7a22a05d6411911e6fabef3a36e4f371f4f2585"},
@@ -1789,6 +1799,7 @@ files = [
{file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"},
{file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"},
{file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"},
+ {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a08c6f0fe150303c1c6b71ebcd7213c2858041a7e01975da3a99aed1e7a378ef"},
{file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"},
{file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"},
{file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"},
@@ -2428,4 +2439,4 @@ optionals = ["jsonschema", "napalm"]
[metadata]
lock-version = "2.0"
python-versions = "^3.8"
-content-hash = "450d6722c6146d1680a5c710f1085d19f064d7392dc7a10f0b77fbda0b1dacc1"
+content-hash = "e87422d1f609f9d4fb697c6d5165c33269071e89d3780c003ee98689405871a2"
diff --git a/pyproject.toml b/pyproject.toml
index be2b2746..8daea416 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -29,6 +29,7 @@ include = [
python = "^3.8"
napalm = {version = "^4.0.0", optional = true}
jsonschema = {version = "^4.17.3", optional = true}
+legacycrypt = {markers = "python_version >= \"3.13\"", version = "^0.3"}
[tool.poetry.extras]
optionals = ["jsonschema", "napalm"]