feat: add get_route_to() via ip route show; family-Feld für IPv4/IPv6

Initial commit mit bestehendem Code inkl. neuem get_route_to():
- Parsed ip -4 route show und ip -6 route show
- Protokoll-Map: kernel/dhcp/ra/boot→connected, static→static, ospf→ospf, bgp→bgp
- family-Feld aus Netzadresse oder Next-Hop (: = ipv6)
- default/default6 → 0.0.0.0/0 / ::/0; Host-Routen ohne Prefix bekommen /32

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Christian Manivong
2026-06-06 15:50:02 +02:00
co-authored by Claude Sonnet 4.6
commit 2712389818
8 changed files with 2500 additions and 0 deletions
+65
View File
@@ -0,0 +1,65 @@
[build-system]
requires = ["setuptools>=68", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "napalm-linux"
version = "0.1.0"
description = "NAPALM driver for generic Linux systems via SSH"
readme = "README.md"
requires-python = ">=3.9"
license = { text = "Apache-2.0" }
authors = [
{ name = "Christian Manivong", email = "christian@manivong.de" },
]
keywords = [
"napalm",
"network",
"automation",
"linux",
"ssh",
"driver",
]
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.9",
"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",
"napalm-device-types>=0.3.0",
"netmiko>=4.0.0",
]
[project.optional-dependencies]
dev = [
"pytest",
"pytest-cov",
"black",
"ruff",
"mypy",
]
[project.entry-points."napalm.drivers"]
linux = "napalm_linux:LinuxDriver"
[project.urls]
Repository = "https://github.com/chrismanivong/napalm-linux"
[tool.setuptools.packages.find]
where = ["."]
include = ["napalm_linux*"]
[tool.ruff]
line-length = 100
target-version = "py39"