diff --git a/napalm_device_types/fixes.py b/napalm_device_types/fixes.py index 9aa3a2b..33c2ea0 100644 --- a/napalm_device_types/fixes.py +++ b/napalm_device_types/fixes.py @@ -22,7 +22,7 @@ They replace ``run_device_action`` (docs/STRUCTURE.md): from __future__ import annotations -from typing import Any, Callable, List, Sequence, Tuple, TYPE_CHECKING +from typing import Any, Callable, List, Optional, Sequence, Tuple, TYPE_CHECKING from napalm_device_types.models import ( FixResultDict, @@ -77,7 +77,16 @@ class SnmpAgentMixin: ] ) - if TYPE_CHECKING: # pragma: no cover - the steps a driver implements + if TYPE_CHECKING: # pragma: no cover - declared for type checkers only + + def get_management_peer(self) -> Optional[str]: + """The address the device sees this management connection come from + (for SSH, the client side of ``SSH_CONNECTION``), or None when it cannot + tell. A fact for the caller choosing ``allowed_sources``; optional -- + a driver that cannot tell does not implement it.""" + ... + + # The steps a driver implements: def _install_snmp_agent(self) -> FixStepOutcomeDict: ...