From 0a05ccc1672a31084f0716c5e8da3cfdf05d5315 Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Mon, 8 Jul 2024 14:47:05 -0700 Subject: [PATCH] Update docs for release 4.4.0 --- docs/netmiko/a10/a10_ssh.html | 1 + docs/netmiko/adva/adva_aos_fsp_150_f2.html | 1 + docs/netmiko/adva/adva_aos_fsp_150_f3.html | 1 + docs/netmiko/adva/index.html | 1 + docs/netmiko/alcatel/alcatel_aos_ssh.html | 1 + docs/netmiko/aruba/aruba_aoscx.html | 356 +++++++++++++++ docs/netmiko/aruba/aruba_os.html | 421 ++++++++++++++++++ docs/netmiko/aruba/index.html | 280 +++++++++++- docs/netmiko/base_connection.html | 32 +- docs/netmiko/calix/calix_b6.html | 1 + docs/netmiko/centec/centec_os.html | 1 + docs/netmiko/channel.html | 12 +- docs/netmiko/ciena/ciena_saos.html | 1 + docs/netmiko/cisco/cisco_asa_ssh.html | 1 + docs/netmiko/cisco/cisco_ftd_ssh.html | 1 + docs/netmiko/cisco/cisco_tp_tcce.html | 1 + docs/netmiko/cisco/cisco_viptela.html | 1 + docs/netmiko/cisco/cisco_wlc_ssh.html | 1 + docs/netmiko/cisco/cisco_xr.html | 6 +- docs/netmiko/cisco_base_connection.html | 4 +- docs/netmiko/dell/dell_dnos6.html | 1 + docs/netmiko/dell/dell_force10_ssh.html | 1 + docs/netmiko/dell/dell_os10_ssh.html | 1 + docs/netmiko/dell/dell_powerconnect.html | 1 + docs/netmiko/dell/dell_sonic_ssh.html | 1 + docs/netmiko/digi/digi_transport.html | 1 + docs/netmiko/enterasys/enterasys_ssh.html | 1 + docs/netmiko/ericsson/ericsson_ipos.html | 1 + docs/netmiko/ericsson/ericsson_mltn.html | 1 + docs/netmiko/extreme/extreme_ers_ssh.html | 1 + docs/netmiko/extreme/extreme_exos.html | 1 + docs/netmiko/extreme/extreme_nos_ssh.html | 1 + docs/netmiko/extreme/extreme_slx_ssh.html | 1 + .../netmiko/extreme/extreme_tierraos_ssh.html | 1 + docs/netmiko/extreme/extreme_vsp_ssh.html | 1 + docs/netmiko/fiberstore/fiberstore_fsos.html | 1 + docs/netmiko/huawei/huawei.html | 66 +-- docs/netmiko/huawei/index.html | 22 +- docs/netmiko/index.html | 19 +- docs/netmiko/ipinfusion/index.html | 2 +- docs/netmiko/ipinfusion/ipinfusion_ocnos.html | 16 +- .../netmiko/mellanox/mellanox_mlnxos_ssh.html | 1 + docs/netmiko/mrv/mrv_lx.html | 1 + docs/netmiko/mrv/mrv_ssh.html | 1 + docs/netmiko/netgear/netgear_prosafe_ssh.html | 1 + docs/netmiko/oneaccess/oneaccess_oneos.html | 1 + docs/netmiko/raisecom/index.html | 6 +- docs/netmiko/raisecom/raisecom_roap.html | 26 +- docs/netmiko/ruckus/index.html | 2 +- docs/netmiko/ruckus/ruckus_fastiron.html | 6 +- docs/netmiko/ruijie/ruijie_os.html | 1 + docs/netmiko/scp_functions.html | 1 + docs/netmiko/scp_handler.html | 1 + docs/netmiko/snmp_autodetect.html | 1 + docs/netmiko/sophos/index.html | 12 +- docs/netmiko/sophos/sophos_sfos_ssh.html | 25 +- docs/netmiko/ssh_autodetect.html | 13 + docs/netmiko/telnet_proxy.html | 8 +- .../terminal_server/terminal_server.html | 1 + docs/netmiko/utilities.html | 1 + docs/netmiko/zte/index.html | 2 +- docs/netmiko/zte/zte_zxros.html | 18 +- 62 files changed, 1255 insertions(+), 139 deletions(-) create mode 100644 docs/netmiko/aruba/aruba_aoscx.html create mode 100644 docs/netmiko/aruba/aruba_os.html diff --git a/docs/netmiko/a10/a10_ssh.html b/docs/netmiko/a10/a10_ssh.html index 348d2b42d..e90c924a7 100644 --- a/docs/netmiko/a10/a10_ssh.html +++ b/docs/netmiko/a10/a10_ssh.html @@ -28,6 +28,7 @@

Module netmiko.a10.a10_ssh

Expand source code
"""A10 support."""
+
 from netmiko.cisco_base_connection import CiscoSSHConnection
 
 
diff --git a/docs/netmiko/adva/adva_aos_fsp_150_f2.html b/docs/netmiko/adva/adva_aos_fsp_150_f2.html
index 49f399bce..c4c58c8bc 100644
--- a/docs/netmiko/adva/adva_aos_fsp_150_f2.html
+++ b/docs/netmiko/adva/adva_aos_fsp_150_f2.html
@@ -28,6 +28,7 @@ 

Module netmiko.adva.adva_aos_fsp_150_f2

Expand source code
"""Adva support."""
+
 import re
 from typing import Any, Optional
 from netmiko.no_enable import NoEnable
diff --git a/docs/netmiko/adva/adva_aos_fsp_150_f3.html b/docs/netmiko/adva/adva_aos_fsp_150_f3.html
index e0bc8f3ca..b7bf78950 100644
--- a/docs/netmiko/adva/adva_aos_fsp_150_f3.html
+++ b/docs/netmiko/adva/adva_aos_fsp_150_f3.html
@@ -28,6 +28,7 @@ 

Module netmiko.adva.adva_aos_fsp_150_f3

Expand source code
"""Adva F3 Device Support"""
+
 import re
 from typing import (
     Optional,
diff --git a/docs/netmiko/adva/index.html b/docs/netmiko/adva/index.html
index dcc0045c2..97514c95f 100644
--- a/docs/netmiko/adva/index.html
+++ b/docs/netmiko/adva/index.html
@@ -28,6 +28,7 @@ 

Module netmiko.adva

Expand source code
"""Adva Device Drivers"""
+
 from netmiko.adva.adva_aos_fsp_150_f2 import AdvaAosFsp150F2SSH
 from netmiko.adva.adva_aos_fsp_150_f3 import AdvaAosFsp150F3SSH
 
diff --git a/docs/netmiko/alcatel/alcatel_aos_ssh.html b/docs/netmiko/alcatel/alcatel_aos_ssh.html
index fd67d123d..259c8d896 100644
--- a/docs/netmiko/alcatel/alcatel_aos_ssh.html
+++ b/docs/netmiko/alcatel/alcatel_aos_ssh.html
@@ -28,6 +28,7 @@ 

Module netmiko.alcatel.alcatel_aos_ssh

Expand source code
"""Alcatel-Lucent Enterprise AOS support (AOS6 and AOS8)."""
+
 from netmiko.no_enable import NoEnable
 from netmiko.no_config import NoConfig
 from netmiko.cisco_base_connection import CiscoSSHConnection
diff --git a/docs/netmiko/aruba/aruba_aoscx.html b/docs/netmiko/aruba/aruba_aoscx.html
new file mode 100644
index 000000000..f07f415ae
--- /dev/null
+++ b/docs/netmiko/aruba/aruba_aoscx.html
@@ -0,0 +1,356 @@
+
+
+
+
+
+
+netmiko.aruba.aruba_aoscx API documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Module netmiko.aruba.aruba_aoscx

+
+
+

Aruba AOS CX support.

+

For use with Aruba AOS CX devices.

+
+ +Expand source code + +
"""
+Aruba AOS CX support.
+
+For use with Aruba AOS CX devices.
+
+"""
+
+from typing import Any
+from netmiko.cisco_base_connection import CiscoSSHConnection
+
+
+class ArubaCxSSH(CiscoSSHConnection):
+    """Aruba AOS CX support"""
+
+    def __init__(self, **kwargs: Any) -> None:
+        if kwargs.get("default_enter") is None:
+            kwargs["default_enter"] = "\r"
+        return super().__init__(**kwargs)
+
+    def session_preparation(self) -> None:
+        self.ansi_escape_codes = True
+        self._test_channel_read(pattern=r"[>#]")
+        self.set_base_prompt()
+        self.disable_paging(command="no page")
+
+    def check_config_mode(
+        self,
+        check_string: str = "(config)#",
+        pattern: str = r"[>#]",
+        force_regex: bool = False,
+    ) -> bool:
+        return super().check_config_mode(check_string=check_string, pattern=pattern)
+
+    def config_mode(
+        self,
+        config_command: str = "configure term",
+        pattern: str = "",
+        re_flags: int = 0,
+    ) -> str:
+        """Aruba auto completes on space so 'configure' needs fully spelled-out."""
+        return super().config_mode(
+            config_command=config_command, pattern=pattern, re_flags=re_flags
+        )
+
+
+
+
+
+
+
+
+
+

Classes

+
+
+class ArubaCxSSH +(**kwargs: Any) +
+
+

Aruba AOS CX support

+
    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, SessionLog object, 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: "utf-8")
+
+    :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 sock_telnet: A dictionary of telnet socket parameters (SOCKS proxy). See
+            telnet_proxy.py code for details.
+
+    :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 ArubaCxSSH(CiscoSSHConnection):
+    """Aruba AOS CX support"""
+
+    def __init__(self, **kwargs: Any) -> None:
+        if kwargs.get("default_enter") is None:
+            kwargs["default_enter"] = "\r"
+        return super().__init__(**kwargs)
+
+    def session_preparation(self) -> None:
+        self.ansi_escape_codes = True
+        self._test_channel_read(pattern=r"[>#]")
+        self.set_base_prompt()
+        self.disable_paging(command="no page")
+
+    def check_config_mode(
+        self,
+        check_string: str = "(config)#",
+        pattern: str = r"[>#]",
+        force_regex: bool = False,
+    ) -> bool:
+        return super().check_config_mode(check_string=check_string, pattern=pattern)
+
+    def config_mode(
+        self,
+        config_command: str = "configure term",
+        pattern: str = "",
+        re_flags: int = 0,
+    ) -> str:
+        """Aruba auto completes on space so 'configure' needs fully spelled-out."""
+        return super().config_mode(
+            config_command=config_command, pattern=pattern, re_flags=re_flags
+        )
+
+

Ancestors

+ +

Methods

+
+
+def config_mode(self, config_command: str = 'configure term', pattern: str = '', re_flags: int = 0) ‑> str +
+
+

Aruba auto completes on space so 'configure' needs fully spelled-out.

+
+ +Expand source code + +
def config_mode(
+    self,
+    config_command: str = "configure term",
+    pattern: str = "",
+    re_flags: int = 0,
+) -> str:
+    """Aruba auto completes on space so 'configure' needs fully spelled-out."""
+    return super().config_mode(
+        config_command=config_command, pattern=pattern, re_flags=re_flags
+    )
+
+
+
+

Inherited members

+ +
+
+
+
+ +
+ + + \ No newline at end of file diff --git a/docs/netmiko/aruba/aruba_os.html b/docs/netmiko/aruba/aruba_os.html new file mode 100644 index 000000000..5f6e78aa2 --- /dev/null +++ b/docs/netmiko/aruba/aruba_os.html @@ -0,0 +1,421 @@ + + + + + + +netmiko.aruba.aruba_os API documentation + + + + + + + + + + + +
+
+
+

Module netmiko.aruba.aruba_os

+
+
+

Aruba OS support.

+

For use with Aruba OS Controllers.

+
+ +Expand source code + +
"""
+Aruba OS support.
+
+For use with Aruba OS Controllers.
+
+"""
+
+from typing import Any
+from netmiko.cisco_base_connection import CiscoSSHConnection
+
+
+class ArubaOsSSH(CiscoSSHConnection):
+    """Aruba OS support"""
+
+    def __init__(self, **kwargs: Any) -> None:
+        if kwargs.get("default_enter") is None:
+            kwargs["default_enter"] = "\r"
+        # Aruba has an auto-complete on space behavior that is problematic
+        if kwargs.get("global_cmd_verify") is None:
+            kwargs["global_cmd_verify"] = False
+        return super().__init__(**kwargs)
+
+    def session_preparation(self) -> None:
+        """Aruba OS requires enable mode to disable paging."""
+        # Aruba switches output ansi codes
+        self.ansi_escape_codes = True
+        self._test_channel_read(pattern=r"[>#]")
+        self.set_base_prompt()
+        self.enable()
+        self.disable_paging(command="no paging")
+
+    def check_config_mode(
+        self,
+        check_string: str = "(config) #",
+        pattern: str = r"[>#]",
+        force_regex: bool = False,
+    ) -> bool:
+        """
+        Checks if the device is in configuration mode or not.
+
+        Aruba uses "(<controller name>) (config) #" as config prompt
+        """
+        return super().check_config_mode(check_string=check_string, pattern=pattern)
+
+    def config_mode(
+        self,
+        config_command: str = "configure term",
+        pattern: str = "",
+        re_flags: int = 0,
+    ) -> str:
+        """Aruba auto completes on space so 'configure' needs fully spelled-out."""
+        return super().config_mode(
+            config_command=config_command, pattern=pattern, re_flags=re_flags
+        )
+
+
+
+
+
+
+
+
+
+

Classes

+
+
+class ArubaOsSSH +(**kwargs: Any) +
+
+

Aruba OS support

+
    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, SessionLog object, 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: "utf-8")
+
+    :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 sock_telnet: A dictionary of telnet socket parameters (SOCKS proxy). See
+            telnet_proxy.py code for details.
+
+    :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 ArubaOsSSH(CiscoSSHConnection):
+    """Aruba OS support"""
+
+    def __init__(self, **kwargs: Any) -> None:
+        if kwargs.get("default_enter") is None:
+            kwargs["default_enter"] = "\r"
+        # Aruba has an auto-complete on space behavior that is problematic
+        if kwargs.get("global_cmd_verify") is None:
+            kwargs["global_cmd_verify"] = False
+        return super().__init__(**kwargs)
+
+    def session_preparation(self) -> None:
+        """Aruba OS requires enable mode to disable paging."""
+        # Aruba switches output ansi codes
+        self.ansi_escape_codes = True
+        self._test_channel_read(pattern=r"[>#]")
+        self.set_base_prompt()
+        self.enable()
+        self.disable_paging(command="no paging")
+
+    def check_config_mode(
+        self,
+        check_string: str = "(config) #",
+        pattern: str = r"[>#]",
+        force_regex: bool = False,
+    ) -> bool:
+        """
+        Checks if the device is in configuration mode or not.
+
+        Aruba uses "(<controller name>) (config) #" as config prompt
+        """
+        return super().check_config_mode(check_string=check_string, pattern=pattern)
+
+    def config_mode(
+        self,
+        config_command: str = "configure term",
+        pattern: str = "",
+        re_flags: int = 0,
+    ) -> str:
+        """Aruba auto completes on space so 'configure' needs fully spelled-out."""
+        return super().config_mode(
+            config_command=config_command, pattern=pattern, re_flags=re_flags
+        )
+
+

Ancestors

+ +

Methods

+
+
+def check_config_mode(self, check_string: str = '(config) #', pattern: str = '[>#]', force_regex: bool = False) ‑> bool +
+
+

Checks if the device is in configuration mode or not.

+

Aruba uses "() (config) #" as config prompt

+
+ +Expand source code + +
def check_config_mode(
+    self,
+    check_string: str = "(config) #",
+    pattern: str = r"[>#]",
+    force_regex: bool = False,
+) -> bool:
+    """
+    Checks if the device is in configuration mode or not.
+
+    Aruba uses "(<controller name>) (config) #" as config prompt
+    """
+    return super().check_config_mode(check_string=check_string, pattern=pattern)
+
+
+
+def config_mode(self, config_command: str = 'configure term', pattern: str = '', re_flags: int = 0) ‑> str +
+
+

Aruba auto completes on space so 'configure' needs fully spelled-out.

+
+ +Expand source code + +
def config_mode(
+    self,
+    config_command: str = "configure term",
+    pattern: str = "",
+    re_flags: int = 0,
+) -> str:
+    """Aruba auto completes on space so 'configure' needs fully spelled-out."""
+    return super().config_mode(
+        config_command=config_command, pattern=pattern, re_flags=re_flags
+    )
+
+
+
+def session_preparation(self) ‑> None +
+
+

Aruba OS requires enable mode to disable paging.

+
+ +Expand source code + +
def session_preparation(self) -> None:
+    """Aruba OS requires enable mode to disable paging."""
+    # Aruba switches output ansi codes
+    self.ansi_escape_codes = True
+    self._test_channel_read(pattern=r"[>#]")
+    self.set_base_prompt()
+    self.enable()
+    self.disable_paging(command="no paging")
+
+
+
+

Inherited members

+ +
+
+
+
+ +
+ + + \ No newline at end of file diff --git a/docs/netmiko/aruba/index.html b/docs/netmiko/aruba/index.html index fecf5e266..0ccadf3dc 100644 --- a/docs/netmiko/aruba/index.html +++ b/docs/netmiko/aruba/index.html @@ -26,15 +26,20 @@

Module netmiko.aruba

Expand source code -
from netmiko.aruba.aruba_ssh import ArubaSSH
+
from netmiko.aruba.aruba_aoscx import ArubaCxSSH
+from netmiko.aruba.aruba_os import ArubaOsSSH
 
-__all__ = ["ArubaSSH"]
+__all__ = ["ArubaOsSSH", "ArubaCxSSH"]

Sub-modules

-
netmiko.aruba.aruba_ssh
+
netmiko.aruba.aruba_aoscx
+
+

Aruba AOS CX support …

+
+
netmiko.aruba.aruba_os

Aruba OS support …

@@ -47,8 +52,248 @@

Sub-modules

Classes

-
-class ArubaSSH +
+class ArubaCxSSH +(**kwargs: Any) +
+
+

Aruba AOS CX support

+
    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, SessionLog object, 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: "utf-8")
+
+    :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 sock_telnet: A dictionary of telnet socket parameters (SOCKS proxy). See
+            telnet_proxy.py code for details.
+
+    :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 ArubaCxSSH(CiscoSSHConnection):
+    """Aruba AOS CX support"""
+
+    def __init__(self, **kwargs: Any) -> None:
+        if kwargs.get("default_enter") is None:
+            kwargs["default_enter"] = "\r"
+        return super().__init__(**kwargs)
+
+    def session_preparation(self) -> None:
+        self.ansi_escape_codes = True
+        self._test_channel_read(pattern=r"[>#]")
+        self.set_base_prompt()
+        self.disable_paging(command="no page")
+
+    def check_config_mode(
+        self,
+        check_string: str = "(config)#",
+        pattern: str = r"[>#]",
+        force_regex: bool = False,
+    ) -> bool:
+        return super().check_config_mode(check_string=check_string, pattern=pattern)
+
+    def config_mode(
+        self,
+        config_command: str = "configure term",
+        pattern: str = "",
+        re_flags: int = 0,
+    ) -> str:
+        """Aruba auto completes on space so 'configure' needs fully spelled-out."""
+        return super().config_mode(
+            config_command=config_command, pattern=pattern, re_flags=re_flags
+        )
+
+

Ancestors

+ +

Methods

+
+
+def config_mode(self, config_command: str = 'configure term', pattern: str = '', re_flags: int = 0) ‑> str +
+
+

Aruba auto completes on space so 'configure' needs fully spelled-out.

+
+ +Expand source code + +
def config_mode(
+    self,
+    config_command: str = "configure term",
+    pattern: str = "",
+    re_flags: int = 0,
+) -> str:
+    """Aruba auto completes on space so 'configure' needs fully spelled-out."""
+    return super().config_mode(
+        config_command=config_command, pattern=pattern, re_flags=re_flags
+    )
+
+
+
+

Inherited members

+ +
+
+class ArubaOsSSH (**kwargs: Any)
@@ -176,7 +421,7 @@

Classes

Expand source code -
class ArubaSSH(CiscoSSHConnection):
+
class ArubaOsSSH(CiscoSSHConnection):
     """Aruba OS support"""
 
     def __init__(self, **kwargs: Any) -> None:
@@ -228,7 +473,7 @@ 

Ancestors

Methods

-
+
def check_config_mode(self, check_string: str = '(config) #', pattern: str = '[>#]', force_regex: bool = False) ‑> bool
@@ -252,7 +497,7 @@

Methods

return super().check_config_mode(check_string=check_string, pattern=pattern)
-
+
def config_mode(self, config_command: str = 'configure term', pattern: str = '', re_flags: int = 0) ‑> str
@@ -273,7 +518,7 @@

Methods

)
-
+
def session_preparation(self) ‑> None
@@ -355,17 +600,24 @@

Index

  • Sub-modules

  • Classes

    diff --git a/docs/netmiko/base_connection.html b/docs/netmiko/base_connection.html index 74cd45057..6ac60976f 100644 --- a/docs/netmiko/base_connection.html +++ b/docs/netmiko/base_connection.html @@ -38,6 +38,7 @@

    Module netmiko.base_connection

    Also defines methods that should generally be supported by child classes """ + from typing import ( Optional, Callable, @@ -59,7 +60,6 @@

    Module netmiko.base_connection

    import io import re import socket -import telnetlib import time from collections import deque from os import path @@ -82,6 +82,7 @@

    Module netmiko.base_connection

    ReadException, ReadTimeout, ) +from netmiko._telnetlib import telnetlib from netmiko.channel import Channel, SSHChannel, TelnetChannel, SerialChannel from netmiko.session_log import SessionLog from netmiko.utilities import ( @@ -420,7 +421,8 @@

    Module netmiko.base_connection

    if self.secret: no_log["secret"] = self.secret # Always sanitize username and password - log.addFilter(SecretsFilter(no_log=no_log)) + self._secrets_filter = SecretsFilter(no_log=no_log) + log.addFilter(self._secrets_filter) # Netmiko will close the session_log if we open the file if session_log is not None: @@ -630,7 +632,7 @@

    Module netmiko.base_connection

    log.debug("Sending IAC + NOP") # Need to send multiple times to test connection assert isinstance(self.remote_conn, telnetlib.Telnet) - telnet_socket = self.remote_conn.get_socket() + telnet_socket = self.remote_conn.get_socket() # type: ignore telnet_socket.sendall(telnetlib.IAC + telnetlib.NOP) telnet_socket.sendall(telnetlib.IAC + telnetlib.NOP) telnet_socket.sendall(telnetlib.IAC + telnetlib.NOP) @@ -1149,7 +1151,7 @@

    Module netmiko.base_connection

    proxy_dict=self.sock_telnet, ) else: - self.remote_conn = telnetlib.Telnet( + self.remote_conn = telnetlib.Telnet( # type: ignore self.host, port=self.port, timeout=self.timeout ) # Migrating communication to channel class @@ -2500,7 +2502,7 @@

    Module netmiko.base_connection

    self.paramiko_cleanup() elif self.protocol == "telnet": assert isinstance(self.remote_conn, telnetlib.Telnet) - self.remote_conn.close() + self.remote_conn.close() # type: ignore elif self.protocol == "serial": assert isinstance(self.remote_conn, serial.Serial) self.remote_conn.close() @@ -2512,6 +2514,7 @@

    Module netmiko.base_connection

    self.remote_conn = None if self.session_log: self.session_log.close() + log.removeFilter(self._secrets_filter) def commit(self) -> str: """Commit method for platforms that support this.""" @@ -3032,7 +3035,8 @@

    Classes

    if self.secret: no_log["secret"] = self.secret # Always sanitize username and password - log.addFilter(SecretsFilter(no_log=no_log)) + self._secrets_filter = SecretsFilter(no_log=no_log) + log.addFilter(self._secrets_filter) # Netmiko will close the session_log if we open the file if session_log is not None: @@ -3242,7 +3246,7 @@

    Classes

    log.debug("Sending IAC + NOP") # Need to send multiple times to test connection assert isinstance(self.remote_conn, telnetlib.Telnet) - telnet_socket = self.remote_conn.get_socket() + telnet_socket = self.remote_conn.get_socket() # type: ignore telnet_socket.sendall(telnetlib.IAC + telnetlib.NOP) telnet_socket.sendall(telnetlib.IAC + telnetlib.NOP) telnet_socket.sendall(telnetlib.IAC + telnetlib.NOP) @@ -3761,7 +3765,7 @@

    Classes

    proxy_dict=self.sock_telnet, ) else: - self.remote_conn = telnetlib.Telnet( + self.remote_conn = telnetlib.Telnet( # type: ignore self.host, port=self.port, timeout=self.timeout ) # Migrating communication to channel class @@ -5112,7 +5116,7 @@

    Classes

    self.paramiko_cleanup() elif self.protocol == "telnet": assert isinstance(self.remote_conn, telnetlib.Telnet) - self.remote_conn.close() + self.remote_conn.close() # type: ignore elif self.protocol == "serial": assert isinstance(self.remote_conn, serial.Serial) self.remote_conn.close() @@ -5124,6 +5128,7 @@

    Classes

    self.remote_conn = None if self.session_log: self.session_log.close() + log.removeFilter(self._secrets_filter) def commit(self) -> str: """Commit method for platforms that support this.""" @@ -5501,7 +5506,7 @@

    Methods

    self.paramiko_cleanup() elif self.protocol == "telnet": assert isinstance(self.remote_conn, telnetlib.Telnet) - self.remote_conn.close() + self.remote_conn.close() # type: ignore elif self.protocol == "serial": assert isinstance(self.remote_conn, serial.Serial) self.remote_conn.close() @@ -5512,7 +5517,8 @@

    Methods

    self.remote_conn_pre = None self.remote_conn = None if self.session_log: - self.session_log.close()
  • + self.session_log.close() + log.removeFilter(self._secrets_filter)
    @@ -5628,7 +5634,7 @@

    Methods

    proxy_dict=self.sock_telnet, ) else: - self.remote_conn = telnetlib.Telnet( + self.remote_conn = telnetlib.Telnet( # type: ignore self.host, port=self.port, timeout=self.timeout ) # Migrating communication to channel class @@ -5868,7 +5874,7 @@

    Methods

    log.debug("Sending IAC + NOP") # Need to send multiple times to test connection assert isinstance(self.remote_conn, telnetlib.Telnet) - telnet_socket = self.remote_conn.get_socket() + telnet_socket = self.remote_conn.get_socket() # type: ignore telnet_socket.sendall(telnetlib.IAC + telnetlib.NOP) telnet_socket.sendall(telnetlib.IAC + telnetlib.NOP) telnet_socket.sendall(telnetlib.IAC + telnetlib.NOP) diff --git a/docs/netmiko/calix/calix_b6.html b/docs/netmiko/calix/calix_b6.html index 0d4b31dd6..24b33df32 100644 --- a/docs/netmiko/calix/calix_b6.html +++ b/docs/netmiko/calix/calix_b6.html @@ -28,6 +28,7 @@

    Module netmiko.calix.calix_b6

    Expand source code
    """Calix B6 SSH Driver for Netmiko"""
    +
     from typing import Any
     import time
     from os import path
    diff --git a/docs/netmiko/centec/centec_os.html b/docs/netmiko/centec/centec_os.html
    index aadf3543f..40bb0c817 100644
    --- a/docs/netmiko/centec/centec_os.html
    +++ b/docs/netmiko/centec/centec_os.html
    @@ -28,6 +28,7 @@ 

    Module netmiko.centec.centec_os

    Expand source code
    """Centec OS Support"""
    +
     from netmiko.cisco_base_connection import CiscoBaseConnection
     
     
    diff --git a/docs/netmiko/channel.html b/docs/netmiko/channel.html
    index 2bbe38fbd..4fe84b681 100644
    --- a/docs/netmiko/channel.html
    +++ b/docs/netmiko/channel.html
    @@ -29,9 +29,9 @@ 

    Module netmiko.channel

    from typing import Any, Optional
     from abc import ABC, abstractmethod
     import paramiko
    -import telnetlib
     import serial
     
    +from netmiko._telnetlib import telnetlib
     from netmiko.utilities import write_bytes
     from netmiko.netmiko_globals import MAX_BUFFER
     from netmiko.exceptions import ReadException, WriteException
    @@ -141,7 +141,7 @@ 

    Module netmiko.channel

    raise WriteException( "Attempt to write data, but there is no active channel." ) - self.remote_conn.write(write_bytes(out_data, encoding=self.encoding)) + self.remote_conn.write(write_bytes(out_data, encoding=self.encoding)) # type: ignore def read_buffer(self) -> str: """Single read of available data.""" @@ -151,7 +151,7 @@

    Module netmiko.channel

    """Read all of the available data from the channel.""" if self.remote_conn is None: raise ReadException("Attempt to read, but there is no active channel.") - return self.remote_conn.read_very_eager().decode(self.encoding, "ignore") + return self.remote_conn.read_very_eager().decode(self.encoding, "ignore") # type: ignore class SerialChannel(Channel): @@ -462,7 +462,7 @@

    Inherited members

    class TelnetChannel -(conn: Optional[telnetlib.Telnet], encoding: str) +(conn: Optional[netmiko._telnetlib.telnetlib.Telnet], encoding: str)

    Helper class that provides a standard way to create an ABC using @@ -488,7 +488,7 @@

    Inherited members

    raise WriteException( "Attempt to write data, but there is no active channel." ) - self.remote_conn.write(write_bytes(out_data, encoding=self.encoding)) + self.remote_conn.write(write_bytes(out_data, encoding=self.encoding)) # type: ignore def read_buffer(self) -> str: """Single read of available data.""" @@ -498,7 +498,7 @@

    Inherited members

    """Read all of the available data from the channel.""" if self.remote_conn is None: raise ReadException("Attempt to read, but there is no active channel.") - return self.remote_conn.read_very_eager().decode(self.encoding, "ignore")
    + return self.remote_conn.read_very_eager().decode(self.encoding, "ignore") # type: ignore

    Ancestors

      diff --git a/docs/netmiko/ciena/ciena_saos.html b/docs/netmiko/ciena/ciena_saos.html index d129c8b6f..8bfadc166 100644 --- a/docs/netmiko/ciena/ciena_saos.html +++ b/docs/netmiko/ciena/ciena_saos.html @@ -28,6 +28,7 @@

      Module netmiko.ciena.ciena_saos

      Expand source code
      """Ciena SAOS support."""
      +
       from typing import Optional, Any
       import re
       import os
      diff --git a/docs/netmiko/cisco/cisco_asa_ssh.html b/docs/netmiko/cisco/cisco_asa_ssh.html
      index 9fa53494e..dba9d8973 100644
      --- a/docs/netmiko/cisco/cisco_asa_ssh.html
      +++ b/docs/netmiko/cisco/cisco_asa_ssh.html
      @@ -28,6 +28,7 @@ 

      Module netmiko.cisco.cisco_asa_ssh

      Expand source code
      """Subclass specific to Cisco ASA."""
      +
       from typing import Any, Union, List, Dict, Optional
       import re
       import time
      diff --git a/docs/netmiko/cisco/cisco_ftd_ssh.html b/docs/netmiko/cisco/cisco_ftd_ssh.html
      index 9f16a152a..8109e53fb 100644
      --- a/docs/netmiko/cisco/cisco_ftd_ssh.html
      +++ b/docs/netmiko/cisco/cisco_ftd_ssh.html
      @@ -28,6 +28,7 @@ 

      Module netmiko.cisco.cisco_ftd_ssh

      Expand source code
      """Subclass specific to Cisco FTD."""
      +
       from typing import Any
       from netmiko.no_enable import NoEnable
       from netmiko.no_config import NoConfig
      diff --git a/docs/netmiko/cisco/cisco_tp_tcce.html b/docs/netmiko/cisco/cisco_tp_tcce.html
      index db7eccdd8..3ffd77cf3 100644
      --- a/docs/netmiko/cisco/cisco_tp_tcce.html
      +++ b/docs/netmiko/cisco/cisco_tp_tcce.html
      @@ -41,6 +41,7 @@ 

      Module netmiko.cisco.cisco_tp_tcce

      Written by Ahmad Barrin Updated by Kirk Byers """ + from typing import Any, Union, List, Dict import time import re diff --git a/docs/netmiko/cisco/cisco_viptela.html b/docs/netmiko/cisco/cisco_viptela.html index 81a751854..89123b343 100644 --- a/docs/netmiko/cisco/cisco_viptela.html +++ b/docs/netmiko/cisco/cisco_viptela.html @@ -28,6 +28,7 @@

      Module netmiko.cisco.cisco_viptela

      Expand source code
      """Subclass specific to Cisco Viptela."""
      +
       from typing import Union, Sequence, Iterator, TextIO, Any
       import re
       
      diff --git a/docs/netmiko/cisco/cisco_wlc_ssh.html b/docs/netmiko/cisco/cisco_wlc_ssh.html
      index 37f1f08b7..c0a6c9f91 100644
      --- a/docs/netmiko/cisco/cisco_wlc_ssh.html
      +++ b/docs/netmiko/cisco/cisco_wlc_ssh.html
      @@ -28,6 +28,7 @@ 

      Module netmiko.cisco.cisco_wlc_ssh

      Expand source code
      """Netmiko Cisco WLC support."""
      +
       from typing import Any, Union, Sequence, Iterator, TextIO
       import time
       import re
      diff --git a/docs/netmiko/cisco/cisco_xr.html b/docs/netmiko/cisco/cisco_xr.html
      index 5b7105cf1..18c3cf1c2 100644
      --- a/docs/netmiko/cisco/cisco_xr.html
      +++ b/docs/netmiko/cisco/cisco_xr.html
      @@ -219,7 +219,7 @@ 

      Module netmiko.cisco.cisco_xr

      # Read until we detect either an Uncommitted change or the end prompt if not re.search(r"(Uncommitted|#$)", output): output += self.read_until_pattern(pattern=r"(Uncommitted|#$)") - if "Uncommitted changes found" in output: + if "Uncommitted" in output: self.write_channel(self.normalize_cmd("no\n")) output += self.read_until_pattern(pattern=r"[>#]") if not re.search(pattern, output, flags=re.M): @@ -613,7 +613,7 @@

      Classes

      # Read until we detect either an Uncommitted change or the end prompt if not re.search(r"(Uncommitted|#$)", output): output += self.read_until_pattern(pattern=r"(Uncommitted|#$)") - if "Uncommitted changes found" in output: + if "Uncommitted" in output: self.write_channel(self.normalize_cmd("no\n")) output += self.read_until_pattern(pattern=r"[>#]") if not re.search(pattern, output, flags=re.M): @@ -847,7 +847,7 @@

      Methods

      # Read until we detect either an Uncommitted change or the end prompt if not re.search(r"(Uncommitted|#$)", output): output += self.read_until_pattern(pattern=r"(Uncommitted|#$)") - if "Uncommitted changes found" in output: + if "Uncommitted" in output: self.write_channel(self.normalize_cmd("no\n")) output += self.read_until_pattern(pattern=r"[>#]") if not re.search(pattern, output, flags=re.M): diff --git a/docs/netmiko/cisco_base_connection.html b/docs/netmiko/cisco_base_connection.html index 8d53083c0..40a5679f0 100644 --- a/docs/netmiko/cisco_base_connection.html +++ b/docs/netmiko/cisco_base_connection.html @@ -28,6 +28,7 @@

      Module netmiko.cisco_base_connection

      Expand source code
      """CiscoBaseConnection is netmiko SSH class for Cisco and Cisco-like platforms."""
      +
       from typing import Optional
       import re
       import time
      @@ -1267,7 +1268,8 @@ 

      Subclasses

    • ApresiaAeosBase
    • AristaBase
    • ArrisCERBase
    • -
    • ArubaSSH
    • +
    • ArubaCxSSH
    • +
    • ArubaOsSSH
    • BroadcomIcosSSH
    • BrocadeFOSSSH
    • CalixB6Base
    • diff --git a/docs/netmiko/dell/dell_dnos6.html b/docs/netmiko/dell/dell_dnos6.html index 8492e799b..f116bc408 100644 --- a/docs/netmiko/dell/dell_dnos6.html +++ b/docs/netmiko/dell/dell_dnos6.html @@ -28,6 +28,7 @@

      Module netmiko.dell.dell_dnos6

      Expand source code
      """Dell N2/3/4000 base driver- supports DNOS6."""
      +
       from netmiko.dell.dell_powerconnect import DellPowerConnectBase
       
       
      diff --git a/docs/netmiko/dell/dell_force10_ssh.html b/docs/netmiko/dell/dell_force10_ssh.html
      index 431dac419..efbe0c09b 100644
      --- a/docs/netmiko/dell/dell_force10_ssh.html
      +++ b/docs/netmiko/dell/dell_force10_ssh.html
      @@ -28,6 +28,7 @@ 

      Module netmiko.dell.dell_force10_ssh

      Expand source code
      """Dell Force10 Driver - supports DNOS9."""
      +
       from netmiko.cisco_base_connection import CiscoSSHConnection
       
       
      diff --git a/docs/netmiko/dell/dell_os10_ssh.html b/docs/netmiko/dell/dell_os10_ssh.html
      index 14f590974..83e7ea05a 100644
      --- a/docs/netmiko/dell/dell_os10_ssh.html
      +++ b/docs/netmiko/dell/dell_os10_ssh.html
      @@ -28,6 +28,7 @@ 

      Module netmiko.dell.dell_os10_ssh

      Expand source code
      """Dell EMC Networking OS10 Driver - supports dellos10."""
      +
       from typing import Any, Optional
       from netmiko.base_connection import BaseConnection
       from netmiko.cisco_base_connection import CiscoSSHConnection
      diff --git a/docs/netmiko/dell/dell_powerconnect.html b/docs/netmiko/dell/dell_powerconnect.html
      index 1620f47c6..fa40ae31f 100644
      --- a/docs/netmiko/dell/dell_powerconnect.html
      +++ b/docs/netmiko/dell/dell_powerconnect.html
      @@ -28,6 +28,7 @@ 

      Module netmiko.dell.dell_powerconnect

      Expand source code
      """Dell PowerConnect Driver."""
      +
       from typing import Optional
       from paramiko import SSHClient
       import time
      diff --git a/docs/netmiko/dell/dell_sonic_ssh.html b/docs/netmiko/dell/dell_sonic_ssh.html
      index 8cf71e723..fc49e3c74 100644
      --- a/docs/netmiko/dell/dell_sonic_ssh.html
      +++ b/docs/netmiko/dell/dell_sonic_ssh.html
      @@ -33,6 +33,7 @@ 

      Module netmiko.dell.dell_sonic_ssh

      Dell EMC PowerSwitch platforms running Enterprise SONiC Distribution by Dell Technologies Driver - supports dellenterprisesonic. """ + from netmiko.no_enable import NoEnable from netmiko.cisco_base_connection import CiscoSSHConnection from netmiko import log diff --git a/docs/netmiko/digi/digi_transport.html b/docs/netmiko/digi/digi_transport.html index cb2485bd4..81daab766 100644 --- a/docs/netmiko/digi/digi_transport.html +++ b/docs/netmiko/digi/digi_transport.html @@ -28,6 +28,7 @@

      Module netmiko.digi.digi_transport

      Expand source code
      """Digi TransPort Routers"""
      +
       from typing import Any
       from netmiko.no_enable import NoEnable
       from netmiko.no_config import NoConfig
      diff --git a/docs/netmiko/enterasys/enterasys_ssh.html b/docs/netmiko/enterasys/enterasys_ssh.html
      index 3e034e0ad..aa4eef514 100644
      --- a/docs/netmiko/enterasys/enterasys_ssh.html
      +++ b/docs/netmiko/enterasys/enterasys_ssh.html
      @@ -28,6 +28,7 @@ 

      Module netmiko.enterasys.enterasys_ssh

      Expand source code
      """Enterasys support."""
      +
       from typing import Any
       from netmiko.cisco_base_connection import CiscoSSHConnection
       
      diff --git a/docs/netmiko/ericsson/ericsson_ipos.html b/docs/netmiko/ericsson/ericsson_ipos.html
      index 4a606cda6..5d92265a7 100644
      --- a/docs/netmiko/ericsson/ericsson_ipos.html
      +++ b/docs/netmiko/ericsson/ericsson_ipos.html
      @@ -30,6 +30,7 @@ 

      Module netmiko.ericsson.ericsson_ipos

      """
       Ericsson Ipos looks like it was RedBack equipment.
       """
      +
       from typing import Optional, Any, Union, Sequence, Iterator, TextIO
       import re
       import warnings
      diff --git a/docs/netmiko/ericsson/ericsson_mltn.html b/docs/netmiko/ericsson/ericsson_mltn.html
      index 285388b8a..6fcf12a43 100644
      --- a/docs/netmiko/ericsson/ericsson_mltn.html
      +++ b/docs/netmiko/ericsson/ericsson_mltn.html
      @@ -28,6 +28,7 @@ 

      Module netmiko.ericsson.ericsson_mltn

      Expand source code
      """Ericsson MiniLink driver."""
      +
       import time
       import re
       from os import path
      diff --git a/docs/netmiko/extreme/extreme_ers_ssh.html b/docs/netmiko/extreme/extreme_ers_ssh.html
      index f59b34f36..2257159d7 100644
      --- a/docs/netmiko/extreme/extreme_ers_ssh.html
      +++ b/docs/netmiko/extreme/extreme_ers_ssh.html
      @@ -28,6 +28,7 @@ 

      Module netmiko.extreme.extreme_ers_ssh

      Expand source code
      """Netmiko support for Extreme Ethernet Routing Switch."""
      +
       import re
       from netmiko.cisco_base_connection import CiscoSSHConnection
       from netmiko.exceptions import NetmikoAuthenticationException
      diff --git a/docs/netmiko/extreme/extreme_exos.html b/docs/netmiko/extreme/extreme_exos.html
      index e73eb37af..968260546 100644
      --- a/docs/netmiko/extreme/extreme_exos.html
      +++ b/docs/netmiko/extreme/extreme_exos.html
      @@ -28,6 +28,7 @@ 

      Module netmiko.extreme.extreme_exos

      Expand source code
      """Extreme support."""
      +
       import os
       from typing import Any, Callable, Optional, Union, List, Dict
       import re
      diff --git a/docs/netmiko/extreme/extreme_nos_ssh.html b/docs/netmiko/extreme/extreme_nos_ssh.html
      index 74a5ca71f..27c83a0ba 100644
      --- a/docs/netmiko/extreme/extreme_nos_ssh.html
      +++ b/docs/netmiko/extreme/extreme_nos_ssh.html
      @@ -28,6 +28,7 @@ 

      Module netmiko.extreme.extreme_nos_ssh

      Expand source code
      """Support for Extreme NOS/VDX."""
      +
       import time
       from netmiko.no_enable import NoEnable
       from netmiko.cisco_base_connection import CiscoSSHConnection
      diff --git a/docs/netmiko/extreme/extreme_slx_ssh.html b/docs/netmiko/extreme/extreme_slx_ssh.html
      index 72446a9e1..5e25b87ee 100644
      --- a/docs/netmiko/extreme/extreme_slx_ssh.html
      +++ b/docs/netmiko/extreme/extreme_slx_ssh.html
      @@ -28,6 +28,7 @@ 

      Module netmiko.extreme.extreme_slx_ssh

      Expand source code
      """Support for Extreme SLX."""
      +
       import time
       from netmiko.no_enable import NoEnable
       from netmiko.cisco_base_connection import CiscoSSHConnection
      diff --git a/docs/netmiko/extreme/extreme_tierraos_ssh.html b/docs/netmiko/extreme/extreme_tierraos_ssh.html
      index 1229efea3..f254be8bf 100644
      --- a/docs/netmiko/extreme/extreme_tierraos_ssh.html
      +++ b/docs/netmiko/extreme/extreme_tierraos_ssh.html
      @@ -28,6 +28,7 @@ 

      Module netmiko.extreme.extreme_tierraos_ssh

      Expand source code
      """Support for Extreme TierraOS."""
      +
       import time
       from netmiko.no_enable import NoEnable
       from netmiko.cisco_base_connection import CiscoSSHConnection
      diff --git a/docs/netmiko/extreme/extreme_vsp_ssh.html b/docs/netmiko/extreme/extreme_vsp_ssh.html
      index 56d7e649c..e68c2d75d 100644
      --- a/docs/netmiko/extreme/extreme_vsp_ssh.html
      +++ b/docs/netmiko/extreme/extreme_vsp_ssh.html
      @@ -28,6 +28,7 @@ 

      Module netmiko.extreme.extreme_vsp_ssh

      Expand source code
      """Extreme Virtual Services Platform Support."""
      +
       from netmiko.cisco_base_connection import CiscoSSHConnection
       
       
      diff --git a/docs/netmiko/fiberstore/fiberstore_fsos.html b/docs/netmiko/fiberstore/fiberstore_fsos.html
      index 3bb0b76bc..a9c35d5eb 100644
      --- a/docs/netmiko/fiberstore/fiberstore_fsos.html
      +++ b/docs/netmiko/fiberstore/fiberstore_fsos.html
      @@ -28,6 +28,7 @@ 

      Module netmiko.fiberstore.fiberstore_fsos

      Expand source code
      """Fiberstore FSOS Driver."""
      +
       from typing import Optional
       from paramiko import SSHClient
       from netmiko.ssh_auth import SSHClient_noauth
      diff --git a/docs/netmiko/huawei/huawei.html b/docs/netmiko/huawei/huawei.html
      index 5b75abc55..66beeac95 100644
      --- a/docs/netmiko/huawei/huawei.html
      +++ b/docs/netmiko/huawei/huawei.html
      @@ -132,12 +132,18 @@ 

      Module netmiko.huawei.huawei

      Configuration file had been saved successfully Note: The configuration file will take effect after being activated ###################################################################### + or + ###################################################################### + Warning: The current configuration will be written to the device. Continue? [Y/N]:y + Now saving the current configuration to the slot 1 . + Info: Save the configuration successfully. + ###################################################################### """ # 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})" + pattern = rf"(?:[Cc]ontinue\?|{self.prompt_pattern})" output = self._send_command_str( command_string=cmd, expect_string=pattern, @@ -145,7 +151,7 @@

      Module netmiko.huawei.huawei

      strip_command=False, read_timeout=100.0, ) - if confirm_response and "Are you sure" in output: + if confirm_response and re.search(r"[Cc]ontinue\?", output): output += self._send_command_str( command_string=confirm_response, expect_string=self.prompt_pattern, @@ -293,11 +299,7 @@

      Module netmiko.huawei.huawei

      if error_marker in output: raise ValueError(f"Commit failed with following errors:\n\n{output}") - return output - - def save_config(self, *args: Any, **kwargs: Any) -> str: - """Not Implemented""" - raise NotImplementedError
      + return output
      @@ -540,12 +542,18 @@

      Classes

      Configuration file had been saved successfully Note: The configuration file will take effect after being activated ###################################################################### + or + ###################################################################### + Warning: The current configuration will be written to the device. Continue? [Y/N]:y + Now saving the current configuration to the slot 1 . + Info: Save the configuration successfully. + ###################################################################### """ # 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})" + pattern = rf"(?:[Cc]ontinue\?|{self.prompt_pattern})" output = self._send_command_str( command_string=cmd, expect_string=pattern, @@ -553,7 +561,7 @@

      Classes

      strip_command=False, read_timeout=100.0, ) - if confirm_response and "Are you sure" in output: + if confirm_response and re.search(r"[Cc]ontinue\?", output): output += self._send_command_str( command_string=confirm_response, expect_string=self.prompt_pattern, @@ -645,7 +653,13 @@
      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

      -
      +
      +

      or

      +
      +

      Warning: The current configuration will be written to the device. Continue? [Y/N]:y +Now saving the current configuration to the slot 1 . +Info: Save the configuration successfully.

      +
      Expand source code @@ -664,12 +678,18 @@
      Configuration file had been saved successfully Note: The configuration file will take effect after being activated ###################################################################### + or + ###################################################################### + Warning: The current configuration will be written to the device. Continue? [Y/N]:y + Now saving the current configuration to the slot 1 . + Info: Save the configuration successfully. + ###################################################################### """ # 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})" + pattern = rf"(?:[Cc]ontinue\?|{self.prompt_pattern})" output = self._send_command_str( command_string=cmd, expect_string=pattern, @@ -677,7 +697,7 @@
      strip_command=False, read_timeout=100.0, ) - if confirm_response and "Are you sure" in output: + if confirm_response and re.search(r"[Cc]ontinue\?", output): output += self._send_command_str( command_string=confirm_response, expect_string=self.prompt_pattern, @@ -1517,11 +1537,7 @@

      Inherited members

      if error_marker in output: raise ValueError(f"Commit failed with following errors:\n\n{output}") - return output - - def save_config(self, *args: Any, **kwargs: Any) -> str: - """Not Implemented""" - raise NotImplementedError
      + return output

      Ancestors

        @@ -1593,20 +1609,6 @@

        Methods

        return output
      -
      -def save_config(self, *args: Any, **kwargs: Any) ‑> str -
      -
      -

      Not Implemented

      -
      - -Expand source code - -
      def save_config(self, *args: Any, **kwargs: Any) -> str:
      -    """Not Implemented"""
      -    raise NotImplementedError
      -
      -
      def send_config_set(self, config_commands: Union[str, Sequence[str], Iterator[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, **kwargs: Any) ‑> str
      @@ -1655,6 +1657,7 @@

      Inherited members

    • read_until_prompt
    • read_until_prompt_or_pattern
    • run_ttp
    • +
    • save_config
    • select_delay_factor
    • send_command
    • send_command_expect
    • @@ -1718,7 +1721,6 @@

      HuaweiVrpv8SSH

      diff --git a/docs/netmiko/huawei/index.html b/docs/netmiko/huawei/index.html index 2ec6263a7..fac28e055 100644 --- a/docs/netmiko/huawei/index.html +++ b/docs/netmiko/huawei/index.html @@ -1123,11 +1123,7 @@

      Inherited members

      if error_marker in output: raise ValueError(f"Commit failed with following errors:\n\n{output}") - return output - - def save_config(self, *args: Any, **kwargs: Any) -> str: - """Not Implemented""" - raise NotImplementedError
      + return output

      Ancestors

        @@ -1199,20 +1195,6 @@

        Methods

        return output
      -
      -def save_config(self, *args: Any, **kwargs: Any) ‑> str -
      -
      -

      Not Implemented

      -
      - -Expand source code - -
      def save_config(self, *args: Any, **kwargs: Any) -> str:
      -    """Not Implemented"""
      -    raise NotImplementedError
      -
      -
      def send_config_set(self, config_commands: Union[str, Sequence[str], Iterator[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, **kwargs: Any) ‑> str
      @@ -1261,6 +1243,7 @@

      Inherited members

    • read_until_prompt
    • read_until_prompt_or_pattern
    • run_ttp
    • +
    • save_config
    • select_delay_factor
    • send_command
    • send_command_expect
    • @@ -1325,7 +1308,6 @@

      HuaweiVrpv8SSH

      diff --git a/docs/netmiko/index.html b/docs/netmiko/index.html index 155f5d9b7..d22de5580 100644 --- a/docs/netmiko/index.html +++ b/docs/netmiko/index.html @@ -1261,7 +1261,8 @@

      Classes

      if self.secret: no_log["secret"] = self.secret # Always sanitize username and password - log.addFilter(SecretsFilter(no_log=no_log)) + self._secrets_filter = SecretsFilter(no_log=no_log) + log.addFilter(self._secrets_filter) # Netmiko will close the session_log if we open the file if session_log is not None: @@ -1471,7 +1472,7 @@

      Classes

      log.debug("Sending IAC + NOP") # Need to send multiple times to test connection assert isinstance(self.remote_conn, telnetlib.Telnet) - telnet_socket = self.remote_conn.get_socket() + telnet_socket = self.remote_conn.get_socket() # type: ignore telnet_socket.sendall(telnetlib.IAC + telnetlib.NOP) telnet_socket.sendall(telnetlib.IAC + telnetlib.NOP) telnet_socket.sendall(telnetlib.IAC + telnetlib.NOP) @@ -1990,7 +1991,7 @@

      Classes

      proxy_dict=self.sock_telnet, ) else: - self.remote_conn = telnetlib.Telnet( + self.remote_conn = telnetlib.Telnet( # type: ignore self.host, port=self.port, timeout=self.timeout ) # Migrating communication to channel class @@ -3341,7 +3342,7 @@

      Classes

      self.paramiko_cleanup() elif self.protocol == "telnet": assert isinstance(self.remote_conn, telnetlib.Telnet) - self.remote_conn.close() + self.remote_conn.close() # type: ignore elif self.protocol == "serial": assert isinstance(self.remote_conn, serial.Serial) self.remote_conn.close() @@ -3353,6 +3354,7 @@

      Classes

      self.remote_conn = None if self.session_log: self.session_log.close() + log.removeFilter(self._secrets_filter) def commit(self) -> str: """Commit method for platforms that support this.""" @@ -3730,7 +3732,7 @@

      Methods

      self.paramiko_cleanup() elif self.protocol == "telnet": assert isinstance(self.remote_conn, telnetlib.Telnet) - self.remote_conn.close() + self.remote_conn.close() # type: ignore elif self.protocol == "serial": assert isinstance(self.remote_conn, serial.Serial) self.remote_conn.close() @@ -3741,7 +3743,8 @@

      Methods

      self.remote_conn_pre = None self.remote_conn = None if self.session_log: - self.session_log.close()
      + self.session_log.close() + log.removeFilter(self._secrets_filter)
      @@ -3857,7 +3860,7 @@

      Methods

      proxy_dict=self.sock_telnet, ) else: - self.remote_conn = telnetlib.Telnet( + self.remote_conn = telnetlib.Telnet( # type: ignore self.host, port=self.port, timeout=self.timeout ) # Migrating communication to channel class @@ -4097,7 +4100,7 @@

      Methods

      log.debug("Sending IAC + NOP") # Need to send multiple times to test connection assert isinstance(self.remote_conn, telnetlib.Telnet) - telnet_socket = self.remote_conn.get_socket() + telnet_socket = self.remote_conn.get_socket() # type: ignore telnet_socket.sendall(telnetlib.IAC + telnetlib.NOP) telnet_socket.sendall(telnetlib.IAC + telnetlib.NOP) telnet_socket.sendall(telnetlib.IAC + telnetlib.NOP) diff --git a/docs/netmiko/ipinfusion/index.html b/docs/netmiko/ipinfusion/index.html index cb1efb174..68559ba94 100644 --- a/docs/netmiko/ipinfusion/index.html +++ b/docs/netmiko/ipinfusion/index.html @@ -398,7 +398,7 @@

      Inherited members

      # set callback function to handle telnet options. assert self.remote_conn is not None assert isinstance(self.remote_conn, Telnet) - self.remote_conn.set_option_negotiation_callback(self._process_option) + self.remote_conn.set_option_negotiation_callback(self._process_option) # type: ignore return super().telnet_login( pri_prompt_terminator=pri_prompt_terminator, alt_prompt_terminator=alt_prompt_terminator, diff --git a/docs/netmiko/ipinfusion/ipinfusion_ocnos.html b/docs/netmiko/ipinfusion/ipinfusion_ocnos.html index c3c190523..d3388954b 100644 --- a/docs/netmiko/ipinfusion/ipinfusion_ocnos.html +++ b/docs/netmiko/ipinfusion/ipinfusion_ocnos.html @@ -30,7 +30,17 @@

      Module netmiko.ipinfusion.ipinfusion_ocnos

      from typing import Any from socket import socket -from telnetlib import IAC, DO, DONT, WILL, WONT, SB, SE, TTYPE, Telnet +from netmiko._telnetlib.telnetlib import ( + IAC, + DO, + DONT, + WILL, + WONT, + SB, + SE, + TTYPE, + Telnet, +) from netmiko.cisco_base_connection import CiscoBaseConnection @@ -95,7 +105,7 @@

      Module netmiko.ipinfusion.ipinfusion_ocnos

      # set callback function to handle telnet options. assert self.remote_conn is not None assert isinstance(self.remote_conn, Telnet) - self.remote_conn.set_option_negotiation_callback(self._process_option) + self.remote_conn.set_option_negotiation_callback(self._process_option) # type: ignore return super().telnet_login( pri_prompt_terminator=pri_prompt_terminator, alt_prompt_terminator=alt_prompt_terminator, @@ -696,7 +706,7 @@

      Inherited members

      # set callback function to handle telnet options. assert self.remote_conn is not None assert isinstance(self.remote_conn, Telnet) - self.remote_conn.set_option_negotiation_callback(self._process_option) + self.remote_conn.set_option_negotiation_callback(self._process_option) # type: ignore return super().telnet_login( pri_prompt_terminator=pri_prompt_terminator, alt_prompt_terminator=alt_prompt_terminator, diff --git a/docs/netmiko/mellanox/mellanox_mlnxos_ssh.html b/docs/netmiko/mellanox/mellanox_mlnxos_ssh.html index 44865fdca..66ebefe8c 100644 --- a/docs/netmiko/mellanox/mellanox_mlnxos_ssh.html +++ b/docs/netmiko/mellanox/mellanox_mlnxos_ssh.html @@ -28,6 +28,7 @@

      Module netmiko.mellanox.mellanox_mlnxos_ssh

      Expand source code
      """Mellanox MLNX-OS Switch support."""
      +
       import re
       from typing import Optional
       
      diff --git a/docs/netmiko/mrv/mrv_lx.html b/docs/netmiko/mrv/mrv_lx.html
      index 6b60ac973..4fe68a2ec 100644
      --- a/docs/netmiko/mrv/mrv_lx.html
      +++ b/docs/netmiko/mrv/mrv_lx.html
      @@ -28,6 +28,7 @@ 

      Module netmiko.mrv.mrv_lx

      Expand source code
      """MRV Communications Driver (LX)."""
      +
       import time
       import re
       from typing import Optional
      diff --git a/docs/netmiko/mrv/mrv_ssh.html b/docs/netmiko/mrv/mrv_ssh.html
      index 7c585473f..d3bc39945 100644
      --- a/docs/netmiko/mrv/mrv_ssh.html
      +++ b/docs/netmiko/mrv/mrv_ssh.html
      @@ -28,6 +28,7 @@ 

      Module netmiko.mrv.mrv_ssh

      Expand source code
      """MRV Communications Driver (OptiSwitch)."""
      +
       import time
       import re
       from typing import Optional
      diff --git a/docs/netmiko/netgear/netgear_prosafe_ssh.html b/docs/netmiko/netgear/netgear_prosafe_ssh.html
      index 1ea2f8965..d70a2fc72 100644
      --- a/docs/netmiko/netgear/netgear_prosafe_ssh.html
      +++ b/docs/netmiko/netgear/netgear_prosafe_ssh.html
      @@ -28,6 +28,7 @@ 

      Module netmiko.netgear.netgear_prosafe_ssh

      Expand source code
      """ProSafe OS support"""
      +
       import time
       from typing import Any
       
      diff --git a/docs/netmiko/oneaccess/oneaccess_oneos.html b/docs/netmiko/oneaccess/oneaccess_oneos.html
      index fc10f24f5..0e524f66e 100644
      --- a/docs/netmiko/oneaccess/oneaccess_oneos.html
      +++ b/docs/netmiko/oneaccess/oneaccess_oneos.html
      @@ -28,6 +28,7 @@ 

      Module netmiko.oneaccess.oneaccess_oneos

      Expand source code
      """Netmiko driver for OneAccess ONEOS"""
      +
       from typing import Any
       
       from netmiko.cisco_base_connection import CiscoBaseConnection
      diff --git a/docs/netmiko/raisecom/index.html b/docs/netmiko/raisecom/index.html
      index 16adedf4b..105720d29 100644
      --- a/docs/netmiko/raisecom/index.html
      +++ b/docs/netmiko/raisecom/index.html
      @@ -459,7 +459,7 @@ 

      Inherited members

      # set callback function to handle telnet options. assert isinstance(self.remote_conn, Telnet) - self.remote_conn.set_option_negotiation_callback(self._process_option) + self.remote_conn.set_option_negotiation_callback(self._process_option) # type: ignore delay_factor = self.select_delay_factor(delay_factor) time.sleep(1 * delay_factor) @@ -499,7 +499,7 @@

      Inherited members

      time.sleep(0.5 * delay_factor) i += 1 except EOFError: - self.remote_conn.close() + self.remote_conn.close() # type: ignore msg = f"Login failed: {self.host}" raise NetmikoAuthenticationException(msg) @@ -514,7 +514,7 @@

      Inherited members

      return return_msg msg = f"Login failed: {self.host}" - self.remote_conn.close() + self.remote_conn.close() # type: ignore raise NetmikoAuthenticationException(msg)

      Ancestors

      diff --git a/docs/netmiko/raisecom/raisecom_roap.html b/docs/netmiko/raisecom/raisecom_roap.html index f7fd7a991..cc5169833 100644 --- a/docs/netmiko/raisecom/raisecom_roap.html +++ b/docs/netmiko/raisecom/raisecom_roap.html @@ -31,7 +31,19 @@

      Module netmiko.raisecom.raisecom_roap

      import time from socket import socket -from telnetlib import IAC, DO, DONT, WILL, WONT, SB, SE, ECHO, SGA, NAWS, Telnet +from netmiko._telnetlib.telnetlib import ( + IAC, + DO, + DONT, + WILL, + WONT, + SB, + SE, + ECHO, + SGA, + NAWS, + Telnet, +) from netmiko.exceptions import NetmikoAuthenticationException @@ -128,7 +140,7 @@

      Module netmiko.raisecom.raisecom_roap

      # set callback function to handle telnet options. assert isinstance(self.remote_conn, Telnet) - self.remote_conn.set_option_negotiation_callback(self._process_option) + self.remote_conn.set_option_negotiation_callback(self._process_option) # type: ignore delay_factor = self.select_delay_factor(delay_factor) time.sleep(1 * delay_factor) @@ -168,7 +180,7 @@

      Module netmiko.raisecom.raisecom_roap

      time.sleep(0.5 * delay_factor) i += 1 except EOFError: - self.remote_conn.close() + self.remote_conn.close() # type: ignore msg = f"Login failed: {self.host}" raise NetmikoAuthenticationException(msg) @@ -183,7 +195,7 @@

      Module netmiko.raisecom.raisecom_roap

      return return_msg msg = f"Login failed: {self.host}" - self.remote_conn.close() + self.remote_conn.close() # type: ignore raise NetmikoAuthenticationException(msg)
      @@ -849,7 +861,7 @@

      Inherited members

      # set callback function to handle telnet options. assert isinstance(self.remote_conn, Telnet) - self.remote_conn.set_option_negotiation_callback(self._process_option) + self.remote_conn.set_option_negotiation_callback(self._process_option) # type: ignore delay_factor = self.select_delay_factor(delay_factor) time.sleep(1 * delay_factor) @@ -889,7 +901,7 @@

      Inherited members

      time.sleep(0.5 * delay_factor) i += 1 except EOFError: - self.remote_conn.close() + self.remote_conn.close() # type: ignore msg = f"Login failed: {self.host}" raise NetmikoAuthenticationException(msg) @@ -904,7 +916,7 @@

      Inherited members

      return return_msg msg = f"Login failed: {self.host}" - self.remote_conn.close() + self.remote_conn.close() # type: ignore raise NetmikoAuthenticationException(msg)

      Ancestors

      diff --git a/docs/netmiko/ruckus/index.html b/docs/netmiko/ruckus/index.html index 664450a8a..a250538db 100644 --- a/docs/netmiko/ruckus/index.html +++ b/docs/netmiko/ruckus/index.html @@ -387,7 +387,7 @@

      Inherited members

      def telnet_login(self, *args: Any, **kwargs: Any) -> str: # set callback function to handle telnet options. assert isinstance(self.remote_conn, Telnet) - self.remote_conn.set_option_negotiation_callback(self._process_option) + self.remote_conn.set_option_negotiation_callback(self._process_option) # type: ignore return super().telnet_login(*args, **kwargs)

      Ancestors

      diff --git a/docs/netmiko/ruckus/ruckus_fastiron.html b/docs/netmiko/ruckus/ruckus_fastiron.html index 35f15145c..5d302a32d 100644 --- a/docs/netmiko/ruckus/ruckus_fastiron.html +++ b/docs/netmiko/ruckus/ruckus_fastiron.html @@ -31,7 +31,7 @@

      Module netmiko.ruckus.ruckus_fastiron

      from socket import socket from typing import Optional, Any -from telnetlib import DO, DONT, ECHO, IAC, WILL, WONT, Telnet +from netmiko._telnetlib.telnetlib import DO, DONT, ECHO, IAC, WILL, WONT, Telnet from netmiko.cisco_base_connection import CiscoSSHConnection @@ -131,7 +131,7 @@

      Module netmiko.ruckus.ruckus_fastiron

      def telnet_login(self, *args: Any, **kwargs: Any) -> str: # set callback function to handle telnet options. assert isinstance(self.remote_conn, Telnet) - self.remote_conn.set_option_negotiation_callback(self._process_option) + self.remote_conn.set_option_negotiation_callback(self._process_option) # type: ignore return super().telnet_login(*args, **kwargs) @@ -854,7 +854,7 @@

      Inherited members

      def telnet_login(self, *args: Any, **kwargs: Any) -> str: # set callback function to handle telnet options. assert isinstance(self.remote_conn, Telnet) - self.remote_conn.set_option_negotiation_callback(self._process_option) + self.remote_conn.set_option_negotiation_callback(self._process_option) # type: ignore return super().telnet_login(*args, **kwargs)

      Ancestors

      diff --git a/docs/netmiko/ruijie/ruijie_os.html b/docs/netmiko/ruijie/ruijie_os.html index d82849d28..4a8316c66 100644 --- a/docs/netmiko/ruijie/ruijie_os.html +++ b/docs/netmiko/ruijie/ruijie_os.html @@ -28,6 +28,7 @@

      Module netmiko.ruijie.ruijie_os

      Expand source code
      """Ruijie RGOS Support"""
      +
       import time
       from typing import Any
       
      diff --git a/docs/netmiko/scp_functions.html b/docs/netmiko/scp_functions.html
      index d5fac3392..49c6a855d 100644
      --- a/docs/netmiko/scp_functions.html
      +++ b/docs/netmiko/scp_functions.html
      @@ -36,6 +36,7 @@ 

      Module netmiko.scp_functions

      SCP requires a separate SSH connection for a control channel. """ + from typing import AnyStr, Optional, Callable, Any, Dict from typing import TYPE_CHECKING from netmiko.scp_handler import BaseFileTransfer diff --git a/docs/netmiko/scp_handler.html b/docs/netmiko/scp_handler.html index de0b9edd6..079745f11 100644 --- a/docs/netmiko/scp_handler.html +++ b/docs/netmiko/scp_handler.html @@ -36,6 +36,7 @@

      Module netmiko.scp_handler

      SCP requires a separate SSH connection for a control channel. """ + from typing import Callable, Optional, Any, Type from typing import TYPE_CHECKING from types import TracebackType diff --git a/docs/netmiko/snmp_autodetect.html b/docs/netmiko/snmp_autodetect.html index 7f89ec393..c4a228f85 100644 --- a/docs/netmiko/snmp_autodetect.html +++ b/docs/netmiko/snmp_autodetect.html @@ -62,6 +62,7 @@

      Example:

      Note, pysnmp is a required dependency for SNMPDetect and is intentionally not included in netmiko requirements. So installation of pysnmp might be required. """ + from typing import Optional, Dict, List from typing.re import Pattern import re diff --git a/docs/netmiko/sophos/index.html b/docs/netmiko/sophos/index.html index ebf7262be..2333414cd 100644 --- a/docs/netmiko/sophos/index.html +++ b/docs/netmiko/sophos/index.html @@ -186,7 +186,7 @@

      Classes

      class SophosSfosSSH(NoEnable, NoConfig, CiscoSSHConnection):
           def session_preparation(self) -> None:
               """Prepare the session after the connection has been established."""
      -        self._test_channel_read()
      +        self._test_channel_read(pattern=r"Main Menu")
               """
               Sophos Firmware Version SFOS 18.0.0 GA-Build339
       
      @@ -203,8 +203,8 @@ 

      Classes

      Select Menu Number [0-7]: """ - self.write_channel("4" + self.RETURN) - self._test_channel_read(pattern=r"[console>]") + self.write_channel(SOPHOS_MENU_DEFAULT + self.RETURN) + self._test_channel_read(pattern=r"[#>]") self.set_base_prompt() # Clear the read buffer time.sleep(0.3 * self.global_delay_factor) @@ -249,7 +249,7 @@

      Methods

      def session_preparation(self) -> None:
           """Prepare the session after the connection has been established."""
      -    self._test_channel_read()
      +    self._test_channel_read(pattern=r"Main Menu")
           """
           Sophos Firmware Version SFOS 18.0.0 GA-Build339
       
      @@ -266,8 +266,8 @@ 

      Methods

      Select Menu Number [0-7]: """ - self.write_channel("4" + self.RETURN) - self._test_channel_read(pattern=r"[console>]") + self.write_channel(SOPHOS_MENU_DEFAULT + self.RETURN) + self._test_channel_read(pattern=r"[#>]") self.set_base_prompt() # Clear the read buffer time.sleep(0.3 * self.global_delay_factor) diff --git a/docs/netmiko/sophos/sophos_sfos_ssh.html b/docs/netmiko/sophos/sophos_sfos_ssh.html index 7c3acb6f1..ad4f05ede 100644 --- a/docs/netmiko/sophos/sophos_sfos_ssh.html +++ b/docs/netmiko/sophos/sophos_sfos_ssh.html @@ -28,18 +28,23 @@

      Module netmiko.sophos.sophos_sfos_ssh

      Expand source code
      """SophosXG (SFOS) Firewall support"""
      -import time
      +
       from typing import Any
      +import time
      +import os
       
       from netmiko.no_enable import NoEnable
       from netmiko.no_config import NoConfig
       from netmiko.cisco_base_connection import CiscoSSHConnection
       
       
      +SOPHOS_MENU_DEFAULT = os.getenv("NETMIKO_SOPHOS_MENU", "4")
      +
      +
       class SophosSfosSSH(NoEnable, NoConfig, CiscoSSHConnection):
           def session_preparation(self) -> None:
               """Prepare the session after the connection has been established."""
      -        self._test_channel_read()
      +        self._test_channel_read(pattern=r"Main Menu")
               """
               Sophos Firmware Version SFOS 18.0.0 GA-Build339
       
      @@ -56,8 +61,8 @@ 

      Module netmiko.sophos.sophos_sfos_ssh

      Select Menu Number [0-7]: """ - self.write_channel("4" + self.RETURN) - self._test_channel_read(pattern=r"[console>]") + self.write_channel(SOPHOS_MENU_DEFAULT + self.RETURN) + self._test_channel_read(pattern=r"[#>]") self.set_base_prompt() # Clear the read buffer time.sleep(0.3 * self.global_delay_factor) @@ -216,7 +221,7 @@

      Classes

      class SophosSfosSSH(NoEnable, NoConfig, CiscoSSHConnection):
           def session_preparation(self) -> None:
               """Prepare the session after the connection has been established."""
      -        self._test_channel_read()
      +        self._test_channel_read(pattern=r"Main Menu")
               """
               Sophos Firmware Version SFOS 18.0.0 GA-Build339
       
      @@ -233,8 +238,8 @@ 

      Classes

      Select Menu Number [0-7]: """ - self.write_channel("4" + self.RETURN) - self._test_channel_read(pattern=r"[console>]") + self.write_channel(SOPHOS_MENU_DEFAULT + self.RETURN) + self._test_channel_read(pattern=r"[#>]") self.set_base_prompt() # Clear the read buffer time.sleep(0.3 * self.global_delay_factor) @@ -279,7 +284,7 @@

      Methods

      def session_preparation(self) -> None:
           """Prepare the session after the connection has been established."""
      -    self._test_channel_read()
      +    self._test_channel_read(pattern=r"Main Menu")
           """
           Sophos Firmware Version SFOS 18.0.0 GA-Build339
       
      @@ -296,8 +301,8 @@ 

      Methods

      Select Menu Number [0-7]: """ - self.write_channel("4" + self.RETURN) - self._test_channel_read(pattern=r"[console>]") + self.write_channel(SOPHOS_MENU_DEFAULT + self.RETURN) + self._test_channel_read(pattern=r"[#>]") self.set_base_prompt() # Clear the read buffer time.sleep(0.3 * self.global_delay_factor) diff --git a/docs/netmiko/ssh_autodetect.html b/docs/netmiko/ssh_autodetect.html index 4ebc4ee44..e05f48cfb 100644 --- a/docs/netmiko/ssh_autodetect.html +++ b/docs/netmiko/ssh_autodetect.html @@ -100,6 +100,7 @@

      Netmiko connection creation section >>> remote_device['device_type'] = best_match >>> connection = ConnectHandler(**remote_device) """ + from typing import Any, List, Optional, Union, Dict import re import time @@ -156,6 +157,12 @@

      Netmiko connection creation section "priority": 99, "dispatch": "_autodetect_std", }, + "cisco_ftd": { + "cmd": "show version", + "search_patterns": [r"Cisco Firepower"], + "priority": 99, + "dispatch": "_autodetect_std", + }, "cisco_ios": { "cmd": "show version", "search_patterns": [ @@ -364,6 +371,12 @@

      Netmiko connection creation section "priority": 99, "dispatch": "_autodetect_std", }, + "netgear_prosafe": { + "cmd": "show version", + "search_patterns": [r"ProSAFE"], + "priority": 99, + "dispatch": "_autodetect_std", + }, } # Sort SSH_MAPPER_DICT such that the most common commands are first diff --git a/docs/netmiko/telnet_proxy.html b/docs/netmiko/telnet_proxy.html index bf3ff3742..861c621bc 100644 --- a/docs/netmiko/telnet_proxy.html +++ b/docs/netmiko/telnet_proxy.html @@ -28,7 +28,7 @@

      Module netmiko.telnet_proxy

      from typing import Dict, Any, Optional
       import socket
      -import telnetlib
      +from netmiko._telnetlib import telnetlib
       
       try:
           import socks
      @@ -47,7 +47,7 @@ 

      Module netmiko.telnet_proxy

      proxy_dict: Optional[Dict[str, Any]] = None, ) -> None: self.proxy_dict = proxy_dict - super().__init__(host=host, port=port, timeout=timeout) + super().__init__(host=host, port=port, timeout=timeout) # type: ignore def open( self, @@ -162,7 +162,7 @@

      Classes

      proxy_dict: Optional[Dict[str, Any]] = None, ) -> None: self.proxy_dict = proxy_dict - super().__init__(host=host, port=port, timeout=timeout) + super().__init__(host=host, port=port, timeout=timeout) # type: ignore def open( self, @@ -205,7 +205,7 @@

      Classes

      Ancestors

        -
      • telnetlib.Telnet
      • +
      • netmiko._telnetlib.telnetlib.Telnet

      Methods

      diff --git a/docs/netmiko/terminal_server/terminal_server.html b/docs/netmiko/terminal_server/terminal_server.html index 8c2b2aaee..d2e4890ba 100644 --- a/docs/netmiko/terminal_server/terminal_server.html +++ b/docs/netmiko/terminal_server/terminal_server.html @@ -28,6 +28,7 @@

      Module netmiko.terminal_server.terminal_serverExpand source code
      """Generic Terminal Server driver."""
      +
       from typing import Any
       
       from netmiko.base_connection import BaseConnection
      diff --git a/docs/netmiko/utilities.html b/docs/netmiko/utilities.html
      index e07c3514c..de4a93c67 100644
      --- a/docs/netmiko/utilities.html
      +++ b/docs/netmiko/utilities.html
      @@ -28,6 +28,7 @@ 

      Module netmiko.utilities

      Expand source code
      """Miscellaneous utility functions."""
      +
       from typing import (
           Any,
           AnyStr,
      diff --git a/docs/netmiko/zte/index.html b/docs/netmiko/zte/index.html
      index 5bda59ed5..ec3cf84af 100644
      --- a/docs/netmiko/zte/index.html
      +++ b/docs/netmiko/zte/index.html
      @@ -389,7 +389,7 @@ 

      Inherited members

      def telnet_login(self, *args: Any, **kwargs: Any) -> str: # set callback function to handle telnet options. assert isinstance(self.remote_conn, Telnet) - self.remote_conn.set_option_negotiation_callback(self._process_option) + self.remote_conn.set_option_negotiation_callback(self._process_option) # type: ignore return super().telnet_login(*args, **kwargs)

      Ancestors

      diff --git a/docs/netmiko/zte/zte_zxros.html b/docs/netmiko/zte/zte_zxros.html index 5f35d4e10..50915dc0d 100644 --- a/docs/netmiko/zte/zte_zxros.html +++ b/docs/netmiko/zte/zte_zxros.html @@ -31,7 +31,19 @@

      Module netmiko.zte.zte_zxros

      from typing import Any from netmiko.cisco_base_connection import CiscoBaseConnection -from telnetlib import IAC, DO, DONT, WILL, WONT, SB, SE, ECHO, SGA, NAWS, Telnet +from netmiko._telnetlib.telnetlib import ( + IAC, + DO, + DONT, + WILL, + WONT, + SB, + SE, + ECHO, + SGA, + NAWS, + Telnet, +) class ZteZxrosBase(CiscoBaseConnection): @@ -90,7 +102,7 @@

      Module netmiko.zte.zte_zxros

      def telnet_login(self, *args: Any, **kwargs: Any) -> str: # set callback function to handle telnet options. assert isinstance(self.remote_conn, Telnet) - self.remote_conn.set_option_negotiation_callback(self._process_option) + self.remote_conn.set_option_negotiation_callback(self._process_option) # type: ignore return super().telnet_login(*args, **kwargs)
      @@ -696,7 +708,7 @@

      Inherited members

      def telnet_login(self, *args: Any, **kwargs: Any) -> str: # set callback function to handle telnet options. assert isinstance(self.remote_conn, Telnet) - self.remote_conn.set_option_negotiation_callback(self._process_option) + self.remote_conn.set_option_negotiation_callback(self._process_option) # type: ignore return super().telnet_login(*args, **kwargs)

      Ancestors