Port onto napalm-device-types role bases #1

Open
opened 2026-10-12 21:46:42 +00:00 by christianmanivong · 0 comments
Owner

Goal

Move the Cisco SMB switch driver (SF/SG 3xx/5xx) from napalm.base.NetworkDriver onto the napalm-device-types role bases.

Scope

  • Inherit from SwitchDriver (MAC ACLs plus the common device-type layer).
  • Keep all existing getters and their 29 mocked test cases green.
  • Check whether the current CBS250/CBS350 and Catalyst 1200/1300 lines are covered by the same CLI parsing, and document which models are.
  • Modernise packaging to pyproject.toml with a napalm.drivers entry point (s350).

Integration into netOrk (separate change in NetOrk/netork)

  • Pin the repo in vendor-drivers.txt with its # provides: entry point(s).
  • Extend tests/test_vendor_drivers.py / discovery classification as needed.
  • Add the device type to ui/src/lib/deviceTypes.ts only if the role is new.

Notes

  • Hard fork: upstream will not take a dependency on napalm-device-types (not on PyPI), so this repo is maintained here from now on. Upstream history is kept.
  • License: Apache-2.0. Keep LICENSE, add a NOTICE and mark modified files as required.
  • napalm-device-types is not on PyPI: install it from git+https://git.netork.io/NAPALM/napalm-device-types.git before this package.
  • Generic logic goes into napalm-device-types, vendor mechanics stay here. If a role method needs a new contract or mixin, that is a separate change in napalm-device-types first.
  • Gitea Actions are disabled on this repo until a .gitea/workflows CI replaces the upstream GitHub workflows.
  • Mocked test data only covers the classic NAPALM getters. New role methods need real device output as fixtures, and the driver needs one run against a real device before it is pinned in netOrk.

Priority: P3 (important, not urgent). Target: before 2026-11-05.

## Goal Move the Cisco SMB switch driver (SF/SG 3xx/5xx) from `napalm.base.NetworkDriver` onto the `napalm-device-types` role bases. ## Scope - Inherit from `SwitchDriver` (MAC ACLs plus the common device-type layer). - Keep all existing getters and their 29 mocked test cases green. - Check whether the current CBS250/CBS350 and Catalyst 1200/1300 lines are covered by the same CLI parsing, and document which models are. - Modernise packaging to `pyproject.toml` with a `napalm.drivers` entry point (`s350`). ## Integration into netOrk (separate change in NetOrk/netork) - Pin the repo in `vendor-drivers.txt` with its `# provides:` entry point(s). - Extend `tests/test_vendor_drivers.py` / discovery classification as needed. - Add the device type to `ui/src/lib/deviceTypes.ts` only if the role is new. ## Notes - Hard fork: upstream will not take a dependency on `napalm-device-types` (not on PyPI), so this repo is maintained here from now on. Upstream history is kept. - License: Apache-2.0. Keep `LICENSE`, add a `NOTICE` and mark modified files as required. - `napalm-device-types` is not on PyPI: install it from `git+https://git.netork.io/NAPALM/napalm-device-types.git` before this package. - Generic logic goes into `napalm-device-types`, vendor mechanics stay here. If a role method needs a new contract or mixin, that is a separate change in `napalm-device-types` first. - Gitea Actions are disabled on this repo until a `.gitea/workflows` CI replaces the upstream GitHub workflows. - Mocked test data only covers the classic NAPALM getters. New role methods need real device output as fixtures, and the driver needs one run against a real device before it is pinned in netOrk. Priority: P3 (important, not urgent). Target: before 2026-11-05.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: NAPALM/napalm-s350#1