From ec0612b300a43c107d67ee80a44f34542801e164 Mon Sep 17 00:00:00 2001 From: Christian Manivong Date: Thu, 20 Aug 2026 11:10:17 +0700 Subject: [PATCH] docs(firewall): document the identifier convention Wake-on-LAN depends on MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A driver whose send_wake_on_lan() interface is not the name get_interfaces() is keyed by leaves callers with no way to offer a valid choice. OPNsense keys by the physical device ("em0") but wakes by the assigned name ("lan"), and rejects the former — so the assigned name has to travel with the interface data as an "identifier" key. --- napalm_device_types/firewall.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/napalm_device_types/firewall.py b/napalm_device_types/firewall.py index 1627de1..a5bc34b 100644 --- a/napalm_device_types/firewall.py +++ b/napalm_device_types/firewall.py @@ -202,6 +202,17 @@ class FirewallDriver(DhcpServerMixin, DeviceTypeDriver): driver.send_wake_on_lan("AA:BB:CC:DD:EE:FF", interface="lan") # → {"success": True, "output": "Magic packet sent to AA:BB:CC:DD:EE:FF via lan"} + + .. note:: + + A driver whose ``interface`` is *not* the name :meth:`get_interfaces` + is keyed by must expose the name it does expect as an ``identifier`` + key on each ``get_interfaces()`` entry. Without it a caller has no + way to offer a valid choice: OPNsense, for instance, keys interfaces + by the physical device ("em0") but wakes by the assigned name + ("lan"), and rejects the former. ``identifier`` is a non-standard + NAPALM key, so it reaches consumers through the usual passthrough + for extra interface data. """ raise NotImplementedError