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 <noreply@anthropic.com>
This commit is contained in:
@@ -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:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user