netOrk MVP 5 measures "security updates applied within N days" and starts patch runs inside agreed windows. That needs three things every Linux driver reads the same way, so they live here once: - UpdateDict gains optional `origin` and `security` (None = unknown). - package_updates: APT_UPGRADABLE_COMMAND and parse_apt_upgradable(). apt's suites are the origin; a "-security" suite makes it a security update; several architectures of one package are one entry. The command runs through a pipe with its exit status printed inside the group: through a pseudo-terminal apt drew progress and keypad codes, one of which (ESC >) a screen-scraping read took for a prompt and stopped at. The parser raises ValueError when apt failed or its status never arrived. DNF_SECURITY_COMMAND / parse_dnf_security() / nevra_name() for dnf/yum. - host_status: HOST_STATUS_COMMAND, parse_host_status(), HostStatusMixin (template form, hook _run_host_status_command). reboot_required from /var/run/reboot-required, needs-restarting -r, or a newer kernel of the running flavour (a Raspberry Pi carries two flavours side by side); auto_updates from APT::Periodic::Unattended-Upgrade with its timer, or dnf-automatic. HostStatusDict in models.py. - terminal.strip_terminal_codes(): CSI, OSC and two-character escapes, now also used by the systemd parser. - UpdateMixin: contract refresh_available_updates(); get_available_updates' docstring now states the rule that a reader raises when it cannot read and never returns [] for "don't know". Fixtures are real output from Ubuntu 24.04, Debian 13 / OMV, Raspberry Pi OS and Proxmox VE 9. Version 2.3.0.
66 lines
1.6 KiB
TOML
66 lines
1.6 KiB
TOML
[build-system]
|
|
requires = ["setuptools>=68", "wheel"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[project]
|
|
name = "napalm-device-types"
|
|
version = "2.3.0"
|
|
description = "Abstract device-type base classes for NAPALM drivers"
|
|
readme = "README.md"
|
|
requires-python = ">=3.10"
|
|
license = { text = "Apache-2.0" }
|
|
authors = [
|
|
{ name = "Christian Manivong", email = "christian@manivong.de" },
|
|
]
|
|
keywords = [
|
|
"napalm",
|
|
"network",
|
|
"automation",
|
|
"driver",
|
|
"access-point",
|
|
"switch",
|
|
"firewall",
|
|
"hypervisor",
|
|
"storage",
|
|
"nas",
|
|
]
|
|
classifiers = [
|
|
"Development Status :: 3 - Alpha",
|
|
"Intended Audience :: Developers",
|
|
"Intended Audience :: System Administrators",
|
|
"License :: OSI Approved :: Apache Software License",
|
|
"Operating System :: OS Independent",
|
|
"Programming Language :: Python :: 3",
|
|
"Programming Language :: Python :: 3.10",
|
|
"Programming Language :: Python :: 3.11",
|
|
"Programming Language :: Python :: 3.12",
|
|
"Topic :: System :: Networking",
|
|
"Topic :: System :: Systems Administration",
|
|
"Typing :: Typed",
|
|
]
|
|
dependencies = [
|
|
"napalm>=4.0",
|
|
]
|
|
|
|
[project.urls]
|
|
Homepage = "https://github.com/chrismanivong/napalm-device-types"
|
|
Repository = "https://github.com/chrismanivong/napalm-device-types"
|
|
Issues = "https://github.com/chrismanivong/napalm-device-types/issues"
|
|
|
|
[project.optional-dependencies]
|
|
dev = [
|
|
"pytest",
|
|
"mypy",
|
|
"build",
|
|
"twine",
|
|
]
|
|
|
|
[tool.setuptools.packages.find]
|
|
where = ["."]
|
|
include = ["napalm_device_types*"]
|
|
|
|
[tool.mypy]
|
|
python_version = "3.10"
|
|
strict = true
|
|
ignore_missing_imports = true
|