docs(firewall): document the identifier convention Wake-on-LAN depends on

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.
This commit is contained in:
2026-08-20 11:10:17 +07:00
parent b53cf4d1f4
commit ec0612b300
+11
View File
@@ -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