Module netmiko.asterfusion
Sub-modules
netmiko.asterfusion.asterfusion
-
AsterNOS platforms running Enterprise SONiC Distribution by AsterFusion Co.
Classes
class AsterfusionAsterNOSSSH (**kwargs: Any)
-
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 AsterfusionAsterNOSSSH(NoEnable, CiscoSSHConnection): prompt_pattern = r"[>$#]" def __init__(self, _cli_mode: str = "klish", **kwargs: Any) -> None: super().__init__(**kwargs) self._cli_mode = _cli_mode def session_preparation(self) -> None: self._test_channel_read(pattern=self.prompt_pattern) self.set_base_prompt(alt_prompt_terminator="$") if self._cli_mode == "klish": self._enter_shell() self.disable_paging() elif self._cli_mode == "bash": self._enter_bash_cli() def config_mode( self, config_command: str = "configure terminal", pattern: str = r"\#", re_flags: int = 0, ) -> str: return super().config_mode( config_command=config_command, pattern=pattern, re_flags=re_flags ) def _enter_shell(self) -> str: return self._send_command_str("sonic-cli", expect_string=r"\#") def _enter_bash_cli(self) -> str: return self._send_command_str("system bash", expect_string=r"\$") def _enter_vtysh(self) -> str: return self._send_command_str("vtysh", expect_string=r"\#") def disable_paging( self, command: str = "terminal raw-output", delay_factor: Optional[float] = None, cmd_verify: bool = True, pattern: Optional[str] = None, ) -> str: return super().disable_paging( command=command, delay_factor=delay_factor, cmd_verify=cmd_verify, pattern=pattern, ) def save_config( self, cmd: str = "write", confirm: bool = True, confirm_response: str = "y", ) -> str: return super().save_config( cmd=cmd, confirm=confirm, confirm_response=confirm_response )
Ancestors
Class variables
var prompt_pattern
Inherited members
CiscoSSHConnection
:check_config_mode
check_enable_mode
cleanup
clear_buffer
commit
config_mode
disable_paging
disconnect
enable
establish_connection
exit_config_mode
exit_enable_mode
find_prompt
is_alive
normalize_cmd
normalize_linefeeds
paramiko_cleanup
read_channel
read_channel_timing
read_until_pattern
read_until_prompt
read_until_prompt_or_pattern
run_ttp
save_config
select_delay_factor
send_command
send_command_expect
send_command_timing
send_config_from_file
send_config_set
send_multiline
session_preparation
set_base_prompt
set_terminal_width
special_login_handler
strip_ansi_escape_codes
strip_backspaces
strip_command
strip_prompt
telnet_login
write_channel