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 FortiOS driver from napalm.base.NetworkDriver onto the napalm-device-types role bases so netOrk can manage FortiGate firewalls.

Scope

  • Inherit from FirewallDriver (NAT/VPN, firewall rules, DHCP server, health metrics).
  • Keep the existing getters and their 13 mocked test cases green.
  • Upstream was last touched in 2022-04. Review the transport against current FortiOS 7.x (REST API with API token vs. SSH) before porting; expect a partial rewrite.
  • Modernise packaging to pyproject.toml with a napalm.drivers entry point (fortios).

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 FortiOS driver from `napalm.base.NetworkDriver` onto the `napalm-device-types` role bases so netOrk can manage FortiGate firewalls. ## Scope - Inherit from `FirewallDriver` (NAT/VPN, firewall rules, DHCP server, health metrics). - Keep the existing getters and their 13 mocked test cases green. - Upstream was last touched in 2022-04. Review the transport against current FortiOS 7.x (REST API with API token vs. SSH) before porting; expect a partial rewrite. - Modernise packaging to `pyproject.toml` with a `napalm.drivers` entry point (`fortios`). ## 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-fortios#1