Module netmiko.no_enable
Expand source code
from typing import Optional
import re
class NoEnable:
"""
Class for platforms that have no enable mode.
Netmiko translates the meaning of "enable" mode to be a proxy for "can
go into config mode". In other words, that you ultimately have privileges
to execute configuration changes.
The expectation on platforms that have no method for elevating privileges
is that the standard default privileges allow configuration changes.
Consequently check_enable_mode returns True by default for platforms that
don't explicitly support enable mode.
"""
def check_enable_mode(self, check_string: str = "") -> bool:
return True
def enable(
self,
cmd: str = "",
pattern: str = "",
enable_pattern: Optional[str] = None,
check_state: bool = True,
re_flags: int = re.IGNORECASE,
) -> str:
return ""
def exit_enable_mode(self, exit_command: str = "") -> str:
return ""
Classes
class NoEnable
-
Class for platforms that have no enable mode.
Netmiko translates the meaning of "enable" mode to be a proxy for "can go into config mode". In other words, that you ultimately have privileges to execute configuration changes.
The expectation on platforms that have no method for elevating privileges is that the standard default privileges allow configuration changes.
Consequently check_enable_mode returns True by default for platforms that don't explicitly support enable mode.
Expand source code
class NoEnable: """ Class for platforms that have no enable mode. Netmiko translates the meaning of "enable" mode to be a proxy for "can go into config mode". In other words, that you ultimately have privileges to execute configuration changes. The expectation on platforms that have no method for elevating privileges is that the standard default privileges allow configuration changes. Consequently check_enable_mode returns True by default for platforms that don't explicitly support enable mode. """ def check_enable_mode(self, check_string: str = "") -> bool: return True def enable( self, cmd: str = "", pattern: str = "", enable_pattern: Optional[str] = None, check_state: bool = True, re_flags: int = re.IGNORECASE, ) -> str: return "" def exit_enable_mode(self, exit_command: str = "") -> str: return ""
Subclasses
- AccedianSSH
- AdvaAosFsp150F2SSH
- AdvaAosFsp150F3SSH
- AlcatelAosSSH
- AudiocodeShellBase
- BrocadeFOSSSH
- CasaCMTSBase
- CdotCrosSSH
- CienaSaosBase
- CiscoFtdSSH
- CoriantSSH
- DellSonicSSH
- DigiTransportBase
- DlinkDSBase
- EricssonMinilinkBase
- ExtremeNosSSH
- ExtremeSlxSSH
- ExtremeTierraSSH
- FiberstoreFsosSSH
- FlexvnfSSH
- FortinetSSH
- HillstoneStoneosBase
- HuaweiBase
- JuniperBase
- JuniperScreenOsSSH
- KeymileSSH
- MikrotikBase
- NetAppcDotSSH
- NokiaSrlSSH
- PaloAltoPanosBase
- RadETXBase
- SixwindOSBase
- SophosSfosSSH
- SmciSwitchSmisBase
- TeldatCITBase
- VyOSSSH
- ZyxelSSH
Methods
def check_enable_mode(self, check_string: str = '') ‑> bool
-
Expand source code
def check_enable_mode(self, check_string: str = "") -> bool: return True
def enable(self, cmd: str = '', pattern: str = '', enable_pattern: Optional[str] = None, check_state: bool = True, re_flags: int = re.IGNORECASE) ‑> str
-
Expand source code
def enable( self, cmd: str = "", pattern: str = "", enable_pattern: Optional[str] = None, check_state: bool = True, re_flags: int = re.IGNORECASE, ) -> str: return ""
def exit_enable_mode(self, exit_command: str = '') ‑> str
-
Expand source code
def exit_enable_mode(self, exit_command: str = "") -> str: return ""