From f51b1a4b6e6352e52b8839244c11146543c9c7fd Mon Sep 17 00:00:00 2001 From: Christian Manivong Date: Thu, 25 Jun 2026 14:09:31 +0200 Subject: [PATCH] docs: update AccessPointDriver MRO placement comment The comment said AccessPointDriver sits BEFORE mixins, which was wrong after the mixin refactor. NetworkDriver (parent) raises NotImplementedError for standard NAPALM methods, so AccessPointDriver must come LAST in the MRO to avoid shadowing mixin implementations. Co-Authored-By: Claude Sonnet 4.6 --- napalm_device_types/access_point.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/napalm_device_types/access_point.py b/napalm_device_types/access_point.py index 5dab406..1c6c066 100644 --- a/napalm_device_types/access_point.py +++ b/napalm_device_types/access_point.py @@ -69,12 +69,13 @@ class AccessPointDriver(DeviceTypeDriver): and not name.startswith(self._EXCLUDED_INTERFACE_PREFIXES) } - # get_wireless_clients, get_ssids, get_radio_status are intentionally NOT - # defined here. AccessPointDriver sits before mixin classes in the MRO of - # concrete drivers (e.g. OpenWrtDriver(AccessPointDriver, ..., WirelessMixin)). - # Any definition in AccessPointDriver — even `raise NotImplementedError` — - # would shadow the concrete mixin implementation. Leaving them absent forces - # Python to continue the MRO search and find the mixin version. + # AP-specific methods (get_wireless_clients, get_ssids, get_radio_status, + # get_interfaces, get_vlans, …) are intentionally NOT defined here. + # AccessPointDriver sits AFTER the mixin classes in the MRO of concrete + # drivers (e.g. OpenWrtDriver(InterfaceMixin, VlanMixin, …, AccessPointDriver)). + # NetworkDriver (a parent of AccessPointDriver) raises NotImplementedError for + # all standard NAPALM methods, so AccessPointDriver must come LAST to avoid + # shadowing the mixin implementations. def get_wireless_config(self) -> WirelessConfigDict: """