Compare commits

...
14 Commits
Author SHA1 Message Date
christianmanivong e8c8515984 Merge pull request 'ci: install napalm-device-types from git, so the tests run at all' (#1) from fix/ci-device-types-from-git into main
Tests / Test (Python 3.10) (push) Successful in 1m13s
Tests / Test (Python 3.11) (push) Successful in 17s
Tests / Test (Python 3.12) (push) Successful in 22s
2026-10-03 23:23:38 +00:00
Christian Manivong 786f05faac ci: install napalm-device-types from git, so the tests run at all
Tests / Test (Python 3.10) (pull_request) Successful in 17s
Tests / Test (Python 3.11) (pull_request) Successful in 16s
Tests / Test (Python 3.12) (pull_request) Successful in 21s
Every CI run died at "pip install -e .[dev]": pyproject.toml asks for
napalm_device_types, which lives in git.netork.io/NAPALM rather than on PyPI,
and pip found only an unrelated 0.1.0 there. Not one test had run in CI.

The workflow now installs napalm-device-types from git first. The matrix
drops 3.8/3.9 and requires-python says >=3.10, because napalm-device-types
itself needs 3.10 -- the package never installed on anything older.

Replayed in a fresh venv: napalm-device-types 2.0.0 from git, then the
package with its dev extras, tests green.
2026-10-04 00:43:46 +02:00
Christian Manivong a772b0f967 fix(deps): pin paramiko>=5.0.0 (CVE-2026-44405)
Tests / Test (Python 3.10) (push) Failing after 5s
Tests / Test (Python 3.11) (push) Failing after 6s
Tests / Test (Python 3.12) (push) Failing after 6s
Tests / Test (Python 3.8) (push) Failing after 5s
Tests / Test (Python 3.9) (push) Failing after 6s
2026-07-02 12:22:55 +02:00
Christian Manivong 33ef6f86fa fix(get_config): strip timestamped event-log lines from running-config
Tests / Test (Python 3.10) (push) Failing after 6s
Tests / Test (Python 3.11) (push) Failing after 6s
Tests / Test (Python 3.12) (push) Failing after 5s
Tests / Test (Python 3.8) (push) Failing after 6s
Tests / Test (Python 3.9) (push) Failing after 5s
TP-Link embeds system event log entries (link up/down, etc.) in
show running-config output. These change every event and cause false-
positive config-change detections. Strip lines matching #YYYY-MM-DD.
2026-06-30 01:29:56 +02:00
Christian Manivong dccd18da65 fix: falsche OUI-Prefixes entfernen (gegen IEEE verifiziert)
Tests / Test (Python 3.10) (push) Failing after 5s
Tests / Test (Python 3.11) (push) Failing after 5s
Tests / Test (Python 3.12) (push) Failing after 6s
Tests / Test (Python 3.8) (push) Failing after 12s
Tests / Test (Python 3.9) (push) Failing after 6s
2026-06-24 17:06:45 +02:00
Christian ManivongandClaude Sonnet 4.6 3718658294 feat: OUI_PREFIXES für MAC/ARP-Fingerprinting
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 15:41:45 +02:00
Christian ManivongandClaude Sonnet 4.6 b03f3073d5 feat: Fingerprint-Attribute für Discovery-Scoring
Ergänzt DRIVER_NAME, HTTP_FINGERPRINT, SNMP_FINGERPRINT, SSH_FINGERPRINT,
PORT_SPECS und SNMP_OBJECT_ID_PREFIX gemäß docs/DISCOVERY_FINGERPRINTING.md.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 14:47:08 +02:00
Christian ManivongandClaude Sonnet 4.6 114aaa90f8 fix: set_interface access VLAN uses correct TP-Link CLI commands
- Replace 'switchport general pvid {vlan}' (invalid) with 'switchport pvid {vlan}'
- For access mode: read current untagged VLAN memberships before entering
  config mode, then issue 'no switchport general allowed vlan {old_vid}'
  for each to avoid leaving the port with two untagged VLANs
- Add native_vlan support for trunk mode via 'switchport pvid {native_vlan}'
- Remove invalid 'switchport mode access/general' commands (not supported
  on this switch family)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-23 21:31:16 +02:00
Christian ManivongandClaude Sonnet 4.6 85215ce150 feat: add PoE config and LAG/trunk membership support
get_poe_status()/set_poe() implement PoE port config via the JetStream
CLI's 'power inline' interface sub-commands. get_interfaces() now enriches
LagN entries and their member ports with trunk_group/lag_members/lag_mode
by parsing 'show link-aggregation summary'. New set_lag_members() adds/
removes members via channel-group/no channel-group.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 14:48:29 +02:00
Christian Manivong c53b21ad65 feat: interface enable/description config + fix SNMP auto-fix and detection
- set_interface(): support enabled (shutdown/no shutdown) and description
- get_snmp_config(): detect "no community entry exists" as not-configured
  instead of reporting running=True with no community
- _action_fix_snmp(): use config-mode prompt for in-config commands
  (previously timed out waiting for the exec prompt) and return its result
2026-06-10 02:06:43 +02:00
Christian ManivongandClaude Sonnet 4.6 2a9ddac02d feat: add get_health_metrics() via TP-Link proprietary OIDs
SNMP health metrics using TP-Link enterprise MIB (OID 11863) for
uptime, per-unit CPU utilization, and per-unit memory utilization.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-07 00:43:38 +02:00
Christian ManivongandClaude Sonnet 4.6 cbe73cab64 feat: SNMP support — get_snmp_config(), fix_snmp action, get_device_warnings()
get_snmp_config() reads 'show snmp community', fix_snmp detects management VLAN
from 'show ip interface' and configures source-interface + community with correct
JetStream CLI syntax. get_device_warnings() added (was missing, caused AttributeError).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-01 13:09:45 +02:00
Christian Manivong 1874622543 feat: add VLAN/interface write methods and SG3210 support (v0.1.2)
- Implement `delete_vlan()`: removes VLAN from switch, automatically
  moves untagged (PVID) ports to VLAN 1 before deletion to satisfy
  TP-Link's constraint
- Implement `set_vlan()`: creates or updates a VLAN with optional name
- Implement `set_interface()`: configures trunk/access mode and VLAN
  membership on a switch interface
- Add `_to_cli_interface()` helper to expand abbreviated port names
  (e.g. Gi1/0/1 → gigabitEthernet 1/0/1)
- Import `InterfaceConfigDict` and `VlanConfigDict` from
  `napalm_device_types.models`
- Bump `napalm_device_types` dependency to >=0.2.0
- Add TL-SG3210 to tested-device table in README
- Bump version to 0.1.2
2026-05-29 08:53:13 +02:00
Christian Manivong ec70aad7ca Bump version to 0.1.1 2026-05-12 23:09:16 +02:00
4 changed files with 620 additions and 177 deletions
+4 -1
View File
@@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
@@ -25,6 +25,9 @@ jobs:
- name: Install dependencies
run: |
# napalm-device-types lives in git.netork.io/NAPALM, not on PyPI: without this
# pip looks there, finds an unrelated 0.1.0 and the job dies before any test.
pip install "napalm-device-types @ git+https://git.netork.io/NAPALM/napalm-device-types.git"
pip install -e ".[dev]"
- name: Run tests
+1
View File
@@ -7,6 +7,7 @@ NAPALM community driver for **TP-Link Jetstream** managed switches (T1500G, T160
| Model | Series | Tested |
|---|---|---|
| TL-SG2210P | Jetstream Smart | ✅ |
| TL-SG3210 | Jetstream Smart | ✅ |
> More devices from the T1500G, T1600G, T2600G and T3700G series should work as well — contributions welcome.
File diff suppressed because it is too large Load Diff
+5 -6
View File
@@ -4,11 +4,11 @@ build-backend = "setuptools.build_meta"
[project]
name = "napalm-tplink-jetstream"
version = "0.1.0"
version = "0.1.2"
description = "NAPALM driver for TP-Link Jetstream managed switches"
readme = "README.md"
license = { text = "Apache-2.0" }
requires-python = ">=3.8"
requires-python = ">=3.10"
authors = [
{ name = "Christian Manivong" },
]
@@ -16,8 +16,6 @@ classifiers = [
"Topic :: Utilities",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
@@ -26,8 +24,9 @@ classifiers = [
]
dependencies = [
"napalm>=4.0.0",
"napalm_device_types>=0.1.0",
"napalm_device_types>=0.2.0",
"netmiko>=4.0.0",
"paramiko>=5.0.0", # CVE-2026-44405
"netaddr",
]
@@ -43,7 +42,7 @@ dev = [
tplink_jetstream = "napalm_tplink_jetstream:TPLinkJetstreamDriver"
[project.urls]
Repository = "https://github.com/napalm-automation-community/napalm-tplink-jetstream"
Repository = "https://github.com/chrismanivong/napalm-tplink-jetstream"
[tool.setuptools.packages.find]
where = ["."]