:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -117,7 +120,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -125,6 +128,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -136,7 +143,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -168,6 +177,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -104,7 +107,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -112,6 +115,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -123,7 +130,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -155,6 +164,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -133,7 +136,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -141,6 +144,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -152,7 +159,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -184,6 +193,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -111,7 +114,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -119,6 +122,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -130,7 +137,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -162,6 +171,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -169,7 +181,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -177,6 +189,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -188,7 +204,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -220,12 +238,17 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
Expand source code
class AdtranOSBase(CiscoBaseConnection):
+ prompt_pattern = r"[>#]"
+
def __init__(self, *args: Any, **kwargs: Any) -> None:
if kwargs.get("global_cmd_verify") is None:
kwargs["global_cmd_verify"] = False
@@ -234,9 +257,11 @@
Classes
def session_preparation(self) -> None:
"""Prepare the session after the connection has been established."""
self.ansi_escape_codes = True
- self._test_channel_read()
+ self._test_channel_read(pattern=self.prompt_pattern)
self.set_base_prompt()
self.disable_paging(command="terminal length 0")
+ cmd = "terminal width 132"
+ self.set_terminal_width(command=cmd, pattern=cmd)
def check_enable_mode(self, check_string: str = "#") -> bool:
return super().check_enable_mode(check_string=check_string)
@@ -246,10 +271,15 @@
def session_preparation(self) -> None:
"""Prepare the session after the connection has been established."""
self.ansi_escape_codes = True
- self._test_channel_read()
+ self._test_channel_read(pattern=self.prompt_pattern)
self.set_base_prompt()
- self.disable_paging(command="terminal length 0")
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -437,7 +479,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -445,6 +487,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -456,7 +502,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -488,6 +536,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -594,6 +645,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -608,7 +662,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -616,6 +670,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -627,7 +685,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -659,6 +719,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -104,7 +107,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -112,6 +115,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -123,7 +130,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -155,6 +164,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -261,6 +273,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -275,7 +290,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -283,6 +298,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -294,7 +313,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -326,6 +347,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
"""Adva support."""
+import re
+from typing import Any, Optional
+from netmiko.no_enable import NoEnable
+from netmiko.no_config import NoConfig
+from netmiko.cisco_base_connection import CiscoSSHConnection
+
+
+class AdvaAosFsp150F2SSH(NoEnable, NoConfig, CiscoSSHConnection):
+ """
+ Adva AOS FSP 15P F2 SSH Base Class
+
+ F2 AOS applies for the following FSP150 device types: FSP150CC-825
+
+ These devices don't have an Enable Mode or a Config Mode.
+
+ Configuration Should be applied via the configuration context:
+
+ home
+ configure snmp
+ add v3user guytest noauth-nopriv
+ home
+
+ configure system
+ home
+
+ Use of home to return to CLI root context, home cannot be used from root
+ LAB-R2-825-1:--> home
+ Unrecognized command
+ """
+
+ def __init__(self, **kwargs: Any) -> None:
+ """
+ \n for default enter causes some issues with the Adva so setting to \r.
+ """
+ if kwargs.get("default_enter") is None:
+ kwargs["default_enter"] = "\r"
+ return super().__init__(**kwargs)
+
+ def session_preparation(self) -> None:
+ """
+ Prepare the session after the connection has been established.
+
+ Handles devices with security prompt enabled
+ """
+ data = self.read_until_pattern(
+ pattern=r"Do you wish to continue \[Y\|N\]-->|-->"
+ )
+ if "continue" in data:
+ self.write_channel(f"y{self.RETURN}")
+ else:
+ self.write_channel(f"help?{self.RETURN}")
+ data = self.read_until_pattern(pattern=r"-->")
+ self.set_base_prompt()
+
+ def set_base_prompt(
+ self,
+ pri_prompt_terminator: str = r"(^.+?)-->$",
+ alt_prompt_terminator: str = "",
+ delay_factor: float = 1.0,
+ pattern: Optional[str] = None,
+ ) -> str:
+
+ prompt = self.find_prompt()
+ match = re.search(pri_prompt_terminator, prompt)
+ if not match:
+ raise ValueError(f"Router prompt not found: {repr(prompt)}")
+ self.base_prompt = match[1]
+ return self.base_prompt
+
+
+
+
+
+
+
+
+
+
Classes
+
+
+class AdvaAosFsp150F2SSH
+(**kwargs: Any)
+
+
+
Adva AOS FSP 15P F2 SSH Base Class
+
F2 AOS applies for the following FSP150 device types: FSP150CC-825
+
These devices don't have an Enable Mode or a Config Mode.
+
Configuration Should be applied via the configuration context:
+
home
+configure snmp
+add v3user guytest noauth-nopriv
+home
+
configure system
+home
+
Use of home to return to CLI root context, home cannot be used from root
+LAB-R2-825-1:–> home
+Unrecognized command
+
for default enter causes some issues with the Adva so setting to
+.
+
+
+Expand source code
+
+
class AdvaAosFsp150F2SSH(NoEnable, NoConfig, CiscoSSHConnection):
+ """
+ Adva AOS FSP 15P F2 SSH Base Class
+
+ F2 AOS applies for the following FSP150 device types: FSP150CC-825
+
+ These devices don't have an Enable Mode or a Config Mode.
+
+ Configuration Should be applied via the configuration context:
+
+ home
+ configure snmp
+ add v3user guytest noauth-nopriv
+ home
+
+ configure system
+ home
+
+ Use of home to return to CLI root context, home cannot be used from root
+ LAB-R2-825-1:--> home
+ Unrecognized command
+ """
+
+ def __init__(self, **kwargs: Any) -> None:
+ """
+ \n for default enter causes some issues with the Adva so setting to \r.
+ """
+ if kwargs.get("default_enter") is None:
+ kwargs["default_enter"] = "\r"
+ return super().__init__(**kwargs)
+
+ def session_preparation(self) -> None:
+ """
+ Prepare the session after the connection has been established.
+
+ Handles devices with security prompt enabled
+ """
+ data = self.read_until_pattern(
+ pattern=r"Do you wish to continue \[Y\|N\]-->|-->"
+ )
+ if "continue" in data:
+ self.write_channel(f"y{self.RETURN}")
+ else:
+ self.write_channel(f"help?{self.RETURN}")
+ data = self.read_until_pattern(pattern=r"-->")
+ self.set_base_prompt()
+
+ def set_base_prompt(
+ self,
+ pri_prompt_terminator: str = r"(^.+?)-->$",
+ alt_prompt_terminator: str = "",
+ delay_factor: float = 1.0,
+ pattern: Optional[str] = None,
+ ) -> str:
+
+ prompt = self.find_prompt()
+ match = re.search(pri_prompt_terminator, prompt)
+ if not match:
+ raise ValueError(f"Router prompt not found: {repr(prompt)}")
+ self.base_prompt = match[1]
+ return self.base_prompt
Prepare the session after the connection has been established.
+
Handles devices with security prompt enabled
+
+
+Expand source code
+
+
def session_preparation(self) -> None:
+ """
+ Prepare the session after the connection has been established.
+
+ Handles devices with security prompt enabled
+ """
+ data = self.read_until_pattern(
+ pattern=r"Do you wish to continue \[Y\|N\]-->|-->"
+ )
+ if "continue" in data:
+ self.write_channel(f"y{self.RETURN}")
+ else:
+ self.write_channel(f"help?{self.RETURN}")
+ data = self.read_until_pattern(pattern=r"-->")
+ self.set_base_prompt()
Prepare the session after the connection has been established.
+Handles devices with security prompt enabled
+
+
+Expand source code
+
+
def session_preparation(self) -> None:
+ """
+ Prepare the session after the connection has been established.
+ Handles devices with security prompt enabled
+ """
+ data = self.read_until_pattern(
+ pattern=r"Do you wish to continue \[Y\|N\]-->|-->"
+ )
+
+ if "continue" in data:
+ self.write_channel(f"y{self.RETURN}")
+ else:
+ self.write_channel(f"home{self.RETURN}")
+
+ data = self.read_until_pattern(pattern=r"-->")
+ self.set_base_prompt()
+ self.disable_paging(cmd_verify=False)
F2 AOS applies for the following FSP150 device types: FSP150CC-825
+
These devices don't have an Enable Mode or a Config Mode.
+
Configuration Should be applied via the configuration context:
+
home
+configure snmp
+add v3user guytest noauth-nopriv
+home
+
configure system
+home
+
Use of home to return to CLI root context, home cannot be used from root
+LAB-R2-825-1:–> home
+Unrecognized command
+
for default enter causes some issues with the Adva so setting to
+.
+
+
+Expand source code
+
+
class AdvaAosFsp150F2SSH(NoEnable, NoConfig, CiscoSSHConnection):
+ """
+ Adva AOS FSP 15P F2 SSH Base Class
+
+ F2 AOS applies for the following FSP150 device types: FSP150CC-825
+
+ These devices don't have an Enable Mode or a Config Mode.
+
+ Configuration Should be applied via the configuration context:
+
+ home
+ configure snmp
+ add v3user guytest noauth-nopriv
+ home
+
+ configure system
+ home
+
+ Use of home to return to CLI root context, home cannot be used from root
+ LAB-R2-825-1:--> home
+ Unrecognized command
+ """
+
+ def __init__(self, **kwargs: Any) -> None:
+ """
+ \n for default enter causes some issues with the Adva so setting to \r.
+ """
+ if kwargs.get("default_enter") is None:
+ kwargs["default_enter"] = "\r"
+ return super().__init__(**kwargs)
+
+ def session_preparation(self) -> None:
+ """
+ Prepare the session after the connection has been established.
+
+ Handles devices with security prompt enabled
+ """
+ data = self.read_until_pattern(
+ pattern=r"Do you wish to continue \[Y\|N\]-->|-->"
+ )
+ if "continue" in data:
+ self.write_channel(f"y{self.RETURN}")
+ else:
+ self.write_channel(f"help?{self.RETURN}")
+ data = self.read_until_pattern(pattern=r"-->")
+ self.set_base_prompt()
+
+ def set_base_prompt(
+ self,
+ pri_prompt_terminator: str = r"(^.+?)-->$",
+ alt_prompt_terminator: str = "",
+ delay_factor: float = 1.0,
+ pattern: Optional[str] = None,
+ ) -> str:
+
+ prompt = self.find_prompt()
+ match = re.search(pri_prompt_terminator, prompt)
+ if not match:
+ raise ValueError(f"Router prompt not found: {repr(prompt)}")
+ self.base_prompt = match[1]
+ return self.base_prompt
Prepare the session after the connection has been established.
+
Handles devices with security prompt enabled
+
+
+Expand source code
+
+
def session_preparation(self) -> None:
+ """
+ Prepare the session after the connection has been established.
+
+ Handles devices with security prompt enabled
+ """
+ data = self.read_until_pattern(
+ pattern=r"Do you wish to continue \[Y\|N\]-->|-->"
+ )
+ if "continue" in data:
+ self.write_channel(f"y{self.RETURN}")
+ else:
+ self.write_channel(f"help?{self.RETURN}")
+ data = self.read_until_pattern(pattern=r"-->")
+ self.set_base_prompt()
Prepare the session after the connection has been established.
+Handles devices with security prompt enabled
+
+
+Expand source code
+
+
def session_preparation(self) -> None:
+ """
+ Prepare the session after the connection has been established.
+ Handles devices with security prompt enabled
+ """
+ data = self.read_until_pattern(
+ pattern=r"Do you wish to continue \[Y\|N\]-->|-->"
+ )
+
+ if "continue" in data:
+ self.write_channel(f"y{self.RETURN}")
+ else:
+ self.write_channel(f"home{self.RETURN}")
+
+ data = self.read_until_pattern(pattern=r"-->")
+ self.set_base_prompt()
+ self.disable_paging(cmd_verify=False)
Alcatel-Lucent Enterprise AOS support (AOS6 and AOS8).
@@ -105,6 +105,9 @@
Classes
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -119,7 +122,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -127,6 +130,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -138,7 +145,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -170,6 +179,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
Alcatel-Lucent Enterprise AOS support (AOS6 and AOS8).
@@ -90,6 +90,9 @@
Classes
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -104,7 +107,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -112,6 +115,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -123,7 +130,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -155,6 +164,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
Implement methods for interacting with Allied Telesis devices.
@@ -126,6 +126,9 @@
Classes
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -140,7 +143,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -148,6 +151,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -159,7 +166,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -191,6 +200,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
Implement methods for interacting with Allied Telesis devices.
@@ -387,6 +399,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -401,7 +416,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -409,6 +424,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -420,7 +439,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -452,6 +473,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
Implement methods for interacting with Allied Telesis devices.
@@ -90,6 +90,9 @@
Classes
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -104,7 +107,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -112,6 +115,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -123,7 +130,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -155,6 +164,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -138,7 +141,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -146,6 +149,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -157,7 +164,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -189,6 +198,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -359,7 +374,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -367,6 +382,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -378,7 +397,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -410,6 +431,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -517,6 +541,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -531,7 +558,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -539,6 +566,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -550,7 +581,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -582,6 +615,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -104,7 +107,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -112,6 +115,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -123,7 +130,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -155,6 +164,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -262,6 +274,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -276,7 +291,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -284,6 +299,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -295,7 +314,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -327,6 +348,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -240,7 +267,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -248,6 +275,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -259,7 +290,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -291,29 +324,56 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
Expand source code
class AristaBase(CiscoSSHConnection):
+ prompt_pattern = r"[$>#]"
+
def session_preparation(self) -> None:
"""Prepare the session after the connection has been established."""
+ self._test_channel_read(pattern=self.prompt_pattern)
cmd = "terminal width 511"
- # Arista will echo immediately and then when the device really responds (like NX-OS)
self.set_terminal_width(command=cmd, pattern=r"Width set to")
self.disable_paging(cmd_verify=False, pattern=r"Pagination disabled")
self.set_base_prompt()
+ def find_prompt(
+ self, delay_factor: float = 1.0, pattern: Optional[str] = None
+ ) -> str:
+ """
+ Arista's sometimes duplicate the command echo if they fall behind.
+
+ arista9-napalm#
+ show version | json
+ arista9-napalm#show version | json
+
+ Using the terminating pattern tries to ensure that it is less likely they
+ fall behind.
+ """
+ if not pattern:
+ pattern = self.prompt_pattern
+ return super().find_prompt(delay_factor=delay_factor, pattern=pattern)
+
def enable(
self,
cmd: str = "enable",
pattern: str = "ssword",
enable_pattern: Optional[str] = r"\#",
+ check_state: bool = True,
re_flags: int = re.IGNORECASE,
) -> str:
return super().enable(
- cmd=cmd, pattern=pattern, enable_pattern=enable_pattern, re_flags=re_flags
+ cmd=cmd,
+ pattern=pattern,
+ enable_pattern=enable_pattern,
+ check_state=check_state,
+ re_flags=re_flags,
)
def check_config_mode(
@@ -376,6 +436,13 @@
Arista's sometimes duplicate the command echo if they fall behind.
+
arista9-napalm#
+show version | json
+arista9-napalm#show version | json
+
Using the terminating pattern tries to ensure that it is less likely they
+fall behind.
+
+
+Expand source code
+
+
def find_prompt(
+ self, delay_factor: float = 1.0, pattern: Optional[str] = None
+) -> str:
+ """
+ Arista's sometimes duplicate the command echo if they fall behind.
+
+ arista9-napalm#
+ show version | json
+ arista9-napalm#show version | json
+
+ Using the terminating pattern tries to ensure that it is less likely they
+ fall behind.
+ """
+ if not pattern:
+ pattern = self.prompt_pattern
+ return super().find_prompt(delay_factor=delay_factor, pattern=pattern)
+
+
def session_preparation(self) ‑> None
@@ -451,8 +550,8 @@
Methods
def session_preparation(self) -> None:
"""Prepare the session after the connection has been established."""
+ self._test_channel_read(pattern=self.prompt_pattern)
cmd = "terminal width 511"
- # Arista will echo immediately and then when the device really responds (like NX-OS)
self.set_terminal_width(command=cmd, pattern=r"Width set to")
self.disable_paging(cmd_verify=False, pattern=r"Pagination disabled")
self.set_base_prompt()
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -658,7 +759,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -666,6 +767,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -677,7 +782,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -709,6 +816,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -830,7 +943,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -838,6 +951,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -849,7 +966,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -881,6 +1000,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -200,7 +203,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -208,6 +211,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -219,7 +226,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -251,6 +260,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -372,7 +387,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -380,6 +395,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -391,7 +410,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -423,6 +444,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
Implements methods for interacting with Arris CER platforms.
+
Initialize attributes for establishing connection to target device.
+
+ :param ip: IP address of target device. Not required if <code>host</code> is
+ provided.
+
+ :param host: Hostname of target device. Not required if <code>ip</code> is
+ provided.
+
+ :param username: Username to authenticate against target device if
+ required.
+
+ :param password: Password to authenticate against target device if
+ required.
+
+ :param secret: The enable password if target device requires one.
+
+ :param port: The destination port used to connect to the target
+ device.
+
+ :param device_type: Class selection based on device type.
+
+ :param verbose: Enable additional messages to standard output.
+
+ :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
+
+ :param use_keys: Connect to target device using SSH keys.
+
+ :param key_file: Filename path of the SSH key file to use.
+
+ :param pkey: SSH key object to use.
+
+ :param passphrase: Passphrase to use for encrypted key; password will be used for key
+ decryption if not specified.
+
+ :param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
+ documentation for a description of the expected format.
+
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
+ :param allow_agent: Enable use of SSH key-agent.
+
+ :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
+ means unknown SSH host keys will be accepted).
+
+ :param system_host_keys: Load host keys from the users known_hosts file.
+
+ :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in
+ alt_key_file.
+
+ :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
+
+ :param ssh_config_file: File name of OpenSSH configuration file.
+
+ :param conn_timeout: TCP connection timeout.
+
+ :param session_timeout: Set a timeout for parallel requests.
+
+ :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
+
+ :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
+ :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
+ Currently defaults to 0, for backwards compatibility (it will not attempt
+ to keep the connection alive).
+
+ :param default_enter: Character(s) to send to correspond to enter key (default:
+
+
).
+
:param response_return: Character(s) to use in normalized return data to represent
+ enter key (default:
+
+
)
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+ to select smallest of global and specific. Sets default global_delay_factor to .1
+ (default: True)
+
+ :param session_log: File path or BufferedIOBase subclass object to write the session log to.
+
+ :param session_log_record_writes: The session log generally only records channel reads due
+ to eliminate command duplication due to command echo. You can enable this if you
+ want to record both channel reads and channel writes in the log (default: False).
+
+ :param session_log_file_mode: "write" or "append" for session_log file mode
+ (default: "write")
+
+ :param allow_auto_change: Allow automatic configuration changes for terminal settings.
+ (default: False)
+
+ :param encoding: Encoding to be used when writing bytes to the output channel.
+ (default: ascii)
+
+ :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for
+ communication to the target host (default: None).
+
+ :param global_cmd_verify: Control whether command echo verification is enabled or disabled
+ (default: None). Global attribute takes precedence over function <code>cmd\_verify</code>
+ argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument.
+
+ :param auto_connect: Control whether Netmiko automatically establishes the connection as
+ part of the object creation (default: True).
+
+ :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
+ 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
+ eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
+
Initialize attributes for establishing connection to target device.
+
+ :param ip: IP address of target device. Not required if <code>host</code> is
+ provided.
+
+ :param host: Hostname of target device. Not required if <code>ip</code> is
+ provided.
+
+ :param username: Username to authenticate against target device if
+ required.
+
+ :param password: Password to authenticate against target device if
+ required.
+
+ :param secret: The enable password if target device requires one.
+
+ :param port: The destination port used to connect to the target
+ device.
+
+ :param device_type: Class selection based on device type.
+
+ :param verbose: Enable additional messages to standard output.
+
+ :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
+
+ :param use_keys: Connect to target device using SSH keys.
+
+ :param key_file: Filename path of the SSH key file to use.
+
+ :param pkey: SSH key object to use.
+
+ :param passphrase: Passphrase to use for encrypted key; password will be used for key
+ decryption if not specified.
+
+ :param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
+ documentation for a description of the expected format.
+
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
+ :param allow_agent: Enable use of SSH key-agent.
+
+ :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
+ means unknown SSH host keys will be accepted).
+
+ :param system_host_keys: Load host keys from the users known_hosts file.
+
+ :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in
+ alt_key_file.
+
+ :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
+
+ :param ssh_config_file: File name of OpenSSH configuration file.
+
+ :param conn_timeout: TCP connection timeout.
+
+ :param session_timeout: Set a timeout for parallel requests.
+
+ :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
+
+ :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
+ :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
+ Currently defaults to 0, for backwards compatibility (it will not attempt
+ to keep the connection alive).
+
+ :param default_enter: Character(s) to send to correspond to enter key (default:
+
+
).
+
:param response_return: Character(s) to use in normalized return data to represent
+ enter key (default:
+
+
)
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+ to select smallest of global and specific. Sets default global_delay_factor to .1
+ (default: True)
+
+ :param session_log: File path or BufferedIOBase subclass object to write the session log to.
+
+ :param session_log_record_writes: The session log generally only records channel reads due
+ to eliminate command duplication due to command echo. You can enable this if you
+ want to record both channel reads and channel writes in the log (default: False).
+
+ :param session_log_file_mode: "write" or "append" for session_log file mode
+ (default: "write")
+
+ :param allow_auto_change: Allow automatic configuration changes for terminal settings.
+ (default: False)
+
+ :param encoding: Encoding to be used when writing bytes to the output channel.
+ (default: ascii)
+
+ :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for
+ communication to the target host (default: None).
+
+ :param global_cmd_verify: Control whether command echo verification is enabled or disabled
+ (default: None). Global attribute takes precedence over function <code>cmd\_verify</code>
+ argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument.
+
+ :param auto_connect: Control whether Netmiko automatically establishes the connection as
+ part of the object creation (default: True).
+
+ :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
+ 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
+ eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
+
+
+
+Expand source code
+
+
class ArrisCERSSH(ArrisCERBase):
+ """Arris CER SSH Driver."""
+
+ pass
Implements methods for interacting with Arris CER platforms.
+
Initialize attributes for establishing connection to target device.
+
+ :param ip: IP address of target device. Not required if <code>host</code> is
+ provided.
+
+ :param host: Hostname of target device. Not required if <code>ip</code> is
+ provided.
+
+ :param username: Username to authenticate against target device if
+ required.
+
+ :param password: Password to authenticate against target device if
+ required.
+
+ :param secret: The enable password if target device requires one.
+
+ :param port: The destination port used to connect to the target
+ device.
+
+ :param device_type: Class selection based on device type.
+
+ :param verbose: Enable additional messages to standard output.
+
+ :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
+
+ :param use_keys: Connect to target device using SSH keys.
+
+ :param key_file: Filename path of the SSH key file to use.
+
+ :param pkey: SSH key object to use.
+
+ :param passphrase: Passphrase to use for encrypted key; password will be used for key
+ decryption if not specified.
+
+ :param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
+ documentation for a description of the expected format.
+
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
+ :param allow_agent: Enable use of SSH key-agent.
+
+ :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
+ means unknown SSH host keys will be accepted).
+
+ :param system_host_keys: Load host keys from the users known_hosts file.
+
+ :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in
+ alt_key_file.
+
+ :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
+
+ :param ssh_config_file: File name of OpenSSH configuration file.
+
+ :param conn_timeout: TCP connection timeout.
+
+ :param session_timeout: Set a timeout for parallel requests.
+
+ :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
+
+ :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
+ :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
+ Currently defaults to 0, for backwards compatibility (it will not attempt
+ to keep the connection alive).
+
+ :param default_enter: Character(s) to send to correspond to enter key (default:
+
+
).
+
:param response_return: Character(s) to use in normalized return data to represent
+ enter key (default:
+
+
)
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+ to select smallest of global and specific. Sets default global_delay_factor to .1
+ (default: True)
+
+ :param session_log: File path or BufferedIOBase subclass object to write the session log to.
+
+ :param session_log_record_writes: The session log generally only records channel reads due
+ to eliminate command duplication due to command echo. You can enable this if you
+ want to record both channel reads and channel writes in the log (default: False).
+
+ :param session_log_file_mode: "write" or "append" for session_log file mode
+ (default: "write")
+
+ :param allow_auto_change: Allow automatic configuration changes for terminal settings.
+ (default: False)
+
+ :param encoding: Encoding to be used when writing bytes to the output channel.
+ (default: ascii)
+
+ :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for
+ communication to the target host (default: None).
+
+ :param global_cmd_verify: Control whether command echo verification is enabled or disabled
+ (default: None). Global attribute takes precedence over function <code>cmd\_verify</code>
+ argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument.
+
+ :param auto_connect: Control whether Netmiko automatically establishes the connection as
+ part of the object creation (default: True).
+
+ :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
+ 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
+ eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
+
Initialize attributes for establishing connection to target device.
+
+ :param ip: IP address of target device. Not required if <code>host</code> is
+ provided.
+
+ :param host: Hostname of target device. Not required if <code>ip</code> is
+ provided.
+
+ :param username: Username to authenticate against target device if
+ required.
+
+ :param password: Password to authenticate against target device if
+ required.
+
+ :param secret: The enable password if target device requires one.
+
+ :param port: The destination port used to connect to the target
+ device.
+
+ :param device_type: Class selection based on device type.
+
+ :param verbose: Enable additional messages to standard output.
+
+ :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
+
+ :param use_keys: Connect to target device using SSH keys.
+
+ :param key_file: Filename path of the SSH key file to use.
+
+ :param pkey: SSH key object to use.
+
+ :param passphrase: Passphrase to use for encrypted key; password will be used for key
+ decryption if not specified.
+
+ :param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
+ documentation for a description of the expected format.
+
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
+ :param allow_agent: Enable use of SSH key-agent.
+
+ :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
+ means unknown SSH host keys will be accepted).
+
+ :param system_host_keys: Load host keys from the users known_hosts file.
+
+ :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in
+ alt_key_file.
+
+ :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
+
+ :param ssh_config_file: File name of OpenSSH configuration file.
+
+ :param conn_timeout: TCP connection timeout.
+
+ :param session_timeout: Set a timeout for parallel requests.
+
+ :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
+
+ :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
+ :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
+ Currently defaults to 0, for backwards compatibility (it will not attempt
+ to keep the connection alive).
+
+ :param default_enter: Character(s) to send to correspond to enter key (default:
+
+
).
+
:param response_return: Character(s) to use in normalized return data to represent
+ enter key (default:
+
+
)
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+ to select smallest of global and specific. Sets default global_delay_factor to .1
+ (default: True)
+
+ :param session_log: File path or BufferedIOBase subclass object to write the session log to.
+
+ :param session_log_record_writes: The session log generally only records channel reads due
+ to eliminate command duplication due to command echo. You can enable this if you
+ want to record both channel reads and channel writes in the log (default: False).
+
+ :param session_log_file_mode: "write" or "append" for session_log file mode
+ (default: "write")
+
+ :param allow_auto_change: Allow automatic configuration changes for terminal settings.
+ (default: False)
+
+ :param encoding: Encoding to be used when writing bytes to the output channel.
+ (default: ascii)
+
+ :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for
+ communication to the target host (default: None).
+
+ :param global_cmd_verify: Control whether command echo verification is enabled or disabled
+ (default: None). Global attribute takes precedence over function <code>cmd\_verify</code>
+ argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument.
+
+ :param auto_connect: Control whether Netmiko automatically establishes the connection as
+ part of the object creation (default: True).
+
+ :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
+ 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
+ eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
+
+
+
+Expand source code
+
+
class ArrisCERSSH(ArrisCERBase):
+ """Arris CER SSH Driver."""
+
+ pass
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/netmiko/aruba/aruba_ssh.html b/docs/netmiko/aruba/aruba_ssh.html
index 20d0d54fb..f8c601b5d 100644
--- a/docs/netmiko/aruba/aruba_ssh.html
+++ b/docs/netmiko/aruba/aruba_ssh.html
@@ -135,6 +135,9 @@
Classes
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -149,7 +152,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -157,6 +160,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -168,7 +175,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -200,6 +209,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -104,7 +107,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -112,6 +115,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -123,7 +130,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -155,6 +164,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
class AudiocodeBase(BaseConnection):
"""Common Methods for AudioCode Drivers."""
+ prompt_pattern = r"[>#]"
+
def __init__(self, *args: Any, **kwargs: Any) -> None:
default_enter = kwargs.get("default_enter")
kwargs["default_enter"] = "\r" if default_enter is None else default_enter
@@ -43,7 +45,7 @@
Module netmiko.audiocode.audiocode_ssh
def session_preparation(self) -> None:
"""Prepare the session after the connection has been established."""
- self._test_channel_read(pattern=r"[>#]")
+ self._test_channel_read(pattern=self.prompt_pattern)
self.set_base_prompt()
self.disable_paging()
# Clear the read buffer
@@ -54,20 +56,41 @@
Module netmiko.audiocode.audiocode_ssh
pri_prompt_terminator: str = "#",
alt_prompt_terminator: str = ">",
delay_factor: float = 1.0,
- pattern: Optional[str] = r"\*?(#|>)",
+ pattern: Optional[str] = None,
) -> str:
- return super().set_base_prompt(
- pri_prompt_terminator=pri_prompt_terminator,
- alt_prompt_terminator=alt_prompt_terminator,
- delay_factor=delay_factor,
- pattern=pattern,
- )
+
+ if pattern is None:
+ pattern = rf"\*?{self.prompt_pattern}"
+
+ if pattern:
+ prompt = self.find_prompt(delay_factor=delay_factor, pattern=pattern)
+ else:
+ prompt = self.find_prompt(delay_factor=delay_factor)
+
+ if not prompt[-1] in (pri_prompt_terminator, alt_prompt_terminator):
+ raise ValueError(f"Router prompt not found: {repr(prompt)}")
+
+ # If all we have is the 'terminator' just use that :-(
+ if len(prompt) == 1:
+ self.base_prompt = prompt
+ else:
+ # Audiocode will return a prompt with * in it in certain
+ # situations: 'MYDEVICE*#', strip this off.
+ if "*#" in prompt or "*>" in prompt:
+ self.base_prompt = prompt[:-2]
+ else:
+ # Strip off trailing terminator
+ self.base_prompt = prompt[:-1]
+ return self.base_prompt
def find_prompt(
self,
delay_factor: float = 1.0,
- pattern: Optional[str] = r"\*?(#|>)",
+ pattern: Optional[str] = None,
) -> str:
+
+ if pattern is None:
+ pattern = rf"\*?{self.prompt_pattern}"
return super().find_prompt(
delay_factor=delay_factor,
pattern=pattern,
@@ -81,11 +104,10 @@
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -569,7 +599,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -577,6 +607,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -588,7 +622,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -620,6 +656,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -726,6 +765,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -740,7 +782,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -748,6 +790,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -759,7 +805,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -791,6 +839,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -897,6 +948,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -911,7 +965,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -919,6 +973,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -930,7 +988,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -962,6 +1022,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -1124,6 +1187,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -1138,7 +1204,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -1146,6 +1212,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -1157,7 +1227,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -1189,6 +1261,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -1295,6 +1370,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -1309,7 +1387,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -1317,6 +1395,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -1328,7 +1410,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -1360,6 +1444,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -1466,6 +1553,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -1480,7 +1570,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -1488,6 +1578,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -1499,7 +1593,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -1531,6 +1627,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -1539,6 +1638,8 @@
Inherited members
class AudiocodeBase(BaseConnection):
"""Common Methods for AudioCode Drivers."""
+ prompt_pattern = r"[>#]"
+
def __init__(self, *args: Any, **kwargs: Any) -> None:
default_enter = kwargs.get("default_enter")
kwargs["default_enter"] = "\r" if default_enter is None else default_enter
@@ -1546,7 +1647,7 @@
Inherited members
def session_preparation(self) -> None:
"""Prepare the session after the connection has been established."""
- self._test_channel_read(pattern=r"[>#]")
+ self._test_channel_read(pattern=self.prompt_pattern)
self.set_base_prompt()
self.disable_paging()
# Clear the read buffer
@@ -1557,20 +1658,41 @@
Inherited members
pri_prompt_terminator: str = "#",
alt_prompt_terminator: str = ">",
delay_factor: float = 1.0,
- pattern: Optional[str] = r"\*?(#|>)",
+ pattern: Optional[str] = None,
) -> str:
- return super().set_base_prompt(
- pri_prompt_terminator=pri_prompt_terminator,
- alt_prompt_terminator=alt_prompt_terminator,
- delay_factor=delay_factor,
- pattern=pattern,
- )
+
+ if pattern is None:
+ pattern = rf"\*?{self.prompt_pattern}"
+
+ if pattern:
+ prompt = self.find_prompt(delay_factor=delay_factor, pattern=pattern)
+ else:
+ prompt = self.find_prompt(delay_factor=delay_factor)
+
+ if not prompt[-1] in (pri_prompt_terminator, alt_prompt_terminator):
+ raise ValueError(f"Router prompt not found: {repr(prompt)}")
+
+ # If all we have is the 'terminator' just use that :-(
+ if len(prompt) == 1:
+ self.base_prompt = prompt
+ else:
+ # Audiocode will return a prompt with * in it in certain
+ # situations: 'MYDEVICE*#', strip this off.
+ if "*#" in prompt or "*>" in prompt:
+ self.base_prompt = prompt[:-2]
+ else:
+ # Strip off trailing terminator
+ self.base_prompt = prompt[:-1]
+ return self.base_prompt
def find_prompt(
self,
delay_factor: float = 1.0,
- pattern: Optional[str] = r"\*?(#|>)",
+ pattern: Optional[str] = None,
) -> str:
+
+ if pattern is None:
+ pattern = rf"\*?{self.prompt_pattern}"
return super().find_prompt(
delay_factor=delay_factor,
pattern=pattern,
@@ -1584,11 +1706,10 @@
def session_preparation(self) -> None:
"""Prepare the session after the connection has been established."""
- self._test_channel_read(pattern=r"[>#]")
+ self._test_channel_read(pattern=self.prompt_pattern)
self.set_base_prompt()
self.disable_paging()
# Clear the read buffer
@@ -1904,6 +2037,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -1918,7 +2054,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -1926,6 +2062,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -1937,7 +2077,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -1969,6 +2111,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -2130,6 +2275,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -2144,7 +2292,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -2152,6 +2300,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -2163,7 +2315,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -2195,6 +2349,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -2487,7 +2647,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -2495,6 +2655,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -2506,7 +2670,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -2538,6 +2704,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -2645,6 +2814,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -2659,7 +2831,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -2667,6 +2839,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -2678,7 +2854,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -2710,6 +2888,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -118,7 +121,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -126,6 +129,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -137,7 +144,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -169,6 +178,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -275,6 +287,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -289,7 +304,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -297,6 +312,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -308,7 +327,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -340,6 +361,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -446,6 +470,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -460,7 +487,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -468,6 +495,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -479,7 +510,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -511,6 +544,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -617,6 +653,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -631,7 +670,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -639,6 +678,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -650,7 +693,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -682,6 +727,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -788,6 +836,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -802,7 +853,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -810,6 +861,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -821,7 +876,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -853,6 +910,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -960,6 +1020,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -974,7 +1037,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -982,6 +1045,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -993,7 +1060,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -1025,6 +1094,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ https://github.com/paramiko/paramiko/issues/1961 (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -268,7 +272,7 @@
Module netmiko.base_connection
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -276,6 +280,10 @@
Module netmiko.base_connection
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -285,6 +293,8 @@
Module netmiko.base_connection
:param response_return: Character(s) to use in normalized return data to represent
enter key (default: \n)
+ :param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -317,6 +327,9 @@
Module netmiko.base_connection
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
"""
self.remote_conn: Union[
@@ -338,6 +351,8 @@
Module netmiko.base_connection
# Line Separator in response lines
self.RESPONSE_RETURN = "\n" if response_return is None else response_return
+ self.disable_lf_normalization = True if disable_lf_normalization else False
+
if ip:
self.host = ip.strip()
elif host:
@@ -461,7 +476,15 @@
def read_channel(self) -> str:
"""Generic handler that will read all the data from given channel."""
new_data = self.channel.read_channel()
- new_data = self.normalize_linefeeds(new_data)
+
+ if self.disable_lf_normalization is False:
+ start = time.time()
+ # Data blocks shouldn't end in '\r' (can cause problems with normalize_linefeeds)
+ # Only do the extra read if '\n' exists in the output
+ # this avoids devices that only use \r.
+ while ("\n" in new_data) and (time.time() - start < 1.0):
+ if new_data[-1] == "\r":
+ time.sleep(0.01)
+ new_data += self.channel.read_channel()
+ else:
+ break
+ new_data = self.normalize_linefeeds(new_data)
+
if self.ansi_escape_codes:
new_data = self.strip_ansi_escape_codes(new_data)
log.debug(f"read_channel: {new_data}")
@@ -663,8 +699,21 @@
Module netmiko.base_connection
start_time = time.time()
# if read_timeout == 0 or 0.0 keep reading indefinitely
while (time.time() - start_time < read_timeout) or (not read_timeout):
+
output += self.read_channel()
+
if re.search(pattern, output, flags=re_flags):
+ if "(" in pattern and "(?:" not in pattern:
+ msg = f"""
+Parenthesis found in pattern.
+
+pattern: {pattern}\n
+
+This can be problemtic when used in read_until_pattern().
+
+You should ensure that you use either non-capture groups i.e. '(?:' or that the
+parenthesis completely wrap the pattern '(pattern)'"""
+ log.debug(msg)
results = re.split(pattern, output, maxsplit=1, flags=re_flags)
# The string matched by pattern must be retained in the output string.
@@ -713,16 +762,24 @@
Module netmiko.base_connection
"""Read data on the channel based on timing delays.
General pattern is keep reading until no new data is read.
+
Once no new data is read wait `last_read` amount of time (one last read).
As long as no new data, then return data.
- `read_timeout` is an absolute timer for how long to keep reading (which presupposes
- we are still getting new data).
-
Setting `read_timeout` to zero will cause read_channel_timing to never expire based
- on an absolute timeout. It will only complete based on timeout based on their being
+ on an absolute timeout. It will only complete based on timeout based on there being
no new data.
+ :param last_read: Amount of time to wait before performing one last read (under the
+ idea that we should be done reading at this point and there should be no new
+ data).
+
+ :param read_timeout: Absolute timer for how long Netmiko should keep reading data on
+ the channel (waiting for there to be no new data). Will raise ReadTimeout if this
+ timeout expires. A read_timeout value of 0 will cause the read-loop to never timeout
+ (i.e. Netmiko will keep reading indefinitely until there is no new data and last_read
+ passes).
+
:param delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
:param max_loops: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
@@ -849,6 +906,8 @@
Module netmiko.base_connection
:param username_pattern: Pattern used to identify the username prompt
+ :param pwd_pattern: Pattern used to identify the pwd prompt
+
:param delay_factor: See __init__: global_delay_factor
:param max_loops: Controls the wait time in conjunction with the delay_factor
@@ -1038,7 +1097,6 @@
Module netmiko.base_connection
) -> str:
"""Strip out command echo and trailing router prompt."""
if strip_command and command_string:
- command_string = self.normalize_linefeeds(command_string)
output = self.strip_command(command_string, output)
if strip_prompt:
output = self.strip_prompt(output)
@@ -1240,6 +1298,10 @@
Module netmiko.base_connection
:param command: Device command to disable pagination of output
:param delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
+
+ :param cmd_verify: Verify command echo before proceeding (default: True).
+
+ :param pattern: Pattern to terminate reading of channel
"""
if delay_factor is not None:
warnings.warn(DELAY_FACTOR_DEPR_SIMPLE_MSG, DeprecationWarning)
@@ -1294,12 +1356,6 @@
:param command_string: The command to be executed on the remote device.
+ :param last_read: Time waited after end of data
+
+ :param read_timeout: Absolute timer for how long Netmiko should keep reading data on
+ the channel (waiting for there to be no new data). Will raise ReadTimeout if this
+ timeout expires. A read_timeout value of 0 will cause the read-loop to never timeout
+ (i.e. Netmiko will keep reading indefinitely until there is no new data and last_read
+ passes).
+
:param delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
:param max_loops: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
@@ -1609,10 +1673,15 @@
Module netmiko.base_connection
:param expect_string: Regular expression pattern to use for determining end of output.
If left blank will default to being based on router prompt.
+ :param read_timeout: Maximum time to wait looking for pattern. Will raise ReadTimeout
+ if timeout is exceeded.
+
:param delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
:param max_loops: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
+ :param auto_find_prompt: Use find_prompt() to override base prompt
+
:param strip_prompt: Remove the trailing router prompt from the output (default: True).
:param strip_command: Remove the echo of the command from the output (default: True).
@@ -1927,6 +1996,7 @@
:param enable_pattern: pattern indicating you have entered enable mode
+ :param check_state: Determine whether we are already in enable_mode using
+ check_enable_mode() before trying to elevate privileges (default: True)
+
:param re_flags: Regular expression flags used in conjunction with pattern
"""
output = ""
@@ -1945,35 +2018,37 @@
Module netmiko.base_connection
"the 'secret' argument to ConnectHandler."
)
- # Check if in enable mode
- if not self.check_enable_mode():
- # Send "enable" mode command
- self.write_channel(self.normalize_cmd(cmd))
- try:
- # Read the command echo
- end_data = ""
- if self.global_cmd_verify is not False:
- output += self.read_until_pattern(pattern=re.escape(cmd.strip()))
- end_data = output.split(cmd.strip())[-1]
-
- # Search for trailing prompt or password pattern
- if pattern not in output and self.base_prompt not in end_data:
- output += self.read_until_prompt_or_pattern(
- pattern=pattern, re_flags=re_flags
- )
- # Send the "secret" in response to password pattern
- if re.search(pattern, output):
- self.write_channel(self.normalize_cmd(self.secret))
- output += self.read_until_prompt()
-
- # Search for terminating pattern if defined
- if enable_pattern and not re.search(enable_pattern, output):
- output += self.read_until_pattern(pattern=enable_pattern)
- else:
- if not self.check_enable_mode():
- raise ValueError(msg)
- except NetmikoTimeoutException:
- raise ValueError(msg)
+ # Check if in enable mode already.
+ if check_state and self.check_enable_mode():
+ return output
+
+ # Send "enable" mode command
+ self.write_channel(self.normalize_cmd(cmd))
+ try:
+ # Read the command echo
+ if self.global_cmd_verify is not False:
+ output += self.read_until_pattern(pattern=re.escape(cmd.strip()))
+
+ # Search for trailing prompt or password pattern
+ output += self.read_until_prompt_or_pattern(
+ pattern=pattern, re_flags=re_flags
+ )
+
+ # Send the "secret" in response to password pattern
+ if re.search(pattern, output):
+ self.write_channel(self.normalize_cmd(self.secret))
+ output += self.read_until_prompt()
+
+ # Search for terminating pattern if defined
+ if enable_pattern and not re.search(enable_pattern, output):
+ output += self.read_until_pattern(pattern=enable_pattern)
+ else:
+ if not self.check_enable_mode():
+ raise ValueError(msg)
+
+ except NetmikoTimeoutException:
+ raise ValueError(msg)
+
return output
def exit_enable_mode(self, exit_command: str = "") -> str:
@@ -2000,6 +2075,10 @@
Module netmiko.base_connection
:param pattern: Pattern to terminate reading of channel
:type pattern: str
+
+ :param force_regex: Use regular expression pattern to find check_string in output
+ :type force_regex: bool
+
"""
self.write_channel(self.RETURN)
# You can encounter an issue here (on router name changes) prefer delay-based solution
@@ -2125,7 +2204,8 @@
Module netmiko.base_connection
:param strip_command: Determines whether or not to strip the command
- :param read_timeout: Absolute timer to send to read_channel_timing. Should be rarely needed.
+ :param read_timeout: Absolute timer to send to read_channel_timing. Also adjusts
+ read_timeout in read_until_pattern calls.
:param config_mode_command: The command to enter into config mode
@@ -2231,11 +2311,15 @@
Module netmiko.base_connection
self.write_channel(self.normalize_cmd(cmd))
# Make sure command is echoed
- output += self.read_until_pattern(pattern=re.escape(cmd.strip()))
+ output += self.read_until_pattern(
+ pattern=re.escape(cmd.strip()), read_timeout=read_timeout
+ )
# Read until next prompt or terminator (#); the .*$ forces read of entire line
pattern = f"(?:{re.escape(self.base_prompt)}.*$|{terminator}.*$)"
- output += self.read_until_pattern(pattern=pattern, re_flags=re.M)
+ output += self.read_until_pattern(
+ pattern=pattern, read_timeout=read_timeout, re_flags=re.M
+ )
if error_pattern:
if re.search(error_pattern, output, flags=re.M):
@@ -2514,7 +2598,7 @@
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -2570,7 +2657,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -2578,6 +2665,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -2589,7 +2680,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -2621,6 +2714,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ https://github.com/paramiko/paramiko/issues/1961 (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -2736,7 +2837,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -2744,6 +2845,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -2753,6 +2858,8 @@
Classes
:param response_return: Character(s) to use in normalized return data to represent
enter key (default: \n)
+ :param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -2785,6 +2892,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
"""
self.remote_conn: Union[
@@ -2806,6 +2916,8 @@
Classes
# Line Separator in response lines
self.RESPONSE_RETURN = "\n" if response_return is None else response_return
+ self.disable_lf_normalization = True if disable_lf_normalization else False
+
if ip:
self.host = ip.strip()
elif host:
@@ -2929,7 +3041,15 @@
def read_channel(self) -> str:
"""Generic handler that will read all the data from given channel."""
new_data = self.channel.read_channel()
- new_data = self.normalize_linefeeds(new_data)
+
+ if self.disable_lf_normalization is False:
+ start = time.time()
+ # Data blocks shouldn't end in '\r' (can cause problems with normalize_linefeeds)
+ # Only do the extra read if '\n' exists in the output
+ # this avoids devices that only use \r.
+ while ("\n" in new_data) and (time.time() - start < 1.0):
+ if new_data[-1] == "\r":
+ time.sleep(0.01)
+ new_data += self.channel.read_channel()
+ else:
+ break
+ new_data = self.normalize_linefeeds(new_data)
+
if self.ansi_escape_codes:
new_data = self.strip_ansi_escape_codes(new_data)
log.debug(f"read_channel: {new_data}")
@@ -3131,8 +3264,21 @@
Classes
start_time = time.time()
# if read_timeout == 0 or 0.0 keep reading indefinitely
while (time.time() - start_time < read_timeout) or (not read_timeout):
+
output += self.read_channel()
+
if re.search(pattern, output, flags=re_flags):
+ if "(" in pattern and "(?:" not in pattern:
+ msg = f"""
+Parenthesis found in pattern.
+
+pattern: {pattern}\n
+
+This can be problemtic when used in read_until_pattern().
+
+You should ensure that you use either non-capture groups i.e. '(?:' or that the
+parenthesis completely wrap the pattern '(pattern)'"""
+ log.debug(msg)
results = re.split(pattern, output, maxsplit=1, flags=re_flags)
# The string matched by pattern must be retained in the output string.
@@ -3181,16 +3327,24 @@
Classes
"""Read data on the channel based on timing delays.
General pattern is keep reading until no new data is read.
+
Once no new data is read wait `last_read` amount of time (one last read).
As long as no new data, then return data.
- `read_timeout` is an absolute timer for how long to keep reading (which presupposes
- we are still getting new data).
-
Setting `read_timeout` to zero will cause read_channel_timing to never expire based
- on an absolute timeout. It will only complete based on timeout based on their being
+ on an absolute timeout. It will only complete based on timeout based on there being
no new data.
+ :param last_read: Amount of time to wait before performing one last read (under the
+ idea that we should be done reading at this point and there should be no new
+ data).
+
+ :param read_timeout: Absolute timer for how long Netmiko should keep reading data on
+ the channel (waiting for there to be no new data). Will raise ReadTimeout if this
+ timeout expires. A read_timeout value of 0 will cause the read-loop to never timeout
+ (i.e. Netmiko will keep reading indefinitely until there is no new data and last_read
+ passes).
+
:param delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
:param max_loops: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
@@ -3317,6 +3471,8 @@
Classes
:param username_pattern: Pattern used to identify the username prompt
+ :param pwd_pattern: Pattern used to identify the pwd prompt
+
:param delay_factor: See __init__: global_delay_factor
:param max_loops: Controls the wait time in conjunction with the delay_factor
@@ -3506,7 +3662,6 @@
Classes
) -> str:
"""Strip out command echo and trailing router prompt."""
if strip_command and command_string:
- command_string = self.normalize_linefeeds(command_string)
output = self.strip_command(command_string, output)
if strip_prompt:
output = self.strip_prompt(output)
@@ -3708,6 +3863,10 @@
Classes
:param command: Device command to disable pagination of output
:param delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
+
+ :param cmd_verify: Verify command echo before proceeding (default: True).
+
+ :param pattern: Pattern to terminate reading of channel
"""
if delay_factor is not None:
warnings.warn(DELAY_FACTOR_DEPR_SIMPLE_MSG, DeprecationWarning)
@@ -3762,12 +3921,6 @@
:param command_string: The command to be executed on the remote device.
+ :param last_read: Time waited after end of data
+
+ :param read_timeout: Absolute timer for how long Netmiko should keep reading data on
+ the channel (waiting for there to be no new data). Will raise ReadTimeout if this
+ timeout expires. A read_timeout value of 0 will cause the read-loop to never timeout
+ (i.e. Netmiko will keep reading indefinitely until there is no new data and last_read
+ passes).
+
:param delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
:param max_loops: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
@@ -4077,10 +4238,15 @@
Classes
:param expect_string: Regular expression pattern to use for determining end of output.
If left blank will default to being based on router prompt.
+ :param read_timeout: Maximum time to wait looking for pattern. Will raise ReadTimeout
+ if timeout is exceeded.
+
:param delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
:param max_loops: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
+ :param auto_find_prompt: Use find_prompt() to override base prompt
+
:param strip_prompt: Remove the trailing router prompt from the output (default: True).
:param strip_command: Remove the echo of the command from the output (default: True).
@@ -4395,6 +4561,7 @@
:param enable_pattern: pattern indicating you have entered enable mode
+ :param check_state: Determine whether we are already in enable_mode using
+ check_enable_mode() before trying to elevate privileges (default: True)
+
:param re_flags: Regular expression flags used in conjunction with pattern
"""
output = ""
@@ -4413,35 +4583,37 @@
Classes
"the 'secret' argument to ConnectHandler."
)
- # Check if in enable mode
- if not self.check_enable_mode():
- # Send "enable" mode command
- self.write_channel(self.normalize_cmd(cmd))
- try:
- # Read the command echo
- end_data = ""
- if self.global_cmd_verify is not False:
- output += self.read_until_pattern(pattern=re.escape(cmd.strip()))
- end_data = output.split(cmd.strip())[-1]
-
- # Search for trailing prompt or password pattern
- if pattern not in output and self.base_prompt not in end_data:
- output += self.read_until_prompt_or_pattern(
- pattern=pattern, re_flags=re_flags
- )
- # Send the "secret" in response to password pattern
- if re.search(pattern, output):
- self.write_channel(self.normalize_cmd(self.secret))
- output += self.read_until_prompt()
-
- # Search for terminating pattern if defined
- if enable_pattern and not re.search(enable_pattern, output):
- output += self.read_until_pattern(pattern=enable_pattern)
- else:
- if not self.check_enable_mode():
- raise ValueError(msg)
- except NetmikoTimeoutException:
- raise ValueError(msg)
+ # Check if in enable mode already.
+ if check_state and self.check_enable_mode():
+ return output
+
+ # Send "enable" mode command
+ self.write_channel(self.normalize_cmd(cmd))
+ try:
+ # Read the command echo
+ if self.global_cmd_verify is not False:
+ output += self.read_until_pattern(pattern=re.escape(cmd.strip()))
+
+ # Search for trailing prompt or password pattern
+ output += self.read_until_prompt_or_pattern(
+ pattern=pattern, re_flags=re_flags
+ )
+
+ # Send the "secret" in response to password pattern
+ if re.search(pattern, output):
+ self.write_channel(self.normalize_cmd(self.secret))
+ output += self.read_until_prompt()
+
+ # Search for terminating pattern if defined
+ if enable_pattern and not re.search(enable_pattern, output):
+ output += self.read_until_pattern(pattern=enable_pattern)
+ else:
+ if not self.check_enable_mode():
+ raise ValueError(msg)
+
+ except NetmikoTimeoutException:
+ raise ValueError(msg)
+
return output
def exit_enable_mode(self, exit_command: str = "") -> str:
@@ -4468,6 +4640,10 @@
Classes
:param pattern: Pattern to terminate reading of channel
:type pattern: str
+
+ :param force_regex: Use regular expression pattern to find check_string in output
+ :type force_regex: bool
+
"""
self.write_channel(self.RETURN)
# You can encounter an issue here (on router name changes) prefer delay-based solution
@@ -4593,7 +4769,8 @@
Classes
:param strip_command: Determines whether or not to strip the command
- :param read_timeout: Absolute timer to send to read_channel_timing. Should be rarely needed.
+ :param read_timeout: Absolute timer to send to read_channel_timing. Also adjusts
+ read_timeout in read_until_pattern calls.
:param config_mode_command: The command to enter into config mode
@@ -4699,11 +4876,15 @@
Classes
self.write_channel(self.normalize_cmd(cmd))
# Make sure command is echoed
- output += self.read_until_pattern(pattern=re.escape(cmd.strip()))
+ output += self.read_until_pattern(
+ pattern=re.escape(cmd.strip()), read_timeout=read_timeout
+ )
# Read until next prompt or terminator (#); the .*$ forces read of entire line
pattern = f"(?:{re.escape(self.base_prompt)}.*$|{terminator}.*$)"
- output += self.read_until_pattern(pattern=pattern, re_flags=re.M)
+ output += self.read_until_pattern(
+ pattern=pattern, read_timeout=read_timeout, re_flags=re.M
+ )
if error_pattern:
if re.search(error_pattern, output, flags=re.M):
@@ -4919,6 +5100,7 @@
:param check_string: Identification of configuration mode from the device
:type check_string: str
:param pattern: Pattern to terminate reading of channel
-:type pattern: str
+:type pattern: str
+
:param force_regex: Use regular expression pattern to find check_string in output
+:type force_regex: bool
Expand source code
@@ -4983,6 +5168,10 @@
Methods
:param pattern: Pattern to terminate reading of channel
:type pattern: str
+
+ :param force_regex: Use regular expression pattern to find check_string in output
+ :type force_regex: bool
+
"""
self.write_channel(self.RETURN)
# You can encounter an issue here (on router name changes) prefer delay-based solution
@@ -5164,7 +5353,9 @@
Methods
Disable paging default to a Cisco CLI method.
:param command: Device command to disable pagination of output
-
:param delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
+
:param delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
+
:param cmd_verify: Verify command echo before proceeding (default: True).
+
:param pattern: Pattern to terminate reading of channel
Expand source code
@@ -5181,6 +5372,10 @@
Methods
:param command: Device command to disable pagination of output
:param delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
+
+ :param cmd_verify: Verify command echo before proceeding (default: True).
+
+ :param pattern: Pattern to terminate reading of channel
"""
if delay_factor is not None:
warnings.warn(DELAY_FACTOR_DEPR_SIMPLE_MSG, DeprecationWarning)
@@ -5240,13 +5435,15 @@
:param enable_pattern: pattern indicating you have entered enable mode
+ :param check_state: Determine whether we are already in enable_mode using
+ check_enable_mode() before trying to elevate privileges (default: True)
+
:param re_flags: Regular expression flags used in conjunction with pattern
"""
output = ""
@@ -5275,35 +5476,37 @@
Methods
"the 'secret' argument to ConnectHandler."
)
- # Check if in enable mode
- if not self.check_enable_mode():
- # Send "enable" mode command
- self.write_channel(self.normalize_cmd(cmd))
- try:
- # Read the command echo
- end_data = ""
- if self.global_cmd_verify is not False:
- output += self.read_until_pattern(pattern=re.escape(cmd.strip()))
- end_data = output.split(cmd.strip())[-1]
+ # Check if in enable mode already.
+ if check_state and self.check_enable_mode():
+ return output
- # Search for trailing prompt or password pattern
- if pattern not in output and self.base_prompt not in end_data:
- output += self.read_until_prompt_or_pattern(
- pattern=pattern, re_flags=re_flags
- )
- # Send the "secret" in response to password pattern
- if re.search(pattern, output):
- self.write_channel(self.normalize_cmd(self.secret))
- output += self.read_until_prompt()
+ # Send "enable" mode command
+ self.write_channel(self.normalize_cmd(cmd))
+ try:
+ # Read the command echo
+ if self.global_cmd_verify is not False:
+ output += self.read_until_pattern(pattern=re.escape(cmd.strip()))
+
+ # Search for trailing prompt or password pattern
+ output += self.read_until_prompt_or_pattern(
+ pattern=pattern, re_flags=re_flags
+ )
+
+ # Send the "secret" in response to password pattern
+ if re.search(pattern, output):
+ self.write_channel(self.normalize_cmd(self.secret))
+ output += self.read_until_prompt()
+
+ # Search for terminating pattern if defined
+ if enable_pattern and not re.search(enable_pattern, output):
+ output += self.read_until_pattern(pattern=enable_pattern)
+ else:
+ if not self.check_enable_mode():
+ raise ValueError(msg)
+
+ except NetmikoTimeoutException:
+ raise ValueError(msg)
- # Search for terminating pattern if defined
- if enable_pattern and not re.search(enable_pattern, output):
- output += self.read_until_pattern(pattern=enable_pattern)
- else:
- if not self.check_enable_mode():
- raise ValueError(msg)
- except NetmikoTimeoutException:
- raise ValueError(msg)
return output
@@ -5685,7 +5888,20 @@
Methods
def read_channel(self) -> str:
"""Generic handler that will read all the data from given channel."""
new_data = self.channel.read_channel()
- new_data = self.normalize_linefeeds(new_data)
+
+ if self.disable_lf_normalization is False:
+ start = time.time()
+ # Data blocks shouldn't end in '\r' (can cause problems with normalize_linefeeds)
+ # Only do the extra read if '\n' exists in the output
+ # this avoids devices that only use \r.
+ while ("\n" in new_data) and (time.time() - start < 1.0):
+ if new_data[-1] == "\r":
+ time.sleep(0.01)
+ new_data += self.channel.read_channel()
+ else:
+ break
+ new_data = self.normalize_linefeeds(new_data)
+
if self.ansi_escape_codes:
new_data = self.strip_ansi_escape_codes(new_data)
log.debug(f"read_channel: {new_data}")
@@ -5707,14 +5923,20 @@
Methods
Read data on the channel based on timing delays.
-
General pattern is keep reading until no new data is read.
-Once no new data is read wait last_read amount of time (one last read).
+
General pattern is keep reading until no new data is read.
+
Once no new data is read wait last_read amount of time (one last read).
As long as no new data, then return data.
-
read_timeout is an absolute timer for how long to keep reading (which presupposes
-we are still getting new data).
Setting read_timeout to zero will cause read_channel_timing to never expire based
-on an absolute timeout. It will only complete based on timeout based on their being
+on an absolute timeout. It will only complete based on timeout based on there being
no new data.
+
:param last_read: Amount of time to wait before performing one last read (under the
+idea that we should be done reading at this point and there should be no new
+data).
+
:param read_timeout: Absolute timer for how long Netmiko should keep reading data on
+the channel (waiting for there to be no new data). Will raise ReadTimeout if this
+timeout expires. A read_timeout value of 0 will cause the read-loop to never timeout
+(i.e. Netmiko will keep reading indefinitely until there is no new data and last_read
+passes).
:param delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
:param max_loops: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
@@ -5731,16 +5953,24 @@
Methods
"""Read data on the channel based on timing delays.
General pattern is keep reading until no new data is read.
+
Once no new data is read wait `last_read` amount of time (one last read).
As long as no new data, then return data.
- `read_timeout` is an absolute timer for how long to keep reading (which presupposes
- we are still getting new data).
-
Setting `read_timeout` to zero will cause read_channel_timing to never expire based
- on an absolute timeout. It will only complete based on timeout based on their being
+ on an absolute timeout. It will only complete based on timeout based on there being
no new data.
+ :param last_read: Amount of time to wait before performing one last read (under the
+ idea that we should be done reading at this point and there should be no new
+ data).
+
+ :param read_timeout: Absolute timer for how long Netmiko should keep reading data on
+ the channel (waiting for there to be no new data). Will raise ReadTimeout if this
+ timeout expires. A read_timeout value of 0 will cause the read-loop to never timeout
+ (i.e. Netmiko will keep reading indefinitely until there is no new data and last_read
+ passes).
+
:param delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
:param max_loops: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
@@ -5847,8 +6077,21 @@
Methods
start_time = time.time()
# if read_timeout == 0 or 0.0 keep reading indefinitely
while (time.time() - start_time < read_timeout) or (not read_timeout):
+
output += self.read_channel()
+
if re.search(pattern, output, flags=re_flags):
+ if "(" in pattern and "(?:" not in pattern:
+ msg = f"""
+Parenthesis found in pattern.
+
+pattern: {pattern}\n
+
+This can be problemtic when used in read_until_pattern().
+
+You should ensure that you use either non-capture groups i.e. '(?:' or that the
+parenthesis completely wrap the pattern '(pattern)'"""
+ log.debug(msg)
results = re.split(pattern, output, maxsplit=1, flags=re_flags)
# The string matched by pattern must be retained in the output string.
@@ -6067,8 +6310,11 @@
Methods
:param command_string: The command to be executed on the remote device.
:param expect_string: Regular expression pattern to use for determining end of output.
If left blank will default to being based on router prompt.
+
:param read_timeout: Maximum time to wait looking for pattern. Will raise ReadTimeout
+if timeout is exceeded.
:param delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
:param max_loops: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
+
:param auto_find_prompt: Use find_prompt() to override base prompt
:param strip_prompt: Remove the trailing router prompt from the output (default: True).
:param strip_command: Remove the echo of the command from the output (default: True).
:param normalize: Ensure the proper enter is sent at end of command (default: True).
@@ -6113,10 +6359,15 @@
Methods
:param expect_string: Regular expression pattern to use for determining end of output.
If left blank will default to being based on router prompt.
+ :param read_timeout: Maximum time to wait looking for pattern. Will raise ReadTimeout
+ if timeout is exceeded.
+
:param delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
:param max_loops: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
+ :param auto_find_prompt: Use find_prompt() to override base prompt
+
:param strip_prompt: Remove the trailing router prompt from the output (default: True).
:param strip_command: Remove the echo of the command from the output (default: True).
@@ -6298,6 +6549,12 @@
Methods
Execute command_string on the SSH channel using a delay-based mechanism. Generally
used for show commands.
:param command_string: The command to be executed on the remote device.
+
:param last_read: Time waited after end of data
+
:param read_timeout: Absolute timer for how long Netmiko should keep reading data on
+the channel (waiting for there to be no new data). Will raise ReadTimeout if this
+timeout expires. A read_timeout value of 0 will cause the read-loop to never timeout
+(i.e. Netmiko will keep reading indefinitely until there is no new data and last_read
+passes).
:param delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
:param max_loops: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
:param strip_prompt: Remove the trailing router prompt from the output (default: True).
@@ -6338,6 +6595,14 @@
Methods
:param command_string: The command to be executed on the remote device.
+ :param last_read: Time waited after end of data
+
+ :param read_timeout: Absolute timer for how long Netmiko should keep reading data on
+ the channel (waiting for there to be no new data). Will raise ReadTimeout if this
+ timeout expires. A read_timeout value of 0 will cause the read-loop to never timeout
+ (i.e. Netmiko will keep reading indefinitely until there is no new data and last_read
+ passes).
+
:param delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
:param max_loops: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
@@ -6446,7 +6711,8 @@
Methods
:param max_loops: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
:param strip_prompt: Determines whether or not to strip the prompt
:param strip_command: Determines whether or not to strip the command
-
:param read_timeout: Absolute timer to send to read_channel_timing. Should be rarely needed.
+
:param read_timeout: Absolute timer to send to read_channel_timing. Also adjusts
+read_timeout in read_until_pattern calls.
:param config_mode_command: The command to enter into config mode
:param cmd_verify: Whether or not to verify command echo for each command in config_set
:param enter_config_mode: Do you enter config mode before sending config commands
@@ -6497,7 +6763,8 @@
Methods
:param strip_command: Determines whether or not to strip the command
- :param read_timeout: Absolute timer to send to read_channel_timing. Should be rarely needed.
+ :param read_timeout: Absolute timer to send to read_channel_timing. Also adjusts
+ read_timeout in read_until_pattern calls.
:param config_mode_command: The command to enter into config mode
@@ -6603,11 +6870,15 @@
Methods
self.write_channel(self.normalize_cmd(cmd))
# Make sure command is echoed
- output += self.read_until_pattern(pattern=re.escape(cmd.strip()))
+ output += self.read_until_pattern(
+ pattern=re.escape(cmd.strip()), read_timeout=read_timeout
+ )
# Read until next prompt or terminator (#); the .*$ forces read of entire line
pattern = f"(?:{re.escape(self.base_prompt)}.*$|{terminator}.*$)"
- output += self.read_until_pattern(pattern=pattern, re_flags=re.M)
+ output += self.read_until_pattern(
+ pattern=pattern, read_timeout=read_timeout, re_flags=re.M
+ )
if error_pattern:
if re.search(error_pattern, output, flags=re.M):
@@ -6787,12 +7058,7 @@
:param pri_prompt_terminator: Primary trailing delimiter for identifying a device prompt
:param alt_prompt_terminator: Alternate trailing delimiter for identifying a device prompt
:param username_pattern: Pattern used to identify the username prompt
+
:param pwd_pattern: Pattern used to identify the pwd prompt
:param delay_factor: See init: global_delay_factor
:param max_loops: Controls the wait time in conjunction with the delay_factor
@@ -7162,6 +7429,8 @@
Methods
:param username_pattern: Pattern used to identify the username prompt
+ :param pwd_pattern: Pattern used to identify the pwd prompt
+
:param delay_factor: See __init__: global_delay_factor
:param max_loops: Controls the wait time in conjunction with the delay_factor
@@ -7317,7 +7586,7 @@
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -7373,7 +7645,7 @@
Methods
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -7381,6 +7653,10 @@
Methods
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -7392,7 +7668,9 @@
Methods
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -7424,6 +7702,9 @@
Methods
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
Implements support for Broadcom Icos devices.
@@ -130,6 +130,9 @@
Classes
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -144,7 +147,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -152,6 +155,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -163,7 +170,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -195,6 +204,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
Implements support for Broadcom Icos devices.
@@ -92,6 +92,9 @@
Classes
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -106,7 +109,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -114,6 +117,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -125,7 +132,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -157,6 +166,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -207,7 +210,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -215,6 +218,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -226,7 +233,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -258,6 +267,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -518,6 +530,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -532,7 +547,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -540,6 +555,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -551,7 +570,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -583,6 +604,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -713,6 +737,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -727,7 +754,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -735,6 +762,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -746,7 +777,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -778,6 +811,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -106,7 +109,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -114,6 +117,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -125,7 +132,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -157,6 +166,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -287,6 +299,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -301,7 +316,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -309,6 +324,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -320,7 +339,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -352,6 +373,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
Implements methods for interacting with Casa CMTS platforms.
+
Initialize attributes for establishing connection to target device.
+
+ :param ip: IP address of target device. Not required if <code>host</code> is
+ provided.
+
+ :param host: Hostname of target device. Not required if <code>ip</code> is
+ provided.
+
+ :param username: Username to authenticate against target device if
+ required.
+
+ :param password: Password to authenticate against target device if
+ required.
+
+ :param secret: The enable password if target device requires one.
+
+ :param port: The destination port used to connect to the target
+ device.
+
+ :param device_type: Class selection based on device type.
+
+ :param verbose: Enable additional messages to standard output.
+
+ :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
+
+ :param use_keys: Connect to target device using SSH keys.
+
+ :param key_file: Filename path of the SSH key file to use.
+
+ :param pkey: SSH key object to use.
+
+ :param passphrase: Passphrase to use for encrypted key; password will be used for key
+ decryption if not specified.
+
+ :param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
+ documentation for a description of the expected format.
+
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
+ :param allow_agent: Enable use of SSH key-agent.
+
+ :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
+ means unknown SSH host keys will be accepted).
+
+ :param system_host_keys: Load host keys from the users known_hosts file.
+
+ :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in
+ alt_key_file.
+
+ :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
+
+ :param ssh_config_file: File name of OpenSSH configuration file.
+
+ :param conn_timeout: TCP connection timeout.
+
+ :param session_timeout: Set a timeout for parallel requests.
+
+ :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
+
+ :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
+ :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
+ Currently defaults to 0, for backwards compatibility (it will not attempt
+ to keep the connection alive).
+
+ :param default_enter: Character(s) to send to correspond to enter key (default:
+
+
).
+
:param response_return: Character(s) to use in normalized return data to represent
+ enter key (default:
+
+
)
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+ to select smallest of global and specific. Sets default global_delay_factor to .1
+ (default: True)
+
+ :param session_log: File path or BufferedIOBase subclass object to write the session log to.
+
+ :param session_log_record_writes: The session log generally only records channel reads due
+ to eliminate command duplication due to command echo. You can enable this if you
+ want to record both channel reads and channel writes in the log (default: False).
+
+ :param session_log_file_mode: "write" or "append" for session_log file mode
+ (default: "write")
+
+ :param allow_auto_change: Allow automatic configuration changes for terminal settings.
+ (default: False)
+
+ :param encoding: Encoding to be used when writing bytes to the output channel.
+ (default: ascii)
+
+ :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for
+ communication to the target host (default: None).
+
+ :param global_cmd_verify: Control whether command echo verification is enabled or disabled
+ (default: None). Global attribute takes precedence over function <code>cmd\_verify</code>
+ argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument.
+
+ :param auto_connect: Control whether Netmiko automatically establishes the connection as
+ part of the object creation (default: True).
+
+ :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
+ 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
+ eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
+
+
+
+Expand source code
+
+
class CasaCMTSBase(NoEnable, CiscoSSHConnection):
+ """
+ Casa CMTS support.
+
+ Implements methods for interacting with Casa CMTS platforms.
+ """
+
+ def disable_paging(
+ self,
+ command: str = "page-off",
+ delay_factor: Optional[float] = None,
+ cmd_verify: bool = True,
+ pattern: Optional[str] = None,
+ ) -> str:
+ """Disables paging."""
+ return super().disable_paging(
+ command=command,
+ delay_factor=delay_factor,
+ cmd_verify=cmd_verify,
+ pattern=pattern,
+ )
+
+ def config_mode(
+ self,
+ config_command: str = "config",
+ pattern: str = "",
+ re_flags: int = 0,
+ ) -> str:
+ """Enters configuration mode."""
+ return super().config_mode(
+ config_command=config_command,
+ pattern=pattern,
+ re_flags=re_flags,
+ )
+
+ def exit_config_mode(
+ self, exit_config: str = chr(26), pattern: str = r"#.*"
+ ) -> str:
+ """
+ Exits configuration mode.
+
+ Must use CTRL-Z (ASCII 26) to reliably exit from any
+ tier in the configuration hierarchy.
+
+ Since CTRL-Z is a non-printable character, we must temporarily disable
+ global_cmd_verify to prevent an exception trying to read the
+ echoed input.
+ """
+ if self.global_cmd_verify is not False and exit_config == chr(26):
+ global_cmd_verify_tmp = self.global_cmd_verify
+ self.global_cmd_verify = False
+ output = super().exit_config_mode(exit_config, pattern)
+ self.global_cmd_verify = global_cmd_verify_tmp
+ else:
+ output = super().exit_config_mode(exit_config, pattern)
+ return output
Initialize attributes for establishing connection to target device.
+
+ :param ip: IP address of target device. Not required if <code>host</code> is
+ provided.
+
+ :param host: Hostname of target device. Not required if <code>ip</code> is
+ provided.
+
+ :param username: Username to authenticate against target device if
+ required.
+
+ :param password: Password to authenticate against target device if
+ required.
+
+ :param secret: The enable password if target device requires one.
+
+ :param port: The destination port used to connect to the target
+ device.
+
+ :param device_type: Class selection based on device type.
+
+ :param verbose: Enable additional messages to standard output.
+
+ :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
+
+ :param use_keys: Connect to target device using SSH keys.
+
+ :param key_file: Filename path of the SSH key file to use.
+
+ :param pkey: SSH key object to use.
+
+ :param passphrase: Passphrase to use for encrypted key; password will be used for key
+ decryption if not specified.
+
+ :param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
+ documentation for a description of the expected format.
+
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
+ :param allow_agent: Enable use of SSH key-agent.
+
+ :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
+ means unknown SSH host keys will be accepted).
+
+ :param system_host_keys: Load host keys from the users known_hosts file.
+
+ :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in
+ alt_key_file.
+
+ :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
+
+ :param ssh_config_file: File name of OpenSSH configuration file.
+
+ :param conn_timeout: TCP connection timeout.
+
+ :param session_timeout: Set a timeout for parallel requests.
+
+ :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
+
+ :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
+ :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
+ Currently defaults to 0, for backwards compatibility (it will not attempt
+ to keep the connection alive).
+
+ :param default_enter: Character(s) to send to correspond to enter key (default:
+
+
).
+
:param response_return: Character(s) to use in normalized return data to represent
+ enter key (default:
+
+
)
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+ to select smallest of global and specific. Sets default global_delay_factor to .1
+ (default: True)
+
+ :param session_log: File path or BufferedIOBase subclass object to write the session log to.
+
+ :param session_log_record_writes: The session log generally only records channel reads due
+ to eliminate command duplication due to command echo. You can enable this if you
+ want to record both channel reads and channel writes in the log (default: False).
+
+ :param session_log_file_mode: "write" or "append" for session_log file mode
+ (default: "write")
+
+ :param allow_auto_change: Allow automatic configuration changes for terminal settings.
+ (default: False)
+
+ :param encoding: Encoding to be used when writing bytes to the output channel.
+ (default: ascii)
+
+ :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for
+ communication to the target host (default: None).
+
+ :param global_cmd_verify: Control whether command echo verification is enabled or disabled
+ (default: None). Global attribute takes precedence over function <code>cmd\_verify</code>
+ argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument.
+
+ :param auto_connect: Control whether Netmiko automatically establishes the connection as
+ part of the object creation (default: True).
+
+ :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
+ 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
+ eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
+
+
+
+Expand source code
+
+
class CasaCMTSSSH(CasaCMTSBase):
+ """Casa CMTS SSH Driver."""
+
+ pass
Implements methods for interacting with Casa CMTS platforms.
+
Initialize attributes for establishing connection to target device.
+
+ :param ip: IP address of target device. Not required if <code>host</code> is
+ provided.
+
+ :param host: Hostname of target device. Not required if <code>ip</code> is
+ provided.
+
+ :param username: Username to authenticate against target device if
+ required.
+
+ :param password: Password to authenticate against target device if
+ required.
+
+ :param secret: The enable password if target device requires one.
+
+ :param port: The destination port used to connect to the target
+ device.
+
+ :param device_type: Class selection based on device type.
+
+ :param verbose: Enable additional messages to standard output.
+
+ :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
+
+ :param use_keys: Connect to target device using SSH keys.
+
+ :param key_file: Filename path of the SSH key file to use.
+
+ :param pkey: SSH key object to use.
+
+ :param passphrase: Passphrase to use for encrypted key; password will be used for key
+ decryption if not specified.
+
+ :param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
+ documentation for a description of the expected format.
+
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
+ :param allow_agent: Enable use of SSH key-agent.
+
+ :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
+ means unknown SSH host keys will be accepted).
+
+ :param system_host_keys: Load host keys from the users known_hosts file.
+
+ :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in
+ alt_key_file.
+
+ :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
+
+ :param ssh_config_file: File name of OpenSSH configuration file.
+
+ :param conn_timeout: TCP connection timeout.
+
+ :param session_timeout: Set a timeout for parallel requests.
+
+ :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
+
+ :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
+ :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
+ Currently defaults to 0, for backwards compatibility (it will not attempt
+ to keep the connection alive).
+
+ :param default_enter: Character(s) to send to correspond to enter key (default:
+
+
).
+
:param response_return: Character(s) to use in normalized return data to represent
+ enter key (default:
+
+
)
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+ to select smallest of global and specific. Sets default global_delay_factor to .1
+ (default: True)
+
+ :param session_log: File path or BufferedIOBase subclass object to write the session log to.
+
+ :param session_log_record_writes: The session log generally only records channel reads due
+ to eliminate command duplication due to command echo. You can enable this if you
+ want to record both channel reads and channel writes in the log (default: False).
+
+ :param session_log_file_mode: "write" or "append" for session_log file mode
+ (default: "write")
+
+ :param allow_auto_change: Allow automatic configuration changes for terminal settings.
+ (default: False)
+
+ :param encoding: Encoding to be used when writing bytes to the output channel.
+ (default: ascii)
+
+ :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for
+ communication to the target host (default: None).
+
+ :param global_cmd_verify: Control whether command echo verification is enabled or disabled
+ (default: None). Global attribute takes precedence over function <code>cmd\_verify</code>
+ argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument.
+
+ :param auto_connect: Control whether Netmiko automatically establishes the connection as
+ part of the object creation (default: True).
+
+ :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
+ 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
+ eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
+
+
+
+Expand source code
+
+
class CasaCMTSBase(NoEnable, CiscoSSHConnection):
+ """
+ Casa CMTS support.
+
+ Implements methods for interacting with Casa CMTS platforms.
+ """
+
+ def disable_paging(
+ self,
+ command: str = "page-off",
+ delay_factor: Optional[float] = None,
+ cmd_verify: bool = True,
+ pattern: Optional[str] = None,
+ ) -> str:
+ """Disables paging."""
+ return super().disable_paging(
+ command=command,
+ delay_factor=delay_factor,
+ cmd_verify=cmd_verify,
+ pattern=pattern,
+ )
+
+ def config_mode(
+ self,
+ config_command: str = "config",
+ pattern: str = "",
+ re_flags: int = 0,
+ ) -> str:
+ """Enters configuration mode."""
+ return super().config_mode(
+ config_command=config_command,
+ pattern=pattern,
+ re_flags=re_flags,
+ )
+
+ def exit_config_mode(
+ self, exit_config: str = chr(26), pattern: str = r"#.*"
+ ) -> str:
+ """
+ Exits configuration mode.
+
+ Must use CTRL-Z (ASCII 26) to reliably exit from any
+ tier in the configuration hierarchy.
+
+ Since CTRL-Z is a non-printable character, we must temporarily disable
+ global_cmd_verify to prevent an exception trying to read the
+ echoed input.
+ """
+ if self.global_cmd_verify is not False and exit_config == chr(26):
+ global_cmd_verify_tmp = self.global_cmd_verify
+ self.global_cmd_verify = False
+ output = super().exit_config_mode(exit_config, pattern)
+ self.global_cmd_verify = global_cmd_verify_tmp
+ else:
+ output = super().exit_config_mode(exit_config, pattern)
+ return output
Initialize attributes for establishing connection to target device.
+
+ :param ip: IP address of target device. Not required if <code>host</code> is
+ provided.
+
+ :param host: Hostname of target device. Not required if <code>ip</code> is
+ provided.
+
+ :param username: Username to authenticate against target device if
+ required.
+
+ :param password: Password to authenticate against target device if
+ required.
+
+ :param secret: The enable password if target device requires one.
+
+ :param port: The destination port used to connect to the target
+ device.
+
+ :param device_type: Class selection based on device type.
+
+ :param verbose: Enable additional messages to standard output.
+
+ :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
+
+ :param use_keys: Connect to target device using SSH keys.
+
+ :param key_file: Filename path of the SSH key file to use.
+
+ :param pkey: SSH key object to use.
+
+ :param passphrase: Passphrase to use for encrypted key; password will be used for key
+ decryption if not specified.
+
+ :param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
+ documentation for a description of the expected format.
+
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
+ :param allow_agent: Enable use of SSH key-agent.
+
+ :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
+ means unknown SSH host keys will be accepted).
+
+ :param system_host_keys: Load host keys from the users known_hosts file.
+
+ :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in
+ alt_key_file.
+
+ :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
+
+ :param ssh_config_file: File name of OpenSSH configuration file.
+
+ :param conn_timeout: TCP connection timeout.
+
+ :param session_timeout: Set a timeout for parallel requests.
+
+ :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
+
+ :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
+ :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
+ Currently defaults to 0, for backwards compatibility (it will not attempt
+ to keep the connection alive).
+
+ :param default_enter: Character(s) to send to correspond to enter key (default:
+
+
).
+
:param response_return: Character(s) to use in normalized return data to represent
+ enter key (default:
+
+
)
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+ to select smallest of global and specific. Sets default global_delay_factor to .1
+ (default: True)
+
+ :param session_log: File path or BufferedIOBase subclass object to write the session log to.
+
+ :param session_log_record_writes: The session log generally only records channel reads due
+ to eliminate command duplication due to command echo. You can enable this if you
+ want to record both channel reads and channel writes in the log (default: False).
+
+ :param session_log_file_mode: "write" or "append" for session_log file mode
+ (default: "write")
+
+ :param allow_auto_change: Allow automatic configuration changes for terminal settings.
+ (default: False)
+
+ :param encoding: Encoding to be used when writing bytes to the output channel.
+ (default: ascii)
+
+ :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for
+ communication to the target host (default: None).
+
+ :param global_cmd_verify: Control whether command echo verification is enabled or disabled
+ (default: None). Global attribute takes precedence over function <code>cmd\_verify</code>
+ argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument.
+
+ :param auto_connect: Control whether Netmiko automatically establishes the connection as
+ part of the object creation (default: True).
+
+ :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
+ 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
+ eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
+
+
+
+Expand source code
+
+
class CasaCMTSSSH(CasaCMTSBase):
+ """Casa CMTS SSH Driver."""
+
+ pass
Implement methods for interacting with CROS network devices.
@@ -198,6 +198,9 @@
Classes
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -212,7 +215,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -220,6 +223,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -231,7 +238,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -263,6 +272,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
Implement methods for interacting with CROS network devices.
@@ -90,6 +90,9 @@
Classes
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -104,7 +107,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -112,6 +115,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -123,7 +130,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -155,6 +164,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -123,7 +126,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -131,6 +134,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -142,7 +149,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -174,6 +183,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -345,7 +360,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -353,6 +368,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -364,7 +383,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -396,6 +417,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -517,7 +544,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -525,6 +552,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -536,7 +567,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -568,6 +601,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -104,7 +107,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -112,6 +115,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -123,7 +130,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -155,6 +164,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -276,7 +291,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -284,6 +299,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -295,7 +314,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -327,6 +348,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
Implements methods for communicating with Check Point Gaia
@@ -105,6 +105,9 @@
Classes
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -119,7 +122,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -127,6 +130,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -138,7 +145,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -170,6 +179,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
Implements methods for communicating with Check Point Gaia
@@ -91,6 +91,9 @@
Classes
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -105,7 +108,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -113,6 +116,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -124,7 +131,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -156,6 +165,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -295,7 +317,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -303,6 +325,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -314,7 +340,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -346,6 +374,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -358,14 +389,33 @@
Classes
Implements methods for interacting Ciena Saos devices.
"""
+ prompt_pattern = r"[>#$]"
+
+ def set_base_prompt(
+ self,
+ pri_prompt_terminator: str = "",
+ alt_prompt_terminator: str = "",
+ delay_factor: float = 1.0,
+ pattern: Optional[str] = None,
+ ) -> str:
+ """Ciena can use '>', '$', '#' for prompt terminator depending on the device."""
+ prompt = self.find_prompt(delay_factor=delay_factor)
+
+ pattern = rf"^.+{self.prompt_pattern}$"
+ if re.search(pattern, prompt):
+ raise ValueError(f"Router prompt not found: {repr(prompt)}")
+ # Strip off trailing terminator
+ self.base_prompt = prompt[:-1]
+ return self.base_prompt
+
def session_preparation(self) -> None:
- self._test_channel_read(pattern=r"[>#]")
+ self._test_channel_read(pattern=self.prompt_pattern)
self.set_base_prompt()
self.disable_paging(command="system shell session set more off")
def _enter_shell(self) -> str:
"""Enter the Bourne Shell."""
- output = self._send_command_str("diag shell", expect_string=r"[$#>]")
+ output = self._send_command_str("diag shell", expect_string=self.prompt_pattern)
if "SHELL PARSER FAILURE" in output:
msg = "SCP support on Ciena SAOS requires 'diag shell' permissions"
raise ValueError(msg)
@@ -397,6 +447,13 @@
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -770,7 +856,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -778,6 +864,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -789,7 +879,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -821,6 +913,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -943,7 +1041,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -951,6 +1049,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -962,7 +1064,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -994,6 +1098,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -352,7 +355,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -360,6 +363,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -371,7 +378,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -403,6 +412,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -525,7 +540,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -533,6 +548,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -544,7 +563,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -576,6 +597,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -316,7 +324,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -324,6 +332,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -335,7 +347,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -367,6 +381,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -119,7 +122,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -127,6 +130,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -138,7 +145,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -170,6 +179,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -385,7 +388,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -393,6 +396,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -404,7 +411,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -436,6 +445,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -728,7 +766,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -736,6 +774,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -747,7 +789,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -779,6 +823,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -901,7 +951,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -909,6 +959,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -920,7 +974,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -952,6 +1008,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -1074,7 +1136,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -1082,6 +1144,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -1093,7 +1159,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -1125,6 +1193,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -442,7 +445,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -450,6 +453,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -461,7 +468,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -493,6 +502,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
This connection class writes for low cost switches SG200 series, in which there is no command:
+
ip ssh password-auth
+
Consequently, Netmiko must handle the SSH authentication itself.
+
Initialize attributes for establishing connection to target device.
+
+ :param ip: IP address of target device. Not required if <code>host</code> is
+ provided.
+
+ :param host: Hostname of target device. Not required if <code>ip</code> is
+ provided.
+
+ :param username: Username to authenticate against target device if
+ required.
+
+ :param password: Password to authenticate against target device if
+ required.
+
+ :param secret: The enable password if target device requires one.
+
+ :param port: The destination port used to connect to the target
+ device.
+
+ :param device_type: Class selection based on device type.
+
+ :param verbose: Enable additional messages to standard output.
+
+ :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
+
+ :param use_keys: Connect to target device using SSH keys.
+
+ :param key_file: Filename path of the SSH key file to use.
+
+ :param pkey: SSH key object to use.
+
+ :param passphrase: Passphrase to use for encrypted key; password will be used for key
+ decryption if not specified.
+
+ :param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
+ documentation for a description of the expected format.
+
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
+ :param allow_agent: Enable use of SSH key-agent.
+
+ :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
+ means unknown SSH host keys will be accepted).
+
+ :param system_host_keys: Load host keys from the users known_hosts file.
+
+ :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in
+ alt_key_file.
+
+ :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
+
+ :param ssh_config_file: File name of OpenSSH configuration file.
+
+ :param conn_timeout: TCP connection timeout.
+
+ :param session_timeout: Set a timeout for parallel requests.
+
+ :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
+
+ :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
+ :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
+ Currently defaults to 0, for backwards compatibility (it will not attempt
+ to keep the connection alive).
+
+ :param default_enter: Character(s) to send to correspond to enter key (default:
+
+
).
+
:param response_return: Character(s) to use in normalized return data to represent
+ enter key (default:
+
+
)
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+ to select smallest of global and specific. Sets default global_delay_factor to .1
+ (default: True)
+
+ :param session_log: File path or BufferedIOBase subclass object to write the session log to.
+
+ :param session_log_record_writes: The session log generally only records channel reads due
+ to eliminate command duplication due to command echo. You can enable this if you
+ want to record both channel reads and channel writes in the log (default: False).
+
+ :param session_log_file_mode: "write" or "append" for session_log file mode
+ (default: "write")
+
+ :param allow_auto_change: Allow automatic configuration changes for terminal settings.
+ (default: False)
+
+ :param encoding: Encoding to be used when writing bytes to the output channel.
+ (default: ascii)
+
+ :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for
+ communication to the target host (default: None).
+
+ :param global_cmd_verify: Control whether command echo verification is enabled or disabled
+ (default: None). Global attribute takes precedence over function <code>cmd\_verify</code>
+ argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument.
+
+ :param auto_connect: Control whether Netmiko automatically establishes the connection as
+ part of the object creation (default: True).
+
+ :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
+ 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
+ eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
+
+
+
+Expand source code
+
+
class CiscoS200Base(CiscoSSHConnection):
+ """
+ Support for Cisco SG200 series of devices.
+
+ This connection class writes for low cost switches SG200 series, in which there is no command:
+
+ ip ssh password-auth
+
+ Consequently, Netmiko must handle the SSH authentication itself.
+ """
+
+ prompt_pattern = r"(?m:[>#]\s*$)" # force re.Multiline
+
+ def _build_ssh_client(self) -> SSHClient:
+ """Allow passwordless authentication for Cisco SG200 devices being provisioned."""
+
+ # Create instance of SSHClient object. Use noauth
+ remote_conn_pre = SSHClient_noauth()
+
+ # Load host_keys for better SSH security
+ if self.system_host_keys:
+ remote_conn_pre.load_system_host_keys()
+ if self.alt_host_keys and path.isfile(self.alt_key_file):
+ remote_conn_pre.load_host_keys(self.alt_key_file)
+
+ # Default is to automatically add untrusted hosts (make sure appropriate for your env)
+ remote_conn_pre.set_missing_host_key_policy(self.key_policy)
+ return remote_conn_pre
+
+ def special_login_handler(self, delay_factor: float = 1.0) -> None:
+ """Cisco SG2xx presents with the following on login
+
+ login as: user
+
+ Welcome to Layer 2 Managed Switch
+
+ Username: user
+ Password:****
+ """
+ output = ""
+ uname = "Username:"
+ login = "login as"
+ password = "ssword"
+ pattern = rf"(?:{uname}|{login}|{password}|{self.prompt_pattern})"
+
+ while True:
+ new_data = self.read_until_pattern(pattern=pattern, read_timeout=25.0)
+ output += new_data
+
+ # Fully logged-in, switch prompt detected.
+ if re.search(self.prompt_pattern, new_data):
+ return
+
+ if uname in new_data or login in new_data:
+ assert isinstance(self.username, str)
+ self.write_channel(self.username + self.RETURN)
+ elif password in new_data:
+ assert isinstance(self.password, str)
+ self.write_channel(self.password + self.RETURN)
+ else:
+ msg = f"""
+Failed to login to Cisco SG2xx.
+
+Pattern not detected: {pattern}
+output:
+
+{output}
+
+"""
+ raise NetmikoAuthenticationException(msg)
+
+ def session_preparation(self) -> None:
+ """Prepare the session after the connection has been established."""
+ self.ansi_escape_codes = True
+ self._test_channel_read(pattern=r"[>#]")
+ self.set_base_prompt()
+ self.disable_paging(command="terminal length 0")
+
+ def save_config(
+ self,
+ cmd: str = "write memory",
+ confirm: bool = True,
+ confirm_response: str = "Y",
+ ) -> str:
+ return super().save_config(
+ cmd=cmd, confirm=confirm, confirm_response=confirm_response
+ )
This connection class writes for low cost switches SG200 series, in which there is no command:
+
ip ssh password-auth
+
Consequently, Netmiko must handle the SSH authentication itself.
+
Initialize attributes for establishing connection to target device.
+
+ :param ip: IP address of target device. Not required if <code>host</code> is
+ provided.
+
+ :param host: Hostname of target device. Not required if <code>ip</code> is
+ provided.
+
+ :param username: Username to authenticate against target device if
+ required.
+
+ :param password: Password to authenticate against target device if
+ required.
+
+ :param secret: The enable password if target device requires one.
+
+ :param port: The destination port used to connect to the target
+ device.
+
+ :param device_type: Class selection based on device type.
+
+ :param verbose: Enable additional messages to standard output.
+
+ :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
+
+ :param use_keys: Connect to target device using SSH keys.
+
+ :param key_file: Filename path of the SSH key file to use.
+
+ :param pkey: SSH key object to use.
+
+ :param passphrase: Passphrase to use for encrypted key; password will be used for key
+ decryption if not specified.
+
+ :param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
+ documentation for a description of the expected format.
+
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
+ :param allow_agent: Enable use of SSH key-agent.
+
+ :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
+ means unknown SSH host keys will be accepted).
+
+ :param system_host_keys: Load host keys from the users known_hosts file.
+
+ :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in
+ alt_key_file.
+
+ :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
+
+ :param ssh_config_file: File name of OpenSSH configuration file.
+
+ :param conn_timeout: TCP connection timeout.
+
+ :param session_timeout: Set a timeout for parallel requests.
+
+ :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
+
+ :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
+ :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
+ Currently defaults to 0, for backwards compatibility (it will not attempt
+ to keep the connection alive).
+
+ :param default_enter: Character(s) to send to correspond to enter key (default:
+
+
).
+
:param response_return: Character(s) to use in normalized return data to represent
+ enter key (default:
+
+
)
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+ to select smallest of global and specific. Sets default global_delay_factor to .1
+ (default: True)
+
+ :param session_log: File path or BufferedIOBase subclass object to write the session log to.
+
+ :param session_log_record_writes: The session log generally only records channel reads due
+ to eliminate command duplication due to command echo. You can enable this if you
+ want to record both channel reads and channel writes in the log (default: False).
+
+ :param session_log_file_mode: "write" or "append" for session_log file mode
+ (default: "write")
+
+ :param allow_auto_change: Allow automatic configuration changes for terminal settings.
+ (default: False)
+
+ :param encoding: Encoding to be used when writing bytes to the output channel.
+ (default: ascii)
+
+ :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for
+ communication to the target host (default: None).
+
+ :param global_cmd_verify: Control whether command echo verification is enabled or disabled
+ (default: None). Global attribute takes precedence over function <code>cmd\_verify</code>
+ argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument.
+
+ :param auto_connect: Control whether Netmiko automatically establishes the connection as
+ part of the object creation (default: True).
+
+ :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
+ 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
+ eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
+
This connection class writes for low cost switches SG200 series, in which there is no command:
+
ip ssh password-auth
+
Consequently, Netmiko must handle the SSH authentication itself.
+
Initialize attributes for establishing connection to target device.
+
+ :param ip: IP address of target device. Not required if <code>host</code> is
+ provided.
+
+ :param host: Hostname of target device. Not required if <code>ip</code> is
+ provided.
+
+ :param username: Username to authenticate against target device if
+ required.
+
+ :param password: Password to authenticate against target device if
+ required.
+
+ :param secret: The enable password if target device requires one.
+
+ :param port: The destination port used to connect to the target
+ device.
+
+ :param device_type: Class selection based on device type.
+
+ :param verbose: Enable additional messages to standard output.
+
+ :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
+
+ :param use_keys: Connect to target device using SSH keys.
+
+ :param key_file: Filename path of the SSH key file to use.
+
+ :param pkey: SSH key object to use.
+
+ :param passphrase: Passphrase to use for encrypted key; password will be used for key
+ decryption if not specified.
+
+ :param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
+ documentation for a description of the expected format.
+
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
+ :param allow_agent: Enable use of SSH key-agent.
+
+ :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
+ means unknown SSH host keys will be accepted).
+
+ :param system_host_keys: Load host keys from the users known_hosts file.
+
+ :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in
+ alt_key_file.
+
+ :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
+
+ :param ssh_config_file: File name of OpenSSH configuration file.
+
+ :param conn_timeout: TCP connection timeout.
+
+ :param session_timeout: Set a timeout for parallel requests.
+
+ :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
+
+ :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
+ :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
+ Currently defaults to 0, for backwards compatibility (it will not attempt
+ to keep the connection alive).
+
+ :param default_enter: Character(s) to send to correspond to enter key (default:
+
+
).
+
:param response_return: Character(s) to use in normalized return data to represent
+ enter key (default:
+
+
)
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+ to select smallest of global and specific. Sets default global_delay_factor to .1
+ (default: True)
+
+ :param session_log: File path or BufferedIOBase subclass object to write the session log to.
+
+ :param session_log_record_writes: The session log generally only records channel reads due
+ to eliminate command duplication due to command echo. You can enable this if you
+ want to record both channel reads and channel writes in the log (default: False).
+
+ :param session_log_file_mode: "write" or "append" for session_log file mode
+ (default: "write")
+
+ :param allow_auto_change: Allow automatic configuration changes for terminal settings.
+ (default: False)
+
+ :param encoding: Encoding to be used when writing bytes to the output channel.
+ (default: ascii)
+
+ :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for
+ communication to the target host (default: None).
+
+ :param global_cmd_verify: Control whether command echo verification is enabled or disabled
+ (default: None). Global attribute takes precedence over function <code>cmd\_verify</code>
+ argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument.
+
+ :param auto_connect: Control whether Netmiko automatically establishes the connection as
+ part of the object creation (default: True).
+
+ :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
+ 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
+ eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
+
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -140,7 +143,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -148,6 +151,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -159,7 +166,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -191,6 +200,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -364,7 +379,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -372,6 +387,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -383,7 +402,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -415,6 +436,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
Support for Cisco SG300 series of devices, with telnet.
@@ -523,6 +547,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -537,7 +564,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -545,6 +572,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -556,7 +587,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -588,6 +621,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -190,7 +193,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -198,6 +201,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -209,7 +216,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -241,6 +250,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -177,7 +180,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -185,6 +188,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -196,7 +203,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -228,6 +237,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -353,7 +358,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -361,6 +366,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -372,7 +381,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -404,6 +415,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -354,7 +358,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -362,6 +366,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -373,7 +381,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -405,6 +415,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -551,6 +564,7 @@
Classes
strip_prompt=False,
strip_command=False,
read_timeout=read_timeout,
+ cmd_verify=False,
)
output += new_data
if error_marker in output:
@@ -558,7 +572,7 @@
Classes
if alt_error_marker in output:
# Other commits occurred, don't proceed with commit
output += self._send_command_timing_str(
- "no", strip_prompt=False, strip_command=False
+ "no", strip_prompt=False, strip_command=False, cmd_verify=False
)
raise ValueError(f"Commit failed with the following errors:\n\n{output}")
@@ -778,6 +792,7 @@
Methods
strip_prompt=False,
strip_command=False,
read_timeout=read_timeout,
+ cmd_verify=False,
)
output += new_data
if error_marker in output:
@@ -785,7 +800,7 @@
Methods
if alt_error_marker in output:
# Other commits occurred, don't proceed with commit
output += self._send_command_timing_str(
- "no", strip_prompt=False, strip_command=False
+ "no", strip_prompt=False, strip_command=False, cmd_verify=False
)
raise ValueError(f"Commit failed with the following errors:\n\n{output}")
@@ -1115,7 +1130,7 @@
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -1170,7 +1188,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -1178,6 +1196,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -1189,7 +1211,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -1221,6 +1245,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -1343,7 +1373,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -1351,6 +1381,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -1362,7 +1396,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -1394,6 +1430,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -219,7 +230,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -227,6 +238,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -238,7 +253,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -270,6 +287,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -763,7 +791,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -771,6 +799,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -782,7 +814,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -814,6 +848,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -996,7 +1036,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -1004,6 +1044,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -1015,7 +1059,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -1047,6 +1093,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -1339,7 +1414,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -1347,6 +1422,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -1358,7 +1437,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -1390,6 +1471,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -1512,7 +1599,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -1520,6 +1607,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -1531,7 +1622,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -1563,6 +1656,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -1685,7 +1784,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -1693,6 +1792,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -1704,7 +1807,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -1736,6 +1841,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -2027,7 +2138,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -2035,6 +2146,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -2046,7 +2161,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -2078,6 +2195,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
This connection class writes for low cost switches SG200 series, in which there is no command:
+
ip ssh password-auth
+
Consequently, Netmiko must handle the SSH authentication itself.
+
Initialize attributes for establishing connection to target device.
+
+ :param ip: IP address of target device. Not required if <code>host</code> is
+ provided.
+
+ :param host: Hostname of target device. Not required if <code>ip</code> is
+ provided.
+
+ :param username: Username to authenticate against target device if
+ required.
+
+ :param password: Password to authenticate against target device if
+ required.
+
+ :param secret: The enable password if target device requires one.
+
+ :param port: The destination port used to connect to the target
+ device.
+
+ :param device_type: Class selection based on device type.
+
+ :param verbose: Enable additional messages to standard output.
+
+ :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
+
+ :param use_keys: Connect to target device using SSH keys.
+
+ :param key_file: Filename path of the SSH key file to use.
+
+ :param pkey: SSH key object to use.
+
+ :param passphrase: Passphrase to use for encrypted key; password will be used for key
+ decryption if not specified.
+
+ :param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
+ documentation for a description of the expected format.
+
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
+ :param allow_agent: Enable use of SSH key-agent.
+
+ :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
+ means unknown SSH host keys will be accepted).
+
+ :param system_host_keys: Load host keys from the users known_hosts file.
+
+ :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in
+ alt_key_file.
+
+ :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
+
+ :param ssh_config_file: File name of OpenSSH configuration file.
+
+ :param conn_timeout: TCP connection timeout.
+
+ :param session_timeout: Set a timeout for parallel requests.
+
+ :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
+
+ :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
+ :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
+ Currently defaults to 0, for backwards compatibility (it will not attempt
+ to keep the connection alive).
+
+ :param default_enter: Character(s) to send to correspond to enter key (default:
+
+
).
+
:param response_return: Character(s) to use in normalized return data to represent
+ enter key (default:
+
+
)
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+ to select smallest of global and specific. Sets default global_delay_factor to .1
+ (default: True)
+
+ :param session_log: File path or BufferedIOBase subclass object to write the session log to.
+
+ :param session_log_record_writes: The session log generally only records channel reads due
+ to eliminate command duplication due to command echo. You can enable this if you
+ want to record both channel reads and channel writes in the log (default: False).
+
+ :param session_log_file_mode: "write" or "append" for session_log file mode
+ (default: "write")
+
+ :param allow_auto_change: Allow automatic configuration changes for terminal settings.
+ (default: False)
+
+ :param encoding: Encoding to be used when writing bytes to the output channel.
+ (default: ascii)
+
+ :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for
+ communication to the target host (default: None).
+
+ :param global_cmd_verify: Control whether command echo verification is enabled or disabled
+ (default: None). Global attribute takes precedence over function <code>cmd\_verify</code>
+ argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument.
+
+ :param auto_connect: Control whether Netmiko automatically establishes the connection as
+ part of the object creation (default: True).
+
+ :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
+ 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
+ eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
+
This connection class writes for low cost switches SG200 series, in which there is no command:
+
ip ssh password-auth
+
Consequently, Netmiko must handle the SSH authentication itself.
+
Initialize attributes for establishing connection to target device.
+
+ :param ip: IP address of target device. Not required if <code>host</code> is
+ provided.
+
+ :param host: Hostname of target device. Not required if <code>ip</code> is
+ provided.
+
+ :param username: Username to authenticate against target device if
+ required.
+
+ :param password: Password to authenticate against target device if
+ required.
+
+ :param secret: The enable password if target device requires one.
+
+ :param port: The destination port used to connect to the target
+ device.
+
+ :param device_type: Class selection based on device type.
+
+ :param verbose: Enable additional messages to standard output.
+
+ :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
+
+ :param use_keys: Connect to target device using SSH keys.
+
+ :param key_file: Filename path of the SSH key file to use.
+
+ :param pkey: SSH key object to use.
+
+ :param passphrase: Passphrase to use for encrypted key; password will be used for key
+ decryption if not specified.
+
+ :param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
+ documentation for a description of the expected format.
+
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
+ :param allow_agent: Enable use of SSH key-agent.
+
+ :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
+ means unknown SSH host keys will be accepted).
+
+ :param system_host_keys: Load host keys from the users known_hosts file.
+
+ :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in
+ alt_key_file.
+
+ :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
+
+ :param ssh_config_file: File name of OpenSSH configuration file.
+
+ :param conn_timeout: TCP connection timeout.
+
+ :param session_timeout: Set a timeout for parallel requests.
+
+ :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
+
+ :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
+ :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
+ Currently defaults to 0, for backwards compatibility (it will not attempt
+ to keep the connection alive).
+
+ :param default_enter: Character(s) to send to correspond to enter key (default:
+
+
).
+
:param response_return: Character(s) to use in normalized return data to represent
+ enter key (default:
+
+
)
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+ to select smallest of global and specific. Sets default global_delay_factor to .1
+ (default: True)
+
+ :param session_log: File path or BufferedIOBase subclass object to write the session log to.
+
+ :param session_log_record_writes: The session log generally only records channel reads due
+ to eliminate command duplication due to command echo. You can enable this if you
+ want to record both channel reads and channel writes in the log (default: False).
+
+ :param session_log_file_mode: "write" or "append" for session_log file mode
+ (default: "write")
+
+ :param allow_auto_change: Allow automatic configuration changes for terminal settings.
+ (default: False)
+
+ :param encoding: Encoding to be used when writing bytes to the output channel.
+ (default: ascii)
+
+ :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for
+ communication to the target host (default: None).
+
+ :param global_cmd_verify: Control whether command echo verification is enabled or disabled
+ (default: None). Global attribute takes precedence over function <code>cmd\_verify</code>
+ argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument.
+
+ :param auto_connect: Control whether Netmiko automatically establishes the connection as
+ part of the object creation (default: True).
+
+ :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
+ 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
+ eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
+
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -2317,7 +2796,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -2325,6 +2804,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -2336,7 +2819,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -2368,6 +2853,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
Support for Cisco SG300 series of devices, with telnet.
@@ -2476,6 +2964,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -2490,7 +2981,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -2498,6 +2989,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -2509,7 +3004,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -2541,6 +3038,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -2653,6 +3153,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -2667,7 +3170,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -2675,6 +3178,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -2686,7 +3193,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -2718,6 +3227,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -3055,7 +3570,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -3063,6 +3578,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -3074,7 +3593,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -3106,6 +3627,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -3387,7 +3899,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -3395,6 +3907,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -3406,7 +3922,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -3438,6 +3956,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -4228,7 +4756,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -4236,6 +4764,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -4247,7 +4779,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -4279,6 +4813,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -4401,7 +4941,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -4409,6 +4949,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -4420,7 +4964,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -4452,6 +4998,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -363,7 +369,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -371,6 +377,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -382,7 +392,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -414,6 +426,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
Checks if the device is in configuration mode or not.
-
Cisco IOS devices abbreviate the prompt at 20 chars in config mode
+
Checks if the device is in configuration mode or not.
Expand source code
@@ -710,12 +728,10 @@
Methods
def check_config_mode(
self, check_string: str = ")#", pattern: str = "", force_regex: bool = False
) -> bool:
- """
- Checks if the device is in configuration mode or not.
-
- Cisco IOS devices abbreviate the prompt at 20 chars in config mode
- """
- return super().check_config_mode(check_string=check_string, pattern=pattern)
+ """Checks if the device is in configuration mode or not."""
+ return super().check_config_mode(
+ check_string=check_string, pattern=pattern, force_regex=force_regex
+ )
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -1151,7 +1175,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -1159,6 +1183,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -1170,7 +1198,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -1202,6 +1232,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -104,7 +107,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -112,6 +115,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -123,7 +130,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -155,6 +164,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -140,7 +143,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -148,6 +151,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -159,7 +166,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -191,6 +200,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -145,7 +148,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -153,6 +156,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -164,7 +171,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -196,6 +205,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -109,7 +112,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -117,6 +120,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -128,7 +135,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -160,6 +169,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -131,7 +134,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -139,6 +142,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -150,7 +157,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -182,6 +191,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -111,7 +114,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -119,6 +122,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -130,7 +137,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -162,6 +171,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -127,7 +130,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -135,6 +138,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -146,7 +153,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -178,6 +187,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -344,7 +359,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -352,6 +367,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -363,7 +382,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -395,6 +416,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -516,7 +543,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -524,6 +551,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -535,7 +566,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -567,6 +600,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -112,7 +135,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -120,6 +143,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -131,7 +158,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -163,6 +192,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
Prepare the session after the connection has been established.
+
+
+Expand source code
+
+
def session_preparation(self) -> None:
+ """Prepare the session after the connection has been established."""
+ self._test_channel_read(pattern=r"[>#]")
+ self.set_base_prompt()
+ self.set_terminal_width()
+ self.disable_paging()
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -199,7 +208,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -207,6 +216,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -218,7 +231,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -250,6 +265,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -385,7 +408,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -393,6 +416,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -404,7 +431,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -436,6 +465,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -444,6 +476,26 @@
Inherited members
class DellOS10SSH(CiscoSSHConnection):
"""Dell EMC Networking OS10 Driver - supports dellos10."""
+ def session_preparation(self) -> None:
+ """Prepare the session after the connection has been established."""
+ self._test_channel_read(pattern=r"[>#]")
+ self.set_base_prompt()
+ self.set_terminal_width()
+ self.disable_paging()
+
+ def check_config_mode(
+ self,
+ check_string: str = ")#",
+ pattern: str = r"[>#]",
+ force_regex: bool = False,
+ ) -> bool:
+ """
+ Checks if the device is in configuration mode or not.
+ """
+ return super().check_config_mode(
+ check_string=check_string, pattern=pattern, force_regex=force_regex
+ )
+
def save_config(
self,
cmd: str = "copy running-configuration startup-configuration",
@@ -484,6 +536,23 @@
Methods
)
+
+def session_preparation(self) ‑> None
+
+
+
Prepare the session after the connection has been established.
+
+
+Expand source code
+
+
def session_preparation(self) -> None:
+ """Prepare the session after the connection has been established."""
+ self._test_channel_read(pattern=r"[>#]")
+ self.set_base_prompt()
+ self.set_terminal_width()
+ self.disable_paging()
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -213,7 +216,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -221,6 +224,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -232,7 +239,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -264,6 +273,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -498,7 +513,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -506,6 +521,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -517,7 +536,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -549,6 +570,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -766,7 +793,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -774,6 +801,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -785,7 +816,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -817,6 +850,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
Dell EMC PowerSwitch platforms running Enterprise SONiC Distribution
@@ -124,6 +124,9 @@
Classes
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -138,7 +141,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -146,6 +149,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -157,7 +164,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -189,6 +198,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -142,7 +145,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -150,6 +153,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -161,7 +168,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -193,6 +202,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -314,7 +329,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -322,6 +337,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -333,7 +352,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -365,6 +386,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -486,7 +513,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -494,6 +521,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -505,7 +536,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -537,6 +570,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
Prepare the session after the connection has been established.
+
+
+Expand source code
+
+
def session_preparation(self) -> None:
+ """Prepare the session after the connection has been established."""
+ self._test_channel_read(pattern=r"[>#]")
+ self.set_base_prompt()
+ self.set_terminal_width()
+ self.disable_paging()
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -692,7 +767,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -700,6 +775,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -711,7 +790,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -743,6 +824,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -1240,7 +1333,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -1248,6 +1341,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -1259,7 +1356,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -1291,6 +1390,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -1299,6 +1401,26 @@
Inherited members
class DellOS10SSH(CiscoSSHConnection):
"""Dell EMC Networking OS10 Driver - supports dellos10."""
+ def session_preparation(self) -> None:
+ """Prepare the session after the connection has been established."""
+ self._test_channel_read(pattern=r"[>#]")
+ self.set_base_prompt()
+ self.set_terminal_width()
+ self.disable_paging()
+
+ def check_config_mode(
+ self,
+ check_string: str = ")#",
+ pattern: str = r"[>#]",
+ force_regex: bool = False,
+ ) -> bool:
+ """
+ Checks if the device is in configuration mode or not.
+ """
+ return super().check_config_mode(
+ check_string=check_string, pattern=pattern, force_regex=force_regex
+ )
+
def save_config(
self,
cmd: str = "copy running-configuration startup-configuration",
@@ -1339,6 +1461,23 @@
Methods
)
+
+def session_preparation(self) ‑> None
+
+
+
Prepare the session after the connection has been established.
+
+
+Expand source code
+
+
def session_preparation(self) -> None:
+ """Prepare the session after the connection has been established."""
+ self._test_channel_read(pattern=r"[>#]")
+ self.set_base_prompt()
+ self.set_terminal_width()
+ self.disable_paging()
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -1447,7 +1588,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -1455,6 +1596,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -1466,7 +1611,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -1498,6 +1645,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -1715,7 +1868,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -1723,6 +1876,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -1734,7 +1891,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -1766,6 +1925,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
Dell EMC PowerSwitch platforms running Enterprise SONiC Distribution
@@ -1875,6 +2037,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -1889,7 +2054,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -1897,6 +2062,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -1908,7 +2077,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -1940,6 +2111,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
Supports D-Link DGS/DES device series (there are some DGS/DES devices that are web-only)
@@ -119,6 +119,9 @@
Classes
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -133,7 +136,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -141,6 +144,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -152,7 +159,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -184,6 +193,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
Supports D-Link DGS/DES device series (there are some DGS/DES devices that are web-only)
@@ -367,6 +379,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -381,7 +396,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -389,6 +404,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -400,7 +419,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -432,6 +453,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -541,6 +565,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -555,7 +582,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -563,6 +590,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -574,7 +605,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -606,6 +639,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
Supports D-Link DGS/DES device series (there are some DGS/DES devices that are web-only)
@@ -90,6 +90,9 @@
Classes
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -104,7 +107,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -112,6 +115,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -123,7 +130,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -155,6 +164,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -264,6 +276,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -278,7 +293,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -286,6 +301,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -297,7 +316,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -329,6 +350,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -228,7 +231,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -236,6 +239,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -247,7 +254,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -279,6 +288,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -109,7 +112,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -117,6 +120,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -128,7 +135,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -160,6 +169,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -109,7 +112,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -117,6 +120,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -128,7 +135,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -160,6 +169,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -525,7 +540,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -533,6 +548,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -544,7 +563,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -576,6 +597,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -155,7 +163,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -163,6 +171,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -174,7 +186,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -206,6 +220,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -104,7 +107,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -112,6 +115,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -123,7 +130,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -155,6 +164,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -112,7 +115,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -120,6 +123,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -131,7 +138,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -163,6 +172,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -104,7 +107,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -112,6 +115,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -123,7 +130,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -155,6 +164,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -244,7 +252,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -252,6 +260,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -263,7 +275,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -295,6 +309,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -105,7 +113,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -113,6 +121,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -124,7 +136,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -156,6 +170,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
Netmiko support for Extreme Ethernet Routing Switch.
@@ -153,6 +162,9 @@
Classes
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -167,7 +179,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -175,6 +187,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -186,7 +202,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -218,6 +236,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -314,7 +317,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -322,6 +325,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -333,7 +340,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -365,6 +374,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -838,7 +853,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -846,6 +861,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -857,7 +876,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -889,6 +910,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -998,6 +1022,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -1012,7 +1039,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -1020,6 +1047,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -1031,7 +1062,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -1063,6 +1096,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -127,7 +130,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -135,6 +138,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -146,7 +153,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -178,6 +187,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -358,7 +373,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -366,6 +381,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -377,7 +396,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -409,6 +430,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -516,6 +540,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -530,7 +557,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -538,6 +565,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -549,7 +580,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -581,6 +614,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -126,7 +129,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -134,6 +137,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -145,7 +152,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -177,6 +186,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -126,7 +129,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -134,6 +137,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -145,7 +152,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -177,6 +186,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -126,7 +129,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -134,6 +137,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -145,7 +152,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -177,6 +186,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -118,7 +121,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -126,6 +129,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -137,7 +144,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -169,6 +178,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -106,7 +109,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -114,6 +117,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -125,7 +132,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -157,6 +166,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
Netmiko support for Extreme Ethernet Routing Switch.
@@ -139,6 +139,9 @@
Classes
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -153,7 +156,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -161,6 +164,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -172,7 +179,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -204,6 +213,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -673,7 +704,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -681,6 +712,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -692,7 +727,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -724,6 +761,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -833,6 +873,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -847,7 +890,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -855,6 +898,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -866,7 +913,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -898,6 +947,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -1023,7 +1078,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -1031,6 +1086,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -1042,7 +1101,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -1074,6 +1135,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -1181,6 +1245,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -1195,7 +1262,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -1203,6 +1270,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -1214,7 +1285,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -1246,6 +1319,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -1370,7 +1449,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -1378,6 +1457,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -1389,7 +1472,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -1421,6 +1506,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -1603,7 +1694,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -1611,6 +1702,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -1622,7 +1717,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -1654,6 +1751,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -1836,7 +1939,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -1844,6 +1947,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -1855,7 +1962,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -1887,6 +1996,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -2069,7 +2184,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -2077,6 +2192,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -2088,7 +2207,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -2120,6 +2241,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -2295,7 +2422,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -2303,6 +2430,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -2314,7 +2445,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -2346,6 +2479,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -99,7 +102,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -107,6 +110,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -118,7 +125,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -150,6 +159,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -137,7 +140,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -145,6 +148,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -156,7 +163,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -188,6 +197,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -109,7 +112,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -117,6 +120,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -128,7 +135,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -160,6 +169,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -286,7 +301,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -294,6 +309,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -305,7 +324,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -337,6 +358,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -306,7 +309,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -314,6 +317,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -325,7 +332,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -357,6 +366,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -111,7 +114,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -119,6 +122,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -130,7 +137,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -162,6 +171,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -203,7 +328,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -211,6 +336,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -222,7 +351,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -254,12 +385,17 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
Expand source code
-
class FortinetSSH(NoConfig, CiscoSSHConnection):
+
def cleanup(self, command: str = "exit") -> None:
"""Re-enable paging globally."""
- if self.allow_disable_global:
- # Return paging state
- output_mode_cmd = f"set output {self._output_mode}"
- enable_paging_commands = ["config system console", output_mode_cmd, "end"]
- if self.vdoms:
- enable_paging_commands.insert(0, "config global")
- # Should test output is valid
- for command in enable_paging_commands:
- self.send_command_timing(command)
+ output = ""
+ if self._original_output_mode == "more":
+ if self._vdoms:
+ output += self._config_global()
+ commands = [
+ "config system console",
+ "set output more",
+ "end",
+ ]
+ output += self.send_multiline(commands, expect_string=self.prompt_pattern)
+ if self._vdoms:
+ self._exit_config_global()
return super().cleanup(command=command)
@@ -405,41 +671,27 @@
Methods
pattern: Optional[str] = None,
) -> str:
"""Disable paging is only available with specific roles so it may fail."""
- check_command = "get system status | grep Virtual"
- output = self._send_command_timing_str(check_command)
- self.allow_disable_global = True
- self.vdoms = False
- self._output_mode = "more"
-
- if re.search(r"Virtual domain configuration: (multiple|enable)", output):
- self.vdoms = True
- vdom_additional_command = "config global"
- output = self._send_command_timing_str(vdom_additional_command, last_read=3)
- if "Command fail" in output:
- self.allow_disable_global = False
- if self.remote_conn is not None:
- self.remote_conn.close()
- self.establish_connection(width=100, height=1000)
-
- new_output = ""
- if self.allow_disable_global:
- self._retrieve_output_mode()
- disable_paging_commands = [
- "config system console",
- "set output standard",
- "end",
- ]
- # There is an extra 'end' required if in multi-vdoms are enabled
- if self.vdoms:
- disable_paging_commands.append("end")
- outputlist = [
- self._send_command_timing_str(command, last_read=3)
- for command in disable_paging_commands
- ]
- # Should test output is valid
- new_output = self.RETURN.join(outputlist)
- return output + new_output
+ output = ""
+ if self._output_mode == "standard":
+ # Do nothing - already correct.
+ return ""
+
+ if self._vdoms:
+ output += self._config_global()
+ disable_paging_commands = [
+ "config system console",
+ "set output standard",
+ "end",
+ ]
+ output += self.send_multiline(
+ disable_paging_commands, expect_string=self.prompt_pattern
+ )
+ self._output_mode = "standard"
+
+ if self._vdoms:
+ output += self._exit_config_global()
+ return output
@@ -470,14 +722,19 @@
Methods
def session_preparation(self) -> None:
"""Prepare the session after the connection has been established."""
- data = self._test_channel_read(pattern="to accept|[#$]")
+ data = self._test_channel_read(pattern=f"to accept|{self.prompt_pattern}")
# If "set post-login-banner enable" is set it will require you to press 'a'
# to accept the banner before you login. This will accept if it occurs
if "to accept" in data:
self.write_channel("a\r")
- self._test_channel_read(pattern=r"[#$]")
-
- self.set_base_prompt(alt_prompt_terminator="$")
+ self._test_channel_read(pattern=self.prompt_pattern)
+
+ self.set_base_prompt()
+ self._vdoms = self._vdoms_enabled()
+ self._os_version = self._determine_os_version()
+ # Retain how the 'output mode' was original configured.
+ self._original_output_mode = self._get_output_mode()
+ self._output_mode = self._original_output_mode
self.disable_paging()
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -109,7 +112,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -117,6 +120,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -128,7 +135,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -160,12 +169,17 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
Expand source code
-
class FortinetSSH(NoConfig, CiscoSSHConnection):
+
def cleanup(self, command: str = "exit") -> None:
"""Re-enable paging globally."""
- if self.allow_disable_global:
- # Return paging state
- output_mode_cmd = f"set output {self._output_mode}"
- enable_paging_commands = ["config system console", output_mode_cmd, "end"]
- if self.vdoms:
- enable_paging_commands.insert(0, "config global")
- # Should test output is valid
- for command in enable_paging_commands:
- self.send_command_timing(command)
+ output = ""
+ if self._original_output_mode == "more":
+ if self._vdoms:
+ output += self._config_global()
+ commands = [
+ "config system console",
+ "set output more",
+ "end",
+ ]
+ output += self.send_multiline(commands, expect_string=self.prompt_pattern)
+ if self._vdoms:
+ self._exit_config_global()
return super().cleanup(command=command)
@@ -311,41 +455,27 @@
Methods
pattern: Optional[str] = None,
) -> str:
"""Disable paging is only available with specific roles so it may fail."""
- check_command = "get system status | grep Virtual"
- output = self._send_command_timing_str(check_command)
- self.allow_disable_global = True
- self.vdoms = False
- self._output_mode = "more"
-
- if re.search(r"Virtual domain configuration: (multiple|enable)", output):
- self.vdoms = True
- vdom_additional_command = "config global"
- output = self._send_command_timing_str(vdom_additional_command, last_read=3)
- if "Command fail" in output:
- self.allow_disable_global = False
- if self.remote_conn is not None:
- self.remote_conn.close()
- self.establish_connection(width=100, height=1000)
-
- new_output = ""
- if self.allow_disable_global:
- self._retrieve_output_mode()
- disable_paging_commands = [
- "config system console",
- "set output standard",
- "end",
- ]
- # There is an extra 'end' required if in multi-vdoms are enabled
- if self.vdoms:
- disable_paging_commands.append("end")
- outputlist = [
- self._send_command_timing_str(command, last_read=3)
- for command in disable_paging_commands
- ]
- # Should test output is valid
- new_output = self.RETURN.join(outputlist)
- return output + new_output
+ output = ""
+ if self._output_mode == "standard":
+ # Do nothing - already correct.
+ return ""
+
+ if self._vdoms:
+ output += self._config_global()
+ disable_paging_commands = [
+ "config system console",
+ "set output standard",
+ "end",
+ ]
+ output += self.send_multiline(
+ disable_paging_commands, expect_string=self.prompt_pattern
+ )
+ self._output_mode = "standard"
+
+ if self._vdoms:
+ output += self._exit_config_global()
+ return output
@@ -376,14 +506,19 @@
Methods
def session_preparation(self) -> None:
"""Prepare the session after the connection has been established."""
- data = self._test_channel_read(pattern="to accept|[#$]")
+ data = self._test_channel_read(pattern=f"to accept|{self.prompt_pattern}")
# If "set post-login-banner enable" is set it will require you to press 'a'
# to accept the banner before you login. This will accept if it occurs
if "to accept" in data:
self.write_channel("a\r")
- self._test_channel_read(pattern=r"[#$]")
-
- self.set_base_prompt(alt_prompt_terminator="$")
+ self._test_channel_read(pattern=self.prompt_pattern)
+
+ self.set_base_prompt()
+ self._vdoms = self._vdoms_enabled()
+ self._os_version = self._determine_os_version()
+ # Retain how the 'output mode' was original configured.
+ self._original_output_mode = self._get_output_mode()
+ self._output_mode = self._original_output_mode
self.disable_paging()
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.
+
Initialize attributes for establishing connection to target device.
+
+ :param ip: IP address of target device. Not required if <code>host</code> is
+ provided.
+
+ :param host: Hostname of target device. Not required if <code>ip</code> is
+ provided.
+
+ :param username: Username to authenticate against target device if
+ required.
+
+ :param password: Password to authenticate against target device if
+ required.
+
+ :param secret: The enable password if target device requires one.
+
+ :param port: The destination port used to connect to the target
+ device.
+
+ :param device_type: Class selection based on device type.
+
+ :param verbose: Enable additional messages to standard output.
+
+ :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
+
+ :param use_keys: Connect to target device using SSH keys.
+
+ :param key_file: Filename path of the SSH key file to use.
+
+ :param pkey: SSH key object to use.
+
+ :param passphrase: Passphrase to use for encrypted key; password will be used for key
+ decryption if not specified.
+
+ :param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
+ documentation for a description of the expected format.
+
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
+ :param allow_agent: Enable use of SSH key-agent.
+
+ :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
+ means unknown SSH host keys will be accepted).
+
+ :param system_host_keys: Load host keys from the users known_hosts file.
+
+ :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in
+ alt_key_file.
+
+ :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
+
+ :param ssh_config_file: File name of OpenSSH configuration file.
+
+ :param conn_timeout: TCP connection timeout.
+
+ :param session_timeout: Set a timeout for parallel requests.
+
+ :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
+
+ :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
+ :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
+ Currently defaults to 0, for backwards compatibility (it will not attempt
+ to keep the connection alive).
+
+ :param default_enter: Character(s) to send to correspond to enter key (default:
+
+
).
+
:param response_return: Character(s) to use in normalized return data to represent
+ enter key (default:
+
+
)
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+ to select smallest of global and specific. Sets default global_delay_factor to .1
+ (default: True)
+
+ :param session_log: File path or BufferedIOBase subclass object to write the session log to.
+
+ :param session_log_record_writes: The session log generally only records channel reads due
+ to eliminate command duplication due to command echo. You can enable this if you
+ want to record both channel reads and channel writes in the log (default: False).
+
+ :param session_log_file_mode: "write" or "append" for session_log file mode
+ (default: "write")
+
+ :param allow_auto_change: Allow automatic configuration changes for terminal settings.
+ (default: False)
+
+ :param encoding: Encoding to be used when writing bytes to the output channel.
+ (default: ascii)
+
+ :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for
+ communication to the target host (default: None).
+
+ :param global_cmd_verify: Control whether command echo verification is enabled or disabled
+ (default: None). Global attribute takes precedence over function <code>cmd\_verify</code>
+ argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument.
+
+ :param auto_connect: Control whether Netmiko automatically establishes the connection as
+ part of the object creation (default: True).
+
+ :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
+ 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
+ eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
+
Prepare the session after the connection has been established.
+
+
+Expand source code
+
+
def session_preparation(self) -> None:
+ """Prepare the session after the connection has been established."""
+ self._test_channel_read(pattern=r"#")
+ self.set_base_prompt()
+ self.disable_paging(command="terminal length 0")
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.
+
Initialize attributes for establishing connection to target device.
+
+ :param ip: IP address of target device. Not required if <code>host</code> is
+ provided.
+
+ :param host: Hostname of target device. Not required if <code>ip</code> is
+ provided.
+
+ :param username: Username to authenticate against target device if
+ required.
+
+ :param password: Password to authenticate against target device if
+ required.
+
+ :param secret: The enable password if target device requires one.
+
+ :param port: The destination port used to connect to the target
+ device.
+
+ :param device_type: Class selection based on device type.
+
+ :param verbose: Enable additional messages to standard output.
+
+ :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
+
+ :param use_keys: Connect to target device using SSH keys.
+
+ :param key_file: Filename path of the SSH key file to use.
+
+ :param pkey: SSH key object to use.
+
+ :param passphrase: Passphrase to use for encrypted key; password will be used for key
+ decryption if not specified.
+
+ :param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
+ documentation for a description of the expected format.
+
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
+ :param allow_agent: Enable use of SSH key-agent.
+
+ :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
+ means unknown SSH host keys will be accepted).
+
+ :param system_host_keys: Load host keys from the users known_hosts file.
+
+ :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in
+ alt_key_file.
+
+ :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
+
+ :param ssh_config_file: File name of OpenSSH configuration file.
+
+ :param conn_timeout: TCP connection timeout.
+
+ :param session_timeout: Set a timeout for parallel requests.
+
+ :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
+
+ :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
+ :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
+ Currently defaults to 0, for backwards compatibility (it will not attempt
+ to keep the connection alive).
+
+ :param default_enter: Character(s) to send to correspond to enter key (default:
+
+
).
+
:param response_return: Character(s) to use in normalized return data to represent
+ enter key (default:
+
+
)
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+ to select smallest of global and specific. Sets default global_delay_factor to .1
+ (default: True)
+
+ :param session_log: File path or BufferedIOBase subclass object to write the session log to.
+
+ :param session_log_record_writes: The session log generally only records channel reads due
+ to eliminate command duplication due to command echo. You can enable this if you
+ want to record both channel reads and channel writes in the log (default: False).
+
+ :param session_log_file_mode: "write" or "append" for session_log file mode
+ (default: "write")
+
+ :param allow_auto_change: Allow automatic configuration changes for terminal settings.
+ (default: False)
+
+ :param encoding: Encoding to be used when writing bytes to the output channel.
+ (default: ascii)
+
+ :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for
+ communication to the target host (default: None).
+
+ :param global_cmd_verify: Control whether command echo verification is enabled or disabled
+ (default: None). Global attribute takes precedence over function <code>cmd\_verify</code>
+ argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument.
+
+ :param auto_connect: Control whether Netmiko automatically establishes the connection as
+ part of the object creation (default: True).
+
+ :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
+ 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
+ eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
+
+
+
+Expand source code
+
+
class HillstoneStoneosSSH(HillstoneStoneosBase):
+ pass
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.
+
Initialize attributes for establishing connection to target device.
+
+ :param ip: IP address of target device. Not required if <code>host</code> is
+ provided.
+
+ :param host: Hostname of target device. Not required if <code>ip</code> is
+ provided.
+
+ :param username: Username to authenticate against target device if
+ required.
+
+ :param password: Password to authenticate against target device if
+ required.
+
+ :param secret: The enable password if target device requires one.
+
+ :param port: The destination port used to connect to the target
+ device.
+
+ :param device_type: Class selection based on device type.
+
+ :param verbose: Enable additional messages to standard output.
+
+ :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
+
+ :param use_keys: Connect to target device using SSH keys.
+
+ :param key_file: Filename path of the SSH key file to use.
+
+ :param pkey: SSH key object to use.
+
+ :param passphrase: Passphrase to use for encrypted key; password will be used for key
+ decryption if not specified.
+
+ :param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
+ documentation for a description of the expected format.
+
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
+ :param allow_agent: Enable use of SSH key-agent.
+
+ :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
+ means unknown SSH host keys will be accepted).
+
+ :param system_host_keys: Load host keys from the users known_hosts file.
+
+ :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in
+ alt_key_file.
+
+ :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
+
+ :param ssh_config_file: File name of OpenSSH configuration file.
+
+ :param conn_timeout: TCP connection timeout.
+
+ :param session_timeout: Set a timeout for parallel requests.
+
+ :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
+
+ :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
+ :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
+ Currently defaults to 0, for backwards compatibility (it will not attempt
+ to keep the connection alive).
+
+ :param default_enter: Character(s) to send to correspond to enter key (default:
+
+
).
+
:param response_return: Character(s) to use in normalized return data to represent
+ enter key (default:
+
+
)
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+ to select smallest of global and specific. Sets default global_delay_factor to .1
+ (default: True)
+
+ :param session_log: File path or BufferedIOBase subclass object to write the session log to.
+
+ :param session_log_record_writes: The session log generally only records channel reads due
+ to eliminate command duplication due to command echo. You can enable this if you
+ want to record both channel reads and channel writes in the log (default: False).
+
+ :param session_log_file_mode: "write" or "append" for session_log file mode
+ (default: "write")
+
+ :param allow_auto_change: Allow automatic configuration changes for terminal settings.
+ (default: False)
+
+ :param encoding: Encoding to be used when writing bytes to the output channel.
+ (default: ascii)
+
+ :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for
+ communication to the target host (default: None).
+
+ :param global_cmd_verify: Control whether command echo verification is enabled or disabled
+ (default: None). Global attribute takes precedence over function <code>cmd\_verify</code>
+ argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument.
+
+ :param auto_connect: Control whether Netmiko automatically establishes the connection as
+ part of the object creation (default: True).
+
+ :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
+ 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
+ eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
+
+
+
+Expand source code
+
+
class HillstoneStoneosSSH(HillstoneStoneosBase):
+ pass
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -239,7 +243,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -247,6 +251,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -258,7 +266,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -290,6 +300,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -699,7 +717,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -707,6 +725,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -718,7 +740,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -750,6 +774,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -857,6 +884,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -871,7 +901,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -879,6 +909,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -890,7 +924,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -922,6 +958,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
cmd: str = "enable",
pattern: str = "password",
enable_pattern: Optional[str] = None,
+ check_state: bool = True,
re_flags: int = re.IGNORECASE,
default_username: str = "",
) -> str:
"""Enter enable mode"""
- if self.check_enable_mode():
+ if check_state and self.check_enable_mode():
return ""
+
if not default_username:
default_username = self.username
@@ -307,6 +309,9 @@
Classes
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -321,7 +326,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -329,6 +334,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -340,7 +349,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -372,6 +383,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -446,13 +460,15 @@
Classes
cmd: str = "enable",
pattern: str = "password",
enable_pattern: Optional[str] = None,
+ check_state: bool = True,
re_flags: int = re.IGNORECASE,
default_username: str = "",
) -> str:
"""Enter enable mode"""
- if self.check_enable_mode():
+ if check_state and self.check_enable_mode():
return ""
+
if not default_username:
default_username = self.username
@@ -587,7 +603,7 @@
cmd: str = "enable",
pattern: str = "password",
enable_pattern: Optional[str] = None,
+ check_state: bool = True,
re_flags: int = re.IGNORECASE,
default_username: str = "",
) -> str:
"""Enter enable mode"""
- if self.check_enable_mode():
+ if check_state and self.check_enable_mode():
return ""
+
if not default_username:
default_username = self.username
@@ -808,6 +826,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -822,7 +843,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -830,6 +851,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -841,7 +866,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -873,6 +900,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -998,6 +1028,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -1012,7 +1045,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -1020,6 +1053,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -1031,7 +1068,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -1063,6 +1102,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -109,7 +112,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -117,6 +120,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -128,7 +135,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -160,6 +169,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -267,6 +279,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -281,7 +296,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -289,6 +304,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -300,7 +319,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -332,6 +353,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -442,6 +466,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -456,7 +483,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -464,6 +491,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -475,7 +506,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -507,6 +540,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -632,6 +668,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -646,7 +685,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -654,6 +693,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -665,7 +708,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -697,6 +742,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
from typing import Optional, Any, Union, Sequence, Iterator, TextIO
-import time
import re
import warnings
@@ -39,6 +38,10 @@
Module netmiko.huawei.huawei
class HuaweiBase(NoEnable, CiscoBaseConnection):
+ prompt_pattern = r"[\]>]"
+ password_change_prompt = r"(?:Change now|Please choose)"
+ prompt_or_password_change = rf"(?:Change now|Please choose|{prompt_pattern})"
+
def session_preparation(self) -> None:
"""Prepare the session after the connection has been established."""
self.ansi_escape_codes = True
@@ -118,10 +121,48 @@
Module netmiko.huawei.huawei
def save_config(
self, cmd: str = "save", confirm: bool = True, confirm_response: str = "y"
) -> str:
- """Save Config for HuaweiSSH"""
- return super().save_config(
- cmd=cmd, confirm=confirm, confirm_response=confirm_response
- )
+ """Save Config for HuaweiSSH
+
+ Expected behavior:
+
+ ######################################################################
+ Warning: The current configuration will be written to the device.
+ Are you sure to continue?[Y/N]:y
+ It will take several minutes to save configuration file, please wait.....................
+ Configuration file had been saved successfully
+ Note: The configuration file will take effect after being activated
+ ######################################################################
+ """
+
+ # Huawei devices might break if you try to use send_command_timing() so use send_command()
+ # instead.
+ if confirm:
+ pattern = rf"(?:Are you sure|{self.prompt_pattern})"
+ output = self._send_command_str(
+ command_string=cmd,
+ expect_string=pattern,
+ strip_prompt=False,
+ strip_command=False,
+ read_timeout=100.0,
+ )
+ if confirm_response and "Are you sure" in output:
+ output += self._send_command_str(
+ command_string=confirm_response,
+ expect_string=self.prompt_pattern,
+ strip_prompt=False,
+ strip_command=False,
+ read_timeout=100.0,
+ )
+ # no confirm.
+ else:
+ # Some devices are slow so match on trailing-prompt if you can
+ output = self._send_command_str(
+ command_string=cmd,
+ strip_prompt=False,
+ strip_command=False,
+ read_timeout=100.0,
+ )
+ return output
def cleanup(self, command: str = "quit") -> None:
return super().cleanup(command=command)
@@ -133,12 +174,10 @@
Module netmiko.huawei.huawei
def special_login_handler(self, delay_factor: float = 1.0) -> None:
# Huawei prompts for password change before displaying the initial base prompt.
# Search for that password change prompt or for base prompt.
- password_change_prompt = r"(Change now|Please choose)"
- prompt_or_password_change = r"(?:Change now|Please choose|[>\]])"
- data = self.read_until_pattern(pattern=prompt_or_password_change)
- if re.search(password_change_prompt, data):
+ data = self.read_until_pattern(pattern=self.prompt_or_password_change)
+ if re.search(self.password_change_prompt, data):
self.write_channel("N" + self.RETURN)
- self.read_until_pattern(pattern=r"[>\]]")
+ self.read_until_pattern(pattern=self.prompt_pattern)
class HuaweiTelnet(HuaweiBase):
@@ -146,79 +185,49 @@
Module netmiko.huawei.huawei
def telnet_login(
self,
- pri_prompt_terminator: str = r"]\s*$",
- alt_prompt_terminator: str = r">\s*$",
+ pri_prompt_terminator: str = r"",
+ alt_prompt_terminator: str = r"",
username_pattern: str = r"(?:user:|username|login|user name)",
pwd_pattern: str = r"assword",
delay_factor: float = 1.0,
max_loops: int = 20,
) -> str:
"""Telnet login for Huawei Devices"""
-
- delay_factor = self.select_delay_factor(delay_factor)
- password_change_prompt = r"(Change now|Please choose 'YES' or 'NO').+"
- combined_pattern = r"({}|{}|{})".format(
- pri_prompt_terminator, alt_prompt_terminator, password_change_prompt
- )
-
output = ""
return_msg = ""
- i = 1
- while i <= max_loops:
- try:
- # Search for username pattern / send username
- output = self.read_until_pattern(
- pattern=username_pattern, re_flags=re.I
- )
- return_msg += output
- self.write_channel(self.username + self.TELNET_RETURN)
+ try:
+ # Search for username pattern / send username
+ output = self.read_until_pattern(pattern=username_pattern, re_flags=re.I)
+ return_msg += output
+ self.write_channel(self.username + self.TELNET_RETURN)
- # Search for password pattern / send password
- output = self.read_until_pattern(pattern=pwd_pattern, re_flags=re.I)
- return_msg += output
- assert self.password is not None
- self.write_channel(self.password + self.TELNET_RETURN)
+ # Search for password pattern / send password
+ output = self.read_until_pattern(pattern=pwd_pattern, re_flags=re.I)
+ return_msg += output
+ assert self.password is not None
+ self.write_channel(self.password + self.TELNET_RETURN)
- # Waiting for combined output
- output = self.read_until_pattern(pattern=combined_pattern)
+ # Waiting for the prompt or password change message
+ output = self.read_until_pattern(pattern=self.prompt_or_password_change)
+ return_msg += output
+
+ # If password change prompt, send "N"
+ if re.search(self.password_change_prompt, output):
+ self.write_channel("N" + self.TELNET_RETURN)
+ output = self.read_until_pattern(pattern=self.prompt_pattern)
return_msg += output
+ return return_msg
+ elif re.search(self.prompt_pattern, output):
+ return return_msg
- # Search for password change prompt, send "N"
- if re.search(password_change_prompt, output):
- self.write_channel("N" + self.TELNET_RETURN)
- output = self.read_until_pattern(pattern=combined_pattern)
- return_msg += output
-
- # Check if proper data received
- if re.search(pri_prompt_terminator, output, flags=re.M) or re.search(
- alt_prompt_terminator, output, flags=re.M
- ):
- return return_msg
-
- self.write_channel(self.TELNET_RETURN)
- time.sleep(0.5 * delay_factor)
- i += 1
-
- except EOFError:
- assert self.remote_conn is not None
- self.remote_conn.close()
- msg = f"Login failed: {self.host}"
- raise NetmikoAuthenticationException(msg)
-
- # Last try to see if we already logged in
- self.write_channel(self.TELNET_RETURN)
- time.sleep(0.5 * delay_factor)
- output = self.read_channel()
- return_msg += output
- if re.search(pri_prompt_terminator, output, flags=re.M) or re.search(
- alt_prompt_terminator, output, flags=re.M
- ):
- return return_msg
+ # Should never be here
+ raise EOFError
- assert self.remote_conn is not None
- self.remote_conn.close()
- msg = f"Login failed: {self.host}"
- raise NetmikoAuthenticationException(msg)
+ except EOFError:
+ assert self.remote_conn is not None
+ self.remote_conn.close()
+ msg = f"Login failed: {self.host}"
+ raise NetmikoAuthenticationException(msg)
class HuaweiVrpv8SSH(HuaweiSSH):
@@ -292,7 +301,7 @@
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -354,7 +366,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -362,6 +374,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -373,7 +389,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -405,12 +423,19 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
Expand source code
class HuaweiBase(NoEnable, CiscoBaseConnection):
+ prompt_pattern = r"[\]>]"
+ password_change_prompt = r"(?:Change now|Please choose)"
+ prompt_or_password_change = rf"(?:Change now|Please choose|{prompt_pattern})"
+
def session_preparation(self) -> None:
"""Prepare the session after the connection has been established."""
self.ansi_escape_codes = True
@@ -490,10 +515,48 @@
Classes
def save_config(
self, cmd: str = "save", confirm: bool = True, confirm_response: str = "y"
) -> str:
- """Save Config for HuaweiSSH"""
- return super().save_config(
- cmd=cmd, confirm=confirm, confirm_response=confirm_response
- )
+ """Save Config for HuaweiSSH
+
+ Expected behavior:
+
+ ######################################################################
+ Warning: The current configuration will be written to the device.
+ Are you sure to continue?[Y/N]:y
+ It will take several minutes to save configuration file, please wait.....................
+ Configuration file had been saved successfully
+ Note: The configuration file will take effect after being activated
+ ######################################################################
+ """
+
+ # Huawei devices might break if you try to use send_command_timing() so use send_command()
+ # instead.
+ if confirm:
+ pattern = rf"(?:Are you sure|{self.prompt_pattern})"
+ output = self._send_command_str(
+ command_string=cmd,
+ expect_string=pattern,
+ strip_prompt=False,
+ strip_command=False,
+ read_timeout=100.0,
+ )
+ if confirm_response and "Are you sure" in output:
+ output += self._send_command_str(
+ command_string=confirm_response,
+ expect_string=self.prompt_pattern,
+ strip_prompt=False,
+ strip_command=False,
+ read_timeout=100.0,
+ )
+ # no confirm.
+ else:
+ # Some devices are slow so match on trailing-prompt if you can
+ output = self._send_command_str(
+ command_string=cmd,
+ strip_prompt=False,
+ strip_command=False,
+ read_timeout=100.0,
+ )
+ return output
def cleanup(self, command: str = "quit") -> None:
return super().cleanup(command=command)
Warning: The current configuration will be written to the device.
+Are you sure to continue?[Y/N]:y
+It will take several minutes to save configuration file, please wait.....................
+Configuration file had been saved successfully
+Note: The configuration file will take effect after being activated
+ """Save Config for HuaweiSSH
+
+ Expected behavior:
+
+ ######################################################################
+ Warning: The current configuration will be written to the device.
+ Are you sure to continue?[Y/N]:y
+ It will take several minutes to save configuration file, please wait.....................
+ Configuration file had been saved successfully
+ Note: The configuration file will take effect after being activated
+ ######################################################################
+ """
+
+ # Huawei devices might break if you try to use send_command_timing() so use send_command()
+ # instead.
+ if confirm:
+ pattern = rf"(?:Are you sure|{self.prompt_pattern})"
+ output = self._send_command_str(
+ command_string=cmd,
+ expect_string=pattern,
+ strip_prompt=False,
+ strip_command=False,
+ read_timeout=100.0,
+ )
+ if confirm_response and "Are you sure" in output:
+ output += self._send_command_str(
+ command_string=confirm_response,
+ expect_string=self.prompt_pattern,
+ strip_prompt=False,
+ strip_command=False,
+ read_timeout=100.0,
+ )
+ # no confirm.
+ else:
+ # Some devices are slow so match on trailing-prompt if you can
+ output = self._send_command_str(
+ command_string=cmd,
+ strip_prompt=False,
+ strip_command=False,
+ read_timeout=100.0,
+ )
+ return output
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -752,7 +879,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -760,6 +887,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -771,7 +902,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -803,6 +936,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -814,12 +950,10 @@
Inherited members
def special_login_handler(self, delay_factor: float = 1.0) -> None:
# Huawei prompts for password change before displaying the initial base prompt.
# Search for that password change prompt or for base prompt.
- password_change_prompt = r"(Change now|Please choose)"
- prompt_or_password_change = r"(?:Change now|Please choose|[>\]])"
- data = self.read_until_pattern(pattern=prompt_or_password_change)
- if re.search(password_change_prompt, data):
+ data = self.read_until_pattern(pattern=self.prompt_or_password_change)
+ if re.search(self.password_change_prompt, data):
self.write_channel("N" + self.RETURN)
- self.read_until_pattern(pattern=r"[>\]]")
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -938,7 +1075,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -946,6 +1083,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -957,7 +1098,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -989,6 +1132,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -999,79 +1145,49 @@
Inherited members
def telnet_login(
self,
- pri_prompt_terminator: str = r"]\s*$",
- alt_prompt_terminator: str = r">\s*$",
+ pri_prompt_terminator: str = r"",
+ alt_prompt_terminator: str = r"",
username_pattern: str = r"(?:user:|username|login|user name)",
pwd_pattern: str = r"assword",
delay_factor: float = 1.0,
max_loops: int = 20,
) -> str:
"""Telnet login for Huawei Devices"""
-
- delay_factor = self.select_delay_factor(delay_factor)
- password_change_prompt = r"(Change now|Please choose 'YES' or 'NO').+"
- combined_pattern = r"({}|{}|{})".format(
- pri_prompt_terminator, alt_prompt_terminator, password_change_prompt
- )
-
output = ""
return_msg = ""
- i = 1
- while i <= max_loops:
- try:
- # Search for username pattern / send username
- output = self.read_until_pattern(
- pattern=username_pattern, re_flags=re.I
- )
- return_msg += output
- self.write_channel(self.username + self.TELNET_RETURN)
+ try:
+ # Search for username pattern / send username
+ output = self.read_until_pattern(pattern=username_pattern, re_flags=re.I)
+ return_msg += output
+ self.write_channel(self.username + self.TELNET_RETURN)
- # Search for password pattern / send password
- output = self.read_until_pattern(pattern=pwd_pattern, re_flags=re.I)
- return_msg += output
- assert self.password is not None
- self.write_channel(self.password + self.TELNET_RETURN)
+ # Search for password pattern / send password
+ output = self.read_until_pattern(pattern=pwd_pattern, re_flags=re.I)
+ return_msg += output
+ assert self.password is not None
+ self.write_channel(self.password + self.TELNET_RETURN)
+
+ # Waiting for the prompt or password change message
+ output = self.read_until_pattern(pattern=self.prompt_or_password_change)
+ return_msg += output
- # Waiting for combined output
- output = self.read_until_pattern(pattern=combined_pattern)
+ # If password change prompt, send "N"
+ if re.search(self.password_change_prompt, output):
+ self.write_channel("N" + self.TELNET_RETURN)
+ output = self.read_until_pattern(pattern=self.prompt_pattern)
return_msg += output
+ return return_msg
+ elif re.search(self.prompt_pattern, output):
+ return return_msg
- # Search for password change prompt, send "N"
- if re.search(password_change_prompt, output):
- self.write_channel("N" + self.TELNET_RETURN)
- output = self.read_until_pattern(pattern=combined_pattern)
- return_msg += output
-
- # Check if proper data received
- if re.search(pri_prompt_terminator, output, flags=re.M) or re.search(
- alt_prompt_terminator, output, flags=re.M
- ):
- return return_msg
-
- self.write_channel(self.TELNET_RETURN)
- time.sleep(0.5 * delay_factor)
- i += 1
-
- except EOFError:
- assert self.remote_conn is not None
- self.remote_conn.close()
- msg = f"Login failed: {self.host}"
- raise NetmikoAuthenticationException(msg)
-
- # Last try to see if we already logged in
- self.write_channel(self.TELNET_RETURN)
- time.sleep(0.5 * delay_factor)
- output = self.read_channel()
- return_msg += output
- if re.search(pri_prompt_terminator, output, flags=re.M) or re.search(
- alt_prompt_terminator, output, flags=re.M
- ):
- return return_msg
+ # Should never be here
+ raise EOFError
- assert self.remote_conn is not None
- self.remote_conn.close()
- msg = f"Login failed: {self.host}"
- raise NetmikoAuthenticationException(msg)
+ except EOFError:
+ assert self.remote_conn is not None
+ self.remote_conn.close()
+ msg = f"Login failed: {self.host}"
+ raise NetmikoAuthenticationException(msg)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -1274,7 +1363,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -1282,6 +1371,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -1293,7 +1386,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -1325,6 +1420,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
class HuaweiSmartAXSSH(CiscoBaseConnection):
"""Supports Huawei SmartAX and OLT."""
+ prompt_pattern = r"[>$]"
+
def session_preparation(self) -> None:
"""Prepare the session after the connection has been established."""
self.ansi_escape_codes = True
- self._test_channel_read(pattern=r"[>#]")
+
+ data = self._test_channel_read(pattern=f"YES.NO|{self.prompt_pattern}")
+ # Huawei OLT might put a post-login banner that requires 'yes' to be sent.
+ if re.search(r"YES.NO", data):
+ self.write_channel(f"yes{self.RETURN}")
+ self._test_channel_read(pattern=self.prompt_pattern)
+
self.set_base_prompt()
self._disable_smart_interaction()
self.disable_paging()
@@ -119,10 +127,15 @@
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -214,7 +230,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -222,6 +238,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -233,7 +253,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -265,6 +287,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -273,10 +298,18 @@
Classes
class HuaweiSmartAXSSH(CiscoBaseConnection):
"""Supports Huawei SmartAX and OLT."""
+ prompt_pattern = r"[>$]"
+
def session_preparation(self) -> None:
"""Prepare the session after the connection has been established."""
self.ansi_escape_codes = True
- self._test_channel_read(pattern=r"[>#]")
+
+ data = self._test_channel_read(pattern=f"YES.NO|{self.prompt_pattern}")
+ # Huawei OLT might put a post-login banner that requires 'yes' to be sent.
+ if re.search(r"YES.NO", data):
+ self.write_channel(f"yes{self.RETURN}")
+ self._test_channel_read(pattern=self.prompt_pattern)
+
self.set_base_prompt()
self._disable_smart_interaction()
self.disable_paging()
@@ -355,10 +388,15 @@
def session_preparation(self) -> None:
"""Prepare the session after the connection has been established."""
self.ansi_escape_codes = True
- self._test_channel_read(pattern=r"[>#]")
+
+ data = self._test_channel_read(pattern=f"YES.NO|{self.prompt_pattern}")
+ # Huawei OLT might put a post-login banner that requires 'yes' to be sent.
+ if re.search(r"YES.NO", data):
+ self.write_channel(f"yes{self.RETURN}")
+ self._test_channel_read(pattern=self.prompt_pattern)
+
self.set_base_prompt()
self._disable_smart_interaction()
self.disable_paging()
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -110,7 +113,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -118,6 +121,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -129,7 +136,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -161,6 +170,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -172,12 +184,10 @@
Classes
def special_login_handler(self, delay_factor: float = 1.0) -> None:
# Huawei prompts for password change before displaying the initial base prompt.
# Search for that password change prompt or for base prompt.
- password_change_prompt = r"(Change now|Please choose)"
- prompt_or_password_change = r"(?:Change now|Please choose|[>\]])"
- data = self.read_until_pattern(pattern=prompt_or_password_change)
- if re.search(password_change_prompt, data):
+ data = self.read_until_pattern(pattern=self.prompt_or_password_change)
+ if re.search(self.password_change_prompt, data):
self.write_channel("N" + self.RETURN)
- self.read_until_pattern(pattern=r"[>\]]")
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -296,7 +309,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -304,6 +317,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -315,7 +332,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -347,6 +366,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -355,10 +377,18 @@
Inherited members
class HuaweiSmartAXSSH(CiscoBaseConnection):
"""Supports Huawei SmartAX and OLT."""
+ prompt_pattern = r"[>$]"
+
def session_preparation(self) -> None:
"""Prepare the session after the connection has been established."""
self.ansi_escape_codes = True
- self._test_channel_read(pattern=r"[>#]")
+
+ data = self._test_channel_read(pattern=f"YES.NO|{self.prompt_pattern}")
+ # Huawei OLT might put a post-login banner that requires 'yes' to be sent.
+ if re.search(r"YES.NO", data):
+ self.write_channel(f"yes{self.RETURN}")
+ self._test_channel_read(pattern=self.prompt_pattern)
+
self.set_base_prompt()
self._disable_smart_interaction()
self.disable_paging()
@@ -437,10 +467,15 @@
def session_preparation(self) -> None:
"""Prepare the session after the connection has been established."""
self.ansi_escape_codes = True
- self._test_channel_read(pattern=r"[>#]")
+
+ data = self._test_channel_read(pattern=f"YES.NO|{self.prompt_pattern}")
+ # Huawei OLT might put a post-login banner that requires 'yes' to be sent.
+ if re.search(r"YES.NO", data):
+ self.write_channel(f"yes{self.RETURN}")
+ self._test_channel_read(pattern=self.prompt_pattern)
+
self.set_base_prompt()
self._disable_smart_interaction()
self.disable_paging()
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -640,7 +691,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -648,6 +699,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -659,7 +714,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -691,6 +748,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -701,79 +761,49 @@
Inherited members
def telnet_login(
self,
- pri_prompt_terminator: str = r"]\s*$",
- alt_prompt_terminator: str = r">\s*$",
+ pri_prompt_terminator: str = r"",
+ alt_prompt_terminator: str = r"",
username_pattern: str = r"(?:user:|username|login|user name)",
pwd_pattern: str = r"assword",
delay_factor: float = 1.0,
max_loops: int = 20,
) -> str:
"""Telnet login for Huawei Devices"""
-
- delay_factor = self.select_delay_factor(delay_factor)
- password_change_prompt = r"(Change now|Please choose 'YES' or 'NO').+"
- combined_pattern = r"({}|{}|{})".format(
- pri_prompt_terminator, alt_prompt_terminator, password_change_prompt
- )
-
output = ""
return_msg = ""
- i = 1
- while i <= max_loops:
- try:
- # Search for username pattern / send username
- output = self.read_until_pattern(
- pattern=username_pattern, re_flags=re.I
- )
- return_msg += output
- self.write_channel(self.username + self.TELNET_RETURN)
+ try:
+ # Search for username pattern / send username
+ output = self.read_until_pattern(pattern=username_pattern, re_flags=re.I)
+ return_msg += output
+ self.write_channel(self.username + self.TELNET_RETURN)
- # Search for password pattern / send password
- output = self.read_until_pattern(pattern=pwd_pattern, re_flags=re.I)
- return_msg += output
- assert self.password is not None
- self.write_channel(self.password + self.TELNET_RETURN)
+ # Search for password pattern / send password
+ output = self.read_until_pattern(pattern=pwd_pattern, re_flags=re.I)
+ return_msg += output
+ assert self.password is not None
+ self.write_channel(self.password + self.TELNET_RETURN)
- # Waiting for combined output
- output = self.read_until_pattern(pattern=combined_pattern)
+ # Waiting for the prompt or password change message
+ output = self.read_until_pattern(pattern=self.prompt_or_password_change)
+ return_msg += output
+
+ # If password change prompt, send "N"
+ if re.search(self.password_change_prompt, output):
+ self.write_channel("N" + self.TELNET_RETURN)
+ output = self.read_until_pattern(pattern=self.prompt_pattern)
return_msg += output
+ return return_msg
+ elif re.search(self.prompt_pattern, output):
+ return return_msg
- # Search for password change prompt, send "N"
- if re.search(password_change_prompt, output):
- self.write_channel("N" + self.TELNET_RETURN)
- output = self.read_until_pattern(pattern=combined_pattern)
- return_msg += output
-
- # Check if proper data received
- if re.search(pri_prompt_terminator, output, flags=re.M) or re.search(
- alt_prompt_terminator, output, flags=re.M
- ):
- return return_msg
-
- self.write_channel(self.TELNET_RETURN)
- time.sleep(0.5 * delay_factor)
- i += 1
-
- except EOFError:
- assert self.remote_conn is not None
- self.remote_conn.close()
- msg = f"Login failed: {self.host}"
- raise NetmikoAuthenticationException(msg)
-
- # Last try to see if we already logged in
- self.write_channel(self.TELNET_RETURN)
- time.sleep(0.5 * delay_factor)
- output = self.read_channel()
- return_msg += output
- if re.search(pri_prompt_terminator, output, flags=re.M) or re.search(
- alt_prompt_terminator, output, flags=re.M
- ):
- return return_msg
+ # Should never be here
+ raise EOFError
- assert self.remote_conn is not None
- self.remote_conn.close()
- msg = f"Login failed: {self.host}"
- raise NetmikoAuthenticationException(msg)
+ except EOFError:
+ assert self.remote_conn is not None
+ self.remote_conn.close()
+ msg = f"Login failed: {self.host}"
+ raise NetmikoAuthenticationException(msg)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -976,7 +979,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -984,6 +987,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -995,7 +1002,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -1027,6 +1036,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -877,7 +901,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -885,6 +909,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -896,7 +924,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -928,6 +958,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ https://github.com/paramiko/paramiko/issues/1961 (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -1043,7 +1081,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -1051,6 +1089,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -1060,6 +1102,8 @@
Classes
:param response_return: Character(s) to use in normalized return data to represent
enter key (default: \n)
+ :param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -1092,6 +1136,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
"""
self.remote_conn: Union[
@@ -1113,6 +1160,8 @@
Classes
# Line Separator in response lines
self.RESPONSE_RETURN = "\n" if response_return is None else response_return
+ self.disable_lf_normalization = True if disable_lf_normalization else False
+
if ip:
self.host = ip.strip()
elif host:
@@ -1236,7 +1285,15 @@
def read_channel(self) -> str:
"""Generic handler that will read all the data from given channel."""
new_data = self.channel.read_channel()
- new_data = self.normalize_linefeeds(new_data)
+
+ if self.disable_lf_normalization is False:
+ start = time.time()
+ # Data blocks shouldn't end in '\r' (can cause problems with normalize_linefeeds)
+ # Only do the extra read if '\n' exists in the output
+ # this avoids devices that only use \r.
+ while ("\n" in new_data) and (time.time() - start < 1.0):
+ if new_data[-1] == "\r":
+ time.sleep(0.01)
+ new_data += self.channel.read_channel()
+ else:
+ break
+ new_data = self.normalize_linefeeds(new_data)
+
if self.ansi_escape_codes:
new_data = self.strip_ansi_escape_codes(new_data)
log.debug(f"read_channel: {new_data}")
@@ -1438,8 +1508,21 @@
Classes
start_time = time.time()
# if read_timeout == 0 or 0.0 keep reading indefinitely
while (time.time() - start_time < read_timeout) or (not read_timeout):
+
output += self.read_channel()
+
if re.search(pattern, output, flags=re_flags):
+ if "(" in pattern and "(?:" not in pattern:
+ msg = f"""
+Parenthesis found in pattern.
+
+pattern: {pattern}\n
+
+This can be problemtic when used in read_until_pattern().
+
+You should ensure that you use either non-capture groups i.e. '(?:' or that the
+parenthesis completely wrap the pattern '(pattern)'"""
+ log.debug(msg)
results = re.split(pattern, output, maxsplit=1, flags=re_flags)
# The string matched by pattern must be retained in the output string.
@@ -1488,16 +1571,24 @@
Classes
"""Read data on the channel based on timing delays.
General pattern is keep reading until no new data is read.
+
Once no new data is read wait `last_read` amount of time (one last read).
As long as no new data, then return data.
- `read_timeout` is an absolute timer for how long to keep reading (which presupposes
- we are still getting new data).
-
Setting `read_timeout` to zero will cause read_channel_timing to never expire based
- on an absolute timeout. It will only complete based on timeout based on their being
+ on an absolute timeout. It will only complete based on timeout based on there being
no new data.
+ :param last_read: Amount of time to wait before performing one last read (under the
+ idea that we should be done reading at this point and there should be no new
+ data).
+
+ :param read_timeout: Absolute timer for how long Netmiko should keep reading data on
+ the channel (waiting for there to be no new data). Will raise ReadTimeout if this
+ timeout expires. A read_timeout value of 0 will cause the read-loop to never timeout
+ (i.e. Netmiko will keep reading indefinitely until there is no new data and last_read
+ passes).
+
:param delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
:param max_loops: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
@@ -1624,6 +1715,8 @@
Classes
:param username_pattern: Pattern used to identify the username prompt
+ :param pwd_pattern: Pattern used to identify the pwd prompt
+
:param delay_factor: See __init__: global_delay_factor
:param max_loops: Controls the wait time in conjunction with the delay_factor
@@ -1813,7 +1906,6 @@
Classes
) -> str:
"""Strip out command echo and trailing router prompt."""
if strip_command and command_string:
- command_string = self.normalize_linefeeds(command_string)
output = self.strip_command(command_string, output)
if strip_prompt:
output = self.strip_prompt(output)
@@ -2015,6 +2107,10 @@
Classes
:param command: Device command to disable pagination of output
:param delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
+
+ :param cmd_verify: Verify command echo before proceeding (default: True).
+
+ :param pattern: Pattern to terminate reading of channel
"""
if delay_factor is not None:
warnings.warn(DELAY_FACTOR_DEPR_SIMPLE_MSG, DeprecationWarning)
@@ -2069,12 +2165,6 @@
:param command_string: The command to be executed on the remote device.
+ :param last_read: Time waited after end of data
+
+ :param read_timeout: Absolute timer for how long Netmiko should keep reading data on
+ the channel (waiting for there to be no new data). Will raise ReadTimeout if this
+ timeout expires. A read_timeout value of 0 will cause the read-loop to never timeout
+ (i.e. Netmiko will keep reading indefinitely until there is no new data and last_read
+ passes).
+
:param delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
:param max_loops: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
@@ -2384,10 +2482,15 @@
Classes
:param expect_string: Regular expression pattern to use for determining end of output.
If left blank will default to being based on router prompt.
+ :param read_timeout: Maximum time to wait looking for pattern. Will raise ReadTimeout
+ if timeout is exceeded.
+
:param delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
:param max_loops: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
+ :param auto_find_prompt: Use find_prompt() to override base prompt
+
:param strip_prompt: Remove the trailing router prompt from the output (default: True).
:param strip_command: Remove the echo of the command from the output (default: True).
@@ -2702,6 +2805,7 @@
:param enable_pattern: pattern indicating you have entered enable mode
+ :param check_state: Determine whether we are already in enable_mode using
+ check_enable_mode() before trying to elevate privileges (default: True)
+
:param re_flags: Regular expression flags used in conjunction with pattern
"""
output = ""
@@ -2720,35 +2827,37 @@
Classes
"the 'secret' argument to ConnectHandler."
)
- # Check if in enable mode
- if not self.check_enable_mode():
- # Send "enable" mode command
- self.write_channel(self.normalize_cmd(cmd))
- try:
- # Read the command echo
- end_data = ""
- if self.global_cmd_verify is not False:
- output += self.read_until_pattern(pattern=re.escape(cmd.strip()))
- end_data = output.split(cmd.strip())[-1]
-
- # Search for trailing prompt or password pattern
- if pattern not in output and self.base_prompt not in end_data:
- output += self.read_until_prompt_or_pattern(
- pattern=pattern, re_flags=re_flags
- )
- # Send the "secret" in response to password pattern
- if re.search(pattern, output):
- self.write_channel(self.normalize_cmd(self.secret))
- output += self.read_until_prompt()
-
- # Search for terminating pattern if defined
- if enable_pattern and not re.search(enable_pattern, output):
- output += self.read_until_pattern(pattern=enable_pattern)
- else:
- if not self.check_enable_mode():
- raise ValueError(msg)
- except NetmikoTimeoutException:
- raise ValueError(msg)
+ # Check if in enable mode already.
+ if check_state and self.check_enable_mode():
+ return output
+
+ # Send "enable" mode command
+ self.write_channel(self.normalize_cmd(cmd))
+ try:
+ # Read the command echo
+ if self.global_cmd_verify is not False:
+ output += self.read_until_pattern(pattern=re.escape(cmd.strip()))
+
+ # Search for trailing prompt or password pattern
+ output += self.read_until_prompt_or_pattern(
+ pattern=pattern, re_flags=re_flags
+ )
+
+ # Send the "secret" in response to password pattern
+ if re.search(pattern, output):
+ self.write_channel(self.normalize_cmd(self.secret))
+ output += self.read_until_prompt()
+
+ # Search for terminating pattern if defined
+ if enable_pattern and not re.search(enable_pattern, output):
+ output += self.read_until_pattern(pattern=enable_pattern)
+ else:
+ if not self.check_enable_mode():
+ raise ValueError(msg)
+
+ except NetmikoTimeoutException:
+ raise ValueError(msg)
+
return output
def exit_enable_mode(self, exit_command: str = "") -> str:
@@ -2775,6 +2884,10 @@
Classes
:param pattern: Pattern to terminate reading of channel
:type pattern: str
+
+ :param force_regex: Use regular expression pattern to find check_string in output
+ :type force_regex: bool
+
"""
self.write_channel(self.RETURN)
# You can encounter an issue here (on router name changes) prefer delay-based solution
@@ -2900,7 +3013,8 @@
Classes
:param strip_command: Determines whether or not to strip the command
- :param read_timeout: Absolute timer to send to read_channel_timing. Should be rarely needed.
+ :param read_timeout: Absolute timer to send to read_channel_timing. Also adjusts
+ read_timeout in read_until_pattern calls.
:param config_mode_command: The command to enter into config mode
@@ -3006,11 +3120,15 @@
Classes
self.write_channel(self.normalize_cmd(cmd))
# Make sure command is echoed
- output += self.read_until_pattern(pattern=re.escape(cmd.strip()))
+ output += self.read_until_pattern(
+ pattern=re.escape(cmd.strip()), read_timeout=read_timeout
+ )
# Read until next prompt or terminator (#); the .*$ forces read of entire line
pattern = f"(?:{re.escape(self.base_prompt)}.*$|{terminator}.*$)"
- output += self.read_until_pattern(pattern=pattern, re_flags=re.M)
+ output += self.read_until_pattern(
+ pattern=pattern, read_timeout=read_timeout, re_flags=re.M
+ )
if error_pattern:
if re.search(error_pattern, output, flags=re.M):
@@ -3226,6 +3344,7 @@
:param check_string: Identification of configuration mode from the device
:type check_string: str
:param pattern: Pattern to terminate reading of channel
-:type pattern: str
+:type pattern: str
+
:param force_regex: Use regular expression pattern to find check_string in output
+:type force_regex: bool
Expand source code
@@ -3290,6 +3412,10 @@
Methods
:param pattern: Pattern to terminate reading of channel
:type pattern: str
+
+ :param force_regex: Use regular expression pattern to find check_string in output
+ :type force_regex: bool
+
"""
self.write_channel(self.RETURN)
# You can encounter an issue here (on router name changes) prefer delay-based solution
@@ -3471,7 +3597,9 @@
Methods
Disable paging default to a Cisco CLI method.
:param command: Device command to disable pagination of output
-
:param delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
+
:param delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
+
:param cmd_verify: Verify command echo before proceeding (default: True).
+
:param pattern: Pattern to terminate reading of channel
Expand source code
@@ -3488,6 +3616,10 @@
Methods
:param command: Device command to disable pagination of output
:param delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
+
+ :param cmd_verify: Verify command echo before proceeding (default: True).
+
+ :param pattern: Pattern to terminate reading of channel
"""
if delay_factor is not None:
warnings.warn(DELAY_FACTOR_DEPR_SIMPLE_MSG, DeprecationWarning)
@@ -3547,13 +3679,15 @@
:param enable_pattern: pattern indicating you have entered enable mode
+ :param check_state: Determine whether we are already in enable_mode using
+ check_enable_mode() before trying to elevate privileges (default: True)
+
:param re_flags: Regular expression flags used in conjunction with pattern
"""
output = ""
@@ -3582,35 +3720,37 @@
Methods
"the 'secret' argument to ConnectHandler."
)
- # Check if in enable mode
- if not self.check_enable_mode():
- # Send "enable" mode command
- self.write_channel(self.normalize_cmd(cmd))
- try:
- # Read the command echo
- end_data = ""
- if self.global_cmd_verify is not False:
- output += self.read_until_pattern(pattern=re.escape(cmd.strip()))
- end_data = output.split(cmd.strip())[-1]
+ # Check if in enable mode already.
+ if check_state and self.check_enable_mode():
+ return output
- # Search for trailing prompt or password pattern
- if pattern not in output and self.base_prompt not in end_data:
- output += self.read_until_prompt_or_pattern(
- pattern=pattern, re_flags=re_flags
- )
- # Send the "secret" in response to password pattern
- if re.search(pattern, output):
- self.write_channel(self.normalize_cmd(self.secret))
- output += self.read_until_prompt()
+ # Send "enable" mode command
+ self.write_channel(self.normalize_cmd(cmd))
+ try:
+ # Read the command echo
+ if self.global_cmd_verify is not False:
+ output += self.read_until_pattern(pattern=re.escape(cmd.strip()))
+
+ # Search for trailing prompt or password pattern
+ output += self.read_until_prompt_or_pattern(
+ pattern=pattern, re_flags=re_flags
+ )
+
+ # Send the "secret" in response to password pattern
+ if re.search(pattern, output):
+ self.write_channel(self.normalize_cmd(self.secret))
+ output += self.read_until_prompt()
+
+ # Search for terminating pattern if defined
+ if enable_pattern and not re.search(enable_pattern, output):
+ output += self.read_until_pattern(pattern=enable_pattern)
+ else:
+ if not self.check_enable_mode():
+ raise ValueError(msg)
+
+ except NetmikoTimeoutException:
+ raise ValueError(msg)
- # Search for terminating pattern if defined
- if enable_pattern and not re.search(enable_pattern, output):
- output += self.read_until_pattern(pattern=enable_pattern)
- else:
- if not self.check_enable_mode():
- raise ValueError(msg)
- except NetmikoTimeoutException:
- raise ValueError(msg)
return output
@@ -3992,7 +4132,20 @@
Methods
def read_channel(self) -> str:
"""Generic handler that will read all the data from given channel."""
new_data = self.channel.read_channel()
- new_data = self.normalize_linefeeds(new_data)
+
+ if self.disable_lf_normalization is False:
+ start = time.time()
+ # Data blocks shouldn't end in '\r' (can cause problems with normalize_linefeeds)
+ # Only do the extra read if '\n' exists in the output
+ # this avoids devices that only use \r.
+ while ("\n" in new_data) and (time.time() - start < 1.0):
+ if new_data[-1] == "\r":
+ time.sleep(0.01)
+ new_data += self.channel.read_channel()
+ else:
+ break
+ new_data = self.normalize_linefeeds(new_data)
+
if self.ansi_escape_codes:
new_data = self.strip_ansi_escape_codes(new_data)
log.debug(f"read_channel: {new_data}")
@@ -4014,14 +4167,20 @@
Methods
Read data on the channel based on timing delays.
-
General pattern is keep reading until no new data is read.
-Once no new data is read wait last_read amount of time (one last read).
+
General pattern is keep reading until no new data is read.
+
Once no new data is read wait last_read amount of time (one last read).
As long as no new data, then return data.
-
read_timeout is an absolute timer for how long to keep reading (which presupposes
-we are still getting new data).
Setting read_timeout to zero will cause read_channel_timing to never expire based
-on an absolute timeout. It will only complete based on timeout based on their being
+on an absolute timeout. It will only complete based on timeout based on there being
no new data.
+
:param last_read: Amount of time to wait before performing one last read (under the
+idea that we should be done reading at this point and there should be no new
+data).
+
:param read_timeout: Absolute timer for how long Netmiko should keep reading data on
+the channel (waiting for there to be no new data). Will raise ReadTimeout if this
+timeout expires. A read_timeout value of 0 will cause the read-loop to never timeout
+(i.e. Netmiko will keep reading indefinitely until there is no new data and last_read
+passes).
:param delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
:param max_loops: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
@@ -4038,16 +4197,24 @@
Methods
"""Read data on the channel based on timing delays.
General pattern is keep reading until no new data is read.
+
Once no new data is read wait `last_read` amount of time (one last read).
As long as no new data, then return data.
- `read_timeout` is an absolute timer for how long to keep reading (which presupposes
- we are still getting new data).
-
Setting `read_timeout` to zero will cause read_channel_timing to never expire based
- on an absolute timeout. It will only complete based on timeout based on their being
+ on an absolute timeout. It will only complete based on timeout based on there being
no new data.
+ :param last_read: Amount of time to wait before performing one last read (under the
+ idea that we should be done reading at this point and there should be no new
+ data).
+
+ :param read_timeout: Absolute timer for how long Netmiko should keep reading data on
+ the channel (waiting for there to be no new data). Will raise ReadTimeout if this
+ timeout expires. A read_timeout value of 0 will cause the read-loop to never timeout
+ (i.e. Netmiko will keep reading indefinitely until there is no new data and last_read
+ passes).
+
:param delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
:param max_loops: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
@@ -4154,8 +4321,21 @@
Methods
start_time = time.time()
# if read_timeout == 0 or 0.0 keep reading indefinitely
while (time.time() - start_time < read_timeout) or (not read_timeout):
+
output += self.read_channel()
+
if re.search(pattern, output, flags=re_flags):
+ if "(" in pattern and "(?:" not in pattern:
+ msg = f"""
+Parenthesis found in pattern.
+
+pattern: {pattern}\n
+
+This can be problemtic when used in read_until_pattern().
+
+You should ensure that you use either non-capture groups i.e. '(?:' or that the
+parenthesis completely wrap the pattern '(pattern)'"""
+ log.debug(msg)
results = re.split(pattern, output, maxsplit=1, flags=re_flags)
# The string matched by pattern must be retained in the output string.
@@ -4374,8 +4554,11 @@
Methods
:param command_string: The command to be executed on the remote device.
:param expect_string: Regular expression pattern to use for determining end of output.
If left blank will default to being based on router prompt.
+
:param read_timeout: Maximum time to wait looking for pattern. Will raise ReadTimeout
+if timeout is exceeded.
:param delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
:param max_loops: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
+
:param auto_find_prompt: Use find_prompt() to override base prompt
:param strip_prompt: Remove the trailing router prompt from the output (default: True).
:param strip_command: Remove the echo of the command from the output (default: True).
:param normalize: Ensure the proper enter is sent at end of command (default: True).
@@ -4420,10 +4603,15 @@
Methods
:param expect_string: Regular expression pattern to use for determining end of output.
If left blank will default to being based on router prompt.
+ :param read_timeout: Maximum time to wait looking for pattern. Will raise ReadTimeout
+ if timeout is exceeded.
+
:param delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
:param max_loops: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
+ :param auto_find_prompt: Use find_prompt() to override base prompt
+
:param strip_prompt: Remove the trailing router prompt from the output (default: True).
:param strip_command: Remove the echo of the command from the output (default: True).
@@ -4605,6 +4793,12 @@
Methods
Execute command_string on the SSH channel using a delay-based mechanism. Generally
used for show commands.
:param command_string: The command to be executed on the remote device.
+
:param last_read: Time waited after end of data
+
:param read_timeout: Absolute timer for how long Netmiko should keep reading data on
+the channel (waiting for there to be no new data). Will raise ReadTimeout if this
+timeout expires. A read_timeout value of 0 will cause the read-loop to never timeout
+(i.e. Netmiko will keep reading indefinitely until there is no new data and last_read
+passes).
:param delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
:param max_loops: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
:param strip_prompt: Remove the trailing router prompt from the output (default: True).
@@ -4645,6 +4839,14 @@
Methods
:param command_string: The command to be executed on the remote device.
+ :param last_read: Time waited after end of data
+
+ :param read_timeout: Absolute timer for how long Netmiko should keep reading data on
+ the channel (waiting for there to be no new data). Will raise ReadTimeout if this
+ timeout expires. A read_timeout value of 0 will cause the read-loop to never timeout
+ (i.e. Netmiko will keep reading indefinitely until there is no new data and last_read
+ passes).
+
:param delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
:param max_loops: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
@@ -4753,7 +4955,8 @@
Methods
:param max_loops: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
:param strip_prompt: Determines whether or not to strip the prompt
:param strip_command: Determines whether or not to strip the command
-
:param read_timeout: Absolute timer to send to read_channel_timing. Should be rarely needed.
+
:param read_timeout: Absolute timer to send to read_channel_timing. Also adjusts
+read_timeout in read_until_pattern calls.
:param config_mode_command: The command to enter into config mode
:param cmd_verify: Whether or not to verify command echo for each command in config_set
:param enter_config_mode: Do you enter config mode before sending config commands
@@ -4804,7 +5007,8 @@
Methods
:param strip_command: Determines whether or not to strip the command
- :param read_timeout: Absolute timer to send to read_channel_timing. Should be rarely needed.
+ :param read_timeout: Absolute timer to send to read_channel_timing. Also adjusts
+ read_timeout in read_until_pattern calls.
:param config_mode_command: The command to enter into config mode
@@ -4910,11 +5114,15 @@
Methods
self.write_channel(self.normalize_cmd(cmd))
# Make sure command is echoed
- output += self.read_until_pattern(pattern=re.escape(cmd.strip()))
+ output += self.read_until_pattern(
+ pattern=re.escape(cmd.strip()), read_timeout=read_timeout
+ )
# Read until next prompt or terminator (#); the .*$ forces read of entire line
pattern = f"(?:{re.escape(self.base_prompt)}.*$|{terminator}.*$)"
- output += self.read_until_pattern(pattern=pattern, re_flags=re.M)
+ output += self.read_until_pattern(
+ pattern=pattern, read_timeout=read_timeout, re_flags=re.M
+ )
if error_pattern:
if re.search(error_pattern, output, flags=re.M):
@@ -5094,12 +5302,7 @@
:param pri_prompt_terminator: Primary trailing delimiter for identifying a device prompt
:param alt_prompt_terminator: Alternate trailing delimiter for identifying a device prompt
:param username_pattern: Pattern used to identify the username prompt
+
:param pwd_pattern: Pattern used to identify the pwd prompt
:param delay_factor: See init: global_delay_factor
:param max_loops: Controls the wait time in conjunction with the delay_factor
@@ -5469,6 +5673,8 @@
Methods
:param username_pattern: Pattern used to identify the username prompt
+ :param pwd_pattern: Pattern used to identify the pwd prompt
+
:param delay_factor: See __init__: global_delay_factor
:param max_loops: Controls the wait time in conjunction with the delay_factor
@@ -6268,6 +6474,10 @@
Methods
# Always set cmd_verify to False for autodetect
kwargs["global_cmd_verify"] = False
self.connection = ConnectHandler(*args, **kwargs)
+
+ # Add additional sleep to let the login complete.
+ time.sleep(3)
+
# Call the _test_channel_read() in base to clear initial data
output = BaseConnection._test_channel_read(self.connection)
self.initial_buffer = output
@@ -6298,7 +6508,9 @@
Methods
# WLC needs two different auto-dectect solutions
if "cisco_wlc_85" in best_match[0]:
best_match[0] = ("cisco_wlc", 99)
-
+ # IOS XR needs two different auto-dectect solutions
+ if "cisco_xr_2" in best_match[0]:
+ best_match[0] = ("cisco_xr", 99)
self.connection.disconnect()
return best_match[0][0]
@@ -6328,7 +6540,7 @@
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -107,7 +110,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -115,6 +118,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -126,7 +133,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -158,6 +167,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -267,6 +279,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -281,7 +296,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -289,6 +304,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -300,7 +319,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -332,6 +353,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -172,7 +175,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -180,6 +183,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -191,7 +198,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -223,6 +232,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -375,6 +387,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -389,7 +404,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -397,6 +412,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -408,7 +427,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -440,6 +461,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -549,6 +573,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -563,7 +590,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -571,6 +598,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -582,7 +613,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -614,6 +647,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
Implement methods for interacting with Juniper Networks devices.
@@ -184,6 +184,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -198,7 +201,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -206,6 +209,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -217,7 +224,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -249,6 +258,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
Implement methods for interacting with Juniper ScreenOS devices.
@@ -357,6 +369,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -371,7 +386,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -379,6 +394,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -390,7 +409,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -422,6 +443,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -599,6 +623,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -613,7 +640,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -621,6 +648,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -632,7 +663,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -664,6 +697,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
Implement methods for interacting with Juniper Networks devices.
@@ -394,6 +395,9 @@
Classes
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -408,7 +412,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -416,6 +420,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -427,7 +435,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -459,6 +469,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -650,8 +663,9 @@
Classes
output = self.config_mode()
# and_quit will get out of config mode on commit
- expect_string = re.escape(self.base_prompt) if and_quit else None
-
+ # hostname might change on commit, and-quit might result in exiting config mode.
+ re_prompt = re.escape(self.base_prompt)
+ expect_string = rf"(?:{re_prompt}|[>#])"
output += self._send_command_str(
command_string,
expect_string=expect_string,
@@ -867,8 +881,9 @@
Methods
output = self.config_mode()
# and_quit will get out of config mode on commit
- expect_string = re.escape(self.base_prompt) if and_quit else None
-
+ # hostname might change on commit, and-quit might result in exiting config mode.
+ re_prompt = re.escape(self.base_prompt)
+ expect_string = rf"(?:{re_prompt}|[>#])"
output += self._send_command_str(
command_string,
expect_string=expect_string,
@@ -1181,7 +1196,7 @@
Implement methods for interacting with Juniper Networks devices.
@@ -1224,6 +1239,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -1238,7 +1256,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -1246,6 +1264,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -1257,7 +1279,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -1289,6 +1313,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -1399,6 +1426,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -1413,7 +1443,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -1421,6 +1451,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -1432,7 +1466,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -1464,6 +1500,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
Implement methods for interacting with Juniper ScreenOS devices.
@@ -112,6 +112,9 @@
Classes
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -126,7 +129,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -134,6 +137,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -145,7 +152,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -177,6 +186,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -109,7 +112,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -117,6 +120,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -128,7 +135,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -160,6 +169,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -128,7 +131,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -136,6 +139,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -147,7 +154,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -179,6 +188,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -211,7 +214,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -219,6 +222,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -230,7 +237,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -262,6 +271,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -424,7 +431,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -432,6 +439,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -443,7 +454,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -475,6 +488,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -104,7 +107,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -112,6 +115,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -123,7 +130,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -155,6 +164,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -168,17 +180,21 @@
Classes
cmd: str = "enable",
pattern: str = "#",
enable_pattern: Optional[str] = None,
+ check_state: bool = True,
re_flags: int = re.IGNORECASE,
) -> str:
"""Enter into enable mode."""
+
output = ""
+ if check_state and self.check_enable_mode():
+ return output
+
+ self.write_channel(self.normalize_cmd(cmd))
+ output += self.read_until_prompt_or_pattern(
+ pattern=pattern, re_flags=re_flags, read_entire_line=True
+ )
if not self.check_enable_mode():
- self.write_channel(self.normalize_cmd(cmd))
- output += self.read_until_prompt_or_pattern(
- pattern=pattern, re_flags=re_flags, read_entire_line=True
- )
- if not self.check_enable_mode():
- raise ValueError("Failed to enter enable mode.")
+ raise ValueError("Failed to enter enable mode.")
return output
def config_mode(
@@ -257,7 +273,7 @@
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -190,7 +197,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -198,6 +205,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -209,7 +220,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -241,6 +254,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -254,17 +270,21 @@
Classes
cmd: str = "enable",
pattern: str = "#",
enable_pattern: Optional[str] = None,
+ check_state: bool = True,
re_flags: int = re.IGNORECASE,
) -> str:
"""Enter into enable mode."""
+
output = ""
+ if check_state and self.check_enable_mode():
+ return output
+
+ self.write_channel(self.normalize_cmd(cmd))
+ output += self.read_until_prompt_or_pattern(
+ pattern=pattern, re_flags=re_flags, read_entire_line=True
+ )
if not self.check_enable_mode():
- self.write_channel(self.normalize_cmd(cmd))
- output += self.read_until_prompt_or_pattern(
- pattern=pattern, re_flags=re_flags, read_entire_line=True
- )
- if not self.check_enable_mode():
- raise ValueError("Failed to enter enable mode.")
+ raise ValueError("Failed to enter enable mode.")
return output
def config_mode(
@@ -343,7 +363,7 @@
def session_preparation(self, *args: Any, **kwargs: Any) -> None:
"""Prepare the session after the connection has been established."""
self.ansi_escape_codes = True
- self._test_channel_read(pattern=r"\].*>")
self.set_base_prompt()
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -109,7 +112,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -117,6 +120,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -128,7 +135,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -160,6 +169,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -370,7 +392,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -378,6 +400,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -389,7 +415,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -421,6 +449,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -445,21 +476,24 @@
Inherited members
cmd: str = "enable",
pattern: str = r"#",
enable_pattern: Optional[str] = None,
+ check_state: bool = True,
re_flags: int = re.IGNORECASE,
) -> str:
"""Enable mode on MRV uses no password."""
output = ""
+ if check_state and self.check_enable_mode():
+ return output
+
+ self.write_channel(self.normalize_cmd(cmd))
+ output += self.read_until_prompt_or_pattern(
+ pattern=pattern, re_flags=re_flags, read_entire_line=True
+ )
if not self.check_enable_mode():
- self.write_channel(self.normalize_cmd(cmd))
- output += self.read_until_prompt_or_pattern(
- pattern=pattern, re_flags=re_flags, read_entire_line=True
+ msg = (
+ "Failed to enter enable mode. Please ensure you pass "
+ "the 'secret' argument to ConnectHandler."
)
- if not self.check_enable_mode():
- msg = (
- "Failed to enter enable mode. Please ensure you pass "
- "the 'secret' argument to ConnectHandler."
- )
- raise ValueError(msg)
+ raise ValueError(msg)
return output
def save_config(
@@ -482,7 +516,7 @@
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -140,7 +150,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -148,6 +158,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -159,7 +173,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -191,6 +207,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -149,7 +155,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -157,6 +163,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -168,7 +178,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -200,6 +212,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -224,21 +239,24 @@
Classes
cmd: str = "enable",
pattern: str = r"#",
enable_pattern: Optional[str] = None,
+ check_state: bool = True,
re_flags: int = re.IGNORECASE,
) -> str:
"""Enable mode on MRV uses no password."""
output = ""
+ if check_state and self.check_enable_mode():
+ return output
+
+ self.write_channel(self.normalize_cmd(cmd))
+ output += self.read_until_prompt_or_pattern(
+ pattern=pattern, re_flags=re_flags, read_entire_line=True
+ )
if not self.check_enable_mode():
- self.write_channel(self.normalize_cmd(cmd))
- output += self.read_until_prompt_or_pattern(
- pattern=pattern, re_flags=re_flags, read_entire_line=True
+ msg = (
+ "Failed to enter enable mode. Please ensure you pass "
+ "the 'secret' argument to ConnectHandler."
)
- if not self.check_enable_mode():
- msg = (
- "Failed to enter enable mode. Please ensure you pass "
- "the 'secret' argument to ConnectHandler."
- )
- raise ValueError(msg)
+ raise ValueError(msg)
return output
def save_config(
@@ -261,7 +279,7 @@
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -111,7 +114,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -119,6 +122,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -130,7 +137,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -162,6 +171,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -143,7 +146,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -151,6 +154,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -162,7 +169,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -194,6 +203,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -104,7 +107,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -112,6 +115,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -123,7 +130,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -155,6 +164,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -156,7 +159,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -164,6 +167,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -175,7 +182,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -207,6 +216,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
Implement methods for interacting with Nokia SRL devices for SSH.
@@ -116,6 +116,9 @@
Classes
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -130,7 +133,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -138,6 +141,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -149,7 +156,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -181,6 +190,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -753,7 +768,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -761,6 +776,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -772,7 +791,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -804,6 +825,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -925,7 +952,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -933,6 +960,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -944,7 +975,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -976,6 +1009,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
Implement methods for interacting with Nokia SRL devices for SSH.
@@ -261,6 +261,9 @@
Classes
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -275,7 +278,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -283,6 +286,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -294,7 +301,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -326,6 +335,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
Implement methods for interacting with Nokia SR OS devices
@@ -490,6 +497,9 @@
Classes
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -504,7 +514,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -512,6 +522,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -523,7 +537,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -555,6 +571,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -634,12 +653,19 @@
Classes
cmd: str = "enable",
pattern: str = "ssword",
enable_pattern: Optional[str] = None,
+ check_state: bool = True,
re_flags: int = re.IGNORECASE,
) -> str:
"""Enable SR OS administrative mode"""
if "@" not in self.base_prompt:
cmd = "enable-admin"
- return super().enable(cmd=cmd, pattern=pattern, re_flags=re_flags)
+ return super().enable(
+ cmd=cmd,
+ pattern=pattern,
+ enable_pattern=enable_pattern,
+ check_state=check_state,
+ re_flags=re_flags,
+ )
def check_enable_mode(self, check_string: str = "in admin mode") -> bool:
"""Check if in enable mode."""
@@ -718,13 +744,13 @@
Classes
def send_config_set(
self,
config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None,
- exit_config_mode: bool = None,
+ exit_config_mode: bool = True,
**kwargs: Any,
) -> str:
"""Model driven CLI requires you not exit from configuration mode."""
- if exit_config_mode is None:
- # Set to False if model-driven CLI
- exit_config_mode = False if "@" in self.base_prompt else True
+ # Set to False if model-driven CLI
+ if "@" in self.base_prompt:
+ exit_config_mode = False
return super().send_config_set(
config_commands=config_commands, exit_config_mode=exit_config_mode, **kwargs
)
@@ -932,7 +958,7 @@
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -1397,7 +1433,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -1405,6 +1441,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -1416,7 +1456,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -1448,6 +1490,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -1569,7 +1617,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -1577,6 +1625,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -1588,7 +1640,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -1620,6 +1674,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
"""Netmiko driver for OneAccess ONEOS"""
-import time
from typing import Any
from netmiko.cisco_base_connection import CiscoBaseConnection
@@ -43,13 +42,21 @@
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -104,7 +107,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -112,6 +115,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -123,7 +130,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -155,6 +164,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -99,7 +102,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -107,6 +110,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -118,7 +125,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -150,6 +159,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
Implement methods for interacting with PaloAlto devices.
@@ -93,6 +93,9 @@
Classes
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -107,7 +110,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -115,6 +118,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -126,7 +133,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -158,6 +167,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
Implement methods for interacting with PaloAlto devices.
@@ -286,6 +298,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -300,7 +315,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -308,6 +323,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -319,7 +338,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -351,6 +372,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
Implement methods for interacting with PaloAlto devices.
@@ -337,6 +339,9 @@
Classes
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -351,7 +356,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -359,6 +364,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -370,7 +379,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -402,6 +413,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
Implement methods for interacting with PaloAlto devices.
@@ -968,6 +986,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -982,7 +1003,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -990,6 +1011,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -1001,7 +1026,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -1033,6 +1060,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
Implement methods for interacting with PaloAlto devices.
@@ -1161,6 +1191,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -1175,7 +1208,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -1183,6 +1216,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -1194,7 +1231,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -1226,6 +1265,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -104,7 +107,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -112,6 +115,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -123,7 +130,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -155,6 +164,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -121,7 +124,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -129,6 +132,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -140,7 +147,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -172,6 +181,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -105,7 +108,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -113,6 +116,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -124,7 +131,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -156,6 +165,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -281,7 +296,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -289,6 +304,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -300,7 +319,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -332,6 +353,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
RAD ETX Support, Tested on RAD 203AX, 205A and 220A.
@@ -182,6 +182,9 @@
Classes
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -196,7 +199,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -204,6 +207,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -215,7 +222,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -247,6 +256,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -497,6 +509,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -511,7 +526,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -519,6 +534,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -530,7 +549,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -562,6 +583,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -687,7 +714,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -695,6 +722,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -706,7 +737,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -738,6 +771,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -105,7 +108,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -113,6 +116,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -124,7 +131,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -156,6 +165,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -338,7 +353,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -346,6 +361,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -357,7 +376,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -389,6 +410,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -253,7 +256,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -261,6 +264,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -272,7 +279,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -304,6 +313,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -496,7 +494,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -504,6 +502,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -515,7 +517,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -547,6 +551,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -729,7 +739,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -737,6 +747,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -748,7 +762,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -780,6 +796,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -105,7 +108,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -113,6 +116,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -124,7 +131,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -156,6 +165,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -263,6 +275,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -277,7 +292,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -285,6 +300,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -296,7 +315,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -328,6 +349,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -204,7 +208,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -212,6 +216,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -223,7 +231,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -255,6 +265,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -276,44 +289,45 @@
Classes
def enable(
self,
cmd: str = "enable",
- pattern: str = r"(ssword|User Name)",
+ pattern: str = r"(ssword|User Name|Login)",
enable_pattern: Optional[str] = None,
+ check_state: bool = True,
re_flags: int = re.IGNORECASE,
) -> str:
"""Enter enable mode.
- With RADIUS can prompt for User Name
+ With RADIUS can prompt for User Name or Login
SSH@Lab-ICX7250>en
User Name:service_netmiko
Password:
SSH@Lab-ICX7250#
"""
output = ""
- if not self.check_enable_mode():
- count = 4
- i = 1
- while i < count:
- self.write_channel(self.normalize_cmd(cmd))
+ if check_state and self.check_enable_mode():
+ return output
+
+ count = 4
+ i = 1
+ while i < count:
+ self.write_channel(self.normalize_cmd(cmd))
+ new_data = self.read_until_prompt_or_pattern(
+ pattern=pattern, re_flags=re_flags, read_entire_line=True
+ )
+ output += new_data
+ if "User Name" in new_data or "Login" in new_data:
+ self.write_channel(self.normalize_cmd(self.username))
new_data = self.read_until_prompt_or_pattern(
pattern=pattern, re_flags=re_flags, read_entire_line=True
)
output += new_data
- if "User Name" in new_data:
- self.write_channel(self.normalize_cmd(self.username))
- new_data = self.read_until_prompt_or_pattern(
- pattern=pattern, re_flags=re_flags, read_entire_line=True
- )
- output += new_data
- if "ssword" in new_data:
- self.write_channel(self.normalize_cmd(self.secret))
- new_data = self.read_until_prompt(read_entire_line=True)
- output += new_data
- if not re.search(
- r"error.*incorrect.*password", new_data, flags=re.I
- ):
- break
-
- time.sleep(1)
- i += 1
+ if "ssword" in new_data:
+ self.write_channel(self.normalize_cmd(self.secret))
+ new_data = self.read_until_prompt(read_entire_line=True)
+ output += new_data
+ if not re.search(r"error.*incorrect.*password", new_data, flags=re.I):
+ break
+
+ time.sleep(1)
+ i += 1
if not self.check_enable_mode():
msg = (
@@ -346,11 +360,11 @@
Enter enable mode.
-With RADIUS can prompt for User Name
+With RADIUS can prompt for User Name or Login
SSH@Lab-ICX7250>en
User Name:service_netmiko
Password:
@@ -362,44 +376,45 @@
Methods
def enable(
self,
cmd: str = "enable",
- pattern: str = r"(ssword|User Name)",
+ pattern: str = r"(ssword|User Name|Login)",
enable_pattern: Optional[str] = None,
+ check_state: bool = True,
re_flags: int = re.IGNORECASE,
) -> str:
"""Enter enable mode.
- With RADIUS can prompt for User Name
+ With RADIUS can prompt for User Name or Login
SSH@Lab-ICX7250>en
User Name:service_netmiko
Password:
SSH@Lab-ICX7250#
"""
output = ""
- if not self.check_enable_mode():
- count = 4
- i = 1
- while i < count:
- self.write_channel(self.normalize_cmd(cmd))
+ if check_state and self.check_enable_mode():
+ return output
+
+ count = 4
+ i = 1
+ while i < count:
+ self.write_channel(self.normalize_cmd(cmd))
+ new_data = self.read_until_prompt_or_pattern(
+ pattern=pattern, re_flags=re_flags, read_entire_line=True
+ )
+ output += new_data
+ if "User Name" in new_data or "Login" in new_data:
+ self.write_channel(self.normalize_cmd(self.username))
new_data = self.read_until_prompt_or_pattern(
pattern=pattern, re_flags=re_flags, read_entire_line=True
)
output += new_data
- if "User Name" in new_data:
- self.write_channel(self.normalize_cmd(self.username))
- new_data = self.read_until_prompt_or_pattern(
- pattern=pattern, re_flags=re_flags, read_entire_line=True
- )
- output += new_data
- if "ssword" in new_data:
- self.write_channel(self.normalize_cmd(self.secret))
- new_data = self.read_until_prompt(read_entire_line=True)
- output += new_data
- if not re.search(
- r"error.*incorrect.*password", new_data, flags=re.I
- ):
- break
+ if "ssword" in new_data:
+ self.write_channel(self.normalize_cmd(self.secret))
+ new_data = self.read_until_prompt(read_entire_line=True)
+ output += new_data
+ if not re.search(r"error.*incorrect.*password", new_data, flags=re.I):
+ break
- time.sleep(1)
- i += 1
+ time.sleep(1)
+ i += 1
if not self.check_enable_mode():
msg = (
@@ -498,7 +513,7 @@
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -553,7 +571,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -561,6 +579,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -572,7 +594,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -604,6 +628,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -711,6 +738,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -725,7 +755,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -733,6 +763,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -744,7 +778,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -776,6 +812,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -104,7 +107,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -112,6 +115,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -123,7 +130,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -155,6 +164,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -262,6 +274,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -276,7 +291,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -284,6 +299,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -295,7 +314,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -327,6 +348,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -134,7 +137,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -142,6 +145,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -153,7 +160,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -185,6 +194,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -368,7 +383,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -376,6 +391,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -387,7 +406,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -419,6 +440,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -526,6 +550,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -540,7 +567,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -548,6 +575,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -559,7 +590,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -591,6 +624,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -111,7 +114,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -119,6 +122,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -130,7 +137,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -162,6 +171,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
def disable_paging(self, *args: Any, **kwargs: Any) -> str:
"""6WIND requires no-pager at the end of command, not implemented at this time."""
- pass
+ return ""
def set_base_prompt(
self,
@@ -151,7 +151,7 @@
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -213,7 +216,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -221,6 +224,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -232,7 +239,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -264,6 +273,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -281,7 +293,7 @@
Classes
def disable_paging(self, *args: Any, **kwargs: Any) -> str:
"""6WIND requires no-pager at the end of command, not implemented at this time."""
- pass
+ return ""
def set_base_prompt(
self,
@@ -457,7 +469,7 @@
Methods
def disable_paging(self, *args: Any, **kwargs: Any) -> str:
"""6WIND requires no-pager at the end of command, not implemented at this time."""
- pass
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -652,7 +667,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -660,6 +675,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -671,7 +690,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -703,6 +724,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
Note, pysnmp is a required dependency for SNMPDetect and is intentionally not included in
netmiko requirements. So installation of pysnmp might be required.
"""
+import ipaddress
from typing import Optional, Dict
from typing.re import Pattern
import re
@@ -98,7 +99,7 @@
string : str
The string as part of the value from the OID you are trying to retrieve.
"""
- snmp_target = (self.hostname, self.snmp_port)
cmd_gen = cmdgen.CommandGenerator()
(error_detected, error_status, error_index, snmp_data) = cmd_gen.getCmd(
@@ -305,7 +320,7 @@
string : str
The string as part of the value from the OID you are trying to retrieve.
"""
- snmp_target = (self.hostname, self.snmp_port)
cmd_gen = cmdgen.CommandGenerator()
(error_detected, error_status, error_index, snmp_data) = cmd_gen.getCmd(
cmdgen.CommunityData(self.community),
- cmdgen.UdpTransportTarget(snmp_target, timeout=1.5, retries=2),
+ self.udp_transport_target,
oid,
lookupNames=True,
lookupValues=True,
@@ -572,6 +586,16 @@
string : str
The string as part of the value from the OID you are trying to retrieve.
"""
- snmp_target = (self.hostname, self.snmp_port)
cmd_gen = cmdgen.CommandGenerator()
(error_detected, error_status, error_index, snmp_data) = cmd_gen.getCmd(
@@ -598,7 +621,7 @@
string : str
The string as part of the value from the OID you are trying to retrieve.
"""
- snmp_target = (self.hostname, self.snmp_port)
cmd_gen = cmdgen.CommandGenerator()
(error_detected, error_status, error_index, snmp_data) = cmd_gen.getCmd(
cmdgen.CommunityData(self.community),
- cmdgen.UdpTransportTarget(snmp_target, timeout=1.5, retries=2),
+ self.udp_transport_target,
oid,
lookupNames=True,
lookupValues=True,
diff --git a/docs/netmiko/sophos/index.html b/docs/netmiko/sophos/index.html
index 5d4f6b4d8..51ff78183 100644
--- a/docs/netmiko/sophos/index.html
+++ b/docs/netmiko/sophos/index.html
@@ -49,7 +49,7 @@
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -111,7 +114,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -119,6 +122,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -130,7 +137,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -162,6 +171,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -141,7 +144,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -149,6 +152,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -160,7 +167,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -192,6 +201,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
Netmiko connection creation section
"priority": 99,
"dispatch": "_autodetect_std",
},
+ "cisco_viptela": {
+ "cmd": "show system status",
+ "search_patterns": [r"Viptela, Inc"],
+ "priority": 99,
+ "dispatch": "_autodetect_std",
+ },
+ "oneaccess_oneos": {
+ "cmd": "show version",
+ "search_patterns": [r"OneOS"],
+ "priority": 99,
+ "dispatch": "_autodetect_std",
+ },
}
# Sort SSH_MAPPER_DICT such that the most common commands are first
@@ -374,6 +422,10 @@
Netmiko connection creation section
# Always set cmd_verify to False for autodetect
kwargs["global_cmd_verify"] = False
self.connection = ConnectHandler(*args, **kwargs)
+
+ # Add additional sleep to let the login complete.
+ time.sleep(3)
+
# Call the _test_channel_read() in base to clear initial data
output = BaseConnection._test_channel_read(self.connection)
self.initial_buffer = output
@@ -404,7 +456,9 @@
Netmiko connection creation section
# WLC needs two different auto-dectect solutions
if "cisco_wlc_85" in best_match[0]:
best_match[0] = ("cisco_wlc", 99)
-
+ # IOS XR needs two different auto-dectect solutions
+ if "cisco_xr_2" in best_match[0]:
+ best_match[0] = ("cisco_xr", 99)
self.connection.disconnect()
return best_match[0][0]
@@ -434,7 +488,7 @@
# Always set cmd_verify to False for autodetect
kwargs["global_cmd_verify"] = False
self.connection = ConnectHandler(*args, **kwargs)
+
+ # Add additional sleep to let the login complete.
+ time.sleep(3)
+
# Call the _test_channel_read() in base to clear initial data
output = BaseConnection._test_channel_read(self.connection)
self.initial_buffer = output
@@ -662,7 +720,9 @@
Methods
# WLC needs two different auto-dectect solutions
if "cisco_wlc_85" in best_match[0]:
best_match[0] = ("cisco_wlc", 99)
-
+ # IOS XR needs two different auto-dectect solutions
+ if "cisco_xr_2" in best_match[0]:
+ best_match[0] = ("cisco_xr", 99)
self.connection.disconnect()
return best_match[0][0]
@@ -692,7 +752,7 @@
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -111,7 +114,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -119,6 +122,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -130,7 +137,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -162,6 +171,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -290,7 +305,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -298,6 +313,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -309,7 +328,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -341,6 +362,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -141,7 +144,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -149,6 +152,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -160,7 +167,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -192,6 +201,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -393,7 +408,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -401,6 +416,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -412,7 +431,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -444,6 +465,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -572,7 +599,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -580,6 +607,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -591,7 +622,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -623,6 +656,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
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.
+
Initialize attributes for establishing connection to target device.
+
+ :param ip: IP address of target device. Not required if <code>host</code> is
+ provided.
+
+ :param host: Hostname of target device. Not required if <code>ip</code> is
+ provided.
+
+ :param username: Username to authenticate against target device if
+ required.
+
+ :param password: Password to authenticate against target device if
+ required.
+
+ :param secret: The enable password if target device requires one.
+
+ :param port: The destination port used to connect to the target
+ device.
+
+ :param device_type: Class selection based on device type.
+
+ :param verbose: Enable additional messages to standard output.
+
+ :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
+
+ :param use_keys: Connect to target device using SSH keys.
+
+ :param key_file: Filename path of the SSH key file to use.
+
+ :param pkey: SSH key object to use.
+
+ :param passphrase: Passphrase to use for encrypted key; password will be used for key
+ decryption if not specified.
+
+ :param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
+ documentation for a description of the expected format.
+
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
+ :param allow_agent: Enable use of SSH key-agent.
+
+ :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
+ means unknown SSH host keys will be accepted).
+
+ :param system_host_keys: Load host keys from the users known_hosts file.
+
+ :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in
+ alt_key_file.
+
+ :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
+
+ :param ssh_config_file: File name of OpenSSH configuration file.
+
+ :param conn_timeout: TCP connection timeout.
+
+ :param session_timeout: Set a timeout for parallel requests.
+
+ :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
+
+ :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
+ :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
+ Currently defaults to 0, for backwards compatibility (it will not attempt
+ to keep the connection alive).
+
+ :param default_enter: Character(s) to send to correspond to enter key (default:
+
+
).
+
:param response_return: Character(s) to use in normalized return data to represent
+ enter key (default:
+
+
)
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+ to select smallest of global and specific. Sets default global_delay_factor to .1
+ (default: True)
+
+ :param session_log: File path or BufferedIOBase subclass object to write the session log to.
+
+ :param session_log_record_writes: The session log generally only records channel reads due
+ to eliminate command duplication due to command echo. You can enable this if you
+ want to record both channel reads and channel writes in the log (default: False).
+
+ :param session_log_file_mode: "write" or "append" for session_log file mode
+ (default: "write")
+
+ :param allow_auto_change: Allow automatic configuration changes for terminal settings.
+ (default: False)
+
+ :param encoding: Encoding to be used when writing bytes to the output channel.
+ (default: ascii)
+
+ :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for
+ communication to the target host (default: None).
+
+ :param global_cmd_verify: Control whether command echo verification is enabled or disabled
+ (default: None). Global attribute takes precedence over function <code>cmd\_verify</code>
+ argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument.
+
+ :param auto_connect: Control whether Netmiko automatically establishes the connection as
+ part of the object creation (default: True).
+
+ :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
+ 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
+ eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
+
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.
+
Initialize attributes for establishing connection to target device.
+
+ :param ip: IP address of target device. Not required if <code>host</code> is
+ provided.
+
+ :param host: Hostname of target device. Not required if <code>ip</code> is
+ provided.
+
+ :param username: Username to authenticate against target device if
+ required.
+
+ :param password: Password to authenticate against target device if
+ required.
+
+ :param secret: The enable password if target device requires one.
+
+ :param port: The destination port used to connect to the target
+ device.
+
+ :param device_type: Class selection based on device type.
+
+ :param verbose: Enable additional messages to standard output.
+
+ :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
+
+ :param use_keys: Connect to target device using SSH keys.
+
+ :param key_file: Filename path of the SSH key file to use.
+
+ :param pkey: SSH key object to use.
+
+ :param passphrase: Passphrase to use for encrypted key; password will be used for key
+ decryption if not specified.
+
+ :param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
+ documentation for a description of the expected format.
+
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
+ :param allow_agent: Enable use of SSH key-agent.
+
+ :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
+ means unknown SSH host keys will be accepted).
+
+ :param system_host_keys: Load host keys from the users known_hosts file.
+
+ :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in
+ alt_key_file.
+
+ :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
+
+ :param ssh_config_file: File name of OpenSSH configuration file.
+
+ :param conn_timeout: TCP connection timeout.
+
+ :param session_timeout: Set a timeout for parallel requests.
+
+ :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
+
+ :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
+ :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
+ Currently defaults to 0, for backwards compatibility (it will not attempt
+ to keep the connection alive).
+
+ :param default_enter: Character(s) to send to correspond to enter key (default:
+
+
).
+
:param response_return: Character(s) to use in normalized return data to represent
+ enter key (default:
+
+
)
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+ to select smallest of global and specific. Sets default global_delay_factor to .1
+ (default: True)
+
+ :param session_log: File path or BufferedIOBase subclass object to write the session log to.
+
+ :param session_log_record_writes: The session log generally only records channel reads due
+ to eliminate command duplication due to command echo. You can enable this if you
+ want to record both channel reads and channel writes in the log (default: False).
+
+ :param session_log_file_mode: "write" or "append" for session_log file mode
+ (default: "write")
+
+ :param allow_auto_change: Allow automatic configuration changes for terminal settings.
+ (default: False)
+
+ :param encoding: Encoding to be used when writing bytes to the output channel.
+ (default: ascii)
+
+ :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for
+ communication to the target host (default: None).
+
+ :param global_cmd_verify: Control whether command echo verification is enabled or disabled
+ (default: None). Global attribute takes precedence over function <code>cmd\_verify</code>
+ argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument.
+
+ :param auto_connect: Control whether Netmiko automatically establishes the connection as
+ part of the object creation (default: True).
+
+ :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
+ 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
+ eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
+
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.
+
Initialize attributes for establishing connection to target device.
+
+ :param ip: IP address of target device. Not required if <code>host</code> is
+ provided.
+
+ :param host: Hostname of target device. Not required if <code>ip</code> is
+ provided.
+
+ :param username: Username to authenticate against target device if
+ required.
+
+ :param password: Password to authenticate against target device if
+ required.
+
+ :param secret: The enable password if target device requires one.
+
+ :param port: The destination port used to connect to the target
+ device.
+
+ :param device_type: Class selection based on device type.
+
+ :param verbose: Enable additional messages to standard output.
+
+ :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
+
+ :param use_keys: Connect to target device using SSH keys.
+
+ :param key_file: Filename path of the SSH key file to use.
+
+ :param pkey: SSH key object to use.
+
+ :param passphrase: Passphrase to use for encrypted key; password will be used for key
+ decryption if not specified.
+
+ :param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
+ documentation for a description of the expected format.
+
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
+ :param allow_agent: Enable use of SSH key-agent.
+
+ :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
+ means unknown SSH host keys will be accepted).
+
+ :param system_host_keys: Load host keys from the users known_hosts file.
+
+ :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in
+ alt_key_file.
+
+ :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
+
+ :param ssh_config_file: File name of OpenSSH configuration file.
+
+ :param conn_timeout: TCP connection timeout.
+
+ :param session_timeout: Set a timeout for parallel requests.
+
+ :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
+
+ :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
+ :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
+ Currently defaults to 0, for backwards compatibility (it will not attempt
+ to keep the connection alive).
+
+ :param default_enter: Character(s) to send to correspond to enter key (default:
+
+
).
+
:param response_return: Character(s) to use in normalized return data to represent
+ enter key (default:
+
+
)
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+ to select smallest of global and specific. Sets default global_delay_factor to .1
+ (default: True)
+
+ :param session_log: File path or BufferedIOBase subclass object to write the session log to.
+
+ :param session_log_record_writes: The session log generally only records channel reads due
+ to eliminate command duplication due to command echo. You can enable this if you
+ want to record both channel reads and channel writes in the log (default: False).
+
+ :param session_log_file_mode: "write" or "append" for session_log file mode
+ (default: "write")
+
+ :param allow_auto_change: Allow automatic configuration changes for terminal settings.
+ (default: False)
+
+ :param encoding: Encoding to be used when writing bytes to the output channel.
+ (default: ascii)
+
+ :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for
+ communication to the target host (default: None).
+
+ :param global_cmd_verify: Control whether command echo verification is enabled or disabled
+ (default: None). Global attribute takes precedence over function <code>cmd\_verify</code>
+ argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument.
+
+ :param auto_connect: Control whether Netmiko automatically establishes the connection as
+ part of the object creation (default: True).
+
+ :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
+ 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
+ eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
+
+
+
+Expand source code
+
+
class TeldatCITBase(NoEnable, BaseConnection):
+ def session_preparation(self) -> None:
+ # Prompt is "*"
+ self._test_channel_read(pattern=r"\*")
+ self.set_base_prompt()
+ # Clear the read buffer
+ time.sleep(0.3 * self.global_delay_factor)
+ self.clear_buffer()
+
+ def disable_paging(
+ self,
+ command: str = "",
+ delay_factor: Optional[float] = None,
+ cmd_verify: bool = True,
+ pattern: Optional[str] = None,
+ ) -> str:
+ """Teldat doesn't have pagging"""
+ return ""
+
+ def set_base_prompt(
+ self,
+ pri_prompt_terminator: str = "*",
+ alt_prompt_terminator: str = "*",
+ delay_factor: float = 1.0,
+ pattern: Optional[str] = None,
+ ) -> str:
+ """
+ Teldat base prompt is "hostname *"
+ """
+ return super().set_base_prompt(
+ pri_prompt_terminator=pri_prompt_terminator,
+ alt_prompt_terminator=alt_prompt_terminator,
+ delay_factor=delay_factor,
+ pattern=pattern,
+ )
+
+ def cleanup(self, command: str = "logout") -> None:
+ """Gracefully exit the SSH session."""
+ self._base_mode()
+
+ if self.session_log:
+ self.session_log.fin = True
+
+ # Always try to send final 'logout'
+ self.write_channel(command + self.RETURN)
+ output = ""
+ for _ in range(30):
+ time.sleep(0.1)
+ output += self.read_channel()
+ if "Do you wish to end" in output:
+ self.write_channel("yes" + self.RETURN)
+ break
+
+ def _check_monitor_mode(self, check_string: str = "+", pattern: str = "") -> bool:
+ return super().check_config_mode(check_string=check_string, pattern=pattern)
+
+ def check_config_mode(
+ self, check_string: str = ">", pattern: str = "", force_regex: bool = False
+ ) -> bool:
+ return super().check_config_mode(
+ check_string=check_string, pattern=pattern, force_regex=force_regex
+ )
+
+ def _check_running_config_mode(
+ self, check_string: str = "$", pattern: str = ""
+ ) -> bool:
+ return super().check_config_mode(check_string=check_string, pattern=pattern)
+
+ def _monitor_mode(
+ self, monitor_command: str = "p 3", pattern: str = r"\+", re_flags: int = 0
+ ) -> str:
+ """
+ Enter into monitor_mode.
+ On Teldat devices always go to base mode before entering other modes
+ Cannot reuse super.config_mode() because config mode check is called only with
+ defaults in BaseConnection
+ """
+ self._base_mode() # Teldat does not allow mode switching, go to base mode first
+
+ output = ""
+ self.write_channel(self.normalize_cmd(monitor_command))
+ # Make sure you read until you detect the command echo (avoid getting out of sync)
+ if self.global_cmd_verify is not False:
+ output += self.read_until_pattern(
+ pattern=re.escape(monitor_command.strip())
+ )
+ if not re.search(pattern, output, flags=re_flags):
+ output += self.read_until_pattern(pattern=pattern, re_flags=re_flags)
+ if not self._check_monitor_mode():
+ raise ValueError("Failed to enter monitor mode.")
+ return output
+
+ def config_mode(
+ self, config_command: str = "p 4", pattern: str = "onfig>", re_flags: int = 0
+ ) -> str:
+ self._base_mode()
+ return super().config_mode(
+ config_command=config_command, pattern=pattern, re_flags=re_flags
+ )
+
+ def _running_config_mode(
+ self, config_command: str = "p 5", pattern: str = r"onfig\$", re_flags: int = 0
+ ) -> str:
+ """Enter running config mode."""
+ self._base_mode()
+
+ output = ""
+ self.write_channel(self.normalize_cmd(config_command))
+ # Make sure you read until you detect the command echo (avoid getting out of sync)
+ if self.global_cmd_verify is not False:
+ output += self.read_until_pattern(pattern=re.escape(config_command.strip()))
+ if not re.search(pattern, output, flags=re_flags):
+ output += self.read_until_pattern(pattern=pattern, re_flags=re_flags)
+ if not self._check_running_config_mode():
+ raise ValueError("Failed to enter running config mode.")
+ return output
+
+ def send_config_set(
+ self,
+ config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None,
+ *,
+ exit_config_mode: bool = False,
+ **kwargs: Any,
+ ) -> str:
+ """
+ For Teldat devices always enter config mode
+ """
+ return super().send_config_set(
+ config_commands=config_commands,
+ exit_config_mode=exit_config_mode,
+ **kwargs,
+ )
+
+ def save_config(
+ self, cmd: str = "save yes", confirm: bool = False, confirm_response: str = ""
+ ) -> str:
+ if not self.check_config_mode() or not self._check_running_config_mode():
+ raise ValueError("Cannot save if not in config or running config mode")
+ # Some devices are slow so match on trailing-prompt if you can
+ output = self._send_command_str(
+ command_string=cmd, strip_prompt=False, strip_command=False
+ )
+ return output
+
+ def exit_config_mode(self, exit_config: str = "", pattern: str = "") -> str:
+ return self._base_mode()
+
+ def _base_mode(self, exit_cmd: str = "\x10", pattern: str = r"\*") -> str:
+ """
+ Exit from other modes (monitor, config, running config).
+ Send CTRL+P to the device
+ """
+ output = ""
+ self.write_channel(self.normalize_cmd(exit_cmd))
+ # Teldat - exit_cmd not printable
+ output += self.read_until_pattern(pattern=pattern)
+ log.debug(f"_base_mode: {output}")
+ return output
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.
+
Initialize attributes for establishing connection to target device.
+
+ :param ip: IP address of target device. Not required if <code>host</code> is
+ provided.
+
+ :param host: Hostname of target device. Not required if <code>ip</code> is
+ provided.
+
+ :param username: Username to authenticate against target device if
+ required.
+
+ :param password: Password to authenticate against target device if
+ required.
+
+ :param secret: The enable password if target device requires one.
+
+ :param port: The destination port used to connect to the target
+ device.
+
+ :param device_type: Class selection based on device type.
+
+ :param verbose: Enable additional messages to standard output.
+
+ :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
+
+ :param use_keys: Connect to target device using SSH keys.
+
+ :param key_file: Filename path of the SSH key file to use.
+
+ :param pkey: SSH key object to use.
+
+ :param passphrase: Passphrase to use for encrypted key; password will be used for key
+ decryption if not specified.
+
+ :param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
+ documentation for a description of the expected format.
+
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
+ :param allow_agent: Enable use of SSH key-agent.
+
+ :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
+ means unknown SSH host keys will be accepted).
+
+ :param system_host_keys: Load host keys from the users known_hosts file.
+
+ :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in
+ alt_key_file.
+
+ :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
+
+ :param ssh_config_file: File name of OpenSSH configuration file.
+
+ :param conn_timeout: TCP connection timeout.
+
+ :param session_timeout: Set a timeout for parallel requests.
+
+ :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
+
+ :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
+ :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
+ Currently defaults to 0, for backwards compatibility (it will not attempt
+ to keep the connection alive).
+
+ :param default_enter: Character(s) to send to correspond to enter key (default:
+
+
).
+
:param response_return: Character(s) to use in normalized return data to represent
+ enter key (default:
+
+
)
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+ to select smallest of global and specific. Sets default global_delay_factor to .1
+ (default: True)
+
+ :param session_log: File path or BufferedIOBase subclass object to write the session log to.
+
+ :param session_log_record_writes: The session log generally only records channel reads due
+ to eliminate command duplication due to command echo. You can enable this if you
+ want to record both channel reads and channel writes in the log (default: False).
+
+ :param session_log_file_mode: "write" or "append" for session_log file mode
+ (default: "write")
+
+ :param allow_auto_change: Allow automatic configuration changes for terminal settings.
+ (default: False)
+
+ :param encoding: Encoding to be used when writing bytes to the output channel.
+ (default: ascii)
+
+ :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for
+ communication to the target host (default: None).
+
+ :param global_cmd_verify: Control whether command echo verification is enabled or disabled
+ (default: None). Global attribute takes precedence over function <code>cmd\_verify</code>
+ argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument.
+
+ :param auto_connect: Control whether Netmiko automatically establishes the connection as
+ part of the object creation (default: True).
+
+ :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
+ 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
+ eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
+
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.
+
Initialize attributes for establishing connection to target device.
+
+ :param ip: IP address of target device. Not required if <code>host</code> is
+ provided.
+
+ :param host: Hostname of target device. Not required if <code>ip</code> is
+ provided.
+
+ :param username: Username to authenticate against target device if
+ required.
+
+ :param password: Password to authenticate against target device if
+ required.
+
+ :param secret: The enable password if target device requires one.
+
+ :param port: The destination port used to connect to the target
+ device.
+
+ :param device_type: Class selection based on device type.
+
+ :param verbose: Enable additional messages to standard output.
+
+ :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
+
+ :param use_keys: Connect to target device using SSH keys.
+
+ :param key_file: Filename path of the SSH key file to use.
+
+ :param pkey: SSH key object to use.
+
+ :param passphrase: Passphrase to use for encrypted key; password will be used for key
+ decryption if not specified.
+
+ :param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
+ documentation for a description of the expected format.
+
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
+ :param allow_agent: Enable use of SSH key-agent.
+
+ :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
+ means unknown SSH host keys will be accepted).
+
+ :param system_host_keys: Load host keys from the users known_hosts file.
+
+ :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in
+ alt_key_file.
+
+ :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
+
+ :param ssh_config_file: File name of OpenSSH configuration file.
+
+ :param conn_timeout: TCP connection timeout.
+
+ :param session_timeout: Set a timeout for parallel requests.
+
+ :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
+
+ :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
+ :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
+ Currently defaults to 0, for backwards compatibility (it will not attempt
+ to keep the connection alive).
+
+ :param default_enter: Character(s) to send to correspond to enter key (default:
+
+
).
+
:param response_return: Character(s) to use in normalized return data to represent
+ enter key (default:
+
+
)
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+ to select smallest of global and specific. Sets default global_delay_factor to .1
+ (default: True)
+
+ :param session_log: File path or BufferedIOBase subclass object to write the session log to.
+
+ :param session_log_record_writes: The session log generally only records channel reads due
+ to eliminate command duplication due to command echo. You can enable this if you
+ want to record both channel reads and channel writes in the log (default: False).
+
+ :param session_log_file_mode: "write" or "append" for session_log file mode
+ (default: "write")
+
+ :param allow_auto_change: Allow automatic configuration changes for terminal settings.
+ (default: False)
+
+ :param encoding: Encoding to be used when writing bytes to the output channel.
+ (default: ascii)
+
+ :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for
+ communication to the target host (default: None).
+
+ :param global_cmd_verify: Control whether command echo verification is enabled or disabled
+ (default: None). Global attribute takes precedence over function <code>cmd\_verify</code>
+ argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument.
+
+ :param auto_connect: Control whether Netmiko automatically establishes the connection as
+ part of the object creation (default: True).
+
+ :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
+ 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
+ eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
+
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -105,7 +108,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -113,6 +116,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -124,7 +131,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -156,6 +165,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -277,7 +292,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -285,6 +300,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -296,7 +315,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -328,6 +349,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -338,7 +362,7 @@
Inherited members
def telnet_login(self, *args: Any, **kwargs: Any) -> str:
# Disable automatic handling of username and password when using terminal server driver
- pass
+ return ""
def std_login(self, *args: Any, **kwargs: Any) -> str:
return super().telnet_login(*args, **kwargs)
diff --git a/docs/netmiko/terminal_server/terminal_server.html b/docs/netmiko/terminal_server/terminal_server.html
index 956432450..c61b6916b 100644
--- a/docs/netmiko/terminal_server/terminal_server.html
+++ b/docs/netmiko/terminal_server/terminal_server.html
@@ -56,7 +56,7 @@
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -130,7 +133,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -138,6 +141,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -149,7 +156,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -181,6 +190,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -328,7 +343,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -336,6 +351,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -347,7 +366,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -379,6 +400,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -500,7 +527,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -508,6 +535,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -519,7 +550,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -551,6 +584,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -561,7 +597,7 @@
Inherited members
def telnet_login(self, *args: Any, **kwargs: Any) -> str:
# Disable automatic handling of username and password when using terminal server driver
- pass
+ return ""
def std_login(self, *args: Any, **kwargs: Any) -> str:
return super().telnet_login(*args, **kwargs)
diff --git a/docs/netmiko/tplink/index.html b/docs/netmiko/tplink/index.html
index e08b5783e..03af3f0d0 100644
--- a/docs/netmiko/tplink/index.html
+++ b/docs/netmiko/tplink/index.html
@@ -90,6 +90,9 @@
Classes
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -104,7 +107,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -112,6 +115,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -123,7 +130,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -155,6 +164,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -288,6 +300,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -302,7 +317,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -310,6 +325,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -321,7 +340,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -353,6 +374,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
enable all functions.
"""
+ msg = """
+Failed to enter enable mode. Please ensure you pass
+the 'secret' argument to ConnectHandler.
+"""
+
# If end-user passes in "cmd" execute that using normal process.
if cmd:
- return super().enable(cmd=cmd, pattern=pattern, re_flags=re_flags)
+ return super().enable(
+ cmd=cmd,
+ pattern=pattern,
+ enable_pattern=enable_pattern,
+ check_state=check_state,
+ re_flags=re_flags,
+ )
output = ""
- msg = (
- "Failed to enter enable mode. Please ensure you pass "
- "the 'secret' argument to ConnectHandler."
- )
+ if check_state and self.check_enable_mode():
+ return output
- cmds = ["enable", "enable-admin"]
- if not self.check_enable_mode():
- for cmd in cmds:
- self.write_channel(self.normalize_cmd(cmd))
- try:
- output += self.read_until_prompt_or_pattern(
- pattern=pattern, re_flags=re_flags, read_entire_line=True
- )
+ for cmd in ("enable", "enable-admin"):
+ self.write_channel(self.normalize_cmd(cmd))
+ try:
+ new_data = self.read_until_prompt_or_pattern(
+ pattern=pattern, re_flags=re_flags, read_entire_line=True
+ )
+ output += new_data
+ if re.search(pattern, new_data):
self.write_channel(self.normalize_cmd(self.secret))
output += self.read_until_prompt(read_entire_line=True)
- except NetmikoTimeoutException:
- raise ValueError(msg)
- if not self.check_enable_mode():
- raise ValueError(msg)
+ except ReadTimeout:
+ raise ValueError(msg)
+
+ if not self.check_enable_mode():
+ raise ValueError(msg)
return output
def config_mode(
@@ -274,6 +285,9 @@
Classes
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -288,7 +302,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -296,6 +310,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -307,7 +325,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -339,6 +359,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
TPLink JetStream requires you to first execute "enable" and then execute "enable-admin".
@@ -520,46 +554,57 @@
Methods
Expand source code
-
def enable(
- self,
- cmd: str = "",
- pattern: str = "ssword",
- enable_pattern: Optional[str] = None,
- re_flags: int = re.IGNORECASE,
-) -> str:
- """
- TPLink JetStream requires you to first execute "enable" and then execute "enable-admin".
- This is necessary as "configure" is generally only available at "enable-admin" level
+
def enable(
+ self,
+ cmd: str = "",
+ pattern: str = "ssword",
+ enable_pattern: Optional[str] = None,
+ check_state: bool = True,
+ re_flags: int = re.IGNORECASE,
+ ) -> str:
+ """
+ TPLink JetStream requires you to first execute "enable" and then execute "enable-admin".
+ This is necessary as "configure" is generally only available at "enable-admin" level
- If the user does not have the Admin role, he will need to execute enable-admin to really
- enable all functions.
- """
+ If the user does not have the Admin role, he will need to execute enable-admin to really
+ enable all functions.
+ """
- # If end-user passes in "cmd" execute that using normal process.
- if cmd:
- return super().enable(cmd=cmd, pattern=pattern, re_flags=re_flags)
+ msg = """
+Failed to enter enable mode. Please ensure you pass
+the 'secret' argument to ConnectHandler.
+"""
- output = ""
- msg = (
- "Failed to enter enable mode. Please ensure you pass "
- "the 'secret' argument to ConnectHandler."
- )
-
- cmds = ["enable", "enable-admin"]
- if not self.check_enable_mode():
- for cmd in cmds:
+ # If end-user passes in "cmd" execute that using normal process.
+ if cmd:
+ return super().enable(
+ cmd=cmd,
+ pattern=pattern,
+ enable_pattern=enable_pattern,
+ check_state=check_state,
+ re_flags=re_flags,
+ )
+
+ output = ""
+ if check_state and self.check_enable_mode():
+ return output
+
+ for cmd in ("enable", "enable-admin"):
self.write_channel(self.normalize_cmd(cmd))
try:
- output += self.read_until_prompt_or_pattern(
+ new_data = self.read_until_prompt_or_pattern(
pattern=pattern, re_flags=re_flags, read_entire_line=True
)
- self.write_channel(self.normalize_cmd(self.secret))
- output += self.read_until_prompt(read_entire_line=True)
- except NetmikoTimeoutException:
- raise ValueError(msg)
- if not self.check_enable_mode():
+ output += new_data
+ if re.search(pattern, new_data):
+ self.write_channel(self.normalize_cmd(self.secret))
+ output += self.read_until_prompt(read_entire_line=True)
+ except ReadTimeout:
raise ValueError(msg)
- return output
+
+ if not self.check_enable_mode():
+ raise ValueError(msg)
+ return output
@@ -753,6 +798,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -767,7 +815,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -775,6 +823,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -786,7 +838,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -818,6 +872,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -951,6 +1008,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -965,7 +1025,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -973,6 +1033,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -984,7 +1048,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -1016,6 +1082,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
Implements support for Ubiquity EdgeSwitch devices.
@@ -167,6 +167,9 @@
Classes
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -181,7 +184,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -189,6 +192,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -200,7 +207,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -232,6 +241,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
import time
+import re
+from typing import Any, Optional
+from netmiko.base_connection import BaseConnection
from netmiko.vyos.vyos_ssh import VyOSSSH
+from netmiko.scp_handler import BaseFileTransfer
class UbiquitiEdgeRouterSSH(VyOSSSH):
"""Implement methods for interacting with EdgeOS EdgeRouter network devices."""
+ def _enter_shell(self) -> str:
+ """Already in shell."""
+ return ""
+
+ def _return_cli(self) -> str:
+ """The shell is the CLI."""
+ return ""
+
def session_preparation(self) -> None:
"""Prepare the session after the connection has been established."""
self._test_channel_read()
@@ -52,7 +64,60 @@
Module netmiko.ubiquiti.edgerouter_ssh
output = self._send_command_str(command_string=cmd)
if "Done" not in output:
raise ValueError(f"Save failed with following errors:\n\n{output}")
- return output
Implement methods for interacting with EdgeOS EdgeRouter network devices.
@@ -107,6 +315,9 @@
Classes
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -121,7 +332,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -129,6 +340,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -140,7 +355,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -172,6 +389,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -180,6 +400,14 @@
Classes
class UbiquitiEdgeRouterSSH(VyOSSSH):
"""Implement methods for interacting with EdgeOS EdgeRouter network devices."""
+ def _enter_shell(self) -> str:
+ """Already in shell."""
+ return ""
+
+ def _return_cli(self) -> str:
+ """The shell is the CLI."""
+ return ""
+
def session_preparation(self) -> None:
"""Prepare the session after the connection has been established."""
self._test_channel_read()
@@ -275,6 +503,14 @@
Implement methods for interacting with EdgeOS EdgeRouter network devices.
@@ -104,6 +251,9 @@
Classes
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -118,7 +268,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -126,6 +276,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -137,7 +291,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -169,6 +325,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -177,6 +336,14 @@
Classes
class UbiquitiEdgeRouterSSH(VyOSSSH):
"""Implement methods for interacting with EdgeOS EdgeRouter network devices."""
+ def _enter_shell(self) -> str:
+ """Already in shell."""
+ return ""
+
+ def _return_cli(self) -> str:
+ """The shell is the CLI."""
+ return ""
+
def session_preparation(self) -> None:
"""Prepare the session after the connection has been established."""
self._test_channel_read()
@@ -257,7 +424,7 @@
Implements support for Ubiquity EdgeSwitch devices.
@@ -300,6 +467,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -314,7 +484,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -322,6 +492,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -333,7 +507,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -365,6 +541,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
Implements support for Ubiquity EdgeSwitch devices.
@@ -668,6 +832,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -682,7 +849,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -690,6 +857,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -701,7 +872,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -733,6 +906,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
Implements support for Ubiquity EdgeSwitch devices.
@@ -122,6 +122,9 @@
Classes
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -136,7 +139,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -144,6 +147,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -155,7 +162,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -187,6 +196,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
Implement methods for interacting with VyOS network devices.
@@ -90,6 +90,9 @@
Classes
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -104,7 +107,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -112,6 +115,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -123,7 +130,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -155,6 +164,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
Implement methods for interacting with VyOS network devices.
@@ -224,6 +224,9 @@
Classes
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -238,7 +241,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -246,6 +249,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -257,7 +264,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -289,6 +298,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
Implements methods for communicating with Watchguard Firebox firewalls.
@@ -124,6 +124,9 @@
Classes
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -138,7 +141,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -146,6 +149,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -157,7 +164,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -189,6 +198,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -231,7 +243,7 @@
Classes
def save_config(self, *args: Any, **kwargs: Any) -> str:
"""No save config on Watchguard."""
- pass
+ return ""
Ancestors
@@ -268,7 +280,7 @@
Methods
def save_config(self, *args: Any, **kwargs: Any) -> str:
"""No save config on Watchguard."""
- pass
Implements methods for communicating with Watchguard Firebox firewalls.
@@ -90,6 +90,9 @@
Classes
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -104,7 +107,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -112,6 +115,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -123,7 +130,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -155,6 +164,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -197,7 +209,7 @@
Classes
def save_config(self, *args: Any, **kwargs: Any) -> str:
"""No save config on Watchguard."""
- pass
+ return ""
Ancestors
@@ -234,7 +246,7 @@
Methods
def save_config(self, *args: Any, **kwargs: Any) -> str:
"""No save config on Watchguard."""
- pass
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -105,7 +108,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -113,6 +116,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -124,7 +131,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -156,6 +165,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -263,6 +275,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -277,7 +292,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -285,6 +300,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -296,7 +315,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -328,6 +349,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -188,7 +196,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -196,6 +204,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -207,7 +219,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -239,6 +253,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -530,7 +555,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -538,6 +563,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -549,7 +578,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -581,6 +612,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
@@ -688,6 +722,9 @@
Inherited members
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -702,7 +739,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -710,6 +747,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -721,7 +762,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -753,6 +796,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -105,7 +108,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -113,6 +116,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -124,7 +131,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -156,6 +165,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -276,7 +291,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -284,6 +299,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -295,7 +314,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -327,6 +348,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -160,7 +163,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -168,6 +171,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -179,7 +186,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -211,6 +220,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -413,7 +411,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -421,6 +419,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -432,7 +434,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -464,6 +468,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -584,7 +594,7 @@
Inherited members
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -592,6 +602,10 @@
Inherited members
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -603,7 +617,9 @@
Inherited members
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -635,6 +651,9 @@
Inherited members
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -112,7 +115,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -120,6 +123,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -131,7 +138,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -163,6 +172,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
:param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
documentation for a description of the expected format.
+ :param disable_sha2_fix: Boolean that fixes Paramiko issue with missing server-sig-algs
+ <https://github.com/paramiko/paramiko/issues/1961> (default: False)
+
:param allow_agent: Enable use of SSH key-agent.
:param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
@@ -131,7 +134,7 @@
Classes
:param ssh_config_file: File name of OpenSSH configuration file.
- :param timeout: Connection timeout.
+ :param conn_timeout: TCP connection timeout.
:param session_timeout: Set a timeout for parallel requests.
@@ -139,6 +142,10 @@
Classes
:param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+ :param read_timeout_override: Set a timeout that will override the default read_timeout
+ of both send_command and send_command_timing. This is useful for 3rd party
+ libraries where directly accessing method arguments might be impractical.
+
:param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
Currently defaults to 0, for backwards compatibility (it will not attempt
to keep the connection alive).
@@ -150,7 +157,9 @@
Classes
enter key (default:
)
-
:param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+
:param serial_settings: Dictionary of settings for use with serial port (pySerial).
+
+ :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
to select smallest of global and specific. Sets default global_delay_factor to .1
(default: True)
@@ -182,6 +191,9 @@
Classes
:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
eliminated in Netmiko 5.x (default: False).
+
+ :param disable_lf_normalization: Disable Netmiko's linefeed normalization behavior
+ (default: False)
From 88232d81e09817d2a47cf5a40b94a0fd3e528cda Mon Sep 17 00:00:00 2001
From: Kirk Byers
Date: Fri, 5 May 2023 09:21:43 -0700
Subject: [PATCH 67/70] Roll version (#3197)
---
netmiko/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/netmiko/__init__.py b/netmiko/__init__.py
index 2c171c754..13d586d51 100644
--- a/netmiko/__init__.py
+++ b/netmiko/__init__.py
@@ -1,6 +1,6 @@
import sys
-__version__ = "4.1.3"
+__version__ = "4.2.0"
PY_MAJ_VER = 3
PY_MIN_VER = 7
MIN_PYTHON_VER = "3.7"
From 9c84582d1bed6614c7027219bb59033cfaed7458 Mon Sep 17 00:00:00 2001
From: Kirk Byers
Date: Fri, 5 May 2023 10:54:07 -0700
Subject: [PATCH 68/70] Performance graph updates for Netmiko 4.2.0 (#3201)
---
_release.sh | 4 ++--
release_process.txt | 6 +++---
tests/performance/graphs/netmiko_arista_eos.svg | 6 +++---
tests/performance/graphs/netmiko_cisco_ios.svg | 6 +++---
tests/performance/graphs/netmiko_cisco_nxos.svg | 6 +++---
tests/performance/graphs/netmiko_cisco_xe.svg | 6 +++---
tests/performance/graphs/netmiko_cisco_xr.svg | 6 +++---
tests/performance/graphs/netmiko_hp_procurve.svg | 6 +++---
tests/performance/graphs/netmiko_juniper_junos.svg | 6 +++---
tests/performance/netmiko_performance.csv | 10 ++++++++--
tests/performance/performance_report.md | 10 +++++-----
tests/performance/requirements.txt | 1 -
tests/performance/test_netmiko.py | 4 +---
tests/performance/test_performance.sh | 2 +-
14 files changed, 41 insertions(+), 38 deletions(-)
diff --git a/_release.sh b/_release.sh
index d92864337..11f531dc3 100755
--- a/_release.sh
+++ b/_release.sh
@@ -20,7 +20,7 @@ while true; do
esac
done
-pylama
+pylama .
if [ $? -eq 0 ]; then
echo
echo "pylama ... [OK]"
@@ -32,7 +32,7 @@ else
fi
echo
-python setup.py sdist bdist_wheel > /dev/null
+poetry build > /dev/null
if [ $? -eq 0 ]; then
echo "creating distribution ... [OK]"
ls -ltr $DIR_PACKAGE
diff --git a/release_process.txt b/release_process.txt
index f6d476429..fca57d72f 100644
--- a/release_process.txt
+++ b/release_process.txt
@@ -13,13 +13,13 @@ $ pdoc3 --html --output-dir docs netmiko --force
# Merge into master / checkout master (use PR in GitHub for this)
-# python setup.py sdist bdist_wheel
+# poetry build
# Run ./_release.sh
# Create a tag for the version
-git tag -a v4.1.0 -m "Version 4.1.0 Release"
-git push origin_ssh v4.1.0
+git tag -a v4.2.0 -m "Version 4.2.0 Release"
+git push origin_ssh v4.2.0
# Make sure to run the performance tests for the new release and to update the graphs!
diff --git a/tests/performance/graphs/netmiko_arista_eos.svg b/tests/performance/graphs/netmiko_arista_eos.svg
index d2b08c962..5a9f0f0a8 100644
--- a/tests/performance/graphs/netmiko_arista_eos.svg
+++ b/tests/performance/graphs/netmiko_arista_eos.svg
@@ -1,4 +1,4 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/tests/performance/graphs/netmiko_cisco_ios.svg b/tests/performance/graphs/netmiko_cisco_ios.svg
index 3f3d86a6f..6d5444a9e 100644
--- a/tests/performance/graphs/netmiko_cisco_ios.svg
+++ b/tests/performance/graphs/netmiko_cisco_ios.svg
@@ -1,4 +1,4 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/tests/performance/graphs/netmiko_cisco_nxos.svg b/tests/performance/graphs/netmiko_cisco_nxos.svg
index 69b0a37c9..14c784f38 100644
--- a/tests/performance/graphs/netmiko_cisco_nxos.svg
+++ b/tests/performance/graphs/netmiko_cisco_nxos.svg
@@ -1,4 +1,4 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/tests/performance/graphs/netmiko_cisco_xe.svg b/tests/performance/graphs/netmiko_cisco_xe.svg
index 7d28a82ae..23a76be92 100644
--- a/tests/performance/graphs/netmiko_cisco_xe.svg
+++ b/tests/performance/graphs/netmiko_cisco_xe.svg
@@ -1,4 +1,4 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/tests/performance/graphs/netmiko_cisco_xr.svg b/tests/performance/graphs/netmiko_cisco_xr.svg
index cf60993ca..ca59878fa 100644
--- a/tests/performance/graphs/netmiko_cisco_xr.svg
+++ b/tests/performance/graphs/netmiko_cisco_xr.svg
@@ -1,4 +1,4 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/tests/performance/graphs/netmiko_hp_procurve.svg b/tests/performance/graphs/netmiko_hp_procurve.svg
index 04f367988..bb2997c69 100644
--- a/tests/performance/graphs/netmiko_hp_procurve.svg
+++ b/tests/performance/graphs/netmiko_hp_procurve.svg
@@ -1,4 +1,4 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/tests/performance/graphs/netmiko_juniper_junos.svg b/tests/performance/graphs/netmiko_juniper_junos.svg
index bc04f966e..107594272 100644
--- a/tests/performance/graphs/netmiko_juniper_junos.svg
+++ b/tests/performance/graphs/netmiko_juniper_junos.svg
@@ -1,4 +1,4 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/tests/performance/netmiko_performance.csv b/tests/performance/netmiko_performance.csv
index 6e3288e81..37de1d1fb 100644
--- a/tests/performance/netmiko_performance.csv
+++ b/tests/performance/netmiko_performance.csv
@@ -68,5 +68,11 @@ date,netmiko_version,device_name,connect,send_command_simple,send_config_simple,
2022-4-27 14:26:2,4.1.0,arista1,0:00:01.788259,0:00:02.563968,0:00:02.715299,0:00:28.072290
2022-4-27 14:26:34,4.1.0,juniper_vmx,0:00:03.491516,0:00:03.979298,0:00:03.606049,0:00:17.841704
2022-4-27 14:29:21,4.1.0,hp_procurve,0:00:01.873823,0:00:02.322253,0:00:02.099819,0:00:10.649204
-2022-5-20 11:38:5,4.1.0,linux_srv1,0:00:03.349217,0:00:03.523378,0:00:04.188625,0:00:10.252565
-2022-5-20 13:8:5,4.1.1-a1,linux_srv1,0:00:01.082305,0:00:01.244256,0:00:01.651606,0:00:07.775715
+2023-5-5 10:41:36,4.2.0,cisco1,0:00:00.950239,0:00:01.018443,0:00:01.222409,0:00:04.190270
+2023-5-5 10:41:49,4.2.0,cisco3,0:00:00.794856,0:00:00.889877,0:00:00.923853,0:00:09.778762
+2023-5-5 10:42:7,4.2.0,cisco5,0:00:01.488929,0:00:01.200243,0:00:01.568345,0:00:12.064722
+2023-5-5 10:42:50,4.2.0,nxos1,0:00:02.870104,0:00:02.917957,0:00:04.182973,0:00:28.401443
+2023-5-5 10:43:12,4.2.0,cisco_xr_azure,0:00:02.106241,0:00:02.385522,0:00:03.130367,0:00:11.635060
+2023-5-5 10:43:22,4.2.0,arista1,0:00:00.959298,0:00:01.146205,0:00:01.126909,0:00:05.723498
+2023-5-5 10:43:55,4.2.0,juniper_vmx,0:00:03.352394,0:00:03.991835,0:00:03.718561,0:00:18.232042
+2023-5-5 10:46:42,4.2.0,hp_procurve,0:00:01.922824,0:00:02.093454,0:00:02.080615,0:00:10.503179
diff --git a/tests/performance/performance_report.md b/tests/performance/performance_report.md
index e4fff7b9c..b527ca8d7 100644
--- a/tests/performance/performance_report.md
+++ b/tests/performance/performance_report.md
@@ -1,10 +1,10 @@
# Netmiko performance
![](graphs/netmiko_arista_eos.svg)
-![](graphs/netmiko_cisco_xr.svg)
-![](graphs/netmiko_cisco_xe.svg)
-![](graphs/netmiko_cisco_ios.svg)
![](graphs/netmiko_cisco_asa.svg)
-![](graphs/netmiko_juniper_junos.svg)
+![](graphs/netmiko_cisco_ios.svg)
![](graphs/netmiko_cisco_nxos.svg)
-![](graphs/netmiko_hp_procurve.svg)
\ No newline at end of file
+![](graphs/netmiko_cisco_xe.svg)
+![](graphs/netmiko_cisco_xr.svg)
+![](graphs/netmiko_hp_procurve.svg)
+![](graphs/netmiko_juniper_junos.svg)
\ No newline at end of file
diff --git a/tests/performance/requirements.txt b/tests/performance/requirements.txt
index f831c367e..1e61c5755 100644
--- a/tests/performance/requirements.txt
+++ b/tests/performance/requirements.txt
@@ -1,3 +1,2 @@
-pyaml
pygal
jinja2
diff --git a/tests/performance/test_netmiko.py b/tests/performance/test_netmiko.py
index 433bba473..180301eb0 100644
--- a/tests/performance/test_netmiko.py
+++ b/tests/performance/test_netmiko.py
@@ -176,10 +176,8 @@ def main():
for dev_name, params in devices.items():
remove_old_data(dev_name)
dev_dict = params["device"]
- if dev_name != "linux_srv1":
+ if dev_name == "linux_srv1":
continue
- # if dev_name != "cisco_xr_azure":
- # continue
print("-" * 80)
print(f"Device name: {dev_name}")
print("-" * 12)
diff --git a/tests/performance/test_performance.sh b/tests/performance/test_performance.sh
index a318610e4..766ffa525 100755
--- a/tests/performance/test_performance.sh
+++ b/tests/performance/test_performance.sh
@@ -2,7 +2,7 @@
export PYTHONPATH=~/netmiko/tests
-pip show pyaml pygal jinja2
+pip show pygal jinja2
if [ $? -eq 0 ]; then
echo
echo "Checking dependencies ... [OK]"
From f5bf592d894b1b2177b347e2116202f72cdbf95b Mon Sep 17 00:00:00 2001
From: Kirk Byers
Date: Fri, 5 May 2023 11:00:31 -0700
Subject: [PATCH 69/70] Updating platforms.md for new drivers (#3202)
---
PLATFORMS.md | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/PLATFORMS.md b/PLATFORMS.md
index 19e6291be..5f5aad830 100644
--- a/PLATFORMS.md
+++ b/PLATFORMS.md
@@ -3,7 +3,6 @@
###### Regularly tested
- Arista vEOS
-- Cisco ASA
- Cisco IOS
- Cisco IOS-XE
- Cisco IOS-XR
@@ -17,7 +16,7 @@
- 6Wind
- Adtran OS
-- Adva AOS FSP150
+- Adva AOS FSP150 F2 & F3
- Alcatel AOS6/AOS8
- Apresia Systems AEOS
- AudioCodes Gateways & Controllers
@@ -25,11 +24,14 @@
- Calix B6
- Centec Networks
- Cisco AireOS (Wireless LAN Controllers)
+- Cisco ASA
+- Cisco S200
- CloudGenix ION
- Dell OS9 (Force10)
- Dell OS10
- Dell PowerConnect
- Ericsson IPOS
+- Ericsson MINI-LINK 66XX & 63XX
- Extreme ERS (Avaya)
- Extreme MLX/NetIron (Brocade/Foundry)
- Extreme TierraOS
@@ -55,6 +57,7 @@
- Ruckus ICX/FastIron
- Ruijie Networks
- Supermicro SMIS
+- Teldat CIT
- TPLink JetStream
- Ubiquiti EdgeSwitch
- Vyatta VyOS
From e489d99132af4a17546aea9dfe283f35854aa95a Mon Sep 17 00:00:00 2001
From: Kirk Byers
Date: Fri, 5 May 2023 11:09:06 -0700
Subject: [PATCH 70/70] Update the supported device types in PLATFORMS.md
(#3203)
---
PLATFORMS.md | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/PLATFORMS.md b/PLATFORMS.md
index 5f5aad830..73673644e 100644
--- a/PLATFORMS.md
+++ b/PLATFORMS.md
@@ -121,6 +121,9 @@
- aruba_os
- aruba_osswitch
- aruba_procurve
+- audiocode_66
+- audiocode_72
+- audiocode_shell
- avaya_ers
- avaya_vsp
- broadcom_icos
@@ -140,6 +143,7 @@
- cisco_ftd
- cisco_ios
- cisco_nxos
+- cisco_s200
- cisco_s300
- cisco_tp
- cisco_viptela
@@ -162,6 +166,8 @@
- endace
- enterasys
- ericsson_ipos
+- ericsson_mltn63
+- ericsson_mltn66
- extreme
- extreme_ers
- extreme_exos
@@ -185,6 +191,7 @@
- huawei
- huawei_olt
- huawei_smartax
+- huawei_vrp
- huawei_vrpv8
- ipinfusion_ocnos
- juniper
@@ -202,8 +209,8 @@
- netapp_cdot
- netgear_prosafe
- netscaler
-- nokia_sros
- nokia_srl
+- nokia_sros
- oneaccess_oneos
- ovs_linux
- paloalto_panos
@@ -216,6 +223,7 @@
- sixwind_os
- sophos_sfos
- supermicro_smis
+- teldat_cit
- tplink_jetstream
- ubiquiti_edge
- ubiquiti_edgerouter
@@ -234,6 +242,9 @@
- apresia_aeos_telnet
- arista_eos_telnet
- aruba_procurve_telnet
+- audiocode_72_telnet
+- audiocode_66_telnet
+- audiocode_shell_telnet
- brocade_fastiron_telnet
- brocade_netiron_telnet
- calix_b6_telnet
@@ -241,6 +252,7 @@
- ciena_saos_telnet
- cisco_ios_telnet
- cisco_xr_telnet
+- cisco_s200_telnet
- cisco_s300_telnet
- dell_dnos6_telnet
- dell_powerconnect_telnet
@@ -264,6 +276,7 @@
- ruckus_fastiron_telnet
- ruijie_os_telnet
- supermicro_smis_telnet
+- teldat_cit_telnet
- tplink_jetstream_telnet
- yamaha_telnet
- zte_zxros_telnet
@@ -282,4 +295,4 @@
- juniper_junos
- linux
- nokia_sros
-
+- ubiquiti_edgerouter