feat: ChannelScanEntryDict + get_channel_scan / push_radio_channel interface

Adds ChannelScanEntryDict TypedDict for iw-scan results (bssid, ssid,
frequency, channel, signal_dbm, channel_width, band).

AccessPointDriver gains two new interface methods:
- get_channel_scan(mode) → dict[iface, list[ChannelScanEntryDict]]
  Default returns {} so non-implementing drivers degrade gracefully.
- push_radio_channel(radio, channel) — abstract (raises NotImplementedError).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-24 23:25:49 +02:00
co-authored by Claude Sonnet 4.6
parent 51e677492a
commit 9e5e6a5d95
2 changed files with 13 additions and 0 deletions
+1
View File
@@ -14,6 +14,7 @@ from typing import Any, Dict, List
from napalm_device_types.base import DeviceTypeDriver
from napalm_device_types._ucd_metrics import IF_SKIP_DEFAULT, collect_ucd_metrics
from napalm_device_types.models import (
ChannelScanEntryDict,
Dot1XConfigDict,
FastTransitionConfigDict,
HealthMetricsDict,
+12
View File
@@ -105,6 +105,18 @@ class RadioStatusDict(TypedDict):
frequency: float
class ChannelScanEntryDict(TypedDict):
"""One neighboring AP entry as returned by get_channel_scan()."""
bssid: str
ssid: str
frequency: int # centre frequency in MHz, e.g. 2437
channel: int # channel number, e.g. 6
signal_dbm: int # RSSI in dBm, e.g. -72
channel_width: int # MHz: 20 / 40 / 80 / 160; 0 if unknown
band: str # "2.4GHz" | "5GHz" | "6GHz"
class WirelessConfigDict(TypedDict):
country_code: str
regulatory_domain: str