From f351bb34be7803bdc834bedacad6de0293ba1a67 Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Tue, 28 Jun 2022 15:09:29 -0700 Subject: [PATCH] Netmiko Release 4 1 1 (#2839) --- docs/netmiko/a10/a10_ssh.html | 60 +- docs/netmiko/a10/index.html | 62 +- docs/netmiko/accedian/accedian_ssh.html | 60 +- docs/netmiko/accedian/index.html | 62 +- docs/netmiko/adtran/adtran.html | 112 +- docs/netmiko/adtran/index.html | 68 +- docs/netmiko/alcatel/alcatel_aos_ssh.html | 52 +- docs/netmiko/alcatel/index.html | 54 +- .../allied_telesis/allied_telesis_awplus.html | 84 +- docs/netmiko/allied_telesis/index.html | 46 +- docs/netmiko/apresia/apresia_aeos.html | 96 +- docs/netmiko/apresia/index.html | 68 +- docs/netmiko/arista/arista.html | 137 ++- docs/netmiko/arista/index.html | 76 +- docs/netmiko/aruba/aruba_ssh.html | 85 +- docs/netmiko/aruba/index.html | 82 +- docs/netmiko/base_connection.html | 562 +++++---- docs/netmiko/broadcom/broadcom_icos_ssh.html | 96 +- docs/netmiko/broadcom/index.html | 94 +- docs/netmiko/brocade/brocade_fos_ssh.html | 30 +- docs/netmiko/brocade/index.html | 32 +- docs/netmiko/calix/calix_b6.html | 126 ++- docs/netmiko/calix/index.html | 68 +- docs/netmiko/cdot/cdot_cros_ssh.html | 101 +- docs/netmiko/cdot/index.html | 98 +- docs/netmiko/centec/centec_os.html | 104 +- docs/netmiko/centec/index.html | 68 +- docs/netmiko/channel.html | 95 +- .../checkpoint/checkpoint_gaia_ssh.html | 54 +- docs/netmiko/checkpoint/index.html | 56 +- docs/netmiko/ciena/ciena_saos.html | 114 +- docs/netmiko/ciena/index.html | 86 +- docs/netmiko/cisco/cisco_asa_ssh.html | 126 ++- docs/netmiko/cisco/cisco_ftd_ssh.html | 80 +- docs/netmiko/cisco/cisco_ios.html | 182 +-- docs/netmiko/cisco/cisco_nxos_ssh.html | 101 +- docs/netmiko/cisco/cisco_s300.html | 96 +- docs/netmiko/cisco/cisco_tp_tcce.html | 104 +- docs/netmiko/cisco/cisco_viptela.html | 90 +- docs/netmiko/cisco/cisco_wlc_ssh.html | 120 +- docs/netmiko/cisco/cisco_xr.html | 201 ++-- docs/netmiko/cisco/index.html | 782 +++++++------ docs/netmiko/cisco_base_connection.html | 193 ++-- docs/netmiko/citrix/index.html | 72 +- docs/netmiko/citrix/netscaler_ssh.html | 70 +- docs/netmiko/cli_tools/index.html | 24 +- docs/netmiko/cli_tools/netmiko_cfg.html | 52 +- docs/netmiko/cli_tools/netmiko_grep.html | 52 +- docs/netmiko/cli_tools/netmiko_show.html | 52 +- docs/netmiko/cloudgenix/cloudgenix_ion.html | 68 +- docs/netmiko/cloudgenix/index.html | 70 +- docs/netmiko/coriant/coriant_ssh.html | 60 +- docs/netmiko/coriant/index.html | 62 +- docs/netmiko/dell/dell_dnos6.html | 96 +- docs/netmiko/dell/dell_force10_ssh.html | 52 +- docs/netmiko/dell/dell_isilon_ssh.html | 112 +- docs/netmiko/dell/dell_os10_ssh.html | 68 +- docs/netmiko/dell/dell_powerconnect.html | 139 ++- docs/netmiko/dell/dell_sonic_ssh.html | 52 +- docs/netmiko/dell/index.html | 326 +++--- docs/netmiko/dlink/dlink_ds.html | 112 +- docs/netmiko/dlink/index.html | 68 +- docs/netmiko/eltex/eltex_esr_ssh.html | 101 +- docs/netmiko/eltex/eltex_ssh.html | 60 +- docs/netmiko/eltex/index.html | 138 ++- docs/netmiko/endace/endace_ssh.html | 54 +- docs/netmiko/endace/index.html | 51 +- docs/netmiko/enterasys/enterasys_ssh.html | 60 +- docs/netmiko/enterasys/index.html | 62 +- docs/netmiko/ericsson/ericsson_ipos.html | 88 +- docs/netmiko/ericsson/index.html | 86 +- docs/netmiko/exceptions.html | 132 ++- docs/netmiko/extreme/extreme_ers_ssh.html | 248 ++-- docs/netmiko/extreme/extreme_exos.html | 130 ++- docs/netmiko/extreme/extreme_netiron.html | 104 +- docs/netmiko/extreme/extreme_nos_ssh.html | 60 +- docs/netmiko/extreme/extreme_slx_ssh.html | 60 +- .../netmiko/extreme/extreme_tierraos_ssh.html | 60 +- docs/netmiko/extreme/extreme_vsp_ssh.html | 60 +- docs/netmiko/extreme/extreme_wing_ssh.html | 52 +- docs/netmiko/extreme/index.html | 486 ++++---- docs/netmiko/f5/f5_linux_ssh.html | 44 +- docs/netmiko/f5/f5_tmsh_ssh.html | 76 +- docs/netmiko/f5/index.html | 102 +- docs/netmiko/flexvnf/flexvnf_ssh.html | 116 +- docs/netmiko/flexvnf/index.html | 114 +- docs/netmiko/fortinet/fortinet_ssh.html | 76 +- docs/netmiko/fortinet/index.html | 78 +- docs/netmiko/hp/hp_comware.html | 172 +-- docs/netmiko/hp/hp_procurve.html | 197 ++-- docs/netmiko/hp/index.html | 122 +- docs/netmiko/huawei/huawei.html | 255 +++-- docs/netmiko/huawei/huawei_smartax.html | 78 +- docs/netmiko/huawei/index.html | 204 ++-- docs/netmiko/index.html | 1003 ++++++++++------- docs/netmiko/ipinfusion/index.html | 68 +- docs/netmiko/ipinfusion/ipinfusion_ocnos.html | 96 +- docs/netmiko/juniper/index.html | 116 +- docs/netmiko/juniper/juniper.html | 212 ++-- docs/netmiko/juniper/juniper_screenos.html | 60 +- docs/netmiko/keymile/index.html | 92 +- docs/netmiko/keymile/keymile_nos_ssh.html | 54 +- docs/netmiko/keymile/keymile_ssh.html | 56 +- docs/netmiko/linux/index.html | 299 +++-- docs/netmiko/linux/linux_ssh.html | 367 +++--- docs/netmiko/mellanox/index.html | 77 +- .../netmiko/mellanox/mellanox_mlnxos_ssh.html | 80 +- docs/netmiko/mikrotik/index.html | 309 ++++- docs/netmiko/mikrotik/mikrotik_ssh.html | 645 ++++++++++- docs/netmiko/mrv/index.html | 118 +- docs/netmiko/mrv/mrv_lx.html | 68 +- docs/netmiko/mrv/mrv_ssh.html | 68 +- docs/netmiko/netapp/index.html | 66 +- docs/netmiko/netapp/netapp_cdot_ssh.html | 68 +- docs/netmiko/netgear/index.html | 59 +- docs/netmiko/netgear/netgear_prosafe_ssh.html | 62 +- docs/netmiko/netmiko_globals.html | 22 +- docs/netmiko/no_config.html | 67 +- docs/netmiko/no_enable.html | 58 +- docs/netmiko/nokia/index.html | 526 ++++++++- docs/netmiko/nokia/nokia_srl.html | 655 +++++++++++ docs/netmiko/nokia/nokia_sros.html | 223 ++-- docs/netmiko/oneaccess/index.html | 44 +- docs/netmiko/oneaccess/oneaccess_oneos.html | 68 +- docs/netmiko/ovs/index.html | 46 +- docs/netmiko/ovs/ovs_linux_ssh.html | 44 +- docs/netmiko/paloalto/index.html | 68 +- docs/netmiko/paloalto/paloalto_panos.html | 202 ++-- docs/netmiko/pluribus/index.html | 40 +- docs/netmiko/pluribus/pluribus_ssh.html | 38 +- docs/netmiko/quanta/index.html | 54 +- docs/netmiko/quanta/quanta_mesh_ssh.html | 52 +- docs/netmiko/rad/index.html | 78 +- docs/netmiko/rad/rad_etx.html | 147 ++- docs/netmiko/raisecom/index.html | 78 +- docs/netmiko/raisecom/raisecom_roap.html | 126 ++- docs/netmiko/ruckus/index.html | 68 +- docs/netmiko/ruckus/ruckus_fastiron.html | 116 +- docs/netmiko/ruijie/index.html | 68 +- docs/netmiko/ruijie/ruijie_os.html | 104 +- docs/netmiko/scp_functions.html | 48 +- docs/netmiko/scp_handler.html | 229 ++-- docs/netmiko/session_log.html | 54 +- docs/netmiko/sixwind/index.html | 46 +- docs/netmiko/sixwind/sixwind_os.html | 136 ++- docs/netmiko/snmp_autodetect.html | 51 +- docs/netmiko/sophos/index.html | 62 +- docs/netmiko/sophos/sophos_sfos_ssh.html | 60 +- docs/netmiko/ssh_auth.html | 30 +- docs/netmiko/ssh_autodetect.html | 55 +- docs/netmiko/supermicro/index.html | 68 +- docs/netmiko/supermicro/smci_smis.html | 104 +- docs/netmiko/terminal_server/index.html | 76 +- .../terminal_server/terminal_server.html | 104 +- docs/netmiko/tplink/index.html | 76 +- docs/netmiko/tplink/tplink_jetstream.html | 157 +-- docs/netmiko/ubiquiti/edge_ssh.html | 98 +- docs/netmiko/ubiquiti/edgerouter_ssh.html | 44 +- docs/netmiko/ubiquiti/index.html | 154 +-- docs/netmiko/ubiquiti/unifiswitch_ssh.html | 54 +- docs/netmiko/utilities.html | 236 ++-- docs/netmiko/vyos/index.html | 104 +- docs/netmiko/vyos/vyos_ssh.html | 106 +- docs/netmiko/watchguard/fireware_ssh.html | 82 +- docs/netmiko/watchguard/index.html | 80 +- docs/netmiko/yamaha/index.html | 68 +- docs/netmiko/yamaha/yamaha.html | 144 ++- docs/netmiko/zte/index.html | 68 +- docs/netmiko/zte/zte_zxros.html | 124 +- docs/netmiko/zyxel/index.html | 62 +- docs/netmiko/zyxel/zyxel_ssh.html | 60 +- netmiko/__init__.py | 2 +- release_process.txt | 2 +- requirements-dev.txt | 1 + 174 files changed, 12631 insertions(+), 7645 deletions(-) create mode 100644 docs/netmiko/nokia/nokia_srl.html diff --git a/docs/netmiko/a10/a10_ssh.html b/docs/netmiko/a10/a10_ssh.html index 394134f04..2cdb73fc9 100644 --- a/docs/netmiko/a10/a10_ssh.html +++ b/docs/netmiko/a10/a10_ssh.html @@ -3,15 +3,17 @@ - + netmiko.a10.a10_ssh API documentation - - - - - + + + + + + +
@@ -22,7 +24,9 @@

Module netmiko.a10.a10_ssh

A10 support.

-Source code + +Expand source code +
"""A10 support."""
 from netmiko.cisco_base_connection import CiscoSSHConnection
 
@@ -58,16 +62,16 @@ 

Classes

class A10SSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
-

A10 support.

+

A10 support.

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -106,7 +110,7 @@ 

Classes

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -151,12 +155,12 @@

Classes

: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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -164,9 +168,11 @@

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). -
+
-Source code + +Expand source code +
class A10SSH(CiscoSSHConnection):
     """A10 support."""
 
@@ -195,12 +201,14 @@ 

Ancestors

Methods

-def save_config(self, cmd='', confirm=False, confirm_response='') +def save_config(self, cmd: str = '', confirm: bool = False, confirm_response: str = '') ‑> str
-

Not Implemented

+

Not Implemented

-Source code + +Expand source code +
def save_config(
     self, cmd: str = "", confirm: bool = False, confirm_response: str = ""
 ) -> str:
@@ -209,12 +217,14 @@ 

Methods

-def session_preparation(self) +def session_preparation(self) ‑> None
-

A10 requires to be enable mode to disable paging.

+

A10 requires to be enable mode to disable paging.

-Source code + +Expand source code +
def session_preparation(self) -> None:
     """A10 requires to be enable mode to disable paging."""
     self._test_channel_read(pattern=r"[>#]")
@@ -303,9 +313,7 @@ 

-

Generated by pdoc 0.6.3.

+

Generated by pdoc 0.10.0.

- - \ No newline at end of file diff --git a/docs/netmiko/a10/index.html b/docs/netmiko/a10/index.html index e9903e2f0..bc1357df4 100644 --- a/docs/netmiko/a10/index.html +++ b/docs/netmiko/a10/index.html @@ -3,15 +3,17 @@ - + netmiko.a10 API documentation - - - - - + + + + + + +
@@ -21,7 +23,9 @@

Module netmiko.a10

-Source code + +Expand source code +
from netmiko.a10.a10_ssh import A10SSH
 
 __all__ = ["A10SSH"]
@@ -32,7 +36,7 @@

Sub-modules

netmiko.a10.a10_ssh
-

A10 support.

+

A10 support.

@@ -45,16 +49,16 @@

Classes

class A10SSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
-

A10 support.

+

A10 support.

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -93,7 +97,7 @@ 

Classes

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -138,12 +142,12 @@

Classes

: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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -151,9 +155,11 @@

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). -
+

-Source code + +Expand source code +
class A10SSH(CiscoSSHConnection):
     """A10 support."""
 
@@ -182,12 +188,14 @@ 

Ancestors

Methods

-def save_config(self, cmd='', confirm=False, confirm_response='') +def save_config(self, cmd: str = '', confirm: bool = False, confirm_response: str = '') ‑> str
-

Not Implemented

+

Not Implemented

-Source code + +Expand source code +
def save_config(
     self, cmd: str = "", confirm: bool = False, confirm_response: str = ""
 ) -> str:
@@ -196,12 +204,14 @@ 

Methods

-def session_preparation(self) +def session_preparation(self) ‑> None
-

A10 requires to be enable mode to disable paging.

+

A10 requires to be enable mode to disable paging.

-Source code + +Expand source code +
def session_preparation(self) -> None:
     """A10 requires to be enable mode to disable paging."""
     self._test_channel_read(pattern=r"[>#]")
@@ -295,9 +305,7 @@ 

A10SSH

- - \ No newline at end of file diff --git a/docs/netmiko/accedian/accedian_ssh.html b/docs/netmiko/accedian/accedian_ssh.html index 23062de0e..1cd246623 100644 --- a/docs/netmiko/accedian/accedian_ssh.html +++ b/docs/netmiko/accedian/accedian_ssh.html @@ -3,15 +3,17 @@ - + netmiko.accedian.accedian_ssh API documentation - - - - - + + + + + + +
@@ -21,7 +23,9 @@

Module netmiko.accedian.accedian_ssh

-Source code + +Expand source code +
from typing import Optional
 from netmiko.no_enable import NoEnable
 from netmiko.no_config import NoConfig
@@ -67,10 +71,10 @@ 

Classes

class AccedianSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
-

Class for platforms that have no enable mode.

+

Class for platforms that have no enable mode.

Netmiko translates the meaning of "enable" mode to be a proxy for "can go into config mode". In other words, that you ultimately have privileges to execute configuration changes.

@@ -80,10 +84,10 @@

Classes

don't explicitly support enable mode.

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -122,7 +126,7 @@ 

Classes

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -167,12 +171,12 @@

Classes

: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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -180,9 +184,11 @@

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). -
+
-Source code + +Expand source code +
class AccedianSSH(NoEnable, NoConfig, CiscoSSHConnection):
     def session_preparation(self) -> None:
         self._test_channel_read(pattern=r"[:#]")
@@ -221,12 +227,14 @@ 

Ancestors

Methods

-def save_config(self, cmd='', confirm=False, confirm_response='') +def save_config(self, cmd: str = '', confirm: bool = False, confirm_response: str = '') ‑> str
-

Not Implemented

+

Not Implemented

-Source code + +Expand source code +
def save_config(
     self, cmd: str = "", confirm: bool = False, confirm_response: str = ""
 ) -> str:
@@ -235,12 +243,14 @@ 

Methods

-def set_base_prompt(self, pri_prompt_terminator=':', alt_prompt_terminator='#', delay_factor=2.0, pattern=None) +def set_base_prompt(self, pri_prompt_terminator: str = ':', alt_prompt_terminator: str = '#', delay_factor: float = 2.0, pattern: Optional[str] = None) ‑> str
-

Sets self.base_prompt: used as delimiter for stripping of trailing prompt in output.

+

Sets self.base_prompt: used as delimiter for stripping of trailing prompt in output.

-Source code + +Expand source code +
def set_base_prompt(
     self,
     pri_prompt_terminator: str = ":",
@@ -335,9 +345,7 @@ 

-

Generated by pdoc 0.6.3.

+

Generated by pdoc 0.10.0.

- - \ No newline at end of file diff --git a/docs/netmiko/accedian/index.html b/docs/netmiko/accedian/index.html index a626e5195..7465dd262 100644 --- a/docs/netmiko/accedian/index.html +++ b/docs/netmiko/accedian/index.html @@ -3,15 +3,17 @@ - + netmiko.accedian API documentation - - - - - + + + + + + +
@@ -21,7 +23,9 @@

Module netmiko.accedian

-Source code + +Expand source code +
from netmiko.accedian.accedian_ssh import AccedianSSH
 
 __all__ = ["AccedianSSH"]
@@ -32,7 +36,7 @@

Sub-modules

netmiko.accedian.accedian_ssh
-
+
@@ -45,10 +49,10 @@

Classes

class AccedianSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
-

Class for platforms that have no enable mode.

+

Class for platforms that have no enable mode.

Netmiko translates the meaning of "enable" mode to be a proxy for "can go into config mode". In other words, that you ultimately have privileges to execute configuration changes.

@@ -58,10 +62,10 @@

Classes

don't explicitly support enable mode.

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -100,7 +104,7 @@ 

Classes

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -145,12 +149,12 @@

Classes

: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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -158,9 +162,11 @@

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). -
+

-Source code + +Expand source code +
class AccedianSSH(NoEnable, NoConfig, CiscoSSHConnection):
     def session_preparation(self) -> None:
         self._test_channel_read(pattern=r"[:#]")
@@ -199,12 +205,14 @@ 

Ancestors

Methods

-def save_config(self, cmd='', confirm=False, confirm_response='') +def save_config(self, cmd: str = '', confirm: bool = False, confirm_response: str = '') ‑> str
-

Not Implemented

+

Not Implemented

-Source code + +Expand source code +
def save_config(
     self, cmd: str = "", confirm: bool = False, confirm_response: str = ""
 ) -> str:
@@ -213,12 +221,14 @@ 

Methods

-def set_base_prompt(self, pri_prompt_terminator=':', alt_prompt_terminator='#', delay_factor=2.0, pattern=None) +def set_base_prompt(self, pri_prompt_terminator: str = ':', alt_prompt_terminator: str = '#', delay_factor: float = 2.0, pattern: Optional[str] = None) ‑> str
-

Sets self.base_prompt: used as delimiter for stripping of trailing prompt in output.

+

Sets self.base_prompt: used as delimiter for stripping of trailing prompt in output.

-Source code + +Expand source code +
def set_base_prompt(
     self,
     pri_prompt_terminator: str = ":",
@@ -318,9 +328,7 @@ 

-

Generated by pdoc 0.6.3.

+

Generated by pdoc 0.10.0.

- - \ No newline at end of file diff --git a/docs/netmiko/adtran/adtran.html b/docs/netmiko/adtran/adtran.html index f9ab8d592..8973265c9 100644 --- a/docs/netmiko/adtran/adtran.html +++ b/docs/netmiko/adtran/adtran.html @@ -3,15 +3,17 @@ - + netmiko.adtran.adtran API documentation - - - - - + + + + + + +
@@ -21,7 +23,9 @@

Module netmiko.adtran.adtran

-Source code + +Expand source code +
from typing import Any, Optional
 import re
 from netmiko.cisco_base_connection import CiscoBaseConnection
@@ -57,7 +61,9 @@ 

Module netmiko.adtran.adtran

def exit_enable_mode(self, exit_command: str = "disable") -> str: return super().exit_enable_mode(exit_command=exit_command) - def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool: + 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) def config_mode( @@ -108,16 +114,16 @@

Classes

class AdtranOSBase -(*args, **kwargs) +(*args: Any, **kwargs: Any)
-

Base Class for cisco-like behavior.

+

Base Class for cisco-like behavior.

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -156,7 +162,7 @@ 

Classes

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -201,12 +207,12 @@

Classes

: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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -214,9 +220,11 @@

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). -
+
-Source code + +Expand source code +
class AdtranOSBase(CiscoBaseConnection):
     def __init__(self, *args: Any, **kwargs: Any) -> None:
         if kwargs.get("global_cmd_verify") is None:
@@ -247,7 +255,9 @@ 

Classes

def exit_enable_mode(self, exit_command: str = "disable") -> str: return super().exit_enable_mode(exit_command=exit_command) - def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool: + 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) def config_mode( @@ -288,12 +298,14 @@

Subclasses

Methods

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

Enter configuration mode.

+

Enter configuration mode.

-Source code + +Expand source code +
def config_mode(
     self, config_command: str = "config term", pattern: str = "", re_flags: int = 0
 ) -> str:
@@ -304,12 +316,14 @@ 

Methods

-def session_preparation(self) +def session_preparation(self) ‑> None
-

Prepare the session after the connection has been established.

+

Prepare the session after the connection has been established.

-Source code + +Expand source code +
def session_preparation(self) -> None:
     """Prepare the session after the connection has been established."""
     self.ansi_escape_codes = True
@@ -368,16 +382,16 @@ 

Inherited members

class AdtranOSSSH -(*args, **kwargs) +(*args: Any, **kwargs: Any)
-

Base Class for cisco-like behavior.

+

Base Class for cisco-like behavior.

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -416,7 +430,7 @@ 

Inherited members

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -461,12 +475,12 @@

Inherited members

: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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -474,9 +488,11 @@

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). -
+
-Source code + +Expand source code +
class AdtranOSSSH(AdtranOSBase):
     pass
@@ -537,16 +553,16 @@

Inherited members

class AdtranOSTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
-

Base Class for cisco-like behavior.

+

Base Class for cisco-like behavior.

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -585,7 +601,7 @@ 

Inherited members

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -630,12 +646,12 @@

Inherited members

: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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -643,9 +659,11 @@

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). -
+
-Source code + +Expand source code +
class AdtranOSTelnet(AdtranOSBase):
     def __init__(self, *args: Any, **kwargs: Any) -> None:
         default_enter = kwargs.get("default_enter")
@@ -742,9 +760,7 @@ 

-

Generated by pdoc 0.6.3.

+

Generated by pdoc 0.10.0.

- - \ No newline at end of file diff --git a/docs/netmiko/adtran/index.html b/docs/netmiko/adtran/index.html index 0386aecd4..fcf18d1ef 100644 --- a/docs/netmiko/adtran/index.html +++ b/docs/netmiko/adtran/index.html @@ -3,15 +3,17 @@ - + netmiko.adtran API documentation - - - - - + + + + + + +
@@ -21,7 +23,9 @@

Module netmiko.adtran

-Source code + +Expand source code +
from netmiko.adtran.adtran import AdtranOSSSH, AdtranOSTelnet
 
 __all__ = ["AdtranOSSSH", "AdtranOSTelnet"]
@@ -32,7 +36,7 @@

Sub-modules

netmiko.adtran.adtran
-
+
@@ -45,16 +49,16 @@

Classes

class AdtranOSSSH -(*args, **kwargs) +(*args: Any, **kwargs: Any)
-

Base Class for cisco-like behavior.

+

Base Class for cisco-like behavior.

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -93,7 +97,7 @@ 

Classes

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -138,12 +142,12 @@

Classes

: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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -151,9 +155,11 @@

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). -
+

-Source code + +Expand source code +
class AdtranOSSSH(AdtranOSBase):
     pass
@@ -214,16 +220,16 @@

Inherited members

class AdtranOSTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
-

Base Class for cisco-like behavior.

+

Base Class for cisco-like behavior.

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -262,7 +268,7 @@ 

Inherited members

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -307,12 +313,12 @@

Inherited members

: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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -320,9 +326,11 @@

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). -
+
-Source code + +Expand source code +
class AdtranOSTelnet(AdtranOSBase):
     def __init__(self, *args: Any, **kwargs: Any) -> None:
         default_enter = kwargs.get("default_enter")
@@ -417,9 +425,7 @@ 

-

Generated by pdoc 0.6.3.

+

Generated by pdoc 0.10.0.

- - \ No newline at end of file diff --git a/docs/netmiko/alcatel/alcatel_aos_ssh.html b/docs/netmiko/alcatel/alcatel_aos_ssh.html index 81aa5abd2..d83e146e6 100644 --- a/docs/netmiko/alcatel/alcatel_aos_ssh.html +++ b/docs/netmiko/alcatel/alcatel_aos_ssh.html @@ -3,15 +3,17 @@ - + netmiko.alcatel.alcatel_aos_ssh API documentation - - - - - + + + + + + +
@@ -22,7 +24,9 @@

Module netmiko.alcatel.alcatel_aos_ssh

Alcatel-Lucent Enterprise AOS support (AOS6 and AOS8).

-Source code + +Expand source code +
"""Alcatel-Lucent Enterprise AOS support (AOS6 and AOS8)."""
 from netmiko.no_enable import NoEnable
 from netmiko.no_config import NoConfig
@@ -60,16 +64,16 @@ 

Classes

class AlcatelAosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
-

Alcatel-Lucent Enterprise AOS support (AOS6 and AOS8).

+

Alcatel-Lucent Enterprise AOS support (AOS6 and AOS8).

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -108,7 +112,7 @@ 

Classes

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -153,12 +157,12 @@

Classes

: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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -166,9 +170,11 @@

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). -
+
-Source code + +Expand source code +
class AlcatelAosSSH(NoEnable, NoConfig, CiscoSSHConnection):
     """Alcatel-Lucent Enterprise AOS support (AOS6 and AOS8)."""
 
@@ -199,12 +205,14 @@ 

Ancestors

Methods

-def save_config(self, cmd='write memory flash-synchro', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'write memory flash-synchro', confirm: bool = False, confirm_response: str = '') ‑> str
-

Save Config

+

Save Config

-Source code + +Expand source code +
def save_config(
     self,
     cmd: str = "write memory flash-synchro",
@@ -294,9 +302,7 @@ 

-

Generated by pdoc 0.6.3.

+

Generated by pdoc 0.10.0.

- - \ No newline at end of file diff --git a/docs/netmiko/alcatel/index.html b/docs/netmiko/alcatel/index.html index c650d1984..2800dd5de 100644 --- a/docs/netmiko/alcatel/index.html +++ b/docs/netmiko/alcatel/index.html @@ -3,15 +3,17 @@ - + netmiko.alcatel API documentation - - - - - + + + + + + +
@@ -21,7 +23,9 @@

Module netmiko.alcatel

-Source code + +Expand source code +
from netmiko.alcatel.alcatel_aos_ssh import AlcatelAosSSH
 
 __all__ = ["AlcatelAosSSH"]
@@ -32,7 +36,7 @@

Sub-modules

netmiko.alcatel.alcatel_aos_ssh
-

Alcatel-Lucent Enterprise AOS support (AOS6 and AOS8).

+

Alcatel-Lucent Enterprise AOS support (AOS6 and AOS8).

@@ -45,16 +49,16 @@

Classes

class AlcatelAosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
-

Alcatel-Lucent Enterprise AOS support (AOS6 and AOS8).

+

Alcatel-Lucent Enterprise AOS support (AOS6 and AOS8).

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -93,7 +97,7 @@ 

Classes

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -138,12 +142,12 @@

Classes

: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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -151,9 +155,11 @@

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). -
+

-Source code + +Expand source code +
class AlcatelAosSSH(NoEnable, NoConfig, CiscoSSHConnection):
     """Alcatel-Lucent Enterprise AOS support (AOS6 and AOS8)."""
 
@@ -184,12 +190,14 @@ 

Ancestors

Methods

-def save_config(self, cmd='write memory flash-synchro', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'write memory flash-synchro', confirm: bool = False, confirm_response: str = '') ‑> str
-

Save Config

+

Save Config

-Source code + +Expand source code +
def save_config(
     self,
     cmd: str = "write memory flash-synchro",
@@ -284,9 +292,7 @@ 

-

Generated by pdoc 0.6.3.

+

Generated by pdoc 0.10.0.

- - \ No newline at end of file diff --git a/docs/netmiko/allied_telesis/allied_telesis_awplus.html b/docs/netmiko/allied_telesis/allied_telesis_awplus.html index c0aa2a9a9..9738c3a80 100644 --- a/docs/netmiko/allied_telesis/allied_telesis_awplus.html +++ b/docs/netmiko/allied_telesis/allied_telesis_awplus.html @@ -3,15 +3,17 @@ - + netmiko.allied_telesis.allied_telesis_awplus API documentation - - - - - + + + + + + +
@@ -21,7 +23,9 @@

Module netmiko.allied_telesis.allied_telesis_awplus
-Source code + +Expand source code +
from netmiko.cisco_base_connection import CiscoBaseConnection
 import time
 
@@ -81,16 +85,16 @@ 

Classes

class AlliedTelesisAwplusBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
-

Implement methods for interacting with Allied Telesis devices.

+

Implement methods for interacting with Allied Telesis devices.

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -129,7 +133,7 @@ 

Classes

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -174,12 +178,12 @@

Classes

: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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -187,9 +191,11 @@

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). -
+
-Source code + +Expand source code +
class AlliedTelesisAwplusBase(CiscoBaseConnection):
     """Implement methods for interacting with Allied Telesis devices."""
 
@@ -241,12 +247,14 @@ 

Subclasses

Methods

-def exit_config_mode(self, exit_config='exit', pattern='') +def exit_config_mode(self, exit_config: str = 'exit', pattern: str = '') ‑> str
-

Exit configuration mode.

+

Exit configuration mode.

-Source code + +Expand source code +
def exit_config_mode(self, exit_config: str = "exit", pattern: str = "") -> str:
     """Exit configuration mode."""
     output = ""
@@ -264,14 +272,16 @@ 

Methods

-def session_preparation(self) +def session_preparation(self) ‑> None
-

Prepare the session after the connection has been established.

+

Prepare the session after the connection has been established.

Disable paging (the '–more–' prompts). -Set the base prompt for interaction ('>').

+Set the base prompt for interaction ('>').

-Source code + +Expand source code +
def session_preparation(self) -> None:
     """
     Prepare the session after the connection has been established.
@@ -336,16 +346,16 @@ 

Inherited members

class AlliedTelesisAwplusSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
-

Implement methods for interacting with Allied Telesis devices.

+

Implement methods for interacting with Allied Telesis devices.

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -384,7 +394,7 @@ 

Inherited members

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -429,12 +439,12 @@

Inherited members

: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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -442,9 +452,11 @@

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). -
+
-Source code + +Expand source code +
class AlliedTelesisAwplusSSH(AlliedTelesisAwplusBase):
     pass
@@ -535,9 +547,7 @@

-

Generated by pdoc 0.6.3.

+

Generated by pdoc 0.10.0.

- - \ No newline at end of file diff --git a/docs/netmiko/allied_telesis/index.html b/docs/netmiko/allied_telesis/index.html index b2985295a..59302927c 100644 --- a/docs/netmiko/allied_telesis/index.html +++ b/docs/netmiko/allied_telesis/index.html @@ -3,15 +3,17 @@ - + netmiko.allied_telesis API documentation - - - - - + + + + + + +
@@ -21,7 +23,9 @@

Module netmiko.allied_telesis

-Source code + +Expand source code +
from netmiko.allied_telesis.allied_telesis_awplus import AlliedTelesisAwplusSSH
 
 __all__ = ["AlliedTelesisAwplusSSH"]
@@ -32,7 +36,7 @@

Sub-modules

netmiko.allied_telesis.allied_telesis_awplus
-
+
@@ -45,16 +49,16 @@

Classes

class AlliedTelesisAwplusSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
-

Implement methods for interacting with Allied Telesis devices.

+

Implement methods for interacting with Allied Telesis devices.

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -93,7 +97,7 @@ 

Classes

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -138,12 +142,12 @@

Classes

: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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -151,9 +155,11 @@

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). -
+

-Source code + +Expand source code +
class AlliedTelesisAwplusSSH(AlliedTelesisAwplusBase):
     pass
@@ -242,9 +248,7 @@

-

Generated by pdoc 0.6.3.

+

Generated by pdoc 0.10.0.

- - \ No newline at end of file diff --git a/docs/netmiko/apresia/apresia_aeos.html b/docs/netmiko/apresia/apresia_aeos.html index 6f5b09867..5e3823a77 100644 --- a/docs/netmiko/apresia/apresia_aeos.html +++ b/docs/netmiko/apresia/apresia_aeos.html @@ -3,15 +3,17 @@ - + netmiko.apresia.apresia_aeos API documentation - - - - - + + + + + + +
@@ -21,7 +23,9 @@

Module netmiko.apresia.apresia_aeos

-Source code + +Expand source code +
from typing import Any, Optional
 from netmiko.cisco_base_connection import CiscoSSHConnection
 
@@ -79,16 +83,16 @@ 

Classes

class ApresiaAeosBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
-

Base Class for cisco-like behavior.

+

Base Class for cisco-like behavior.

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -127,7 +131,7 @@ 

Classes

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -172,12 +176,12 @@

Classes

: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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -185,9 +189,11 @@

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). -
+
-Source code + +Expand source code +
class ApresiaAeosBase(CiscoSSHConnection):
     def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
@@ -232,12 +238,14 @@ 

Subclasses

Methods

-def session_preparation(self) +def session_preparation(self) ‑> None
-

Prepare the session after the connection has been established.

+

Prepare the session after the connection has been established.

-Source code + +Expand source code +
def session_preparation(self) -> None:
     """Prepare the session after the connection has been established."""
     self._test_channel_read(pattern=r"[>#]")
@@ -296,16 +304,16 @@ 

Inherited members

class ApresiaAeosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
-

Base Class for cisco-like behavior.

+

Base Class for cisco-like behavior.

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -344,7 +352,7 @@ 

Inherited members

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -389,12 +397,12 @@

Inherited members

: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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -402,9 +410,11 @@

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). -
+
-Source code + +Expand source code +
class ApresiaAeosSSH(ApresiaAeosBase):
     pass
@@ -466,16 +476,16 @@

Inherited members

class ApresiaAeosTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
-

Base Class for cisco-like behavior.

+

Base Class for cisco-like behavior.

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -514,7 +524,7 @@ 

Inherited members

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -559,12 +569,12 @@

Inherited members

: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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -572,9 +582,11 @@

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). -
+
-Source code + +Expand source code +
class ApresiaAeosTelnet(ApresiaAeosBase):
     def __init__(self, *args: Any, **kwargs: Any) -> None:
         default_enter = kwargs.get("default_enter")
@@ -671,9 +683,7 @@ 

-

Generated by pdoc 0.6.3.

+

Generated by pdoc 0.10.0.

- - \ No newline at end of file diff --git a/docs/netmiko/apresia/index.html b/docs/netmiko/apresia/index.html index 432058152..faec52b44 100644 --- a/docs/netmiko/apresia/index.html +++ b/docs/netmiko/apresia/index.html @@ -3,15 +3,17 @@ - + netmiko.apresia API documentation - - - - - + + + + + + +
@@ -21,7 +23,9 @@

Module netmiko.apresia

-Source code + +Expand source code +
from netmiko.apresia.apresia_aeos import ApresiaAeosSSH, ApresiaAeosTelnet
 
 __all__ = ["ApresiaAeosSSH", "ApresiaAeosTelnet"]
@@ -32,7 +36,7 @@

Sub-modules

netmiko.apresia.apresia_aeos
-
+
@@ -45,16 +49,16 @@

Classes

class ApresiaAeosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
-

Base Class for cisco-like behavior.

+

Base Class for cisco-like behavior.

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -93,7 +97,7 @@ 

Classes

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -138,12 +142,12 @@

Classes

: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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -151,9 +155,11 @@

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). -
+

-Source code + +Expand source code +
class ApresiaAeosSSH(ApresiaAeosBase):
     pass
@@ -215,16 +221,16 @@

Inherited members

class ApresiaAeosTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
-

Base Class for cisco-like behavior.

+

Base Class for cisco-like behavior.

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -263,7 +269,7 @@ 

Inherited members

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -308,12 +314,12 @@

Inherited members

: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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -321,9 +327,11 @@

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). -
+
-Source code + +Expand source code +
class ApresiaAeosTelnet(ApresiaAeosBase):
     def __init__(self, *args: Any, **kwargs: Any) -> None:
         default_enter = kwargs.get("default_enter")
@@ -419,9 +427,7 @@ 

-

Generated by pdoc 0.6.3.

+

Generated by pdoc 0.10.0.

- - \ No newline at end of file diff --git a/docs/netmiko/arista/arista.html b/docs/netmiko/arista/arista.html index 7792ecae4..b16c1d4c4 100644 --- a/docs/netmiko/arista/arista.html +++ b/docs/netmiko/arista/arista.html @@ -3,15 +3,17 @@ - + netmiko.arista.arista API documentation - - - - - + + + + + + +
@@ -21,7 +23,9 @@

Module netmiko.arista.arista

-Source code + +Expand source code +
from typing import Any, Optional, Union, Sequence
 from typing import TYPE_CHECKING
 import re
@@ -53,7 +57,10 @@ 

Module netmiko.arista.arista

) def check_config_mode( - self, check_string: str = ")#", pattern: str = r"[>\#]" + self, + check_string: str = ")#", + pattern: str = r"[>\#]", + force_regex: bool = False, ) -> bool: """ Checks if the device is in configuration mode or not. @@ -178,16 +185,16 @@

Classes

class AristaBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
-

Base Class for cisco-like behavior.

+

Base Class for cisco-like behavior.

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -226,7 +233,7 @@ 

Classes

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -271,12 +278,12 @@

Classes

: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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -284,9 +291,11 @@

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). -
+
-Source code + +Expand source code +
class AristaBase(CiscoSSHConnection):
     def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
@@ -308,7 +317,10 @@ 

Classes

) def check_config_mode( - self, check_string: str = ")#", pattern: str = r"[>\#]" + self, + check_string: str = ")#", + pattern: str = r"[>\#]", + force_regex: bool = False, ) -> bool: """ Checks if the device is in configuration mode or not. @@ -367,17 +379,22 @@

Subclasses

Methods

-def check_config_mode(self, check_string=')#', pattern='[>\\#]') +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.

+

Checks if the device is in configuration mode or not.

Arista, unfortunately, does this: loc1-core01(s1)#

-

Can also be (s2)

+

Can also be (s2)

-Source code + +Expand source code +
def check_config_mode(
-    self, check_string: str = ")#", pattern: str = r"[>\#]"
+    self,
+    check_string: str = ")#",
+    pattern: str = r"[>\#]",
+    force_regex: bool = False,
 ) -> bool:
     """
     Checks if the device is in configuration mode or not.
@@ -395,12 +412,14 @@ 

Methods

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

Force arista to read pattern all the way to prompt on the next line.

+

Force arista to read pattern all the way to prompt on the next line.

-Source code + +Expand source code +
def config_mode(
     self,
     config_command: str = "configure terminal",
@@ -422,12 +441,14 @@ 

Methods

-def session_preparation(self) +def session_preparation(self) ‑> None
-

Prepare the session after the connection has been established.

+

Prepare the session after the connection has been established.

-Source code + +Expand source code +
def session_preparation(self) -> None:
     """Prepare the session after the connection has been established."""
     cmd = "terminal width 511"
@@ -486,12 +507,14 @@ 

Inherited members

class AristaFileTransfer -(ssh_conn, source_file, dest_file, file_system='/mnt/flash', direction='put', **kwargs) +(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: Optional[str] = '/mnt/flash', direction: str = 'put', **kwargs: Any)
-

Arista SCP File Transfer driver.

+

Arista SCP File Transfer driver.

-Source code + +Expand source code +
class AristaFileTransfer(CiscoFileTransfer):
     """Arista SCP File Transfer driver."""
 
@@ -580,16 +603,16 @@ 

Inherited members

class AristaSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
-

Base Class for cisco-like behavior.

+

Base Class for cisco-like behavior.

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -628,7 +651,7 @@ 

Inherited members

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -673,12 +696,12 @@

Inherited members

: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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -686,9 +709,11 @@

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). -
+
-Source code + +Expand source code +
class AristaSSH(AristaBase):
     pass
@@ -750,16 +775,16 @@

Inherited members

class AristaTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
-

Base Class for cisco-like behavior.

+

Base Class for cisco-like behavior.

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -798,7 +823,7 @@ 

Inherited members

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -843,12 +868,12 @@

Inherited members

: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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -856,9 +881,11 @@

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). -
+

-Source code + +Expand source code +
class AristaTelnet(AristaBase):
     def __init__(self, *args: Any, **kwargs: Any) -> None:
         default_enter = kwargs.get("default_enter")
@@ -960,9 +987,7 @@ 

-

Generated by pdoc 0.6.3.

+

Generated by pdoc 0.10.0.

- - \ No newline at end of file diff --git a/docs/netmiko/arista/index.html b/docs/netmiko/arista/index.html index 6fb17e5a0..b5196e6cd 100644 --- a/docs/netmiko/arista/index.html +++ b/docs/netmiko/arista/index.html @@ -3,15 +3,17 @@ - + netmiko.arista API documentation - - - - - + + + + + + +
@@ -21,7 +23,9 @@

Module netmiko.arista

-Source code + +Expand source code +
from netmiko.arista.arista import AristaSSH, AristaTelnet, AristaFileTransfer
 
 __all__ = ["AristaSSH", "AristaTelnet", "AristaFileTransfer"]
@@ -32,7 +36,7 @@

Sub-modules

netmiko.arista.arista
-
+
@@ -45,12 +49,14 @@

Classes

class AristaFileTransfer -(ssh_conn, source_file, dest_file, file_system='/mnt/flash', direction='put', **kwargs) +(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: Optional[str] = '/mnt/flash', direction: str = 'put', **kwargs: Any)
-

Arista SCP File Transfer driver.

+

Arista SCP File Transfer driver.

-Source code + +Expand source code +
class AristaFileTransfer(CiscoFileTransfer):
     """Arista SCP File Transfer driver."""
 
@@ -139,16 +145,16 @@ 

Inherited members

class AristaSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
-

Base Class for cisco-like behavior.

+

Base Class for cisco-like behavior.

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -187,7 +193,7 @@ 

Inherited members

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -232,12 +238,12 @@

Inherited members

: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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -245,9 +251,11 @@

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). -
+

-Source code + +Expand source code +
class AristaSSH(AristaBase):
     pass
@@ -309,16 +317,16 @@

Inherited members

class AristaTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
-

Base Class for cisco-like behavior.

+

Base Class for cisco-like behavior.

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -357,7 +365,7 @@ 

Inherited members

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -402,12 +410,12 @@

Inherited members

: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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -415,9 +423,11 @@

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). -
+

-Source code + +Expand source code +
class AristaTelnet(AristaBase):
     def __init__(self, *args: Any, **kwargs: Any) -> None:
         default_enter = kwargs.get("default_enter")
@@ -516,9 +526,7 @@ 

-

Generated by pdoc 0.6.3.

+

Generated by pdoc 0.10.0.

- - \ No newline at end of file diff --git a/docs/netmiko/aruba/aruba_ssh.html b/docs/netmiko/aruba/aruba_ssh.html index f6d8f5dd9..20d0d54fb 100644 --- a/docs/netmiko/aruba/aruba_ssh.html +++ b/docs/netmiko/aruba/aruba_ssh.html @@ -3,15 +3,17 @@ - + netmiko.aruba.aruba_ssh API documentation - - - - - + + + + + + +
@@ -23,7 +25,9 @@

Module netmiko.aruba.aruba_ssh

Aruba OS support.

For use with Aruba OS Controllers.

-Source code + +Expand source code +
"""
 Aruba OS support.
 
@@ -55,7 +59,10 @@ 

Module netmiko.aruba.aruba_ssh

self.disable_paging(command="no paging") def check_config_mode( - self, check_string: str = "(config) #", pattern: str = r"[>#]" + self, + check_string: str = "(config) #", + pattern: str = r"[>#]", + force_regex: bool = False, ) -> bool: """ Checks if the device is in configuration mode or not. @@ -87,16 +94,16 @@

Classes

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

Aruba OS support

+

Aruba OS support

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -135,7 +142,7 @@ 

Classes

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -180,12 +187,12 @@

Classes

: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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -193,9 +200,11 @@

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). -
+
-Source code + +Expand source code +
class ArubaSSH(CiscoSSHConnection):
     """Aruba OS support"""
 
@@ -217,7 +226,10 @@ 

Classes

self.disable_paging(command="no paging") def check_config_mode( - self, check_string: str = "(config) #", pattern: str = r"[>#]" + self, + check_string: str = "(config) #", + pattern: str = r"[>#]", + force_regex: bool = False, ) -> bool: """ Checks if the device is in configuration mode or not. @@ -246,15 +258,20 @@

Ancestors

Methods

-def check_config_mode(self, check_string='(config) #', pattern='[>#]') +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

+

Checks if the device is in configuration mode or not.

+

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

-Source code + +Expand source code +
def check_config_mode(
-    self, check_string: str = "(config) #", pattern: str = r"[>#]"
+    self,
+    check_string: str = "(config) #",
+    pattern: str = r"[>#]",
+    force_regex: bool = False,
 ) -> bool:
     """
     Checks if the device is in configuration mode or not.
@@ -265,12 +282,14 @@ 

Methods

-def config_mode(self, config_command='configure term', pattern='', re_flags=0) +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.

+

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

-Source code + +Expand source code +
def config_mode(
     self,
     config_command: str = "configure term",
@@ -284,12 +303,14 @@ 

Methods

-def session_preparation(self) +def session_preparation(self) ‑> None
-

Aruba OS requires enable mode to disable paging.

+

Aruba OS requires enable mode to disable paging.

-Source code + +Expand source code +
def session_preparation(self) -> None:
     """Aruba OS requires enable mode to disable paging."""
     # Aruba switches output ansi codes
@@ -377,9 +398,7 @@ 

-

Generated by pdoc 0.6.3.

+

Generated by pdoc 0.10.0.

- - \ No newline at end of file diff --git a/docs/netmiko/aruba/index.html b/docs/netmiko/aruba/index.html index 6e4b9a538..322d7becb 100644 --- a/docs/netmiko/aruba/index.html +++ b/docs/netmiko/aruba/index.html @@ -3,15 +3,17 @@ - + netmiko.aruba API documentation - - - - - + + + + + + +
@@ -21,7 +23,9 @@

Module netmiko.aruba

-Source code + +Expand source code +
from netmiko.aruba.aruba_ssh import ArubaSSH
 
 __all__ = ["ArubaSSH"]
@@ -32,7 +36,7 @@

Sub-modules

netmiko.aruba.aruba_ssh
-

Aruba OS support …

+

Aruba OS support …

@@ -45,16 +49,16 @@

Classes

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

Aruba OS support

+

Aruba OS support

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -93,7 +97,7 @@ 

Classes

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -138,12 +142,12 @@

Classes

: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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -151,9 +155,11 @@

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). -
+

-Source code + +Expand source code +
class ArubaSSH(CiscoSSHConnection):
     """Aruba OS support"""
 
@@ -175,7 +181,10 @@ 

Classes

self.disable_paging(command="no paging") def check_config_mode( - self, check_string: str = "(config) #", pattern: str = r"[>#]" + self, + check_string: str = "(config) #", + pattern: str = r"[>#]", + force_regex: bool = False, ) -> bool: """ Checks if the device is in configuration mode or not. @@ -204,15 +213,20 @@

Ancestors

Methods

-def check_config_mode(self, check_string='(config) #', pattern='[>#]') +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

+

Checks if the device is in configuration mode or not.

+

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

-Source code + +Expand source code +
def check_config_mode(
-    self, check_string: str = "(config) #", pattern: str = r"[>#]"
+    self,
+    check_string: str = "(config) #",
+    pattern: str = r"[>#]",
+    force_regex: bool = False,
 ) -> bool:
     """
     Checks if the device is in configuration mode or not.
@@ -223,12 +237,14 @@ 

Methods

-def config_mode(self, config_command='configure term', pattern='', re_flags=0) +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.

+

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

-Source code + +Expand source code +
def config_mode(
     self,
     config_command: str = "configure term",
@@ -242,12 +258,14 @@ 

Methods

-def session_preparation(self) +def session_preparation(self) ‑> None
-

Aruba OS requires enable mode to disable paging.

+

Aruba OS requires enable mode to disable paging.

-Source code + +Expand source code +
def session_preparation(self) -> None:
     """Aruba OS requires enable mode to disable paging."""
     # Aruba switches output ansi codes
@@ -340,9 +358,7 @@ 

Aruba

- - \ No newline at end of file diff --git a/docs/netmiko/base_connection.html b/docs/netmiko/base_connection.html index cafaa1d19..1a2544a1f 100644 --- a/docs/netmiko/base_connection.html +++ b/docs/netmiko/base_connection.html @@ -3,15 +3,17 @@ - + netmiko.base_connection API documentation - - - - - + + + + + + +
@@ -25,7 +27,9 @@

Module netmiko.base_connection

platforms (Cisco and non-Cisco).

Also defines methods that should generally be supported by child classes

-Source code + +Expand source code +
"""
 Base connection class for netmiko
 
@@ -1333,10 +1337,7 @@ 

Module netmiko.base_connection

self.write_channel(self.RETURN) if pattern: - try: - prompt = self.read_until_pattern(pattern=pattern) - except ReadTimeout: - pass + prompt = self.read_until_pattern(pattern=pattern) else: # Initial read time.sleep(sleep_time) @@ -1959,7 +1960,9 @@

Module netmiko.base_connection

raise ValueError("Failed to exit enable mode.") return output - def check_config_mode(self, check_string: str = "", pattern: str = "") -> bool: + 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. :param check_string: Identification of configuration mode from the device @@ -1974,7 +1977,11 @@

Module netmiko.base_connection

output = self.read_channel_timing(read_timeout=10.0) else: output = self.read_until_pattern(pattern=pattern) - return check_string in output + + if force_regex: + return bool(re.search(check_string, output)) + else: + return check_string in output def config_mode( self, config_command: str = "", pattern: str = "", re_flags: int = 0 @@ -2409,12 +2416,14 @@

Module netmiko.base_connection

Functions

-def lock_channel(func) +def lock_channel(func: ~F) ‑> ~F
-
+
-Source code + +Expand source code +
def lock_channel(func: F) -> F:
     @functools.wraps(func)
     def wrapper_decorator(self: "BaseConnection", *args: Any, **kwargs: Any) -> Any:
@@ -2430,12 +2439,14 @@ 

Functions

-def log_writes(func) +def log_writes(func: ~F) ‑> ~F
-

Handle both session_log and log of writes.

+

Handle both session_log and log of writes.

-Source code + +Expand source code +
def log_writes(func: F) -> F:
     """Handle both session_log and log of writes."""
 
@@ -2466,17 +2477,17 @@ 

Classes

class BaseConnection -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
-

Defines vendor independent methods.

+

Defines vendor independent methods.

Otherwise method left as a stub method.

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -2515,7 +2526,7 @@ 

Classes

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -2560,12 +2571,12 @@

Classes

: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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -2573,9 +2584,11 @@

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). -
+
-Source code + +Expand source code +
class BaseConnection:
     """
     Defines vendor independent methods.
@@ -3758,10 +3771,7 @@ 

Classes

self.write_channel(self.RETURN) if pattern: - try: - prompt = self.read_until_pattern(pattern=pattern) - except ReadTimeout: - pass + prompt = self.read_until_pattern(pattern=pattern) else: # Initial read time.sleep(sleep_time) @@ -4384,7 +4394,9 @@

Classes

raise ValueError("Failed to exit enable mode.") return output - def check_config_mode(self, check_string: str = "", pattern: str = "") -> bool: + 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. :param check_string: Identification of configuration mode from the device @@ -4399,7 +4411,11 @@

Classes

output = self.read_channel_timing(read_timeout=10.0) else: output = self.read_until_pattern(pattern=pattern) - return check_string in output + + if force_regex: + return bool(re.search(check_string, output)) + else: + return check_string in output def config_mode( self, config_command: str = "", pattern: str = "", re_flags: int = 0 @@ -4824,10 +4840,10 @@

Classes

Subclasses

  • TelnetConnection
  • -
  • CiscoBaseConnection
  • CheckPointGaiaSSH
  • CienaSaosBase
  • CiscoWlcSSH
  • +
  • CiscoBaseConnection
  • NetscalerSSH
  • DellIsilonSSH
  • EricssonIposSSH
  • @@ -4836,6 +4852,7 @@

    Subclasses

  • JuniperBase
  • JuniperScreenOsSSH
  • NetAppcDotSSH
  • +
  • NokiaSrlSSH
  • NokiaSros
  • PaloAltoPanosBase
  • PluribusSSH
  • @@ -4847,14 +4864,16 @@

    Subclasses

    Static methods

    -def strip_backspaces(output) +def strip_backspaces(output: str) ‑> str
    -

    Strip any backspace characters out of the output.

    +

    Strip any backspace characters out of the output.

    :param output: Output obtained from a remote network device. -:type output: str

    +:type output: str

    -Source code + +Expand source code +
    @staticmethod
     def strip_backspaces(output: str) -> str:
         """Strip any backspace characters out of the output.
    @@ -4870,17 +4889,21 @@ 

    Static methods

    Methods

    -def check_config_mode(self, check_string='', pattern='') +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.

    +

    Checks if the device is in configuration mode or not.

    :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

    -Source code -
    def check_config_mode(self, check_string: str = "", pattern: str = "") -> bool:
    +
    +Expand source code
    +
    +
    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.
     
         :param check_string: Identification of configuration mode from the device
    @@ -4895,18 +4918,24 @@ 

    Methods

    output = self.read_channel_timing(read_timeout=10.0) else: output = self.read_until_pattern(pattern=pattern) - return check_string in output
    + + if force_regex: + return bool(re.search(check_string, output)) + else: + return check_string in output
    -def check_enable_mode(self, check_string='') +def check_enable_mode(self, check_string: str = '') ‑> bool
    -

    Check if in enable mode. Return boolean.

    +

    Check if in enable mode. Return boolean.

    :param check_string: Identification of privilege mode from device -:type check_string: str

    +:type check_string: str

    -Source code + +Expand source code +
    def check_enable_mode(self, check_string: str = "") -> bool:
         """Check if in enable mode. Return boolean.
     
    @@ -4919,24 +4948,28 @@ 

    Methods

    -def cleanup(self, command='') +def cleanup(self, command: str = '') ‑> None
    -

    Logout of the session on the network device plus any additional cleanup.

    +

    Logout of the session on the network device plus any additional cleanup.

    -Source code + +Expand source code +
    def cleanup(self, command: str = "") -> None:
         """Logout of the session on the network device plus any additional cleanup."""
         pass
    -def clear_buffer(self, backoff=True, backoff_max=3.0, delay_factor=None) +def clear_buffer(self, backoff: bool = True, backoff_max: float = 3.0, delay_factor: Optional[float] = None) ‑> str
    -

    Read any data available in the channel.

    +

    Read any data available in the channel.

    -Source code + +Expand source code +
    def clear_buffer(
         self,
         backoff: bool = True,
    @@ -4966,12 +4999,14 @@ 

    Methods

    -def command_echo_read(self, cmd, read_timeout) +def command_echo_read(self, cmd: str, read_timeout: float) ‑> str
    -
    +
    -Source code + +Expand source code +
    def command_echo_read(self, cmd: str, read_timeout: float) -> str:
     
         # Make sure you read until you detect the command echo (avoid getting out of sync)
    @@ -4992,30 +5027,34 @@ 

    Methods

    -def commit(self) +def commit(self) ‑> str
    -

    Commit method for platforms that support this.

    +

    Commit method for platforms that support this.

    -Source code + +Expand source code +
    def commit(self) -> str:
         """Commit method for platforms that support this."""
         raise AttributeError("Network device does not support 'commit()' method")
    -def config_mode(self, config_command='', pattern='', re_flags=0) +def config_mode(self, config_command: str = '', pattern: str = '', re_flags: int = 0) ‑> str
    -

    Enter into config_mode.

    +

    Enter into config_mode.

    :param config_command: Configuration command to send to the device :type config_command: str

    :param pattern: Pattern to terminate reading of channel :type pattern: str

    :param re_flags: Regular expression flags -:type re_flags: RegexFlag

    +:type re_flags: RegexFlag

    -Source code + +Expand source code +
    def config_mode(
         self, config_command: str = "", pattern: str = "", re_flags: int = 0
     ) -> str:
    @@ -5048,14 +5087,16 @@ 

    Methods

    -def disable_paging(self, command='terminal length 0', delay_factor=None, cmd_verify=True, pattern=None) +def disable_paging(self, command: str = 'terminal length 0', delay_factor: Optional[float] = None, cmd_verify: bool = True, pattern: Optional[str] = None) ‑> str
    -

    Disable paging default to a Cisco CLI method.

    +

    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.

    -Source code + +Expand source code +
    def disable_paging(
         self,
         command: str = "terminal length 0",
    @@ -5091,12 +5132,14 @@ 

    Methods

    -def disconnect(self) +def disconnect(self) ‑> None
    -

    Try to gracefully close the session.

    +

    Try to gracefully close the session.

    -Source code + +Expand source code +
    def disconnect(self) -> None:
         """Try to gracefully close the session."""
         try:
    @@ -5120,16 +5163,18 @@ 

    Methods

    -def enable(self, cmd='', pattern='ssword', enable_pattern=None, re_flags=re.IGNORECASE) +def enable(self, cmd: str = '', pattern: str = 'ssword', enable_pattern: Optional[str] = None, re_flags: int = re.IGNORECASE) ‑> str
    -

    Enter enable mode.

    +

    Enter enable mode.

    :param cmd: Device command to enter enable mode

    :param pattern: pattern to search for indicating device is waiting for password

    :param enable_pattern: pattern indicating you have entered enable mode

    -

    :param re_flags: Regular expression flags used in conjunction with pattern

    +

    :param re_flags: Regular expression flags used in conjunction with pattern

    -Source code + +Expand source code +
    def enable(
         self,
         cmd: str = "",
    @@ -5186,18 +5231,20 @@ 

    Methods

    -def establish_connection(self, width=511, height=1000) +def establish_connection(self, width: int = 511, height: int = 1000) ‑> None
    -

    Establish SSH connection to the network device

    +

    Establish SSH connection to the network device

    Timeout will generate a NetmikoTimeoutException Authentication failure will generate a NetmikoAuthenticationException

    :param width: Specified width of the VT100 terminal window (default: 511) :type width: int

    :param height: Specified height of the VT100 terminal window (default: 1000) -:type height: int

    +:type height: int

    -Source code + +Expand source code +
        def establish_connection(self, width: int = 511, height: int = 1000) -> None:
             """Establish SSH connection to the network device
     
    @@ -5308,16 +5355,18 @@ 

    Methods

    -def exit_config_mode(self, exit_config='', pattern='') +def exit_config_mode(self, exit_config: str = '', pattern: str = '') ‑> str
    -

    Exit from configuration mode.

    +

    Exit from configuration mode.

    :param exit_config: Command to exit configuration mode :type exit_config: str

    :param pattern: Pattern to terminate reading of channel -:type pattern: str

    +:type pattern: str

    -Source code + +Expand source code +
    def exit_config_mode(self, exit_config: str = "", pattern: str = "") -> str:
         """Exit from configuration mode.
     
    @@ -5346,14 +5395,16 @@ 

    Methods

    -def exit_enable_mode(self, exit_command='') +def exit_enable_mode(self, exit_command: str = '') ‑> str
    -

    Exit enable mode.

    +

    Exit enable mode.

    :param exit_command: Command that exits the session from privileged mode -:type exit_command: str

    +:type exit_command: str

    -Source code + +Expand source code +
    def exit_enable_mode(self, exit_command: str = "") -> str:
         """Exit enable mode.
     
    @@ -5370,15 +5421,17 @@ 

    Methods

    -def find_prompt(self, delay_factor=1.0, pattern=None) +def find_prompt(self, delay_factor: float = 1.0, pattern: Optional[str] = None) ‑> str
    -

    Finds the current network device prompt, last line only.

    +

    Finds the current network device prompt, last line only.

    :param delay_factor: See init: global_delay_factor :type delay_factor: int

    -

    :param pattern: Regular expression pattern to determine whether prompt is valid

    +

    :param pattern: Regular expression pattern to determine whether prompt is valid

    -Source code + +Expand source code +
    def find_prompt(
         self, delay_factor: float = 1.0, pattern: Optional[str] = None
     ) -> str:
    @@ -5395,10 +5448,7 @@ 

    Methods

    self.write_channel(self.RETURN) if pattern: - try: - prompt = self.read_until_pattern(pattern=pattern) - except ReadTimeout: - pass + prompt = self.read_until_pattern(pattern=pattern) else: # Initial read time.sleep(sleep_time) @@ -5428,12 +5478,14 @@

    Methods

    -def is_alive(self) +def is_alive(self) ‑> bool
    -

    Returns a boolean flag with the state of the connection.

    +

    Returns a boolean flag with the state of the connection.

    -Source code + +Expand source code +
    def is_alive(self) -> bool:
         """Returns a boolean flag with the state of the connection."""
         null = chr(0)
    @@ -5473,14 +5525,16 @@ 

    Methods

    -def normalize_cmd(self, command) +def normalize_cmd(self, command: str) ‑> str
    -

    Normalize CLI commands to have a single trailing newline.

    +

    Normalize CLI commands to have a single trailing newline.

    :param command: Command that may require line feed to be normalized -:type command: str

    +:type command: str

    -Source code + +Expand source code +
    def normalize_cmd(self, command: str) -> str:
         """Normalize CLI commands to have a single trailing newline.
     
    @@ -5493,20 +5547,22 @@ 

    Methods

    -def normalize_linefeeds(self, a_string) +def normalize_linefeeds(self, a_string: str) ‑> str
    -

    Convert `

    +

    Convert `

    , -,

    -

    to +,

    +

    to .`

        :param a_string: A string that may have non-normalized line feeds
             i.e. output returned from device, or a device prompt
         :type a_string: str
    -
    +
    -Source code + +Expand source code +
    def normalize_linefeeds(self, a_string: str) -> str:
         """Convert `\r\r\n`,`\r\n`, `\n\r` to `\n.`
     
    @@ -5524,12 +5580,14 @@ 

    Methods

    -def paramiko_cleanup(self) +def paramiko_cleanup(self) ‑> None
    -

    Cleanup Paramiko to try to gracefully handle SSH session ending.

    +

    Cleanup Paramiko to try to gracefully handle SSH session ending.

    -Source code + +Expand source code +
    def paramiko_cleanup(self) -> None:
         """Cleanup Paramiko to try to gracefully handle SSH session ending."""
         if self.remote_conn_pre is not None:
    @@ -5538,12 +5596,14 @@ 

    Methods

    -def read_channel(self) +def read_channel(self) ‑> str
    -

    Generic handler that will read all the data from given channel.

    +

    Generic handler that will read all the data from given channel.

    -Source code + +Expand source code +
    @lock_channel
     def read_channel(self) -> str:
         """Generic handler that will read all the data from given channel."""
    @@ -5566,10 +5626,10 @@ 

    Methods

    -def read_channel_timing(self, last_read=2.0, read_timeout=120.0, delay_factor=None, max_loops=None) +def read_channel_timing(self, last_read: float = 2.0, read_timeout: float = 120.0, delay_factor: Optional[float] = None, max_loops: Optional[int] = None) ‑> str
    -

    Read data on the channel based on timing delays.

    +

    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.

    @@ -5579,9 +5639,11 @@

    Methods

    on an absolute timeout. It will only complete based on timeout based on their being no new data.

    :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 max_loops: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    -Source code + +Expand source code +
        def read_channel_timing(
             self,
             last_read: float = 2.0,
    @@ -5654,10 +5716,10 @@ 

    Methods

    -def read_until_pattern(self, pattern='', read_timeout=10.0, re_flags=0, max_loops=None) +def read_until_pattern(self, pattern: str = '', read_timeout: float = 10.0, re_flags: int = 0, max_loops: Optional[int] = None) ‑> str
    -

    Read channel until pattern is detected.

    +

    Read channel until pattern is detected.

    Will return string up to and including pattern.

    Returns ReadTimeout if pattern not detected in read_timeout seconds.

    :param pattern: Regular expression pattern used to identify that reading is done.

    @@ -5665,9 +5727,11 @@

    Methods

    A read_timeout value of 0 will cause the loop to never timeout (i.e. it will keep reading indefinitely until pattern is detected.

    :param re_flags: regex flags used in conjunction with pattern (defaults to no flags).

    -

    :param max_loops: 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.

    -Source code + +Expand source code +
        def read_until_pattern(
             self,
             pattern: str = "",
    @@ -5748,12 +5812,14 @@ 

    Methods

    -def read_until_prompt(self, read_timeout=10.0, read_entire_line=False, re_flags=0, max_loops=None) +def read_until_prompt(self, read_timeout: float = 10.0, read_entire_line: bool = False, re_flags: int = 0, max_loops: Optional[int] = None) ‑> str
    -

    Read channel up to and including self.base_prompt.

    +

    Read channel up to and including self.base_prompt.

    -Source code + +Expand source code +
    def read_until_prompt(
         self,
         read_timeout: float = 10.0,
    @@ -5774,12 +5840,14 @@ 

    Methods

    -def read_until_prompt_or_pattern(self, pattern='', read_timeout=10.0, read_entire_line=False, re_flags=0, max_loops=None) +def read_until_prompt_or_pattern(self, pattern: str = '', read_timeout: float = 10.0, read_entire_line: bool = False, re_flags: int = 0, max_loops: Optional[int] = None) ‑> str
    -

    Read until either self.base_prompt or pattern is detected.

    +

    Read until either self.base_prompt or pattern is detected.

    -Source code + +Expand source code +
    def read_until_prompt_or_pattern(
         self,
         pattern: str = "",
    @@ -5805,10 +5873,10 @@ 

    Methods

    -def run_ttp(self, template, res_kwargs=None, **kwargs) +def run_ttp(self, template: Union[str, bytes, ForwardRef('PathLike[Any]')], res_kwargs: Optional[Dict[str, Any]] = None, **kwargs: Any) ‑> Any
    -

    Run TTP template parsing by using input parameters to collect +

    Run TTP template parsing by using input parameters to collect devices output.

    :param template: template content, OS path to template or reference to template within TTP templates collection in @@ -5821,9 +5889,11 @@

    Methods

    :param commands: list of commands to collect

    Inputs' load could be of one of the supported formats and controlled by input's load attribute, supported values - python, yaml or json. For each input output collected -from device and parsed accordingly.

    +from device and parsed accordingly.

    -Source code + +Expand source code +
    def run_ttp(
         self,
         template: Union[str, bytes, "PathLike[Any]"],
    @@ -5862,12 +5932,14 @@ 

    Methods

    -def save_config(self, cmd='', confirm=False, confirm_response='') +def save_config(self, cmd: str = '', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Not Implemented

    +

    Not Implemented

    -Source code + +Expand source code +
    def save_config(
         self, cmd: str = "", confirm: bool = False, confirm_response: str = ""
     ) -> str:
    @@ -5876,15 +5948,17 @@ 

    Methods

    -def select_delay_factor(self, delay_factor) +def select_delay_factor(self, delay_factor: float) ‑> float
    -

    Choose the greater of delay_factor or self.global_delay_factor (default). +

    Choose the greater of delay_factor or self.global_delay_factor (default). In fast_cli choose the lesser of delay_factor of self.global_delay_factor.

    :param delay_factor: See init: global_delay_factor -:type delay_factor: int

    +:type delay_factor: int

    -Source code + +Expand source code +
    def select_delay_factor(self, delay_factor: float) -> float:
         """
         Choose the greater of delay_factor or self.global_delay_factor (default).
    @@ -5906,10 +5980,10 @@ 

    Methods

    -def send_command(self, command_string, expect_string=None, read_timeout=10.0, delay_factor=None, max_loops=None, auto_find_prompt=True, strip_prompt=True, strip_command=True, normalize=True, use_textfsm=False, textfsm_template=None, use_ttp=False, ttp_template=None, use_genie=False, cmd_verify=True) +def send_command(self, command_string: str, expect_string: Optional[str] = None, read_timeout: float = 10.0, delay_factor: Optional[float] = None, max_loops: Optional[int] = None, auto_find_prompt: bool = True, strip_prompt: bool = True, strip_command: bool = True, normalize: bool = True, use_textfsm: bool = False, textfsm_template: Optional[str] = None, use_ttp: bool = False, ttp_template: Optional[str] = None, use_genie: bool = False, cmd_verify: bool = True) ‑> Union[str, List[Any], Dict[str, Any]]
    -

    Execute command_string on the SSH channel using a pattern-based mechanism. Generally +

    Execute command_string on the SSH channel using a pattern-based mechanism. Generally used for show commands. By default this method will keep waiting to receive data until the network device prompt is detected. The current network device prompt will be determined automatically.

    @@ -5928,9 +6002,11 @@

    Methods

    :param ttp_template: Name of template to parse output with; can be fully qualified path, relative path, or name of file in current directory. (default: None).

    :param use_genie: Process command output through PyATS/Genie parser (default: False).

    -

    :param cmd_verify: Verify command echo before proceeding (default: True).

    +

    :param cmd_verify: Verify command echo before proceeding (default: True).

    -Source code + +Expand source code +
        @select_cmd_verify
         def send_command(
             self,
    @@ -6123,12 +6199,14 @@ 

    Methods

    -def send_command_expect(self, *args, **kwargs) +def send_command_expect(self, *args: Any, **kwargs: Any) ‑> Union[str, List[Any], Dict[str, Any]]
    -

    Support previous name of send_command method.

    +

    Support previous name of send_command method.

    -Source code + +Expand source code +
    def send_command_expect(
         self, *args: Any, **kwargs: Any
     ) -> Union[str, List[Any], Dict[str, Any]]:
    @@ -6137,10 +6215,10 @@ 

    Methods

    -def send_command_timing(self, command_string, last_read=2.0, read_timeout=120.0, delay_factor=None, max_loops=None, strip_prompt=True, strip_command=True, normalize=True, use_textfsm=False, textfsm_template=None, use_ttp=False, ttp_template=None, use_genie=False, cmd_verify=False) +def send_command_timing(self, command_string: str, last_read: float = 2.0, read_timeout: float = 120.0, delay_factor: Optional[float] = None, max_loops: Optional[int] = None, strip_prompt: bool = True, strip_command: bool = True, normalize: bool = True, use_textfsm: bool = False, textfsm_template: Optional[str] = None, use_ttp: bool = False, ttp_template: Optional[str] = None, use_genie: bool = False, cmd_verify: bool = False) ‑> Union[str, List[Any], Dict[str, Any]]
    -

    Execute command_string on the SSH channel using a delay-based mechanism. Generally +

    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 delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    @@ -6155,9 +6233,11 @@

    Methods

    :param ttp_template: Name of template to parse output with; can be fully qualified path, relative path, or name of file in current directory. (default: None).

    :param use_genie: Process command output through PyATS/Genie parser (default: False).

    -

    :param cmd_verify: Verify command echo before proceeding (default: False).

    +

    :param cmd_verify: Verify command echo before proceeding (default: False).

    -Source code + +Expand source code +
    @select_cmd_verify
     def send_command_timing(
         self,
    @@ -6242,17 +6322,19 @@ 

    Methods

    -def send_config_from_file(self, config_file, **kwargs) +def send_config_from_file(self, config_file: Union[str, bytes, ForwardRef('PathLike[Any]')], **kwargs: Any) ‑> str
    -

    Send configuration commands down the SSH channel from a file.

    +

    Send configuration commands down the SSH channel from a file.

    The file is processed line-by-line and each command is sent down the SSH channel.

    **kwargs are passed to send_config_set method.

    :param config_file: Path to configuration file to be sent to the device

    -

    :param kwargs: params to be sent to send_config_set method

    +

    :param kwargs: params to be sent to send_config_set method

    -Source code + +Expand source code +
    def send_config_from_file(
         self, config_file: Union[str, bytes, "PathLike[Any]"], **kwargs: Any
     ) -> str:
    @@ -6274,10 +6356,10 @@ 

    Methods

    -def send_config_set(self, config_commands=None, *, exit_config_mode=True, read_timeout=None, delay_factor=None, max_loops=None, strip_prompt=False, strip_command=False, config_mode_command=None, cmd_verify=True, enter_config_mode=True, error_pattern='', terminator='#', bypass_commands=None) +def send_config_set(self, config_commands: Union[str, Sequence[str], TextIO, ForwardRef(None)] = None, *, exit_config_mode: bool = True, read_timeout: Optional[float] = None, delay_factor: Optional[float] = None, max_loops: Optional[int] = None, strip_prompt: bool = False, strip_command: bool = False, config_mode_command: Optional[str] = None, cmd_verify: bool = True, enter_config_mode: bool = True, error_pattern: str = '', terminator: str = '#', bypass_commands: Optional[str] = None) ‑> str
    -

    Send configuration commands down the SSH channel.

    +

    Send configuration commands down the SSH channel.

    config_commands is an iterable containing all of the configuration commands. The commands will be executed one after the other.

    Automatically exits/enters configuration mode.

    @@ -6296,9 +6378,11 @@

    Methods

    :param terminator: Regular expression pattern to use as an alternate terminator in certain situations.

    :param bypass_commands: Regular expression pattern indicating configuration commands -where cmd_verify is automatically disabled.

    +where cmd_verify is automatically disabled.

    -Source code + +Expand source code +
    def send_config_set(
         self,
         config_commands: Union[str, Sequence[str], TextIO, None] = None,
    @@ -6459,18 +6543,20 @@ 

    Methods

    -def send_multiline(self, commands, multiline=True, **kwargs) +def send_multiline(self, commands: Sequence[Union[str, List[str]]], multiline: bool = True, **kwargs: Any) ‑> str
    -

    commands should either be:

    +

    commands should either be:

    commands = [[cmd1, expect1], [cmd2, expect2], …]]

    Or

    commands = [cmd1, cmd2, cmd3, …]

    Any expect_string that is a null-string will use pattern based on device's prompt (unless expect_string argument is passed in via -kwargs.

    +kwargs.

    -Source code + +Expand source code +
    def send_multiline(
         self,
         commands: Sequence[Union[str, List[str]]],
    @@ -6521,12 +6607,14 @@ 

    Methods

    -def send_multiline_timing(self, commands, multiline=True, **kwargs) +def send_multiline_timing(self, commands: Sequence[str], multiline: bool = True, **kwargs: Any) ‑> str
    -
    +
    -Source code + +Expand source code +
    def send_multiline_timing(
         self, commands: Sequence[str], multiline: bool = True, **kwargs: Any
     ) -> str:
    @@ -6540,12 +6628,14 @@ 

    Methods

    -def serial_login(self, pri_prompt_terminator='#\\s*$', alt_prompt_terminator='>\\s*$', username_pattern='(?:[Uu]ser:|sername|ogin)', pwd_pattern='assword', delay_factor=1.0, max_loops=20) +def serial_login(self, pri_prompt_terminator: str = '#\\s*$', alt_prompt_terminator: str = '>\\s*$', username_pattern: str = '(?:[Uu]ser:|sername|ogin)', pwd_pattern: str = 'assword', delay_factor: float = 1.0, max_loops: int = 20) ‑> str
    -
    +
    -Source code + +Expand source code +
    def serial_login(
         self,
         pri_prompt_terminator: str = r"#\s*$",
    @@ -6566,19 +6656,21 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established

    +

    Prepare the session after the connection has been established

    This method handles some differences that occur between various devices early on in the session.

    In general, it should include: self._test_channel_read(pattern=r"some_pattern") self.set_base_prompt() self.set_terminal_width() -self.disable_paging()

    +self.disable_paging()

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """
         Prepare the session after the connection has been established
    @@ -6599,10 +6691,10 @@ 

    Methods

    -def set_base_prompt(self, pri_prompt_terminator='#', alt_prompt_terminator='>', delay_factor=1.0, pattern=None) +def set_base_prompt(self, pri_prompt_terminator: str = '#', alt_prompt_terminator: str = '>', delay_factor: float = 1.0, pattern: Optional[str] = None) ‑> str
    -

    Sets self.base_prompt

    +

    Sets self.base_prompt

    Used as delimiter for stripping of trailing prompt in output.

    Should be set to something that is general and applies in multiple contexts. For Cisco devices this will be set to router hostname (i.e. prompt without > or #).

    @@ -6611,9 +6703,11 @@

    Methods

    :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 delay_factor: See init: global_delay_factor

    -

    :param pattern: Regular expression pattern to search for in find_prompt() call

    +

    :param pattern: Regular expression pattern to search for in find_prompt() call

    -Source code + +Expand source code +
    @retry(
         wait=wait_exponential(multiplier=0.33, min=0, max=5),
         stop=stop_after_attempt(5),
    @@ -6667,16 +6761,18 @@ 

    Methods

    -def set_terminal_width(self, command='', delay_factor=None, cmd_verify=False, pattern=None) +def set_terminal_width(self, command: str = '', delay_factor: Optional[float] = None, cmd_verify: bool = False, pattern: Optional[str] = None) ‑> str
    -

    CLI terminals try to automatically adjust the line based on the width of the terminal. +

    CLI terminals try to automatically adjust the line based on the width of the terminal. This causes the output to get distorted when accessed programmatically.

    Set terminal width to 511 which works on a broad set of devices.

    :param command: Command string to send to the device

    -

    :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.

    -Source code + +Expand source code +
    def set_terminal_width(
         self,
         command: str = "",
    @@ -6712,22 +6808,24 @@ 

    Methods

    -def special_login_handler(self, delay_factor=1.0) +def special_login_handler(self, delay_factor: float = 1.0) ‑> None
    -

    Handler for devices like WLC, Extreme ERS that throw up characters prior to login.

    +

    Handler for devices like WLC, Extreme ERS that throw up characters prior to login.

    -Source code + +Expand source code +
    def special_login_handler(self, delay_factor: float = 1.0) -> None:
         """Handler for devices like WLC, Extreme ERS that throw up characters prior to login."""
         pass
    -def strip_ansi_escape_codes(self, string_buffer) +def strip_ansi_escape_codes(self, string_buffer: str) ‑> str
    -

    Remove any ANSI (VT100) ESC codes from the output

    +

    Remove any ANSI (VT100) ESC codes from the output

    http://en.wikipedia.org/wiki/ANSI_escape_code

    Note: this does not capture ALL possible ANSI Escape Codes only the ones I have encountered

    @@ -6763,9 +6861,11 @@

    Methods

    very bottom of the screen).

    HP ProCurve and Cisco SG300 require this (possible others).

    :param string_buffer: The string to be processed to remove ANSI escape codes -:type string_buffer: str

    +:type string_buffer: str

    -Source code + +Expand source code +
    def strip_ansi_escape_codes(self, string_buffer: str) -> str:
         """
         Remove any ANSI (VT100) ESC codes from the output
    @@ -6878,17 +6978,19 @@ 

    Methods

    -def strip_command(self, command_string, output) +def strip_command(self, command_string: str, output: str) ‑> str
    -

    Strip command_string from output string

    +

    Strip command_string from output string

    Cisco IOS adds backspaces into output for long commands (i.e. for commands that line wrap)

    :param command_string: The command string sent to the device :type command_string: str

    :param output: The returned output as a result of the command string sent to the device -:type output: str

    +:type output: str

    -Source code + +Expand source code +
    def strip_command(self, command_string: str, output: str) -> str:
         """
         Strip command_string from output string
    @@ -6920,14 +7022,16 @@ 

    Methods

    -def strip_prompt(self, a_string) +def strip_prompt(self, a_string: str) ‑> str
    -

    Strip the trailing router prompt from the output.

    +

    Strip the trailing router prompt from the output.

    :param a_string: Returned string from device -:type a_string: str

    +:type a_string: str

    -Source code + +Expand source code +
    def strip_prompt(self, a_string: str) -> str:
         """Strip the trailing router prompt from the output.
     
    @@ -6944,17 +7048,19 @@ 

    Methods

    -def telnet_login(self, pri_prompt_terminator='#\\s*$', alt_prompt_terminator='>\\s*$', username_pattern='(?:user:|username|login|user name)', pwd_pattern='assword', delay_factor=1.0, max_loops=20) +def telnet_login(self, pri_prompt_terminator: str = '#\\s*$', alt_prompt_terminator: str = '>\\s*$', username_pattern: str = '(?:user:|username|login|user name)', pwd_pattern: str = 'assword', delay_factor: float = 1.0, max_loops: int = 20) ‑> str
    -

    Telnet login. Can be username/password or just password.

    +

    Telnet login. Can be username/password or just password.

    :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 delay_factor: See init: global_delay_factor

    -

    :param max_loops: Controls the wait time in conjunction with the delay_factor

    +

    :param max_loops: Controls the wait time in conjunction with the delay_factor

    -Source code + +Expand source code +
    def telnet_login(
         self,
         pri_prompt_terminator: str = r"#\s*$",
    @@ -7046,14 +7152,16 @@ 

    Methods

    -def write_channel(self, out_data) +def write_channel(self, out_data: str) ‑> None
    -

    Generic method that will write data out the channel.

    +

    Generic method that will write data out the channel.

    :param out_data: data to be written to the channel -:type out_data: str

    +:type out_data: str

    -Source code + +Expand source code +
    @lock_channel
     @log_writes
     def write_channel(self, out_data: str) -> None:
    @@ -7069,10 +7177,10 @@ 

    Methods

    class SecretsFilter -(no_log=None) +(no_log: Optional[Dict[Any, str]] = None)
    -

    Filter instances are used to perform arbitrary filtering of LogRecords.

    +

    Filter instances are used to perform arbitrary filtering of LogRecords.

    Loggers and Handlers can optionally use Filter instances to filter records as desired. The base filter class only allows events which are below a certain point in the logger hierarchy. For example, a filter @@ -7082,9 +7190,11 @@

    Methods

    Initialize a filter.

    Initialize with the name of the logger which, together with its children, will have its events allowed through the filter. If no -name is specified, allow every event.

    +name is specified, allow every event.

    -Source code + +Expand source code +
    class SecretsFilter(logging.Filter):
         def __init__(self, no_log: Optional[Dict[Any, str]] = None) -> None:
             self.no_log = no_log
    @@ -7103,12 +7213,14 @@ 

    Ancestors

    Methods

    -def filter(self, record) +def filter(self, record: logging.LogRecord) ‑> bool
    -

    Removes secrets (no_log) from messages

    +

    Removes secrets (no_log) from messages

    -Source code + +Expand source code +
    def filter(self, record: logging.LogRecord) -> bool:
         """Removes secrets (no_log) from messages"""
         if self.no_log:
    @@ -7121,17 +7233,17 @@ 

    Methods

    class TelnetConnection -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Defines vendor independent methods.

    +

    Defines vendor independent methods.

    Otherwise method left as a stub method.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -7170,7 +7282,7 @@ 

    Methods

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -7215,12 +7327,12 @@

    Methods

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -7228,9 +7340,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class TelnetConnection(BaseConnection):
         pass
    @@ -7373,9 +7487,7 @@

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/broadcom/broadcom_icos_ssh.html b/docs/netmiko/broadcom/broadcom_icos_ssh.html index 381e7153d..049871dcb 100644 --- a/docs/netmiko/broadcom/broadcom_icos_ssh.html +++ b/docs/netmiko/broadcom/broadcom_icos_ssh.html @@ -3,15 +3,17 @@ - + netmiko.broadcom.broadcom_icos_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.broadcom.broadcom_icos_ssh

    -Source code + +Expand source code +
    from netmiko.cisco_base_connection import CiscoSSHConnection
     
     
    @@ -39,7 +43,9 @@ 

    Module netmiko.broadcom.broadcom_icos_ssh

    self.set_terminal_width() self.disable_paging() - def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool: + 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.""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -82,17 +88,17 @@

    Classes

    class BroadcomIcosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Implements support for Broadcom Icos devices. +

    Implements support for Broadcom Icos devices. Syntax its almost identical to Cisco IOS in most cases

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -131,7 +137,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -176,12 +182,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -189,9 +195,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class BroadcomIcosSSH(CiscoSSHConnection):
         """
         Implements support for Broadcom Icos devices.
    @@ -206,7 +214,9 @@ 

    Classes

    self.set_terminal_width() self.disable_paging() - def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool: + 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.""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -246,24 +256,30 @@

    Ancestors

    Methods

    -def check_config_mode(self, check_string=')#', pattern='') +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.

    +

    Checks if the device is in configuration mode or not.

    -Source code -
    def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool:
    +
    +Expand source code
    +
    +
    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."""
         return super().check_config_mode(check_string=check_string, pattern=pattern)
    -def config_mode(self, config_command='configure', pattern='', re_flags=0) +def config_mode(self, config_command: str = 'configure', pattern: str = '', re_flags: int = 0) ‑> str
    -

    Enter configuration mode.

    +

    Enter configuration mode.

    -Source code + +Expand source code +
    def config_mode(
         self, config_command: str = "configure", pattern: str = "", re_flags: int = 0
     ) -> str:
    @@ -274,36 +290,42 @@ 

    Methods

    -def exit_config_mode(self, exit_config='exit', pattern='') +def exit_config_mode(self, exit_config: str = 'exit', pattern: str = '') ‑> str
    -

    Exit configuration mode.

    +

    Exit configuration mode.

    -Source code + +Expand source code +
    def exit_config_mode(self, exit_config: str = "exit", pattern: str = "") -> str:
         """Exit configuration mode."""
         return super().exit_config_mode(exit_config=exit_config)
    -def exit_enable_mode(self, exit_command='exit') +def exit_enable_mode(self, exit_command: str = 'exit') ‑> str
    -

    Exit enable mode.

    +

    Exit enable mode.

    -Source code + +Expand source code +
    def exit_enable_mode(self, exit_command: str = "exit") -> str:
         """Exit enable mode."""
         return super().exit_enable_mode(exit_command=exit_command)
    -def save_config(self, cmd='write memory', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'write memory', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Saves configuration.

    +

    Saves configuration.

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "write memory",
    @@ -393,9 +415,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/broadcom/index.html b/docs/netmiko/broadcom/index.html index f5a71b448..9678f9f85 100644 --- a/docs/netmiko/broadcom/index.html +++ b/docs/netmiko/broadcom/index.html @@ -3,15 +3,17 @@ - + netmiko.broadcom API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.broadcom

    -Source code + +Expand source code +
    from netmiko.broadcom.broadcom_icos_ssh import BroadcomIcosSSH
     
     
    @@ -33,7 +37,7 @@ 

    Sub-modules

    netmiko.broadcom.broadcom_icos_ssh
    -
    +
    @@ -46,17 +50,17 @@

    Classes

    class BroadcomIcosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Implements support for Broadcom Icos devices. +

    Implements support for Broadcom Icos devices. Syntax its almost identical to Cisco IOS in most cases

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -95,7 +99,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -140,12 +144,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -153,9 +157,11 @@

    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). -
    +

    -Source code + +Expand source code +
    class BroadcomIcosSSH(CiscoSSHConnection):
         """
         Implements support for Broadcom Icos devices.
    @@ -170,7 +176,9 @@ 

    Classes

    self.set_terminal_width() self.disable_paging() - def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool: + 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.""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -210,24 +218,30 @@

    Ancestors

    Methods

    -def check_config_mode(self, check_string=')#', pattern='') +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.

    +

    Checks if the device is in configuration mode or not.

    -Source code -
    def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool:
    +
    +Expand source code
    +
    +
    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."""
         return super().check_config_mode(check_string=check_string, pattern=pattern)
    -def config_mode(self, config_command='configure', pattern='', re_flags=0) +def config_mode(self, config_command: str = 'configure', pattern: str = '', re_flags: int = 0) ‑> str
    -

    Enter configuration mode.

    +

    Enter configuration mode.

    -Source code + +Expand source code +
    def config_mode(
         self, config_command: str = "configure", pattern: str = "", re_flags: int = 0
     ) -> str:
    @@ -238,36 +252,42 @@ 

    Methods

    -def exit_config_mode(self, exit_config='exit', pattern='') +def exit_config_mode(self, exit_config: str = 'exit', pattern: str = '') ‑> str
    -

    Exit configuration mode.

    +

    Exit configuration mode.

    -Source code + +Expand source code +
    def exit_config_mode(self, exit_config: str = "exit", pattern: str = "") -> str:
         """Exit configuration mode."""
         return super().exit_config_mode(exit_config=exit_config)
    -def exit_enable_mode(self, exit_command='exit') +def exit_enable_mode(self, exit_command: str = 'exit') ‑> str
    -

    Exit enable mode.

    +

    Exit enable mode.

    -Source code + +Expand source code +
    def exit_enable_mode(self, exit_command: str = "exit") -> str:
         """Exit enable mode."""
         return super().exit_enable_mode(exit_command=exit_command)
    -def save_config(self, cmd='write memory', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'write memory', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Saves configuration.

    +

    Saves configuration.

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "write memory",
    @@ -362,9 +382,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/brocade/brocade_fos_ssh.html b/docs/netmiko/brocade/brocade_fos_ssh.html index 74842c86d..baba6eb52 100644 --- a/docs/netmiko/brocade/brocade_fos_ssh.html +++ b/docs/netmiko/brocade/brocade_fos_ssh.html @@ -3,15 +3,17 @@ - + netmiko.brocade.brocade_fos_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.brocade.brocade_fos_ssh

    -Source code + +Expand source code +
    from typing import Any
     from netmiko.no_enable import NoEnable
     from netmiko.no_config import NoConfig
    @@ -52,12 +56,14 @@ 

    Classes

    class BrocadeFOSSSH -(**kwargs) +(**kwargs: Any)
    -

    Brocade Fabric OS support

    +

    Brocade Fabric OS support

    -Source code + +Expand source code +
    class BrocadeFOSSSH(NoEnable, NoConfig, CiscoSSHConnection):
         """Brocade Fabric OS support"""
     
    @@ -152,9 +158,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/brocade/index.html b/docs/netmiko/brocade/index.html index 2fddb4882..0502c7455 100644 --- a/docs/netmiko/brocade/index.html +++ b/docs/netmiko/brocade/index.html @@ -3,15 +3,17 @@ - + netmiko.brocade API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.brocade

    -Source code + +Expand source code +
    from netmiko.brocade.brocade_fos_ssh import BrocadeFOSSSH
     
     __all__ = ["BrocadeFOSSSH"]
    @@ -32,7 +36,7 @@

    Sub-modules

    netmiko.brocade.brocade_fos_ssh
    -
    +
    @@ -45,12 +49,14 @@

    Classes

    class BrocadeFOSSSH -(**kwargs) +(**kwargs: Any)
    -

    Brocade Fabric OS support

    +

    Brocade Fabric OS support

    -Source code + +Expand source code +
    class BrocadeFOSSSH(NoEnable, NoConfig, CiscoSSHConnection):
         """Brocade Fabric OS support"""
     
    @@ -150,9 +156,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/calix/calix_b6.html b/docs/netmiko/calix/calix_b6.html index 0f2cf600e..3c04e691d 100644 --- a/docs/netmiko/calix/calix_b6.html +++ b/docs/netmiko/calix/calix_b6.html @@ -3,15 +3,17 @@ - + netmiko.calix.calix_b6 API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.calix.calix_b6

    Calix B6 SSH Driver for Netmiko

    -Source code + +Expand source code +
    """Calix B6 SSH Driver for Netmiko"""
     from typing import Any
     import time
    @@ -87,7 +91,9 @@ 

    Module netmiko.calix.calix_b6

    """ raise NetmikoTimeoutException(msg) - def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = ")#", pattern: str = "", force_regex: bool = False + ) -> bool: """Checks if the device is in configuration mode""" return super().check_config_mode(check_string=check_string) @@ -146,16 +152,16 @@

    Classes

    class CalixB6Base -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Common methods for Calix B6, both SSH and Telnet.

    +

    Common methods for Calix B6, both SSH and Telnet.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -194,7 +200,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -239,12 +245,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -252,9 +258,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class CalixB6Base(CiscoSSHConnection):
         """Common methods for Calix B6, both SSH and Telnet."""
     
    @@ -307,7 +315,9 @@ 

    Classes

    """ raise NetmikoTimeoutException(msg) - def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = ")#", pattern: str = "", force_regex: bool = False + ) -> bool: """Checks if the device is in configuration mode""" return super().check_config_mode(check_string=check_string) @@ -335,24 +345,30 @@

    Subclasses

    Methods

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

    Checks if the device is in configuration mode

    +

    Checks if the device is in configuration mode

    -Source code -
    def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool:
    +
    +Expand source code
    +
    +
    def check_config_mode(
    +    self, check_string: str = ")#", pattern: str = "", force_regex: bool = False
    +) -> bool:
         """Checks if the device is in configuration mode"""
         return super().check_config_mode(check_string=check_string)
    -def session_preparation(self) +def session_preparation(self) ‑> Any
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> Any:
         """Prepare the session after the connection has been established."""
         self.ansi_escape_codes = True
    @@ -363,14 +379,16 @@ 

    Methods

    -def special_login_handler(self, delay_factor=1.0) +def special_login_handler(self, delay_factor: float = 1.0) ‑> None
    -

    Calix B6 presents with the following on login:

    +

    Calix B6 presents with the following on login:

    login as: -Password: ****

    +Password: ****

    -Source code + +Expand source code +
        def special_login_handler(self, delay_factor: float = 1.0) -> None:
             """
             Calix B6 presents with the following on login:
    @@ -457,18 +475,18 @@ 

    Inherited members

    class CalixB6SSH -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Calix B6 SSH Driver.

    +

    Calix B6 SSH Driver.

    To make it work, we have to override the SSHClient _auth method and manually handle the username/password.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -507,7 +525,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -552,12 +570,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -565,9 +583,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class CalixB6SSH(CalixB6Base):
         """Calix B6 SSH Driver.
     
    @@ -652,16 +672,16 @@ 

    Inherited members

    class CalixB6Telnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Calix B6 Telnet Driver.

    +

    Calix B6 Telnet Driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -700,7 +720,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -745,12 +765,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -758,9 +778,11 @@

    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). -
    +

    -Source code + +Expand source code +
    class CalixB6Telnet(CalixB6Base):
         """Calix B6 Telnet Driver."""
     
    @@ -858,9 +880,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/calix/index.html b/docs/netmiko/calix/index.html index 254b35f05..0ae4964bc 100644 --- a/docs/netmiko/calix/index.html +++ b/docs/netmiko/calix/index.html @@ -3,15 +3,17 @@ - + netmiko.calix API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.calix

    -Source code + +Expand source code +
    from netmiko.calix.calix_b6 import CalixB6SSH, CalixB6Telnet
     
     __all__ = ["CalixB6SSH", "CalixB6Telnet"]
    @@ -32,7 +36,7 @@

    Sub-modules

    netmiko.calix.calix_b6
    -

    Calix B6 SSH Driver for Netmiko

    +

    Calix B6 SSH Driver for Netmiko

    @@ -45,18 +49,18 @@

    Classes

    class CalixB6SSH -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Calix B6 SSH Driver.

    +

    Calix B6 SSH Driver.

    To make it work, we have to override the SSHClient _auth method and manually handle the username/password.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -95,7 +99,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -140,12 +144,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -153,9 +157,11 @@

    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). -
    +

    -Source code + +Expand source code +
    class CalixB6SSH(CalixB6Base):
         """Calix B6 SSH Driver.
     
    @@ -240,16 +246,16 @@ 

    Inherited members

    class CalixB6Telnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Calix B6 Telnet Driver.

    +

    Calix B6 Telnet Driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -288,7 +294,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -333,12 +339,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -346,9 +352,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class CalixB6Telnet(CalixB6Base):
         """Calix B6 Telnet Driver."""
     
    @@ -443,9 +451,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/cdot/cdot_cros_ssh.html b/docs/netmiko/cdot/cdot_cros_ssh.html index b476d4ebf..2a7a0f147 100644 --- a/docs/netmiko/cdot/cdot_cros_ssh.html +++ b/docs/netmiko/cdot/cdot_cros_ssh.html @@ -3,15 +3,17 @@ - + netmiko.cdot.cdot_cros_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.cdot.cdot_cros_ssh

    -Source code + +Expand source code +
    #!/usr/bin/env python
     # CDOT = Centre for Development of Telematics, India
     # CROS = CDOT Router OS
    @@ -63,7 +67,10 @@ 

    Module netmiko.cdot.cdot_cros_ssh

    ) def check_config_mode( - self, check_string: str = ")#", pattern: str = r"[#\$]" + self, + check_string: str = ")#", + pattern: str = r"[#\$]", + force_regex: bool = False, ) -> bool: """Checks if device is in configuration mode""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -150,16 +157,16 @@

    Classes

    class CdotCrosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Implement methods for interacting with CROS network devices.

    +

    Implement methods for interacting with CROS network devices.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -198,7 +205,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -243,12 +250,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -256,9 +263,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class CdotCrosSSH(NoEnable, CiscoBaseConnection):
         """Implement methods for interacting with CROS network devices."""
     
    @@ -283,7 +292,10 @@ 

    Classes

    ) def check_config_mode( - self, check_string: str = ")#", pattern: str = r"[#\$]" + self, + check_string: str = ")#", + pattern: str = r"[#\$]", + force_regex: bool = False, ) -> bool: """Checks if device is in configuration mode""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -367,33 +379,40 @@

    Ancestors

    Methods

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

    Checks if device is in configuration mode

    +

    Checks if device is in configuration mode

    -Source code + +Expand source code +
    def check_config_mode(
    -    self, check_string: str = ")#", pattern: str = r"[#\$]"
    +    self,
    +    check_string: str = ")#",
    +    pattern: str = r"[#\$]",
    +    force_regex: bool = False,
     ) -> bool:
         """Checks if device is in configuration mode"""
         return super().check_config_mode(check_string=check_string, pattern=pattern)
    -def commit(self, comment='', read_timeout=120.0, delay_factor=None, and_quit=True) +def commit(self, comment: str = '', read_timeout: float = 120.0, delay_factor: Optional[float] = None, and_quit: bool = True) ‑> str
    -

    Commit the candidate configuration.

    +

    Commit the candidate configuration.

    Commit the entered configuration. Raise an error and return the failure if the commit fails.

    default: command_string = commit comment: command_string = commit comment

    -

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    +

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    -Source code + +Expand source code +
    def commit(
         self,
         comment: str = "",
    @@ -443,12 +462,14 @@ 

    Methods

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

    Enter configuration mode.

    +

    Enter configuration mode.

    -Source code + +Expand source code +
    def config_mode(
         self, config_command: str = "config", pattern: str = "", re_flags: int = 0
     ) -> str:
    @@ -459,12 +480,14 @@ 

    Methods

    -def send_config_set(self, config_commands=None, exit_config_mode=False, **kwargs) +def send_config_set(self, config_commands: Union[str, Sequence[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, **kwargs: Any) ‑> str
    -

    CROS requires you not exit from configuration mode.

    +

    CROS requires you not exit from configuration mode.

    -Source code + +Expand source code +
    def send_config_set(
         self,
         config_commands: Union[str, Sequence[str], TextIO, None] = None,
    @@ -478,12 +501,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read(pattern=r"[#\$]")
    @@ -571,9 +596,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/cdot/index.html b/docs/netmiko/cdot/index.html index 3237ca26a..90985abf4 100644 --- a/docs/netmiko/cdot/index.html +++ b/docs/netmiko/cdot/index.html @@ -3,15 +3,17 @@ - + netmiko.cdot API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.cdot

    -Source code + +Expand source code +
    from netmiko.cdot.cdot_cros_ssh import CdotCrosSSH
     
     __all__ = ["CdotCrosSSH"]
    @@ -32,7 +36,7 @@

    Sub-modules

    netmiko.cdot.cdot_cros_ssh
    -
    +
    @@ -45,16 +49,16 @@

    Classes

    class CdotCrosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Implement methods for interacting with CROS network devices.

    +

    Implement methods for interacting with CROS network devices.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -93,7 +97,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -138,12 +142,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -151,9 +155,11 @@

    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). -
    +

    -Source code + +Expand source code +
    class CdotCrosSSH(NoEnable, CiscoBaseConnection):
         """Implement methods for interacting with CROS network devices."""
     
    @@ -178,7 +184,10 @@ 

    Classes

    ) def check_config_mode( - self, check_string: str = ")#", pattern: str = r"[#\$]" + self, + check_string: str = ")#", + pattern: str = r"[#\$]", + force_regex: bool = False, ) -> bool: """Checks if device is in configuration mode""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -262,33 +271,40 @@

    Ancestors

    Methods

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

    Checks if device is in configuration mode

    +

    Checks if device is in configuration mode

    -Source code + +Expand source code +
    def check_config_mode(
    -    self, check_string: str = ")#", pattern: str = r"[#\$]"
    +    self,
    +    check_string: str = ")#",
    +    pattern: str = r"[#\$]",
    +    force_regex: bool = False,
     ) -> bool:
         """Checks if device is in configuration mode"""
         return super().check_config_mode(check_string=check_string, pattern=pattern)
    -def commit(self, comment='', read_timeout=120.0, delay_factor=None, and_quit=True) +def commit(self, comment: str = '', read_timeout: float = 120.0, delay_factor: Optional[float] = None, and_quit: bool = True) ‑> str
    -

    Commit the candidate configuration.

    +

    Commit the candidate configuration.

    Commit the entered configuration. Raise an error and return the failure if the commit fails.

    default: command_string = commit comment: command_string = commit comment

    -

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    +

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    -Source code + +Expand source code +
    def commit(
         self,
         comment: str = "",
    @@ -338,12 +354,14 @@ 

    Methods

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

    Enter configuration mode.

    +

    Enter configuration mode.

    -Source code + +Expand source code +
    def config_mode(
         self, config_command: str = "config", pattern: str = "", re_flags: int = 0
     ) -> str:
    @@ -354,12 +372,14 @@ 

    Methods

    -def send_config_set(self, config_commands=None, exit_config_mode=False, **kwargs) +def send_config_set(self, config_commands: Union[str, Sequence[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, **kwargs: Any) ‑> str
    -

    CROS requires you not exit from configuration mode.

    +

    CROS requires you not exit from configuration mode.

    -Source code + +Expand source code +
    def send_config_set(
         self,
         config_commands: Union[str, Sequence[str], TextIO, None] = None,
    @@ -373,12 +393,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read(pattern=r"[#\$]")
    @@ -471,9 +493,7 @@ 

    C

    - - \ No newline at end of file diff --git a/docs/netmiko/centec/centec_os.html b/docs/netmiko/centec/centec_os.html index 2c7233d15..1caeec650 100644 --- a/docs/netmiko/centec/centec_os.html +++ b/docs/netmiko/centec/centec_os.html @@ -3,15 +3,17 @@ - + netmiko.centec.centec_os API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.centec.centec_os

    Centec OS Support

    -Source code + +Expand source code +
    """Centec OS Support"""
     from netmiko.cisco_base_connection import CiscoBaseConnection
     
    @@ -64,16 +68,16 @@ 

    Classes

    class CentecOSBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -112,7 +116,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -157,12 +161,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -170,9 +174,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class CentecOSBase(CiscoBaseConnection):
         def session_preparation(self) -> None:
             """Prepare the session after the connection has been established."""
    @@ -201,12 +207,14 @@ 

    Subclasses

    Methods

    -def save_config(self, cmd='write', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'write', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Save config: write

    +

    Save config: write

    -Source code + +Expand source code +
    def save_config(
         self, cmd: str = "write", confirm: bool = False, confirm_response: str = ""
     ) -> str:
    @@ -217,12 +225,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read(pattern=r"[>#]")
    @@ -280,16 +290,16 @@ 

    Inherited members

    class CentecOSSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -328,7 +338,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -373,12 +383,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -386,9 +396,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class CentecOSSSH(CentecOSBase):
     
         pass
    @@ -450,16 +462,16 @@

    Inherited members

    class CentecOSTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -498,7 +510,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -543,12 +555,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -556,9 +568,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class CentecOSTelnet(CentecOSBase):
     
         pass
    @@ -653,9 +667,7 @@

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/centec/index.html b/docs/netmiko/centec/index.html index ae0adcdc8..d0e2ef76a 100644 --- a/docs/netmiko/centec/index.html +++ b/docs/netmiko/centec/index.html @@ -3,15 +3,17 @@ - + netmiko.centec API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.centec

    -Source code + +Expand source code +
    from netmiko.centec.centec_os import CentecOSSSH, CentecOSTelnet
     
     __all__ = ["CentecOSSSH", "CentecOSTelnet"]
    @@ -32,7 +36,7 @@

    Sub-modules

    netmiko.centec.centec_os
    -

    Centec OS Support

    +

    Centec OS Support

    @@ -45,16 +49,16 @@

    Classes

    class CentecOSSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -93,7 +97,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -138,12 +142,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -151,9 +155,11 @@

    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). -
    +

    -Source code + +Expand source code +
    class CentecOSSSH(CentecOSBase):
     
         pass
    @@ -215,16 +221,16 @@

    Inherited members

    class CentecOSTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -263,7 +269,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -308,12 +314,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -321,9 +327,11 @@

    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). -
    +
-Source code + +Expand source code +
class CentecOSTelnet(CentecOSBase):
 
     pass
@@ -416,9 +424,7 @@

-

Generated by pdoc 0.6.3.

+

Generated by pdoc 0.10.0.

- - \ No newline at end of file diff --git a/docs/netmiko/channel.html b/docs/netmiko/channel.html index 4ca1f8906..f5e635a2d 100644 --- a/docs/netmiko/channel.html +++ b/docs/netmiko/channel.html @@ -3,15 +3,17 @@ - + netmiko.channel API documentation - - - - - + + + + + + +
@@ -21,7 +23,9 @@

Module netmiko.channel

-Source code + +Expand source code +
from typing import Any, Optional
 from abc import ABC, abstractmethod
 import paramiko
@@ -202,14 +206,16 @@ 

Classes

class Channel -(*args, **kwargs) +(*args: Any, **kwargs: Any)
-

Helper class that provides a standard way to create an ABC using +

Helper class that provides a standard way to create an ABC using inheritance.

-

Create the object.

+

Create the object.

-Source code + +Expand source code +
class Channel(ABC):
     @abstractmethod
     def __init__(self, *args: Any, **kwargs: Any) -> None:
@@ -249,7 +255,12 @@ 

Classes

@abstractmethod def write_channel(self, out_data: str) -> None: """Write data down the channel.""" - pass
+ pass + + # @abstractmethod + # def is_alive(self) -> bool: + # """Is the channel alive.""" + # pass

Ancestors

    @@ -258,18 +269,20 @@

    Ancestors

    Subclasses

    Methods

    -def read_buffer(self) +def read_buffer(self) ‑> str
    -

    Single read of available data.

    +

    Single read of available data.

    -Source code + +Expand source code +
    @abstractmethod
     def read_buffer(self) -> str:
         """Single read of available data."""
    @@ -277,12 +290,14 @@ 

    Methods

    -def read_channel(self) +def read_channel(self) ‑> str
    -

    Read all of the available data from the channel.

    +

    Read all of the available data from the channel.

    -Source code + +Expand source code +
    @abstractmethod
     def read_channel(self) -> str:
         """Read all of the available data from the channel."""
    @@ -290,12 +305,14 @@ 

    Methods

    -def write_channel(self, out_data) +def write_channel(self, out_data: str) ‑> None
    -

    Write data down the channel.

    +

    Write data down the channel.

    -Source code + +Expand source code +
    @abstractmethod
     def write_channel(self, out_data: str) -> None:
         """Write data down the channel."""
    @@ -306,15 +323,17 @@ 

    Methods

    class SSHChannel -(conn, encoding) +(conn: Optional[paramiko.channel.Channel], encoding: str)
    -

    Helper class that provides a standard way to create an ABC using +

    Helper class that provides a standard way to create an ABC using inheritance.

    Placeholder init method so that reading and writing can be moved to the -channel class.

    +channel class.

    -Source code + +Expand source code +
    class SSHChannel(Channel):
         def __init__(self, conn: Optional[paramiko.Channel], encoding: str) -> None:
             """
    @@ -374,15 +393,17 @@ 

    Inherited members

    class SerialChannel -(conn, encoding) +(conn: Optional[serial.serialposix.Serial], encoding: str)
    -

    Helper class that provides a standard way to create an ABC using +

    Helper class that provides a standard way to create an ABC using inheritance.

    Placeholder init method so that reading and writing can be moved to the -channel class.

    +channel class.

    -Source code + +Expand source code +
    class SerialChannel(Channel):
         def __init__(self, conn: Optional[serial.Serial], encoding: str) -> None:
             """
    @@ -441,15 +462,17 @@ 

    Inherited members

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

    Helper class that provides a standard way to create an ABC using +

    Helper class that provides a standard way to create an ABC using inheritance.

    Placeholder init method so that reading and writing can be moved to the -channel class.

    +channel class.

    -Source code + +Expand source code +
    class TelnetChannel(Channel):
         def __init__(self, conn: Optional[telnetlib.Telnet], encoding: str) -> None:
             """
    @@ -532,9 +555,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/checkpoint/checkpoint_gaia_ssh.html b/docs/netmiko/checkpoint/checkpoint_gaia_ssh.html index d414540aa..42c87c360 100644 --- a/docs/netmiko/checkpoint/checkpoint_gaia_ssh.html +++ b/docs/netmiko/checkpoint/checkpoint_gaia_ssh.html @@ -3,15 +3,17 @@ - + netmiko.checkpoint.checkpoint_gaia_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.checkpoint.checkpoint_gaia_ssh

    -Source code + +Expand source code +
    from netmiko.no_config import NoConfig
     from netmiko.base_connection import BaseConnection
     
    @@ -59,17 +63,17 @@ 

    Classes

    class CheckPointGaiaSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Implements methods for communicating with Check Point Gaia +

    Implements methods for communicating with Check Point Gaia firewalls.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -108,7 +112,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -153,12 +157,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -166,9 +170,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class CheckPointGaiaSSH(NoConfig, BaseConnection):
         """
         Implements methods for communicating with Check Point Gaia
    @@ -198,13 +204,15 @@ 

    Ancestors

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    -

    Set the base prompt for interaction ('>').

    +

    Prepare the session after the connection has been established.

    +

    Set the base prompt for interaction ('>').

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """
         Prepare the session after the connection has been established.
    @@ -293,9 +301,7 @@ 

    - - \ No newline at end of file diff --git a/docs/netmiko/checkpoint/index.html b/docs/netmiko/checkpoint/index.html index 284a19e0b..e1db4bb61 100644 --- a/docs/netmiko/checkpoint/index.html +++ b/docs/netmiko/checkpoint/index.html @@ -3,15 +3,17 @@ - + netmiko.checkpoint API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.checkpoint

    -Source code + +Expand source code +
    from netmiko.checkpoint.checkpoint_gaia_ssh import CheckPointGaiaSSH
     
     __all__ = ["CheckPointGaiaSSH"]
    @@ -32,7 +36,7 @@

    Sub-modules

    netmiko.checkpoint.checkpoint_gaia_ssh
    -
    +
    @@ -45,17 +49,17 @@

    Classes

    class CheckPointGaiaSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Implements methods for communicating with Check Point Gaia +

    Implements methods for communicating with Check Point Gaia firewalls.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -94,7 +98,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -139,12 +143,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -152,9 +156,11 @@

    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). -
    +

    -Source code + +Expand source code +
    class CheckPointGaiaSSH(NoConfig, BaseConnection):
         """
         Implements methods for communicating with Check Point Gaia
    @@ -184,13 +190,15 @@ 

    Ancestors

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    -

    Set the base prompt for interaction ('>').

    +

    Prepare the session after the connection has been established.

    +

    Set the base prompt for interaction ('>').

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """
         Prepare the session after the connection has been established.
    @@ -284,9 +292,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/ciena/ciena_saos.html b/docs/netmiko/ciena/ciena_saos.html index f8de7150f..d28416295 100644 --- a/docs/netmiko/ciena/ciena_saos.html +++ b/docs/netmiko/ciena/ciena_saos.html @@ -3,15 +3,17 @@ - + netmiko.ciena.ciena_saos API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.ciena.ciena_saos

    Ciena SAOS support.

    -Source code + +Expand source code +
    """Ciena SAOS support."""
     from typing import Optional, Any
     import re
    @@ -235,17 +239,17 @@ 

    Classes

    class CienaSaosBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Ciena SAOS support.

    +

    Ciena SAOS support.

    Implements methods for interacting Ciena Saos devices.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -284,7 +288,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -329,12 +333,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -342,9 +346,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class CienaSaosBase(NoEnable, NoConfig, BaseConnection):
         """
         Ciena SAOS support.
    @@ -394,12 +400,14 @@ 

    Subclasses

    Methods

    -def save_config(self, cmd='configuration save', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'configuration save', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Saves Config.

    +

    Saves Config.

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "configuration save",
    @@ -463,12 +471,14 @@ 

    Inherited members

    class CienaSaosFileTransfer -(ssh_conn, source_file, dest_file, file_system=None, direction='put', **kwargs) +(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: Optional[str] = None, direction: str = 'put', **kwargs: Any)
    -

    Ciena SAOS SCP File Transfer driver.

    +

    Ciena SAOS SCP File Transfer driver.

    -Source code + +Expand source code +
    class CienaSaosFileTransfer(BaseFileTransfer):
         """Ciena SAOS SCP File Transfer driver."""
     
    @@ -619,10 +629,10 @@ 

    Ancestors

    Methods

    -def remote_space_available(self, search_pattern='') +def remote_space_available(self, search_pattern: str = '') ‑> int
    -

    Return space available on Ciena SAOS

    +

    Return space available on Ciena SAOS

    Output should only have the file-system that matches {self.file_system}

    Filesystem 1K-blocks @@ -631,9 +641,11 @@

    Methods

    1048576 648 1047928 -0% /tmp

    +0% /tmp

    -Source code + +Expand source code +
    def remote_space_available(self, search_pattern: str = "") -> int:
         """
         Return space available on Ciena SAOS
    @@ -702,17 +714,17 @@ 

    Inherited members

    class CienaSaosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Ciena SAOS support.

    +

    Ciena SAOS support.

    Implements methods for interacting Ciena Saos devices.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -751,7 +763,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -796,12 +808,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -809,9 +821,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class CienaSaosSSH(CienaSaosBase):
         pass
    @@ -873,17 +887,17 @@

    Inherited members

    class CienaSaosTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Ciena SAOS support.

    +

    Ciena SAOS support.

    Implements methods for interacting Ciena Saos devices.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -922,7 +936,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -967,12 +981,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -980,9 +994,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class CienaSaosTelnet(CienaSaosBase):
         def __init__(self, *args: Any, **kwargs: Any) -> None:
             default_enter = kwargs.get("default_enter")
    @@ -1085,9 +1101,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/ciena/index.html b/docs/netmiko/ciena/index.html index f38b15400..14911476e 100644 --- a/docs/netmiko/ciena/index.html +++ b/docs/netmiko/ciena/index.html @@ -3,15 +3,17 @@ - + netmiko.ciena API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.ciena

    -Source code + +Expand source code +
    from netmiko.ciena.ciena_saos import (
         CienaSaosSSH,
         CienaSaosTelnet,
    @@ -36,7 +40,7 @@ 

    Sub-modules

    netmiko.ciena.ciena_saos
    -

    Ciena SAOS support.

    +

    Ciena SAOS support.

    @@ -49,12 +53,14 @@

    Classes

    class CienaSaosFileTransfer -(ssh_conn, source_file, dest_file, file_system=None, direction='put', **kwargs) +(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: Optional[str] = None, direction: str = 'put', **kwargs: Any)
    -

    Ciena SAOS SCP File Transfer driver.

    +

    Ciena SAOS SCP File Transfer driver.

    -Source code + +Expand source code +
    class CienaSaosFileTransfer(BaseFileTransfer):
         """Ciena SAOS SCP File Transfer driver."""
     
    @@ -205,10 +211,10 @@ 

    Ancestors

    Methods

    -def remote_space_available(self, search_pattern='') +def remote_space_available(self, search_pattern: str = '') ‑> int
    -

    Return space available on Ciena SAOS

    +

    Return space available on Ciena SAOS

    Output should only have the file-system that matches {self.file_system}

    Filesystem 1K-blocks @@ -217,9 +223,11 @@

    Methods

    1048576 648 1047928 -0% /tmp

    +0% /tmp

    -Source code + +Expand source code +
    def remote_space_available(self, search_pattern: str = "") -> int:
         """
         Return space available on Ciena SAOS
    @@ -288,17 +296,17 @@ 

    Inherited members

    class CienaSaosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Ciena SAOS support.

    +

    Ciena SAOS support.

    Implements methods for interacting Ciena Saos devices.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -337,7 +345,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -382,12 +390,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -395,9 +403,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class CienaSaosSSH(CienaSaosBase):
         pass
    @@ -459,17 +469,17 @@

    Inherited members

    class CienaSaosTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Ciena SAOS support.

    +

    Ciena SAOS support.

    Implements methods for interacting Ciena Saos devices.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -508,7 +518,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -553,12 +563,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -566,9 +576,11 @@

    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). -
    +

    -Source code + +Expand source code +
    class CienaSaosTelnet(CienaSaosBase):
         def __init__(self, *args: Any, **kwargs: Any) -> None:
             default_enter = kwargs.get("default_enter")
    @@ -670,9 +682,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/cisco/cisco_asa_ssh.html b/docs/netmiko/cisco/cisco_asa_ssh.html index 4754f10fe..79f079aec 100644 --- a/docs/netmiko/cisco/cisco_asa_ssh.html +++ b/docs/netmiko/cisco/cisco_asa_ssh.html @@ -3,15 +3,17 @@ - + netmiko.cisco.cisco_asa_ssh API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.cisco.cisco_asa_ssh

    Subclass specific to Cisco ASA.

    -Source code + +Expand source code +
    """Subclass specific to Cisco ASA."""
     from typing import Any, Union, List, Dict, Optional
     import re
    @@ -67,7 +71,10 @@ 

    Module netmiko.cisco.cisco_asa_ssh

    self.set_base_prompt() def check_config_mode( - self, check_string: str = ")#", pattern: str = r"[>\#]" + self, + check_string: str = ")#", + pattern: str = r"[>\#]", + force_regex: bool = False, ) -> bool: return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -209,12 +216,14 @@

    Classes

    class CiscoAsaFileTransfer -(ssh_conn, source_file, dest_file, file_system=None, direction='put', socket_timeout=10.0, progress=None, progress4=None, hash_supported=True) +(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: Optional[str] = None, direction: str = 'put', socket_timeout: float = 10.0, progress: Optional[Callable[..., Any]] = None, progress4: Optional[Callable[..., Any]] = None, hash_supported: bool = True)
    -

    Cisco ASA SCP File Transfer driver.

    +

    Cisco ASA SCP File Transfer driver.

    -Source code + +Expand source code +
    class CiscoAsaFileTransfer(CiscoFileTransfer):
         """Cisco ASA SCP File Transfer driver."""
     
    @@ -252,16 +261,16 @@ 

    Inherited members

    class CiscoAsaSSH -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Subclass specific to Cisco ASA.

    +

    Subclass specific to Cisco ASA.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -300,7 +309,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -345,12 +354,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -358,9 +367,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class CiscoAsaSSH(CiscoSSHConnection):
         """Subclass specific to Cisco ASA."""
     
    @@ -397,7 +408,10 @@ 

    Inherited members

    self.set_base_prompt() def check_config_mode( - self, check_string: str = ")#", pattern: str = r"[>\#]" + self, + check_string: str = ")#", + pattern: str = r"[>\#]", + force_regex: bool = False, ) -> bool: return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -530,16 +544,18 @@

    Ancestors

    Methods

    -def asa_login(self) +def asa_login(self) ‑> None
    -

    Handle ASA reaching privilege level 15 using login

    +

    Handle ASA reaching privilege level 15 using login

    twb-dc-fw1> login Username: admin

    Raises NetmikoAuthenticationException, if we do not reach privilege -level 15 after 10 loops.

    +level 15 after 10 loops.

    -Source code + +Expand source code +
    def asa_login(self) -> None:
         """
         Handle ASA reaching privilege level 15 using login
    @@ -576,12 +592,14 @@ 

    Methods

    -def normalize_linefeeds(self, a_string) +def normalize_linefeeds(self, a_string: str) ‑> str
    -

    Cisco ASA needed that extra

    +

    Cisco ASA needed that extra

    -Source code + +Expand source code +
    def normalize_linefeeds(self, a_string: str) -> str:
         """Cisco ASA needed that extra \r\n\r"""
         newline = re.compile("(\r\n\r|\r\r\r\n|\r\r\n|\r\n|\n\r)")
    @@ -594,12 +612,14 @@ 

    Methods

    -def save_config(self, cmd='write mem', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'write mem', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Saves Config

    +

    Saves Config

    -Source code + +Expand source code +
    def save_config(
         self, cmd: str = "write mem", confirm: bool = False, confirm_response: str = ""
     ) -> str:
    @@ -610,13 +630,15 @@ 

    Methods

    -def send_command(self, *args, **kwargs) +def send_command(self, *args: Any, **kwargs: Any) ‑> Union[str, List[Any], Dict[str, Any]]
    -

    If the ASA is in multi-context mode, then the base_prompt needs to be -updated after each context change.

    +

    If the ASA is in multi-context mode, then the base_prompt needs to be +updated after each context change.

    -Source code + +Expand source code +
    def send_command(
         self, *args: Any, **kwargs: Any
     ) -> Union[str, List[Any], Dict[str, Any]]:
    @@ -643,13 +665,15 @@ 

    Methods

    -def send_command_timing(self, *args, **kwargs) +def send_command_timing(self, *args: Any, **kwargs: Any) ‑> Union[str, List[Any], Dict[str, Any]]
    -

    If the ASA is in multi-context mode, then the base_prompt needs to be -updated after each context change.

    +

    If the ASA is in multi-context mode, then the base_prompt needs to be +updated after each context change.

    -Source code + +Expand source code +
    def send_command_timing(
         self, *args: Any, **kwargs: Any
     ) -> Union[str, List[Any], Dict[str, Any]]:
    @@ -668,12 +692,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
     
    @@ -704,15 +730,17 @@ 

    Methods

    -def set_base_prompt(self, *args, **kwargs) +def set_base_prompt(self, *args: Any, **kwargs: Any) ‑> str
    -

    Cisco ASA in multi-context mode needs to have the base prompt updated +

    Cisco ASA in multi-context mode needs to have the base prompt updated (if you switch contexts i.e. 'changeto')

    This switch of ASA contexts can occur in configuration mode. If this -happens the trailing '(config*' needs stripped off.

    +happens the trailing '(config*' needs stripped off.

    -Source code + +Expand source code +
    def set_base_prompt(self, *args: Any, **kwargs: Any) -> str:
         """
         Cisco ASA in multi-context mode needs to have the base prompt updated
    @@ -812,9 +840,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/cisco/cisco_ftd_ssh.html b/docs/netmiko/cisco/cisco_ftd_ssh.html index 847ee71f7..64344b92f 100644 --- a/docs/netmiko/cisco/cisco_ftd_ssh.html +++ b/docs/netmiko/cisco/cisco_ftd_ssh.html @@ -3,15 +3,17 @@ - + netmiko.cisco.cisco_ftd_ssh API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.cisco.cisco_ftd_ssh

    Subclass specific to Cisco FTD.

    -Source code + +Expand source code +
    """Subclass specific to Cisco FTD."""
     from typing import Any
     from netmiko.no_enable import NoEnable
    @@ -42,7 +46,9 @@ 

    Module netmiko.cisco.cisco_ftd_ssh

    """Canot change config on FTD via ssh""" raise NotImplementedError - def check_config_mode(self, check_string: str = "", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "", pattern: str = "", force_regex: bool = False + ) -> bool: """Canot change config on FTD via ssh""" return False
    @@ -58,16 +64,16 @@

    Classes

    class CiscoFtdSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Subclass specific to Cisco FTD.

    +

    Subclass specific to Cisco FTD.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -106,7 +112,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -151,12 +157,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -164,9 +170,11 @@

    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). -
    +

    -Source code + +Expand source code +
    class CiscoFtdSSH(NoEnable, NoConfig, CiscoSSHConnection):
         """Subclass specific to Cisco FTD."""
     
    @@ -179,7 +187,9 @@ 

    Classes

    """Canot change config on FTD via ssh""" raise NotImplementedError - def check_config_mode(self, check_string: str = "", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "", pattern: str = "", force_regex: bool = False + ) -> bool: """Canot change config on FTD via ssh""" return False
    @@ -194,36 +204,44 @@

    Ancestors

    Methods

    -def check_config_mode(self, check_string='', pattern='') +def check_config_mode(self, check_string: str = '', pattern: str = '', force_regex: bool = False) ‑> bool
    -

    Canot change config on FTD via ssh

    +

    Canot change config on FTD via ssh

    -Source code -
    def check_config_mode(self, check_string: str = "", pattern: str = "") -> bool:
    +
    +Expand source code
    +
    +
    def check_config_mode(
    +    self, check_string: str = "", pattern: str = "", force_regex: bool = False
    +) -> bool:
         """Canot change config on FTD via ssh"""
         return False
    -def send_config_set(self, *args, **kwargs) +def send_config_set(self, *args: Any, **kwargs: Any) ‑> str
    -

    Canot change config on FTD via ssh

    +

    Canot change config on FTD via ssh

    -Source code + +Expand source code +
    def send_config_set(self, *args: Any, **kwargs: Any) -> str:
         """Canot change config on FTD via ssh"""
         raise NotImplementedError
    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read(pattern=r"[>#]")
    @@ -307,9 +325,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/cisco/cisco_ios.html b/docs/netmiko/cisco/cisco_ios.html index 415a0da32..6ed5d40ba 100644 --- a/docs/netmiko/cisco/cisco_ios.html +++ b/docs/netmiko/cisco/cisco_ios.html @@ -3,15 +3,17 @@ - + netmiko.cisco.cisco_ios API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.cisco.cisco_ios

    -Source code + +Expand source code +
    from typing import Any, Optional, Callable, Type
     from types import TracebackType
     import time
    @@ -66,7 +70,10 @@ 

    Module netmiko.cisco.cisco_ios

    return self.base_prompt def check_config_mode( - self, check_string: str = ")#", pattern: str = r"[>#]" + self, + check_string: str = ")#", + pattern: str = r"[>#]", + force_regex: bool = False, ) -> bool: """ Checks if the device is in configuration mode or not. @@ -323,16 +330,16 @@

    Classes

    class CiscoIosBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Common Methods for IOS (both SSH and telnet).

    +

    Common Methods for IOS (both SSH and telnet).

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -371,7 +378,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -416,12 +423,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -429,9 +436,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class CiscoIosBase(CiscoBaseConnection):
         """Common Methods for IOS (both SSH and telnet)."""
     
    @@ -464,7 +473,10 @@ 

    Classes

    return self.base_prompt def check_config_mode( - self, check_string: str = ")#", pattern: str = r"[>#]" + self, + check_string: str = ")#", + pattern: str = r"[>#]", + force_regex: bool = False, ) -> bool: """ Checks if the device is in configuration mode or not. @@ -489,20 +501,22 @@

    Ancestors

    Subclasses

    Methods

    -def save_config(self, cmd='write mem', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'write mem', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Saves Config Using Copy Run Start

    +

    Saves Config Using Copy Run Start

    -Source code + +Expand source code +
    def save_config(
         self, cmd: str = "write mem", confirm: bool = False, confirm_response: str = ""
     ) -> str:
    @@ -513,12 +527,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         cmd = "terminal width 511"
    @@ -528,13 +544,15 @@ 

    Methods

    -def set_base_prompt(self, pri_prompt_terminator='#', alt_prompt_terminator='>', delay_factor=1.0, pattern=None) +def set_base_prompt(self, pri_prompt_terminator: str = '#', alt_prompt_terminator: str = '>', delay_factor: float = 1.0, pattern: Optional[str] = None) ‑> str
    -

    Cisco IOS/IOS-XE abbreviates the prompt at 20-chars in config mode.

    -

    Consequently, abbreviate the base_prompt

    +

    Cisco IOS/IOS-XE abbreviates the prompt at 20-chars in config mode.

    +

    Consequently, abbreviate the base_prompt

    -Source code + +Expand source code +
    def set_base_prompt(
         self,
         pri_prompt_terminator: str = "#",
    @@ -606,12 +624,14 @@ 

    Inherited members

    class CiscoIosFileTransfer -(ssh_conn, source_file, dest_file, file_system=None, direction='put', socket_timeout=10.0, progress=None, progress4=None, hash_supported=True) +(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: Optional[str] = None, direction: str = 'put', socket_timeout: float = 10.0, progress: Optional[Callable[..., Any]] = None, progress4: Optional[Callable[..., Any]] = None, hash_supported: bool = True)
    -

    Cisco IOS SCP File Transfer driver.

    +

    Cisco IOS SCP File Transfer driver.

    -Source code + +Expand source code +
    class CiscoIosFileTransfer(CiscoFileTransfer):
         """Cisco IOS SCP File Transfer driver."""
     
    @@ -653,16 +673,16 @@ 

    Inherited members

    class CiscoIosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Cisco IOS SSH driver.

    +

    Cisco IOS SSH driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -701,7 +721,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -746,12 +766,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -759,9 +779,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class CiscoIosSSH(CiscoIosBase):
         """Cisco IOS SSH driver."""
     
    @@ -824,16 +846,16 @@ 

    Inherited members

    class CiscoIosSerial -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Cisco IOS Serial driver.

    +

    Cisco IOS Serial driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -872,7 +894,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -917,12 +939,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -930,9 +952,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class CiscoIosSerial(CiscoIosBase):
         """Cisco IOS Serial driver."""
     
    @@ -995,16 +1019,16 @@ 

    Inherited members

    class CiscoIosTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Cisco IOS Telnet driver.

    +

    Cisco IOS Telnet driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -1043,7 +1067,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -1088,12 +1112,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -1101,9 +1125,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class CiscoIosTelnet(CiscoIosBase):
         """Cisco IOS Telnet driver."""
     
    @@ -1166,12 +1192,14 @@ 

    Inherited members

    class InLineTransfer -(ssh_conn, source_file='', dest_file='', file_system=None, direction='put', source_config=None, socket_timeout=10.0, progress=None, progress4=None, hash_supported=True) +(ssh_conn: BaseConnection, source_file: str = '', dest_file: str = '', file_system: Optional[str] = None, direction: str = 'put', source_config: Optional[str] = None, socket_timeout: float = 10.0, progress: Optional[Callable[..., Any]] = None, progress4: Optional[Callable[..., Any]] = None, hash_supported: bool = True)
    -

    Use TCL on Cisco IOS to directly transfer file.

    +

    Use TCL on Cisco IOS to directly transfer file.

    -Source code + +Expand source code +
    class InLineTransfer(CiscoIosFileTransfer):
         """Use TCL on Cisco IOS to directly transfer file."""
     
    @@ -1384,12 +1412,14 @@ 

    Ancestors

    Methods

    -def config_md5(self, source_config) +def config_md5(self, source_config: str) ‑> str
    -

    Compute MD5 hash of text.

    +

    Compute MD5 hash of text.

    -Source code + +Expand source code +
    def config_md5(self, source_config: str) -> str:
         """Compute MD5 hash of text."""
         file_contents = source_config + "\n"  # Cisco IOS automatically adds this
    @@ -1398,12 +1428,14 @@ 

    Methods

    -def file_md5(self, file_name, add_newline=False) +def file_md5(self, file_name: str, add_newline: bool = False) ‑> str
    -

    Compute MD5 hash of file.

    +

    Compute MD5 hash of file.

    -Source code + +Expand source code +
    def file_md5(self, file_name: str, add_newline: bool = False) -> str:
         """Compute MD5 hash of file."""
         if add_newline is True:
    @@ -1490,9 +1522,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/cisco/cisco_nxos_ssh.html b/docs/netmiko/cisco/cisco_nxos_ssh.html index e2e6992c9..4c5042c9c 100644 --- a/docs/netmiko/cisco/cisco_nxos_ssh.html +++ b/docs/netmiko/cisco/cisco_nxos_ssh.html @@ -3,15 +3,17 @@ - + netmiko.cisco.cisco_nxos_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.cisco.cisco_nxos_ssh

    -Source code + +Expand source code +
    from typing import Any, Optional, Callable
     import re
     import os
    @@ -49,7 +53,10 @@ 

    Module netmiko.cisco.cisco_nxos_ssh

    return newline.sub(self.RESPONSE_RETURN, a_string).replace("\r", "\n") def check_config_mode( - self, check_string: str = ")#", pattern: str = r"[>#]" + 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) @@ -211,12 +218,14 @@

    Classes

    class CiscoNxosFileTransfer -(ssh_conn, source_file, dest_file, file_system='bootflash:', direction='put', socket_timeout=10.0, progress=None, progress4=None, hash_supported=True) +(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: str = 'bootflash:', direction: str = 'put', socket_timeout: float = 10.0, progress: Optional[Callable[..., Any]] = None, progress4: Optional[Callable[..., Any]] = None, hash_supported: bool = True)
    -

    Cisco NXOS SCP File Transfer driver.

    +

    Cisco NXOS SCP File Transfer driver.

    -Source code + +Expand source code +
    class CiscoNxosFileTransfer(CiscoFileTransfer):
         """Cisco NXOS SCP File Transfer driver."""
     
    @@ -337,12 +346,14 @@ 

    Ancestors

    Static methods

    -def process_md5(md5_output, pattern='= (.*)') +def process_md5(md5_output: str, pattern: str = '= (.*)') ‑> str
    -

    Not needed on NX-OS.

    +

    Not needed on NX-OS.

    -Source code + +Expand source code +
    @staticmethod
     def process_md5(md5_output: str, pattern: str = r"= (.*)") -> str:
         """Not needed on NX-OS."""
    @@ -376,16 +387,16 @@ 

    Inherited members

    class CiscoNxosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -424,7 +435,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -469,12 +480,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -482,9 +493,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class CiscoNxosSSH(CiscoSSHConnection):
         def session_preparation(self) -> None:
             """Prepare the session after the connection has been established."""
    @@ -504,7 +517,10 @@ 

    Inherited members

    return newline.sub(self.RESPONSE_RETURN, a_string).replace("\r", "\n") def check_config_mode( - self, check_string: str = ")#", pattern: str = r"[>#]" + 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) @@ -550,30 +566,37 @@

    Ancestors

    Methods

    -def check_config_mode(self, check_string=')#', pattern='[>#]') +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.

    +

    Checks if the device is in configuration mode or not.

    -Source code + +Expand source code +
    def check_config_mode(
    -    self, check_string: str = ")#", pattern: str = r"[>#]"
    +    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)
    -def normalize_linefeeds(self, a_string) +def normalize_linefeeds(self, a_string: str) ‑> str
    -

    Convert ' +

    Convert ' ' or '

    ' to ' , and remove extra ' -'s in the text.

    +'s in the text.

    -Source code + +Expand source code +
    def normalize_linefeeds(self, a_string: str) -> str:
         """Convert '\r\n' or '\r\r\n' to '\n, and remove extra '\r's in the text."""
         newline = re.compile(r"(\r\r\n\r|\r\r\n|\r\n)")
    @@ -582,12 +605,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self.ansi_escape_codes = True
    @@ -683,9 +708,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/cisco/cisco_s300.html b/docs/netmiko/cisco/cisco_s300.html index af25013d5..bfea0c194 100644 --- a/docs/netmiko/cisco/cisco_s300.html +++ b/docs/netmiko/cisco/cisco_s300.html @@ -3,15 +3,17 @@ - + netmiko.cisco.cisco_s300 API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.cisco.cisco_s300

    -Source code + +Expand source code +
    from netmiko.cisco_base_connection import CiscoSSHConnection
     
     
    @@ -78,19 +82,19 @@ 

    Classes

    class CiscoS300Base -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Support for Cisco SG300 series of devices.

    +

    Support for Cisco SG300 series of devices.

    Note, must configure the following to disable SG300 from prompting for username twice:

    configure terminal ip ssh password-auth

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -129,7 +133,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -174,12 +178,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -187,9 +191,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class CiscoS300Base(CiscoSSHConnection):
         """
         Support for Cisco SG300 series of devices.
    @@ -232,12 +238,14 @@ 

    Subclasses

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self.ansi_escape_codes = True
    @@ -298,19 +306,19 @@ 

    Inherited members

    class CiscoS300SSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Support for Cisco SG300 series of devices.

    +

    Support for Cisco SG300 series of devices.

    Note, must configure the following to disable SG300 from prompting for username twice:

    configure terminal ip ssh password-auth

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -349,7 +357,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -394,12 +402,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -407,9 +415,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class CiscoS300SSH(CiscoS300Base):
         pass
    @@ -471,17 +481,17 @@

    Inherited members

    class CiscoS300Telnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Support for Cisco SG300 series of devices, with telnet. +

    Support for Cisco SG300 series of devices, with telnet. Note: can be used with Sx200 series, with telnet enabled.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -520,7 +530,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -565,12 +575,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -578,9 +588,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class CiscoS300Telnet(CiscoS300Base):
         """
         Support for Cisco SG300 series of devices, with telnet.
    @@ -679,9 +691,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/cisco/cisco_tp_tcce.html b/docs/netmiko/cisco/cisco_tp_tcce.html index 0a7569cbd..2eb8c15b8 100644 --- a/docs/netmiko/cisco/cisco_tp_tcce.html +++ b/docs/netmiko/cisco/cisco_tp_tcce.html @@ -3,17 +3,19 @@ - + netmiko.cisco.cisco_tp_tcce API documentation - - - - - + + + + + + +
    @@ -28,7 +30,9 @@

    Module netmiko.cisco.cisco_tp_tcce

    Written by Ahmad Barrin Updated by Kirk Byers

    -Source code + +Expand source code +
    """
     CiscoTpTcCeSSH Class
     Class to manage Cisco Telepresence Endpoint on TC/CE software release. Also working for Cisco
    @@ -131,16 +135,16 @@ 

    Classes

    class CiscoTpTcCeSSH -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -179,7 +183,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -224,12 +228,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -237,9 +241,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class CiscoTpTcCeSSH(CiscoSSHConnection):
         def __init__(self, *args: Any, **kwargs: Any) -> None:
             default_enter = kwargs.get("default_enter")
    @@ -325,50 +331,58 @@ 

    Ancestors

    Methods

    -def disable_paging(self, *args, **kwargs) +def disable_paging(self, *args: Any, **kwargs: Any) ‑> str
    -

    Paging is disabled by default.

    +

    Paging is disabled by default.

    -Source code + +Expand source code +
    def disable_paging(self, *args: Any, **kwargs: Any) -> str:
         """Paging is disabled by default."""
         return ""
    -def find_prompt(self, *args, **kwargs) +def find_prompt(self, *args: Any, **kwargs: Any) ‑> str
    -

    Use 'OK' as standard prompt.

    +

    Use 'OK' as standard prompt.

    -Source code + +Expand source code +
    def find_prompt(self, *args: Any, **kwargs: Any) -> str:
         """Use 'OK' as standard prompt."""
         return "OK"
    -def save_config(self, *args, **kwargs) +def save_config(self, *args: Any, **kwargs: Any) ‑> str
    -

    Not Implemented

    +

    Not Implemented

    -Source code + +Expand source code +
    def save_config(self, *args: Any, **kwargs: Any) -> str:
         """Not Implemented"""
         raise NotImplementedError
    -def send_command(self, *args, **kwargs) +def send_command(self, *args: Any, **kwargs: Any) ‑> Union[str, List[Any], Dict[str, Any]]
    -

    Send command to network device retrieve output until router_prompt or expect_string

    +

    Send command to network device retrieve output until router_prompt or expect_string

    By default this method will keep waiting to receive data until the network device prompt is -detected. The current network device prompt will be determined automatically.

    +detected. The current network device prompt will be determined automatically.

    -Source code + +Expand source code +
    def send_command(
         self, *args: Any, **kwargs: Any
     ) -> Union[str, List[Any], Dict[str, Any]]:
    @@ -392,18 +406,20 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established

    +

    Prepare the session after the connection has been established

    This method handles some of vagaries that occur between various devices early on in the session.

    In general, it should include: self.set_base_prompt() self.disable_paging() -self.set_terminal_width()

    +self.set_terminal_width()

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """
         Prepare the session after the connection has been established
    @@ -428,12 +444,14 @@ 

    Methods

    -def set_base_prompt(self, *args, **kwargs) +def set_base_prompt(self, *args: Any, **kwargs: Any) ‑> str
    -

    Use 'OK' as base_prompt.

    +

    Use 'OK' as base_prompt.

    -Source code + +Expand source code +
    def set_base_prompt(self, *args: Any, **kwargs: Any) -> str:
         """Use 'OK' as base_prompt."""
         self.base_prompt = "OK"
    @@ -441,12 +459,14 @@ 

    Methods

    -def strip_prompt(self, a_string) +def strip_prompt(self, a_string: str) ‑> str
    -

    Strip the trailing router prompt from the output.

    +

    Strip the trailing router prompt from the output.

    -Source code + +Expand source code +
    def strip_prompt(self, a_string: str) -> str:
         """Strip the trailing router prompt from the output."""
         expect_string = r"^(OK|ERROR|Command not recognized\.)$"
    @@ -535,9 +555,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/cisco/cisco_viptela.html b/docs/netmiko/cisco/cisco_viptela.html index 49afd7fa4..19ee321b9 100644 --- a/docs/netmiko/cisco/cisco_viptela.html +++ b/docs/netmiko/cisco/cisco_viptela.html @@ -3,15 +3,17 @@ - + netmiko.cisco.cisco_viptela API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.cisco.cisco_viptela

    Subclass specific to Cisco Viptela.

    -Source code + +Expand source code +
    """Subclass specific to Cisco Viptela."""
     from typing import Union, Sequence, TextIO, Any
     import re
    @@ -39,7 +43,9 @@ 

    Module netmiko.cisco.cisco_viptela

    self.set_base_prompt() self.disable_paging(command="paginate false") - def check_config_mode(self, check_string: str = ")#", pattern: str = "#") -> bool: + 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.""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -116,16 +122,16 @@

    Classes

    class CiscoViptelaSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Subclass specific to Cisco Viptela.

    +

    Subclass specific to Cisco Viptela.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -164,7 +170,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -209,12 +215,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -222,9 +228,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class CiscoViptelaSSH(CiscoSSHConnection):
         """Subclass specific to Cisco Viptela."""
     
    @@ -234,7 +242,9 @@ 

    Classes

    self.set_base_prompt() self.disable_paging(command="paginate false") - def check_config_mode(self, check_string: str = ")#", pattern: str = "#") -> bool: + 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.""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -308,26 +318,32 @@

    Ancestors

    Methods

    -def check_config_mode(self, check_string=')#', pattern='#') +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.

    +

    Checks if the device is in configuration mode or not.

    -Source code -
    def check_config_mode(self, check_string: str = ")#", pattern: str = "#") -> bool:
    +
    +Expand source code
    +
    +
    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."""
         return super().check_config_mode(check_string=check_string, pattern=pattern)
    -def exit_config_mode(self, exit_config='end', pattern='#') +def exit_config_mode(self, exit_config: str = 'end', pattern: str = '#') ‑> str
    -

    Exit from configuration mode.

    +

    Exit from configuration mode.

    Viptela might have the following in the output (if no 'commit()' occurred.

    -

    Uncommitted changes found, commit them? [yes/no/CANCEL]

    +

    Uncommitted changes found, commit them? [yes/no/CANCEL]

    -Source code + +Expand source code +
    def exit_config_mode(self, exit_config: str = "end", pattern: str = r"#") -> str:
         """
         Exit from configuration mode.
    @@ -359,12 +375,14 @@ 

    Methods

    -def save_config(self, cmd='commit', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'commit', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Saves Config

    +

    Saves Config

    -Source code + +Expand source code +
    def save_config(
         self, cmd: str = "commit", confirm: bool = False, confirm_response: str = ""
     ) -> str:
    @@ -373,12 +391,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read(pattern=r"[>#]")
    @@ -463,9 +483,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/cisco/cisco_wlc_ssh.html b/docs/netmiko/cisco/cisco_wlc_ssh.html index 6aeb6e6c0..9095c3788 100644 --- a/docs/netmiko/cisco/cisco_wlc_ssh.html +++ b/docs/netmiko/cisco/cisco_wlc_ssh.html @@ -3,15 +3,17 @@ - + netmiko.cisco.cisco_wlc_ssh API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.cisco.cisco_wlc_ssh

    Netmiko Cisco WLC support.

    -Source code + +Expand source code +
    """Netmiko Cisco WLC support."""
     from typing import Any, Union, Sequence, TextIO
     import time
    @@ -223,7 +227,7 @@ 

    Module netmiko.cisco.cisco_wlc_ssh

    count += 1 def check_config_mode( - self, check_string: str = "config", pattern: str = "" + self, check_string: str = "config", pattern: str = "", force_regex: bool = False ) -> bool: """Checks if the device is in configuration mode or not.""" if not pattern: @@ -288,16 +292,16 @@

    Classes

    class CiscoWlcSSH -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Netmiko Cisco WLC support.

    +

    Netmiko Cisco WLC support.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -336,7 +340,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -381,12 +385,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -394,9 +398,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class CiscoWlcSSH(BaseConnection):
         """Netmiko Cisco WLC support."""
     
    @@ -587,7 +593,7 @@ 

    Classes

    count += 1 def check_config_mode( - self, check_string: str = "config", pattern: str = "" + self, check_string: str = "config", pattern: str = "", force_regex: bool = False ) -> bool: """Checks if the device is in configuration mode or not.""" if not pattern: @@ -647,14 +653,16 @@

    Ancestors

    Methods

    -def check_config_mode(self, check_string='config', pattern='') +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.

    +

    Checks if the device is in configuration mode or not.

    -Source code + +Expand source code +
    def check_config_mode(
    -    self, check_string: str = "config", pattern: str = ""
    +    self, check_string: str = "config", pattern: str = "", force_regex: bool = False
     ) -> bool:
         """Checks if the device is in configuration mode or not."""
         if not pattern:
    @@ -663,12 +671,14 @@ 

    Methods

    -def cleanup(self, command='logout') +def cleanup(self, command: str = 'logout') ‑> None
    -

    Reset WLC back to normal paging and gracefully close session.

    +

    Reset WLC back to normal paging and gracefully close session.

    -Source code + +Expand source code +
    def cleanup(self, command: str = "logout") -> None:
         """Reset WLC back to normal paging and gracefully close session."""
         self.send_command_timing("config paging enable")
    @@ -707,12 +717,14 @@ 

    Methods

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

    Enter into config_mode.

    +

    Enter into config_mode.

    -Source code + +Expand source code +
    def config_mode(
         self, config_command: str = "config", pattern: str = "", re_flags: int = 0
     ) -> str:
    @@ -723,24 +735,28 @@ 

    Methods

    -def exit_config_mode(self, exit_config='exit', pattern='') +def exit_config_mode(self, exit_config: str = 'exit', pattern: str = '') ‑> str
    -

    Exit config_mode.

    +

    Exit config_mode.

    -Source code + +Expand source code +
    def exit_config_mode(self, exit_config: str = "exit", pattern: str = "") -> str:
         """Exit config_mode."""
         return super().exit_config_mode(exit_config, pattern)
    -def save_config(self, cmd='save config', confirm=True, confirm_response='y') +def save_config(self, cmd: str = 'save config', confirm: bool = True, confirm_response: str = 'y') ‑> str
    -

    Saves Config.

    +

    Saves Config.

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "save config",
    @@ -763,16 +779,18 @@ 

    Methods

    -def send_command_w_enter(self, *args, **kwargs) +def send_command_w_enter(self, *args: Any, **kwargs: Any) ‑> str
    -

    For 'show run-config' Cisco WLC adds a 'Press Enter to continue…' message +

    For 'show run-config' Cisco WLC adds a 'Press Enter to continue…' message Even though pagination is disabled.

    show run-config also has excessive delays in the output which requires special handling.

    -

    Arguments are the same as send_command_timing() method.

    +

    Arguments are the same as send_command_timing() method.

    -Source code + +Expand source code +
    def send_command_w_enter(self, *args: Any, **kwargs: Any) -> str:
         """
         For 'show run-config' Cisco WLC adds a 'Press Enter to continue...' message
    @@ -830,13 +848,15 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established

    -

    Cisco WLC uses "config paging disable" to disable paging

    +

    Prepare the session after the connection has been established

    +

    Cisco WLC uses "config paging disable" to disable paging

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """
         Prepare the session after the connection has been established
    @@ -855,16 +875,18 @@ 

    Methods

    -def special_login_handler(self, delay_factor=1.0) +def special_login_handler(self, delay_factor: float = 1.0) ‑> None
    -

    WLC presents with the following on login (in certain OS versions)

    +

    WLC presents with the following on login (in certain OS versions)

    login as: user

    (Cisco Controller)

    User: user

    -

    Password:****

    +

    Password:****

    -Source code + +Expand source code +
    def special_login_handler(self, delay_factor: float = 1.0) -> None:
         """WLC presents with the following on login (in certain OS versions)
     
    @@ -975,9 +997,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/cisco/cisco_xr.html b/docs/netmiko/cisco/cisco_xr.html index e59c9a1c5..a98088050 100644 --- a/docs/netmiko/cisco/cisco_xr.html +++ b/docs/netmiko/cisco/cisco_xr.html @@ -3,15 +3,17 @@ - + netmiko.cisco.cisco_xr API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.cisco.cisco_xr

    -Source code + +Expand source code +
    from typing import Optional, Any, Union, Sequence, TextIO
     import re
     import warnings
    @@ -184,7 +188,10 @@ 

    Module netmiko.cisco.cisco_xr

    return output def check_config_mode( - self, check_string: str = ")#", pattern: str = r"[#\$]" + self, + check_string: str = ")#", + pattern: str = r"[#\$]", + force_regex: bool = False, ) -> bool: """Checks if the device is in configuration mode or not. @@ -292,16 +299,16 @@

    Classes

    class CiscoXrBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -340,7 +347,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -385,12 +392,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -398,9 +405,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class CiscoXrBase(CiscoBaseConnection):
         def establish_connection(self, width: int = 511, height: int = 511) -> None:
             """Establish SSH connection to the network device"""
    @@ -556,7 +565,10 @@ 

    Classes

    return output def check_config_mode( - self, check_string: str = ")#", pattern: str = r"[#\$]" + self, + check_string: str = ")#", + pattern: str = r"[#\$]", + force_regex: bool = False, ) -> bool: """Checks if the device is in configuration mode or not. @@ -609,16 +621,21 @@

    Subclasses

    Methods

    -def check_config_mode(self, check_string=')#', pattern='[#\\$]') +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.

    +

    Checks if the device is in configuration mode or not.

    IOS-XR, unfortunately, does this: -RP/0/RSP0/CPU0:BNG(admin)#

    +RP/0/RSP0/CPU0:BNG(admin)#

    -Source code + +Expand source code +
    def check_config_mode(
    -    self, check_string: str = ")#", pattern: str = r"[#\$]"
    +    self,
    +    check_string: str = ")#",
    +    pattern: str = r"[#\$]",
    +    force_regex: bool = False,
     ) -> bool:
         """Checks if the device is in configuration mode or not.
     
    @@ -634,10 +651,10 @@ 

    Methods

    -def commit(self, confirm=False, confirm_delay=None, comment='', label='', read_timeout=120.0, delay_factor=None) +def commit(self, confirm: bool = False, confirm_delay: Optional[int] = None, comment: str = '', label: str = '', read_timeout: float = 120.0, delay_factor: Optional[float] = None) ‑> str
    -

    Commit the candidate configuration.

    +

    Commit the candidate configuration.

    default (no options): command_string = commit confirm and confirm_delay: @@ -662,9 +679,11 @@

    Methods

    started or since the last commit was made from this session. You can use the 'show configuration commit changes' command to browse the changes.

    Exit of configuration mode with pending changes will cause the changes to be discarded and -an exception to be generated.

    +an exception to be generated.

    -Source code + +Expand source code +
    def commit(
         self,
         confirm: bool = False,
    @@ -774,24 +793,28 @@ 

    Methods

    -def establish_connection(self, width=511, height=511) +def establish_connection(self, width: int = 511, height: int = 511) ‑> None
    -

    Establish SSH connection to the network device

    +

    Establish SSH connection to the network device

    -Source code + +Expand source code +
    def establish_connection(self, width: int = 511, height: int = 511) -> None:
         """Establish SSH connection to the network device"""
         super().establish_connection(width=width, height=height)
    -def exit_config_mode(self, exit_config='end', pattern='') +def exit_config_mode(self, exit_config: str = 'end', pattern: str = '') ‑> str
    -

    Exit configuration mode.

    +

    Exit configuration mode.

    -Source code + +Expand source code +
    def exit_config_mode(self, exit_config: str = "end", pattern: str = "") -> str:
         """Exit configuration mode."""
         output = ""
    @@ -816,24 +839,28 @@ 

    Methods

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

    Not Implemented (use commit() method)

    +

    Not Implemented (use commit() method)

    -Source code + +Expand source code +
    def save_config(self, *args: Any, **kwargs: Any) -> str:
         """Not Implemented (use commit() method)"""
         raise NotImplementedError
    -def send_config_set(self, config_commands=None, exit_config_mode=False, **kwargs) +def send_config_set(self, config_commands: Union[str, Sequence[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, **kwargs: Any) ‑> str
    -

    IOS-XR requires you not exit from configuration mode.

    +

    IOS-XR requires you not exit from configuration mode.

    -Source code + +Expand source code +
    def send_config_set(
         self,
         config_commands: Union[str, Sequence[str], TextIO, None] = None,
    @@ -847,12 +874,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         # IOS-XR has an issue where it echoes the command even though it hasn't returned the prompt
    @@ -865,13 +894,15 @@ 

    Methods

    -def set_base_prompt(self, pri_prompt_terminator='#', alt_prompt_terminator='>', delay_factor=1.0, pattern=None) +def set_base_prompt(self, pri_prompt_terminator: str = '#', alt_prompt_terminator: str = '>', delay_factor: float = 1.0, pattern: Optional[str] = None) ‑> str
    -

    Cisco IOS-XR abbreviates the prompt at 31-chars in config mode.

    -

    Consequently, abbreviate the base_prompt

    +

    Cisco IOS-XR abbreviates the prompt at 31-chars in config mode.

    +

    Consequently, abbreviate the base_prompt

    -Source code + +Expand source code +
    def set_base_prompt(
         self,
         pri_prompt_terminator: str = "#",
    @@ -938,12 +969,14 @@ 

    Inherited members

    class CiscoXrFileTransfer -(ssh_conn, source_file, dest_file, file_system=None, direction='put', socket_timeout=10.0, progress=None, progress4=None, hash_supported=True) +(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: Optional[str] = None, direction: str = 'put', socket_timeout: float = 10.0, progress: Optional[Callable[..., Any]] = None, progress4: Optional[Callable[..., Any]] = None, hash_supported: bool = True)
    -

    Cisco IOS-XR SCP File Transfer driver.

    +

    Cisco IOS-XR SCP File Transfer driver.

    -Source code + +Expand source code +
    class CiscoXrFileTransfer(CiscoFileTransfer):
         """Cisco IOS-XR SCP File Transfer driver."""
     
    @@ -995,16 +1028,18 @@ 

    Ancestors

    Static methods

    -def process_md5(md5_output, pattern='^([a-fA-F0-9]+)$') +def process_md5(md5_output: str, pattern: str = '^([a-fA-F0-9]+)$') ‑> str
    -

    IOS-XR defaults with timestamps enabled

    +

    IOS-XR defaults with timestamps enabled

    show md5 file /bootflash:/boot/grub/grub.cfg

    Sat Mar 3 17:49:03.596 UTC -c84843f0030efd44b01343fdb8c2e801

    +c84843f0030efd44b01343fdb8c2e801

    -Source code + +Expand source code +
    @staticmethod
     def process_md5(md5_output: str, pattern: str = r"^([a-fA-F0-9]+)$") -> str:
         """
    @@ -1025,13 +1060,15 @@ 

    show md5 file /bootflash:/boot/g

    Methods

    -def remote_md5(self, base_cmd='show md5 file', remote_file=None) +def remote_md5(self, base_cmd: str = 'show md5 file', remote_file: Optional[str] = None) ‑> str
    -

    IOS-XR for MD5 requires this extra leading /

    -

    show md5 file /bootflash:/boot/grub/grub.cfg

    +

    IOS-XR for MD5 requires this extra leading /

    +

    show md5 file /bootflash:/boot/grub/grub.cfg

    -Source code + +Expand source code +
    def remote_md5(
         self, base_cmd: str = "show md5 file", remote_file: Optional[str] = None
     ) -> str:
    @@ -1078,16 +1115,16 @@ 

    Inherited members

    class CiscoXrSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Cisco XR SSH driver.

    +

    Cisco XR SSH driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -1126,7 +1163,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -1171,12 +1208,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -1184,9 +1221,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class CiscoXrSSH(CiscoXrBase):
         """Cisco XR SSH driver."""
     
    @@ -1249,16 +1288,16 @@ 

    Inherited members

    class CiscoXrTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Cisco XR Telnet driver.

    +

    Cisco XR Telnet driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -1297,7 +1336,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -1342,12 +1381,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -1355,9 +1394,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class CiscoXrTelnet(CiscoXrBase):
         """Cisco XR Telnet driver."""
     
    @@ -1466,9 +1507,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/cisco/index.html b/docs/netmiko/cisco/index.html index c1a3f6040..94741eea2 100644 --- a/docs/netmiko/cisco/index.html +++ b/docs/netmiko/cisco/index.html @@ -3,15 +3,17 @@ - + netmiko.cisco API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.cisco

    -Source code + +Expand source code +
    from netmiko.cisco.cisco_ios import (
         CiscoIosBase,
         CiscoIosSSH,
    @@ -68,41 +72,41 @@ 

    Sub-modules

    netmiko.cisco.cisco_asa_ssh
    -

    Subclass specific to Cisco ASA.

    +

    Subclass specific to Cisco ASA.

    netmiko.cisco.cisco_ftd_ssh
    -

    Subclass specific to Cisco FTD.

    +

    Subclass specific to Cisco FTD.

    netmiko.cisco.cisco_ios
    -
    +
    netmiko.cisco.cisco_nxos_ssh
    -
    +
    netmiko.cisco.cisco_s300
    -
    +
    netmiko.cisco.cisco_tp_tcce
    -

    CiscoTpTcCeSSH Class +

    CiscoTpTcCeSSH Class Class to manage Cisco Telepresence Endpoint on TC/CE software release. Also working for Cisco -Expressway/VCS …

    +Expressway/VCS …

    netmiko.cisco.cisco_viptela
    -

    Subclass specific to Cisco Viptela.

    +

    Subclass specific to Cisco Viptela.

    netmiko.cisco.cisco_wlc_ssh
    -

    Netmiko Cisco WLC support.

    +

    Netmiko Cisco WLC support.

    netmiko.cisco.cisco_xr
    -
    +
    @@ -115,12 +119,14 @@

    Classes

    class CiscoAsaFileTransfer -(ssh_conn, source_file, dest_file, file_system=None, direction='put', socket_timeout=10.0, progress=None, progress4=None, hash_supported=True) +(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: Optional[str] = None, direction: str = 'put', socket_timeout: float = 10.0, progress: Optional[Callable[..., Any]] = None, progress4: Optional[Callable[..., Any]] = None, hash_supported: bool = True)
    -

    Cisco ASA SCP File Transfer driver.

    +

    Cisco ASA SCP File Transfer driver.

    -Source code + +Expand source code +
    class CiscoAsaFileTransfer(CiscoFileTransfer):
         """Cisco ASA SCP File Transfer driver."""
     
    @@ -158,16 +164,16 @@ 

    Inherited members

    class CiscoAsaSSH -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Subclass specific to Cisco ASA.

    +

    Subclass specific to Cisco ASA.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -206,7 +212,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -251,12 +257,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -264,9 +270,11 @@

    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). -
    +

    -Source code + +Expand source code +
    class CiscoAsaSSH(CiscoSSHConnection):
         """Subclass specific to Cisco ASA."""
     
    @@ -303,7 +311,10 @@ 

    Inherited members

    self.set_base_prompt() def check_config_mode( - self, check_string: str = ")#", pattern: str = r"[>\#]" + self, + check_string: str = ")#", + pattern: str = r"[>\#]", + force_regex: bool = False, ) -> bool: return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -436,16 +447,18 @@

    Ancestors

    Methods

    -def asa_login(self) +def asa_login(self) ‑> None
    -

    Handle ASA reaching privilege level 15 using login

    +

    Handle ASA reaching privilege level 15 using login

    twb-dc-fw1> login Username: admin

    Raises NetmikoAuthenticationException, if we do not reach privilege -level 15 after 10 loops.

    +level 15 after 10 loops.

    -Source code + +Expand source code +
    def asa_login(self) -> None:
         """
         Handle ASA reaching privilege level 15 using login
    @@ -482,12 +495,14 @@ 

    Methods

    -def normalize_linefeeds(self, a_string) +def normalize_linefeeds(self, a_string: str) ‑> str
    -

    Cisco ASA needed that extra

    +

    Cisco ASA needed that extra

    -Source code + +Expand source code +
    def normalize_linefeeds(self, a_string: str) -> str:
         """Cisco ASA needed that extra \r\n\r"""
         newline = re.compile("(\r\n\r|\r\r\r\n|\r\r\n|\r\n|\n\r)")
    @@ -500,12 +515,14 @@ 

    Methods

    -def save_config(self, cmd='write mem', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'write mem', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Saves Config

    +

    Saves Config

    -Source code + +Expand source code +
    def save_config(
         self, cmd: str = "write mem", confirm: bool = False, confirm_response: str = ""
     ) -> str:
    @@ -516,13 +533,15 @@ 

    Methods

    -def send_command(self, *args, **kwargs) +def send_command(self, *args: Any, **kwargs: Any) ‑> Union[str, List[Any], Dict[str, Any]]
    -

    If the ASA is in multi-context mode, then the base_prompt needs to be -updated after each context change.

    +

    If the ASA is in multi-context mode, then the base_prompt needs to be +updated after each context change.

    -Source code + +Expand source code +
    def send_command(
         self, *args: Any, **kwargs: Any
     ) -> Union[str, List[Any], Dict[str, Any]]:
    @@ -549,13 +568,15 @@ 

    Methods

    -def send_command_timing(self, *args, **kwargs) +def send_command_timing(self, *args: Any, **kwargs: Any) ‑> Union[str, List[Any], Dict[str, Any]]
    -

    If the ASA is in multi-context mode, then the base_prompt needs to be -updated after each context change.

    +

    If the ASA is in multi-context mode, then the base_prompt needs to be +updated after each context change.

    -Source code + +Expand source code +
    def send_command_timing(
         self, *args: Any, **kwargs: Any
     ) -> Union[str, List[Any], Dict[str, Any]]:
    @@ -574,12 +595,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
     
    @@ -610,15 +633,17 @@ 

    Methods

    -def set_base_prompt(self, *args, **kwargs) +def set_base_prompt(self, *args: Any, **kwargs: Any) ‑> str
    -

    Cisco ASA in multi-context mode needs to have the base prompt updated +

    Cisco ASA in multi-context mode needs to have the base prompt updated (if you switch contexts i.e. 'changeto')

    This switch of ASA contexts can occur in configuration mode. If this -happens the trailing '(config*' needs stripped off.

    +happens the trailing '(config*' needs stripped off.

    -Source code + +Expand source code +
    def set_base_prompt(self, *args: Any, **kwargs: Any) -> str:
         """
         Cisco ASA in multi-context mode needs to have the base prompt updated
    @@ -683,16 +708,16 @@ 

    Inherited members

    class CiscoFtdSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Subclass specific to Cisco FTD.

    +

    Subclass specific to Cisco FTD.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -731,7 +756,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -776,12 +801,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -789,9 +814,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class CiscoFtdSSH(NoEnable, NoConfig, CiscoSSHConnection):
         """Subclass specific to Cisco FTD."""
     
    @@ -804,7 +831,9 @@ 

    Inherited members

    """Canot change config on FTD via ssh""" raise NotImplementedError - def check_config_mode(self, check_string: str = "", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "", pattern: str = "", force_regex: bool = False + ) -> bool: """Canot change config on FTD via ssh""" return False
    @@ -819,36 +848,44 @@

    Ancestors

    Methods

    -def check_config_mode(self, check_string='', pattern='') +def check_config_mode(self, check_string: str = '', pattern: str = '', force_regex: bool = False) ‑> bool
    -

    Canot change config on FTD via ssh

    +

    Canot change config on FTD via ssh

    -Source code -
    def check_config_mode(self, check_string: str = "", pattern: str = "") -> bool:
    +
    +Expand source code
    +
    +
    def check_config_mode(
    +    self, check_string: str = "", pattern: str = "", force_regex: bool = False
    +) -> bool:
         """Canot change config on FTD via ssh"""
         return False
    -def send_config_set(self, *args, **kwargs) +def send_config_set(self, *args: Any, **kwargs: Any) ‑> str
    -

    Canot change config on FTD via ssh

    +

    Canot change config on FTD via ssh

    -Source code + +Expand source code +
    def send_config_set(self, *args: Any, **kwargs: Any) -> str:
         """Canot change config on FTD via ssh"""
         raise NotImplementedError
    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read(pattern=r"[>#]")
    @@ -904,16 +941,16 @@ 

    Inherited members

    class CiscoIosBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Common Methods for IOS (both SSH and telnet).

    +

    Common Methods for IOS (both SSH and telnet).

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -952,7 +989,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -997,12 +1034,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -1010,9 +1047,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class CiscoIosBase(CiscoBaseConnection):
         """Common Methods for IOS (both SSH and telnet)."""
     
    @@ -1045,7 +1084,10 @@ 

    Inherited members

    return self.base_prompt def check_config_mode( - self, check_string: str = ")#", pattern: str = r"[>#]" + self, + check_string: str = ")#", + pattern: str = r"[>#]", + force_regex: bool = False, ) -> bool: """ Checks if the device is in configuration mode or not. @@ -1070,20 +1112,22 @@

    Ancestors

    Subclasses

    Methods

    -def save_config(self, cmd='write mem', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'write mem', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Saves Config Using Copy Run Start

    +

    Saves Config Using Copy Run Start

    -Source code + +Expand source code +
    def save_config(
         self, cmd: str = "write mem", confirm: bool = False, confirm_response: str = ""
     ) -> str:
    @@ -1094,12 +1138,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         cmd = "terminal width 511"
    @@ -1109,13 +1155,15 @@ 

    Methods

    -def set_base_prompt(self, pri_prompt_terminator='#', alt_prompt_terminator='>', delay_factor=1.0, pattern=None) +def set_base_prompt(self, pri_prompt_terminator: str = '#', alt_prompt_terminator: str = '>', delay_factor: float = 1.0, pattern: Optional[str] = None) ‑> str
    -

    Cisco IOS/IOS-XE abbreviates the prompt at 20-chars in config mode.

    -

    Consequently, abbreviate the base_prompt

    +

    Cisco IOS/IOS-XE abbreviates the prompt at 20-chars in config mode.

    +

    Consequently, abbreviate the base_prompt

    -Source code + +Expand source code +
    def set_base_prompt(
         self,
         pri_prompt_terminator: str = "#",
    @@ -1187,12 +1235,14 @@ 

    Inherited members

    class CiscoIosFileTransfer -(ssh_conn, source_file, dest_file, file_system=None, direction='put', socket_timeout=10.0, progress=None, progress4=None, hash_supported=True) +(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: Optional[str] = None, direction: str = 'put', socket_timeout: float = 10.0, progress: Optional[Callable[..., Any]] = None, progress4: Optional[Callable[..., Any]] = None, hash_supported: bool = True)
    -

    Cisco IOS SCP File Transfer driver.

    +

    Cisco IOS SCP File Transfer driver.

    -Source code + +Expand source code +
    class CiscoIosFileTransfer(CiscoFileTransfer):
         """Cisco IOS SCP File Transfer driver."""
     
    @@ -1234,16 +1284,16 @@ 

    Inherited members

    class CiscoIosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Cisco IOS SSH driver.

    +

    Cisco IOS SSH driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -1282,7 +1332,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -1327,12 +1377,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -1340,9 +1390,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class CiscoIosSSH(CiscoIosBase):
         """Cisco IOS SSH driver."""
     
    @@ -1405,16 +1457,16 @@ 

    Inherited members

    class CiscoIosSerial -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Cisco IOS Serial driver.

    +

    Cisco IOS Serial driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -1453,7 +1505,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -1498,12 +1550,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -1511,9 +1563,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class CiscoIosSerial(CiscoIosBase):
         """Cisco IOS Serial driver."""
     
    @@ -1576,16 +1630,16 @@ 

    Inherited members

    class CiscoIosTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Cisco IOS Telnet driver.

    +

    Cisco IOS Telnet driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -1624,7 +1678,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -1669,12 +1723,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -1682,9 +1736,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class CiscoIosTelnet(CiscoIosBase):
         """Cisco IOS Telnet driver."""
     
    @@ -1747,12 +1803,14 @@ 

    Inherited members

    class CiscoNxosFileTransfer -(ssh_conn, source_file, dest_file, file_system='bootflash:', direction='put', socket_timeout=10.0, progress=None, progress4=None, hash_supported=True) +(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: str = 'bootflash:', direction: str = 'put', socket_timeout: float = 10.0, progress: Optional[Callable[..., Any]] = None, progress4: Optional[Callable[..., Any]] = None, hash_supported: bool = True)
    -

    Cisco NXOS SCP File Transfer driver.

    +

    Cisco NXOS SCP File Transfer driver.

    -Source code + +Expand source code +
    class CiscoNxosFileTransfer(CiscoFileTransfer):
         """Cisco NXOS SCP File Transfer driver."""
     
    @@ -1873,12 +1931,14 @@ 

    Ancestors

    Static methods

    -def process_md5(md5_output, pattern='= (.*)') +def process_md5(md5_output: str, pattern: str = '= (.*)') ‑> str
    -

    Not needed on NX-OS.

    +

    Not needed on NX-OS.

    -Source code + +Expand source code +
    @staticmethod
     def process_md5(md5_output: str, pattern: str = r"= (.*)") -> str:
         """Not needed on NX-OS."""
    @@ -1912,16 +1972,16 @@ 

    Inherited members

    class CiscoNxosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -1960,7 +2020,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -2005,12 +2065,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -2018,9 +2078,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class CiscoNxosSSH(CiscoSSHConnection):
         def session_preparation(self) -> None:
             """Prepare the session after the connection has been established."""
    @@ -2040,7 +2102,10 @@ 

    Inherited members

    return newline.sub(self.RESPONSE_RETURN, a_string).replace("\r", "\n") def check_config_mode( - self, check_string: str = ")#", pattern: str = r"[>#]" + 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) @@ -2086,30 +2151,37 @@

    Ancestors

    Methods

    -def check_config_mode(self, check_string=')#', pattern='[>#]') +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.

    +

    Checks if the device is in configuration mode or not.

    -Source code + +Expand source code +
    def check_config_mode(
    -    self, check_string: str = ")#", pattern: str = r"[>#]"
    +    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)
    -def normalize_linefeeds(self, a_string) +def normalize_linefeeds(self, a_string: str) ‑> str
    -

    Convert ' +

    Convert ' ' or '

    ' to ' , and remove extra ' -'s in the text.

    +'s in the text.

    -Source code + +Expand source code +
    def normalize_linefeeds(self, a_string: str) -> str:
         """Convert '\r\n' or '\r\r\n' to '\n, and remove extra '\r's in the text."""
         newline = re.compile(r"(\r\r\n\r|\r\r\n|\r\n)")
    @@ -2118,12 +2190,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self.ansi_escape_codes = True
    @@ -2185,19 +2259,19 @@ 

    Inherited members

    class CiscoS300SSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Support for Cisco SG300 series of devices.

    +

    Support for Cisco SG300 series of devices.

    Note, must configure the following to disable SG300 from prompting for username twice:

    configure terminal ip ssh password-auth

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -2236,7 +2310,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -2281,12 +2355,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -2294,9 +2368,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class CiscoS300SSH(CiscoS300Base):
         pass
    @@ -2358,17 +2434,17 @@

    Inherited members

    class CiscoS300Telnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Support for Cisco SG300 series of devices, with telnet. +

    Support for Cisco SG300 series of devices, with telnet. Note: can be used with Sx200 series, with telnet enabled.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -2407,7 +2483,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -2452,12 +2528,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -2465,9 +2541,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class CiscoS300Telnet(CiscoS300Base):
         """
         Support for Cisco SG300 series of devices, with telnet.
    @@ -2534,16 +2612,16 @@ 

    Inherited members

    class CiscoTpTcCeSSH -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -2582,7 +2660,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -2627,12 +2705,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -2640,9 +2718,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class CiscoTpTcCeSSH(CiscoSSHConnection):
         def __init__(self, *args: Any, **kwargs: Any) -> None:
             default_enter = kwargs.get("default_enter")
    @@ -2728,50 +2808,58 @@ 

    Ancestors

    Methods

    -def disable_paging(self, *args, **kwargs) +def disable_paging(self, *args: Any, **kwargs: Any) ‑> str
    -

    Paging is disabled by default.

    +

    Paging is disabled by default.

    -Source code + +Expand source code +
    def disable_paging(self, *args: Any, **kwargs: Any) -> str:
         """Paging is disabled by default."""
         return ""
    -def find_prompt(self, *args, **kwargs) +def find_prompt(self, *args: Any, **kwargs: Any) ‑> str
    -

    Use 'OK' as standard prompt.

    +

    Use 'OK' as standard prompt.

    -Source code + +Expand source code +
    def find_prompt(self, *args: Any, **kwargs: Any) -> str:
         """Use 'OK' as standard prompt."""
         return "OK"
    -def save_config(self, *args, **kwargs) +def save_config(self, *args: Any, **kwargs: Any) ‑> str
    -

    Not Implemented

    +

    Not Implemented

    -Source code + +Expand source code +
    def save_config(self, *args: Any, **kwargs: Any) -> str:
         """Not Implemented"""
         raise NotImplementedError
    -def send_command(self, *args, **kwargs) +def send_command(self, *args: Any, **kwargs: Any) ‑> Union[str, List[Any], Dict[str, Any]]
    -

    Send command to network device retrieve output until router_prompt or expect_string

    +

    Send command to network device retrieve output until router_prompt or expect_string

    By default this method will keep waiting to receive data until the network device prompt is -detected. The current network device prompt will be determined automatically.

    +detected. The current network device prompt will be determined automatically.

    -Source code + +Expand source code +
    def send_command(
         self, *args: Any, **kwargs: Any
     ) -> Union[str, List[Any], Dict[str, Any]]:
    @@ -2795,18 +2883,20 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established

    +

    Prepare the session after the connection has been established

    This method handles some of vagaries that occur between various devices early on in the session.

    In general, it should include: self.set_base_prompt() self.disable_paging() -self.set_terminal_width()

    +self.set_terminal_width()

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """
         Prepare the session after the connection has been established
    @@ -2831,12 +2921,14 @@ 

    Methods

    -def set_base_prompt(self, *args, **kwargs) +def set_base_prompt(self, *args: Any, **kwargs: Any) ‑> str
    -

    Use 'OK' as base_prompt.

    +

    Use 'OK' as base_prompt.

    -Source code + +Expand source code +
    def set_base_prompt(self, *args: Any, **kwargs: Any) -> str:
         """Use 'OK' as base_prompt."""
         self.base_prompt = "OK"
    @@ -2844,12 +2936,14 @@ 

    Methods

    -def strip_prompt(self, a_string) +def strip_prompt(self, a_string: str) ‑> str
    -

    Strip the trailing router prompt from the output.

    +

    Strip the trailing router prompt from the output.

    -Source code + +Expand source code +
    def strip_prompt(self, a_string: str) -> str:
         """Strip the trailing router prompt from the output."""
         expect_string = r"^(OK|ERROR|Command not recognized\.)$"
    @@ -2906,16 +3000,16 @@ 

    Inherited members

    class CiscoViptelaSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Subclass specific to Cisco Viptela.

    +

    Subclass specific to Cisco Viptela.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -2954,7 +3048,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -2999,12 +3093,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -3012,9 +3106,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class CiscoViptelaSSH(CiscoSSHConnection):
         """Subclass specific to Cisco Viptela."""
     
    @@ -3024,7 +3120,9 @@ 

    Inherited members

    self.set_base_prompt() self.disable_paging(command="paginate false") - def check_config_mode(self, check_string: str = ")#", pattern: str = "#") -> bool: + 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.""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -3098,26 +3196,32 @@

    Ancestors

    Methods

    -def check_config_mode(self, check_string=')#', pattern='#') +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.

    +

    Checks if the device is in configuration mode or not.

    -Source code -
    def check_config_mode(self, check_string: str = ")#", pattern: str = "#") -> bool:
    +
    +Expand source code
    +
    +
    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."""
         return super().check_config_mode(check_string=check_string, pattern=pattern)
    -def exit_config_mode(self, exit_config='end', pattern='#') +def exit_config_mode(self, exit_config: str = 'end', pattern: str = '#') ‑> str
    -

    Exit from configuration mode.

    +

    Exit from configuration mode.

    Viptela might have the following in the output (if no 'commit()' occurred.

    -

    Uncommitted changes found, commit them? [yes/no/CANCEL]

    +

    Uncommitted changes found, commit them? [yes/no/CANCEL]

    -Source code + +Expand source code +
    def exit_config_mode(self, exit_config: str = "end", pattern: str = r"#") -> str:
         """
         Exit from configuration mode.
    @@ -3149,12 +3253,14 @@ 

    Methods

    -def save_config(self, cmd='commit', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'commit', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Saves Config

    +

    Saves Config

    -Source code + +Expand source code +
    def save_config(
         self, cmd: str = "commit", confirm: bool = False, confirm_response: str = ""
     ) -> str:
    @@ -3163,12 +3269,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read(pattern=r"[>#]")
    @@ -3224,16 +3332,16 @@ 

    Inherited members

    class CiscoWlcSSH -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Netmiko Cisco WLC support.

    +

    Netmiko Cisco WLC support.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -3272,7 +3380,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -3317,12 +3425,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -3330,9 +3438,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class CiscoWlcSSH(BaseConnection):
         """Netmiko Cisco WLC support."""
     
    @@ -3523,7 +3633,7 @@ 

    Inherited members

    count += 1 def check_config_mode( - self, check_string: str = "config", pattern: str = "" + self, check_string: str = "config", pattern: str = "", force_regex: bool = False ) -> bool: """Checks if the device is in configuration mode or not.""" if not pattern: @@ -3583,14 +3693,16 @@

    Ancestors

    Methods

    -def check_config_mode(self, check_string='config', pattern='') +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.

    +

    Checks if the device is in configuration mode or not.

    -Source code + +Expand source code +
    def check_config_mode(
    -    self, check_string: str = "config", pattern: str = ""
    +    self, check_string: str = "config", pattern: str = "", force_regex: bool = False
     ) -> bool:
         """Checks if the device is in configuration mode or not."""
         if not pattern:
    @@ -3599,12 +3711,14 @@ 

    Methods

    -def cleanup(self, command='logout') +def cleanup(self, command: str = 'logout') ‑> None
    -

    Reset WLC back to normal paging and gracefully close session.

    +

    Reset WLC back to normal paging and gracefully close session.

    -Source code + +Expand source code +
    def cleanup(self, command: str = "logout") -> None:
         """Reset WLC back to normal paging and gracefully close session."""
         self.send_command_timing("config paging enable")
    @@ -3643,12 +3757,14 @@ 

    Methods

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

    Enter into config_mode.

    +

    Enter into config_mode.

    -Source code + +Expand source code +
    def config_mode(
         self, config_command: str = "config", pattern: str = "", re_flags: int = 0
     ) -> str:
    @@ -3659,24 +3775,28 @@ 

    Methods

    -def exit_config_mode(self, exit_config='exit', pattern='') +def exit_config_mode(self, exit_config: str = 'exit', pattern: str = '') ‑> str
    -

    Exit config_mode.

    +

    Exit config_mode.

    -Source code + +Expand source code +
    def exit_config_mode(self, exit_config: str = "exit", pattern: str = "") -> str:
         """Exit config_mode."""
         return super().exit_config_mode(exit_config, pattern)
    -def save_config(self, cmd='save config', confirm=True, confirm_response='y') +def save_config(self, cmd: str = 'save config', confirm: bool = True, confirm_response: str = 'y') ‑> str
    -

    Saves Config.

    +

    Saves Config.

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "save config",
    @@ -3699,16 +3819,18 @@ 

    Methods

    -def send_command_w_enter(self, *args, **kwargs) +def send_command_w_enter(self, *args: Any, **kwargs: Any) ‑> str
    -

    For 'show run-config' Cisco WLC adds a 'Press Enter to continue…' message +

    For 'show run-config' Cisco WLC adds a 'Press Enter to continue…' message Even though pagination is disabled.

    show run-config also has excessive delays in the output which requires special handling.

    -

    Arguments are the same as send_command_timing() method.

    +

    Arguments are the same as send_command_timing() method.

    -Source code + +Expand source code +
    def send_command_w_enter(self, *args: Any, **kwargs: Any) -> str:
         """
         For 'show run-config' Cisco WLC adds a 'Press Enter to continue...' message
    @@ -3766,13 +3888,15 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established

    -

    Cisco WLC uses "config paging disable" to disable paging

    +

    Prepare the session after the connection has been established

    +

    Cisco WLC uses "config paging disable" to disable paging

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """
         Prepare the session after the connection has been established
    @@ -3791,16 +3915,18 @@ 

    Methods

    -def special_login_handler(self, delay_factor=1.0) +def special_login_handler(self, delay_factor: float = 1.0) ‑> None
    -

    WLC presents with the following on login (in certain OS versions)

    +

    WLC presents with the following on login (in certain OS versions)

    login as: user

    (Cisco Controller)

    User: user

    -

    Password:****

    +

    Password:****

    -Source code + +Expand source code +
    def special_login_handler(self, delay_factor: float = 1.0) -> None:
         """WLC presents with the following on login (in certain OS versions)
     
    @@ -3878,12 +4004,14 @@ 

    Inherited members

    class CiscoXrFileTransfer -(ssh_conn, source_file, dest_file, file_system=None, direction='put', socket_timeout=10.0, progress=None, progress4=None, hash_supported=True) +(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: Optional[str] = None, direction: str = 'put', socket_timeout: float = 10.0, progress: Optional[Callable[..., Any]] = None, progress4: Optional[Callable[..., Any]] = None, hash_supported: bool = True)
    -

    Cisco IOS-XR SCP File Transfer driver.

    +

    Cisco IOS-XR SCP File Transfer driver.

    -Source code + +Expand source code +
    class CiscoXrFileTransfer(CiscoFileTransfer):
         """Cisco IOS-XR SCP File Transfer driver."""
     
    @@ -3935,16 +4063,18 @@ 

    Ancestors

    Static methods

    -def process_md5(md5_output, pattern='^([a-fA-F0-9]+)$') +def process_md5(md5_output: str, pattern: str = '^([a-fA-F0-9]+)$') ‑> str
    -

    IOS-XR defaults with timestamps enabled

    +

    IOS-XR defaults with timestamps enabled

    show md5 file /bootflash:/boot/grub/grub.cfg

    Sat Mar 3 17:49:03.596 UTC -c84843f0030efd44b01343fdb8c2e801

    +c84843f0030efd44b01343fdb8c2e801

    -Source code + +Expand source code +
    @staticmethod
     def process_md5(md5_output: str, pattern: str = r"^([a-fA-F0-9]+)$") -> str:
         """
    @@ -3965,13 +4095,15 @@ 

    show md5 file /bootflash:/boot/g

    Methods

    -def remote_md5(self, base_cmd='show md5 file', remote_file=None) +def remote_md5(self, base_cmd: str = 'show md5 file', remote_file: Optional[str] = None) ‑> str
    -

    IOS-XR for MD5 requires this extra leading /

    -

    show md5 file /bootflash:/boot/grub/grub.cfg

    +

    IOS-XR for MD5 requires this extra leading /

    +

    show md5 file /bootflash:/boot/grub/grub.cfg

    -Source code + +Expand source code +
    def remote_md5(
         self, base_cmd: str = "show md5 file", remote_file: Optional[str] = None
     ) -> str:
    @@ -4018,16 +4150,16 @@ 

    Inherited members

    class CiscoXrSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Cisco XR SSH driver.

    +

    Cisco XR SSH driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -4066,7 +4198,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -4111,12 +4243,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -4124,9 +4256,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class CiscoXrSSH(CiscoXrBase):
         """Cisco XR SSH driver."""
     
    @@ -4189,16 +4323,16 @@ 

    Inherited members

    class CiscoXrTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Cisco XR Telnet driver.

    +

    Cisco XR Telnet driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -4237,7 +4371,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -4282,12 +4416,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -4295,9 +4429,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class CiscoXrTelnet(CiscoXrBase):
         """Cisco XR Telnet driver."""
     
    @@ -4360,12 +4496,14 @@ 

    Inherited members

    class InLineTransfer -(ssh_conn, source_file='', dest_file='', file_system=None, direction='put', source_config=None, socket_timeout=10.0, progress=None, progress4=None, hash_supported=True) +(ssh_conn: BaseConnection, source_file: str = '', dest_file: str = '', file_system: Optional[str] = None, direction: str = 'put', source_config: Optional[str] = None, socket_timeout: float = 10.0, progress: Optional[Callable[..., Any]] = None, progress4: Optional[Callable[..., Any]] = None, hash_supported: bool = True)
    -

    Use TCL on Cisco IOS to directly transfer file.

    +

    Use TCL on Cisco IOS to directly transfer file.

    -Source code + +Expand source code +
    class InLineTransfer(CiscoIosFileTransfer):
         """Use TCL on Cisco IOS to directly transfer file."""
     
    @@ -4578,12 +4716,14 @@ 

    Ancestors

    Methods

    -def config_md5(self, source_config) +def config_md5(self, source_config: str) ‑> str
    -

    Compute MD5 hash of text.

    +

    Compute MD5 hash of text.

    -Source code + +Expand source code +
    def config_md5(self, source_config: str) -> str:
         """Compute MD5 hash of text."""
         file_contents = source_config + "\n"  # Cisco IOS automatically adds this
    @@ -4592,12 +4732,14 @@ 

    Methods

    -def file_md5(self, file_name, add_newline=False) +def file_md5(self, file_name: str, add_newline: bool = False) ‑> str
    -

    Compute MD5 hash of file.

    +

    Compute MD5 hash of file.

    -Source code + +Expand source code +
    def file_md5(self, file_name: str, add_newline: bool = False) -> str:
         """Compute MD5 hash of file."""
         if add_newline is True:
    @@ -4787,9 +4929,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/cisco_base_connection.html b/docs/netmiko/cisco_base_connection.html index 01aa04af5..e8ed54bf5 100644 --- a/docs/netmiko/cisco_base_connection.html +++ b/docs/netmiko/cisco_base_connection.html @@ -3,15 +3,17 @@ - + netmiko.cisco_base_connection API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.cisco_base_connection

    CiscoBaseConnection is netmiko SSH class for Cisco and Cisco-like platforms.

    -Source code + +Expand source code +
    """CiscoBaseConnection is netmiko SSH class for Cisco and Cisco-like platforms."""
     from typing import Optional
     import re
    @@ -55,7 +59,9 @@ 

    Module netmiko.cisco_base_connection

    """Exits enable (privileged exec) mode.""" return super().exit_enable_mode(exit_command=exit_command) - def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool: + 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. @@ -275,7 +281,10 @@

    Module netmiko.cisco_base_connection

    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 + command_string=cmd, + strip_prompt=False, + strip_command=False, + read_timeout=100.0, ) return output @@ -299,16 +308,16 @@

    Classes

    class CiscoBaseConnection -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -347,7 +356,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -392,12 +401,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -405,9 +414,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class CiscoBaseConnection(BaseConnection):
         """Base Class for cisco-like behavior."""
     
    @@ -431,7 +442,9 @@ 

    Classes

    """Exits enable (privileged exec) mode.""" return super().exit_enable_mode(exit_command=exit_command) - def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool: + 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. @@ -651,7 +664,10 @@

    Classes

    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 + command_string=cmd, + strip_prompt=False, + strip_command=False, + read_timeout=100.0, ) return output
    @@ -661,13 +677,13 @@

    Ancestors

Subclasses

Methods

-def check_config_mode(self, check_string=')#', pattern='') +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

+

Checks if the device is in configuration mode or not.

+

Cisco IOS devices abbreviate the prompt at 20 chars in config mode

-Source code -
def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool:
+
+Expand source code
+
+
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.
 
@@ -699,24 +719,28 @@ 

Methods

-def check_enable_mode(self, check_string='#') +def check_enable_mode(self, check_string: str = '#') ‑> bool
-

Check if in enable mode. Return boolean.

+

Check if in enable mode. Return boolean.

-Source code + +Expand source code +
def check_enable_mode(self, check_string: str = "#") -> bool:
     """Check if in enable mode. Return boolean."""
     return super().check_enable_mode(check_string=check_string)
-def cleanup(self, command='exit') +def cleanup(self, command: str = 'exit') ‑> None
-

Gracefully exit the SSH session.

+

Gracefully exit the SSH session.

-Source code + +Expand source code +
def cleanup(self, command: str = "exit") -> None:
     """Gracefully exit the SSH session."""
     try:
@@ -731,12 +755,14 @@ 

Methods

-def enable(self, cmd='enable', pattern='ssword', enable_pattern=None, re_flags=re.IGNORECASE) +def enable(self, cmd: str = 'enable', pattern: str = 'ssword', enable_pattern: Optional[str] = None, re_flags: int = re.IGNORECASE) ‑> str
-

Enter enable mode.

+

Enter enable mode.

-Source code + +Expand source code +
def enable(
     self,
     cmd: str = "enable",
@@ -751,36 +777,42 @@ 

Methods

-def exit_config_mode(self, exit_config='end', pattern='#.*') +def exit_config_mode(self, exit_config: str = 'end', pattern: str = '#.*') ‑> str
-

Exit from configuration mode.

+

Exit from configuration mode.

-Source code + +Expand source code +
def exit_config_mode(self, exit_config: str = "end", pattern: str = r"#.*") -> str:
     """Exit from configuration mode."""
     return super().exit_config_mode(exit_config=exit_config, pattern=pattern)
-def exit_enable_mode(self, exit_command='disable') +def exit_enable_mode(self, exit_command: str = 'disable') ‑> str
-

Exits enable (privileged exec) mode.

+

Exits enable (privileged exec) mode.

-Source code + +Expand source code +
def exit_enable_mode(self, exit_command: str = "disable") -> str:
     """Exits enable (privileged exec) mode."""
     return super().exit_enable_mode(exit_command=exit_command)
-def save_config(self, cmd='copy running-config startup-config', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'copy running-config startup-config', confirm: bool = False, confirm_response: str = '') ‑> str
-

Saves Config.

+

Saves Config.

-Source code + +Expand source code +
def save_config(
     self,
     cmd: str = "copy running-config startup-config",
@@ -805,18 +837,23 @@ 

Methods

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 + command_string=cmd, + strip_prompt=False, + strip_command=False, + read_timeout=100.0, ) return output
-def serial_login(self, pri_prompt_terminator='\\#\\s*$', alt_prompt_terminator='>\\s*$', username_pattern='(?:user:|username|login)', pwd_pattern='assword', delay_factor=1.0, max_loops=20) +def serial_login(self, pri_prompt_terminator: str = '\\#\\s*$', alt_prompt_terminator: str = '>\\s*$', username_pattern: str = '(?:user:|username|login)', pwd_pattern: str = 'assword', delay_factor: float = 1.0, max_loops: int = 20) ‑> str
-
+
-Source code + +Expand source code +
def serial_login(
     self,
     pri_prompt_terminator: str = r"\#\s*$",
@@ -844,12 +881,14 @@ 

Methods

-def telnet_login(self, pri_prompt_terminator='\\#\\s*$', alt_prompt_terminator='>\\s*$', username_pattern='(?:user:|username|login|user name)', pwd_pattern='assword', delay_factor=1.0, max_loops=20) +def telnet_login(self, pri_prompt_terminator: str = '\\#\\s*$', alt_prompt_terminator: str = '>\\s*$', username_pattern: str = '(?:user:|username|login|user name)', pwd_pattern: str = 'assword', delay_factor: float = 1.0, max_loops: int = 20) ‑> str
-

Telnet login. Can be username/password or just password.

+

Telnet login. Can be username/password or just password.

-Source code + +Expand source code +
def telnet_login(
     self,
     pri_prompt_terminator: str = r"\#\s*$",
@@ -1006,12 +1045,14 @@ 

Inherited members

class CiscoFileTransfer -(ssh_conn, source_file, dest_file, file_system=None, direction='put', socket_timeout=10.0, progress=None, progress4=None, hash_supported=True) +(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: Optional[str] = None, direction: str = 'put', socket_timeout: float = 10.0, progress: Optional[Callable[..., Any]] = None, progress4: Optional[Callable[..., Any]] = None, hash_supported: bool = True)
-

Class to manage SCP file transfer and associated SSH control channel.

+

Class to manage SCP file transfer and associated SSH control channel.

-Source code + +Expand source code +
class CiscoFileTransfer(BaseFileTransfer):
     pass
@@ -1022,8 +1063,8 @@

Ancestors

Subclasses

class CiscoSSHConnection -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
-

Base Class for cisco-like behavior.

+

Base Class for cisco-like behavior.

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -1103,7 +1144,7 @@ 

Inherited members

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -1148,12 +1189,12 @@

Inherited members

: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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -1161,9 +1202,11 @@

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). -
+

-Source code + +Expand source code +
class CiscoSSHConnection(CiscoBaseConnection):
     pass
@@ -1177,11 +1220,11 @@

Subclasses

  • A10SSH
  • AccedianSSH
  • AlcatelAosSSH
  • -
  • AristaBase
  • ApresiaAeosBase
  • +
  • AristaBase
  • ArubaSSH
  • -
  • BrocadeFOSSSH
  • BroadcomIcosSSH
  • +
  • BrocadeFOSSSH
  • CalixB6Base
  • CiscoAsaSSH
  • CiscoFtdSSH
  • @@ -1195,8 +1238,8 @@

    Subclasses

  • DellOS10SSH
  • DellSonicSSH
  • DlinkDSBase
  • -
  • EltexSSH
  • EltexEsrSSH
  • +
  • EltexSSH
  • EndaceSSH
  • EnterasysSSH
  • ExtremeErsSSH
  • @@ -1207,12 +1250,12 @@

    Subclasses

  • ExtremeTierraSSH
  • ExtremeVspSSH
  • ExtremeWingSSH
  • -
  • LinuxSSH
  • FortinetSSH
  • -
  • HPProcurveBase
  • HPComwareBase
  • -
  • MikrotikBase
  • +
  • HPProcurveBase
  • +
  • LinuxSSH
  • MellanoxMlnxosSSH
  • +
  • MikrotikBase
  • MrvLxSSH
  • MrvOptiswitchSSH
  • NetgearProSafeSSH
  • @@ -1315,9 +1358,7 @@

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/citrix/index.html b/docs/netmiko/citrix/index.html index c2cbea3b2..9cb5a51e1 100644 --- a/docs/netmiko/citrix/index.html +++ b/docs/netmiko/citrix/index.html @@ -3,15 +3,17 @@ - + netmiko.citrix API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.citrix

    -Source code + +Expand source code +
    from netmiko.citrix.netscaler_ssh import NetscalerSSH
     
     __all__ = ["NetscalerSSH"]
    @@ -32,7 +36,7 @@

    Sub-modules

    netmiko.citrix.netscaler_ssh
    -
    +
    @@ -45,16 +49,16 @@

    Classes

    class NetscalerSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Netscaler SSH class.

    +

    Netscaler SSH class.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -93,7 +97,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -138,12 +142,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -151,9 +155,11 @@

    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). -
    +

    -Source code + +Expand source code +
    class NetscalerSSH(NoConfig, BaseConnection):
         """Netscaler SSH class."""
     
    @@ -204,12 +210,14 @@ 

    Ancestors

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read(pattern=r"[>#]")
    @@ -220,13 +228,15 @@ 

    Methods

    -def set_base_prompt(self, pri_prompt_terminator='>', alt_prompt_terminator='#', delay_factor=1.0, pattern=None) +def set_base_prompt(self, pri_prompt_terminator: str = '>', alt_prompt_terminator: str = '#', delay_factor: float = 1.0, pattern: Optional[str] = None) ‑> str
    -

    Sets self.base_prompt.

    -

    Netscaler has only '>' for the prompt.

    +

    Sets self.base_prompt.

    +

    Netscaler has only '>' for the prompt.

    -Source code + +Expand source code +
    def set_base_prompt(
         self,
         pri_prompt_terminator: str = ">",
    @@ -251,12 +261,14 @@ 

    Methods

    -def strip_prompt(self, a_string) +def strip_prompt(self, a_string: str) ‑> str
    -

    Strip 'Done' from command output

    +

    Strip 'Done' from command output

    -Source code + +Expand source code +
    def strip_prompt(self, a_string: str) -> str:
         """Strip 'Done' from command output"""
         output = super().strip_prompt(a_string)
    @@ -349,9 +361,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/citrix/netscaler_ssh.html b/docs/netmiko/citrix/netscaler_ssh.html index 9560e20ee..73536d398 100644 --- a/docs/netmiko/citrix/netscaler_ssh.html +++ b/docs/netmiko/citrix/netscaler_ssh.html @@ -3,15 +3,17 @@ - + netmiko.citrix.netscaler_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.citrix.netscaler_ssh

    -Source code + +Expand source code +
    from typing import Optional
     from netmiko.no_config import NoConfig
     from netmiko.base_connection import BaseConnection
    @@ -81,16 +85,16 @@ 

    Classes

    class NetscalerSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Netscaler SSH class.

    +

    Netscaler SSH class.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -129,7 +133,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -174,12 +178,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -187,9 +191,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class NetscalerSSH(NoConfig, BaseConnection):
         """Netscaler SSH class."""
     
    @@ -240,12 +246,14 @@ 

    Ancestors

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read(pattern=r"[>#]")
    @@ -256,13 +264,15 @@ 

    Methods

    -def set_base_prompt(self, pri_prompt_terminator='>', alt_prompt_terminator='#', delay_factor=1.0, pattern=None) +def set_base_prompt(self, pri_prompt_terminator: str = '>', alt_prompt_terminator: str = '#', delay_factor: float = 1.0, pattern: Optional[str] = None) ‑> str
    -

    Sets self.base_prompt.

    -

    Netscaler has only '>' for the prompt.

    +

    Sets self.base_prompt.

    +

    Netscaler has only '>' for the prompt.

    -Source code + +Expand source code +
    def set_base_prompt(
         self,
         pri_prompt_terminator: str = ">",
    @@ -287,12 +297,14 @@ 

    Methods

    -def strip_prompt(self, a_string) +def strip_prompt(self, a_string: str) ‑> str
    -

    Strip 'Done' from command output

    +

    Strip 'Done' from command output

    -Source code + +Expand source code +
    def strip_prompt(self, a_string: str) -> str:
         """Strip 'Done' from command output"""
         output = super().strip_prompt(a_string)
    @@ -380,9 +392,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/cli_tools/index.html b/docs/netmiko/cli_tools/index.html index 94f2785c8..29ddbef5c 100644 --- a/docs/netmiko/cli_tools/index.html +++ b/docs/netmiko/cli_tools/index.html @@ -3,15 +3,17 @@ - + netmiko.cli_tools API documentation - - - - - + + + + + + +
    @@ -26,15 +28,15 @@

    Sub-modules

    netmiko.cli_tools.netmiko_cfg
    -

    Return output from single show cmd using Netmiko.

    +

    Return output from single show cmd using Netmiko.

    netmiko.cli_tools.netmiko_grep
    -

    Create grep like remote behavior on show run or command output.

    +

    Create grep like remote behavior on show run or command output.

    netmiko.cli_tools.netmiko_show
    -

    Return output from single show cmd using Netmiko.

    +

    Return output from single show cmd using Netmiko.

    @@ -67,9 +69,7 @@

    Index

    - - \ No newline at end of file diff --git a/docs/netmiko/cli_tools/netmiko_cfg.html b/docs/netmiko/cli_tools/netmiko_cfg.html index 88e04c3da..1ba66e573 100644 --- a/docs/netmiko/cli_tools/netmiko_cfg.html +++ b/docs/netmiko/cli_tools/netmiko_cfg.html @@ -3,15 +3,17 @@ - + netmiko.cli_tools.netmiko_cfg API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.cli_tools.netmiko_cfg

    Return output from single show cmd using Netmiko.

    -Source code + +Expand source code +
    #!/usr/bin/env python
     """Return output from single show cmd using Netmiko."""
     from __future__ import print_function
    @@ -267,9 +271,11 @@ 

    Functions

    def grepx(files, pattern, grep_options, use_colors=True)
    -

    Call system grep

    +

    Call system grep

    -Source code + +Expand source code +
    def grepx(files, pattern, grep_options, use_colors=True):
         """Call system grep"""
         if not isinstance(files, (list, tuple)):
    @@ -294,9 +300,11 @@ 

    Functions

    def main(args)
    -
    +
    -Source code + +Expand source code +
    def main(args):
         start_time = datetime.now()
         cli_args = parse_arguments(args)
    @@ -407,9 +415,11 @@ 

    Functions

    def main_ep()
    -
    +
    -Source code + +Expand source code +
    def main_ep():
         sys.exit(main(sys.argv[1:]))
    @@ -418,9 +428,11 @@

    Functions

    def parse_arguments(args)
    -

    Parse command-line arguments.

    +

    Parse command-line arguments.

    -Source code + +Expand source code +
    def parse_arguments(args):
         """Parse command-line arguments."""
         description = "Execute single config cmd using Netmiko"
    @@ -468,9 +480,11 @@ 

    Functions

    def ssh_conn(device_name, a_device, cfg_command, output_q)
    -
    +
    -Source code + +Expand source code +
    def ssh_conn(device_name, a_device, cfg_command, output_q):
         try:
             net_connect = ConnectHandler(**a_device)
    @@ -513,9 +527,7 @@ 

    Index

    - - \ No newline at end of file diff --git a/docs/netmiko/cli_tools/netmiko_grep.html b/docs/netmiko/cli_tools/netmiko_grep.html index 96da6a9ee..8c2dd3b59 100644 --- a/docs/netmiko/cli_tools/netmiko_grep.html +++ b/docs/netmiko/cli_tools/netmiko_grep.html @@ -3,15 +3,17 @@ - + netmiko.cli_tools.netmiko_grep API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.cli_tools.netmiko_grep

    Create grep like remote behavior on show run or command output.

    -Source code + +Expand source code +
    #!/usr/bin/env python
     """Create grep like remote behavior on show run or command output."""
     from __future__ import print_function
    @@ -258,9 +262,11 @@ 

    Functions

    def grepx(files, pattern, grep_options, use_colors=True)
    -

    Call system grep

    +

    Call system grep

    -Source code + +Expand source code +
    def grepx(files, pattern, grep_options, use_colors=True):
         """Call system grep"""
         if not isinstance(files, (list, tuple)):
    @@ -285,9 +291,11 @@ 

    Functions

    def main(args)
    -
    +
    -Source code + +Expand source code +
    def main(args):
         start_time = datetime.now()
         cli_args = parse_arguments(args)
    @@ -402,9 +410,11 @@ 

    Functions

    def main_ep()
    -
    +
    -Source code + +Expand source code +
    def main_ep():
         sys.exit(main(sys.argv[1:]))
    @@ -413,9 +423,11 @@

    Functions

    def parse_arguments(args)
    -

    Parse command-line arguments.

    +

    Parse command-line arguments.

    -Source code + +Expand source code +
    def parse_arguments(args):
         """Parse command-line arguments."""
         description = "Grep pattern search on Netmiko output (defaults to running-config)"
    @@ -462,9 +474,11 @@ 

    Functions

    def ssh_conn(device_name, a_device, cli_command, output_q)
    -
    +
    -Source code + +Expand source code +
    def ssh_conn(device_name, a_device, cli_command, output_q):
         try:
             net_connect = ConnectHandler(**a_device)
    @@ -505,9 +519,7 @@ 

    Index

    - - \ No newline at end of file diff --git a/docs/netmiko/cli_tools/netmiko_show.html b/docs/netmiko/cli_tools/netmiko_show.html index 6aa29cb55..274f2795f 100644 --- a/docs/netmiko/cli_tools/netmiko_show.html +++ b/docs/netmiko/cli_tools/netmiko_show.html @@ -3,15 +3,17 @@ - + netmiko.cli_tools.netmiko_show API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.cli_tools.netmiko_show

    Return output from single show cmd using Netmiko.

    -Source code + +Expand source code +
    #!/usr/bin/env python
     """Return output from single show cmd using Netmiko."""
     from __future__ import print_function
    @@ -257,9 +261,11 @@ 

    Functions

    def grepx(files, pattern, grep_options, use_colors=True)
    -

    Call system grep

    +

    Call system grep

    -Source code + +Expand source code +
    def grepx(files, pattern, grep_options, use_colors=True):
         """Call system grep"""
         if not isinstance(files, (list, tuple)):
    @@ -284,9 +290,11 @@ 

    Functions

    def main(args)
    -
    +
    -Source code + +Expand source code +
    def main(args):
         start_time = datetime.now()
         cli_args = parse_arguments(args)
    @@ -401,9 +409,11 @@ 

    Functions

    def main_ep()
    -
    +
    -Source code + +Expand source code +
    def main_ep():
         sys.exit(main(sys.argv[1:]))
    @@ -412,9 +422,11 @@

    Functions

    def parse_arguments(args)
    -

    Parse command-line arguments.

    +

    Parse command-line arguments.

    -Source code + +Expand source code +
    def parse_arguments(args):
         """Parse command-line arguments."""
         description = (
    @@ -460,9 +472,11 @@ 

    Functions

    def ssh_conn(device_name, a_device, cli_command, output_q)
    -
    +
    -Source code + +Expand source code +
    def ssh_conn(device_name, a_device, cli_command, output_q):
         try:
             net_connect = ConnectHandler(**a_device)
    @@ -503,9 +517,7 @@ 

    Index

    - - \ No newline at end of file diff --git a/docs/netmiko/cloudgenix/cloudgenix_ion.html b/docs/netmiko/cloudgenix/cloudgenix_ion.html index 681e7d7f3..b5462e653 100644 --- a/docs/netmiko/cloudgenix/cloudgenix_ion.html +++ b/docs/netmiko/cloudgenix/cloudgenix_ion.html @@ -3,15 +3,17 @@ - + netmiko.cloudgenix.cloudgenix_ion API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.cloudgenix.cloudgenix_ion

    -Source code + +Expand source code +
    from typing import Any, Union, Sequence, TextIO, Optional
     from netmiko.no_config import NoConfig
     from netmiko.cisco_base_connection import CiscoSSHConnection
    @@ -81,10 +85,10 @@ 

    Classes

    class CloudGenixIonSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Class for platforms that have no config mode.

    +

    Class for platforms that have no config mode.

    check_config_mode returns True as the expectation is that configuration commands can be executed directly. So in your current state, you are in "config mode" i.e. you can make configuration changes.

    @@ -92,10 +96,10 @@

    Classes

    overwrite check_config_mode in the platform specific driver and return False.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -134,7 +138,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -179,12 +183,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -192,9 +196,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class CloudGenixIonSSH(NoConfig, CiscoSSHConnection):
         def establish_connection(self, width: int = 100, height: int = 1000) -> None:
             super().establish_connection(width=width, height=height)
    @@ -247,36 +253,42 @@ 

    Ancestors

    Methods

    -def disable_paging(self, *args, **kwargs) +def disable_paging(self, *args: Any, **kwargs: Any) ‑> str
    -

    Cloud Genix ION sets terminal height in establish_connection

    +

    Cloud Genix ION sets terminal height in establish_connection

    -Source code + +Expand source code +
    def disable_paging(self, *args: Any, **kwargs: Any) -> str:
         """Cloud Genix ION sets terminal height in establish_connection"""
         return ""
    -def save_config(self, *args, **kwargs) +def save_config(self, *args: Any, **kwargs: Any) ‑> str
    -

    Not Implemented

    +

    Not Implemented

    -Source code + +Expand source code +
    def save_config(self, *args: Any, **kwargs: Any) -> str:
         """Not Implemented"""
         raise NotImplementedError
    -def session_preparation(self, *args, **kwargs) +def session_preparation(self, *args: Any, **kwargs: Any) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self, *args: Any, **kwargs: Any) -> None:
         """Prepare the session after the connection has been established."""
         self.ansi_escape_codes = True
    @@ -362,9 +374,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/cloudgenix/index.html b/docs/netmiko/cloudgenix/index.html index 1147f698c..9fa98d7de 100644 --- a/docs/netmiko/cloudgenix/index.html +++ b/docs/netmiko/cloudgenix/index.html @@ -3,15 +3,17 @@ - + netmiko.cloudgenix API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.cloudgenix

    -Source code + +Expand source code +
    from netmiko.cloudgenix.cloudgenix_ion import CloudGenixIonSSH
     
     __all__ = ["CloudGenixIonSSH"]
    @@ -32,7 +36,7 @@

    Sub-modules

    netmiko.cloudgenix.cloudgenix_ion
    -
    +
    @@ -45,10 +49,10 @@

    Classes

    class CloudGenixIonSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Class for platforms that have no config mode.

    +

    Class for platforms that have no config mode.

    check_config_mode returns True as the expectation is that configuration commands can be executed directly. So in your current state, you are in "config mode" i.e. you can make configuration changes.

    @@ -56,10 +60,10 @@

    Classes

    overwrite check_config_mode in the platform specific driver and return False.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -98,7 +102,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -143,12 +147,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -156,9 +160,11 @@

    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). -
    +

    -Source code + +Expand source code +
    class CloudGenixIonSSH(NoConfig, CiscoSSHConnection):
         def establish_connection(self, width: int = 100, height: int = 1000) -> None:
             super().establish_connection(width=width, height=height)
    @@ -211,36 +217,42 @@ 

    Ancestors

    Methods

    -def disable_paging(self, *args, **kwargs) +def disable_paging(self, *args: Any, **kwargs: Any) ‑> str
    -

    Cloud Genix ION sets terminal height in establish_connection

    +

    Cloud Genix ION sets terminal height in establish_connection

    -Source code + +Expand source code +
    def disable_paging(self, *args: Any, **kwargs: Any) -> str:
         """Cloud Genix ION sets terminal height in establish_connection"""
         return ""
    -def save_config(self, *args, **kwargs) +def save_config(self, *args: Any, **kwargs: Any) ‑> str
    -

    Not Implemented

    +

    Not Implemented

    -Source code + +Expand source code +
    def save_config(self, *args: Any, **kwargs: Any) -> str:
         """Not Implemented"""
         raise NotImplementedError
    -def session_preparation(self, *args, **kwargs) +def session_preparation(self, *args: Any, **kwargs: Any) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self, *args: Any, **kwargs: Any) -> None:
         """Prepare the session after the connection has been established."""
         self.ansi_escape_codes = True
    @@ -331,9 +343,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/coriant/coriant_ssh.html b/docs/netmiko/coriant/coriant_ssh.html index 40dc18d23..bd75a5b81 100644 --- a/docs/netmiko/coriant/coriant_ssh.html +++ b/docs/netmiko/coriant/coriant_ssh.html @@ -3,15 +3,17 @@ - + netmiko.coriant.coriant_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.coriant.coriant_ssh

    -Source code + +Expand source code +
    from typing import Any, Optional
     from netmiko.no_enable import NoEnable
     from netmiko.no_config import NoConfig
    @@ -65,10 +69,10 @@ 

    Classes

    class CoriantSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Class for platforms that have no enable mode.

    +

    Class for platforms that have no enable mode.

    Netmiko translates the meaning of "enable" mode to be a proxy for "can go into config mode". In other words, that you ultimately have privileges to execute configuration changes.

    @@ -78,10 +82,10 @@

    Classes

    don't explicitly support enable mode.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -120,7 +124,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -165,12 +169,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -178,9 +182,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class CoriantSSH(NoEnable, NoConfig, CiscoSSHConnection):
         def session_preparation(self) -> None:
             self._test_channel_read(pattern=r"[>:]")
    @@ -217,24 +223,28 @@ 

    Ancestors

    Methods

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

    Not Implemented

    +

    Not Implemented

    -Source code + +Expand source code +
    def save_config(self, *args: Any, **kwargs: Any) -> str:
         """Not Implemented"""
         raise NotImplementedError
    -def set_base_prompt(self, pri_prompt_terminator=':', alt_prompt_terminator='>', delay_factor=2.0, pattern=None) +def set_base_prompt(self, pri_prompt_terminator: str = ':', alt_prompt_terminator: str = '>', delay_factor: float = 2.0, pattern: Optional[str] = None) ‑> str
    -

    Sets self.base_prompt: used as delimiter for stripping of trailing prompt in output.

    +

    Sets self.base_prompt: used as delimiter for stripping of trailing prompt in output.

    -Source code + +Expand source code +
    def set_base_prompt(
         self,
         pri_prompt_terminator: str = ":",
    @@ -329,9 +339,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/coriant/index.html b/docs/netmiko/coriant/index.html index ab7dbcf15..8c46c9c4a 100644 --- a/docs/netmiko/coriant/index.html +++ b/docs/netmiko/coriant/index.html @@ -3,15 +3,17 @@ - + netmiko.coriant API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.coriant

    -Source code + +Expand source code +
    from netmiko.coriant.coriant_ssh import CoriantSSH
     
     __all__ = ["CoriantSSH"]
    @@ -32,7 +36,7 @@

    Sub-modules

    netmiko.coriant.coriant_ssh
    -
    +
    @@ -45,10 +49,10 @@

    Classes

    class CoriantSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Class for platforms that have no enable mode.

    +

    Class for platforms that have no enable mode.

    Netmiko translates the meaning of "enable" mode to be a proxy for "can go into config mode". In other words, that you ultimately have privileges to execute configuration changes.

    @@ -58,10 +62,10 @@

    Classes

    don't explicitly support enable mode.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -100,7 +104,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -145,12 +149,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -158,9 +162,11 @@

    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). -
    +

    -Source code + +Expand source code +
    class CoriantSSH(NoEnable, NoConfig, CiscoSSHConnection):
         def session_preparation(self) -> None:
             self._test_channel_read(pattern=r"[>:]")
    @@ -197,24 +203,28 @@ 

    Ancestors

    Methods

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

    Not Implemented

    +

    Not Implemented

    -Source code + +Expand source code +
    def save_config(self, *args: Any, **kwargs: Any) -> str:
         """Not Implemented"""
         raise NotImplementedError
    -def set_base_prompt(self, pri_prompt_terminator=':', alt_prompt_terminator='>', delay_factor=2.0, pattern=None) +def set_base_prompt(self, pri_prompt_terminator: str = ':', alt_prompt_terminator: str = '>', delay_factor: float = 2.0, pattern: Optional[str] = None) ‑> str
    -

    Sets self.base_prompt: used as delimiter for stripping of trailing prompt in output.

    +

    Sets self.base_prompt: used as delimiter for stripping of trailing prompt in output.

    -Source code + +Expand source code +
    def set_base_prompt(
         self,
         pri_prompt_terminator: str = ":",
    @@ -314,9 +324,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/dell/dell_dnos6.html b/docs/netmiko/dell/dell_dnos6.html index d1e575038..b76c02c6d 100644 --- a/docs/netmiko/dell/dell_dnos6.html +++ b/docs/netmiko/dell/dell_dnos6.html @@ -3,15 +3,17 @@ - + netmiko.dell.dell_dnos6 API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.dell.dell_dnos6

    Dell N2/3/4000 base driver- supports DNOS6.

    -Source code + +Expand source code +
    """Dell N2/3/4000 base driver- supports DNOS6."""
     from netmiko.dell.dell_powerconnect import DellPowerConnectBase
     
    @@ -68,16 +72,16 @@ 

    Classes

    class DellDNOS6Base -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Dell PowerConnect Driver.

    +

    Dell PowerConnect Driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -116,7 +120,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -161,12 +165,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -174,9 +178,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class DellDNOS6Base(DellPowerConnectBase):
         def session_preparation(self) -> None:
             """Prepare the session after the connection has been established."""
    @@ -212,12 +218,14 @@ 

    Subclasses

    Methods

    -def save_config(self, cmd='copy running-configuration startup-configuration', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'copy running-configuration startup-configuration', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Saves Config

    +

    Saves Config

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "copy running-configuration startup-configuration",
    @@ -281,16 +289,16 @@ 

    Inherited members

    class DellDNOS6SSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Dell PowerConnect Driver.

    +

    Dell PowerConnect Driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -329,7 +337,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -374,12 +382,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -387,9 +395,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class DellDNOS6SSH(DellDNOS6Base):
         pass
    @@ -451,16 +461,16 @@

    Inherited members

    class DellDNOS6Telnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Dell PowerConnect Driver.

    +

    Dell PowerConnect Driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -499,7 +509,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -544,12 +554,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -557,9 +567,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class DellDNOS6Telnet(DellDNOS6Base):
         pass
    @@ -653,9 +665,7 @@

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/dell/dell_force10_ssh.html b/docs/netmiko/dell/dell_force10_ssh.html index b78262ad4..43f9265a5 100644 --- a/docs/netmiko/dell/dell_force10_ssh.html +++ b/docs/netmiko/dell/dell_force10_ssh.html @@ -3,15 +3,17 @@ - + netmiko.dell.dell_force10_ssh API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.dell.dell_force10_ssh

    Dell Force10 Driver - supports DNOS9.

    -Source code + +Expand source code +
    """Dell Force10 Driver - supports DNOS9."""
     from netmiko.cisco_base_connection import CiscoSSHConnection
     
    @@ -53,16 +57,16 @@ 

    Classes

    class DellForce10SSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Dell Force10 Driver - supports DNOS9.

    +

    Dell Force10 Driver - supports DNOS9.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -101,7 +105,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -146,12 +150,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -159,9 +163,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class DellForce10SSH(CiscoSSHConnection):
         """Dell Force10 Driver - supports DNOS9."""
     
    @@ -185,12 +191,14 @@ 

    Ancestors

    Methods

    -def save_config(self, cmd='copy running-configuration startup-configuration', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'copy running-configuration startup-configuration', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Saves Config

    +

    Saves Config

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "copy running-configuration startup-configuration",
    @@ -280,9 +288,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/dell/dell_isilon_ssh.html b/docs/netmiko/dell/dell_isilon_ssh.html index 27a5881f9..08b206f75 100644 --- a/docs/netmiko/dell/dell_isilon_ssh.html +++ b/docs/netmiko/dell/dell_isilon_ssh.html @@ -3,15 +3,17 @@ - + netmiko.dell.dell_isilon_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.dell.dell_isilon_ssh

    -Source code + +Expand source code +
    from typing import Any, Optional
     import time
     import re
    @@ -108,7 +112,9 @@ 

    Module netmiko.dell.dell_isilon_ssh

    def exit_enable_mode(self, exit_command: str = "exit") -> str: return super().exit_enable_mode(exit_command=exit_command) - def check_config_mode(self, check_string: str = "#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "#", pattern: str = "", force_regex: bool = False + ) -> bool: """Use equivalent enable method.""" return self.check_enable_mode(check_string=check_string) @@ -137,17 +143,17 @@

    Classes

    class DellIsilonSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Defines vendor independent methods.

    +

    Defines vendor independent methods.

    Otherwise method left as a stub method.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -186,7 +192,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -231,12 +237,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -244,9 +250,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class DellIsilonSSH(BaseConnection):
         def session_preparation(self) -> None:
             """Prepare the session after the connection has been established."""
    @@ -326,7 +334,9 @@ 

    Classes

    def exit_enable_mode(self, exit_command: str = "exit") -> str: return super().exit_enable_mode(exit_command=exit_command) - def check_config_mode(self, check_string: str = "#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "#", pattern: str = "", force_regex: bool = False + ) -> bool: """Use equivalent enable method.""" return self.check_enable_mode(check_string=check_string) @@ -350,24 +360,30 @@

    Ancestors

    Methods

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

    Use equivalent enable method.

    +

    Use equivalent enable method.

    -Source code -
    def check_config_mode(self, check_string: str = "#", pattern: str = "") -> bool:
    +
    +Expand source code
    +
    +
    def check_config_mode(
    +    self, check_string: str = "#", pattern: str = "", force_regex: bool = False
    +) -> bool:
         """Use equivalent enable method."""
         return self.check_enable_mode(check_string=check_string)
    -def config_mode(self, config_command='sudo su', pattern='ssword', re_flags=re.IGNORECASE) +def config_mode(self, config_command: str = 'sudo su', pattern: str = 'ssword', re_flags: int = re.IGNORECASE) ‑> str
    -

    Use equivalent enable method.

    +

    Use equivalent enable method.

    -Source code + +Expand source code +
    def config_mode(
         self,
         config_command: str = "sudo su",
    @@ -379,36 +395,42 @@ 

    Methods

    -def disable_paging(self, *args, **kwargs) +def disable_paging(self, *args: Any, **kwargs: Any) ‑> str
    -

    Isilon doesn't have paging by default.

    +

    Isilon doesn't have paging by default.

    -Source code + +Expand source code +
    def disable_paging(self, *args: Any, **kwargs: Any) -> str:
         """Isilon doesn't have paging by default."""
         return ""
    -def exit_config_mode(self, exit_config='exit', pattern='') +def exit_config_mode(self, exit_config: str = 'exit', pattern: str = '') ‑> str
    -

    Use equivalent enable method.

    +

    Use equivalent enable method.

    -Source code + +Expand source code +
    def exit_config_mode(self, exit_config: str = "exit", pattern: str = "") -> str:
         """Use equivalent enable method."""
         return self.exit_enable_mode(exit_command=exit_config)
    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self.ansi_escape_codes = True
    @@ -419,12 +441,14 @@ 

    Methods

    -def set_base_prompt(self, pri_prompt_terminator='$', alt_prompt_terminator='#', delay_factor=1.0, pattern=None) +def set_base_prompt(self, pri_prompt_terminator: str = '$', alt_prompt_terminator: str = '#', delay_factor: float = 1.0, pattern: Optional[str] = None) ‑> str
    -

    Determine base prompt.

    +

    Determine base prompt.

    -Source code + +Expand source code +
    def set_base_prompt(
         self,
         pri_prompt_terminator: str = "$",
    @@ -442,12 +466,14 @@ 

    Methods

    -def strip_ansi_escape_codes(self, string_buffer) +def strip_ansi_escape_codes(self, string_buffer: str) ‑> str
    -

    Remove Null code

    +

    Remove Null code

    -Source code + +Expand source code +
    def strip_ansi_escape_codes(self, string_buffer: str) -> str:
         """Remove Null code"""
         output = re.sub(r"\x00", "", string_buffer)
    @@ -531,9 +557,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/dell/dell_os10_ssh.html b/docs/netmiko/dell/dell_os10_ssh.html index d0c3732ab..bc5721298 100644 --- a/docs/netmiko/dell/dell_os10_ssh.html +++ b/docs/netmiko/dell/dell_os10_ssh.html @@ -3,15 +3,17 @@ - + netmiko.dell.dell_os10_ssh API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.dell.dell_os10_ssh

    Dell EMC Networking OS10 Driver - supports dellos10.

    -Source code + +Expand source code +
    """Dell EMC Networking OS10 Driver - supports dellos10."""
     from typing import Any, Optional
     from netmiko.base_connection import BaseConnection
    @@ -159,12 +163,14 @@ 

    Classes

    class DellOS10FileTransfer -(ssh_conn, source_file, dest_file, file_system='/home/admin', direction='put', **kwargs) +(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: Optional[str] = '/home/admin', direction: str = 'put', **kwargs: Any)
    -

    Dell EMC Networking OS10 SCP File Transfer driver.

    +

    Dell EMC Networking OS10 SCP File Transfer driver.

    -Source code + +Expand source code +
    class DellOS10FileTransfer(BaseFileTransfer):
         """Dell EMC Networking OS10 SCP File Transfer driver."""
     
    @@ -272,12 +278,14 @@ 

    Ancestors

    Methods

    -def remote_md5(self, base_cmd='verify /md5', remote_file=None) +def remote_md5(self, base_cmd: str = 'verify /md5', remote_file: Optional[str] = None) ‑> str
    -

    Calculate remote MD5 and returns the hash.

    +

    Calculate remote MD5 and returns the hash.

    -Source code + +Expand source code +
    def remote_md5(
         self, base_cmd: str = "verify /md5", remote_file: Optional[str] = None
     ) -> str:
    @@ -322,16 +330,16 @@ 

    Inherited members

    class DellOS10SSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Dell EMC Networking OS10 Driver - supports dellos10.

    +

    Dell EMC Networking OS10 Driver - supports dellos10.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -370,7 +378,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -415,12 +423,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -428,9 +436,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class DellOS10SSH(CiscoSSHConnection):
         """Dell EMC Networking OS10 Driver - supports dellos10."""
     
    @@ -454,12 +464,14 @@ 

    Ancestors

    Methods

    -def save_config(self, cmd='copy running-configuration startup-configuration', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'copy running-configuration startup-configuration', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Saves Config

    +

    Saves Config

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "copy running-configuration startup-configuration",
    @@ -555,9 +567,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/dell/dell_powerconnect.html b/docs/netmiko/dell/dell_powerconnect.html index 2080d71e4..aac828647 100644 --- a/docs/netmiko/dell/dell_powerconnect.html +++ b/docs/netmiko/dell/dell_powerconnect.html @@ -3,15 +3,17 @@ - + netmiko.dell.dell_powerconnect API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.dell.dell_powerconnect

    Dell PowerConnect Driver.

    -Source code + +Expand source code +
    """Dell PowerConnect Driver."""
     from typing import Optional
     from paramiko import SSHClient
    @@ -62,7 +66,10 @@ 

    Module netmiko.dell.dell_powerconnect

    return self.base_prompt def check_config_mode( - self, check_string: str = "(config)#", pattern: str = "" + self, + check_string: str = "(config)#", + pattern: str = "", + force_regex: bool = False, ) -> bool: """Checks if the device is in configuration mode""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -151,16 +158,16 @@

    Classes

    class DellPowerConnectBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Dell PowerConnect Driver.

    +

    Dell PowerConnect Driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -199,7 +206,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -244,12 +251,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -257,9 +264,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class DellPowerConnectBase(CiscoBaseConnection):
         """Dell PowerConnect Driver."""
     
    @@ -290,7 +299,10 @@ 

    Classes

    return self.base_prompt def check_config_mode( - self, check_string: str = "(config)#", pattern: str = "" + self, + check_string: str = "(config)#", + pattern: str = "", + force_regex: bool = False, ) -> bool: """Checks if the device is in configuration mode""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -309,33 +321,40 @@

    Ancestors

    Subclasses

    Methods

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

    Checks if the device is in configuration mode

    +

    Checks if the device is in configuration mode

    -Source code + +Expand source code +
    def check_config_mode(
    -    self, check_string: str = "(config)#", pattern: str = ""
    +    self,
    +    check_string: str = "(config)#",
    +    pattern: str = "",
    +    force_regex: bool = False,
     ) -> bool:
         """Checks if the device is in configuration mode"""
         return super().check_config_mode(check_string=check_string, pattern=pattern)
    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self.ansi_escape_codes = True
    @@ -346,12 +365,14 @@ 

    Methods

    -def set_base_prompt(self, pri_prompt_terminator='>', alt_prompt_terminator='#', delay_factor=1.0, pattern=None) +def set_base_prompt(self, pri_prompt_terminator: str = '>', alt_prompt_terminator: str = '#', delay_factor: float = 1.0, pattern: Optional[str] = None) ‑> str
    -

    Sets self.base_prompt: used as delimiter for stripping of trailing prompt in output.

    +

    Sets self.base_prompt: used as delimiter for stripping of trailing prompt in output.

    -Source code + +Expand source code +
    def set_base_prompt(
         self,
         pri_prompt_terminator: str = ">",
    @@ -420,18 +441,18 @@ 

    Inherited members

    class DellPowerConnectSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Dell PowerConnect Driver.

    +

    Dell PowerConnect Driver.

    To make it work, we have to override the SSHClient _auth method. If we use login/password, the ssh server use the (none) auth mechanism.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -470,7 +491,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -515,12 +536,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -528,9 +549,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class DellPowerConnectSSH(DellPowerConnectBase):
         """Dell PowerConnect Driver.
     
    @@ -598,14 +621,16 @@ 

    Ancestors

    Methods

    -def special_login_handler(self, delay_factor=1.0) +def special_login_handler(self, delay_factor: float = 1.0) ‑> None
    -

    Powerconnect presents with the following on login

    +

    Powerconnect presents with the following on login

    User Name:

    -

    Password: ****

    +

    Password: ****

    -Source code + +Expand source code +
    def special_login_handler(self, delay_factor: float = 1.0) -> None:
         """
         Powerconnect presents with the following on login
    @@ -686,16 +711,16 @@ 

    Inherited members

    class DellPowerConnectTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Dell PowerConnect Telnet Driver.

    +

    Dell PowerConnect Telnet Driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -734,7 +759,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -779,12 +804,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -792,9 +817,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class DellPowerConnectTelnet(DellPowerConnectBase):
         """Dell PowerConnect Telnet Driver."""
     
    @@ -894,9 +921,7 @@ 

    - - \ No newline at end of file diff --git a/docs/netmiko/dell/dell_sonic_ssh.html b/docs/netmiko/dell/dell_sonic_ssh.html index 1e4a7b507..ec31f2f92 100644 --- a/docs/netmiko/dell/dell_sonic_ssh.html +++ b/docs/netmiko/dell/dell_sonic_ssh.html @@ -3,16 +3,18 @@ - + netmiko.dell.dell_sonic_ssh API documentation - - - - - + + + + + + +
    @@ -24,7 +26,9 @@

    Module netmiko.dell.dell_sonic_ssh

    Dell EMC PowerSwitch platforms running Enterprise SONiC Distribution by Dell Technologies Driver - supports dellenterprisesonic.

    -Source code + +Expand source code +
    """
     Dell EMC PowerSwitch platforms running Enterprise SONiC Distribution by Dell Technologies Driver
     - supports dellenterprisesonic.
    @@ -78,17 +82,17 @@ 

    Classes

    class DellSonicSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Dell EMC PowerSwitch platforms running Enterprise SONiC Distribution +

    Dell EMC PowerSwitch platforms running Enterprise SONiC Distribution by Dell Technologies Driver - supports dellenterprisesonic.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -127,7 +131,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -172,12 +176,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -185,9 +189,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class DellSonicSSH(NoEnable, CiscoSSHConnection):
         """
         Dell EMC PowerSwitch platforms running Enterprise SONiC Distribution
    @@ -230,12 +236,14 @@ 

    Ancestors

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read(pattern=r"[>$#]")
    @@ -321,9 +329,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/dell/index.html b/docs/netmiko/dell/index.html index 59e1a7d1d..40f7e89c1 100644 --- a/docs/netmiko/dell/index.html +++ b/docs/netmiko/dell/index.html @@ -3,15 +3,17 @@ - + netmiko.dell API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.dell

    -Source code + +Expand source code +
    from netmiko.dell.dell_dnos6 import DellDNOS6SSH
     from netmiko.dell.dell_dnos6 import DellDNOS6Telnet
     from netmiko.dell.dell_force10_ssh import DellForce10SSH
    @@ -49,28 +53,28 @@ 

    Sub-modules

    netmiko.dell.dell_dnos6
    -

    Dell N2/3/4000 base driver- supports DNOS6.

    +

    Dell N2/3/4000 base driver- supports DNOS6.

    netmiko.dell.dell_force10_ssh
    -

    Dell Force10 Driver - supports DNOS9.

    +

    Dell Force10 Driver - supports DNOS9.

    netmiko.dell.dell_isilon_ssh
    -
    +
    netmiko.dell.dell_os10_ssh
    -

    Dell EMC Networking OS10 Driver - supports dellos10.

    +

    Dell EMC Networking OS10 Driver - supports dellos10.

    netmiko.dell.dell_powerconnect
    -

    Dell PowerConnect Driver.

    +

    Dell PowerConnect Driver.

    netmiko.dell.dell_sonic_ssh
    -

    Dell EMC PowerSwitch platforms running Enterprise SONiC Distribution by Dell Technologies Driver -- supports dellenterprisesonic.

    +

    Dell EMC PowerSwitch platforms running Enterprise SONiC Distribution by Dell Technologies Driver +- supports dellenterprisesonic.

    @@ -83,16 +87,16 @@

    Classes

    class DellDNOS6SSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Dell PowerConnect Driver.

    +

    Dell PowerConnect Driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -131,7 +135,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -176,12 +180,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -189,9 +193,11 @@

    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). -
    +

    -Source code + +Expand source code +
    class DellDNOS6SSH(DellDNOS6Base):
         pass
    @@ -253,16 +259,16 @@

    Inherited members

    class DellDNOS6Telnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Dell PowerConnect Driver.

    +

    Dell PowerConnect Driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -301,7 +307,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -346,12 +352,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -359,9 +365,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class DellDNOS6Telnet(DellDNOS6Base):
         pass
    @@ -423,16 +431,16 @@

    Inherited members

    class DellForce10SSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Dell Force10 Driver - supports DNOS9.

    +

    Dell Force10 Driver - supports DNOS9.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -471,7 +479,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -516,12 +524,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -529,9 +537,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class DellForce10SSH(CiscoSSHConnection):
         """Dell Force10 Driver - supports DNOS9."""
     
    @@ -555,12 +565,14 @@ 

    Ancestors

    Methods

    -def save_config(self, cmd='copy running-configuration startup-configuration', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'copy running-configuration startup-configuration', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Saves Config

    +

    Saves Config

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "copy running-configuration startup-configuration",
    @@ -624,17 +636,17 @@ 

    Inherited members

    class DellIsilonSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Defines vendor independent methods.

    +

    Defines vendor independent methods.

    Otherwise method left as a stub method.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -673,7 +685,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -718,12 +730,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -731,9 +743,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class DellIsilonSSH(BaseConnection):
         def session_preparation(self) -> None:
             """Prepare the session after the connection has been established."""
    @@ -813,7 +827,9 @@ 

    Inherited members

    def exit_enable_mode(self, exit_command: str = "exit") -> str: return super().exit_enable_mode(exit_command=exit_command) - def check_config_mode(self, check_string: str = "#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "#", pattern: str = "", force_regex: bool = False + ) -> bool: """Use equivalent enable method.""" return self.check_enable_mode(check_string=check_string) @@ -837,24 +853,30 @@

    Ancestors

    Methods

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

    Use equivalent enable method.

    +

    Use equivalent enable method.

    -Source code -
    def check_config_mode(self, check_string: str = "#", pattern: str = "") -> bool:
    +
    +Expand source code
    +
    +
    def check_config_mode(
    +    self, check_string: str = "#", pattern: str = "", force_regex: bool = False
    +) -> bool:
         """Use equivalent enable method."""
         return self.check_enable_mode(check_string=check_string)
    -def config_mode(self, config_command='sudo su', pattern='ssword', re_flags=re.IGNORECASE) +def config_mode(self, config_command: str = 'sudo su', pattern: str = 'ssword', re_flags: int = re.IGNORECASE) ‑> str
    -

    Use equivalent enable method.

    +

    Use equivalent enable method.

    -Source code + +Expand source code +
    def config_mode(
         self,
         config_command: str = "sudo su",
    @@ -866,36 +888,42 @@ 

    Methods

    -def disable_paging(self, *args, **kwargs) +def disable_paging(self, *args: Any, **kwargs: Any) ‑> str
    -

    Isilon doesn't have paging by default.

    +

    Isilon doesn't have paging by default.

    -Source code + +Expand source code +
    def disable_paging(self, *args: Any, **kwargs: Any) -> str:
         """Isilon doesn't have paging by default."""
         return ""
    -def exit_config_mode(self, exit_config='exit', pattern='') +def exit_config_mode(self, exit_config: str = 'exit', pattern: str = '') ‑> str
    -

    Use equivalent enable method.

    +

    Use equivalent enable method.

    -Source code + +Expand source code +
    def exit_config_mode(self, exit_config: str = "exit", pattern: str = "") -> str:
         """Use equivalent enable method."""
         return self.exit_enable_mode(exit_command=exit_config)
    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self.ansi_escape_codes = True
    @@ -906,12 +934,14 @@ 

    Methods

    -def set_base_prompt(self, pri_prompt_terminator='$', alt_prompt_terminator='#', delay_factor=1.0, pattern=None) +def set_base_prompt(self, pri_prompt_terminator: str = '$', alt_prompt_terminator: str = '#', delay_factor: float = 1.0, pattern: Optional[str] = None) ‑> str
    -

    Determine base prompt.

    +

    Determine base prompt.

    -Source code + +Expand source code +
    def set_base_prompt(
         self,
         pri_prompt_terminator: str = "$",
    @@ -929,12 +959,14 @@ 

    Methods

    -def strip_ansi_escape_codes(self, string_buffer) +def strip_ansi_escape_codes(self, string_buffer: str) ‑> str
    -

    Remove Null code

    +

    Remove Null code

    -Source code + +Expand source code +
    def strip_ansi_escape_codes(self, string_buffer: str) -> str:
         """Remove Null code"""
         output = re.sub(r"\x00", "", string_buffer)
    @@ -986,12 +1018,14 @@ 

    Inherited members

    class DellOS10FileTransfer -(ssh_conn, source_file, dest_file, file_system='/home/admin', direction='put', **kwargs) +(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: Optional[str] = '/home/admin', direction: str = 'put', **kwargs: Any)
    -

    Dell EMC Networking OS10 SCP File Transfer driver.

    +

    Dell EMC Networking OS10 SCP File Transfer driver.

    -Source code + +Expand source code +
    class DellOS10FileTransfer(BaseFileTransfer):
         """Dell EMC Networking OS10 SCP File Transfer driver."""
     
    @@ -1099,12 +1133,14 @@ 

    Ancestors

    Methods

    -def remote_md5(self, base_cmd='verify /md5', remote_file=None) +def remote_md5(self, base_cmd: str = 'verify /md5', remote_file: Optional[str] = None) ‑> str
    -

    Calculate remote MD5 and returns the hash.

    +

    Calculate remote MD5 and returns the hash.

    -Source code + +Expand source code +
    def remote_md5(
         self, base_cmd: str = "verify /md5", remote_file: Optional[str] = None
     ) -> str:
    @@ -1149,16 +1185,16 @@ 

    Inherited members

    class DellOS10SSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Dell EMC Networking OS10 Driver - supports dellos10.

    +

    Dell EMC Networking OS10 Driver - supports dellos10.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -1197,7 +1233,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -1242,12 +1278,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -1255,9 +1291,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class DellOS10SSH(CiscoSSHConnection):
         """Dell EMC Networking OS10 Driver - supports dellos10."""
     
    @@ -1281,12 +1319,14 @@ 

    Ancestors

    Methods

    -def save_config(self, cmd='copy running-configuration startup-configuration', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'copy running-configuration startup-configuration', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Saves Config

    +

    Saves Config

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "copy running-configuration startup-configuration",
    @@ -1350,18 +1390,18 @@ 

    Inherited members

    class DellPowerConnectSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Dell PowerConnect Driver.

    +

    Dell PowerConnect Driver.

    To make it work, we have to override the SSHClient _auth method. If we use login/password, the ssh server use the (none) auth mechanism.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -1400,7 +1440,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -1445,12 +1485,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -1458,9 +1498,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class DellPowerConnectSSH(DellPowerConnectBase):
         """Dell PowerConnect Driver.
     
    @@ -1528,14 +1570,16 @@ 

    Ancestors

    Methods

    -def special_login_handler(self, delay_factor=1.0) +def special_login_handler(self, delay_factor: float = 1.0) ‑> None
    -

    Powerconnect presents with the following on login

    +

    Powerconnect presents with the following on login

    User Name:

    -

    Password: ****

    +

    Password: ****

    -Source code + +Expand source code +
    def special_login_handler(self, delay_factor: float = 1.0) -> None:
         """
         Powerconnect presents with the following on login
    @@ -1616,16 +1660,16 @@ 

    Inherited members

    class DellPowerConnectTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Dell PowerConnect Telnet Driver.

    +

    Dell PowerConnect Telnet Driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -1664,7 +1708,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -1709,12 +1753,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -1722,9 +1766,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class DellPowerConnectTelnet(DellPowerConnectBase):
         """Dell PowerConnect Telnet Driver."""
     
    @@ -1787,17 +1833,17 @@ 

    Inherited members

    class DellSonicSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Dell EMC PowerSwitch platforms running Enterprise SONiC Distribution +

    Dell EMC PowerSwitch platforms running Enterprise SONiC Distribution by Dell Technologies Driver - supports dellenterprisesonic.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -1836,7 +1882,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -1881,12 +1927,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -1894,9 +1940,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class DellSonicSSH(NoEnable, CiscoSSHConnection):
         """
         Dell EMC PowerSwitch platforms running Enterprise SONiC Distribution
    @@ -1939,12 +1987,14 @@ 

    Ancestors

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read(pattern=r"[>$#]")
    @@ -2085,9 +2135,7 @@ 

    - - \ No newline at end of file diff --git a/docs/netmiko/dlink/dlink_ds.html b/docs/netmiko/dlink/dlink_ds.html index 8d2ae473b..e9308a4b0 100644 --- a/docs/netmiko/dlink/dlink_ds.html +++ b/docs/netmiko/dlink/dlink_ds.html @@ -3,15 +3,17 @@ - + netmiko.dlink.dlink_ds API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.dlink.dlink_ds

    -Source code + +Expand source code +
    from typing import Any
     from netmiko.no_enable import NoEnable
     from netmiko.no_config import NoConfig
    @@ -74,16 +78,16 @@ 

    Classes

    -

    Supports D-Link DGS/DES device series (there are some DGS/DES devices that are web-only)

    +

    Supports D-Link DGS/DES device series (there are some DGS/DES devices that are web-only)

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -122,7 +126,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -167,12 +171,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -180,9 +184,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class DlinkDSBase(NoEnable, NoConfig, CiscoSSHConnection):
         """Supports D-Link DGS/DES device series (there are some DGS/DES devices that are web-only)"""
     
    @@ -222,12 +228,14 @@ 

    Subclasses

    Methods

    -

    Return paging before disconnect

    +

    Return paging before disconnect

    -Source code + +Expand source code +
    def cleanup(self, command: str = "logout") -> None:
         """Return paging before disconnect"""
         self.send_command_timing("enable clipaging")
    @@ -235,12 +243,14 @@ 

    Methods

    -

    Saves configuration.

    +

    Saves configuration.

    -Source code + +Expand source code +
    def save_config(
         self, cmd: str = "save", confirm: bool = False, confirm_response: str = ""
     ) -> str:
    @@ -251,12 +261,14 @@ 

    Methods

    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self.ansi_escape_codes = True
    @@ -314,16 +326,16 @@ 

    Inherited members

    -

    Supports D-Link DGS/DES device series (there are some DGS/DES devices that are web-only)

    +

    Supports D-Link DGS/DES device series (there are some DGS/DES devices that are web-only)

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -362,7 +374,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -407,12 +419,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -420,9 +432,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class DlinkDSSSH(DlinkDSBase):
         pass
    @@ -486,16 +500,16 @@

    Inherited members

    -

    Supports D-Link DGS/DES device series (there are some DGS/DES devices that are web-only)

    +

    Supports D-Link DGS/DES device series (there are some DGS/DES devices that are web-only)

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -534,7 +548,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -579,12 +593,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -592,9 +606,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class DlinkDSTelnet(DlinkDSBase):
         def __init__(self, *args: Any, **kwargs: Any) -> None:
             default_enter = kwargs.get("default_enter")
    @@ -695,9 +711,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/dlink/index.html b/docs/netmiko/dlink/index.html index e40cf2bae..32be79183 100644 --- a/docs/netmiko/dlink/index.html +++ b/docs/netmiko/dlink/index.html @@ -3,15 +3,17 @@ - + netmiko.dlink API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.dlink

    -Source code + +Expand source code +
    from netmiko.dlink.dlink_ds import DlinkDSTelnet, DlinkDSSSH
     
     __all__ = ["DlinkDSTelnet", "DlinkDSSSH"]
    @@ -32,7 +36,7 @@

    Sub-modules

    netmiko.dlink.dlink_ds
    -
    +
    @@ -45,16 +49,16 @@

    Classes

    class DlinkDSSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Supports D-Link DGS/DES device series (there are some DGS/DES devices that are web-only)

    +

    Supports D-Link DGS/DES device series (there are some DGS/DES devices that are web-only)

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -93,7 +97,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -138,12 +142,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -151,9 +155,11 @@

    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). -
    +

    -Source code + +Expand source code +
    class DlinkDSSSH(DlinkDSBase):
         pass
    @@ -217,16 +223,16 @@

    Inherited members

    class DlinkDSTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Supports D-Link DGS/DES device series (there are some DGS/DES devices that are web-only)

    +

    Supports D-Link DGS/DES device series (there are some DGS/DES devices that are web-only)

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -265,7 +271,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -310,12 +316,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -323,9 +329,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class DlinkDSTelnet(DlinkDSBase):
         def __init__(self, *args: Any, **kwargs: Any) -> None:
             default_enter = kwargs.get("default_enter")
    @@ -423,9 +431,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/eltex/eltex_esr_ssh.html b/docs/netmiko/eltex/eltex_esr_ssh.html index 6e3d79389..4a9a48bd5 100644 --- a/docs/netmiko/eltex/eltex_esr_ssh.html +++ b/docs/netmiko/eltex/eltex_esr_ssh.html @@ -3,15 +3,17 @@ - + netmiko.eltex.eltex_esr_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.eltex.eltex_esr_ssh

    -Source code + +Expand source code +
    from typing import Optional, Any
     import warnings
     from netmiko.base_connection import DELAY_FACTOR_DEPR_SIMPLE_MSG
    @@ -50,7 +54,10 @@ 

    Module netmiko.eltex.eltex_esr_ssh

    ) def check_config_mode( - self, check_string: str = "(config", pattern: str = "" + self, + check_string: str = "(config", + pattern: str = "", + force_regex: bool = False, ) -> bool: """Checks whether in configuration mode. Returns a boolean.""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -166,16 +173,16 @@

    Classes

    class EltexEsrSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Netmiko support for routers Eltex ESR.

    +

    Netmiko support for routers Eltex ESR.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -214,7 +221,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -259,12 +266,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -272,9 +279,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class EltexEsrSSH(CiscoSSHConnection):
         """Netmiko support for routers Eltex ESR."""
     
    @@ -297,7 +306,10 @@ 

    Classes

    ) def check_config_mode( - self, check_string: str = "(config", pattern: str = "" + self, + check_string: str = "(config", + pattern: str = "", + force_regex: bool = False, ) -> bool: """Checks whether in configuration mode. Returns a boolean.""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -410,32 +422,39 @@

    Ancestors

    Methods

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

    Checks whether in configuration mode. Returns a boolean.

    +

    Checks whether in configuration mode. Returns a boolean.

    -Source code + +Expand source code +
    def check_config_mode(
    -    self, check_string: str = "(config", pattern: str = ""
    +    self,
    +    check_string: str = "(config",
    +    pattern: str = "",
    +    force_regex: bool = False,
     ) -> bool:
         """Checks whether in configuration mode. Returns a boolean."""
         return super().check_config_mode(check_string=check_string, pattern=pattern)
    -def commit(self, read_timeout=120.0, delay_factor=None) +def commit(self, read_timeout: float = 120.0, delay_factor: Optional[float] = None) ‑> str
    -

    Commit the candidate configuration. +

    Commit the candidate configuration. Commit the entered configuration. Raise an error and return the failure if the commit fails. default: command_string = commit

    -

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    +

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    -Source code + +Expand source code +
    def commit(
         self, read_timeout: float = 120.0, delay_factor: Optional[float] = None
     ) -> str:
    @@ -472,12 +491,14 @@ 

    Methods

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

    Enter configuration mode.

    +

    Enter configuration mode.

    -Source code + +Expand source code +
    def config_mode(
         self,
         config_command: str = "configure",
    @@ -491,24 +512,28 @@ 

    Methods

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

    Not Implemented (use commit() method)

    +

    Not Implemented (use commit() method)

    -Source code + +Expand source code +
    def save_config(self, *args: Any, **kwargs: Any) -> str:
         """Not Implemented (use commit() method)"""
         raise NotImplementedError
    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self.ansi_escape_codes = True
    @@ -594,9 +619,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/eltex/eltex_ssh.html b/docs/netmiko/eltex/eltex_ssh.html index 9dd3cc8d5..0b39b8ae2 100644 --- a/docs/netmiko/eltex/eltex_ssh.html +++ b/docs/netmiko/eltex/eltex_ssh.html @@ -3,15 +3,17 @@ - + netmiko.eltex.eltex_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.eltex.eltex_ssh

    -Source code + +Expand source code +
    from typing import Any
     from netmiko.cisco_base_connection import CiscoSSHConnection
     
    @@ -50,16 +54,16 @@ 

    Classes

    class EltexSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -98,7 +102,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -143,12 +147,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -156,9 +160,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class EltexSSH(CiscoSSHConnection):
         def session_preparation(self) -> None:
             """Prepare the session after the connection has been established."""
    @@ -180,24 +186,28 @@ 

    Ancestors

    Methods

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

    Not Implemented

    +

    Not Implemented

    -Source code + +Expand source code +
    def save_config(self, *args: Any, **kwargs: Any) -> str:
         """Not Implemented"""
         raise NotImplementedError
    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self.ansi_escape_codes = True
    @@ -283,9 +293,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/eltex/index.html b/docs/netmiko/eltex/index.html index d8e17cec8..b178c848a 100644 --- a/docs/netmiko/eltex/index.html +++ b/docs/netmiko/eltex/index.html @@ -3,15 +3,17 @@ - + netmiko.eltex API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.eltex

    -Source code + +Expand source code +
    from netmiko.eltex.eltex_ssh import EltexSSH
     from netmiko.eltex.eltex_esr_ssh import EltexEsrSSH
     
    @@ -33,11 +37,11 @@ 

    Sub-modules

    netmiko.eltex.eltex_esr_ssh
    -
    +
    netmiko.eltex.eltex_ssh
    -
    +
    @@ -50,16 +54,16 @@

    Classes

    class EltexEsrSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Netmiko support for routers Eltex ESR.

    +

    Netmiko support for routers Eltex ESR.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -98,7 +102,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -143,12 +147,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -156,9 +160,11 @@

    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). -
    +

    -Source code + +Expand source code +
    class EltexEsrSSH(CiscoSSHConnection):
         """Netmiko support for routers Eltex ESR."""
     
    @@ -181,7 +187,10 @@ 

    Classes

    ) def check_config_mode( - self, check_string: str = "(config", pattern: str = "" + self, + check_string: str = "(config", + pattern: str = "", + force_regex: bool = False, ) -> bool: """Checks whether in configuration mode. Returns a boolean.""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -294,32 +303,39 @@

    Ancestors

    Methods

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

    Checks whether in configuration mode. Returns a boolean.

    +

    Checks whether in configuration mode. Returns a boolean.

    -Source code + +Expand source code +
    def check_config_mode(
    -    self, check_string: str = "(config", pattern: str = ""
    +    self,
    +    check_string: str = "(config",
    +    pattern: str = "",
    +    force_regex: bool = False,
     ) -> bool:
         """Checks whether in configuration mode. Returns a boolean."""
         return super().check_config_mode(check_string=check_string, pattern=pattern)
    -def commit(self, read_timeout=120.0, delay_factor=None) +def commit(self, read_timeout: float = 120.0, delay_factor: Optional[float] = None) ‑> str
    -

    Commit the candidate configuration. +

    Commit the candidate configuration. Commit the entered configuration. Raise an error and return the failure if the commit fails. default: command_string = commit

    -

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    +

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    -Source code + +Expand source code +
    def commit(
         self, read_timeout: float = 120.0, delay_factor: Optional[float] = None
     ) -> str:
    @@ -356,12 +372,14 @@ 

    Methods

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

    Enter configuration mode.

    +

    Enter configuration mode.

    -Source code + +Expand source code +
    def config_mode(
         self,
         config_command: str = "configure",
    @@ -375,24 +393,28 @@ 

    Methods

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

    Not Implemented (use commit() method)

    +

    Not Implemented (use commit() method)

    -Source code + +Expand source code +
    def save_config(self, *args: Any, **kwargs: Any) -> str:
         """Not Implemented (use commit() method)"""
         raise NotImplementedError
    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self.ansi_escape_codes = True
    @@ -448,16 +470,16 @@ 

    Inherited members

    class EltexSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -496,7 +518,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -541,12 +563,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -554,9 +576,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class EltexSSH(CiscoSSHConnection):
         def session_preparation(self) -> None:
             """Prepare the session after the connection has been established."""
    @@ -578,24 +602,28 @@ 

    Ancestors

    Methods

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

    Not Implemented

    +

    Not Implemented

    -Source code + +Expand source code +
    def save_config(self, *args: Any, **kwargs: Any) -> str:
         """Not Implemented"""
         raise NotImplementedError
    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self.ansi_escape_codes = True
    @@ -697,9 +725,7 @@ 

    Eltex

    - - \ No newline at end of file diff --git a/docs/netmiko/endace/endace_ssh.html b/docs/netmiko/endace/endace_ssh.html index ed518a022..3d1a48f5b 100644 --- a/docs/netmiko/endace/endace_ssh.html +++ b/docs/netmiko/endace/endace_ssh.html @@ -3,15 +3,17 @@ - + netmiko.endace.endace_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.endace.endace_ssh

    -Source code + +Expand source code +
    from typing import Optional
     from netmiko.cisco_base_connection import CiscoSSHConnection
     import re
    @@ -46,7 +50,10 @@ 

    Module netmiko.endace.endace_ssh

    ) def check_config_mode( - self, check_string: str = "(config) #", pattern: str = "" + self, + check_string: str = "(config) #", + pattern: str = "", + force_regex: bool = False, ) -> bool: return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -93,16 +100,16 @@

    Classes

    class EndaceSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -141,7 +148,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -186,12 +193,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -199,9 +206,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class EndaceSSH(CiscoSSHConnection):
         def session_preparation(self) -> None:
             self._test_channel_read()
    @@ -221,7 +230,10 @@ 

    Classes

    ) def check_config_mode( - self, check_string: str = "(config) #", pattern: str = "" + self, + check_string: str = "(config) #", + pattern: str = "", + force_regex: bool = False, ) -> bool: return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -336,9 +348,7 @@

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/endace/index.html b/docs/netmiko/endace/index.html index 38d4ba2f8..ff4d45127 100644 --- a/docs/netmiko/endace/index.html +++ b/docs/netmiko/endace/index.html @@ -3,15 +3,17 @@ - + netmiko.endace API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.endace

    -Source code + +Expand source code +
    from netmiko.endace.endace_ssh import EndaceSSH
     
     __all__ = ["EndaceSSH"]
    @@ -32,7 +36,7 @@

    Sub-modules

    netmiko.endace.endace_ssh
    -
    +
    @@ -45,16 +49,16 @@

    Classes

    class EndaceSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -93,7 +97,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -138,12 +142,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -151,9 +155,11 @@

    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). -
    +

    -Source code + +Expand source code +
    class EndaceSSH(CiscoSSHConnection):
         def session_preparation(self) -> None:
             self._test_channel_read()
    @@ -173,7 +179,10 @@ 

    Classes

    ) def check_config_mode( - self, check_string: str = "(config) #", pattern: str = "" + self, + check_string: str = "(config) #", + pattern: str = "", + force_regex: bool = False, ) -> bool: return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -293,9 +302,7 @@

    E

    - - \ No newline at end of file diff --git a/docs/netmiko/enterasys/enterasys_ssh.html b/docs/netmiko/enterasys/enterasys_ssh.html index 005449156..435193e52 100644 --- a/docs/netmiko/enterasys/enterasys_ssh.html +++ b/docs/netmiko/enterasys/enterasys_ssh.html @@ -3,15 +3,17 @@ - + netmiko.enterasys.enterasys_ssh API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.enterasys.enterasys_ssh

    Enterasys support.

    -Source code + +Expand source code +
    """Enterasys support."""
     from typing import Any
     from netmiko.cisco_base_connection import CiscoSSHConnection
    @@ -53,16 +57,16 @@ 

    Classes

    class EnterasysSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Enterasys support.

    +

    Enterasys support.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -101,7 +105,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -146,12 +150,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -159,9 +163,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class EnterasysSSH(CiscoSSHConnection):
         """Enterasys support."""
     
    @@ -184,24 +190,28 @@ 

    Ancestors

    Methods

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

    Not Implemented

    +

    Not Implemented

    -Source code + +Expand source code +
    def save_config(self, *args: Any, **kwargs: Any) -> str:
         """Not Implemented"""
         raise NotImplementedError
    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Enterasys requires enable mode to disable paging.

    +

    Enterasys requires enable mode to disable paging.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Enterasys requires enable mode to disable paging."""
         self._test_channel_read(pattern=r">")
    @@ -286,9 +296,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/enterasys/index.html b/docs/netmiko/enterasys/index.html index ffd9388f0..1ab380551 100644 --- a/docs/netmiko/enterasys/index.html +++ b/docs/netmiko/enterasys/index.html @@ -3,15 +3,17 @@ - + netmiko.enterasys API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.enterasys

    -Source code + +Expand source code +
    from netmiko.enterasys.enterasys_ssh import EnterasysSSH
     
     __all__ = ["EnterasysSSH"]
    @@ -32,7 +36,7 @@

    Sub-modules

    netmiko.enterasys.enterasys_ssh
    -

    Enterasys support.

    +

    Enterasys support.

    @@ -45,16 +49,16 @@

    Classes

    class EnterasysSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Enterasys support.

    +

    Enterasys support.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -93,7 +97,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -138,12 +142,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -151,9 +155,11 @@

    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). -
    +

    -Source code + +Expand source code +
    class EnterasysSSH(CiscoSSHConnection):
         """Enterasys support."""
     
    @@ -176,24 +182,28 @@ 

    Ancestors

    Methods

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

    Not Implemented

    +

    Not Implemented

    -Source code + +Expand source code +
    def save_config(self, *args: Any, **kwargs: Any) -> str:
         """Not Implemented"""
         raise NotImplementedError
    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Enterasys requires enable mode to disable paging.

    +

    Enterasys requires enable mode to disable paging.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Enterasys requires enable mode to disable paging."""
         self._test_channel_read(pattern=r">")
    @@ -283,9 +293,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/ericsson/ericsson_ipos.html b/docs/netmiko/ericsson/ericsson_ipos.html index afb38cfe6..ea249833f 100644 --- a/docs/netmiko/ericsson/ericsson_ipos.html +++ b/docs/netmiko/ericsson/ericsson_ipos.html @@ -3,15 +3,17 @@ - + netmiko.ericsson.ericsson_ipos API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.ericsson.ericsson_ipos

    Ericsson Ipos looks like it was RedBack equipment.

    -Source code + +Expand source code +
    """
     Ericsson Ipos looks like it was RedBack equipment.
     """
    @@ -57,7 +61,9 @@ 

    Module netmiko.ericsson.ericsson_ipos

    def exit_enable_mode(self, exit_command: str = "disable") -> str: return super().exit_enable_mode(exit_command=exit_command) - def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool: + 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) def config_mode( @@ -182,17 +188,17 @@

    Classes

    class EricssonIposSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Defines vendor independent methods.

    +

    Defines vendor independent methods.

    Otherwise method left as a stub method.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -231,7 +237,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -276,12 +282,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -289,9 +295,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class EricssonIposSSH(BaseConnection):
         def session_preparation(self) -> None:
             self._test_channel_read(pattern=r"[>#]")
    @@ -316,7 +324,9 @@ 

    Classes

    def exit_enable_mode(self, exit_command: str = "disable") -> str: return super().exit_enable_mode(exit_command=exit_command) - def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool: + 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) def config_mode( @@ -436,16 +446,18 @@

    Ancestors

    Methods

    -def commit(self, confirm=False, confirm_delay=None, comment='', read_timeout=120.0, delay_factor=None) +def commit(self, confirm: bool = False, confirm_delay: Optional[int] = None, comment: str = '', read_timeout: float = 120.0, delay_factor: Optional[float] = None) ‑> str
    -

    Commit the candidate configuration.

    +

    Commit the candidate configuration.

    Commit the entered configuration. Raise an error and return the failure if the commit fails.

    Automatically enters configuration mode

    -

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    +

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    -Source code + +Expand source code +
    def commit(
         self,
         confirm: bool = False,
    @@ -505,15 +517,17 @@ 

    Methods

    -def exit_config_mode(self, exit_config='end', pattern='#') +def exit_config_mode(self, exit_config: str = 'end', pattern: str = '#') ‑> str
    -

    Exit from configuration mode. +

    Exit from configuration mode. Ercisson output : end -Commit configuration changes and return to exec mode

    +Commit configuration changes and return to exec mode

    -Source code + +Expand source code +
    def exit_config_mode(self, exit_config: str = "end", pattern: str = "#") -> str:
         """
         Exit from configuration mode.
    @@ -524,12 +538,14 @@ 

    Methods

    -def save_config(self, cmd='save config', confirm=True, confirm_response='yes') +def save_config(self, cmd: str = 'save config', confirm: bool = True, confirm_response: str = 'yes') ‑> str
    -

    Saves configuration

    +

    Saves configuration

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "save config",
    @@ -559,12 +575,14 @@ 

    Methods

    -def send_config_set(self, config_commands=None, exit_config_mode=False, **kwargs) +def send_config_set(self, config_commands: Union[str, Sequence[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, **kwargs: Any) ‑> str
    -

    Ericsson IPOS requires you not exit from configuration mode.

    +

    Ericsson IPOS requires you not exit from configuration mode.

    -Source code + +Expand source code +
    def send_config_set(
         self,
         config_commands: Union[str, Sequence[str], TextIO, None] = None,
    @@ -654,9 +672,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/ericsson/index.html b/docs/netmiko/ericsson/index.html index 28fcbdade..6d7992990 100644 --- a/docs/netmiko/ericsson/index.html +++ b/docs/netmiko/ericsson/index.html @@ -3,15 +3,17 @@ - + netmiko.ericsson API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.ericsson

    -Source code + +Expand source code +
    from netmiko.ericsson.ericsson_ipos import EricssonIposSSH
     
     __all__ = ["EricssonIposSSH"]
    @@ -32,7 +36,7 @@

    Sub-modules

    netmiko.ericsson.ericsson_ipos
    -

    Ericsson Ipos looks like it was RedBack equipment.

    +

    Ericsson Ipos looks like it was RedBack equipment.

    @@ -45,17 +49,17 @@

    Classes

    class EricssonIposSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Defines vendor independent methods.

    +

    Defines vendor independent methods.

    Otherwise method left as a stub method.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -94,7 +98,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -139,12 +143,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -152,9 +156,11 @@

    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). -
    +

    -Source code + +Expand source code +
    class EricssonIposSSH(BaseConnection):
         def session_preparation(self) -> None:
             self._test_channel_read(pattern=r"[>#]")
    @@ -179,7 +185,9 @@ 

    Classes

    def exit_enable_mode(self, exit_command: str = "disable") -> str: return super().exit_enable_mode(exit_command=exit_command) - def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool: + 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) def config_mode( @@ -299,16 +307,18 @@

    Ancestors

    Methods

    -def commit(self, confirm=False, confirm_delay=None, comment='', read_timeout=120.0, delay_factor=None) +def commit(self, confirm: bool = False, confirm_delay: Optional[int] = None, comment: str = '', read_timeout: float = 120.0, delay_factor: Optional[float] = None) ‑> str
    -

    Commit the candidate configuration.

    +

    Commit the candidate configuration.

    Commit the entered configuration. Raise an error and return the failure if the commit fails.

    Automatically enters configuration mode

    -

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    +

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    -Source code + +Expand source code +
    def commit(
         self,
         confirm: bool = False,
    @@ -368,15 +378,17 @@ 

    Methods

    -def exit_config_mode(self, exit_config='end', pattern='#') +def exit_config_mode(self, exit_config: str = 'end', pattern: str = '#') ‑> str
    -

    Exit from configuration mode. +

    Exit from configuration mode. Ercisson output : end -Commit configuration changes and return to exec mode

    +Commit configuration changes and return to exec mode

    -Source code + +Expand source code +
    def exit_config_mode(self, exit_config: str = "end", pattern: str = "#") -> str:
         """
         Exit from configuration mode.
    @@ -387,12 +399,14 @@ 

    Methods

    -def save_config(self, cmd='save config', confirm=True, confirm_response='yes') +def save_config(self, cmd: str = 'save config', confirm: bool = True, confirm_response: str = 'yes') ‑> str
    -

    Saves configuration

    +

    Saves configuration

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "save config",
    @@ -422,12 +436,14 @@ 

    Methods

    -def send_config_set(self, config_commands=None, exit_config_mode=False, **kwargs) +def send_config_set(self, config_commands: Union[str, Sequence[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, **kwargs: Any) ‑> str
    -

    Ericsson IPOS requires you not exit from configuration mode.

    +

    Ericsson IPOS requires you not exit from configuration mode.

    -Source code + +Expand source code +
    def send_config_set(
         self,
         config_commands: Union[str, Sequence[str], TextIO, None] = None,
    @@ -522,9 +538,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/exceptions.html b/docs/netmiko/exceptions.html index ad8b6a8fb..03a0c8ef2 100644 --- a/docs/netmiko/exceptions.html +++ b/docs/netmiko/exceptions.html @@ -3,15 +3,17 @@ - + netmiko.exceptions API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.exceptions

    -Source code + +Expand source code +
    from paramiko.ssh_exception import SSHException
     from paramiko.ssh_exception import AuthenticationException
     
    @@ -94,9 +98,11 @@ 

    Classes

    (*args, **kwargs)
    -

    Exception raised for invalid configuration error.

    +

    Exception raised for invalid configuration error.

    -Source code + +Expand source code +
    class ConfigInvalidException(NetmikoBaseException):
         """Exception raised for invalid configuration error."""
     
    @@ -114,9 +120,11 @@ 

    Ancestors

    (*args, **kwargs)
    -

    Generic exception indicating the connection failed.

    +

    Generic exception indicating the connection failed.

    -Source code + +Expand source code +
    class ConnectionException(NetmikoBaseException):
         """Generic exception indicating the connection failed."""
     
    @@ -130,13 +138,15 @@ 

    Ancestors

    -class NetMikoAuthenticationException +class NetmikoAuthenticationException (*args, **kwargs)
    -

    SSH authentication exception based on Paramiko AuthenticationException.

    +

    SSH authentication exception based on Paramiko AuthenticationException.

    -Source code + +Expand source code +
    class NetmikoAuthenticationException(AuthenticationException):
         """SSH authentication exception based on Paramiko AuthenticationException."""
     
    @@ -150,34 +160,16 @@ 

    Ancestors

  • builtins.BaseException
  • -
    -class NetMikoTimeoutException -(*args, **kwargs) -
    -
    -

    SSH session timed trying to connect to the device.

    -
    -Source code -
    class NetmikoTimeoutException(SSHException):
    -    """SSH session timed trying to connect to the device."""
    -
    -    pass
    -
    -

    Ancestors

    -
      -
    • paramiko.ssh_exception.SSHException
    • -
    • builtins.Exception
    • -
    • builtins.BaseException
    • -
    -
    -class NetmikoAuthenticationException +class NetMikoAuthenticationException (*args, **kwargs)
    -

    SSH authentication exception based on Paramiko AuthenticationException.

    +

    SSH authentication exception based on Paramiko AuthenticationException.

    -Source code + +Expand source code +
    class NetmikoAuthenticationException(AuthenticationException):
         """SSH authentication exception based on Paramiko AuthenticationException."""
     
    @@ -196,9 +188,11 @@ 

    Ancestors

    (*args, **kwargs)
    -

    General base exception except for exceptions that inherit from Paramiko.

    +

    General base exception except for exceptions that inherit from Paramiko.

    -Source code + +Expand source code +
    class NetmikoBaseException(Exception):
         """General base exception except for exceptions that inherit from Paramiko."""
     
    @@ -211,10 +205,10 @@ 

    Ancestors

    Subclasses

    @@ -222,9 +216,33 @@

    Subclasses

    (*args, **kwargs)
    -

    SSH session timed trying to connect to the device.

    +

    SSH session timed trying to connect to the device.

    -Source code + +Expand source code + +
    class NetmikoTimeoutException(SSHException):
    +    """SSH session timed trying to connect to the device."""
    +
    +    pass
    +
    +

    Ancestors

    +
      +
    • paramiko.ssh_exception.SSHException
    • +
    • builtins.Exception
    • +
    • builtins.BaseException
    • +
    +
    +
    +class NetMikoTimeoutException +(*args, **kwargs) +
    +
    +

    SSH session timed trying to connect to the device.

    +
    + +Expand source code +
    class NetmikoTimeoutException(SSHException):
         """SSH session timed trying to connect to the device."""
     
    @@ -242,9 +260,11 @@ 

    Ancestors

    (*args, **kwargs)
    -

    General exception indicating an error occurred during a Netmiko read operation.

    +

    General exception indicating an error occurred during a Netmiko read operation.

    -Source code + +Expand source code +
    class ReadException(NetmikoBaseException):
         """General exception indicating an error occurred during a Netmiko read operation."""
     
    @@ -266,9 +286,11 @@ 

    Subclasses

    (*args, **kwargs)
    -

    General exception indicating an error occurred during a Netmiko read operation.

    +

    General exception indicating an error occurred during a Netmiko read operation.

    -Source code + +Expand source code +
    class ReadTimeout(ReadException):
         """General exception indicating an error occurred during a Netmiko read operation."""
     
    @@ -287,9 +309,11 @@ 

    Ancestors

    (*args, **kwargs)
    -

    General exception indicating an error occurred during a Netmiko write operation.

    +

    General exception indicating an error occurred during a Netmiko write operation.

    -Source code + +Expand source code +
    class WriteException(NetmikoBaseException):
         """General exception indicating an error occurred during a Netmiko write operation."""
     
    @@ -328,9 +352,6 @@ 

    NetmikoAuthenticationException

  • -

    NetmikoTimeoutException

    -
  • -
  • NetmikoAuthenticationException

  • @@ -340,6 +361,9 @@

    NetmikoTimeoutException

  • +

    NetmikoTimeoutException

    +
  • +
  • ReadException

  • @@ -354,9 +378,7 @@

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/extreme/extreme_ers_ssh.html b/docs/netmiko/extreme/extreme_ers_ssh.html index c64ffbdb0..97f37e317 100644 --- a/docs/netmiko/extreme/extreme_ers_ssh.html +++ b/docs/netmiko/extreme/extreme_ers_ssh.html @@ -3,15 +3,17 @@ - + netmiko.extreme.extreme_ers_ssh API documentation - - - - - + + + + + + +
    @@ -22,10 +24,13 @@

    Module netmiko.extreme.extreme_ers_ssh

    Netmiko support for Extreme Ethernet Routing Switch.

    -Source code + +Expand source code +
    """Netmiko support for Extreme Ethernet Routing Switch."""
    -import time
    +import re
     from netmiko.cisco_base_connection import CiscoSSHConnection
    +from netmiko.exceptions import NetmikoAuthenticationException
     
     # Extreme ERS presents Enter Ctrl-Y to begin.
     CTRL_Y = "\x19"
    @@ -34,8 +39,10 @@ 

    Module netmiko.extreme.extreme_ers_ssh

    class ExtremeErsSSH(CiscoSSHConnection): """Netmiko support for Extreme Ethernet Routing Switch.""" + prompt_pattern = r"(?m:[>#]\s*$)" # force re.Multiline + def session_preparation(self) -> None: - self._test_channel_read(pattern=r"[>#]") + # special_login_handler() will always ensure self.prompt_pattern self.set_base_prompt() self.set_terminal_width() self.disable_paging() @@ -44,30 +51,43 @@

    Module netmiko.extreme.extreme_ers_ssh

    """ Extreme ERS presents the following as part of the login process: - Enter Ctrl-Y to begin. + Enter Ctrl-Y to begin + + Older devices the Ctrl-Y is before SSH-login (not 100% sure of this). + + Newer devices this is after SSH-login. """ - delay_factor = self.select_delay_factor(delay_factor) - # Handle 'Enter Ctrl-Y to begin' output = "" - i = 0 - while i <= 12: - output = self.read_channel() - if output: - if "Ctrl-Y" in output: - self.write_channel(CTRL_Y) - if "sername" in output: - assert isinstance(self.username, str) - self.write_channel(self.username + self.RETURN) - elif "ssword" in output: - assert isinstance(self.password, str) - self.write_channel(self.password + self.RETURN) - break - time.sleep(0.5 * delay_factor) + uname = "sername" + password = "ssword" + cntl_y = "Ctrl-Y" + pattern = rf"(?:{uname}|{password}|{cntl_y}|{self.prompt_pattern})" + while True: + new_data = self.read_until_pattern(pattern=pattern, read_timeout=25.0) + output += new_data + if re.search(self.prompt_pattern, new_data): + return + + if cntl_y in new_data: + self.write_channel(CTRL_Y) + elif uname 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: - self.write_channel(self.RETURN) - time.sleep(1 * delay_factor) - i += 1 + msg = f""" +Failed to login to Extreme ERS Devices. + +Pattern not detected: {pattern} +output: + +{output} + +""" + raise NetmikoAuthenticationException(msg) def save_config( self, @@ -92,16 +112,16 @@

    Classes

    class ExtremeErsSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Netmiko support for Extreme Ethernet Routing Switch.

    +

    Netmiko support for Extreme Ethernet Routing Switch.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -140,7 +160,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -185,12 +205,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -198,14 +218,18 @@

    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). -
    +
    -Source code + +Expand source code +
    class ExtremeErsSSH(CiscoSSHConnection):
         """Netmiko support for Extreme Ethernet Routing Switch."""
     
    +    prompt_pattern = r"(?m:[>#]\s*$)"  # force re.Multiline
    +
         def session_preparation(self) -> None:
    -        self._test_channel_read(pattern=r"[>#]")
    +        # special_login_handler() will always ensure self.prompt_pattern
             self.set_base_prompt()
             self.set_terminal_width()
             self.disable_paging()
    @@ -214,30 +238,43 @@ 

    Classes

    """ Extreme ERS presents the following as part of the login process: - Enter Ctrl-Y to begin. + Enter Ctrl-Y to begin + + Older devices the Ctrl-Y is before SSH-login (not 100% sure of this). + + Newer devices this is after SSH-login. """ - delay_factor = self.select_delay_factor(delay_factor) - # Handle 'Enter Ctrl-Y to begin' output = "" - i = 0 - while i <= 12: - output = self.read_channel() - if output: - if "Ctrl-Y" in output: - self.write_channel(CTRL_Y) - if "sername" in output: - assert isinstance(self.username, str) - self.write_channel(self.username + self.RETURN) - elif "ssword" in output: - assert isinstance(self.password, str) - self.write_channel(self.password + self.RETURN) - break - time.sleep(0.5 * delay_factor) + uname = "sername" + password = "ssword" + cntl_y = "Ctrl-Y" + pattern = rf"(?:{uname}|{password}|{cntl_y}|{self.prompt_pattern})" + while True: + new_data = self.read_until_pattern(pattern=pattern, read_timeout=25.0) + output += new_data + if re.search(self.prompt_pattern, new_data): + return + + if cntl_y in new_data: + self.write_channel(CTRL_Y) + elif uname 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: - self.write_channel(self.RETURN) - time.sleep(1 * delay_factor) - i += 1 + msg = f""" +Failed to login to Extreme ERS Devices. + +Pattern not detected: {pattern} +output: + +{output} + +""" + raise NetmikoAuthenticationException(msg) def save_config( self, @@ -256,15 +293,24 @@

    Ancestors

  • CiscoBaseConnection
  • BaseConnection
  • +

    Class variables

    +
    +
    var prompt_pattern
    +
    +
    +
    +

    Methods

    -def save_config(self, cmd='save config', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'save config', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Save Config

    +

    Save Config

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "save config",
    @@ -278,41 +324,58 @@ 

    Methods

    -def special_login_handler(self, delay_factor=1.0) +def special_login_handler(self, delay_factor: float = 1.0) ‑> None
    -

    Extreme ERS presents the following as part of the login process:

    -

    Enter Ctrl-Y to begin.

    +

    Extreme ERS presents the following as part of the login process:

    +

    Enter Ctrl-Y to begin

    +

    Older devices the Ctrl-Y is before SSH-login (not 100% sure of this).

    +

    Newer devices this is after SSH-login.

    -Source code -
    def special_login_handler(self, delay_factor: float = 1.0) -> None:
    -    """
    -    Extreme ERS presents the following as part of the login process:
    -
    -    Enter Ctrl-Y to begin.
    -    """
    -    delay_factor = self.select_delay_factor(delay_factor)
    -
    -    # Handle 'Enter Ctrl-Y to begin'
    -    output = ""
    -    i = 0
    -    while i <= 12:
    -        output = self.read_channel()
    -        if output:
    -            if "Ctrl-Y" in output:
    +
    +Expand source code
    +
    +
        def special_login_handler(self, delay_factor: float = 1.0) -> None:
    +        """
    +        Extreme ERS presents the following as part of the login process:
    +
    +        Enter Ctrl-Y to begin
    +
    +        Older devices the Ctrl-Y is before SSH-login (not 100% sure of this).
    +
    +        Newer devices this is after SSH-login.
    +        """
    +
    +        output = ""
    +        uname = "sername"
    +        password = "ssword"
    +        cntl_y = "Ctrl-Y"
    +        pattern = rf"(?:{uname}|{password}|{cntl_y}|{self.prompt_pattern})"
    +        while True:
    +            new_data = self.read_until_pattern(pattern=pattern, read_timeout=25.0)
    +            output += new_data
    +            if re.search(self.prompt_pattern, new_data):
    +                return
    +
    +            if cntl_y in new_data:
                     self.write_channel(CTRL_Y)
    -            if "sername" in output:
    +            elif uname in new_data:
                     assert isinstance(self.username, str)
                     self.write_channel(self.username + self.RETURN)
    -            elif "ssword" in output:
    +            elif password in new_data:
                     assert isinstance(self.password, str)
                     self.write_channel(self.password + self.RETURN)
    -                break
    -            time.sleep(0.5 * delay_factor)
    -        else:
    -            self.write_channel(self.RETURN)
    -            time.sleep(1 * delay_factor)
    -        i += 1
    + else: + msg = f""" +Failed to login to Extreme ERS Devices. + +Pattern not detected: {pattern} +output: + +{output} + +""" + raise NetmikoAuthenticationException(msg)
    @@ -382,6 +445,7 @@

    Index

  • ExtremeErsSSH

    @@ -392,9 +456,7 @@

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/extreme/extreme_exos.html b/docs/netmiko/extreme/extreme_exos.html index c8295b8dc..8d4a89c11 100644 --- a/docs/netmiko/extreme/extreme_exos.html +++ b/docs/netmiko/extreme/extreme_exos.html @@ -3,15 +3,17 @@ - + netmiko.extreme.extreme_exos API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.extreme.extreme_exos

    Extreme support.

    -Source code + +Expand source code +
    """Extreme support."""
     import os
     from typing import Any, Callable, Optional, Union, List, Dict
    @@ -254,17 +258,17 @@ 

    Classes

    class ExtremeExosBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Extreme Exos support.

    +

    Extreme Exos support.

    Designed for EXOS >= 15.0

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -303,7 +307,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -348,12 +352,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -361,9 +365,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class ExtremeExosBase(NoConfig, CiscoSSHConnection):
         """Extreme Exos support.
     
    @@ -438,12 +444,14 @@ 

    Subclasses

    Methods

    -def save_config(self, cmd='save configuration primary', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'save configuration primary', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Saves configuration.

    +

    Saves configuration.

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "save configuration primary",
    @@ -457,12 +465,14 @@ 

    Methods

    -def send_command(self, *args, **kwargs) +def send_command(self, *args: Any, **kwargs: Any) ‑> Union[str, List[Any], Dict[str, Any]]
    -

    Extreme needs special handler here due to the prompt changes.

    +

    Extreme needs special handler here due to the prompt changes.

    -Source code + +Expand source code +
    def send_command(
         self, *args: Any, **kwargs: Any
     ) -> Union[str, List[Any], Dict[str, Any]]:
    @@ -477,10 +487,10 @@ 

    Methods

    -def set_base_prompt(self, *args, **kwargs) +def set_base_prompt(self, *args: Any, **kwargs: Any) ‑> str
    -

    Extreme attaches an id to the prompt. The id increases with every command. +

    Extreme attaches an id to the prompt. The id increases with every command. It needs to br stripped off to match the prompt. Eg.

    testhost.1 #
     testhost.2 #
    @@ -490,9 +500,11 @@ 

    Methods

    prompt, eg.

    * testhost.4 #
     * testhost.5 #
    -
    +
    -Source code + +Expand source code +
    def set_base_prompt(self, *args: Any, **kwargs: Any) -> str:
         """
         Extreme attaches an id to the prompt. The id increases with every command.
    @@ -567,12 +579,14 @@ 

    Inherited members

  • class ExtremeExosFileTransfer -(ssh_conn, source_file, dest_file, file_system='/usr/local/cfg', direction='put', socket_timeout=10.0, progress=None, progress4=None, hash_supported=False) +(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: Optional[str] = '/usr/local/cfg', direction: str = 'put', socket_timeout: float = 10.0, progress: Optional[Callable[..., Any]] = None, progress4: Optional[Callable[..., Any]] = None, hash_supported: bool = False)
    -

    Extreme EXOS SCP File Transfer driver.

    +

    Extreme EXOS SCP File Transfer driver.

    -Source code + +Expand source code +
    class ExtremeExosFileTransfer(BaseFileTransfer):
         """Extreme EXOS SCP File Transfer driver."""
     
    @@ -718,12 +732,14 @@ 

    Ancestors

    Methods

    -def verify_file(self) +def verify_file(self) ‑> bool
    -

    Verify the file has been transferred correctly based on filesize.

    +

    Verify the file has been transferred correctly based on filesize.

    -Source code + +Expand source code +
    def verify_file(self) -> bool:
         """Verify the file has been transferred correctly based on filesize."""
         if self.direction == "put":
    @@ -766,17 +782,17 @@ 

    Inherited members

    class ExtremeExosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Extreme Exos support.

    +

    Extreme Exos support.

    Designed for EXOS >= 15.0

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -815,7 +831,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -860,12 +876,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -873,9 +889,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class ExtremeExosSSH(ExtremeExosBase):
         pass
    @@ -938,17 +956,17 @@

    Inherited members

    class ExtremeExosTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Extreme Exos support.

    +

    Extreme Exos support.

    Designed for EXOS >= 15.0

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -987,7 +1005,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -1032,12 +1050,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -1045,9 +1063,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class ExtremeExosTelnet(ExtremeExosBase):
         def __init__(self, *args: Any, **kwargs: Any) -> None:
             default_enter = kwargs.get("default_enter")
    @@ -1153,9 +1173,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/extreme/extreme_netiron.html b/docs/netmiko/extreme/extreme_netiron.html index d886f564e..b3e7d244e 100644 --- a/docs/netmiko/extreme/extreme_netiron.html +++ b/docs/netmiko/extreme/extreme_netiron.html @@ -3,15 +3,17 @@ - + netmiko.extreme.extreme_netiron API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.extreme.extreme_netiron

    -Source code + +Expand source code +
    from typing import Any
     from netmiko.cisco_base_connection import CiscoSSHConnection
     
    @@ -68,16 +72,16 @@ 

    Classes

    class ExtremeNetironBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -116,7 +120,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -161,12 +165,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -174,9 +178,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class ExtremeNetironBase(CiscoSSHConnection):
         def session_preparation(self) -> None:
             """Prepare the session after the connection has been established."""
    @@ -210,12 +216,14 @@ 

    Subclasses

    Methods

    -def save_config(self, cmd='write memory', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'write memory', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Save Config

    +

    Save Config

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "write memory",
    @@ -229,12 +237,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read(pattern=r"[>#]")
    @@ -293,16 +303,16 @@ 

    Inherited members

    class ExtremeNetironSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -341,7 +351,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -386,12 +396,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -399,9 +409,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class ExtremeNetironSSH(ExtremeNetironBase):
         pass
    @@ -463,16 +475,16 @@

    Inherited members

    class ExtremeNetironTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -511,7 +523,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -556,12 +568,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -569,9 +581,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class ExtremeNetironTelnet(ExtremeNetironBase):
         def __init__(self, *args: Any, **kwargs: Any) -> None:
             default_enter = kwargs.get("default_enter")
    @@ -669,9 +683,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/extreme/extreme_nos_ssh.html b/docs/netmiko/extreme/extreme_nos_ssh.html index cb8b66973..7d3891c0a 100644 --- a/docs/netmiko/extreme/extreme_nos_ssh.html +++ b/docs/netmiko/extreme/extreme_nos_ssh.html @@ -3,15 +3,17 @@ - + netmiko.extreme.extreme_nos_ssh API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.extreme.extreme_nos_ssh

    Support for Extreme NOS/VDX.

    -Source code + +Expand source code +
    """Support for Extreme NOS/VDX."""
     import time
     from netmiko.no_enable import NoEnable
    @@ -67,16 +71,16 @@ 

    Classes

    class ExtremeNosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Support for Extreme NOS/VDX.

    +

    Support for Extreme NOS/VDX.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -115,7 +119,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -160,12 +164,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -173,9 +177,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class ExtremeNosSSH(NoEnable, CiscoSSHConnection):
         """Support for Extreme NOS/VDX."""
     
    @@ -212,12 +218,14 @@ 

    Ancestors

    Methods

    -def save_config(self, cmd='copy running-config startup-config', confirm=True, confirm_response='y') +def save_config(self, cmd: str = 'copy running-config startup-config', confirm: bool = True, confirm_response: str = 'y') ‑> str
    -

    Save Config for Extreme VDX.

    +

    Save Config for Extreme VDX.

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "copy running-config startup-config",
    @@ -231,12 +239,14 @@ 

    Methods

    -def special_login_handler(self, delay_factor=1.0) +def special_login_handler(self, delay_factor: float = 1.0) ‑> None
    -

    Adding a delay after login.

    +

    Adding a delay after login.

    -Source code + +Expand source code +
    def special_login_handler(self, delay_factor: float = 1.0) -> None:
         """Adding a delay after login."""
         delay_factor = self.select_delay_factor(delay_factor)
    @@ -321,9 +331,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/extreme/extreme_slx_ssh.html b/docs/netmiko/extreme/extreme_slx_ssh.html index 944ed4224..b30e52f49 100644 --- a/docs/netmiko/extreme/extreme_slx_ssh.html +++ b/docs/netmiko/extreme/extreme_slx_ssh.html @@ -3,15 +3,17 @@ - + netmiko.extreme.extreme_slx_ssh API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.extreme.extreme_slx_ssh

    Support for Extreme SLX.

    -Source code + +Expand source code +
    """Support for Extreme SLX."""
     import time
     from netmiko.no_enable import NoEnable
    @@ -67,16 +71,16 @@ 

    Classes

    class ExtremeSlxSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Support for Extreme SLX.

    +

    Support for Extreme SLX.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -115,7 +119,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -160,12 +164,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -173,9 +177,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class ExtremeSlxSSH(NoEnable, CiscoSSHConnection):
         """Support for Extreme SLX."""
     
    @@ -212,12 +218,14 @@ 

    Ancestors

    Methods

    -def save_config(self, cmd='copy running-config startup-config', confirm=True, confirm_response='y') +def save_config(self, cmd: str = 'copy running-config startup-config', confirm: bool = True, confirm_response: str = 'y') ‑> str
    -

    Save Config for Extreme SLX.

    +

    Save Config for Extreme SLX.

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "copy running-config startup-config",
    @@ -231,12 +239,14 @@ 

    Methods

    -def special_login_handler(self, delay_factor=1.0) +def special_login_handler(self, delay_factor: float = 1.0) ‑> None
    -

    Adding a delay after login.

    +

    Adding a delay after login.

    -Source code + +Expand source code +
    def special_login_handler(self, delay_factor: float = 1.0) -> None:
         """Adding a delay after login."""
         delay_factor = self.select_delay_factor(delay_factor)
    @@ -321,9 +331,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/extreme/extreme_tierraos_ssh.html b/docs/netmiko/extreme/extreme_tierraos_ssh.html index 386008678..deaf1d54c 100644 --- a/docs/netmiko/extreme/extreme_tierraos_ssh.html +++ b/docs/netmiko/extreme/extreme_tierraos_ssh.html @@ -3,15 +3,17 @@ - + netmiko.extreme.extreme_tierraos_ssh API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.extreme.extreme_tierraos_ssh

    Support for Extreme TierraOS.

    -Source code + +Expand source code +
    """Support for Extreme TierraOS."""
     import time
     from netmiko.no_enable import NoEnable
    @@ -67,16 +71,16 @@ 

    Classes

    class ExtremeTierraSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Support for Extreme TierraOS.

    +

    Support for Extreme TierraOS.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -115,7 +119,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -160,12 +164,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -173,9 +177,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class ExtremeTierraSSH(NoEnable, CiscoSSHConnection):
         """Support for Extreme TierraOS."""
     
    @@ -212,12 +218,14 @@ 

    Ancestors

    Methods

    -def save_config(self, cmd='copy run flash://config-file/startup-config', confirm=False, confirm_response='y') +def save_config(self, cmd: str = 'copy run flash://config-file/startup-config', confirm: bool = False, confirm_response: str = 'y') ‑> str
    -

    Save Config for Extreme TierraOS.

    +

    Save Config for Extreme TierraOS.

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "copy run flash://config-file/startup-config",
    @@ -231,12 +239,14 @@ 

    Methods

    -def special_login_handler(self, delay_factor=1.0) +def special_login_handler(self, delay_factor: float = 1.0) ‑> None
    -

    Adding a delay after login.

    +

    Adding a delay after login.

    -Source code + +Expand source code +
    def special_login_handler(self, delay_factor: float = 1.0) -> None:
         """Adding a delay after login."""
         delay_factor = self.select_delay_factor(delay_factor)
    @@ -321,9 +331,7 @@ 

    - - \ No newline at end of file diff --git a/docs/netmiko/extreme/extreme_vsp_ssh.html b/docs/netmiko/extreme/extreme_vsp_ssh.html index 973c6bd98..6e78144e3 100644 --- a/docs/netmiko/extreme/extreme_vsp_ssh.html +++ b/docs/netmiko/extreme/extreme_vsp_ssh.html @@ -3,15 +3,17 @@ - + netmiko.extreme.extreme_vsp_ssh API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.extreme.extreme_vsp_ssh

    Extreme Virtual Services Platform Support.

    -Source code + +Expand source code +
    """Extreme Virtual Services Platform Support."""
     from netmiko.cisco_base_connection import CiscoSSHConnection
     
    @@ -59,16 +63,16 @@ 

    Classes

    class ExtremeVspSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Extreme Virtual Services Platform Support.

    +

    Extreme Virtual Services Platform Support.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -107,7 +111,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -152,12 +156,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -165,9 +169,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class ExtremeVspSSH(CiscoSSHConnection):
         """Extreme Virtual Services Platform Support."""
     
    @@ -197,12 +203,14 @@ 

    Ancestors

    Methods

    -def save_config(self, cmd='save config', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'save config', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Save Config

    +

    Save Config

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "save config",
    @@ -216,12 +224,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read(pattern=r"[>#]")
    @@ -306,9 +316,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/extreme/extreme_wing_ssh.html b/docs/netmiko/extreme/extreme_wing_ssh.html index 214b0aa62..caf599fa6 100644 --- a/docs/netmiko/extreme/extreme_wing_ssh.html +++ b/docs/netmiko/extreme/extreme_wing_ssh.html @@ -3,15 +3,17 @@ - + netmiko.extreme.extreme_wing_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.extreme.extreme_wing_ssh

    -Source code + +Expand source code +
    from netmiko.cisco_base_connection import CiscoSSHConnection
     
     
    @@ -47,16 +51,16 @@ 

    Classes

    class ExtremeWingSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Extreme WiNG support.

    +

    Extreme WiNG support.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -95,7 +99,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -140,12 +144,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -153,9 +157,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class ExtremeWingSSH(CiscoSSHConnection):
         """Extreme WiNG support."""
     
    @@ -175,12 +181,14 @@ 

    Ancestors

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Disable paging and set Max term width

    +

    Disable paging and set Max term width

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Disable paging and set Max term width"""
         self._test_channel_read(pattern=r">|#")
    @@ -266,9 +274,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/extreme/index.html b/docs/netmiko/extreme/index.html index 7f7f87590..90c7c1df2 100644 --- a/docs/netmiko/extreme/index.html +++ b/docs/netmiko/extreme/index.html @@ -3,15 +3,17 @@ - + netmiko.extreme API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.extreme

    -Source code + +Expand source code +
    from netmiko.extreme.extreme_ers_ssh import ExtremeErsSSH
     from netmiko.extreme.extreme_exos import ExtremeExosSSH, ExtremeExosFileTransfer
     from netmiko.extreme.extreme_exos import ExtremeExosTelnet
    @@ -53,35 +57,35 @@ 

    Sub-modules

    netmiko.extreme.extreme_ers_ssh
    -

    Netmiko support for Extreme Ethernet Routing Switch.

    +

    Netmiko support for Extreme Ethernet Routing Switch.

    netmiko.extreme.extreme_exos
    -

    Extreme support.

    +

    Extreme support.

    netmiko.extreme.extreme_netiron
    -
    +
    netmiko.extreme.extreme_nos_ssh
    -

    Support for Extreme NOS/VDX.

    +

    Support for Extreme NOS/VDX.

    netmiko.extreme.extreme_slx_ssh
    -

    Support for Extreme SLX.

    +

    Support for Extreme SLX.

    netmiko.extreme.extreme_tierraos_ssh
    -

    Support for Extreme TierraOS.

    +

    Support for Extreme TierraOS.

    netmiko.extreme.extreme_vsp_ssh
    -

    Extreme Virtual Services Platform Support.

    +

    Extreme Virtual Services Platform Support.

    netmiko.extreme.extreme_wing_ssh
    -
    +
    @@ -94,16 +98,16 @@

    Classes

    class ExtremeErsSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Netmiko support for Extreme Ethernet Routing Switch.

    +

    Netmiko support for Extreme Ethernet Routing Switch.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -142,7 +146,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -187,12 +191,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -200,14 +204,18 @@

    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). -
    +

    -Source code + +Expand source code +
    class ExtremeErsSSH(CiscoSSHConnection):
         """Netmiko support for Extreme Ethernet Routing Switch."""
     
    +    prompt_pattern = r"(?m:[>#]\s*$)"  # force re.Multiline
    +
         def session_preparation(self) -> None:
    -        self._test_channel_read(pattern=r"[>#]")
    +        # special_login_handler() will always ensure self.prompt_pattern
             self.set_base_prompt()
             self.set_terminal_width()
             self.disable_paging()
    @@ -216,30 +224,43 @@ 

    Classes

    """ Extreme ERS presents the following as part of the login process: - Enter Ctrl-Y to begin. + Enter Ctrl-Y to begin + + Older devices the Ctrl-Y is before SSH-login (not 100% sure of this). + + Newer devices this is after SSH-login. """ - delay_factor = self.select_delay_factor(delay_factor) - # Handle 'Enter Ctrl-Y to begin' output = "" - i = 0 - while i <= 12: - output = self.read_channel() - if output: - if "Ctrl-Y" in output: - self.write_channel(CTRL_Y) - if "sername" in output: - assert isinstance(self.username, str) - self.write_channel(self.username + self.RETURN) - elif "ssword" in output: - assert isinstance(self.password, str) - self.write_channel(self.password + self.RETURN) - break - time.sleep(0.5 * delay_factor) + uname = "sername" + password = "ssword" + cntl_y = "Ctrl-Y" + pattern = rf"(?:{uname}|{password}|{cntl_y}|{self.prompt_pattern})" + while True: + new_data = self.read_until_pattern(pattern=pattern, read_timeout=25.0) + output += new_data + if re.search(self.prompt_pattern, new_data): + return + + if cntl_y in new_data: + self.write_channel(CTRL_Y) + elif uname 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: - self.write_channel(self.RETURN) - time.sleep(1 * delay_factor) - i += 1 + msg = f""" +Failed to login to Extreme ERS Devices. + +Pattern not detected: {pattern} +output: + +{output} + +""" + raise NetmikoAuthenticationException(msg) def save_config( self, @@ -258,15 +279,24 @@

    Ancestors

  • CiscoBaseConnection
  • BaseConnection
  • +

    Class variables

    +
    +
    var prompt_pattern
    +
    +
    +
    +

    Methods

    -def save_config(self, cmd='save config', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'save config', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Save Config

    +

    Save Config

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "save config",
    @@ -280,41 +310,58 @@ 

    Methods

    -def special_login_handler(self, delay_factor=1.0) +def special_login_handler(self, delay_factor: float = 1.0) ‑> None
    -

    Extreme ERS presents the following as part of the login process:

    -

    Enter Ctrl-Y to begin.

    +

    Extreme ERS presents the following as part of the login process:

    +

    Enter Ctrl-Y to begin

    +

    Older devices the Ctrl-Y is before SSH-login (not 100% sure of this).

    +

    Newer devices this is after SSH-login.

    -Source code -
    def special_login_handler(self, delay_factor: float = 1.0) -> None:
    -    """
    -    Extreme ERS presents the following as part of the login process:
    +
    +Expand source code
    +
    +
        def special_login_handler(self, delay_factor: float = 1.0) -> None:
    +        """
    +        Extreme ERS presents the following as part of the login process:
     
    -    Enter Ctrl-Y to begin.
    -    """
    -    delay_factor = self.select_delay_factor(delay_factor)
    +        Enter Ctrl-Y to begin
     
    -    # Handle 'Enter Ctrl-Y to begin'
    -    output = ""
    -    i = 0
    -    while i <= 12:
    -        output = self.read_channel()
    -        if output:
    -            if "Ctrl-Y" in output:
    +        Older devices the Ctrl-Y is before SSH-login (not 100% sure of this).
    +
    +        Newer devices this is after SSH-login.
    +        """
    +
    +        output = ""
    +        uname = "sername"
    +        password = "ssword"
    +        cntl_y = "Ctrl-Y"
    +        pattern = rf"(?:{uname}|{password}|{cntl_y}|{self.prompt_pattern})"
    +        while True:
    +            new_data = self.read_until_pattern(pattern=pattern, read_timeout=25.0)
    +            output += new_data
    +            if re.search(self.prompt_pattern, new_data):
    +                return
    +
    +            if cntl_y in new_data:
                     self.write_channel(CTRL_Y)
    -            if "sername" in output:
    +            elif uname in new_data:
                     assert isinstance(self.username, str)
                     self.write_channel(self.username + self.RETURN)
    -            elif "ssword" in output:
    +            elif password in new_data:
                     assert isinstance(self.password, str)
                     self.write_channel(self.password + self.RETURN)
    -                break
    -            time.sleep(0.5 * delay_factor)
    -        else:
    -            self.write_channel(self.RETURN)
    -            time.sleep(1 * delay_factor)
    -        i += 1
    + else: + msg = f""" +Failed to login to Extreme ERS Devices. + +Pattern not detected: {pattern} +output: + +{output} + +""" + raise NetmikoAuthenticationException(msg)
    @@ -367,12 +414,14 @@

    Inherited members

    class ExtremeExosFileTransfer -(ssh_conn, source_file, dest_file, file_system='/usr/local/cfg', direction='put', socket_timeout=10.0, progress=None, progress4=None, hash_supported=False) +(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: Optional[str] = '/usr/local/cfg', direction: str = 'put', socket_timeout: float = 10.0, progress: Optional[Callable[..., Any]] = None, progress4: Optional[Callable[..., Any]] = None, hash_supported: bool = False)
    -

    Extreme EXOS SCP File Transfer driver.

    +

    Extreme EXOS SCP File Transfer driver.

    -Source code + +Expand source code +
    class ExtremeExosFileTransfer(BaseFileTransfer):
         """Extreme EXOS SCP File Transfer driver."""
     
    @@ -518,12 +567,14 @@ 

    Ancestors

    Methods

    -def verify_file(self) +def verify_file(self) ‑> bool
    -

    Verify the file has been transferred correctly based on filesize.

    +

    Verify the file has been transferred correctly based on filesize.

    -Source code + +Expand source code +
    def verify_file(self) -> bool:
         """Verify the file has been transferred correctly based on filesize."""
         if self.direction == "put":
    @@ -566,17 +617,17 @@ 

    Inherited members

    class ExtremeExosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Extreme Exos support.

    +

    Extreme Exos support.

    Designed for EXOS >= 15.0

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -615,7 +666,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -660,12 +711,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -673,9 +724,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class ExtremeExosSSH(ExtremeExosBase):
         pass
    @@ -738,17 +791,17 @@

    Inherited members

    class ExtremeExosTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Extreme Exos support.

    +

    Extreme Exos support.

    Designed for EXOS >= 15.0

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -787,7 +840,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -832,12 +885,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -845,9 +898,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class ExtremeExosTelnet(ExtremeExosBase):
         def __init__(self, *args: Any, **kwargs: Any) -> None:
             default_enter = kwargs.get("default_enter")
    @@ -913,16 +968,16 @@ 

    Inherited members

    class ExtremeNetironSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -961,7 +1016,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -1006,12 +1061,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -1019,9 +1074,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class ExtremeNetironSSH(ExtremeNetironBase):
         pass
    @@ -1083,16 +1140,16 @@

    Inherited members

    class ExtremeNetironTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -1131,7 +1188,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -1176,12 +1233,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -1189,9 +1246,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class ExtremeNetironTelnet(ExtremeNetironBase):
         def __init__(self, *args: Any, **kwargs: Any) -> None:
             default_enter = kwargs.get("default_enter")
    @@ -1256,16 +1315,16 @@ 

    Inherited members

    class ExtremeNosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Support for Extreme NOS/VDX.

    +

    Support for Extreme NOS/VDX.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -1304,7 +1363,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -1349,12 +1408,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -1362,9 +1421,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class ExtremeNosSSH(NoEnable, CiscoSSHConnection):
         """Support for Extreme NOS/VDX."""
     
    @@ -1401,12 +1462,14 @@ 

    Ancestors

    Methods

    -def save_config(self, cmd='copy running-config startup-config', confirm=True, confirm_response='y') +def save_config(self, cmd: str = 'copy running-config startup-config', confirm: bool = True, confirm_response: str = 'y') ‑> str
    -

    Save Config for Extreme VDX.

    +

    Save Config for Extreme VDX.

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "copy running-config startup-config",
    @@ -1420,12 +1483,14 @@ 

    Methods

    -def special_login_handler(self, delay_factor=1.0) +def special_login_handler(self, delay_factor: float = 1.0) ‑> None
    -

    Adding a delay after login.

    +

    Adding a delay after login.

    -Source code + +Expand source code +
    def special_login_handler(self, delay_factor: float = 1.0) -> None:
         """Adding a delay after login."""
         delay_factor = self.select_delay_factor(delay_factor)
    @@ -1483,16 +1548,16 @@ 

    Inherited members

    class ExtremeSlxSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Support for Extreme SLX.

    +

    Support for Extreme SLX.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -1531,7 +1596,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -1576,12 +1641,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -1589,9 +1654,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class ExtremeSlxSSH(NoEnable, CiscoSSHConnection):
         """Support for Extreme SLX."""
     
    @@ -1628,12 +1695,14 @@ 

    Ancestors

    Methods

    -def save_config(self, cmd='copy running-config startup-config', confirm=True, confirm_response='y') +def save_config(self, cmd: str = 'copy running-config startup-config', confirm: bool = True, confirm_response: str = 'y') ‑> str
    -

    Save Config for Extreme SLX.

    +

    Save Config for Extreme SLX.

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "copy running-config startup-config",
    @@ -1647,12 +1716,14 @@ 

    Methods

    -def special_login_handler(self, delay_factor=1.0) +def special_login_handler(self, delay_factor: float = 1.0) ‑> None
    -

    Adding a delay after login.

    +

    Adding a delay after login.

    -Source code + +Expand source code +
    def special_login_handler(self, delay_factor: float = 1.0) -> None:
         """Adding a delay after login."""
         delay_factor = self.select_delay_factor(delay_factor)
    @@ -1710,16 +1781,16 @@ 

    Inherited members

    class ExtremeTierraSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Support for Extreme TierraOS.

    +

    Support for Extreme TierraOS.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -1758,7 +1829,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -1803,12 +1874,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -1816,9 +1887,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class ExtremeTierraSSH(NoEnable, CiscoSSHConnection):
         """Support for Extreme TierraOS."""
     
    @@ -1855,12 +1928,14 @@ 

    Ancestors

    Methods

    -def save_config(self, cmd='copy run flash://config-file/startup-config', confirm=False, confirm_response='y') +def save_config(self, cmd: str = 'copy run flash://config-file/startup-config', confirm: bool = False, confirm_response: str = 'y') ‑> str
    -

    Save Config for Extreme TierraOS.

    +

    Save Config for Extreme TierraOS.

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "copy run flash://config-file/startup-config",
    @@ -1874,12 +1949,14 @@ 

    Methods

    -def special_login_handler(self, delay_factor=1.0) +def special_login_handler(self, delay_factor: float = 1.0) ‑> None
    -

    Adding a delay after login.

    +

    Adding a delay after login.

    -Source code + +Expand source code +
    def special_login_handler(self, delay_factor: float = 1.0) -> None:
         """Adding a delay after login."""
         delay_factor = self.select_delay_factor(delay_factor)
    @@ -1937,16 +2014,16 @@ 

    Inherited members

    class ExtremeVspSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Extreme Virtual Services Platform Support.

    +

    Extreme Virtual Services Platform Support.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -1985,7 +2062,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -2030,12 +2107,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -2043,9 +2120,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class ExtremeVspSSH(CiscoSSHConnection):
         """Extreme Virtual Services Platform Support."""
     
    @@ -2075,12 +2154,14 @@ 

    Ancestors

    Methods

    -def save_config(self, cmd='save config', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'save config', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Save Config

    +

    Save Config

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "save config",
    @@ -2094,12 +2175,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read(pattern=r"[>#]")
    @@ -2157,16 +2240,16 @@ 

    Inherited members

    class ExtremeWingSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Extreme WiNG support.

    +

    Extreme WiNG support.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -2205,7 +2288,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -2250,12 +2333,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -2263,9 +2346,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class ExtremeWingSSH(CiscoSSHConnection):
         """Extreme WiNG support."""
     
    @@ -2285,12 +2370,14 @@ 

    Ancestors

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Disable paging and set Max term width

    +

    Disable paging and set Max term width

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Disable paging and set Max term width"""
         self._test_channel_read(pattern=r">|#")
    @@ -2379,6 +2466,7 @@ 

    Index

  • ExtremeErsSSH

    @@ -2441,9 +2529,7 @@

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/f5/f5_linux_ssh.html b/docs/netmiko/f5/f5_linux_ssh.html index b0f37d060..b82e3ed28 100644 --- a/docs/netmiko/f5/f5_linux_ssh.html +++ b/docs/netmiko/f5/f5_linux_ssh.html @@ -3,15 +3,17 @@ - + netmiko.f5.f5_linux_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.f5.f5_linux_ssh

    -Source code + +Expand source code +
    from netmiko.linux.linux_ssh import LinuxSSH
     
     
    @@ -40,16 +44,16 @@ 

    Classes

    class F5LinuxSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -88,7 +92,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -133,12 +137,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -146,9 +150,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class F5LinuxSSH(LinuxSSH):
         pass
    @@ -233,9 +239,7 @@

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/f5/f5_tmsh_ssh.html b/docs/netmiko/f5/f5_tmsh_ssh.html index 6e1e2772b..dd42839d2 100644 --- a/docs/netmiko/f5/f5_tmsh_ssh.html +++ b/docs/netmiko/f5/f5_tmsh_ssh.html @@ -3,15 +3,17 @@ - + netmiko.f5.f5_tmsh_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.f5.f5_tmsh_ssh

    -Source code + +Expand source code +
    from netmiko.no_config import NoConfig
     from netmiko.base_connection import BaseConnection
     
    @@ -73,10 +77,10 @@ 

    Classes

    class F5TmshSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Class for platforms that have no config mode.

    +

    Class for platforms that have no config mode.

    check_config_mode returns True as the expectation is that configuration commands can be executed directly. So in your current state, you are in "config mode" i.e. you can make configuration changes.

    @@ -84,10 +88,10 @@

    Classes

    overwrite check_config_mode in the platform specific driver and return False.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -126,7 +130,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -171,12 +175,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -184,9 +188,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class F5TmshSSH(NoConfig, BaseConnection):
         def session_preparation(self) -> None:
             """Prepare the session after the connection has been established."""
    @@ -230,12 +236,14 @@ 

    Ancestors

    Methods

    -def cleanup(self, command='exit') +def cleanup(self, command: str = 'exit') ‑> None
    -

    Gracefully exit the SSH session.

    +

    Gracefully exit the SSH session.

    -Source code + +Expand source code +
    def cleanup(self, command: str = "exit") -> None:
         """Gracefully exit the SSH session."""
         try:
    @@ -249,12 +257,14 @@ 

    Methods

    -def exit_tmsh(self) +def exit_tmsh(self) ‑> str
    -
    +
    -Source code + +Expand source code +
    def exit_tmsh(self) -> str:
         output = self._send_command_str("quit", expect_string=r"#")
         self.set_base_prompt()
    @@ -262,12 +272,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read(pattern=r"#")
    @@ -281,12 +293,14 @@ 

    Methods

    -def tmsh_mode(self, delay_factor=1.0) +def tmsh_mode(self, delay_factor: float = 1.0) ‑> str
    -

    tmsh command is equivalent to config command on F5.

    +

    tmsh command is equivalent to config command on F5.

    -Source code + +Expand source code +
    def tmsh_mode(self, delay_factor: float = 1.0) -> str:
         """tmsh command is equivalent to config command on F5."""
         command = f"{self.RETURN}tmsh{self.RETURN}"
    @@ -374,9 +388,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/f5/index.html b/docs/netmiko/f5/index.html index 060266f0b..9c853fd23 100644 --- a/docs/netmiko/f5/index.html +++ b/docs/netmiko/f5/index.html @@ -3,15 +3,17 @@ - + netmiko.f5 API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.f5

    -Source code + +Expand source code +
    from netmiko.f5.f5_tmsh_ssh import F5TmshSSH
     from netmiko.f5.f5_linux_ssh import F5LinuxSSH
     
    @@ -33,11 +37,11 @@ 

    Sub-modules

    netmiko.f5.f5_linux_ssh
    -
    +
    netmiko.f5.f5_tmsh_ssh
    -
    +
    @@ -50,16 +54,16 @@

    Classes

    class F5LinuxSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -98,7 +102,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -143,12 +147,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -156,9 +160,11 @@

    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). -
    +

    -Source code + +Expand source code +
    class F5LinuxSSH(LinuxSSH):
         pass
    @@ -220,10 +226,10 @@

    Inherited members

    class F5TmshSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Class for platforms that have no config mode.

    +

    Class for platforms that have no config mode.

    check_config_mode returns True as the expectation is that configuration commands can be executed directly. So in your current state, you are in "config mode" i.e. you can make configuration changes.

    @@ -231,10 +237,10 @@

    Inherited members

    overwrite check_config_mode in the platform specific driver and return False.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -273,7 +279,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -318,12 +324,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -331,9 +337,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class F5TmshSSH(NoConfig, BaseConnection):
         def session_preparation(self) -> None:
             """Prepare the session after the connection has been established."""
    @@ -377,12 +385,14 @@ 

    Ancestors

    Methods

    -def cleanup(self, command='exit') +def cleanup(self, command: str = 'exit') ‑> None
    -

    Gracefully exit the SSH session.

    +

    Gracefully exit the SSH session.

    -Source code + +Expand source code +
    def cleanup(self, command: str = "exit") -> None:
         """Gracefully exit the SSH session."""
         try:
    @@ -396,12 +406,14 @@ 

    Methods

    -def exit_tmsh(self) +def exit_tmsh(self) ‑> str
    -
    +
    -Source code + +Expand source code +
    def exit_tmsh(self) -> str:
         output = self._send_command_str("quit", expect_string=r"#")
         self.set_base_prompt()
    @@ -409,12 +421,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read(pattern=r"#")
    @@ -428,12 +442,14 @@ 

    Methods

    -def tmsh_mode(self, delay_factor=1.0) +def tmsh_mode(self, delay_factor: float = 1.0) ‑> str
    -

    tmsh command is equivalent to config command on F5.

    +

    tmsh command is equivalent to config command on F5.

    -Source code + +Expand source code +
    def tmsh_mode(self, delay_factor: float = 1.0) -> str:
         """tmsh command is equivalent to config command on F5."""
         command = f"{self.RETURN}tmsh{self.RETURN}"
    @@ -530,9 +546,7 @@ 

    F5TmshSSH

    - - \ No newline at end of file diff --git a/docs/netmiko/flexvnf/flexvnf_ssh.html b/docs/netmiko/flexvnf/flexvnf_ssh.html index 970cca267..0ae715f57 100644 --- a/docs/netmiko/flexvnf/flexvnf_ssh.html +++ b/docs/netmiko/flexvnf/flexvnf_ssh.html @@ -3,15 +3,17 @@ - + netmiko.flexvnf.flexvnf_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.flexvnf.flexvnf_ssh

    -Source code + +Expand source code +
    from typing import Optional, Any
     import re
     import time
    @@ -65,7 +69,9 @@ 

    Module netmiko.flexvnf.flexvnf_ssh

    break count += 1 - def check_config_mode(self, check_string: str = "]", pattern: str = "") -> bool: + 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.""" return super().check_config_mode(check_string=check_string) @@ -238,10 +244,10 @@

    Classes

    class FlexvnfSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Class for platforms that have no enable mode.

    +

    Class for platforms that have no enable mode.

    Netmiko translates the meaning of "enable" mode to be a proxy for "can go into config mode". In other words, that you ultimately have privileges to execute configuration changes.

    @@ -251,10 +257,10 @@

    Classes

    don't explicitly support enable mode.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -293,7 +299,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -338,12 +344,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -351,9 +357,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class FlexvnfSSH(NoEnable, BaseConnection):
         def session_preparation(self) -> None:
             """
    @@ -388,7 +396,9 @@ 

    Classes

    break count += 1 - def check_config_mode(self, check_string: str = "]", pattern: str = "") -> bool: + 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.""" return super().check_config_mode(check_string=check_string) @@ -557,22 +567,26 @@

    Ancestors

    Methods

    -def check_config_mode(self, check_string=']', pattern='') +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.

    +

    Checks if the device is in configuration mode or not.

    -Source code -
    def check_config_mode(self, check_string: str = "]", pattern: str = "") -> bool:
    +
    +Expand source code
    +
    +
    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."""
         return super().check_config_mode(check_string=check_string)
    -def commit(self, confirm=False, confirm_delay=None, check=False, comment='', and_quit=False, read_timeout=120.0, delay_factor=None) +def commit(self, confirm: bool = False, confirm_delay: Optional[int] = None, check: bool = False, comment: str = '', and_quit: bool = False, read_timeout: float = 120.0, delay_factor: Optional[float] = None) ‑> str
    -

    Commit the candidate configuration.

    +

    Commit the candidate configuration.

    Commit the entered configuration. Raise an error and return the failure if the commit fails.

    Automatically enters configuration mode

    @@ -588,9 +602,11 @@

    Methods

    command_string = commit confirmed or commit confirmed check: command_string = commit check

    -

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    +

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    -Source code + +Expand source code +
    def commit(
         self,
         confirm: bool = False,
    @@ -687,12 +703,14 @@ 

    Methods

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

    Enter configuration mode.

    +

    Enter configuration mode.

    -Source code + +Expand source code +
    def config_mode(
         self, config_command: str = "configure", pattern: str = "", re_flags: int = 0
     ) -> str:
    @@ -703,12 +721,14 @@ 

    Methods

    -def enter_cli_mode(self) +def enter_cli_mode(self) ‑> None
    -

    Check if at shell prompt root@ and go into CLI.

    +

    Check if at shell prompt root@ and go into CLI.

    -Source code + +Expand source code +
    def enter_cli_mode(self) -> None:
         """Check if at shell prompt root@ and go into CLI."""
         delay_factor = self.select_delay_factor(delay_factor=0)
    @@ -731,12 +751,14 @@ 

    Methods

    -def exit_config_mode(self, exit_config='exit configuration-mode', pattern='') +def exit_config_mode(self, exit_config: str = 'exit configuration-mode', pattern: str = '') ‑> str
    -

    Exit configuration mode.

    +

    Exit configuration mode.

    -Source code + +Expand source code +
    def exit_config_mode(
         self, exit_config: str = "exit configuration-mode", pattern: str = ""
     ) -> str:
    @@ -757,14 +779,16 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    Disable paging (the '–more–' prompts). -Set the base prompt for interaction ('>').

    +Set the base prompt for interaction ('>').

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """
         Prepare the session after the connection has been established.
    @@ -780,12 +804,14 @@ 

    Methods

    -def strip_prompt(self, *args, **kwargs) +def strip_prompt(self, *args: Any, **kwargs: Any) ‑> str
    -

    Strip the trailing router prompt from the output.

    +

    Strip the trailing router prompt from the output.

    -Source code + +Expand source code +
    def strip_prompt(self, *args: Any, **kwargs: Any) -> str:
         """Strip the trailing router prompt from the output."""
         a_string = super().strip_prompt(*args, **kwargs)
    @@ -870,9 +896,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/flexvnf/index.html b/docs/netmiko/flexvnf/index.html index 6e6a94051..9abe604d7 100644 --- a/docs/netmiko/flexvnf/index.html +++ b/docs/netmiko/flexvnf/index.html @@ -3,15 +3,17 @@ - + netmiko.flexvnf API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.flexvnf

    -Source code + +Expand source code +
    from netmiko.flexvnf.flexvnf_ssh import FlexvnfSSH
     
     __all__ = ["FlexvnfSSH"]
    @@ -32,7 +36,7 @@

    Sub-modules

    netmiko.flexvnf.flexvnf_ssh
    -
    +
    @@ -45,10 +49,10 @@

    Classes

    class FlexvnfSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Class for platforms that have no enable mode.

    +

    Class for platforms that have no enable mode.

    Netmiko translates the meaning of "enable" mode to be a proxy for "can go into config mode". In other words, that you ultimately have privileges to execute configuration changes.

    @@ -58,10 +62,10 @@

    Classes

    don't explicitly support enable mode.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -100,7 +104,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -145,12 +149,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -158,9 +162,11 @@

    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). -
    +

    -Source code + +Expand source code +
    class FlexvnfSSH(NoEnable, BaseConnection):
         def session_preparation(self) -> None:
             """
    @@ -195,7 +201,9 @@ 

    Classes

    break count += 1 - def check_config_mode(self, check_string: str = "]", pattern: str = "") -> bool: + 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.""" return super().check_config_mode(check_string=check_string) @@ -364,22 +372,26 @@

    Ancestors

    Methods

    -def check_config_mode(self, check_string=']', pattern='') +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.

    +

    Checks if the device is in configuration mode or not.

    -Source code -
    def check_config_mode(self, check_string: str = "]", pattern: str = "") -> bool:
    +
    +Expand source code
    +
    +
    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."""
         return super().check_config_mode(check_string=check_string)
    -def commit(self, confirm=False, confirm_delay=None, check=False, comment='', and_quit=False, read_timeout=120.0, delay_factor=None) +def commit(self, confirm: bool = False, confirm_delay: Optional[int] = None, check: bool = False, comment: str = '', and_quit: bool = False, read_timeout: float = 120.0, delay_factor: Optional[float] = None) ‑> str
    -

    Commit the candidate configuration.

    +

    Commit the candidate configuration.

    Commit the entered configuration. Raise an error and return the failure if the commit fails.

    Automatically enters configuration mode

    @@ -395,9 +407,11 @@

    Methods

    command_string = commit confirmed or commit confirmed check: command_string = commit check

    -

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    +

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    -Source code + +Expand source code +
    def commit(
         self,
         confirm: bool = False,
    @@ -494,12 +508,14 @@ 

    Methods

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

    Enter configuration mode.

    +

    Enter configuration mode.

    -Source code + +Expand source code +
    def config_mode(
         self, config_command: str = "configure", pattern: str = "", re_flags: int = 0
     ) -> str:
    @@ -510,12 +526,14 @@ 

    Methods

    -def enter_cli_mode(self) +def enter_cli_mode(self) ‑> None
    -

    Check if at shell prompt root@ and go into CLI.

    +

    Check if at shell prompt root@ and go into CLI.

    -Source code + +Expand source code +
    def enter_cli_mode(self) -> None:
         """Check if at shell prompt root@ and go into CLI."""
         delay_factor = self.select_delay_factor(delay_factor=0)
    @@ -538,12 +556,14 @@ 

    Methods

    -def exit_config_mode(self, exit_config='exit configuration-mode', pattern='') +def exit_config_mode(self, exit_config: str = 'exit configuration-mode', pattern: str = '') ‑> str
    -

    Exit configuration mode.

    +

    Exit configuration mode.

    -Source code + +Expand source code +
    def exit_config_mode(
         self, exit_config: str = "exit configuration-mode", pattern: str = ""
     ) -> str:
    @@ -564,14 +584,16 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    Disable paging (the '–more–' prompts). -Set the base prompt for interaction ('>').

    +Set the base prompt for interaction ('>').

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """
         Prepare the session after the connection has been established.
    @@ -587,12 +609,14 @@ 

    Methods

    -def strip_prompt(self, *args, **kwargs) +def strip_prompt(self, *args: Any, **kwargs: Any) ‑> str
    -

    Strip the trailing router prompt from the output.

    +

    Strip the trailing router prompt from the output.

    -Source code + +Expand source code +
    def strip_prompt(self, *args: Any, **kwargs: Any) -> str:
         """Strip the trailing router prompt from the output."""
         a_string = super().strip_prompt(*args, **kwargs)
    @@ -682,9 +706,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/fortinet/fortinet_ssh.html b/docs/netmiko/fortinet/fortinet_ssh.html index 6354b95a9..c48125159 100644 --- a/docs/netmiko/fortinet/fortinet_ssh.html +++ b/docs/netmiko/fortinet/fortinet_ssh.html @@ -3,15 +3,17 @@ - + netmiko.fortinet.fortinet_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.fortinet.fortinet_ssh

    -Source code + +Expand source code +
    import paramiko
     import re
     from typing import Optional
    @@ -139,10 +143,10 @@ 

    Classes

    class FortinetSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Class for platforms that have no config mode.

    +

    Class for platforms that have no config mode.

    check_config_mode returns True as the expectation is that configuration commands can be executed directly. So in your current state, you are in "config mode" i.e. you can make configuration changes.

    @@ -150,10 +154,10 @@

    Classes

    overwrite check_config_mode in the platform specific driver and return False.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -192,7 +196,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -237,12 +241,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -250,9 +254,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class FortinetSSH(NoConfig, CiscoSSHConnection):
         def _modify_connection_params(self) -> None:
             """Modify connection parameters prior to SSH connection."""
    @@ -360,12 +366,14 @@ 

    Ancestors

    Methods

    -def cleanup(self, command='exit') +def cleanup(self, command: str = 'exit') ‑> None
    -

    Re-enable paging globally.

    +

    Re-enable paging globally.

    -Source code + +Expand source code +
    def cleanup(self, command: str = "exit") -> None:
         """Re-enable paging globally."""
         if self.allow_disable_global:
    @@ -381,12 +389,14 @@ 

    Methods

    -def disable_paging(self, command='terminal length 0', delay_factor=None, cmd_verify=True, pattern=None) +def disable_paging(self, command: str = 'terminal length 0', delay_factor: Optional[float] = None, cmd_verify: bool = True, pattern: Optional[str] = None) ‑> str
    -

    Disable paging is only available with specific roles so it may fail.

    +

    Disable paging is only available with specific roles so it may fail.

    -Source code + +Expand source code +
    def disable_paging(
         self,
         command: str = "terminal length 0",
    @@ -433,12 +443,14 @@ 

    Methods

    -def save_config(self, cmd='', confirm=False, confirm_response='') +def save_config(self, cmd: str = '', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Not Implemented

    +

    Not Implemented

    -Source code + +Expand source code +
    def save_config(
         self, cmd: str = "", confirm: bool = False, confirm_response: str = ""
     ) -> str:
    @@ -447,12 +459,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
     
    @@ -544,9 +558,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/fortinet/index.html b/docs/netmiko/fortinet/index.html index 0a62e5097..7ac34acf0 100644 --- a/docs/netmiko/fortinet/index.html +++ b/docs/netmiko/fortinet/index.html @@ -3,15 +3,17 @@ - + netmiko.fortinet API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.fortinet

    -Source code + +Expand source code +
    from netmiko.fortinet.fortinet_ssh import FortinetSSH
     
     __all__ = ["FortinetSSH"]
    @@ -32,7 +36,7 @@

    Sub-modules

    netmiko.fortinet.fortinet_ssh
    -
    +
    @@ -45,10 +49,10 @@

    Classes

    class FortinetSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Class for platforms that have no config mode.

    +

    Class for platforms that have no config mode.

    check_config_mode returns True as the expectation is that configuration commands can be executed directly. So in your current state, you are in "config mode" i.e. you can make configuration changes.

    @@ -56,10 +60,10 @@

    Classes

    overwrite check_config_mode in the platform specific driver and return False.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -98,7 +102,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -143,12 +147,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -156,9 +160,11 @@

    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). -
    +

    -Source code + +Expand source code +
    class FortinetSSH(NoConfig, CiscoSSHConnection):
         def _modify_connection_params(self) -> None:
             """Modify connection parameters prior to SSH connection."""
    @@ -266,12 +272,14 @@ 

    Ancestors

    Methods

    -def cleanup(self, command='exit') +def cleanup(self, command: str = 'exit') ‑> None
    -

    Re-enable paging globally.

    +

    Re-enable paging globally.

    -Source code + +Expand source code +
    def cleanup(self, command: str = "exit") -> None:
         """Re-enable paging globally."""
         if self.allow_disable_global:
    @@ -287,12 +295,14 @@ 

    Methods

    -def disable_paging(self, command='terminal length 0', delay_factor=None, cmd_verify=True, pattern=None) +def disable_paging(self, command: str = 'terminal length 0', delay_factor: Optional[float] = None, cmd_verify: bool = True, pattern: Optional[str] = None) ‑> str
    -

    Disable paging is only available with specific roles so it may fail.

    +

    Disable paging is only available with specific roles so it may fail.

    -Source code + +Expand source code +
    def disable_paging(
         self,
         command: str = "terminal length 0",
    @@ -339,12 +349,14 @@ 

    Methods

    -def save_config(self, cmd='', confirm=False, confirm_response='') +def save_config(self, cmd: str = '', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Not Implemented

    +

    Not Implemented

    -Source code + +Expand source code +
    def save_config(
         self, cmd: str = "", confirm: bool = False, confirm_response: str = ""
     ) -> str:
    @@ -353,12 +365,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
     
    @@ -455,9 +469,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/hp/hp_comware.html b/docs/netmiko/hp/hp_comware.html index 1b393cd8a..b9e6fc888 100644 --- a/docs/netmiko/hp/hp_comware.html +++ b/docs/netmiko/hp/hp_comware.html @@ -3,15 +3,17 @@ - + netmiko.hp.hp_comware API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.hp.hp_comware

    -Source code + +Expand source code +
    import re
     from typing import Union, Sequence, TextIO, Any, Optional
     
    @@ -60,7 +64,9 @@ 

    Module netmiko.hp.hp_comware

    """Exit config mode.""" return super().exit_config_mode(exit_config=exit_config, pattern=pattern) - def check_config_mode(self, check_string: str = "]", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "]", pattern: str = "", force_regex: bool = False + ) -> bool: """Check whether device is in configuration mode. Return a boolean.""" return super().check_config_mode(check_string=check_string) @@ -144,6 +150,9 @@

    Module netmiko.hp.hp_comware

    """enable mode on Comware is system-view.""" return self.check_config_mode(check_string=check_string) + def cleanup(self, command: str = "quit") -> None: + return super().cleanup(command=command) + def save_config( self, cmd: str = "save force", confirm: bool = False, confirm_response: str = "" ) -> str: @@ -175,16 +184,16 @@

    Classes

    class HPComwareBase -(**kwargs) +(**kwargs: Any)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -223,7 +232,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -268,12 +277,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -281,9 +290,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class HPComwareBase(CiscoSSHConnection):
         def __init__(self, **kwargs: Any) -> None:
             # Comware doesn't have a way to set terminal width which breaks cmd_verify
    @@ -316,7 +327,9 @@ 

    Classes

    """Exit config mode.""" return super().exit_config_mode(exit_config=exit_config, pattern=pattern) - def check_config_mode(self, check_string: str = "]", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "]", pattern: str = "", force_regex: bool = False + ) -> bool: """Check whether device is in configuration mode. Return a boolean.""" return super().check_config_mode(check_string=check_string) @@ -400,6 +413,9 @@

    Classes

    """enable mode on Comware is system-view.""" return self.check_config_mode(check_string=check_string) + def cleanup(self, command: str = "quit") -> None: + return super().cleanup(command=command) + def save_config( self, cmd: str = "save force", confirm: bool = False, confirm_response: str = "" ) -> str: @@ -422,36 +438,44 @@

    Subclasses

    Methods

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

    Check whether device is in configuration mode. Return a boolean.

    +

    Check whether device is in configuration mode. Return a boolean.

    -Source code -
    def check_config_mode(self, check_string: str = "]", pattern: str = "") -> bool:
    +
    +Expand source code
    +
    +
    def check_config_mode(
    +    self, check_string: str = "]", pattern: str = "", force_regex: bool = False
    +) -> bool:
         """Check whether device is in configuration mode. Return a boolean."""
         return super().check_config_mode(check_string=check_string)
    -def check_enable_mode(self, check_string=']') +def check_enable_mode(self, check_string: str = ']') ‑> bool
    -

    enable mode on Comware is system-view.

    +

    enable mode on Comware is system-view.

    -Source code + +Expand source code +
    def check_enable_mode(self, check_string: str = "]") -> bool:
         """enable mode on Comware is system-view."""
         return self.check_config_mode(check_string=check_string)
    -def enable(self, cmd='system-view', pattern='ssword', enable_pattern=None, re_flags=re.IGNORECASE) +def enable(self, cmd: str = 'system-view', pattern: str = 'ssword', enable_pattern: Optional[str] = None, re_flags: int = re.IGNORECASE) ‑> str
    -

    enable mode on Comware is system-view.

    +

    enable mode on Comware is system-view.

    -Source code + +Expand source code +
    def enable(
         self,
         cmd: str = "system-view",
    @@ -464,36 +488,42 @@ 

    Methods

    -def exit_config_mode(self, exit_config='return', pattern='>') +def exit_config_mode(self, exit_config: str = 'return', pattern: str = '>') ‑> str
    -

    Exit config mode.

    +

    Exit config mode.

    -Source code + +Expand source code +
    def exit_config_mode(self, exit_config: str = "return", pattern: str = r">") -> str:
         """Exit config mode."""
         return super().exit_config_mode(exit_config=exit_config, pattern=pattern)
    -def exit_enable_mode(self, exit_command='return') +def exit_enable_mode(self, exit_command: str = 'return') ‑> str
    -

    enable mode on Comware is system-view.

    +

    enable mode on Comware is system-view.

    -Source code + +Expand source code +
    def exit_enable_mode(self, exit_command: str = "return") -> str:
         """enable mode on Comware is system-view."""
         return self.exit_config_mode(exit_config=exit_command)
    -def save_config(self, cmd='save force', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'save force', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Save Config.

    +

    Save Config.

    -Source code + +Expand source code +
    def save_config(
         self, cmd: str = "save force", confirm: bool = False, confirm_response: str = ""
     ) -> str:
    @@ -504,12 +534,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         # Comware can have a banner that prompts you to continue
    @@ -525,16 +557,18 @@ 

    Methods

    -def set_base_prompt(self, pri_prompt_terminator='>', alt_prompt_terminator=']', delay_factor=1.0, pattern=None) +def set_base_prompt(self, pri_prompt_terminator: str = '>', alt_prompt_terminator: str = ']', delay_factor: float = 1.0, pattern: Optional[str] = None) ‑> str
    -

    Sets self.base_prompt

    +

    Sets self.base_prompt

    Used as delimiter for stripping of trailing prompt in output.

    Should be set to something that is general and applies in multiple contexts. For Comware this will be the router prompt with < > or [ ] stripped off.

    -

    This will be set on logging in, but not when entering system-view

    +

    This will be set on logging in, but not when entering system-view

    -Source code + +Expand source code +
    def set_base_prompt(
         self,
         pri_prompt_terminator: str = ">",
    @@ -610,16 +644,16 @@ 

    Inherited members

    class HPComwareSSH -(**kwargs) +(**kwargs: Any)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -658,7 +692,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -703,12 +737,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -716,9 +750,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class HPComwareSSH(HPComwareBase):
         pass
    @@ -780,16 +816,16 @@

    Inherited members

    class HPComwareTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -828,7 +864,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -873,12 +909,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -886,9 +922,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class HPComwareTelnet(HPComwareBase):
         def __init__(self, *args: Any, **kwargs: Any) -> None:
             default_enter = kwargs.get("default_enter")
    @@ -992,9 +1030,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/hp/hp_procurve.html b/docs/netmiko/hp/hp_procurve.html index 6dc186452..2f2079600 100644 --- a/docs/netmiko/hp/hp_procurve.html +++ b/docs/netmiko/hp/hp_procurve.html @@ -3,15 +3,17 @@ - + netmiko.hp.hp_procurve API documentation - - - - - + + + + + + +
    @@ -21,12 +23,14 @@

    Module netmiko.hp.hp_procurve

    -Source code + +Expand source code +
    import re
     import time
     import socket
     from os import path
    -from typing import Optional
    +from typing import Optional, Any
     
     from paramiko import SSHClient
     from netmiko.ssh_auth import SSHClient_noauth
    @@ -36,6 +40,19 @@ 

    Module netmiko.hp.hp_procurve

    class HPProcurveBase(CiscoSSHConnection): + def __init__(self, *args: Any, **kwargs: Any) -> None: + # ProCurve's seem to fail more on connection than they should? + # increase conn_timeout to try to improve this. + conn_timeout = kwargs.get("conn_timeout") + kwargs["conn_timeout"] = 20 if conn_timeout is None else conn_timeout + + disabled_algorithms = kwargs.get("disabled_algorithms") + if disabled_algorithms is None: + disabled_algorithms = {"pubkeys": ["rsa-sha2-256", "rsa-sha2-512"]} + kwargs["disabled_algorithms"] = disabled_algorithms + + super().__init__(*args, **kwargs) + def session_preparation(self) -> None: """ Prepare the session after the connection has been established. @@ -67,12 +84,17 @@

    Module netmiko.hp.hp_procurve

    if len(self.base_prompt) >= 25: self.set_base_prompt() + # ProCurve requires elevated privileges to disable output paging :-( + self.enable() self.set_terminal_width(command="terminal width 511", pattern="terminal") command = self.RETURN + "no page" self.disable_paging(command=command) def check_config_mode( - self, check_string: str = ")#", pattern: str = r"[>#]" + self, + check_string: str = ")#", + pattern: str = r"[>#]", + force_regex: bool = False, ) -> bool: """ The pattern is needed as it is not in the parent class. @@ -87,12 +109,14 @@

    Module netmiko.hp.hp_procurve

    pattern: str = "password", enable_pattern: Optional[str] = None, re_flags: int = re.IGNORECASE, - default_username: str = "manager", + default_username: str = "", ) -> str: """Enter enable mode""" if self.check_enable_mode(): return "" + if not default_username: + default_username = self.username output = "" username_pattern = r"(username|login|user name)" @@ -110,7 +134,7 @@

    Module netmiko.hp.hp_procurve

    if re.search(username_pattern, new_output, flags=re_flags): output += new_output self.write_channel(default_username + self.RETURN) - full_pattern = rf"{pwd_pattern}|{prompt_pattern})" + full_pattern = rf"({pwd_pattern}|{prompt_pattern})" new_output = self.read_until_pattern( full_pattern, read_timeout=15, re_flags=re_flags ) @@ -242,16 +266,16 @@

    Classes

    class HPProcurveBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(*args: Any, **kwargs: Any)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -290,7 +314,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -335,12 +359,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -348,10 +372,25 @@

    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). -
    +
    -Source code + +Expand source code +
    class HPProcurveBase(CiscoSSHConnection):
    +    def __init__(self, *args: Any, **kwargs: Any) -> None:
    +        # ProCurve's seem to fail more on connection than they should?
    +        # increase conn_timeout to try to improve this.
    +        conn_timeout = kwargs.get("conn_timeout")
    +        kwargs["conn_timeout"] = 20 if conn_timeout is None else conn_timeout
    +
    +        disabled_algorithms = kwargs.get("disabled_algorithms")
    +        if disabled_algorithms is None:
    +            disabled_algorithms = {"pubkeys": ["rsa-sha2-256", "rsa-sha2-512"]}
    +            kwargs["disabled_algorithms"] = disabled_algorithms
    +
    +        super().__init__(*args, **kwargs)
    +
         def session_preparation(self) -> None:
             """
             Prepare the session after the connection has been established.
    @@ -383,12 +422,17 @@ 

    Classes

    if len(self.base_prompt) >= 25: self.set_base_prompt() + # ProCurve requires elevated privileges to disable output paging :-( + self.enable() self.set_terminal_width(command="terminal width 511", pattern="terminal") command = self.RETURN + "no page" self.disable_paging(command=command) def check_config_mode( - self, check_string: str = ")#", pattern: str = r"[>#]" + self, + check_string: str = ")#", + pattern: str = r"[>#]", + force_regex: bool = False, ) -> bool: """ The pattern is needed as it is not in the parent class. @@ -403,12 +447,14 @@

    Classes

    pattern: str = "password", enable_pattern: Optional[str] = None, re_flags: int = re.IGNORECASE, - default_username: str = "manager", + default_username: str = "", ) -> str: """Enter enable mode""" if self.check_enable_mode(): return "" + if not default_username: + default_username = self.username output = "" username_pattern = r"(username|login|user name)" @@ -426,7 +472,7 @@

    Classes

    if re.search(username_pattern, new_output, flags=re_flags): output += new_output self.write_channel(default_username + self.RETURN) - full_pattern = rf"{pwd_pattern}|{prompt_pattern})" + full_pattern = rf"({pwd_pattern}|{prompt_pattern})" new_output = self.read_until_pattern( full_pattern, read_timeout=15, re_flags=re_flags ) @@ -517,15 +563,20 @@

    Subclasses

    Methods

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

    The pattern is needed as it is not in the parent class.

    -

    Not having this will make each check_config_mode() call take ~2 seconds.

    +

    The pattern is needed as it is not in the parent class.

    +

    Not having this will make each check_config_mode() call take ~2 seconds.

    -Source code + +Expand source code +
    def check_config_mode(
    -    self, check_string: str = ")#", pattern: str = r"[>#]"
    +    self,
    +    check_string: str = ")#",
    +    pattern: str = r"[>#]",
    +    force_regex: bool = False,
     ) -> bool:
         """
         The pattern is needed as it is not in the parent class.
    @@ -536,24 +587,28 @@ 

    Methods

    -def enable(self, cmd='enable', pattern='password', enable_pattern=None, re_flags=re.IGNORECASE, default_username='manager') +def enable(self, cmd: str = 'enable', pattern: str = 'password', enable_pattern: Optional[str] = None, re_flags: int = re.IGNORECASE, default_username: str = '') ‑> str
    -

    Enter enable mode

    +

    Enter enable mode

    -Source code + +Expand source code +
    def enable(
         self,
         cmd: str = "enable",
         pattern: str = "password",
         enable_pattern: Optional[str] = None,
         re_flags: int = re.IGNORECASE,
    -    default_username: str = "manager",
    +    default_username: str = "",
     ) -> str:
         """Enter enable mode"""
     
         if self.check_enable_mode():
             return ""
    +    if not default_username:
    +        default_username = self.username
     
         output = ""
         username_pattern = r"(username|login|user name)"
    @@ -571,7 +626,7 @@ 

    Methods

    if re.search(username_pattern, new_output, flags=re_flags): output += new_output self.write_channel(default_username + self.RETURN) - full_pattern = rf"{pwd_pattern}|{prompt_pattern})" + full_pattern = rf"({pwd_pattern}|{prompt_pattern})" new_output = self.read_until_pattern( full_pattern, read_timeout=15, re_flags=re_flags ) @@ -597,12 +652,14 @@

    Methods

    -def save_config(self, cmd='write memory', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'write memory', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Save Config.

    +

    Save Config.

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "write memory",
    @@ -616,12 +673,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """
         Prepare the session after the connection has been established.
    @@ -653,6 +712,8 @@ 

    Methods

    if len(self.base_prompt) >= 25: self.set_base_prompt() + # ProCurve requires elevated privileges to disable output paging :-( + self.enable() self.set_terminal_width(command="terminal width 511", pattern="terminal") command = self.RETURN + "no page" self.disable_paging(command=command)
    @@ -706,16 +767,16 @@

    Inherited members

    class HPProcurveSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(*args: Any, **kwargs: Any)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -754,7 +815,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -799,12 +860,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -812,9 +873,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class HPProcurveSSH(HPProcurveBase):
         def _build_ssh_client(self) -> SSHClient:
             """Allow passwordless authentication for HP devices being provisioned."""
    @@ -894,16 +957,16 @@ 

    Inherited members

    class HPProcurveTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(*args: Any, **kwargs: Any)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -942,7 +1005,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -987,12 +1050,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -1000,9 +1063,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class HPProcurveTelnet(HPProcurveBase):
         def telnet_login(
             self,
    @@ -1033,12 +1098,14 @@ 

    Ancestors

    Methods

    -def telnet_login(self, pri_prompt_terminator='#', alt_prompt_terminator='>', username_pattern='(Login Name:|sername:)', pwd_pattern='assword', delay_factor=1.0, max_loops=60) +def telnet_login(self, pri_prompt_terminator: str = '#', alt_prompt_terminator: str = '>', username_pattern: str = '(Login Name:|sername:)', pwd_pattern: str = 'assword', delay_factor: float = 1.0, max_loops: int = 60) ‑> str
    -

    Telnet login: can be username/password or just password.

    +

    Telnet login: can be username/password or just password.

    -Source code + +Expand source code +
    def telnet_login(
         self,
         pri_prompt_terminator: str = "#",
    @@ -1148,9 +1215,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/hp/index.html b/docs/netmiko/hp/index.html index 0087a4765..2475c450f 100644 --- a/docs/netmiko/hp/index.html +++ b/docs/netmiko/hp/index.html @@ -3,15 +3,17 @@ - + netmiko.hp API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.hp

    -Source code + +Expand source code +
    from netmiko.hp.hp_procurve import HPProcurveSSH, HPProcurveTelnet
     from netmiko.hp.hp_comware import HPComwareSSH, HPComwareTelnet
     
    @@ -33,11 +37,11 @@ 

    Sub-modules

    netmiko.hp.hp_comware
    -
    +
    netmiko.hp.hp_procurve
    -
    +
    @@ -50,16 +54,16 @@

    Classes

    class HPComwareSSH -(**kwargs) +(**kwargs: Any)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -98,7 +102,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -143,12 +147,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -156,9 +160,11 @@

    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). -
    +

    -Source code + +Expand source code +
    class HPComwareSSH(HPComwareBase):
         pass
    @@ -220,16 +226,16 @@

    Inherited members

    class HPComwareTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -268,7 +274,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -313,12 +319,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -326,9 +332,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class HPComwareTelnet(HPComwareBase):
         def __init__(self, *args: Any, **kwargs: Any) -> None:
             default_enter = kwargs.get("default_enter")
    @@ -393,16 +401,16 @@ 

    Inherited members

    class HPProcurveSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(*args: Any, **kwargs: Any)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -441,7 +449,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -486,12 +494,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -499,9 +507,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class HPProcurveSSH(HPProcurveBase):
         def _build_ssh_client(self) -> SSHClient:
             """Allow passwordless authentication for HP devices being provisioned."""
    @@ -581,16 +591,16 @@ 

    Inherited members

    class HPProcurveTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(*args: Any, **kwargs: Any)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -629,7 +639,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -674,12 +684,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -687,9 +697,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class HPProcurveTelnet(HPProcurveBase):
         def telnet_login(
             self,
    @@ -720,12 +732,14 @@ 

    Ancestors

    Methods

    -def telnet_login(self, pri_prompt_terminator='#', alt_prompt_terminator='>', username_pattern='(Login Name:|sername:)', pwd_pattern='assword', delay_factor=1.0, max_loops=60) +def telnet_login(self, pri_prompt_terminator: str = '#', alt_prompt_terminator: str = '>', username_pattern: str = '(Login Name:|sername:)', pwd_pattern: str = 'assword', delay_factor: float = 1.0, max_loops: int = 60) ‑> str
    -

    Telnet login: can be username/password or just password.

    +

    Telnet login: can be username/password or just password.

    -Source code + +Expand source code +
    def telnet_login(
         self,
         pri_prompt_terminator: str = "#",
    @@ -838,9 +852,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/huawei/huawei.html b/docs/netmiko/huawei/huawei.html index 24cbd3df7..ba74869a3 100644 --- a/docs/netmiko/huawei/huawei.html +++ b/docs/netmiko/huawei/huawei.html @@ -3,15 +3,17 @@ - + netmiko.huawei.huawei API documentation - - - - - + + + + + + +
    @@ -21,8 +23,10 @@

    Module netmiko.huawei.huawei

    -Source code -
    from typing import Optional, Any
    +
    +Expand source code
    +
    +
    from typing import Optional, Any, Union, Sequence, TextIO
     import time
     import re
     import warnings
    @@ -70,7 +74,9 @@ 

    Module netmiko.huawei.huawei

    """Exit configuration mode.""" return super().exit_config_mode(exit_config=exit_config, pattern=pattern) - def check_config_mode(self, check_string: str = "]", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "]", pattern: str = "", force_regex: bool = False + ) -> bool: """Checks whether in configuration mode. Returns a boolean.""" return super().check_config_mode(check_string=check_string) @@ -117,6 +123,9 @@

    Module netmiko.huawei.huawei

    cmd=cmd, confirm=confirm, confirm_response=confirm_response ) + def cleanup(self, command: str = "quit") -> None: + return super().cleanup(command=command) + class HuaweiSSH(HuaweiBase): """Huawei SSH driver.""" @@ -213,6 +222,17 @@

    Module netmiko.huawei.huawei

    class HuaweiVrpv8SSH(HuaweiSSH): + def send_config_set( + self, + config_commands: Union[str, Sequence[str], TextIO, None] = None, + exit_config_mode: bool = False, + **kwargs: Any, + ) -> str: + """Huawei VRPv8 requires you not exit from configuration mode.""" + return super().send_config_set( + config_commands=config_commands, exit_config_mode=exit_config_mode, **kwargs + ) + def commit( self, comment: str = "", @@ -272,10 +292,10 @@

    Classes

    class HuaweiBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Class for platforms that have no enable mode.

    +

    Class for platforms that have no enable mode.

    Netmiko translates the meaning of "enable" mode to be a proxy for "can go into config mode". In other words, that you ultimately have privileges to execute configuration changes.

    @@ -285,10 +305,10 @@

    Classes

    don't explicitly support enable mode.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -327,7 +347,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -372,12 +392,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -385,9 +405,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class HuaweiBase(NoEnable, CiscoBaseConnection):
         def session_preparation(self) -> None:
             """Prepare the session after the connection has been established."""
    @@ -424,7 +446,9 @@ 

    Classes

    """Exit configuration mode.""" return super().exit_config_mode(exit_config=exit_config, pattern=pattern) - def check_config_mode(self, check_string: str = "]", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "]", pattern: str = "", force_regex: bool = False + ) -> bool: """Checks whether in configuration mode. Returns a boolean.""" return super().check_config_mode(check_string=check_string) @@ -469,7 +493,10 @@

    Classes

    """Save Config for HuaweiSSH""" return super().save_config( cmd=cmd, confirm=confirm, confirm_response=confirm_response - )
    + ) + + def cleanup(self, command: str = "quit") -> None: + return super().cleanup(command=command)

    Ancestors

      @@ -485,36 +512,44 @@

      Subclasses

      Methods

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

      Checks whether in configuration mode. Returns a boolean.

      +

      Checks whether in configuration mode. Returns a boolean.

      -Source code -
      def check_config_mode(self, check_string: str = "]", pattern: str = "") -> bool:
      +
      +Expand source code
      +
      +
      def check_config_mode(
      +    self, check_string: str = "]", pattern: str = "", force_regex: bool = False
      +) -> bool:
           """Checks whether in configuration mode. Returns a boolean."""
           return super().check_config_mode(check_string=check_string)
      -def exit_config_mode(self, exit_config='return', pattern='>') +def exit_config_mode(self, exit_config: str = 'return', pattern: str = '>') ‑> str
      -

      Exit configuration mode.

      +

      Exit configuration mode.

      -Source code + +Expand source code +
      def exit_config_mode(self, exit_config: str = "return", pattern: str = r">") -> str:
           """Exit configuration mode."""
           return super().exit_config_mode(exit_config=exit_config, pattern=pattern)
      -def save_config(self, cmd='save', confirm=True, confirm_response='y') +def save_config(self, cmd: str = 'save', confirm: bool = True, confirm_response: str = 'y') ‑> str
      -

      Save Config for HuaweiSSH

      +

      Save Config for HuaweiSSH

      -Source code + +Expand source code +
      def save_config(
           self, cmd: str = "save", confirm: bool = True, confirm_response: str = "y"
       ) -> str:
      @@ -525,12 +560,14 @@ 

      Methods

      -def session_preparation(self) +def session_preparation(self) ‑> None
      -

      Prepare the session after the connection has been established.

      +

      Prepare the session after the connection has been established.

      -Source code + +Expand source code +
      def session_preparation(self) -> None:
           """Prepare the session after the connection has been established."""
           self.ansi_escape_codes = True
      @@ -540,16 +577,18 @@ 

      Methods

      -def set_base_prompt(self, pri_prompt_terminator='>', alt_prompt_terminator=']', delay_factor=1.0, pattern=None) +def set_base_prompt(self, pri_prompt_terminator: str = '>', alt_prompt_terminator: str = ']', delay_factor: float = 1.0, pattern: Optional[str] = None) ‑> str
      -

      Sets self.base_prompt

      +

      Sets self.base_prompt

      Used as delimiter for stripping of trailing prompt in output.

      Should be set to something that is general and applies in multiple contexts. For Huawei this will be the router prompt with < > or [ ] stripped off.

      -

      This will be set on logging in, but not when entering system-view

      +

      This will be set on logging in, but not when entering system-view

      -Source code + +Expand source code +
      def set_base_prompt(
           self,
           pri_prompt_terminator: str = ">",
      @@ -587,14 +626,16 @@ 

      Methods

      -def strip_ansi_escape_codes(self, string_buffer) +def strip_ansi_escape_codes(self, string_buffer: str) ‑> str
      -

      Huawei does a strange thing where they add a space and then add ESC[1D +

      Huawei does a strange thing where they add a space and then add ESC[1D to move the cursor to the left one.

      -

      The extra space is problematic.

      +

      The extra space is problematic.

      -Source code + +Expand source code +
      def strip_ansi_escape_codes(self, string_buffer: str) -> str:
           """
           Huawei does a strange thing where they add a space and then add ESC[1D
      @@ -656,16 +697,16 @@ 

      Inherited members

      class HuaweiSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
      -

      Huawei SSH driver.

      +

      Huawei SSH driver.

          Initialize attributes for establishing connection to target device.
       
      -    :param ip: IP address of target device. Not required if `host` is
      +    :param ip: IP address of target device. Not required if <code>host</code> is
               provided.
       
      -    :param host: Hostname of target device. Not required if `ip` is
      +    :param host: Hostname of target device. Not required if <code>ip</code> is
                   provided.
       
           :param username: Username to authenticate against target device if
      @@ -704,7 +745,7 @@ 

      Inherited members

      :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -749,12 +790,12 @@

      Inherited members

      :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -762,9 +803,11 @@

      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). -
      +

    -Source code + +Expand source code +
    class HuaweiSSH(HuaweiBase):
         """Huawei SSH driver."""
     
    @@ -840,16 +883,16 @@ 

    Inherited members

    class HuaweiTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Huawei Telnet driver.

    +

    Huawei Telnet driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -888,7 +931,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -933,12 +976,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -946,9 +989,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class HuaweiTelnet(HuaweiBase):
         """Huawei Telnet driver."""
     
    @@ -1038,12 +1083,14 @@ 

    Ancestors

    Methods

    -def telnet_login(self, pri_prompt_terminator=']\\s*$', alt_prompt_terminator='>\\s*$', username_pattern='(?:user:|username|login|user name)', pwd_pattern='assword', delay_factor=1.0, max_loops=20) +def telnet_login(self, pri_prompt_terminator: str = ']\\s*$', alt_prompt_terminator: str = '>\\s*$', username_pattern: str = '(?:user:|username|login|user name)', pwd_pattern: str = 'assword', delay_factor: float = 1.0, max_loops: int = 20) ‑> str
    -

    Telnet login for Huawei Devices

    +

    Telnet login for Huawei Devices

    -Source code + +Expand source code +
    def telnet_login(
         self,
         pri_prompt_terminator: str = r"]\s*$",
    @@ -1172,16 +1219,16 @@ 

    Inherited members

    class HuaweiVrpv8SSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Huawei SSH driver.

    +

    Huawei SSH driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -1220,7 +1267,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -1265,12 +1312,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -1278,10 +1325,23 @@

    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). -
    +
    -Source code + +Expand source code +
    class HuaweiVrpv8SSH(HuaweiSSH):
    +    def send_config_set(
    +        self,
    +        config_commands: Union[str, Sequence[str], TextIO, None] = None,
    +        exit_config_mode: bool = False,
    +        **kwargs: Any,
    +    ) -> str:
    +        """Huawei VRPv8 requires you not exit from configuration mode."""
    +        return super().send_config_set(
    +            config_commands=config_commands, exit_config_mode=exit_config_mode, **kwargs
    +        )
    +
         def commit(
             self,
             comment: str = "",
    @@ -1340,19 +1400,21 @@ 

    Ancestors

    Methods

    -def commit(self, comment='', read_timeout=120.0, delay_factor=None) +def commit(self, comment: str = '', read_timeout: float = 120.0, delay_factor: Optional[float] = None) ‑> str
    -

    Commit the candidate configuration.

    +

    Commit the candidate configuration.

    Commit the entered configuration. Raise an error and return the failure if the commit fails.

    default: command_string = commit comment: command_string = commit comment

    -

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    +

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    -Source code + +Expand source code +
    def commit(
         self,
         comment: str = "",
    @@ -1398,17 +1460,40 @@ 

    Methods

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

    Not Implemented

    +

    Not Implemented

    -Source code + +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], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, **kwargs: Any) ‑> str +
    +
    +

    Huawei VRPv8 requires you not exit from configuration mode.

    +
    + +Expand source code + +
    def send_config_set(
    +    self,
    +    config_commands: Union[str, Sequence[str], TextIO, None] = None,
    +    exit_config_mode: bool = False,
    +    **kwargs: Any,
    +) -> str:
    +    """Huawei VRPv8 requires you not exit from configuration mode."""
    +    return super().send_config_set(
    +        config_commands=config_commands, exit_config_mode=exit_config_mode, **kwargs
    +    )
    +
    +

    Inherited members

  • @@ -1506,9 +1591,7 @@

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/huawei/huawei_smartax.html b/docs/netmiko/huawei/huawei_smartax.html index 7d61d143e..5eb00adad 100644 --- a/docs/netmiko/huawei/huawei_smartax.html +++ b/docs/netmiko/huawei/huawei_smartax.html @@ -3,15 +3,17 @@ - + netmiko.huawei.huawei_smartax API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.huawei.huawei_smartax

    -Source code + +Expand source code +
    import time
     import re
     from typing import Optional
    @@ -97,7 +101,9 @@ 

    Module netmiko.huawei.huawei_smartax

    config_command=config_command, pattern=pattern, re_flags=re_flags ) - def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = ")#", pattern: str = "", force_regex: bool = False + ) -> bool: return super().check_config_mode(check_string=check_string) def exit_config_mode( @@ -153,16 +159,16 @@

    Classes

    class HuaweiSmartAXSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Supports Huawei SmartAX and OLT.

    +

    Supports Huawei SmartAX and OLT.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -201,7 +207,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -246,12 +252,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -259,9 +265,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class HuaweiSmartAXSSH(CiscoBaseConnection):
         """Supports Huawei SmartAX and OLT."""
     
    @@ -329,7 +337,9 @@ 

    Classes

    config_command=config_command, pattern=pattern, re_flags=re_flags ) - def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = ")#", pattern: str = "", force_regex: bool = False + ) -> bool: return super().check_config_mode(check_string=check_string) def exit_config_mode( @@ -381,12 +391,14 @@

    Ancestors

    Methods

    -def save_config(self, cmd='save', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'save', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Save Config for HuaweiSSH

    +

    Save Config for HuaweiSSH

    -Source code + +Expand source code +
    def save_config(
         self, cmd: str = "save", confirm: bool = False, confirm_response: str = ""
     ) -> str:
    @@ -397,12 +409,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self.ansi_escape_codes = True
    @@ -413,14 +427,16 @@ 

    Methods

    -def strip_ansi_escape_codes(self, string_buffer) +def strip_ansi_escape_codes(self, string_buffer: str) ‑> str
    -

    Huawei does a strange thing where they add a space and then add ESC[1D +

    Huawei does a strange thing where they add a space and then add ESC[1D to move the cursor to the left one. -The extra space is problematic.

    +The extra space is problematic.

    -Source code + +Expand source code +
    def strip_ansi_escape_codes(self, string_buffer: str) -> str:
         """
         Huawei does a strange thing where they add a space and then add ESC[1D
    @@ -515,9 +531,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/huawei/index.html b/docs/netmiko/huawei/index.html index 0f2cfe0aa..0aa2e01be 100644 --- a/docs/netmiko/huawei/index.html +++ b/docs/netmiko/huawei/index.html @@ -3,15 +3,17 @@ - + netmiko.huawei API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.huawei

    -Source code + +Expand source code +
    from netmiko.huawei.huawei import HuaweiSSH, HuaweiVrpv8SSH
     from netmiko.huawei.huawei import HuaweiTelnet
     from netmiko.huawei.huawei_smartax import HuaweiSmartAXSSH
    @@ -34,11 +38,11 @@ 

    Sub-modules

    netmiko.huawei.huawei
    -
    +
    netmiko.huawei.huawei_smartax
    -
    +
    @@ -51,16 +55,16 @@

    Classes

    class HuaweiSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Huawei SSH driver.

    +

    Huawei SSH driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -99,7 +103,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -144,12 +148,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -157,9 +161,11 @@

    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). -
    +

    -Source code + +Expand source code +
    class HuaweiSSH(HuaweiBase):
         """Huawei SSH driver."""
     
    @@ -235,16 +241,16 @@ 

    Inherited members

    class HuaweiSmartAXSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Supports Huawei SmartAX and OLT.

    +

    Supports Huawei SmartAX and OLT.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -283,7 +289,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -328,12 +334,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -341,9 +347,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class HuaweiSmartAXSSH(CiscoBaseConnection):
         """Supports Huawei SmartAX and OLT."""
     
    @@ -411,7 +419,9 @@ 

    Inherited members

    config_command=config_command, pattern=pattern, re_flags=re_flags ) - def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = ")#", pattern: str = "", force_regex: bool = False + ) -> bool: return super().check_config_mode(check_string=check_string) def exit_config_mode( @@ -463,12 +473,14 @@

    Ancestors

    Methods

    -def save_config(self, cmd='save', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'save', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Save Config for HuaweiSSH

    +

    Save Config for HuaweiSSH

    -Source code + +Expand source code +
    def save_config(
         self, cmd: str = "save", confirm: bool = False, confirm_response: str = ""
     ) -> str:
    @@ -479,12 +491,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self.ansi_escape_codes = True
    @@ -495,14 +509,16 @@ 

    Methods

    -def strip_ansi_escape_codes(self, string_buffer) +def strip_ansi_escape_codes(self, string_buffer: str) ‑> str
    -

    Huawei does a strange thing where they add a space and then add ESC[1D +

    Huawei does a strange thing where they add a space and then add ESC[1D to move the cursor to the left one. -The extra space is problematic.

    +The extra space is problematic.

    -Source code + +Expand source code +
    def strip_ansi_escape_codes(self, string_buffer: str) -> str:
         """
         Huawei does a strange thing where they add a space and then add ESC[1D
    @@ -569,16 +585,16 @@ 

    Inherited members

    class HuaweiTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Huawei Telnet driver.

    +

    Huawei Telnet driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -617,7 +633,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -662,12 +678,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -675,9 +691,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class HuaweiTelnet(HuaweiBase):
         """Huawei Telnet driver."""
     
    @@ -767,12 +785,14 @@ 

    Ancestors

    Methods

    -def telnet_login(self, pri_prompt_terminator=']\\s*$', alt_prompt_terminator='>\\s*$', username_pattern='(?:user:|username|login|user name)', pwd_pattern='assword', delay_factor=1.0, max_loops=20) +def telnet_login(self, pri_prompt_terminator: str = ']\\s*$', alt_prompt_terminator: str = '>\\s*$', username_pattern: str = '(?:user:|username|login|user name)', pwd_pattern: str = 'assword', delay_factor: float = 1.0, max_loops: int = 20) ‑> str
    -

    Telnet login for Huawei Devices

    +

    Telnet login for Huawei Devices

    -Source code + +Expand source code +
    def telnet_login(
         self,
         pri_prompt_terminator: str = r"]\s*$",
    @@ -901,16 +921,16 @@ 

    Inherited members

    class HuaweiVrpv8SSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Huawei SSH driver.

    +

    Huawei SSH driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -949,7 +969,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -994,12 +1014,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -1007,10 +1027,23 @@

    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). -
    +
    -Source code + +Expand source code +
    class HuaweiVrpv8SSH(HuaweiSSH):
    +    def send_config_set(
    +        self,
    +        config_commands: Union[str, Sequence[str], TextIO, None] = None,
    +        exit_config_mode: bool = False,
    +        **kwargs: Any,
    +    ) -> str:
    +        """Huawei VRPv8 requires you not exit from configuration mode."""
    +        return super().send_config_set(
    +            config_commands=config_commands, exit_config_mode=exit_config_mode, **kwargs
    +        )
    +
         def commit(
             self,
             comment: str = "",
    @@ -1069,19 +1102,21 @@ 

    Ancestors

    Methods

    -def commit(self, comment='', read_timeout=120.0, delay_factor=None) +def commit(self, comment: str = '', read_timeout: float = 120.0, delay_factor: Optional[float] = None) ‑> str
    -

    Commit the candidate configuration.

    +

    Commit the candidate configuration.

    Commit the entered configuration. Raise an error and return the failure if the commit fails.

    default: command_string = commit comment: command_string = commit comment

    -

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    +

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    -Source code + +Expand source code +
    def commit(
         self,
         comment: str = "",
    @@ -1127,17 +1162,40 @@ 

    Methods

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

    Not Implemented

    +

    Not Implemented

    -Source code + +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], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, **kwargs: Any) ‑> str +
    +
    +

    Huawei VRPv8 requires you not exit from configuration mode.

    +
    + +Expand source code + +
    def send_config_set(
    +    self,
    +    config_commands: Union[str, Sequence[str], TextIO, None] = None,
    +    exit_config_mode: bool = False,
    +    **kwargs: Any,
    +) -> str:
    +    """Huawei VRPv8 requires you not exit from configuration mode."""
    +    return super().send_config_set(
    +        config_commands=config_commands, exit_config_mode=exit_config_mode, **kwargs
    +    )
    +
    +

    Inherited members

    @@ -1238,9 +1296,7 @@

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/index.html b/docs/netmiko/index.html index afa31819a..a893bdab6 100644 --- a/docs/netmiko/index.html +++ b/docs/netmiko/index.html @@ -3,59 +3,95 @@ - + netmiko API documentation - - - - - + + + + + + +
    -

    Module netmiko

    +

    Package netmiko

    -Source code -
    import logging
    +
    +Expand source code
    +
    +
    import sys
    +
    +__version__ = "4.1.1"
    +PY_MAJ_VER = 3
    +PY_MIN_VER = 7
    +MIN_PYTHON_VER = "3.7"
    +
    +
    +# Make sure user is using a valid Python version (for Netmiko)
    +def check_python_version():  # type: ignore
    +    python_snake = "\U0001F40D"
    +
    +    # Use old-school .format() method in case someone tries to use Netmiko with very old Python
    +    msg = """
    +
    +Netmiko Version {net_ver} requires Python Version {py_ver} or higher.
    +
    +""".format(
    +        net_ver=__version__, py_ver=MIN_PYTHON_VER
    +    )
    +    if sys.version_info.major != PY_MAJ_VER:
    +        raise ValueError(msg)
    +    elif sys.version_info.minor < PY_MIN_VER:
    +        # Why not :-)
    +        msg = msg.rstrip() + " {snake}\n\n".format(snake=python_snake)
    +        raise ValueError(msg)
    +
    +
    +check_python_version()  # type: ignore
    +
    +
    +import logging  # noqa
    +
     
     # Logging configuration
    -log = logging.getLogger(__name__)  # noqa
    -log.addHandler(logging.NullHandler())  # noqa
    -
    -from netmiko.ssh_dispatcher import ConnectHandler
    -from netmiko.ssh_dispatcher import ConnLogOnly
    -from netmiko.ssh_dispatcher import ConnUnify
    -from netmiko.ssh_dispatcher import ssh_dispatcher
    -from netmiko.ssh_dispatcher import redispatch
    -from netmiko.ssh_dispatcher import platforms
    -from netmiko.ssh_dispatcher import FileTransfer
    -from netmiko.scp_handler import SCPConn
    -from netmiko.cisco.cisco_ios import InLineTransfer
    -from netmiko.exceptions import (
    +log = logging.getLogger(__name__)
    +log.addHandler(logging.NullHandler())
    +
    +
    +from netmiko.ssh_dispatcher import ConnectHandler  # noqa
    +from netmiko.ssh_dispatcher import ConnLogOnly  # noqa
    +from netmiko.ssh_dispatcher import ConnUnify  # noqa
    +from netmiko.ssh_dispatcher import ssh_dispatcher  # noqa
    +from netmiko.ssh_dispatcher import redispatch  # noqa
    +from netmiko.ssh_dispatcher import platforms  # noqa
    +from netmiko.ssh_dispatcher import FileTransfer  # noqa
    +from netmiko.scp_handler import SCPConn  # noqa
    +from netmiko.cisco.cisco_ios import InLineTransfer  # noqa
    +from netmiko.exceptions import (  # noqa
         NetmikoTimeoutException,
         NetMikoTimeoutException,
     )
    -from netmiko.exceptions import (
    +from netmiko.exceptions import (  # noqa
         NetmikoAuthenticationException,
         NetMikoAuthenticationException,
     )
    -from netmiko.exceptions import ConfigInvalidException
    -from netmiko.exceptions import ReadException, ReadTimeout
    -from netmiko.exceptions import NetmikoBaseException, ConnectionException
    -from netmiko.ssh_autodetect import SSHDetect
    -from netmiko.base_connection import BaseConnection
    -from netmiko.scp_functions import file_transfer, progress_bar
    +from netmiko.exceptions import ConfigInvalidException  # noqa
    +from netmiko.exceptions import ReadException, ReadTimeout  # noqa
    +from netmiko.exceptions import NetmikoBaseException, ConnectionException  # noqa
    +from netmiko.ssh_autodetect import SSHDetect  # noqa
    +from netmiko.base_connection import BaseConnection  # noqa
    +from netmiko.scp_functions import file_transfer, progress_bar  # noqa
     
     # Alternate naming
     Netmiko = ConnectHandler
     
    -__version__ = "4.0.1a1"
     __all__ = (
         "ConnectHandler",
         "ConnLogOnly",
    @@ -91,309 +127,309 @@ 

    Sub-modules

    netmiko.a10
    -
    +
    netmiko.accedian
    -
    +
    netmiko.adtran
    -
    +
    netmiko.alcatel
    -
    +
    netmiko.allied_telesis
    -
    +
    netmiko.apresia
    -
    +
    netmiko.arista
    -
    +
    netmiko.aruba
    -
    +
    netmiko.base_connection
    -

    Base connection class for netmiko …

    +

    Base connection class for netmiko …

    netmiko.broadcom
    -
    +
    netmiko.brocade
    -
    +
    netmiko.calix
    -
    +
    netmiko.cdot
    -
    +
    netmiko.centec
    -
    +
    netmiko.channel
    -
    +
    netmiko.checkpoint
    -
    +
    netmiko.ciena
    -
    +
    netmiko.cisco
    -
    +
    netmiko.cisco_base_connection
    -

    CiscoBaseConnection is netmiko SSH class for Cisco and Cisco-like platforms.

    +

    CiscoBaseConnection is netmiko SSH class for Cisco and Cisco-like platforms.

    netmiko.citrix
    -
    +
    netmiko.cli_tools
    -
    +
    netmiko.cloudgenix
    -
    +
    netmiko.coriant
    -
    +
    netmiko.dell
    -
    +
    netmiko.dlink
    -
    +
    netmiko.eltex
    -
    +
    netmiko.endace
    -
    +
    netmiko.enterasys
    -
    +
    netmiko.ericsson
    -
    +
    netmiko.exceptions
    -
    +
    netmiko.extreme
    -
    +
    netmiko.f5
    -
    +
    netmiko.flexvnf
    -
    +
    netmiko.fortinet
    -
    +
    netmiko.hp
    -
    +
    netmiko.huawei
    -
    +
    netmiko.ipinfusion
    -
    +
    netmiko.juniper
    -
    +
    netmiko.keymile
    -
    +
    netmiko.linux
    -
    +
    netmiko.mellanox
    -
    +
    netmiko.mikrotik
    -
    +
    netmiko.mrv
    -
    +
    netmiko.netapp
    -
    +
    netmiko.netgear
    -
    +
    netmiko.netmiko_globals
    -
    +
    netmiko.no_config
    -
    +
    netmiko.no_enable
    -
    +
    netmiko.nokia
    -
    +
    netmiko.oneaccess
    -
    +
    netmiko.ovs
    -
    +
    netmiko.paloalto
    -
    +
    netmiko.pluribus
    -
    +
    netmiko.quanta
    -
    +
    netmiko.rad
    -
    +
    netmiko.raisecom
    -
    +
    netmiko.ruckus
    -
    +
    netmiko.ruijie
    -
    +
    netmiko.scp_functions
    -

    Netmiko SCP operations …

    +

    Netmiko SCP operations …

    netmiko.scp_handler
    -

    Netmiko SCP operations …

    +

    Netmiko SCP operations …

    netmiko.session_log
    -
    +
    netmiko.sixwind
    -
    +
    netmiko.snmp_autodetect
    -

    This module is used to auto-detect the type of a device in order to automatically create a -Netmiko connection …

    +

    This module is used to auto-detect the type of a device in order to automatically create a +Netmiko connection …

    netmiko.sophos
    -
    +
    netmiko.ssh_auth
    -
    +
    netmiko.ssh_autodetect
    -

    The ssh_autodetect module is used to auto-detect the netmiko device_type to use to further initiate -a new SSH connection with a remote host. This …

    +

    The ssh_autodetect module is used to auto-detect the netmiko device_type to use to further initiate +a new SSH connection with a remote host. This …

    netmiko.supermicro
    -
    +
    netmiko.terminal_server
    -
    +
    netmiko.tplink
    -
    +
    netmiko.ubiquiti
    -
    +
    netmiko.utilities
    -

    Miscellaneous utility functions.

    +

    Miscellaneous utility functions.

    netmiko.vyos
    -
    +
    netmiko.watchguard
    -
    +
    netmiko.yamaha
    -
    +
    netmiko.zte
    -
    +
    netmiko.zyxel
    -
    +
    @@ -403,14 +439,16 @@

    Sub-modules

    Functions

    -def ConnLogOnly(log_file='netmiko.log', log_level=None, log_format=None, **kwargs) +def ConnLogOnly(log_file: str = 'netmiko.log', log_level: Optional[int] = None, log_format: Optional[str] = None, **kwargs: Any) ‑> Optional[BaseConnection]
    -

    Dispatcher function that will return either: netmiko_object or None

    +

    Dispatcher function that will return either: netmiko_object or None

    Excluding errors in logging configuration should never generate an exception -all errors should be logged.

    +all errors should be logged.

    -Source code + +Expand source code +
    def ConnLogOnly(
         log_file: str = "netmiko.log",
         log_level: Optional[int] = None,
    @@ -466,12 +504,14 @@ 

    Functions

    -def ConnUnify(**kwargs) +def ConnUnify(**kwargs: Any) ‑> BaseConnection
    -
    +
    -Source code + +Expand source code +
    def ConnUnify(
         **kwargs: Any,
     ) -> "BaseConnection":
    @@ -498,12 +538,14 @@ 

    Functions

    -def ConnectHandler(*args, **kwargs) +def ConnectHandler(*args: Any, **kwargs: Any) ‑> BaseConnection
    -

    Factory function selects the proper class and creates object based on device_type.

    +

    Factory function selects the proper class and creates object based on device_type.

    -Source code + +Expand source code +
    def ConnectHandler(*args: Any, **kwargs: Any) -> "BaseConnection":
         """Factory function selects the proper class and creates object based on device_type."""
         device_type = kwargs["device_type"]
    @@ -521,12 +563,14 @@ 

    Functions

    -def FileTransfer(*args, **kwargs) +def FileTransfer(*args: Any, **kwargs: Any) ‑> BaseFileTransfer
    -

    Factory function selects the proper SCP class and creates object based on device_type.

    +

    Factory function selects the proper SCP class and creates object based on device_type.

    -Source code + +Expand source code +
    def FileTransfer(*args: Any, **kwargs: Any) -> "BaseFileTransfer":
         """Factory function selects the proper SCP class and creates object based on device_type."""
         if len(args) >= 1:
    @@ -544,12 +588,14 @@ 

    Functions

    -def Netmiko(*args, **kwargs) +def Netmiko(*args: Any, **kwargs: Any) ‑> BaseConnection
    -

    Factory function selects the proper class and creates object based on device_type.

    +

    Factory function selects the proper class and creates object based on device_type.

    -Source code + +Expand source code +
    def ConnectHandler(*args: Any, **kwargs: Any) -> "BaseConnection":
         """Factory function selects the proper class and creates object based on device_type."""
         device_type = kwargs["device_type"]
    @@ -567,18 +613,20 @@ 

    Functions

    -def file_transfer(ssh_conn, source_file, dest_file, file_system=None, direction='put', disable_md5=False, inline_transfer=False, overwrite_file=False, socket_timeout=10.0, progress=None, progress4=None, verify_file=None) +def file_transfer(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: Optional[str] = None, direction: str = 'put', disable_md5: bool = False, inline_transfer: bool = False, overwrite_file: bool = False, socket_timeout: float = 10.0, progress: Optional[Callable[..., Any]] = None, progress4: Optional[Callable[..., Any]] = None, verify_file: Optional[bool] = None) ‑> Dict[str, bool]
    -

    Use Secure Copy or Inline (IOS-only) to transfer files to/from network devices.

    +

    Use Secure Copy or Inline (IOS-only) to transfer files to/from network devices.

    inline_transfer ONLY SUPPORTS TEXT FILES and will not support binary file transfers.

    return { 'file_exists': boolean, 'file_transferred': boolean, 'file_verified': boolean, -}

    +}

    -Source code + +Expand source code +
    def file_transfer(
         ssh_conn: "BaseConnection",
         source_file: str,
    @@ -687,12 +735,14 @@ 

    Functions

    -def progress_bar(filename, size, sent, peername=None) +def progress_bar(filename: ~AnyStr, size: int, sent: int, peername: Optional[str] = None) ‑> None
    -
    +
    -Source code + +Expand source code +
    def progress_bar(
         filename: AnyStr, size: int, sent: int, peername: Optional[str] = None
     ) -> None:
    @@ -722,14 +772,16 @@ 

    Functions

    -def redispatch(obj, device_type, session_prep=True) +def redispatch(obj: BaseConnection, device_type: str, session_prep: bool = True)
    -

    Dynamically change Netmiko object's class to proper class. +

    Dynamically change Netmiko object's class to proper class. Generally used with terminal_server device_type when you need to redispatch after interacting -with terminal server.

    +with terminal server.

    -Source code + +Expand source code +
    def redispatch(
         obj: "BaseConnection", device_type: str, session_prep: bool = True
     ) -> None:
    @@ -745,12 +797,14 @@ 

    Functions

    -def ssh_dispatcher(device_type) +def ssh_dispatcher(device_type: str) ‑> Type[BaseConnection]
    -

    Select the class to be instantiated based on vendor/platform.

    +

    Select the class to be instantiated based on vendor/platform.

    -Source code + +Expand source code +
    def ssh_dispatcher(device_type: str) -> Type["BaseConnection"]:
         """Select the class to be instantiated based on vendor/platform."""
         return CLASS_MAPPER[device_type]
    @@ -763,17 +817,17 @@

    Classes

    class BaseConnection -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Defines vendor independent methods.

    +

    Defines vendor independent methods.

    Otherwise method left as a stub method.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -812,7 +866,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -857,12 +911,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -870,9 +924,11 @@

    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). -
    +

    -Source code + +Expand source code +
    class BaseConnection:
         """
         Defines vendor independent methods.
    @@ -2055,10 +2111,7 @@ 

    Classes

    self.write_channel(self.RETURN) if pattern: - try: - prompt = self.read_until_pattern(pattern=pattern) - except ReadTimeout: - pass + prompt = self.read_until_pattern(pattern=pattern) else: # Initial read time.sleep(sleep_time) @@ -2681,7 +2734,9 @@

    Classes

    raise ValueError("Failed to exit enable mode.") return output - def check_config_mode(self, check_string: str = "", pattern: str = "") -> bool: + 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. :param check_string: Identification of configuration mode from the device @@ -2696,7 +2751,11 @@

    Classes

    output = self.read_channel_timing(read_timeout=10.0) else: output = self.read_until_pattern(pattern=pattern) - return check_string in output + + if force_regex: + return bool(re.search(check_string, output)) + else: + return check_string in output def config_mode( self, config_command: str = "", pattern: str = "", re_flags: int = 0 @@ -3121,10 +3180,10 @@

    Classes

    Subclasses

    • TelnetConnection
    • -
    • CiscoBaseConnection
    • CheckPointGaiaSSH
    • CienaSaosBase
    • CiscoWlcSSH
    • +
    • CiscoBaseConnection
    • NetscalerSSH
    • DellIsilonSSH
    • EricssonIposSSH
    • @@ -3133,6 +3192,7 @@

      Subclasses

    • JuniperBase
    • JuniperScreenOsSSH
    • NetAppcDotSSH
    • +
    • NokiaSrlSSH
    • NokiaSros
    • PaloAltoPanosBase
    • PluribusSSH
    • @@ -3144,14 +3204,16 @@

      Subclasses

      Static methods

      -def strip_backspaces(output) +def strip_backspaces(output: str) ‑> str
      -

      Strip any backspace characters out of the output.

      +

      Strip any backspace characters out of the output.

      :param output: Output obtained from a remote network device. -:type output: str

      +:type output: str

      -Source code + +Expand source code +
      @staticmethod
       def strip_backspaces(output: str) -> str:
           """Strip any backspace characters out of the output.
      @@ -3167,17 +3229,21 @@ 

      Static methods

      Methods

      -def check_config_mode(self, check_string='', pattern='') +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.

      +

      Checks if the device is in configuration mode or not.

      :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

      -Source code -
      def check_config_mode(self, check_string: str = "", pattern: str = "") -> bool:
      +
      +Expand source code
      +
      +
      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.
       
           :param check_string: Identification of configuration mode from the device
      @@ -3192,18 +3258,24 @@ 

      Methods

      output = self.read_channel_timing(read_timeout=10.0) else: output = self.read_until_pattern(pattern=pattern) - return check_string in output
      + + if force_regex: + return bool(re.search(check_string, output)) + else: + return check_string in output
      -def check_enable_mode(self, check_string='') +def check_enable_mode(self, check_string: str = '') ‑> bool
      -

      Check if in enable mode. Return boolean.

      +

      Check if in enable mode. Return boolean.

      :param check_string: Identification of privilege mode from device -:type check_string: str

      +:type check_string: str

      -Source code + +Expand source code +
      def check_enable_mode(self, check_string: str = "") -> bool:
           """Check if in enable mode. Return boolean.
       
      @@ -3216,24 +3288,28 @@ 

      Methods

      -def cleanup(self, command='') +def cleanup(self, command: str = '') ‑> None
      -

      Logout of the session on the network device plus any additional cleanup.

      +

      Logout of the session on the network device plus any additional cleanup.

      -Source code + +Expand source code +
      def cleanup(self, command: str = "") -> None:
           """Logout of the session on the network device plus any additional cleanup."""
           pass
      -def clear_buffer(self, backoff=True, backoff_max=3.0, delay_factor=None) +def clear_buffer(self, backoff: bool = True, backoff_max: float = 3.0, delay_factor: Optional[float] = None) ‑> str
      -

      Read any data available in the channel.

      +

      Read any data available in the channel.

      -Source code + +Expand source code +
      def clear_buffer(
           self,
           backoff: bool = True,
      @@ -3263,12 +3339,14 @@ 

      Methods

      -def command_echo_read(self, cmd, read_timeout) +def command_echo_read(self, cmd: str, read_timeout: float) ‑> str
      -
      +
      -Source code + +Expand source code +
      def command_echo_read(self, cmd: str, read_timeout: float) -> str:
       
           # Make sure you read until you detect the command echo (avoid getting out of sync)
      @@ -3289,30 +3367,34 @@ 

      Methods

      -def commit(self) +def commit(self) ‑> str
      -

      Commit method for platforms that support this.

      +

      Commit method for platforms that support this.

      -Source code + +Expand source code +
      def commit(self) -> str:
           """Commit method for platforms that support this."""
           raise AttributeError("Network device does not support 'commit()' method")
      -def config_mode(self, config_command='', pattern='', re_flags=0) +def config_mode(self, config_command: str = '', pattern: str = '', re_flags: int = 0) ‑> str
      -

      Enter into config_mode.

      +

      Enter into config_mode.

      :param config_command: Configuration command to send to the device :type config_command: str

      :param pattern: Pattern to terminate reading of channel :type pattern: str

      :param re_flags: Regular expression flags -:type re_flags: RegexFlag

      +:type re_flags: RegexFlag

      -Source code + +Expand source code +
      def config_mode(
           self, config_command: str = "", pattern: str = "", re_flags: int = 0
       ) -> str:
      @@ -3345,14 +3427,16 @@ 

      Methods

      -def disable_paging(self, command='terminal length 0', delay_factor=None, cmd_verify=True, pattern=None) +def disable_paging(self, command: str = 'terminal length 0', delay_factor: Optional[float] = None, cmd_verify: bool = True, pattern: Optional[str] = None) ‑> str
      -

      Disable paging default to a Cisco CLI method.

      +

      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.

      -Source code + +Expand source code +
      def disable_paging(
           self,
           command: str = "terminal length 0",
      @@ -3388,12 +3472,14 @@ 

      Methods

      -def disconnect(self) +def disconnect(self) ‑> None
      -

      Try to gracefully close the session.

      +

      Try to gracefully close the session.

      -Source code + +Expand source code +
      def disconnect(self) -> None:
           """Try to gracefully close the session."""
           try:
      @@ -3417,16 +3503,18 @@ 

      Methods

      -def enable(self, cmd='', pattern='ssword', enable_pattern=None, re_flags=re.IGNORECASE) +def enable(self, cmd: str = '', pattern: str = 'ssword', enable_pattern: Optional[str] = None, re_flags: int = re.IGNORECASE) ‑> str
      -

      Enter enable mode.

      +

      Enter enable mode.

      :param cmd: Device command to enter enable mode

      :param pattern: pattern to search for indicating device is waiting for password

      :param enable_pattern: pattern indicating you have entered enable mode

      -

      :param re_flags: Regular expression flags used in conjunction with pattern

      +

      :param re_flags: Regular expression flags used in conjunction with pattern

      -Source code + +Expand source code +
      def enable(
           self,
           cmd: str = "",
      @@ -3483,18 +3571,20 @@ 

      Methods

      -def establish_connection(self, width=511, height=1000) +def establish_connection(self, width: int = 511, height: int = 1000) ‑> None
      -

      Establish SSH connection to the network device

      +

      Establish SSH connection to the network device

      Timeout will generate a NetmikoTimeoutException Authentication failure will generate a NetmikoAuthenticationException

      :param width: Specified width of the VT100 terminal window (default: 511) :type width: int

      :param height: Specified height of the VT100 terminal window (default: 1000) -:type height: int

      +:type height: int

      -Source code + +Expand source code +
          def establish_connection(self, width: int = 511, height: int = 1000) -> None:
               """Establish SSH connection to the network device
       
      @@ -3605,16 +3695,18 @@ 

      Methods

      -def exit_config_mode(self, exit_config='', pattern='') +def exit_config_mode(self, exit_config: str = '', pattern: str = '') ‑> str
      -

      Exit from configuration mode.

      +

      Exit from configuration mode.

      :param exit_config: Command to exit configuration mode :type exit_config: str

      :param pattern: Pattern to terminate reading of channel -:type pattern: str

      +:type pattern: str

      -Source code + +Expand source code +
      def exit_config_mode(self, exit_config: str = "", pattern: str = "") -> str:
           """Exit from configuration mode.
       
      @@ -3643,14 +3735,16 @@ 

      Methods

      -def exit_enable_mode(self, exit_command='') +def exit_enable_mode(self, exit_command: str = '') ‑> str
      -

      Exit enable mode.

      +

      Exit enable mode.

      :param exit_command: Command that exits the session from privileged mode -:type exit_command: str

      +:type exit_command: str

      -Source code + +Expand source code +
      def exit_enable_mode(self, exit_command: str = "") -> str:
           """Exit enable mode.
       
      @@ -3667,15 +3761,17 @@ 

      Methods

      -def find_prompt(self, delay_factor=1.0, pattern=None) +def find_prompt(self, delay_factor: float = 1.0, pattern: Optional[str] = None) ‑> str
      -

      Finds the current network device prompt, last line only.

      +

      Finds the current network device prompt, last line only.

      :param delay_factor: See init: global_delay_factor :type delay_factor: int

      -

      :param pattern: Regular expression pattern to determine whether prompt is valid

      +

      :param pattern: Regular expression pattern to determine whether prompt is valid

      -Source code + +Expand source code +
      def find_prompt(
           self, delay_factor: float = 1.0, pattern: Optional[str] = None
       ) -> str:
      @@ -3692,10 +3788,7 @@ 

      Methods

      self.write_channel(self.RETURN) if pattern: - try: - prompt = self.read_until_pattern(pattern=pattern) - except ReadTimeout: - pass + prompt = self.read_until_pattern(pattern=pattern) else: # Initial read time.sleep(sleep_time) @@ -3725,12 +3818,14 @@

      Methods

      -def is_alive(self) +def is_alive(self) ‑> bool
      -

      Returns a boolean flag with the state of the connection.

      +

      Returns a boolean flag with the state of the connection.

      -Source code + +Expand source code +
      def is_alive(self) -> bool:
           """Returns a boolean flag with the state of the connection."""
           null = chr(0)
      @@ -3770,14 +3865,16 @@ 

      Methods

      -def normalize_cmd(self, command) +def normalize_cmd(self, command: str) ‑> str
      -

      Normalize CLI commands to have a single trailing newline.

      +

      Normalize CLI commands to have a single trailing newline.

      :param command: Command that may require line feed to be normalized -:type command: str

      +:type command: str

      -Source code + +Expand source code +
      def normalize_cmd(self, command: str) -> str:
           """Normalize CLI commands to have a single trailing newline.
       
      @@ -3790,20 +3887,22 @@ 

      Methods

      -def normalize_linefeeds(self, a_string) +def normalize_linefeeds(self, a_string: str) ‑> str
      -

      Convert `

      +

      Convert `

      , -,

      -

      to +,

      +

      to .`

          :param a_string: A string that may have non-normalized line feeds
               i.e. output returned from device, or a device prompt
           :type a_string: str
      -
      +
      -Source code + +Expand source code +
      def normalize_linefeeds(self, a_string: str) -> str:
           """Convert `\r\r\n`,`\r\n`, `\n\r` to `\n.`
       
      @@ -3821,12 +3920,14 @@ 

      Methods

      -def paramiko_cleanup(self) +def paramiko_cleanup(self) ‑> None
      -

      Cleanup Paramiko to try to gracefully handle SSH session ending.

      +

      Cleanup Paramiko to try to gracefully handle SSH session ending.

      -Source code + +Expand source code +
      def paramiko_cleanup(self) -> None:
           """Cleanup Paramiko to try to gracefully handle SSH session ending."""
           if self.remote_conn_pre is not None:
      @@ -3835,12 +3936,14 @@ 

      Methods

      -def read_channel(self) +def read_channel(self) ‑> str
      -

      Generic handler that will read all the data from given channel.

      +

      Generic handler that will read all the data from given channel.

      -Source code + +Expand source code +
      @lock_channel
       def read_channel(self) -> str:
           """Generic handler that will read all the data from given channel."""
      @@ -3863,10 +3966,10 @@ 

      Methods

      -def read_channel_timing(self, last_read=2.0, read_timeout=120.0, delay_factor=None, max_loops=None) +def read_channel_timing(self, last_read: float = 2.0, read_timeout: float = 120.0, delay_factor: Optional[float] = None, max_loops: Optional[int] = None) ‑> str
      -

      Read data on the channel based on timing delays.

      +

      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.

      @@ -3876,9 +3979,11 @@

      Methods

      on an absolute timeout. It will only complete based on timeout based on their being no new data.

      :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 max_loops: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

      -Source code + +Expand source code +
          def read_channel_timing(
               self,
               last_read: float = 2.0,
      @@ -3951,10 +4056,10 @@ 

      Methods

      -def read_until_pattern(self, pattern='', read_timeout=10.0, re_flags=0, max_loops=None) +def read_until_pattern(self, pattern: str = '', read_timeout: float = 10.0, re_flags: int = 0, max_loops: Optional[int] = None) ‑> str
      -

      Read channel until pattern is detected.

      +

      Read channel until pattern is detected.

      Will return string up to and including pattern.

      Returns ReadTimeout if pattern not detected in read_timeout seconds.

      :param pattern: Regular expression pattern used to identify that reading is done.

      @@ -3962,9 +4067,11 @@

      Methods

      A read_timeout value of 0 will cause the loop to never timeout (i.e. it will keep reading indefinitely until pattern is detected.

      :param re_flags: regex flags used in conjunction with pattern (defaults to no flags).

      -

      :param max_loops: 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.

      -Source code + +Expand source code +
          def read_until_pattern(
               self,
               pattern: str = "",
      @@ -4045,12 +4152,14 @@ 

      Methods

      -def read_until_prompt(self, read_timeout=10.0, read_entire_line=False, re_flags=0, max_loops=None) +def read_until_prompt(self, read_timeout: float = 10.0, read_entire_line: bool = False, re_flags: int = 0, max_loops: Optional[int] = None) ‑> str
      -

      Read channel up to and including self.base_prompt.

      +

      Read channel up to and including self.base_prompt.

      -Source code + +Expand source code +
      def read_until_prompt(
           self,
           read_timeout: float = 10.0,
      @@ -4071,12 +4180,14 @@ 

      Methods

      -def read_until_prompt_or_pattern(self, pattern='', read_timeout=10.0, read_entire_line=False, re_flags=0, max_loops=None) +def read_until_prompt_or_pattern(self, pattern: str = '', read_timeout: float = 10.0, read_entire_line: bool = False, re_flags: int = 0, max_loops: Optional[int] = None) ‑> str
      -

      Read until either self.base_prompt or pattern is detected.

      +

      Read until either self.base_prompt or pattern is detected.

      -Source code + +Expand source code +
      def read_until_prompt_or_pattern(
           self,
           pattern: str = "",
      @@ -4102,10 +4213,10 @@ 

      Methods

      -def run_ttp(self, template, res_kwargs=None, **kwargs) +def run_ttp(self, template: Union[str, bytes, ForwardRef('PathLike[Any]')], res_kwargs: Optional[Dict[str, Any]] = None, **kwargs: Any) ‑> Any
      -

      Run TTP template parsing by using input parameters to collect +

      Run TTP template parsing by using input parameters to collect devices output.

      :param template: template content, OS path to template or reference to template within TTP templates collection in @@ -4118,9 +4229,11 @@

      Methods

      :param commands: list of commands to collect

      Inputs' load could be of one of the supported formats and controlled by input's load attribute, supported values - python, yaml or json. For each input output collected -from device and parsed accordingly.

      +from device and parsed accordingly.

      -Source code + +Expand source code +
      def run_ttp(
           self,
           template: Union[str, bytes, "PathLike[Any]"],
      @@ -4159,12 +4272,14 @@ 

      Methods

      -def save_config(self, cmd='', confirm=False, confirm_response='') +def save_config(self, cmd: str = '', confirm: bool = False, confirm_response: str = '') ‑> str
      -

      Not Implemented

      +

      Not Implemented

      -Source code + +Expand source code +
      def save_config(
           self, cmd: str = "", confirm: bool = False, confirm_response: str = ""
       ) -> str:
      @@ -4173,15 +4288,17 @@ 

      Methods

      -def select_delay_factor(self, delay_factor) +def select_delay_factor(self, delay_factor: float) ‑> float
      -

      Choose the greater of delay_factor or self.global_delay_factor (default). +

      Choose the greater of delay_factor or self.global_delay_factor (default). In fast_cli choose the lesser of delay_factor of self.global_delay_factor.

      :param delay_factor: See init: global_delay_factor -:type delay_factor: int

      +:type delay_factor: int

      -Source code + +Expand source code +
      def select_delay_factor(self, delay_factor: float) -> float:
           """
           Choose the greater of delay_factor or self.global_delay_factor (default).
      @@ -4203,10 +4320,10 @@ 

      Methods

      -def send_command(self, command_string, expect_string=None, read_timeout=10.0, delay_factor=None, max_loops=None, auto_find_prompt=True, strip_prompt=True, strip_command=True, normalize=True, use_textfsm=False, textfsm_template=None, use_ttp=False, ttp_template=None, use_genie=False, cmd_verify=True) +def send_command(self, command_string: str, expect_string: Optional[str] = None, read_timeout: float = 10.0, delay_factor: Optional[float] = None, max_loops: Optional[int] = None, auto_find_prompt: bool = True, strip_prompt: bool = True, strip_command: bool = True, normalize: bool = True, use_textfsm: bool = False, textfsm_template: Optional[str] = None, use_ttp: bool = False, ttp_template: Optional[str] = None, use_genie: bool = False, cmd_verify: bool = True) ‑> Union[str, List[Any], Dict[str, Any]]
      -

      Execute command_string on the SSH channel using a pattern-based mechanism. Generally +

      Execute command_string on the SSH channel using a pattern-based mechanism. Generally used for show commands. By default this method will keep waiting to receive data until the network device prompt is detected. The current network device prompt will be determined automatically.

      @@ -4225,9 +4342,11 @@

      Methods

      :param ttp_template: Name of template to parse output with; can be fully qualified path, relative path, or name of file in current directory. (default: None).

      :param use_genie: Process command output through PyATS/Genie parser (default: False).

      -

      :param cmd_verify: Verify command echo before proceeding (default: True).

      +

      :param cmd_verify: Verify command echo before proceeding (default: True).

      -Source code + +Expand source code +
          @select_cmd_verify
           def send_command(
               self,
      @@ -4420,12 +4539,14 @@ 

      Methods

      -def send_command_expect(self, *args, **kwargs) +def send_command_expect(self, *args: Any, **kwargs: Any) ‑> Union[str, List[Any], Dict[str, Any]]
      -

      Support previous name of send_command method.

      +

      Support previous name of send_command method.

      -Source code + +Expand source code +
      def send_command_expect(
           self, *args: Any, **kwargs: Any
       ) -> Union[str, List[Any], Dict[str, Any]]:
      @@ -4434,10 +4555,10 @@ 

      Methods

      -def send_command_timing(self, command_string, last_read=2.0, read_timeout=120.0, delay_factor=None, max_loops=None, strip_prompt=True, strip_command=True, normalize=True, use_textfsm=False, textfsm_template=None, use_ttp=False, ttp_template=None, use_genie=False, cmd_verify=False) +def send_command_timing(self, command_string: str, last_read: float = 2.0, read_timeout: float = 120.0, delay_factor: Optional[float] = None, max_loops: Optional[int] = None, strip_prompt: bool = True, strip_command: bool = True, normalize: bool = True, use_textfsm: bool = False, textfsm_template: Optional[str] = None, use_ttp: bool = False, ttp_template: Optional[str] = None, use_genie: bool = False, cmd_verify: bool = False) ‑> Union[str, List[Any], Dict[str, Any]]
      -

      Execute command_string on the SSH channel using a delay-based mechanism. Generally +

      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 delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

      @@ -4452,9 +4573,11 @@

      Methods

      :param ttp_template: Name of template to parse output with; can be fully qualified path, relative path, or name of file in current directory. (default: None).

      :param use_genie: Process command output through PyATS/Genie parser (default: False).

      -

      :param cmd_verify: Verify command echo before proceeding (default: False).

      +

      :param cmd_verify: Verify command echo before proceeding (default: False).

      -Source code + +Expand source code +
      @select_cmd_verify
       def send_command_timing(
           self,
      @@ -4539,17 +4662,19 @@ 

      Methods

      -def send_config_from_file(self, config_file, **kwargs) +def send_config_from_file(self, config_file: Union[str, bytes, ForwardRef('PathLike[Any]')], **kwargs: Any) ‑> str
      -

      Send configuration commands down the SSH channel from a file.

      +

      Send configuration commands down the SSH channel from a file.

      The file is processed line-by-line and each command is sent down the SSH channel.

      **kwargs are passed to send_config_set method.

      :param config_file: Path to configuration file to be sent to the device

      -

      :param kwargs: params to be sent to send_config_set method

      +

      :param kwargs: params to be sent to send_config_set method

      -Source code + +Expand source code +
      def send_config_from_file(
           self, config_file: Union[str, bytes, "PathLike[Any]"], **kwargs: Any
       ) -> str:
      @@ -4571,10 +4696,10 @@ 

      Methods

      -def send_config_set(self, config_commands=None, *, exit_config_mode=True, read_timeout=None, delay_factor=None, max_loops=None, strip_prompt=False, strip_command=False, config_mode_command=None, cmd_verify=True, enter_config_mode=True, error_pattern='', terminator='#', bypass_commands=None) +def send_config_set(self, config_commands: Union[str, Sequence[str], TextIO, ForwardRef(None)] = None, *, exit_config_mode: bool = True, read_timeout: Optional[float] = None, delay_factor: Optional[float] = None, max_loops: Optional[int] = None, strip_prompt: bool = False, strip_command: bool = False, config_mode_command: Optional[str] = None, cmd_verify: bool = True, enter_config_mode: bool = True, error_pattern: str = '', terminator: str = '#', bypass_commands: Optional[str] = None) ‑> str
      -

      Send configuration commands down the SSH channel.

      +

      Send configuration commands down the SSH channel.

      config_commands is an iterable containing all of the configuration commands. The commands will be executed one after the other.

      Automatically exits/enters configuration mode.

      @@ -4593,9 +4718,11 @@

      Methods

      :param terminator: Regular expression pattern to use as an alternate terminator in certain situations.

      :param bypass_commands: Regular expression pattern indicating configuration commands -where cmd_verify is automatically disabled.

      +where cmd_verify is automatically disabled.

      -Source code + +Expand source code +
      def send_config_set(
           self,
           config_commands: Union[str, Sequence[str], TextIO, None] = None,
      @@ -4756,18 +4883,20 @@ 

      Methods

      -def send_multiline(self, commands, multiline=True, **kwargs) +def send_multiline(self, commands: Sequence[Union[str, List[str]]], multiline: bool = True, **kwargs: Any) ‑> str
      -

      commands should either be:

      +

      commands should either be:

      commands = [[cmd1, expect1], [cmd2, expect2], …]]

      Or

      commands = [cmd1, cmd2, cmd3, …]

      Any expect_string that is a null-string will use pattern based on device's prompt (unless expect_string argument is passed in via -kwargs.

      +kwargs.

      -Source code + +Expand source code +
      def send_multiline(
           self,
           commands: Sequence[Union[str, List[str]]],
      @@ -4818,12 +4947,14 @@ 

      Methods

      -def send_multiline_timing(self, commands, multiline=True, **kwargs) +def send_multiline_timing(self, commands: Sequence[str], multiline: bool = True, **kwargs: Any) ‑> str
      -
      +
      -Source code + +Expand source code +
      def send_multiline_timing(
           self, commands: Sequence[str], multiline: bool = True, **kwargs: Any
       ) -> str:
      @@ -4837,12 +4968,14 @@ 

      Methods

      -def serial_login(self, pri_prompt_terminator='#\\s*$', alt_prompt_terminator='>\\s*$', username_pattern='(?:[Uu]ser:|sername|ogin)', pwd_pattern='assword', delay_factor=1.0, max_loops=20) +def serial_login(self, pri_prompt_terminator: str = '#\\s*$', alt_prompt_terminator: str = '>\\s*$', username_pattern: str = '(?:[Uu]ser:|sername|ogin)', pwd_pattern: str = 'assword', delay_factor: float = 1.0, max_loops: int = 20) ‑> str
      -
      +
      -Source code + +Expand source code +
      def serial_login(
           self,
           pri_prompt_terminator: str = r"#\s*$",
      @@ -4863,19 +4996,21 @@ 

      Methods

      -def session_preparation(self) +def session_preparation(self) ‑> None
      -

      Prepare the session after the connection has been established

      +

      Prepare the session after the connection has been established

      This method handles some differences that occur between various devices early on in the session.

      In general, it should include: self._test_channel_read(pattern=r"some_pattern") self.set_base_prompt() self.set_terminal_width() -self.disable_paging()

      +self.disable_paging()

      -Source code + +Expand source code +
      def session_preparation(self) -> None:
           """
           Prepare the session after the connection has been established
      @@ -4896,10 +5031,10 @@ 

      Methods

      -def set_base_prompt(self, pri_prompt_terminator='#', alt_prompt_terminator='>', delay_factor=1.0, pattern=None) +def set_base_prompt(self, pri_prompt_terminator: str = '#', alt_prompt_terminator: str = '>', delay_factor: float = 1.0, pattern: Optional[str] = None) ‑> str
      -

      Sets self.base_prompt

      +

      Sets self.base_prompt

      Used as delimiter for stripping of trailing prompt in output.

      Should be set to something that is general and applies in multiple contexts. For Cisco devices this will be set to router hostname (i.e. prompt without > or #).

      @@ -4908,9 +5043,11 @@

      Methods

      :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 delay_factor: See init: global_delay_factor

      -

      :param pattern: Regular expression pattern to search for in find_prompt() call

      +

      :param pattern: Regular expression pattern to search for in find_prompt() call

      -Source code + +Expand source code +
      @retry(
           wait=wait_exponential(multiplier=0.33, min=0, max=5),
           stop=stop_after_attempt(5),
      @@ -4964,16 +5101,18 @@ 

      Methods

      -def set_terminal_width(self, command='', delay_factor=None, cmd_verify=False, pattern=None) +def set_terminal_width(self, command: str = '', delay_factor: Optional[float] = None, cmd_verify: bool = False, pattern: Optional[str] = None) ‑> str
      -

      CLI terminals try to automatically adjust the line based on the width of the terminal. +

      CLI terminals try to automatically adjust the line based on the width of the terminal. This causes the output to get distorted when accessed programmatically.

      Set terminal width to 511 which works on a broad set of devices.

      :param command: Command string to send to the device

      -

      :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.

      -Source code + +Expand source code +
      def set_terminal_width(
           self,
           command: str = "",
      @@ -5009,22 +5148,24 @@ 

      Methods

      -def special_login_handler(self, delay_factor=1.0) +def special_login_handler(self, delay_factor: float = 1.0) ‑> None
      -

      Handler for devices like WLC, Extreme ERS that throw up characters prior to login.

      +

      Handler for devices like WLC, Extreme ERS that throw up characters prior to login.

      -Source code + +Expand source code +
      def special_login_handler(self, delay_factor: float = 1.0) -> None:
           """Handler for devices like WLC, Extreme ERS that throw up characters prior to login."""
           pass
      -def strip_ansi_escape_codes(self, string_buffer) +def strip_ansi_escape_codes(self, string_buffer: str) ‑> str
      -

      Remove any ANSI (VT100) ESC codes from the output

      +

      Remove any ANSI (VT100) ESC codes from the output

      http://en.wikipedia.org/wiki/ANSI_escape_code

      Note: this does not capture ALL possible ANSI Escape Codes only the ones I have encountered

      @@ -5060,9 +5201,11 @@

      Methods

      very bottom of the screen).

      HP ProCurve and Cisco SG300 require this (possible others).

      :param string_buffer: The string to be processed to remove ANSI escape codes -:type string_buffer: str

      +:type string_buffer: str

      -Source code + +Expand source code +
      def strip_ansi_escape_codes(self, string_buffer: str) -> str:
           """
           Remove any ANSI (VT100) ESC codes from the output
      @@ -5175,17 +5318,19 @@ 

      Methods

      -def strip_command(self, command_string, output) +def strip_command(self, command_string: str, output: str) ‑> str
      -

      Strip command_string from output string

      +

      Strip command_string from output string

      Cisco IOS adds backspaces into output for long commands (i.e. for commands that line wrap)

      :param command_string: The command string sent to the device :type command_string: str

      :param output: The returned output as a result of the command string sent to the device -:type output: str

      +:type output: str

      -Source code + +Expand source code +
      def strip_command(self, command_string: str, output: str) -> str:
           """
           Strip command_string from output string
      @@ -5217,14 +5362,16 @@ 

      Methods

      -def strip_prompt(self, a_string) +def strip_prompt(self, a_string: str) ‑> str
      -

      Strip the trailing router prompt from the output.

      +

      Strip the trailing router prompt from the output.

      :param a_string: Returned string from device -:type a_string: str

      +:type a_string: str

      -Source code + +Expand source code +
      def strip_prompt(self, a_string: str) -> str:
           """Strip the trailing router prompt from the output.
       
      @@ -5241,17 +5388,19 @@ 

      Methods

      -def telnet_login(self, pri_prompt_terminator='#\\s*$', alt_prompt_terminator='>\\s*$', username_pattern='(?:user:|username|login|user name)', pwd_pattern='assword', delay_factor=1.0, max_loops=20) +def telnet_login(self, pri_prompt_terminator: str = '#\\s*$', alt_prompt_terminator: str = '>\\s*$', username_pattern: str = '(?:user:|username|login|user name)', pwd_pattern: str = 'assword', delay_factor: float = 1.0, max_loops: int = 20) ‑> str
      -

      Telnet login. Can be username/password or just password.

      +

      Telnet login. Can be username/password or just password.

      :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 delay_factor: See init: global_delay_factor

      -

      :param max_loops: Controls the wait time in conjunction with the delay_factor

      +

      :param max_loops: Controls the wait time in conjunction with the delay_factor

      -Source code + +Expand source code +
      def telnet_login(
           self,
           pri_prompt_terminator: str = r"#\s*$",
      @@ -5343,14 +5492,16 @@ 

      Methods

      -def write_channel(self, out_data) +def write_channel(self, out_data: str) ‑> None
      -

      Generic method that will write data out the channel.

      +

      Generic method that will write data out the channel.

      :param out_data: data to be written to the channel -:type out_data: str

      +:type out_data: str

      -Source code + +Expand source code +
      @lock_channel
       @log_writes
       def write_channel(self, out_data: str) -> None:
      @@ -5369,9 +5520,11 @@ 

      Methods

      (*args, **kwargs)
      -

      Exception raised for invalid configuration error.

      +

      Exception raised for invalid configuration error.

      -Source code + +Expand source code +
      class ConfigInvalidException(NetmikoBaseException):
           """Exception raised for invalid configuration error."""
       
      @@ -5389,9 +5542,11 @@ 

      Ancestors

      (*args, **kwargs)
      -

      Generic exception indicating the connection failed.

      +

      Generic exception indicating the connection failed.

      -Source code + +Expand source code +
      class ConnectionException(NetmikoBaseException):
           """Generic exception indicating the connection failed."""
       
      @@ -5406,12 +5561,14 @@ 

      Ancestors

      class InLineTransfer -(ssh_conn, source_file='', dest_file='', file_system=None, direction='put', source_config=None, socket_timeout=10.0, progress=None, progress4=None, hash_supported=True) +(ssh_conn: BaseConnection, source_file: str = '', dest_file: str = '', file_system: Optional[str] = None, direction: str = 'put', source_config: Optional[str] = None, socket_timeout: float = 10.0, progress: Optional[Callable[..., Any]] = None, progress4: Optional[Callable[..., Any]] = None, hash_supported: bool = True)
      -

      Use TCL on Cisco IOS to directly transfer file.

      +

      Use TCL on Cisco IOS to directly transfer file.

      -Source code + +Expand source code +
      class InLineTransfer(CiscoIosFileTransfer):
           """Use TCL on Cisco IOS to directly transfer file."""
       
      @@ -5624,12 +5781,14 @@ 

      Ancestors

      Methods

      -def config_md5(self, source_config) +def config_md5(self, source_config: str) ‑> str
      -

      Compute MD5 hash of text.

      +

      Compute MD5 hash of text.

      -Source code + +Expand source code +
      def config_md5(self, source_config: str) -> str:
           """Compute MD5 hash of text."""
           file_contents = source_config + "\n"  # Cisco IOS automatically adds this
      @@ -5638,12 +5797,14 @@ 

      Methods

      -def file_md5(self, file_name, add_newline=False) +def file_md5(self, file_name: str, add_newline: bool = False) ‑> str
      -

      Compute MD5 hash of file.

      +

      Compute MD5 hash of file.

      -Source code + +Expand source code +
      def file_md5(self, file_name: str, add_newline: bool = False) -> str:
           """Compute MD5 hash of file."""
           if add_newline is True:
      @@ -5682,13 +5843,15 @@ 

      Inherited members

    -class NetMikoAuthenticationException +class NetmikoAuthenticationException (*args, **kwargs)
    -

    SSH authentication exception based on Paramiko AuthenticationException.

    +

    SSH authentication exception based on Paramiko AuthenticationException.

    -Source code + +Expand source code +
    class NetmikoAuthenticationException(AuthenticationException):
         """SSH authentication exception based on Paramiko AuthenticationException."""
     
    @@ -5702,34 +5865,16 @@ 

    Ancestors

  • builtins.BaseException
  • -
    -class NetMikoTimeoutException -(*args, **kwargs) -
    -
    -

    SSH session timed trying to connect to the device.

    -
    -Source code -
    class NetmikoTimeoutException(SSHException):
    -    """SSH session timed trying to connect to the device."""
    -
    -    pass
    -
    -

    Ancestors

    -
      -
    • paramiko.ssh_exception.SSHException
    • -
    • builtins.Exception
    • -
    • builtins.BaseException
    • -
    -
    -class NetmikoAuthenticationException +class NetMikoAuthenticationException (*args, **kwargs)
    -

    SSH authentication exception based on Paramiko AuthenticationException.

    +

    SSH authentication exception based on Paramiko AuthenticationException.

    -Source code + +Expand source code +
    class NetmikoAuthenticationException(AuthenticationException):
         """SSH authentication exception based on Paramiko AuthenticationException."""
     
    @@ -5748,9 +5893,11 @@ 

    Ancestors

    (*args, **kwargs)
    -

    General base exception except for exceptions that inherit from Paramiko.

    +

    General base exception except for exceptions that inherit from Paramiko.

    -Source code + +Expand source code +
    class NetmikoBaseException(Exception):
         """General base exception except for exceptions that inherit from Paramiko."""
     
    @@ -5763,10 +5910,10 @@ 

    Ancestors

    Subclasses

    @@ -5774,9 +5921,33 @@

    Subclasses

    (*args, **kwargs)
    -

    SSH session timed trying to connect to the device.

    +

    SSH session timed trying to connect to the device.

    +
    + +Expand source code + +
    class NetmikoTimeoutException(SSHException):
    +    """SSH session timed trying to connect to the device."""
    +
    +    pass
    +
    +

    Ancestors

    +
      +
    • paramiko.ssh_exception.SSHException
    • +
    • builtins.Exception
    • +
    • builtins.BaseException
    • +
    +
    +
    +class NetMikoTimeoutException +(*args, **kwargs) +
    +
    +

    SSH session timed trying to connect to the device.

    -Source code + +Expand source code +
    class NetmikoTimeoutException(SSHException):
         """SSH session timed trying to connect to the device."""
     
    @@ -5794,9 +5965,11 @@ 

    Ancestors

    (*args, **kwargs)
    -

    General exception indicating an error occurred during a Netmiko read operation.

    +

    General exception indicating an error occurred during a Netmiko read operation.

    -Source code + +Expand source code +
    class ReadException(NetmikoBaseException):
         """General exception indicating an error occurred during a Netmiko read operation."""
     
    @@ -5818,9 +5991,11 @@ 

    Subclasses

    (*args, **kwargs)
    -

    General exception indicating an error occurred during a Netmiko read operation.

    +

    General exception indicating an error occurred during a Netmiko read operation.

    -Source code + +Expand source code +
    class ReadTimeout(ReadException):
         """General exception indicating an error occurred during a Netmiko read operation."""
     
    @@ -5836,13 +6011,15 @@ 

    Ancestors

    class SCPConn -(ssh_conn, socket_timeout=10.0, progress=None, progress4=None) +(ssh_conn: BaseConnection, socket_timeout: float = 10.0, progress: Optional[Callable[..., Any]] = None, progress4: Optional[Callable[..., Any]] = None)
    -

    Establish a secure copy channel to the remote network device.

    -

    Must close the SCP connection to get the file to write to the remote filesystem

    +

    Establish a secure copy channel to the remote network device.

    +

    Must close the SCP connection to get the file to write to the remote filesystem

    -Source code + +Expand source code +
    class SCPConn(object):
         """
         Establish a secure copy channel to the remote network device.
    @@ -5894,24 +6071,28 @@ 

    Ancestors

    Methods

    -def close(self) +def close(self) ‑> None
    -

    Close the SCP connection.

    +

    Close the SCP connection.

    -Source code + +Expand source code +
    def close(self) -> None:
         """Close the SCP connection."""
         self.scp_conn.close()
    -def establish_scp_conn(self) +def establish_scp_conn(self) ‑> None
    -

    Establish the secure copy connection.

    +

    Establish the secure copy connection.

    -Source code + +Expand source code +
    def establish_scp_conn(self) -> None:
         """Establish the secure copy connection."""
         ssh_connect_params = self.ssh_ctl_chan._connect_params_dict()
    @@ -5926,36 +6107,42 @@ 

    Methods

    -def scp_get_file(self, source_file, dest_file) +def scp_get_file(self, source_file: str, dest_file: str) ‑> None
    -

    Get file using SCP.

    +

    Get file using SCP.

    -Source code + +Expand source code +
    def scp_get_file(self, source_file: str, dest_file: str) -> None:
         """Get file using SCP."""
         self.scp_client.get(source_file, dest_file)
    -def scp_put_file(self, source_file, dest_file) +def scp_put_file(self, source_file: str, dest_file: str) ‑> None
    -

    Put file using SCP.

    +

    Put file using SCP.

    -Source code + +Expand source code +
    def scp_put_file(self, source_file: str, dest_file: str) -> None:
         """Put file using SCP."""
         self.scp_client.put(source_file, dest_file)
    -def scp_transfer_file(self, source_file, dest_file) +def scp_transfer_file(self, source_file: str, dest_file: str) ‑> None
    -

    Put file using SCP (for backwards compatibility).

    +

    Put file using SCP (for backwards compatibility).

    -Source code + +Expand source code +
    def scp_transfer_file(self, source_file: str, dest_file: str) -> None:
         """Put file using SCP (for backwards compatibility)."""
         self.scp_client.put(source_file, dest_file)
    @@ -5965,10 +6152,10 @@

    Methods

    class SSHDetect -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    The SSHDetect class tries to automatically guess the device type running on the SSH remote end. +

    The SSHDetect class tries to automatically guess the device type running on the SSH remote end. Be careful that the kwargs 'device_type' must be set to 'autodetect', otherwise it won't work at all.

    Parameters

    @@ -5980,7 +6167,7 @@

    Parameters

    Attributes

    -
    connection : TerminalServerSSH
    +
    connection : TerminalServerSSH
    A basic connection to the remote SSH end.
    potential_matches : dict
    Dict of (device_type, accuracy) that is populated through an interaction with the @@ -5989,9 +6176,11 @@

    Attributes

    Methods

    autodetect() Try to determine the device type.

    -

    Constructor of the SSHDetect class

    +

    Constructor of the SSHDetect class

    -Source code + +Expand source code +
    class SSHDetect(object):
         """
         The SSHDetect class tries to automatically guess the device type running on the SSH remote end.
    @@ -6212,17 +6401,19 @@ 

    Methods

    Methods

    -def autodetect(self) +def autodetect(self) ‑> Optional[str]
    -

    Try to guess the best 'device_type' based on patterns defined in SSH_MAPPER_BASE

    +

    Try to guess the best 'device_type' based on patterns defined in SSH_MAPPER_BASE

    Returns

    best_match : str or None
    The device type that is currently the best to use to interact with the device
    -
    +
    -Source code + +Expand source code +
    def autodetect(self) -> Union[str, None]:
         """
         Try to guess the best 'device_type' based on patterns defined in SSH_MAPPER_BASE
    @@ -6434,9 +6625,6 @@ 

    InLin

    NetmikoAuthenticationException

  • -

    NetmikoTimeoutException

    -
  • -
  • NetmikoAuthenticationException

  • @@ -6446,6 +6634,9 @@

    NetmikoTimeoutException

  • +

    NetmikoTimeoutException

    +
  • +
  • ReadException

  • @@ -6473,9 +6664,7 @@

    SSHDetect

  • - - \ No newline at end of file diff --git a/docs/netmiko/ipinfusion/index.html b/docs/netmiko/ipinfusion/index.html index c8ee4b2e3..e2eb97e96 100644 --- a/docs/netmiko/ipinfusion/index.html +++ b/docs/netmiko/ipinfusion/index.html @@ -3,15 +3,17 @@ - + netmiko.ipinfusion API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.ipinfusion

    -Source code + +Expand source code +
    from netmiko.ipinfusion.ipinfusion_ocnos import (
         IpInfusionOcNOSSSH,
         IpInfusionOcNOSTelnet,
    @@ -35,7 +39,7 @@ 

    Sub-modules

    netmiko.ipinfusion.ipinfusion_ocnos
    -
    +
    @@ -48,16 +52,16 @@

    Classes

    class IpInfusionOcNOSSSH -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    IP Infusion OcNOS SSH driver.

    +

    IP Infusion OcNOS SSH driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -96,7 +100,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -141,12 +145,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -154,9 +158,11 @@

    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). -
    +

    -Source code + +Expand source code +
    class IpInfusionOcNOSSSH(IpInfusionOcNOSBase):
         """IP Infusion OcNOS SSH driver."""
     
    @@ -219,17 +225,17 @@ 

    Inherited members

    class IpInfusionOcNOSTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    IP Infusion OcNOS +

    IP Infusion OcNOS Telnet driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -268,7 +274,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -313,12 +319,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -326,9 +332,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class IpInfusionOcNOSTelnet(IpInfusionOcNOSBase):
         """IP Infusion OcNOS  Telnet driver."""
     
    @@ -456,9 +464,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/ipinfusion/ipinfusion_ocnos.html b/docs/netmiko/ipinfusion/ipinfusion_ocnos.html index 119f40c20..b7ca9eaf3 100644 --- a/docs/netmiko/ipinfusion/ipinfusion_ocnos.html +++ b/docs/netmiko/ipinfusion/ipinfusion_ocnos.html @@ -3,15 +3,17 @@ - + netmiko.ipinfusion.ipinfusion_ocnos API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.ipinfusion.ipinfusion_ocnos

    -Source code + +Expand source code +
    import time
     from typing import Any
     from socket import socket
    @@ -113,16 +117,16 @@ 

    Classes

    class IpInfusionOcNOSBase -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Common Methods for IP Infusion OcNOS support.

    +

    Common Methods for IP Infusion OcNOS support.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -161,7 +165,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -206,12 +210,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -219,9 +223,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class IpInfusionOcNOSBase(CiscoBaseConnection):
         """Common Methods for IP Infusion OcNOS support."""
     
    @@ -260,12 +266,14 @@ 

    Subclasses

    Methods

    -def save_config(self, cmd='write', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'write', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Saves Config Using write command

    +

    Saves Config Using write command

    -Source code + +Expand source code +
    def save_config(
         self, cmd: str = "write", confirm: bool = False, confirm_response: str = ""
     ) -> str:
    @@ -326,16 +334,16 @@ 

    Inherited members

    class IpInfusionOcNOSSSH -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    IP Infusion OcNOS SSH driver.

    +

    IP Infusion OcNOS SSH driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -374,7 +382,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -419,12 +427,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -432,9 +440,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class IpInfusionOcNOSSSH(IpInfusionOcNOSBase):
         """IP Infusion OcNOS SSH driver."""
     
    @@ -497,17 +507,17 @@ 

    Inherited members

    class IpInfusionOcNOSTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    IP Infusion OcNOS +

    IP Infusion OcNOS Telnet driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -546,7 +556,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -591,12 +601,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -604,9 +614,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class IpInfusionOcNOSTelnet(IpInfusionOcNOSBase):
         """IP Infusion OcNOS  Telnet driver."""
     
    @@ -735,9 +747,7 @@ 

    - - \ No newline at end of file diff --git a/docs/netmiko/juniper/index.html b/docs/netmiko/juniper/index.html index a30c96b48..c2e7a2486 100644 --- a/docs/netmiko/juniper/index.html +++ b/docs/netmiko/juniper/index.html @@ -3,15 +3,17 @@ - + netmiko.juniper API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.juniper

    -Source code + +Expand source code +
    from netmiko.juniper.juniper import JuniperSSH, JuniperTelnet, JuniperFileTransfer
     from netmiko.juniper.juniper_screenos import JuniperScreenOsSSH
     
    @@ -33,11 +37,11 @@ 

    Sub-modules

    netmiko.juniper.juniper
    -
    +
    netmiko.juniper.juniper_screenos
    -
    +
    @@ -50,12 +54,14 @@

    Classes

    class JuniperFileTransfer -(ssh_conn, source_file, dest_file, file_system='/var/tmp', direction='put', **kwargs) +(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: Optional[str] = '/var/tmp', direction: str = 'put', **kwargs: Any)
    -

    Juniper SCP File Transfer driver.

    +

    Juniper SCP File Transfer driver.

    -Source code + +Expand source code +
    class JuniperFileTransfer(BaseFileTransfer):
         """Juniper SCP File Transfer driver."""
     
    @@ -135,18 +141,18 @@ 

    Inherited members

    class JuniperSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Implement methods for interacting with Juniper Networks devices.

    +

    Implement methods for interacting with Juniper Networks devices.

    methods. Overrides several methods for Juniper-specific compatibility.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -185,7 +191,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -230,12 +236,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -243,9 +249,11 @@

    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). -
    +

    -Source code + +Expand source code +
    class JuniperSSH(JuniperBase):
         pass
    @@ -308,16 +316,16 @@

    Inherited members

    class JuniperScreenOsSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Implement methods for interacting with Juniper ScreenOS devices.

    +

    Implement methods for interacting with Juniper ScreenOS devices.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -356,7 +364,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -401,12 +409,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -414,9 +422,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class JuniperScreenOsSSH(NoEnable, NoConfig, BaseConnection):
         """
         Implement methods for interacting with Juniper ScreenOS devices.
    @@ -454,12 +464,14 @@ 

    Ancestors

    Methods

    -def save_config(self, cmd='save config', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'save config', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Save Config.

    +

    Save Config.

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "save config",
    @@ -471,12 +483,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    ScreenOS can be configured to require: Accept this agreement y/[n]

    +

    ScreenOS can be configured to require: Accept this agreement y/[n]

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """
         ScreenOS can be configured to require: Accept this agreement y/[n]
    @@ -542,18 +556,18 @@ 

    Inherited members

    class JuniperTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Implement methods for interacting with Juniper Networks devices.

    +

    Implement methods for interacting with Juniper Networks devices.

    methods. Overrides several methods for Juniper-specific compatibility.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -592,7 +606,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -637,12 +651,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -650,9 +664,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class JuniperTelnet(JuniperBase):
         def __init__(self, *args: Any, **kwargs: Any) -> None:
             default_enter = kwargs.get("default_enter")
    @@ -760,9 +776,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/juniper/juniper.html b/docs/netmiko/juniper/juniper.html index 0f1a29762..8f8ad21ff 100644 --- a/docs/netmiko/juniper/juniper.html +++ b/docs/netmiko/juniper/juniper.html @@ -3,15 +3,17 @@ - + netmiko.juniper.juniper API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.juniper.juniper

    -Source code + +Expand source code +
    import re
     import warnings
     from typing import Optional, Any
    @@ -92,7 +96,10 @@ 

    Module netmiko.juniper.juniper

    return def check_config_mode( - self, check_string: str = "]", pattern: str = r"(?m:[>#] $)" + self, + check_string: str = "]", + pattern: str = r"(?m:[>#] $)", + force_regex: bool = False, ) -> bool: """ Checks if the device is in configuration mode or not. @@ -246,8 +253,8 @@

    Module netmiko.juniper.juniper

    """ strings_to_strip = [ r"\[edit.*\]", - r"\{master:.*\}", - r"\{backup:.*\}", + r"\{master:?.*\}", + r"\{backup:?.*\}", r"\{line.*\}", r"\{primary.*\}", r"\{secondary.*\}", @@ -255,9 +262,8 @@

    Module netmiko.juniper.juniper

    response_list = a_string.split(self.RESPONSE_RETURN) last_line = response_list[-1] - for pattern in strings_to_strip: - if re.search(pattern, last_line): + if re.search(pattern, last_line, flags=re.I): return self.RESPONSE_RETURN.join(response_list[:-1]) return a_string @@ -344,18 +350,18 @@

    Classes

    class JuniperBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Implement methods for interacting with Juniper Networks devices.

    +

    Implement methods for interacting with Juniper Networks devices.

    methods. Overrides several methods for Juniper-specific compatibility.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -394,7 +400,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -439,12 +445,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -452,9 +458,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class JuniperBase(NoEnable, BaseConnection):
         """
         Implement methods for interacting with Juniper Networks devices.
    @@ -516,7 +524,10 @@ 

    Classes

    return def check_config_mode( - self, check_string: str = "]", pattern: str = r"(?m:[>#] $)" + self, + check_string: str = "]", + pattern: str = r"(?m:[>#] $)", + force_regex: bool = False, ) -> bool: """ Checks if the device is in configuration mode or not. @@ -670,8 +681,8 @@

    Classes

    """ strings_to_strip = [ r"\[edit.*\]", - r"\{master:.*\}", - r"\{backup:.*\}", + r"\{master:?.*\}", + r"\{backup:?.*\}", r"\{line.*\}", r"\{primary.*\}", r"\{secondary.*\}", @@ -679,9 +690,8 @@

    Classes

    response_list = a_string.split(self.RESPONSE_RETURN) last_line = response_list[-1] - for pattern in strings_to_strip: - if re.search(pattern, last_line): + if re.search(pattern, last_line, flags=re.I): return self.RESPONSE_RETURN.join(response_list[:-1]) return a_string @@ -709,17 +719,22 @@

    Subclasses

    Methods

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

    Checks if the device is in configuration mode or not.

    +

    Checks if the device is in configuration mode or not.

    ?m = Use multiline matching

    Juniper unfortunately will use # as a message indicator when not in config mode -For example, with commit confirmed.

    +For example, with commit confirmed.

    -Source code + +Expand source code +
    def check_config_mode(
    -    self, check_string: str = "]", pattern: str = r"(?m:[>#] $)"
    +    self,
    +    check_string: str = "]",
    +    pattern: str = r"(?m:[>#] $)",
    +    force_regex: bool = False,
     ) -> bool:
         """
         Checks if the device is in configuration mode or not.
    @@ -734,12 +749,14 @@ 

    Methods

    -def cleanup(self, command='exit') +def cleanup(self, command: str = 'exit') ‑> None
    -

    Gracefully exit the SSH session.

    +

    Gracefully exit the SSH session.

    -Source code + +Expand source code +
    def cleanup(self, command: str = "exit") -> None:
         """Gracefully exit the SSH session."""
         try:
    @@ -753,10 +770,10 @@ 

    Methods

    -def commit(self, confirm=False, confirm_delay=None, check=False, comment='', and_quit=False, read_timeout=120.0, delay_factor=None) +def commit(self, confirm: bool = False, confirm_delay: Optional[int] = None, check: bool = False, comment: str = '', and_quit: bool = False, read_timeout: float = 120.0, delay_factor: Optional[float] = None) ‑> str
    -

    Commit the candidate configuration.

    +

    Commit the candidate configuration.

    Commit the entered configuration. Raise an error and return the failure if the commit fails.

    Automatically enters configuration mode

    @@ -772,9 +789,11 @@

    Methods

    command_string = commit confirmed or commit confirmed check: command_string = commit check

    -

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    +

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    -Source code + +Expand source code +
    def commit(
         self,
         confirm: bool = False,
    @@ -863,13 +882,15 @@ 

    Methods

    -def config_mode(self, config_command='configure', pattern='(?s:Entering configuration mode.*\\].*#)', re_flags=0) +def config_mode(self, config_command: str = 'configure', pattern: str = '(?s:Entering configuration mode.*\\].*#)', re_flags: int = 0) ‑> str
    -

    Enter configuration mode.

    -

    ?s = enables re.DOTALL in regex pattern.

    +

    Enter configuration mode.

    +

    ?s = enables re.DOTALL in regex pattern.

    -Source code + +Expand source code +
    def config_mode(
         self,
         config_command: str = "configure",
    @@ -887,12 +908,14 @@ 

    Methods

    -def enter_cli_mode(self) +def enter_cli_mode(self) ‑> None
    -

    Check if at shell prompt root@ and go into CLI.

    +

    Check if at shell prompt root@ and go into CLI.

    -Source code + +Expand source code +
    def enter_cli_mode(self) -> None:
         """Check if at shell prompt root@ and go into CLI."""
         mode = self._determine_mode()
    @@ -908,12 +931,14 @@ 

    Methods

    -def exit_config_mode(self, exit_config='exit configuration-mode', pattern='') +def exit_config_mode(self, exit_config: str = 'exit configuration-mode', pattern: str = '') ‑> str
    -

    Exit configuration mode.

    +

    Exit configuration mode.

    -Source code + +Expand source code +
    def exit_config_mode(
         self, exit_config: str = "exit configuration-mode", pattern: str = ""
     ) -> str:
    @@ -938,12 +963,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         pattern = r"[%>$#]"
    @@ -964,17 +991,19 @@ 

    Methods

    -def strip_context_items(self, a_string) +def strip_context_items(self, a_string: str) ‑> str
    -

    Strip Juniper-specific output.

    +

    Strip Juniper-specific output.

    Juniper will also put a configuration context: [edit]

    and various chassis contexts: {master:0}, {backup:1}

    -

    This method removes those lines.

    +

    This method removes those lines.

    -Source code + +Expand source code +
    def strip_context_items(self, a_string: str) -> str:
         """Strip Juniper-specific output.
     
    @@ -988,8 +1017,8 @@ 

    Methods

    """ strings_to_strip = [ r"\[edit.*\]", - r"\{master:.*\}", - r"\{backup:.*\}", + r"\{master:?.*\}", + r"\{backup:?.*\}", r"\{line.*\}", r"\{primary.*\}", r"\{secondary.*\}", @@ -997,20 +1026,21 @@

    Methods

    response_list = a_string.split(self.RESPONSE_RETURN) last_line = response_list[-1] - for pattern in strings_to_strip: - if re.search(pattern, last_line): + if re.search(pattern, last_line, flags=re.I): return self.RESPONSE_RETURN.join(response_list[:-1]) return a_string
    -def strip_prompt(self, *args, **kwargs) +def strip_prompt(self, *args: Any, **kwargs: Any) ‑> str
    -

    Strip the trailing router prompt from the output.

    +

    Strip the trailing router prompt from the output.

    -Source code + +Expand source code +
    def strip_prompt(self, *args: Any, **kwargs: Any) -> str:
         """Strip the trailing router prompt from the output."""
         a_string = super().strip_prompt(*args, **kwargs)
    @@ -1062,12 +1092,14 @@ 

    Inherited members

    class JuniperFileTransfer -(ssh_conn, source_file, dest_file, file_system='/var/tmp', direction='put', **kwargs) +(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: Optional[str] = '/var/tmp', direction: str = 'put', **kwargs: Any)
    -

    Juniper SCP File Transfer driver.

    +

    Juniper SCP File Transfer driver.

    -Source code + +Expand source code +
    class JuniperFileTransfer(BaseFileTransfer):
         """Juniper SCP File Transfer driver."""
     
    @@ -1147,18 +1179,18 @@ 

    Inherited members

    class JuniperSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Implement methods for interacting with Juniper Networks devices.

    +

    Implement methods for interacting with Juniper Networks devices.

    methods. Overrides several methods for Juniper-specific compatibility.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -1197,7 +1229,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -1242,12 +1274,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -1255,9 +1287,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class JuniperSSH(JuniperBase):
         pass
    @@ -1320,18 +1354,18 @@

    Inherited members

    class JuniperTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Implement methods for interacting with Juniper Networks devices.

    +

    Implement methods for interacting with Juniper Networks devices.

    methods. Overrides several methods for Juniper-specific compatibility.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -1370,7 +1404,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -1415,12 +1449,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -1428,9 +1462,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class JuniperTelnet(JuniperBase):
         def __init__(self, *args: Any, **kwargs: Any) -> None:
             default_enter = kwargs.get("default_enter")
    @@ -1539,9 +1575,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/juniper/juniper_screenos.html b/docs/netmiko/juniper/juniper_screenos.html index d5f174581..ca4e2d937 100644 --- a/docs/netmiko/juniper/juniper_screenos.html +++ b/docs/netmiko/juniper/juniper_screenos.html @@ -3,15 +3,17 @@ - + netmiko.juniper.juniper_screenos API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.juniper.juniper_screenos

    -Source code + +Expand source code +
    from netmiko.no_enable import NoEnable
     from netmiko.no_config import NoConfig
     from netmiko.base_connection import BaseConnection
    @@ -67,16 +71,16 @@ 

    Classes

    class JuniperScreenOsSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Implement methods for interacting with Juniper ScreenOS devices.

    +

    Implement methods for interacting with Juniper ScreenOS devices.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -115,7 +119,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -160,12 +164,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -173,9 +177,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class JuniperScreenOsSSH(NoEnable, NoConfig, BaseConnection):
         """
         Implement methods for interacting with Juniper ScreenOS devices.
    @@ -213,12 +219,14 @@ 

    Ancestors

    Methods

    -def save_config(self, cmd='save config', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'save config', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Save Config.

    +

    Save Config.

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "save config",
    @@ -230,12 +238,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    ScreenOS can be configured to require: Accept this agreement y/[n]

    +

    ScreenOS can be configured to require: Accept this agreement y/[n]

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """
         ScreenOS can be configured to require: Accept this agreement y/[n]
    @@ -328,9 +338,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/keymile/index.html b/docs/netmiko/keymile/index.html index 3296ce928..483518d89 100644 --- a/docs/netmiko/keymile/index.html +++ b/docs/netmiko/keymile/index.html @@ -3,15 +3,17 @@ - + netmiko.keymile API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.keymile

    -Source code + +Expand source code +
    from netmiko.keymile.keymile_ssh import KeymileSSH
     from netmiko.keymile.keymile_nos_ssh import KeymileNOSSSH
     
    @@ -33,11 +37,11 @@ 

    Sub-modules

    netmiko.keymile.keymile_nos_ssh
    -
    +
    netmiko.keymile.keymile_ssh
    -
    +
    @@ -50,16 +54,16 @@

    Classes

    class KeymileNOSSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Common Methods for IOS (both SSH and telnet).

    +

    Common Methods for IOS (both SSH and telnet).

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -98,7 +102,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -143,12 +147,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -156,9 +160,11 @@

    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). -
    +

    -Source code + +Expand source code +
    class KeymileNOSSSH(CiscoIosBase):
         def session_preparation(self) -> None:
             """Prepare the session after the connection has been established."""
    @@ -195,13 +201,15 @@ 

    Ancestors

    Methods

    -def special_login_handler(self, delay_factor=1.0) +def special_login_handler(self, delay_factor: float = 1.0) ‑> None
    -

    Since Keymile NOS always returns True on paramiko.connect() we -check the output for substring Login incorrect after connecting.

    +

    Since Keymile NOS always returns True on paramiko.connect() we +check the output for substring Login incorrect after connecting.

    -Source code + +Expand source code +
    def special_login_handler(self, delay_factor: float = 1.0) -> None:
         """Since Keymile NOS always returns True on paramiko.connect() we
         check the output for substring Login incorrect after connecting."""
    @@ -259,19 +267,21 @@ 

    Inherited members

    class KeymileSSH -(**kwargs) +(**kwargs: Any)
    -

    Class for platforms that have no enable mode.

    +

    Class for platforms that have no enable mode.

    Netmiko translates the meaning of "enable" mode to be a proxy for "can go into config mode". In other words, that you ultimately have privileges to execute configuration changes.

    The expectation on platforms that have no method for elevating privileges is that the standard default privileges allow configuration changes.

    Consequently check_enable_mode returns True by default for platforms that -don't explicitly support enable mode.

    +don't explicitly support enable mode.

    -Source code + +Expand source code +
    class KeymileSSH(NoEnable, NoConfig, CiscoIosBase):
         def __init__(self, **kwargs: Any) -> None:
             kwargs.setdefault("default_enter", "\r\n")
    @@ -319,24 +329,28 @@ 

    Ancestors

    Methods

    -def disable_paging(self, *args, **kwargs) +def disable_paging(self, *args: Any, **kwargs: Any) ‑> str
    -

    Keymile does not use paging.

    +

    Keymile does not use paging.

    -Source code + +Expand source code +
    def disable_paging(self, *args: Any, **kwargs: Any) -> str:
         """Keymile does not use paging."""
         return ""
    -def set_base_prompt(self, pri_prompt_terminator='>', alt_prompt_terminator='>', delay_factor=1.0, pattern=None) +def set_base_prompt(self, pri_prompt_terminator: str = '>', alt_prompt_terminator: str = '>', delay_factor: float = 1.0, pattern: Optional[str] = None) ‑> str
    -

    set prompt termination to >

    +

    set prompt termination to >

    -Source code + +Expand source code +
    def set_base_prompt(
         self,
         pri_prompt_terminator: str = ">",
    @@ -354,12 +368,14 @@ 

    Methods

    -def strip_prompt(self, a_string) +def strip_prompt(self, a_string: str) ‑> str
    -

    Remove appending empty line and prompt from output

    +

    Remove appending empty line and prompt from output

    -Source code + +Expand source code +
    def strip_prompt(self, a_string: str) -> str:
         """Remove appending empty line and prompt from output"""
         a_string = a_string[:-1]
    @@ -455,9 +471,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/keymile/keymile_nos_ssh.html b/docs/netmiko/keymile/keymile_nos_ssh.html index 374a69b35..09bc067ff 100644 --- a/docs/netmiko/keymile/keymile_nos_ssh.html +++ b/docs/netmiko/keymile/keymile_nos_ssh.html @@ -3,15 +3,17 @@ - + netmiko.keymile.keymile_nos_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.keymile.keymile_nos_ssh

    -Source code + +Expand source code +
    import time
     import re
     
    @@ -69,16 +73,16 @@ 

    Classes

    class KeymileNOSSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Common Methods for IOS (both SSH and telnet).

    +

    Common Methods for IOS (both SSH and telnet).

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -117,7 +121,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -162,12 +166,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -175,9 +179,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class KeymileNOSSSH(CiscoIosBase):
         def session_preparation(self) -> None:
             """Prepare the session after the connection has been established."""
    @@ -214,13 +220,15 @@ 

    Ancestors

    Methods

    -def special_login_handler(self, delay_factor=1.0) +def special_login_handler(self, delay_factor: float = 1.0) ‑> None
    -

    Since Keymile NOS always returns True on paramiko.connect() we -check the output for substring Login incorrect after connecting.

    +

    Since Keymile NOS always returns True on paramiko.connect() we +check the output for substring Login incorrect after connecting.

    -Source code + +Expand source code +
    def special_login_handler(self, delay_factor: float = 1.0) -> None:
         """Since Keymile NOS always returns True on paramiko.connect() we
         check the output for substring Login incorrect after connecting."""
    @@ -304,9 +312,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/keymile/keymile_ssh.html b/docs/netmiko/keymile/keymile_ssh.html index e95cc85ed..b092b1a8a 100644 --- a/docs/netmiko/keymile/keymile_ssh.html +++ b/docs/netmiko/keymile/keymile_ssh.html @@ -3,15 +3,17 @@ - + netmiko.keymile.keymile_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.keymile.keymile_ssh

    -Source code + +Expand source code +
    from typing import Any, Optional
     import time
     
    @@ -78,19 +82,21 @@ 

    Classes

    class KeymileSSH -(**kwargs) +(**kwargs: Any)
    -

    Class for platforms that have no enable mode.

    +

    Class for platforms that have no enable mode.

    Netmiko translates the meaning of "enable" mode to be a proxy for "can go into config mode". In other words, that you ultimately have privileges to execute configuration changes.

    The expectation on platforms that have no method for elevating privileges is that the standard default privileges allow configuration changes.

    Consequently check_enable_mode returns True by default for platforms that -don't explicitly support enable mode.

    +don't explicitly support enable mode.

    -Source code + +Expand source code +
    class KeymileSSH(NoEnable, NoConfig, CiscoIosBase):
         def __init__(self, **kwargs: Any) -> None:
             kwargs.setdefault("default_enter", "\r\n")
    @@ -138,24 +144,28 @@ 

    Ancestors

    Methods

    -def disable_paging(self, *args, **kwargs) +def disable_paging(self, *args: Any, **kwargs: Any) ‑> str
    -

    Keymile does not use paging.

    +

    Keymile does not use paging.

    -Source code + +Expand source code +
    def disable_paging(self, *args: Any, **kwargs: Any) -> str:
         """Keymile does not use paging."""
         return ""
    -def set_base_prompt(self, pri_prompt_terminator='>', alt_prompt_terminator='>', delay_factor=1.0, pattern=None) +def set_base_prompt(self, pri_prompt_terminator: str = '>', alt_prompt_terminator: str = '>', delay_factor: float = 1.0, pattern: Optional[str] = None) ‑> str
    -

    set prompt termination to >

    +

    set prompt termination to >

    -Source code + +Expand source code +
    def set_base_prompt(
         self,
         pri_prompt_terminator: str = ">",
    @@ -173,12 +183,14 @@ 

    Methods

    -def strip_prompt(self, a_string) +def strip_prompt(self, a_string: str) ‑> str
    -

    Remove appending empty line and prompt from output

    +

    Remove appending empty line and prompt from output

    -Source code + +Expand source code +
    def strip_prompt(self, a_string: str) -> str:
         """Remove appending empty line and prompt from output"""
         a_string = a_string[:-1]
    @@ -262,9 +274,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/linux/index.html b/docs/netmiko/linux/index.html index 6fe789b5d..00ff46677 100644 --- a/docs/netmiko/linux/index.html +++ b/docs/netmiko/linux/index.html @@ -3,15 +3,17 @@ - + netmiko.linux API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.linux

    -Source code + +Expand source code +
    from netmiko.linux.linux_ssh import LinuxSSH, LinuxFileTransfer
     
     __all__ = ["LinuxSSH", "LinuxFileTransfer"]
    @@ -32,7 +36,7 @@

    Sub-modules

    netmiko.linux.linux_ssh
    -
    +
    @@ -45,13 +49,15 @@

    Classes

    class LinuxFileTransfer -(ssh_conn, source_file, dest_file, file_system='/var/tmp', direction='put', **kwargs) +(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: Optional[str] = '/var/tmp', direction: str = 'put', **kwargs: Any)
    -

    Linux SCP File Transfer driver.

    -

    Mostly for testing purposes.

    +

    Linux SCP File Transfer driver.

    +

    Mostly for testing purposes.

    -Source code + +Expand source code +
    class LinuxFileTransfer(CiscoFileTransfer):
         """
         Linux SCP File Transfer driver.
    @@ -150,16 +156,16 @@ 

    Inherited members

    class LinuxSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -198,7 +204,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -243,12 +249,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -256,14 +262,19 @@

    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). -
    +

    -Source code + +Expand source code +
    class LinuxSSH(CiscoSSHConnection):
    +    prompt_pattern = rf"[{re.escape(LINUX_PROMPT_PRI)}{re.escape(LINUX_PROMPT_ALT)}]"
    +
         def session_preparation(self) -> None:
             """Prepare the session after the connection has been established."""
             self.ansi_escape_codes = True
    -        return super().session_preparation()
    +        self._test_channel_read(pattern=self.prompt_pattern)
    +        self.set_base_prompt()
     
         def _enter_shell(self) -> str:
             """Already in shell."""
    @@ -277,6 +288,13 @@ 

    Inherited members

    """Linux doesn't have paging by default.""" return "" + def find_prompt( + self, delay_factor: float = 1.0, pattern: Optional[str] = None + ) -> str: + if pattern is None: + pattern = self.prompt_pattern + return super().find_prompt(delay_factor=delay_factor, pattern=pattern) + def set_base_prompt( self, pri_prompt_terminator: str = LINUX_PROMPT_PRI, @@ -285,6 +303,8 @@

    Inherited members

    pattern: Optional[str] = None, ) -> str: """Determine base prompt.""" + if pattern is None: + pattern = self.prompt_pattern return super().set_base_prompt( pri_prompt_terminator=pri_prompt_terminator, alt_prompt_terminator=alt_prompt_terminator, @@ -306,7 +326,10 @@

    Inherited members

    ) def check_config_mode( - self, check_string: str = LINUX_PROMPT_ROOT, pattern: str = "" + self, + check_string: str = LINUX_PROMPT_ROOT, + pattern: str = "", + force_regex: bool = False, ) -> bool: """Verify root""" return self.check_enable_mode(check_string=check_string) @@ -329,15 +352,13 @@

    Inherited members

    def exit_enable_mode(self, exit_command: str = "exit") -> str: """Exit enable mode.""" - delay_factor = self.select_delay_factor(delay_factor=0) - # You can run into a timing issue here if the time.sleep is too small - if delay_factor < 1: - delay_factor = 1 output = "" if self.check_enable_mode(): self.write_channel(self.normalize_cmd(exit_command)) - time.sleep(0.3 * delay_factor) - self.set_base_prompt() + output += self.read_until_pattern(pattern=exit_command) + output += self.read_until_pattern(pattern=self.prompt_pattern) + # Nature of prompt might change with the privilege deescalation + self.set_base_prompt(pattern=self.prompt_pattern) if self.check_enable_mode(): raise ValueError("Failed to exit enable mode.") return output @@ -350,25 +371,32 @@

    Inherited members

    re_flags: int = re.IGNORECASE, ) -> str: """Attempt to become root.""" - delay_factor = self.select_delay_factor(delay_factor=0) + msg = """ + +Netmiko failed to elevate privileges. + +Please ensure you pass the sudo password into ConnectHandler +using the 'secret' argument and that the user has sudo +permissions. + +""" + output = "" if not self.check_enable_mode(): self.write_channel(self.normalize_cmd(cmd)) - time.sleep(0.3 * delay_factor) - try: - output += self.read_channel() - if re.search(pattern, output, flags=re_flags): - self.write_channel(self.normalize_cmd(self.secret)) - self.set_base_prompt() - except socket.timeout: - raise NetmikoTimeoutException( - "Timed-out reading channel, data not available." - ) + # Failed "sudo -s" will put "#" in output so have to delineate further + root_prompt = rf"(?m:{LINUX_PROMPT_ROOT}\s*$)" + prompt_or_password = rf"({root_prompt}|{pattern})" + output += self.read_until_pattern(pattern=prompt_or_password) + if re.search(pattern, output, flags=re_flags): + self.write_channel(self.normalize_cmd(self.secret)) + try: + output += self.read_until_pattern(pattern=root_prompt) + except ReadTimeout: + raise ValueError(msg) + # Nature of prompt might change with the privilege escalation + self.set_base_prompt(pattern=root_prompt) if not self.check_enable_mode(): - msg = ( - "Failed to enter enable mode. Please ensure you pass " - "the 'secret' argument to ConnectHandler." - ) raise ValueError(msg) return output @@ -391,53 +419,71 @@

    Subclasses

  • F5LinuxSSH
  • OvsLinuxSSH
  • +

    Class variables

    +
    +
    var prompt_pattern
    +
    +
    +
    +

    Methods

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

    Verify root

    +

    Verify root

    -Source code + +Expand source code +
    def check_config_mode(
    -    self, check_string: str = LINUX_PROMPT_ROOT, pattern: str = ""
    +    self,
    +    check_string: str = LINUX_PROMPT_ROOT,
    +    pattern: str = "",
    +    force_regex: bool = False,
     ) -> bool:
         """Verify root"""
         return self.check_enable_mode(check_string=check_string)
    -def check_enable_mode(self, check_string='#') +def check_enable_mode(self, check_string: str = '#') ‑> bool
    -

    Verify root

    +

    Verify root

    -Source code + +Expand source code +
    def check_enable_mode(self, check_string: str = LINUX_PROMPT_ROOT) -> bool:
         """Verify root"""
         return super().check_enable_mode(check_string=check_string)
    -def cleanup(self, command='exit') +def cleanup(self, command: str = 'exit') ‑> None
    -

    Try to Gracefully exit the SSH session.

    +

    Try to Gracefully exit the SSH session.

    -Source code + +Expand source code +
    def cleanup(self, command: str = "exit") -> None:
         """Try to Gracefully exit the SSH session."""
         return super().cleanup(command=command)
    -def config_mode(self, config_command='sudo -s', pattern='ssword', re_flags=re.IGNORECASE) +def config_mode(self, config_command: str = 'sudo -s', pattern: str = 'ssword', re_flags: int = re.IGNORECASE) ‑> str
    -

    Attempt to become root.

    +

    Attempt to become root.

    -Source code + +Expand source code +
    def config_mode(
         self,
         config_command: str = "sudo -s",
    @@ -449,97 +495,112 @@ 

    Methods

    -def disable_paging(self, *args, **kwargs) +def disable_paging(self, *args: Any, **kwargs: Any) ‑> str
    -

    Linux doesn't have paging by default.

    +

    Linux doesn't have paging by default.

    -Source code + +Expand source code +
    def disable_paging(self, *args: Any, **kwargs: Any) -> str:
         """Linux doesn't have paging by default."""
         return ""
    -def enable(self, cmd='sudo -s', pattern='ssword', enable_pattern=None, re_flags=re.IGNORECASE) +def enable(self, cmd: str = 'sudo -s', pattern: str = 'ssword', enable_pattern: Optional[str] = None, re_flags: int = re.IGNORECASE) ‑> str
    -

    Attempt to become root.

    +

    Attempt to become root.

    -Source code -
    def enable(
    -    self,
    -    cmd: str = "sudo -s",
    -    pattern: str = "ssword",
    -    enable_pattern: Optional[str] = None,
    -    re_flags: int = re.IGNORECASE,
    -) -> str:
    -    """Attempt to become root."""
    -    delay_factor = self.select_delay_factor(delay_factor=0)
    -    output = ""
    -    if not self.check_enable_mode():
    -        self.write_channel(self.normalize_cmd(cmd))
    -        time.sleep(0.3 * delay_factor)
    -        try:
    -            output += self.read_channel()
    +
    +Expand source code
    +
    +
        def enable(
    +        self,
    +        cmd: str = "sudo -s",
    +        pattern: str = "ssword",
    +        enable_pattern: Optional[str] = None,
    +        re_flags: int = re.IGNORECASE,
    +    ) -> str:
    +        """Attempt to become root."""
    +        msg = """
    +
    +Netmiko failed to elevate privileges.
    +
    +Please ensure you pass the sudo password into ConnectHandler
    +using the 'secret' argument and that the user has sudo
    +permissions.
    +
    +"""
    +
    +        output = ""
    +        if not self.check_enable_mode():
    +            self.write_channel(self.normalize_cmd(cmd))
    +            # Failed "sudo -s" will put "#" in output so have to delineate further
    +            root_prompt = rf"(?m:{LINUX_PROMPT_ROOT}\s*$)"
    +            prompt_or_password = rf"({root_prompt}|{pattern})"
    +            output += self.read_until_pattern(pattern=prompt_or_password)
                 if re.search(pattern, output, flags=re_flags):
                     self.write_channel(self.normalize_cmd(self.secret))
    -            self.set_base_prompt()
    -        except socket.timeout:
    -            raise NetmikoTimeoutException(
    -                "Timed-out reading channel, data not available."
    -            )
    -        if not self.check_enable_mode():
    -            msg = (
    -                "Failed to enter enable mode. Please ensure you pass "
    -                "the 'secret' argument to ConnectHandler."
    -            )
    -            raise ValueError(msg)
    -    return output
    + try: + output += self.read_until_pattern(pattern=root_prompt) + except ReadTimeout: + raise ValueError(msg) + # Nature of prompt might change with the privilege escalation + self.set_base_prompt(pattern=root_prompt) + if not self.check_enable_mode(): + raise ValueError(msg) + return output
    -def exit_enable_mode(self, exit_command='exit') +def exit_enable_mode(self, exit_command: str = 'exit') ‑> str
    -

    Exit enable mode.

    +

    Exit enable mode.

    -Source code + +Expand source code +
    def exit_enable_mode(self, exit_command: str = "exit") -> str:
         """Exit enable mode."""
    -    delay_factor = self.select_delay_factor(delay_factor=0)
    -    # You can run into a timing issue here if the time.sleep is too small
    -    if delay_factor < 1:
    -        delay_factor = 1
         output = ""
         if self.check_enable_mode():
             self.write_channel(self.normalize_cmd(exit_command))
    -        time.sleep(0.3 * delay_factor)
    -        self.set_base_prompt()
    +        output += self.read_until_pattern(pattern=exit_command)
    +        output += self.read_until_pattern(pattern=self.prompt_pattern)
    +        # Nature of prompt might change with the privilege deescalation
    +        self.set_base_prompt(pattern=self.prompt_pattern)
             if self.check_enable_mode():
                 raise ValueError("Failed to exit enable mode.")
         return output
    -def save_config(self, *args, **kwargs) +def save_config(self, *args: Any, **kwargs: Any) ‑> str
    -

    Not Implemented

    +

    Not Implemented

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

    Can't exit from root (if root)

    +

    Can't exit from root (if root)

    -Source code + +Expand source code +
    def send_config_set(
         self,
         config_commands: Union[str, Sequence[str], TextIO, None] = None,
    @@ -555,25 +616,30 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self.ansi_escape_codes = True
    -    return super().session_preparation()
    + self._test_channel_read(pattern=self.prompt_pattern) + self.set_base_prompt()
    -def set_base_prompt(self, pri_prompt_terminator='$', alt_prompt_terminator='#', delay_factor=1.0, pattern=None) +def set_base_prompt(self, pri_prompt_terminator: str = '$', alt_prompt_terminator: str = '#', delay_factor: float = 1.0, pattern: Optional[str] = None) ‑> str
    -

    Determine base prompt.

    +

    Determine base prompt.

    -Source code + +Expand source code +
    def set_base_prompt(
         self,
         pri_prompt_terminator: str = LINUX_PROMPT_PRI,
    @@ -582,6 +648,8 @@ 

    Methods

    pattern: Optional[str] = None, ) -> str: """Determine base prompt.""" + if pattern is None: + pattern = self.prompt_pattern return super().set_base_prompt( pri_prompt_terminator=pri_prompt_terminator, alt_prompt_terminator=alt_prompt_terminator, @@ -663,6 +731,7 @@

    Linux
  • disable_paging
  • enable
  • exit_enable_mode
  • +
  • prompt_pattern
  • save_config
  • send_config_set
  • session_preparation
  • @@ -675,9 +744,7 @@

    Linux

    - - \ No newline at end of file diff --git a/docs/netmiko/linux/linux_ssh.html b/docs/netmiko/linux/linux_ssh.html index 25100cdd1..4de939de2 100644 --- a/docs/netmiko/linux/linux_ssh.html +++ b/docs/netmiko/linux/linux_ssh.html @@ -3,15 +3,17 @@ - + netmiko.linux.linux_ssh API documentation - - - - - + + + + + + +
    @@ -21,19 +23,19 @@

    Module netmiko.linux.linux_ssh

    -Source code + +Expand source code +
    from typing import Any, Optional, TYPE_CHECKING, Union, Sequence, TextIO
     import os
     import re
    -import socket
    -import time
     
     if TYPE_CHECKING:
         from netmiko.base_connection import BaseConnection
     
     from netmiko.cisco_base_connection import CiscoSSHConnection
     from netmiko.cisco_base_connection import CiscoFileTransfer
    -from netmiko.exceptions import NetmikoTimeoutException
    +from netmiko.exceptions import ReadTimeout
     
     LINUX_PROMPT_PRI = os.getenv("NETMIKO_LINUX_PROMPT_PRI", "$")
     LINUX_PROMPT_ALT = os.getenv("NETMIKO_LINUX_PROMPT_ALT", "#")
    @@ -41,10 +43,13 @@ 

    Module netmiko.linux.linux_ssh

    class LinuxSSH(CiscoSSHConnection): + prompt_pattern = rf"[{re.escape(LINUX_PROMPT_PRI)}{re.escape(LINUX_PROMPT_ALT)}]" + def session_preparation(self) -> None: """Prepare the session after the connection has been established.""" self.ansi_escape_codes = True - return super().session_preparation() + self._test_channel_read(pattern=self.prompt_pattern) + self.set_base_prompt() def _enter_shell(self) -> str: """Already in shell.""" @@ -58,6 +63,13 @@

    Module netmiko.linux.linux_ssh

    """Linux doesn't have paging by default.""" return "" + def find_prompt( + self, delay_factor: float = 1.0, pattern: Optional[str] = None + ) -> str: + if pattern is None: + pattern = self.prompt_pattern + return super().find_prompt(delay_factor=delay_factor, pattern=pattern) + def set_base_prompt( self, pri_prompt_terminator: str = LINUX_PROMPT_PRI, @@ -66,6 +78,8 @@

    Module netmiko.linux.linux_ssh

    pattern: Optional[str] = None, ) -> str: """Determine base prompt.""" + if pattern is None: + pattern = self.prompt_pattern return super().set_base_prompt( pri_prompt_terminator=pri_prompt_terminator, alt_prompt_terminator=alt_prompt_terminator, @@ -87,7 +101,10 @@

    Module netmiko.linux.linux_ssh

    ) def check_config_mode( - self, check_string: str = LINUX_PROMPT_ROOT, pattern: str = "" + self, + check_string: str = LINUX_PROMPT_ROOT, + pattern: str = "", + force_regex: bool = False, ) -> bool: """Verify root""" return self.check_enable_mode(check_string=check_string) @@ -110,15 +127,13 @@

    Module netmiko.linux.linux_ssh

    def exit_enable_mode(self, exit_command: str = "exit") -> str: """Exit enable mode.""" - delay_factor = self.select_delay_factor(delay_factor=0) - # You can run into a timing issue here if the time.sleep is too small - if delay_factor < 1: - delay_factor = 1 output = "" if self.check_enable_mode(): self.write_channel(self.normalize_cmd(exit_command)) - time.sleep(0.3 * delay_factor) - self.set_base_prompt() + output += self.read_until_pattern(pattern=exit_command) + output += self.read_until_pattern(pattern=self.prompt_pattern) + # Nature of prompt might change with the privilege deescalation + self.set_base_prompt(pattern=self.prompt_pattern) if self.check_enable_mode(): raise ValueError("Failed to exit enable mode.") return output @@ -131,25 +146,32 @@

    Module netmiko.linux.linux_ssh

    re_flags: int = re.IGNORECASE, ) -> str: """Attempt to become root.""" - delay_factor = self.select_delay_factor(delay_factor=0) + msg = """ + +Netmiko failed to elevate privileges. + +Please ensure you pass the sudo password into ConnectHandler +using the 'secret' argument and that the user has sudo +permissions. + +""" + output = "" if not self.check_enable_mode(): self.write_channel(self.normalize_cmd(cmd)) - time.sleep(0.3 * delay_factor) - try: - output += self.read_channel() - if re.search(pattern, output, flags=re_flags): - self.write_channel(self.normalize_cmd(self.secret)) - self.set_base_prompt() - except socket.timeout: - raise NetmikoTimeoutException( - "Timed-out reading channel, data not available." - ) + # Failed "sudo -s" will put "#" in output so have to delineate further + root_prompt = rf"(?m:{LINUX_PROMPT_ROOT}\s*$)" + prompt_or_password = rf"({root_prompt}|{pattern})" + output += self.read_until_pattern(pattern=prompt_or_password) + if re.search(pattern, output, flags=re_flags): + self.write_channel(self.normalize_cmd(self.secret)) + try: + output += self.read_until_pattern(pattern=root_prompt) + except ReadTimeout: + raise ValueError(msg) + # Nature of prompt might change with the privilege escalation + self.set_base_prompt(pattern=root_prompt) if not self.check_enable_mode(): - msg = ( - "Failed to enter enable mode. Please ensure you pass " - "the 'secret' argument to ConnectHandler." - ) raise ValueError(msg) return output @@ -240,13 +262,15 @@

    Classes

    class LinuxFileTransfer -(ssh_conn, source_file, dest_file, file_system='/var/tmp', direction='put', **kwargs) +(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: Optional[str] = '/var/tmp', direction: str = 'put', **kwargs: Any)
    -

    Linux SCP File Transfer driver.

    -

    Mostly for testing purposes.

    +

    Linux SCP File Transfer driver.

    +

    Mostly for testing purposes.

    -Source code + +Expand source code +
    class LinuxFileTransfer(CiscoFileTransfer):
         """
         Linux SCP File Transfer driver.
    @@ -345,16 +369,16 @@ 

    Inherited members

    class LinuxSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -393,7 +417,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -438,12 +462,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -451,14 +475,19 @@

    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). -
    +
    -Source code + +Expand source code +
    class LinuxSSH(CiscoSSHConnection):
    +    prompt_pattern = rf"[{re.escape(LINUX_PROMPT_PRI)}{re.escape(LINUX_PROMPT_ALT)}]"
    +
         def session_preparation(self) -> None:
             """Prepare the session after the connection has been established."""
             self.ansi_escape_codes = True
    -        return super().session_preparation()
    +        self._test_channel_read(pattern=self.prompt_pattern)
    +        self.set_base_prompt()
     
         def _enter_shell(self) -> str:
             """Already in shell."""
    @@ -472,6 +501,13 @@ 

    Inherited members

    """Linux doesn't have paging by default.""" return "" + def find_prompt( + self, delay_factor: float = 1.0, pattern: Optional[str] = None + ) -> str: + if pattern is None: + pattern = self.prompt_pattern + return super().find_prompt(delay_factor=delay_factor, pattern=pattern) + def set_base_prompt( self, pri_prompt_terminator: str = LINUX_PROMPT_PRI, @@ -480,6 +516,8 @@

    Inherited members

    pattern: Optional[str] = None, ) -> str: """Determine base prompt.""" + if pattern is None: + pattern = self.prompt_pattern return super().set_base_prompt( pri_prompt_terminator=pri_prompt_terminator, alt_prompt_terminator=alt_prompt_terminator, @@ -501,7 +539,10 @@

    Inherited members

    ) def check_config_mode( - self, check_string: str = LINUX_PROMPT_ROOT, pattern: str = "" + self, + check_string: str = LINUX_PROMPT_ROOT, + pattern: str = "", + force_regex: bool = False, ) -> bool: """Verify root""" return self.check_enable_mode(check_string=check_string) @@ -524,15 +565,13 @@

    Inherited members

    def exit_enable_mode(self, exit_command: str = "exit") -> str: """Exit enable mode.""" - delay_factor = self.select_delay_factor(delay_factor=0) - # You can run into a timing issue here if the time.sleep is too small - if delay_factor < 1: - delay_factor = 1 output = "" if self.check_enable_mode(): self.write_channel(self.normalize_cmd(exit_command)) - time.sleep(0.3 * delay_factor) - self.set_base_prompt() + output += self.read_until_pattern(pattern=exit_command) + output += self.read_until_pattern(pattern=self.prompt_pattern) + # Nature of prompt might change with the privilege deescalation + self.set_base_prompt(pattern=self.prompt_pattern) if self.check_enable_mode(): raise ValueError("Failed to exit enable mode.") return output @@ -545,25 +584,32 @@

    Inherited members

    re_flags: int = re.IGNORECASE, ) -> str: """Attempt to become root.""" - delay_factor = self.select_delay_factor(delay_factor=0) + msg = """ + +Netmiko failed to elevate privileges. + +Please ensure you pass the sudo password into ConnectHandler +using the 'secret' argument and that the user has sudo +permissions. + +""" + output = "" if not self.check_enable_mode(): self.write_channel(self.normalize_cmd(cmd)) - time.sleep(0.3 * delay_factor) - try: - output += self.read_channel() - if re.search(pattern, output, flags=re_flags): - self.write_channel(self.normalize_cmd(self.secret)) - self.set_base_prompt() - except socket.timeout: - raise NetmikoTimeoutException( - "Timed-out reading channel, data not available." - ) + # Failed "sudo -s" will put "#" in output so have to delineate further + root_prompt = rf"(?m:{LINUX_PROMPT_ROOT}\s*$)" + prompt_or_password = rf"({root_prompt}|{pattern})" + output += self.read_until_pattern(pattern=prompt_or_password) + if re.search(pattern, output, flags=re_flags): + self.write_channel(self.normalize_cmd(self.secret)) + try: + output += self.read_until_pattern(pattern=root_prompt) + except ReadTimeout: + raise ValueError(msg) + # Nature of prompt might change with the privilege escalation + self.set_base_prompt(pattern=root_prompt) if not self.check_enable_mode(): - msg = ( - "Failed to enter enable mode. Please ensure you pass " - "the 'secret' argument to ConnectHandler." - ) raise ValueError(msg) return output @@ -586,53 +632,71 @@

    Subclasses

  • F5LinuxSSH
  • OvsLinuxSSH
  • +

    Class variables

    +
    +
    var prompt_pattern
    +
    +
    +
    +

    Methods

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

    Verify root

    +

    Verify root

    -Source code + +Expand source code +
    def check_config_mode(
    -    self, check_string: str = LINUX_PROMPT_ROOT, pattern: str = ""
    +    self,
    +    check_string: str = LINUX_PROMPT_ROOT,
    +    pattern: str = "",
    +    force_regex: bool = False,
     ) -> bool:
         """Verify root"""
         return self.check_enable_mode(check_string=check_string)
    -def check_enable_mode(self, check_string='#') +def check_enable_mode(self, check_string: str = '#') ‑> bool
    -

    Verify root

    +

    Verify root

    -Source code + +Expand source code +
    def check_enable_mode(self, check_string: str = LINUX_PROMPT_ROOT) -> bool:
         """Verify root"""
         return super().check_enable_mode(check_string=check_string)
    -def cleanup(self, command='exit') +def cleanup(self, command: str = 'exit') ‑> None
    -

    Try to Gracefully exit the SSH session.

    +

    Try to Gracefully exit the SSH session.

    -Source code + +Expand source code +
    def cleanup(self, command: str = "exit") -> None:
         """Try to Gracefully exit the SSH session."""
         return super().cleanup(command=command)
    -def config_mode(self, config_command='sudo -s', pattern='ssword', re_flags=re.IGNORECASE) +def config_mode(self, config_command: str = 'sudo -s', pattern: str = 'ssword', re_flags: int = re.IGNORECASE) ‑> str
    -

    Attempt to become root.

    +

    Attempt to become root.

    -Source code + +Expand source code +
    def config_mode(
         self,
         config_command: str = "sudo -s",
    @@ -644,97 +708,112 @@ 

    Methods

    -def disable_paging(self, *args, **kwargs) +def disable_paging(self, *args: Any, **kwargs: Any) ‑> str
    -

    Linux doesn't have paging by default.

    +

    Linux doesn't have paging by default.

    -Source code + +Expand source code +
    def disable_paging(self, *args: Any, **kwargs: Any) -> str:
         """Linux doesn't have paging by default."""
         return ""
    -def enable(self, cmd='sudo -s', pattern='ssword', enable_pattern=None, re_flags=re.IGNORECASE) +def enable(self, cmd: str = 'sudo -s', pattern: str = 'ssword', enable_pattern: Optional[str] = None, re_flags: int = re.IGNORECASE) ‑> str
    -

    Attempt to become root.

    +

    Attempt to become root.

    -Source code -
    def enable(
    -    self,
    -    cmd: str = "sudo -s",
    -    pattern: str = "ssword",
    -    enable_pattern: Optional[str] = None,
    -    re_flags: int = re.IGNORECASE,
    -) -> str:
    -    """Attempt to become root."""
    -    delay_factor = self.select_delay_factor(delay_factor=0)
    -    output = ""
    -    if not self.check_enable_mode():
    -        self.write_channel(self.normalize_cmd(cmd))
    -        time.sleep(0.3 * delay_factor)
    -        try:
    -            output += self.read_channel()
    +
    +Expand source code
    +
    +
        def enable(
    +        self,
    +        cmd: str = "sudo -s",
    +        pattern: str = "ssword",
    +        enable_pattern: Optional[str] = None,
    +        re_flags: int = re.IGNORECASE,
    +    ) -> str:
    +        """Attempt to become root."""
    +        msg = """
    +
    +Netmiko failed to elevate privileges.
    +
    +Please ensure you pass the sudo password into ConnectHandler
    +using the 'secret' argument and that the user has sudo
    +permissions.
    +
    +"""
    +
    +        output = ""
    +        if not self.check_enable_mode():
    +            self.write_channel(self.normalize_cmd(cmd))
    +            # Failed "sudo -s" will put "#" in output so have to delineate further
    +            root_prompt = rf"(?m:{LINUX_PROMPT_ROOT}\s*$)"
    +            prompt_or_password = rf"({root_prompt}|{pattern})"
    +            output += self.read_until_pattern(pattern=prompt_or_password)
                 if re.search(pattern, output, flags=re_flags):
                     self.write_channel(self.normalize_cmd(self.secret))
    -            self.set_base_prompt()
    -        except socket.timeout:
    -            raise NetmikoTimeoutException(
    -                "Timed-out reading channel, data not available."
    -            )
    -        if not self.check_enable_mode():
    -            msg = (
    -                "Failed to enter enable mode. Please ensure you pass "
    -                "the 'secret' argument to ConnectHandler."
    -            )
    -            raise ValueError(msg)
    -    return output
    + try: + output += self.read_until_pattern(pattern=root_prompt) + except ReadTimeout: + raise ValueError(msg) + # Nature of prompt might change with the privilege escalation + self.set_base_prompt(pattern=root_prompt) + if not self.check_enable_mode(): + raise ValueError(msg) + return output
    -def exit_enable_mode(self, exit_command='exit') +def exit_enable_mode(self, exit_command: str = 'exit') ‑> str
    -

    Exit enable mode.

    +

    Exit enable mode.

    -Source code + +Expand source code +
    def exit_enable_mode(self, exit_command: str = "exit") -> str:
         """Exit enable mode."""
    -    delay_factor = self.select_delay_factor(delay_factor=0)
    -    # You can run into a timing issue here if the time.sleep is too small
    -    if delay_factor < 1:
    -        delay_factor = 1
         output = ""
         if self.check_enable_mode():
             self.write_channel(self.normalize_cmd(exit_command))
    -        time.sleep(0.3 * delay_factor)
    -        self.set_base_prompt()
    +        output += self.read_until_pattern(pattern=exit_command)
    +        output += self.read_until_pattern(pattern=self.prompt_pattern)
    +        # Nature of prompt might change with the privilege deescalation
    +        self.set_base_prompt(pattern=self.prompt_pattern)
             if self.check_enable_mode():
                 raise ValueError("Failed to exit enable mode.")
         return output
    -def save_config(self, *args, **kwargs) +def save_config(self, *args: Any, **kwargs: Any) ‑> str
    -

    Not Implemented

    +

    Not Implemented

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

    Can't exit from root (if root)

    +

    Can't exit from root (if root)

    -Source code + +Expand source code +
    def send_config_set(
         self,
         config_commands: Union[str, Sequence[str], TextIO, None] = None,
    @@ -750,25 +829,30 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self.ansi_escape_codes = True
    -    return super().session_preparation()
    + self._test_channel_read(pattern=self.prompt_pattern) + self.set_base_prompt()

    -def set_base_prompt(self, pri_prompt_terminator='$', alt_prompt_terminator='#', delay_factor=1.0, pattern=None) +def set_base_prompt(self, pri_prompt_terminator: str = '$', alt_prompt_terminator: str = '#', delay_factor: float = 1.0, pattern: Optional[str] = None) ‑> str
    -

    Determine base prompt.

    +

    Determine base prompt.

    -Source code + +Expand source code +
    def set_base_prompt(
         self,
         pri_prompt_terminator: str = LINUX_PROMPT_PRI,
    @@ -777,6 +861,8 @@ 

    Methods

    pattern: Optional[str] = None, ) -> str: """Determine base prompt.""" + if pattern is None: + pattern = self.prompt_pattern return super().set_base_prompt( pri_prompt_terminator=pri_prompt_terminator, alt_prompt_terminator=alt_prompt_terminator, @@ -853,6 +939,7 @@

    disable_paging
  • enable
  • exit_enable_mode
  • +
  • prompt_pattern
  • save_config
  • send_config_set
  • session_preparation
  • @@ -865,9 +952,7 @@

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/mellanox/index.html b/docs/netmiko/mellanox/index.html index b0807fe36..7bf77e8a0 100644 --- a/docs/netmiko/mellanox/index.html +++ b/docs/netmiko/mellanox/index.html @@ -3,15 +3,17 @@ - + netmiko.mellanox API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.mellanox

    -Source code + +Expand source code +
    from netmiko.mellanox.mellanox_mlnxos_ssh import MellanoxMlnxosSSH
     
     __all__ = ["MellanoxMlnxosSSH"]
    @@ -32,7 +36,7 @@

    Sub-modules

    netmiko.mellanox.mellanox_mlnxos_ssh
    -

    Mellanox MLNX-OS Switch support.

    +

    Mellanox MLNX-OS Switch support.

    @@ -45,16 +49,16 @@

    Classes

    class MellanoxMlnxosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Mellanox MLNX-OS Switch support.

    +

    Mellanox MLNX-OS Switch support.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -93,7 +97,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -138,12 +142,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -151,9 +155,11 @@

    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). -
    +

    -Source code + +Expand source code +
    class MellanoxMlnxosSSH(CiscoSSHConnection):
         """Mellanox MLNX-OS Switch support."""
     
    @@ -186,7 +192,10 @@ 

    Classes

    ) def check_config_mode( - self, check_string: str = "(config", pattern: str = r"#" + self, + check_string: str = "(config", + pattern: str = r"#", + force_regex: bool = False, ) -> bool: return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -248,12 +257,14 @@

    Ancestors

    Methods

    -def enable(self, cmd='enable', pattern='#', enable_pattern=None, re_flags=re.IGNORECASE) +def enable(self, cmd: str = 'enable', pattern: str = '#', enable_pattern: Optional[str] = None, re_flags: int = re.IGNORECASE) ‑> str
    -

    Enter into enable mode.

    +

    Enter into enable mode.

    -Source code + +Expand source code +
    def enable(
         self,
         cmd: str = "enable",
    @@ -274,13 +285,15 @@ 

    Methods

    -def exit_config_mode(self, exit_config='exit', pattern='#') +def exit_config_mode(self, exit_config: str = 'exit', pattern: str = '#') ‑> str
    -

    Mellanox does not support a single command to completely exit configuration mode.

    -

    Consequently, need to keep checking and sending "exit".

    +

    Mellanox does not support a single command to completely exit configuration mode.

    +

    Consequently, need to keep checking and sending "exit".

    -Source code + +Expand source code +
    def exit_config_mode(self, exit_config: str = "exit", pattern: str = "#") -> str:
         """Mellanox does not support a single command to completely exit configuration mode.
     
    @@ -305,12 +318,14 @@ 

    Methods

    -def save_config(self, cmd='configuration write', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'configuration write', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Save Config on Mellanox devices Enters and Leaves Config Mode

    +

    Save Config on Mellanox devices Enters and Leaves Config Mode

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "configuration write",
    @@ -407,9 +422,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/mellanox/mellanox_mlnxos_ssh.html b/docs/netmiko/mellanox/mellanox_mlnxos_ssh.html index fd5de7660..368a4f770 100644 --- a/docs/netmiko/mellanox/mellanox_mlnxos_ssh.html +++ b/docs/netmiko/mellanox/mellanox_mlnxos_ssh.html @@ -3,15 +3,17 @@ - + netmiko.mellanox.mellanox_mlnxos_ssh API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.mellanox.mellanox_mlnxos_ssh

    Mellanox MLNX-OS Switch support.

    -Source code + +Expand source code +
    """Mellanox MLNX-OS Switch support."""
     import re
     from typing import Optional
    @@ -63,7 +67,10 @@ 

    Module netmiko.mellanox.mellanox_mlnxos_ssh

    ) def check_config_mode( - self, check_string: str = "(config", pattern: str = r"#" + self, + check_string: str = "(config", + pattern: str = r"#", + force_regex: bool = False, ) -> bool: return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -128,16 +135,16 @@

    Classes

    class MellanoxMlnxosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Mellanox MLNX-OS Switch support.

    +

    Mellanox MLNX-OS Switch support.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -176,7 +183,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -221,12 +228,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -234,9 +241,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class MellanoxMlnxosSSH(CiscoSSHConnection):
         """Mellanox MLNX-OS Switch support."""
     
    @@ -269,7 +278,10 @@ 

    Classes

    ) def check_config_mode( - self, check_string: str = "(config", pattern: str = r"#" + self, + check_string: str = "(config", + pattern: str = r"#", + force_regex: bool = False, ) -> bool: return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -331,12 +343,14 @@

    Ancestors

    Methods

    -def enable(self, cmd='enable', pattern='#', enable_pattern=None, re_flags=re.IGNORECASE) +def enable(self, cmd: str = 'enable', pattern: str = '#', enable_pattern: Optional[str] = None, re_flags: int = re.IGNORECASE) ‑> str
    -

    Enter into enable mode.

    +

    Enter into enable mode.

    -Source code + +Expand source code +
    def enable(
         self,
         cmd: str = "enable",
    @@ -357,13 +371,15 @@ 

    Methods

    -def exit_config_mode(self, exit_config='exit', pattern='#') +def exit_config_mode(self, exit_config: str = 'exit', pattern: str = '#') ‑> str
    -

    Mellanox does not support a single command to completely exit configuration mode.

    -

    Consequently, need to keep checking and sending "exit".

    +

    Mellanox does not support a single command to completely exit configuration mode.

    +

    Consequently, need to keep checking and sending "exit".

    -Source code + +Expand source code +
    def exit_config_mode(self, exit_config: str = "exit", pattern: str = "#") -> str:
         """Mellanox does not support a single command to completely exit configuration mode.
     
    @@ -388,12 +404,14 @@ 

    Methods

    -def save_config(self, cmd='configuration write', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'configuration write', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Save Config on Mellanox devices Enters and Leaves Config Mode

    +

    Save Config on Mellanox devices Enters and Leaves Config Mode

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "configuration write",
    @@ -485,9 +503,7 @@ 

    - - \ No newline at end of file diff --git a/docs/netmiko/mikrotik/index.html b/docs/netmiko/mikrotik/index.html index 6a52e5401..fdd7a68ba 100644 --- a/docs/netmiko/mikrotik/index.html +++ b/docs/netmiko/mikrotik/index.html @@ -3,15 +3,17 @@ - + netmiko.mikrotik API documentation - - - - - + + + + + + +
    @@ -21,11 +23,14 @@

    Module netmiko.mikrotik

    -Source code + +Expand source code +
    from netmiko.mikrotik.mikrotik_ssh import MikrotikRouterOsSSH
     from netmiko.mikrotik.mikrotik_ssh import MikrotikSwitchOsSSH
    +from netmiko.mikrotik.mikrotik_ssh import MikrotikRouterOsFileTransfer
     
    -__all__ = ["MikrotikRouterOsSSH", "MikrotikSwitchOsSSH"]
    +__all__ = ["MikrotikRouterOsSSH", "MikrotikSwitchOsSSH", "MikrotikRouterOsFileTransfer"]

    @@ -33,7 +38,7 @@

    Sub-modules

    netmiko.mikrotik.mikrotik_ssh
    -
    +
    @@ -44,14 +49,271 @@

    Sub-modules

    Classes

    +
    +class MikrotikRouterOsFileTransfer +(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: Optional[str] = 'flash', direction: str = 'put', socket_timeout: float = 10.0, progress: Optional[Callable[..., Any]] = None, progress4: Optional[Callable[..., Any]] = None, hash_supported: bool = False) +
    +
    +

    Mikrotik Router Os File Transfer driver.

    +
    + +Expand source code + +
    class MikrotikRouterOsFileTransfer(BaseFileTransfer):
    +    """Mikrotik Router Os File Transfer driver."""
    +
    +    def __init__(
    +        self,
    +        ssh_conn: BaseConnection,
    +        source_file: str,
    +        dest_file: str,
    +        file_system: Optional[str] = "flash",
    +        direction: str = "put",
    +        socket_timeout: float = 10.0,
    +        progress: Optional[Callable[..., Any]] = None,
    +        progress4: Optional[Callable[..., Any]] = None,
    +        hash_supported: bool = False,
    +    ) -> None:
    +        super().__init__(
    +            ssh_conn=ssh_conn,
    +            source_file=source_file,
    +            dest_file=dest_file,
    +            file_system=file_system,
    +            direction=direction,
    +            socket_timeout=socket_timeout,
    +            progress=progress,
    +            progress4=progress4,
    +            hash_supported=hash_supported,
    +        )
    +
    +    def check_file_exists(self, remote_cmd: str = "") -> bool:
    +        """Check if the dest_file already exists on the file system."""
    +        if self.direction == "put":
    +            if not remote_cmd:
    +                remote_cmd = f'/file print detail where name="{self.file_system}/{self.dest_file}"'
    +            remote_out = self.ssh_ctl_chan._send_command_timing_str(remote_cmd)
    +            # Output will look like
    +            # 0 name="flash/test9.txt" type=".txt file" size=19 creation-time=jun...
    +            # fail case will be blank line (all whitespace)
    +            if (
    +                "size" in remote_out
    +                and f"{self.file_system}/{self.dest_file}" in remote_out
    +            ):
    +                return True
    +            elif not remote_out.strip():
    +                return False
    +            raise ValueError("Unexpected output from check_file_exists")
    +        elif self.direction == "get":
    +            return os.path.exists(self.dest_file)
    +        else:
    +            raise ValueError("Unexpected value for self.direction")
    +
    +    def remote_space_available(self, search_pattern: str = "") -> int:
    +        """Return space available on remote device."""
    +        remote_cmd = "system resource print without-paging"
    +        sys_res = self.ssh_ctl_chan._send_command_timing_str(remote_cmd).splitlines()
    +        for res in sys_res:
    +            if "free-memory" in res:
    +                spaceMib = res.strip().replace("free-memory: ", "").replace("MiB", "")
    +                return int(float(spaceMib) * 1048576)
    +        raise ValueError("Unexpected output from remote_space_available")
    +
    +    def remote_file_size(
    +        self, remote_cmd: str = "", remote_file: Optional[str] = None
    +    ) -> int:
    +        """Get the file size of the remote file."""
    +        if remote_file is None:
    +            if self.direction == "put":
    +                remote_file = self.dest_file
    +            elif self.direction == "get":
    +                remote_file = self.source_file
    +            else:
    +                raise ValueError("Invalid value for file transfer direction.")
    +
    +        if not remote_cmd:
    +            remote_cmd = (
    +                f'/file print detail where name="{self.file_system}/{remote_file}"'
    +            )
    +        remote_out = self.ssh_ctl_chan._send_command_timing_str(remote_cmd)
    +        try:
    +            size = remote_out.split("size=")[1].split(" ")[0]
    +            return self._format_to_bytes(size)
    +        except (KeyError, IndexError):
    +            raise ValueError("Unable to find file on remote system")
    +
    +    def file_md5(self, file_name: str, add_newline: bool = False) -> str:
    +        raise AttributeError(
    +            "RouterOS does not natively support an MD5-hash operation."
    +        )
    +
    +    @staticmethod
    +    def process_md5(md5_output: str, pattern: str = "") -> str:
    +        raise AttributeError(
    +            "RouterOS does not natively support an MD5-hash operation."
    +        )
    +
    +    def compare_md5(self) -> bool:
    +        raise AttributeError(
    +            "RouterOS does not natively support an MD5-hash operation."
    +        )
    +
    +    def remote_md5(self, base_cmd: str = "", remote_file: Optional[str] = None) -> str:
    +        raise AttributeError(
    +            "RouterOS does not natively support an MD5-hash operation."
    +        )
    +
    +    def verify_file(self) -> bool:
    +        """
    +        Verify the file has been transferred correctly based on filesize.
    +        This method is very approximate as Mikrotik rounds file sizes to KiB, MiB, GiB...
    +        Therefore multiple conversions from/to bytes are needed
    +        """
    +        if self.direction == "put":
    +            local_size = self._format_bytes(os.stat(self.source_file).st_size)
    +            remote_size = self._format_bytes(
    +                self.remote_file_size(remote_file=self.dest_file)
    +            )
    +            return local_size == remote_size
    +        elif self.direction == "get":
    +            local_size = self._format_bytes(os.stat(self.dest_file).st_size)
    +            remote_size = self._format_bytes(
    +                self.remote_file_size(remote_file=self.source_file)
    +            )
    +            return local_size == remote_size
    +        else:
    +            raise ValueError("Unexpected value of self.direction")
    +
    +    @staticmethod
    +    def _format_to_bytes(size: str) -> int:
    +        """
    +        Internal function to convert Mikrotik size to bytes
    +        """
    +        if size.endswith("KiB"):
    +            return round(int(float(size.replace("KiB", "")) * 1024))
    +        if size.endswith("MiB"):
    +            return round(int(float(size.replace("MiB", "")) * 1048576))
    +        if size.endswith("GiB"):
    +            return round(int(float(size.replace("GiB", "")) * 1073741824))
    +        return round(int(size))
    +
    +    @staticmethod
    +    def _format_bytes(size: int) -> str:
    +        """
    +        Internal function to convert bytes to KiB, MiB or GiB
    +        Extremely approximate
    +        """
    +        n = 0
    +        levels = {0: "", 1: "Ki", 2: "Mi", 3: "Gi"}
    +        while size > 4096 and n < 3:
    +            size = round(size / 1024)
    +            n += 1
    +        return f"{size}{levels[n]}B"
    +
    +

    Ancestors

    + +

    Methods

    +
    +
    +def check_file_exists(self, remote_cmd: str = '') ‑> bool +
    +
    +

    Check if the dest_file already exists on the file system.

    +
    + +Expand source code + +
    def check_file_exists(self, remote_cmd: str = "") -> bool:
    +    """Check if the dest_file already exists on the file system."""
    +    if self.direction == "put":
    +        if not remote_cmd:
    +            remote_cmd = f'/file print detail where name="{self.file_system}/{self.dest_file}"'
    +        remote_out = self.ssh_ctl_chan._send_command_timing_str(remote_cmd)
    +        # Output will look like
    +        # 0 name="flash/test9.txt" type=".txt file" size=19 creation-time=jun...
    +        # fail case will be blank line (all whitespace)
    +        if (
    +            "size" in remote_out
    +            and f"{self.file_system}/{self.dest_file}" in remote_out
    +        ):
    +            return True
    +        elif not remote_out.strip():
    +            return False
    +        raise ValueError("Unexpected output from check_file_exists")
    +    elif self.direction == "get":
    +        return os.path.exists(self.dest_file)
    +    else:
    +        raise ValueError("Unexpected value for self.direction")
    +
    +
    +
    +def verify_file(self) ‑> bool +
    +
    +

    Verify the file has been transferred correctly based on filesize. +This method is very approximate as Mikrotik rounds file sizes to KiB, MiB, GiB… +Therefore multiple conversions from/to bytes are needed

    +
    + +Expand source code + +
    def verify_file(self) -> bool:
    +    """
    +    Verify the file has been transferred correctly based on filesize.
    +    This method is very approximate as Mikrotik rounds file sizes to KiB, MiB, GiB...
    +    Therefore multiple conversions from/to bytes are needed
    +    """
    +    if self.direction == "put":
    +        local_size = self._format_bytes(os.stat(self.source_file).st_size)
    +        remote_size = self._format_bytes(
    +            self.remote_file_size(remote_file=self.dest_file)
    +        )
    +        return local_size == remote_size
    +    elif self.direction == "get":
    +        local_size = self._format_bytes(os.stat(self.dest_file).st_size)
    +        remote_size = self._format_bytes(
    +            self.remote_file_size(remote_file=self.source_file)
    +        )
    +        return local_size == remote_size
    +    else:
    +        raise ValueError("Unexpected value of self.direction")
    +
    +
    +
    +

    Inherited members

    + +
    class MikrotikRouterOsSSH -(**kwargs) +(**kwargs: Any)
    -

    Mikrotik RouterOS SSH driver.

    +

    Mikrotik RouterOS SSH driver.

    -Source code + +Expand source code +
    class MikrotikRouterOsSSH(MikrotikBase):
         """Mikrotik RouterOS SSH driver."""
     
    @@ -106,7 +368,7 @@ 

    Inherited members

  • special_login_handler
  • strip_ansi_escape_codes
  • strip_backspaces
  • -
  • strip_command
  • +
  • strip_command
  • strip_prompt
  • telnet_login
  • write_channel
  • @@ -116,12 +378,14 @@

    Inherited members

    class MikrotikSwitchOsSSH -(**kwargs) +(**kwargs: Any)
    -

    Mikrotik SwitchOS SSH driver.

    +

    Mikrotik SwitchOS SSH driver.

    -Source code + +Expand source code +
    class MikrotikSwitchOsSSH(MikrotikBase):
         """Mikrotik SwitchOS SSH driver."""
     
    @@ -176,7 +440,7 @@ 

    Inherited members

  • special_login_handler
  • strip_ansi_escape_codes
  • strip_backspaces
  • -
  • strip_command
  • +
  • strip_command
  • strip_prompt
  • telnet_login
  • write_channel
  • @@ -206,6 +470,13 @@

    Index

  • Classes

    • +

      MikrotikRouterOsFileTransfer

      + +
    • +
    • MikrotikRouterOsSSH

    • @@ -217,9 +488,7 @@

      -

      Generated by pdoc 0.6.3.

      +

      Generated by pdoc 0.10.0.

      - - \ No newline at end of file diff --git a/docs/netmiko/mikrotik/mikrotik_ssh.html b/docs/netmiko/mikrotik/mikrotik_ssh.html index 8349fb62e..6350bae76 100644 --- a/docs/netmiko/mikrotik/mikrotik_ssh.html +++ b/docs/netmiko/mikrotik/mikrotik_ssh.html @@ -3,15 +3,17 @@ - + netmiko.mikrotik.mikrotik_ssh API documentation - - - - - + + + + + + +
      @@ -21,10 +23,17 @@

      Module netmiko.mikrotik.mikrotik_ssh

      -Source code -
      from typing import Any, Union, List, Dict, Optional
      +
      +Expand source code
      +
      +
      from typing import Any, Union, List, Dict, Optional, Callable
      +import re
      +import os
      +
       from netmiko.no_enable import NoEnable
       from netmiko.cisco_base_connection import CiscoSSHConnection
      +from netmiko.base_connection import BaseConnection
      +from netmiko.scp_handler import BaseFileTransfer
       
       
       class MikrotikBase(NoEnable, CiscoSSHConnection):
      @@ -69,7 +78,9 @@ 

      Module netmiko.mikrotik.mikrotik_ssh

      self._in_config_mode = True return "" - def check_config_mode(self, check_string: str = "", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "", pattern: str = "", force_regex: bool = False + ) -> bool: """Checks whether in configuration mode. Returns a boolean.""" return self._in_config_mode @@ -101,6 +112,28 @@

      Module netmiko.mikrotik.mikrotik_ssh

      # Unexpected just return the original string return a_string + def strip_command(self, command_string: str, output: str) -> str: + """ + Mikrotik can echo the command multiple times :-( + + Example: + system routerboard print + [admin@MikroTik] > system routerboard print + """ + output = super().strip_command(command_string, output) + cmd = command_string.strip() + + output = output.lstrip() + # '[admin@MikroTik] > cmd' then the first newline should be matched + pattern = rf"^\[.*\] > {re.escape(cmd)}.*${self.RESPONSE_RETURN}" + if re.search(pattern, output, flags=re.M): + output_lines = re.split(pattern, output, flags=re.M) + new_output = output_lines[1:] + return self.RESPONSE_RETURN.join(new_output) + else: + # command_string isn't there; do nothing + return output + def set_base_prompt( self, pri_prompt_terminator: str = ">", @@ -126,7 +159,7 @@

      Module netmiko.mikrotik.mikrotik_ssh

      **kwargs: Any, ) -> Union[str, List[Any], Dict[str, Any]]: """Force cmd_verify to be True due to all of the line repainting""" - return super()._send_command_timing_str( + return super().send_command_timing( command_string=command_string, cmd_verify=cmd_verify, **kwargs ) @@ -140,7 +173,158 @@

      Module netmiko.mikrotik.mikrotik_ssh

      class MikrotikSwitchOsSSH(MikrotikBase): """Mikrotik SwitchOS SSH driver.""" - pass
      + pass + + +class MikrotikRouterOsFileTransfer(BaseFileTransfer): + """Mikrotik Router Os File Transfer driver.""" + + def __init__( + self, + ssh_conn: BaseConnection, + source_file: str, + dest_file: str, + file_system: Optional[str] = "flash", + direction: str = "put", + socket_timeout: float = 10.0, + progress: Optional[Callable[..., Any]] = None, + progress4: Optional[Callable[..., Any]] = None, + hash_supported: bool = False, + ) -> None: + super().__init__( + ssh_conn=ssh_conn, + source_file=source_file, + dest_file=dest_file, + file_system=file_system, + direction=direction, + socket_timeout=socket_timeout, + progress=progress, + progress4=progress4, + hash_supported=hash_supported, + ) + + def check_file_exists(self, remote_cmd: str = "") -> bool: + """Check if the dest_file already exists on the file system.""" + if self.direction == "put": + if not remote_cmd: + remote_cmd = f'/file print detail where name="{self.file_system}/{self.dest_file}"' + remote_out = self.ssh_ctl_chan._send_command_timing_str(remote_cmd) + # Output will look like + # 0 name="flash/test9.txt" type=".txt file" size=19 creation-time=jun... + # fail case will be blank line (all whitespace) + if ( + "size" in remote_out + and f"{self.file_system}/{self.dest_file}" in remote_out + ): + return True + elif not remote_out.strip(): + return False + raise ValueError("Unexpected output from check_file_exists") + elif self.direction == "get": + return os.path.exists(self.dest_file) + else: + raise ValueError("Unexpected value for self.direction") + + def remote_space_available(self, search_pattern: str = "") -> int: + """Return space available on remote device.""" + remote_cmd = "system resource print without-paging" + sys_res = self.ssh_ctl_chan._send_command_timing_str(remote_cmd).splitlines() + for res in sys_res: + if "free-memory" in res: + spaceMib = res.strip().replace("free-memory: ", "").replace("MiB", "") + return int(float(spaceMib) * 1048576) + raise ValueError("Unexpected output from remote_space_available") + + def remote_file_size( + self, remote_cmd: str = "", remote_file: Optional[str] = None + ) -> int: + """Get the file size of the remote file.""" + if remote_file is None: + if self.direction == "put": + remote_file = self.dest_file + elif self.direction == "get": + remote_file = self.source_file + else: + raise ValueError("Invalid value for file transfer direction.") + + if not remote_cmd: + remote_cmd = ( + f'/file print detail where name="{self.file_system}/{remote_file}"' + ) + remote_out = self.ssh_ctl_chan._send_command_timing_str(remote_cmd) + try: + size = remote_out.split("size=")[1].split(" ")[0] + return self._format_to_bytes(size) + except (KeyError, IndexError): + raise ValueError("Unable to find file on remote system") + + def file_md5(self, file_name: str, add_newline: bool = False) -> str: + raise AttributeError( + "RouterOS does not natively support an MD5-hash operation." + ) + + @staticmethod + def process_md5(md5_output: str, pattern: str = "") -> str: + raise AttributeError( + "RouterOS does not natively support an MD5-hash operation." + ) + + def compare_md5(self) -> bool: + raise AttributeError( + "RouterOS does not natively support an MD5-hash operation." + ) + + def remote_md5(self, base_cmd: str = "", remote_file: Optional[str] = None) -> str: + raise AttributeError( + "RouterOS does not natively support an MD5-hash operation." + ) + + def verify_file(self) -> bool: + """ + Verify the file has been transferred correctly based on filesize. + This method is very approximate as Mikrotik rounds file sizes to KiB, MiB, GiB... + Therefore multiple conversions from/to bytes are needed + """ + if self.direction == "put": + local_size = self._format_bytes(os.stat(self.source_file).st_size) + remote_size = self._format_bytes( + self.remote_file_size(remote_file=self.dest_file) + ) + return local_size == remote_size + elif self.direction == "get": + local_size = self._format_bytes(os.stat(self.dest_file).st_size) + remote_size = self._format_bytes( + self.remote_file_size(remote_file=self.source_file) + ) + return local_size == remote_size + else: + raise ValueError("Unexpected value of self.direction") + + @staticmethod + def _format_to_bytes(size: str) -> int: + """ + Internal function to convert Mikrotik size to bytes + """ + if size.endswith("KiB"): + return round(int(float(size.replace("KiB", "")) * 1024)) + if size.endswith("MiB"): + return round(int(float(size.replace("MiB", "")) * 1048576)) + if size.endswith("GiB"): + return round(int(float(size.replace("GiB", "")) * 1073741824)) + return round(int(size)) + + @staticmethod + def _format_bytes(size: int) -> str: + """ + Internal function to convert bytes to KiB, MiB or GiB + Extremely approximate + """ + n = 0 + levels = {0: "", 1: "Ki", 2: "Mi", 3: "Gi"} + while size > 4096 and n < 3: + size = round(size / 1024) + n += 1 + return f"{size}{levels[n]}B"
      @@ -154,12 +338,14 @@

      Classes

      class MikrotikBase -(**kwargs) +(**kwargs: Any)
      -

      Common Methods for Mikrotik RouterOS and SwitchOS

      +

      Common Methods for Mikrotik RouterOS and SwitchOS

      -Source code + +Expand source code +
      class MikrotikBase(NoEnable, CiscoSSHConnection):
           """Common Methods for Mikrotik RouterOS and SwitchOS"""
       
      @@ -202,7 +388,9 @@ 

      Classes

      self._in_config_mode = True return "" - def check_config_mode(self, check_string: str = "", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "", pattern: str = "", force_regex: bool = False + ) -> bool: """Checks whether in configuration mode. Returns a boolean.""" return self._in_config_mode @@ -234,6 +422,28 @@

      Classes

      # Unexpected just return the original string return a_string + def strip_command(self, command_string: str, output: str) -> str: + """ + Mikrotik can echo the command multiple times :-( + + Example: + system routerboard print + [admin@MikroTik] > system routerboard print + """ + output = super().strip_command(command_string, output) + cmd = command_string.strip() + + output = output.lstrip() + # '[admin@MikroTik] > cmd' then the first newline should be matched + pattern = rf"^\[.*\] > {re.escape(cmd)}.*${self.RESPONSE_RETURN}" + if re.search(pattern, output, flags=re.M): + output_lines = re.split(pattern, output, flags=re.M) + new_output = output_lines[1:] + return self.RESPONSE_RETURN.join(new_output) + else: + # command_string isn't there; do nothing + return output + def set_base_prompt( self, pri_prompt_terminator: str = ">", @@ -259,7 +469,7 @@

      Classes

      **kwargs: Any, ) -> Union[str, List[Any], Dict[str, Any]]: """Force cmd_verify to be True due to all of the line repainting""" - return super()._send_command_timing_str( + return super().send_command_timing( command_string=command_string, cmd_verify=cmd_verify, **kwargs )
      @@ -278,24 +488,30 @@

      Subclasses

      Methods

      -def check_config_mode(self, check_string='', pattern='') +def check_config_mode(self, check_string: str = '', pattern: str = '', force_regex: bool = False) ‑> bool
      -

      Checks whether in configuration mode. Returns a boolean.

      +

      Checks whether in configuration mode. Returns a boolean.

      -Source code -
      def check_config_mode(self, check_string: str = "", pattern: str = "") -> bool:
      +
      +Expand source code
      +
      +
      def check_config_mode(
      +    self, check_string: str = "", pattern: str = "", force_regex: bool = False
      +) -> bool:
           """Checks whether in configuration mode. Returns a boolean."""
           return self._in_config_mode
      -def config_mode(self, config_command='', pattern='', re_flags=0) +def config_mode(self, config_command: str = '', pattern: str = '', re_flags: int = 0) ‑> str
      -

      No configuration mode on Mikrotik

      +

      No configuration mode on Mikrotik

      -Source code + +Expand source code +
      def config_mode(
           self, config_command: str = "", pattern: str = "", re_flags: int = 0
       ) -> str:
      @@ -305,24 +521,28 @@ 

      Methods

      -def disable_paging(self, *args, **kwargs) +def disable_paging(self, *args: Any, **kwargs: Any) ‑> str
      -

      Mikrotik does not have paging by default.

      +

      Mikrotik does not have paging by default.

      -Source code + +Expand source code +
      def disable_paging(self, *args: Any, **kwargs: Any) -> str:
           """Mikrotik does not have paging by default."""
           return ""
      -def exit_config_mode(self, exit_config='>', pattern='') +def exit_config_mode(self, exit_config: str = '>', pattern: str = '') ‑> str
      -

      No configuration mode on Mikrotik

      +

      No configuration mode on Mikrotik

      -Source code + +Expand source code +
      def exit_config_mode(self, exit_config: str = ">", pattern: str = "") -> str:
           """No configuration mode on Mikrotik"""
           self._in_config_mode = False
      @@ -330,24 +550,28 @@ 

      Methods

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

      No save command, all configuration is atomic

      +

      No save command, all configuration is atomic

      -Source code + +Expand source code +
      def save_config(self, *args: Any, **kwargs: Any) -> str:
           """No save command, all configuration is atomic"""
           return ""
      -def send_command_timing(self, command_string, cmd_verify=True, **kwargs) +def send_command_timing(self, command_string: str, cmd_verify: bool = True, **kwargs: Any) ‑> Union[str, List[Any], Dict[str, Any]]
      -

      Force cmd_verify to be True due to all of the line repainting

      +

      Force cmd_verify to be True due to all of the line repainting

      -Source code + +Expand source code +
      def send_command_timing(  # type: ignore
           self,
           command_string: str,
      @@ -355,18 +579,20 @@ 

      Methods

      **kwargs: Any, ) -> Union[str, List[Any], Dict[str, Any]]: """Force cmd_verify to be True due to all of the line repainting""" - return super()._send_command_timing_str( + return super().send_command_timing( command_string=command_string, cmd_verify=cmd_verify, **kwargs )
      -def session_preparation(self, *args, **kwargs) +def session_preparation(self, *args: Any, **kwargs: Any) ‑> None
      -

      Prepare the session after the connection has been established.

      +

      Prepare the session after the connection has been established.

      -Source code + +Expand source code +
      def session_preparation(self, *args: Any, **kwargs: Any) -> None:
           """Prepare the session after the connection has been established."""
           self.ansi_escape_codes = True
      @@ -375,12 +601,14 @@ 

      Methods

      -def set_base_prompt(self, pri_prompt_terminator='>', alt_prompt_terminator='>', delay_factor=1.0, pattern=None) +def set_base_prompt(self, pri_prompt_terminator: str = '>', alt_prompt_terminator: str = '>', delay_factor: float = 1.0, pattern: Optional[str] = None) ‑> str
      -

      Strip the trailing space off.

      +

      Strip the trailing space off.

      -Source code + +Expand source code +
      def set_base_prompt(
           self,
           pri_prompt_terminator: str = ">",
      @@ -400,17 +628,54 @@ 

      Methods

      return self.base_prompt
      +
      +def strip_command(self, command_string: str, output: str) ‑> str +
      +
      +

      Mikrotik can echo the command multiple times :-(

      +

      Example: +system routerboard print +[admin@MikroTik] > system routerboard print

      +
      + +Expand source code + +
      def strip_command(self, command_string: str, output: str) -> str:
      +    """
      +    Mikrotik can echo the command multiple times :-(
      +
      +    Example:
      +    system routerboard print
      +    [admin@MikroTik] > system routerboard print
      +    """
      +    output = super().strip_command(command_string, output)
      +    cmd = command_string.strip()
      +
      +    output = output.lstrip()
      +    # '[admin@MikroTik] > cmd' then the first newline should be matched
      +    pattern = rf"^\[.*\] > {re.escape(cmd)}.*${self.RESPONSE_RETURN}"
      +    if re.search(pattern, output, flags=re.M):
      +        output_lines = re.split(pattern, output, flags=re.M)
      +        new_output = output_lines[1:]
      +        return self.RESPONSE_RETURN.join(new_output)
      +    else:
      +        # command_string isn't there; do nothing
      +        return output
      +
      +
      -def strip_prompt(self, a_string) +def strip_prompt(self, a_string: str) ‑> str
      -

      Strip the trailing router prompt from the output.

      +

      Strip the trailing router prompt from the output.

      Mikrotik just does a lot of formatting/has ansi escape codes in output so we need a special handler here.

      There can be two trailing instances of the prompt probably due to -repainting.

      +repainting.

      -Source code + +Expand source code +
      def strip_prompt(self, a_string: str) -> str:
           """Strip the trailing router prompt from the output.
       
      @@ -469,21 +734,277 @@ 

      Inherited members

    • special_login_handler
    • strip_ansi_escape_codes
    • strip_backspaces
    • -
    • strip_command
    • telnet_login
    • write_channel
  • +
    +class MikrotikRouterOsFileTransfer +(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: Optional[str] = 'flash', direction: str = 'put', socket_timeout: float = 10.0, progress: Optional[Callable[..., Any]] = None, progress4: Optional[Callable[..., Any]] = None, hash_supported: bool = False) +
    +
    +

    Mikrotik Router Os File Transfer driver.

    +
    + +Expand source code + +
    class MikrotikRouterOsFileTransfer(BaseFileTransfer):
    +    """Mikrotik Router Os File Transfer driver."""
    +
    +    def __init__(
    +        self,
    +        ssh_conn: BaseConnection,
    +        source_file: str,
    +        dest_file: str,
    +        file_system: Optional[str] = "flash",
    +        direction: str = "put",
    +        socket_timeout: float = 10.0,
    +        progress: Optional[Callable[..., Any]] = None,
    +        progress4: Optional[Callable[..., Any]] = None,
    +        hash_supported: bool = False,
    +    ) -> None:
    +        super().__init__(
    +            ssh_conn=ssh_conn,
    +            source_file=source_file,
    +            dest_file=dest_file,
    +            file_system=file_system,
    +            direction=direction,
    +            socket_timeout=socket_timeout,
    +            progress=progress,
    +            progress4=progress4,
    +            hash_supported=hash_supported,
    +        )
    +
    +    def check_file_exists(self, remote_cmd: str = "") -> bool:
    +        """Check if the dest_file already exists on the file system."""
    +        if self.direction == "put":
    +            if not remote_cmd:
    +                remote_cmd = f'/file print detail where name="{self.file_system}/{self.dest_file}"'
    +            remote_out = self.ssh_ctl_chan._send_command_timing_str(remote_cmd)
    +            # Output will look like
    +            # 0 name="flash/test9.txt" type=".txt file" size=19 creation-time=jun...
    +            # fail case will be blank line (all whitespace)
    +            if (
    +                "size" in remote_out
    +                and f"{self.file_system}/{self.dest_file}" in remote_out
    +            ):
    +                return True
    +            elif not remote_out.strip():
    +                return False
    +            raise ValueError("Unexpected output from check_file_exists")
    +        elif self.direction == "get":
    +            return os.path.exists(self.dest_file)
    +        else:
    +            raise ValueError("Unexpected value for self.direction")
    +
    +    def remote_space_available(self, search_pattern: str = "") -> int:
    +        """Return space available on remote device."""
    +        remote_cmd = "system resource print without-paging"
    +        sys_res = self.ssh_ctl_chan._send_command_timing_str(remote_cmd).splitlines()
    +        for res in sys_res:
    +            if "free-memory" in res:
    +                spaceMib = res.strip().replace("free-memory: ", "").replace("MiB", "")
    +                return int(float(spaceMib) * 1048576)
    +        raise ValueError("Unexpected output from remote_space_available")
    +
    +    def remote_file_size(
    +        self, remote_cmd: str = "", remote_file: Optional[str] = None
    +    ) -> int:
    +        """Get the file size of the remote file."""
    +        if remote_file is None:
    +            if self.direction == "put":
    +                remote_file = self.dest_file
    +            elif self.direction == "get":
    +                remote_file = self.source_file
    +            else:
    +                raise ValueError("Invalid value for file transfer direction.")
    +
    +        if not remote_cmd:
    +            remote_cmd = (
    +                f'/file print detail where name="{self.file_system}/{remote_file}"'
    +            )
    +        remote_out = self.ssh_ctl_chan._send_command_timing_str(remote_cmd)
    +        try:
    +            size = remote_out.split("size=")[1].split(" ")[0]
    +            return self._format_to_bytes(size)
    +        except (KeyError, IndexError):
    +            raise ValueError("Unable to find file on remote system")
    +
    +    def file_md5(self, file_name: str, add_newline: bool = False) -> str:
    +        raise AttributeError(
    +            "RouterOS does not natively support an MD5-hash operation."
    +        )
    +
    +    @staticmethod
    +    def process_md5(md5_output: str, pattern: str = "") -> str:
    +        raise AttributeError(
    +            "RouterOS does not natively support an MD5-hash operation."
    +        )
    +
    +    def compare_md5(self) -> bool:
    +        raise AttributeError(
    +            "RouterOS does not natively support an MD5-hash operation."
    +        )
    +
    +    def remote_md5(self, base_cmd: str = "", remote_file: Optional[str] = None) -> str:
    +        raise AttributeError(
    +            "RouterOS does not natively support an MD5-hash operation."
    +        )
    +
    +    def verify_file(self) -> bool:
    +        """
    +        Verify the file has been transferred correctly based on filesize.
    +        This method is very approximate as Mikrotik rounds file sizes to KiB, MiB, GiB...
    +        Therefore multiple conversions from/to bytes are needed
    +        """
    +        if self.direction == "put":
    +            local_size = self._format_bytes(os.stat(self.source_file).st_size)
    +            remote_size = self._format_bytes(
    +                self.remote_file_size(remote_file=self.dest_file)
    +            )
    +            return local_size == remote_size
    +        elif self.direction == "get":
    +            local_size = self._format_bytes(os.stat(self.dest_file).st_size)
    +            remote_size = self._format_bytes(
    +                self.remote_file_size(remote_file=self.source_file)
    +            )
    +            return local_size == remote_size
    +        else:
    +            raise ValueError("Unexpected value of self.direction")
    +
    +    @staticmethod
    +    def _format_to_bytes(size: str) -> int:
    +        """
    +        Internal function to convert Mikrotik size to bytes
    +        """
    +        if size.endswith("KiB"):
    +            return round(int(float(size.replace("KiB", "")) * 1024))
    +        if size.endswith("MiB"):
    +            return round(int(float(size.replace("MiB", "")) * 1048576))
    +        if size.endswith("GiB"):
    +            return round(int(float(size.replace("GiB", "")) * 1073741824))
    +        return round(int(size))
    +
    +    @staticmethod
    +    def _format_bytes(size: int) -> str:
    +        """
    +        Internal function to convert bytes to KiB, MiB or GiB
    +        Extremely approximate
    +        """
    +        n = 0
    +        levels = {0: "", 1: "Ki", 2: "Mi", 3: "Gi"}
    +        while size > 4096 and n < 3:
    +            size = round(size / 1024)
    +            n += 1
    +        return f"{size}{levels[n]}B"
    +
    +

    Ancestors

    + +

    Methods

    +
    +
    +def check_file_exists(self, remote_cmd: str = '') ‑> bool +
    +
    +

    Check if the dest_file already exists on the file system.

    +
    + +Expand source code + +
    def check_file_exists(self, remote_cmd: str = "") -> bool:
    +    """Check if the dest_file already exists on the file system."""
    +    if self.direction == "put":
    +        if not remote_cmd:
    +            remote_cmd = f'/file print detail where name="{self.file_system}/{self.dest_file}"'
    +        remote_out = self.ssh_ctl_chan._send_command_timing_str(remote_cmd)
    +        # Output will look like
    +        # 0 name="flash/test9.txt" type=".txt file" size=19 creation-time=jun...
    +        # fail case will be blank line (all whitespace)
    +        if (
    +            "size" in remote_out
    +            and f"{self.file_system}/{self.dest_file}" in remote_out
    +        ):
    +            return True
    +        elif not remote_out.strip():
    +            return False
    +        raise ValueError("Unexpected output from check_file_exists")
    +    elif self.direction == "get":
    +        return os.path.exists(self.dest_file)
    +    else:
    +        raise ValueError("Unexpected value for self.direction")
    +
    +
    +
    +def verify_file(self) ‑> bool +
    +
    +

    Verify the file has been transferred correctly based on filesize. +This method is very approximate as Mikrotik rounds file sizes to KiB, MiB, GiB… +Therefore multiple conversions from/to bytes are needed

    +
    + +Expand source code + +
    def verify_file(self) -> bool:
    +    """
    +    Verify the file has been transferred correctly based on filesize.
    +    This method is very approximate as Mikrotik rounds file sizes to KiB, MiB, GiB...
    +    Therefore multiple conversions from/to bytes are needed
    +    """
    +    if self.direction == "put":
    +        local_size = self._format_bytes(os.stat(self.source_file).st_size)
    +        remote_size = self._format_bytes(
    +            self.remote_file_size(remote_file=self.dest_file)
    +        )
    +        return local_size == remote_size
    +    elif self.direction == "get":
    +        local_size = self._format_bytes(os.stat(self.dest_file).st_size)
    +        remote_size = self._format_bytes(
    +            self.remote_file_size(remote_file=self.source_file)
    +        )
    +        return local_size == remote_size
    +    else:
    +        raise ValueError("Unexpected value of self.direction")
    +
    +
    +
    +

    Inherited members

    + +
    class MikrotikRouterOsSSH -(**kwargs) +(**kwargs: Any)
    -

    Mikrotik RouterOS SSH driver.

    +

    Mikrotik RouterOS SSH driver.

    -Source code + +Expand source code +
    class MikrotikRouterOsSSH(MikrotikBase):
         """Mikrotik RouterOS SSH driver."""
     
    @@ -538,7 +1059,7 @@ 

    Inherited members

  • special_login_handler
  • strip_ansi_escape_codes
  • strip_backspaces
  • -
  • strip_command
  • +
  • strip_command
  • strip_prompt
  • telnet_login
  • write_channel
  • @@ -548,12 +1069,14 @@

    Inherited members

    class MikrotikSwitchOsSSH -(**kwargs) +(**kwargs: Any)
    -

    Mikrotik SwitchOS SSH driver.

    +

    Mikrotik SwitchOS SSH driver.

    -Source code + +Expand source code +
    class MikrotikSwitchOsSSH(MikrotikBase):
         """Mikrotik SwitchOS SSH driver."""
     
    @@ -608,7 +1131,7 @@ 

    Inherited members

  • special_login_handler
  • strip_ansi_escape_codes
  • strip_backspaces
  • -
  • strip_command
  • +
  • strip_command
  • strip_prompt
  • telnet_login
  • write_channel
  • @@ -643,10 +1166,18 @@

    send_command_timing
  • session_preparation
  • set_base_prompt
  • +
  • strip_command
  • strip_prompt
  • +

    MikrotikRouterOsFileTransfer

    + +
  • +
  • MikrotikRouterOsSSH

  • @@ -658,9 +1189,7 @@

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/mrv/index.html b/docs/netmiko/mrv/index.html index 9deb65fe5..c8a455162 100644 --- a/docs/netmiko/mrv/index.html +++ b/docs/netmiko/mrv/index.html @@ -3,15 +3,17 @@ - + netmiko.mrv API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.mrv

    -Source code + +Expand source code +
    from netmiko.mrv.mrv_lx import MrvLxSSH
     from netmiko.mrv.mrv_ssh import MrvOptiswitchSSH
     
    @@ -33,11 +37,11 @@ 

    Sub-modules

    netmiko.mrv.mrv_lx
    -

    MRV Communications Driver (LX).

    +

    MRV Communications Driver (LX).

    netmiko.mrv.mrv_ssh
    -

    MRV Communications Driver (OptiSwitch).

    +

    MRV Communications Driver (OptiSwitch).

    @@ -50,16 +54,16 @@

    Classes

    class MrvLxSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    MRV Communications Driver (LX).

    +

    MRV Communications Driver (LX).

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -98,7 +102,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -143,12 +147,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -156,9 +160,11 @@

    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). -
    +

  • -Source code + +Expand source code +
    class MrvLxSSH(CiscoSSHConnection):
         """MRV Communications Driver (LX)."""
     
    @@ -206,24 +212,28 @@ 

    Ancestors

    Methods

    -def check_enable_mode(self, check_string='>>') +def check_enable_mode(self, check_string: str = '>>') ‑> bool
    -

    MRV has a >> for enable mode instead of # like Cisco

    +

    MRV has a >> for enable mode instead of # like Cisco

    -Source code + +Expand source code +
    def check_enable_mode(self, check_string: str = ">>") -> bool:
         """MRV has a >> for enable mode instead of # like Cisco"""
         return super().check_enable_mode(check_string=check_string)
    -def save_config(self, cmd='save config flash', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'save config flash', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Saves configuration.

    +

    Saves configuration.

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "save config flash",
    @@ -237,12 +247,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read(pattern=r"[>|>>]")
    @@ -303,16 +315,16 @@ 

    Inherited members

    class MrvOptiswitchSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    MRV Communications Driver (OptiSwitch).

    +

    MRV Communications Driver (OptiSwitch).

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -351,7 +363,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -396,12 +408,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -409,9 +421,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class MrvOptiswitchSSH(CiscoSSHConnection):
         """MRV Communications Driver (OptiSwitch)."""
     
    @@ -468,12 +482,14 @@ 

    Ancestors

    Methods

    -def enable(self, cmd='enable', pattern='#', enable_pattern=None, re_flags=re.IGNORECASE) +def enable(self, cmd: str = 'enable', pattern: str = '#', enable_pattern: Optional[str] = None, re_flags: int = re.IGNORECASE) ‑> str
    -

    Enable mode on MRV uses no password.

    +

    Enable mode on MRV uses no password.

    -Source code + +Expand source code +
    def enable(
         self,
         cmd: str = "enable",
    @@ -498,12 +514,14 @@ 

    Methods

    -def save_config(self, cmd='save config flash', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'save config flash', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Saves configuration.

    +

    Saves configuration.

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "save config flash",
    @@ -517,12 +535,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read(pattern=r"[>#]")
    @@ -626,9 +646,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/mrv/mrv_lx.html b/docs/netmiko/mrv/mrv_lx.html index 376040575..2392a4859 100644 --- a/docs/netmiko/mrv/mrv_lx.html +++ b/docs/netmiko/mrv/mrv_lx.html @@ -3,15 +3,17 @@ - + netmiko.mrv.mrv_lx API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.mrv.mrv_lx

    MRV Communications Driver (LX).

    -Source code + +Expand source code +
    """MRV Communications Driver (LX)."""
     import time
     import re
    @@ -81,16 +85,16 @@ 

    Classes

    class MrvLxSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    MRV Communications Driver (LX).

    +

    MRV Communications Driver (LX).

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -129,7 +133,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -174,12 +178,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -187,9 +191,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class MrvLxSSH(CiscoSSHConnection):
         """MRV Communications Driver (LX)."""
     
    @@ -237,24 +243,28 @@ 

    Ancestors

    Methods

    -def check_enable_mode(self, check_string='>>') +def check_enable_mode(self, check_string: str = '>>') ‑> bool
    -

    MRV has a >> for enable mode instead of # like Cisco

    +

    MRV has a >> for enable mode instead of # like Cisco

    -Source code + +Expand source code +
    def check_enable_mode(self, check_string: str = ">>") -> bool:
         """MRV has a >> for enable mode instead of # like Cisco"""
         return super().check_enable_mode(check_string=check_string)
    -def save_config(self, cmd='save config flash', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'save config flash', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Saves configuration.

    +

    Saves configuration.

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "save config flash",
    @@ -268,12 +278,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read(pattern=r"[>|>>]")
    @@ -362,9 +374,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/mrv/mrv_ssh.html b/docs/netmiko/mrv/mrv_ssh.html index f28ade8cd..5b7d53d76 100644 --- a/docs/netmiko/mrv/mrv_ssh.html +++ b/docs/netmiko/mrv/mrv_ssh.html @@ -3,15 +3,17 @@ - + netmiko.mrv.mrv_ssh API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.mrv.mrv_ssh

    MRV Communications Driver (OptiSwitch).

    -Source code + +Expand source code +
    """MRV Communications Driver (OptiSwitch)."""
     import time
     import re
    @@ -90,16 +94,16 @@ 

    Classes

    class MrvOptiswitchSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    MRV Communications Driver (OptiSwitch).

    +

    MRV Communications Driver (OptiSwitch).

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -138,7 +142,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -183,12 +187,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -196,9 +200,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class MrvOptiswitchSSH(CiscoSSHConnection):
         """MRV Communications Driver (OptiSwitch)."""
     
    @@ -255,12 +261,14 @@ 

    Ancestors

    Methods

    -def enable(self, cmd='enable', pattern='#', enable_pattern=None, re_flags=re.IGNORECASE) +def enable(self, cmd: str = 'enable', pattern: str = '#', enable_pattern: Optional[str] = None, re_flags: int = re.IGNORECASE) ‑> str
    -

    Enable mode on MRV uses no password.

    +

    Enable mode on MRV uses no password.

    -Source code + +Expand source code +
    def enable(
         self,
         cmd: str = "enable",
    @@ -285,12 +293,14 @@ 

    Methods

    -def save_config(self, cmd='save config flash', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'save config flash', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Saves configuration.

    +

    Saves configuration.

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "save config flash",
    @@ -304,12 +314,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read(pattern=r"[>#]")
    @@ -399,9 +411,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/netapp/index.html b/docs/netmiko/netapp/index.html index c447ef15f..46fc428fe 100644 --- a/docs/netmiko/netapp/index.html +++ b/docs/netmiko/netapp/index.html @@ -3,15 +3,17 @@ - + netmiko.netapp API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.netapp

    -Source code + +Expand source code +
    from netmiko.netapp.netapp_cdot_ssh import NetAppcDotSSH
     
     __all__ = ["NetAppcDotSSH"]
    @@ -32,7 +36,7 @@

    Sub-modules

    netmiko.netapp.netapp_cdot_ssh
    -
    +
    @@ -45,10 +49,10 @@

    Classes

    class NetAppcDotSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Class for platforms that have no enable mode.

    +

    Class for platforms that have no enable mode.

    Netmiko translates the meaning of "enable" mode to be a proxy for "can go into config mode". In other words, that you ultimately have privileges to execute configuration changes.

    @@ -58,10 +62,10 @@

    Classes

    don't explicitly support enable mode.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -100,7 +104,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -145,12 +149,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -158,9 +162,11 @@

    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). -
    +

    -Source code + +Expand source code +
    class NetAppcDotSSH(NoEnable, BaseConnection):
         def session_preparation(self) -> None:
             """Prepare the session after the connection has been established."""
    @@ -176,7 +182,9 @@ 

    Classes

    ) return output - def check_config_mode(self, check_string: str = "*>", pattern: str = "") -> bool: + 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) def config_mode( @@ -204,12 +212,14 @@

    Ancestors

    Methods

    -def send_command_with_y(self, *args, **kwargs) +def send_command_with_y(self, *args: Any, **kwargs: Any) ‑> str
    -
    +
    -Source code + +Expand source code +
    def send_command_with_y(self, *args: Any, **kwargs: Any) -> str:
         output = self._send_command_timing_str(*args, **kwargs)
         if "{y|n}" in output:
    @@ -220,12 +230,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self.set_base_prompt()
    @@ -316,9 +328,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/netapp/netapp_cdot_ssh.html b/docs/netmiko/netapp/netapp_cdot_ssh.html index 52a907e5c..1cf774341 100644 --- a/docs/netmiko/netapp/netapp_cdot_ssh.html +++ b/docs/netmiko/netapp/netapp_cdot_ssh.html @@ -3,15 +3,17 @@ - + netmiko.netapp.netapp_cdot_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.netapp.netapp_cdot_ssh

    -Source code + +Expand source code +
    from typing import Any
     
     from netmiko.no_enable import NoEnable
    @@ -43,7 +47,9 @@ 

    Module netmiko.netapp.netapp_cdot_ssh

    ) return output - def check_config_mode(self, check_string: str = "*>", pattern: str = "") -> bool: + 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) def config_mode( @@ -75,10 +81,10 @@

    Classes

    class NetAppcDotSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Class for platforms that have no enable mode.

    +

    Class for platforms that have no enable mode.

    Netmiko translates the meaning of "enable" mode to be a proxy for "can go into config mode". In other words, that you ultimately have privileges to execute configuration changes.

    @@ -88,10 +94,10 @@

    Classes

    don't explicitly support enable mode.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -130,7 +136,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -175,12 +181,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -188,9 +194,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class NetAppcDotSSH(NoEnable, BaseConnection):
         def session_preparation(self) -> None:
             """Prepare the session after the connection has been established."""
    @@ -206,7 +214,9 @@ 

    Classes

    ) return output - def check_config_mode(self, check_string: str = "*>", pattern: str = "") -> bool: + 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) def config_mode( @@ -234,12 +244,14 @@

    Ancestors

    Methods

    -def send_command_with_y(self, *args, **kwargs) +def send_command_with_y(self, *args: Any, **kwargs: Any) ‑> str
    -
    +
    -Source code + +Expand source code +
    def send_command_with_y(self, *args: Any, **kwargs: Any) -> str:
         output = self._send_command_timing_str(*args, **kwargs)
         if "{y|n}" in output:
    @@ -250,12 +262,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self.set_base_prompt()
    @@ -341,9 +355,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/netgear/index.html b/docs/netmiko/netgear/index.html index a78c2f82b..64c5a4e19 100644 --- a/docs/netmiko/netgear/index.html +++ b/docs/netmiko/netgear/index.html @@ -3,15 +3,17 @@ - + netmiko.netgear API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.netgear

    -Source code + +Expand source code +
    from netmiko.netgear.netgear_prosafe_ssh import NetgearProSafeSSH
     
     __all__ = ["NetgearProSafeSSH"]
    @@ -32,7 +36,7 @@

    Sub-modules

    netmiko.netgear.netgear_prosafe_ssh
    -

    ProSafe OS support

    +

    ProSafe OS support

    @@ -45,16 +49,16 @@

    Classes

    class NetgearProSafeSSH -(**kwargs) +(**kwargs: Any)
    -

    ProSafe OS support

    +

    ProSafe OS support

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -93,7 +97,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -138,12 +142,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -151,9 +155,11 @@

    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). -
    +

    -Source code + +Expand source code +
    class NetgearProSafeSSH(CiscoSSHConnection):
         """ProSafe OS support"""
     
    @@ -174,7 +180,10 @@ 

    Classes

    self.clear_buffer() def check_config_mode( - self, check_string: str = "(Config)#", pattern: str = "" + self, + check_string: str = "(Config)#", + pattern: str = "", + force_regex: bool = False, ) -> bool: return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -215,12 +224,14 @@

    Ancestors

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    ProSafe OS requires enable mode to disable paging.

    +

    ProSafe OS requires enable mode to disable paging.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """ProSafe OS requires enable mode to disable paging."""
         self._test_channel_read()
    @@ -315,9 +326,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/netgear/netgear_prosafe_ssh.html b/docs/netmiko/netgear/netgear_prosafe_ssh.html index d7927eddc..4e48142cb 100644 --- a/docs/netmiko/netgear/netgear_prosafe_ssh.html +++ b/docs/netmiko/netgear/netgear_prosafe_ssh.html @@ -3,15 +3,17 @@ - + netmiko.netgear.netgear_prosafe_ssh API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.netgear.netgear_prosafe_ssh

    ProSafe OS support

    -Source code + +Expand source code +
    """ProSafe OS support"""
     import time
     from typing import Any
    @@ -50,7 +54,10 @@ 

    Module netmiko.netgear.netgear_prosafe_ssh

    self.clear_buffer() def check_config_mode( - self, check_string: str = "(Config)#", pattern: str = "" + self, + check_string: str = "(Config)#", + pattern: str = "", + force_regex: bool = False, ) -> bool: return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -94,16 +101,16 @@

    Classes

    class NetgearProSafeSSH -(**kwargs) +(**kwargs: Any)
    -

    ProSafe OS support

    +

    ProSafe OS support

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -142,7 +149,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -187,12 +194,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -200,9 +207,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class NetgearProSafeSSH(CiscoSSHConnection):
         """ProSafe OS support"""
     
    @@ -223,7 +232,10 @@ 

    Classes

    self.clear_buffer() def check_config_mode( - self, check_string: str = "(Config)#", pattern: str = "" + self, + check_string: str = "(Config)#", + pattern: str = "", + force_regex: bool = False, ) -> bool: return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -264,12 +276,14 @@

    Ancestors

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    ProSafe OS requires enable mode to disable paging.

    +

    ProSafe OS requires enable mode to disable paging.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """ProSafe OS requires enable mode to disable paging."""
         self._test_channel_read()
    @@ -359,9 +373,7 @@ 

    - - \ No newline at end of file diff --git a/docs/netmiko/netmiko_globals.html b/docs/netmiko/netmiko_globals.html index ed9d9d903..ea8f9b8c5 100644 --- a/docs/netmiko/netmiko_globals.html +++ b/docs/netmiko/netmiko_globals.html @@ -3,15 +3,17 @@ - + netmiko.netmiko_globals API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.netmiko_globals

    -Source code + +Expand source code +
    MAX_BUFFER = 65535
     BACKSPACE_CHAR = "\x08"
    @@ -50,9 +54,7 @@

    Index

    - - \ No newline at end of file diff --git a/docs/netmiko/no_config.html b/docs/netmiko/no_config.html index 90deeb026..93d16948a 100644 --- a/docs/netmiko/no_config.html +++ b/docs/netmiko/no_config.html @@ -3,15 +3,17 @@ - + netmiko.no_config API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.no_config

    -Source code + +Expand source code +
    class NoConfig:
         """
         Class for platforms that have no config mode.
    @@ -34,7 +38,9 @@ 

    Module netmiko.no_config

    overwrite check_config_mode in the platform specific driver and return False. """ - def check_config_mode(self, check_string: str = "", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "", pattern: str = "", force_regex: bool = False + ) -> bool: return True def config_mode( @@ -57,17 +63,18 @@

    Classes

    class NoConfig -(*args, **kwargs)
    -

    Class for platforms that have no config mode.

    +

    Class for platforms that have no config mode.

    check_config_mode returns True as the expectation is that configuration commands can be executed directly. So in your current state, you are in "config mode" i.e. you can make configuration changes.

    If you truly cannot make any configuration changes to device then you should probably -overwrite check_config_mode in the platform specific driver and return False.

    +overwrite check_config_mode in the platform specific driver and return False.

    -Source code + +Expand source code +
    class NoConfig:
         """
         Class for platforms that have no config mode.
    @@ -80,7 +87,9 @@ 

    Classes

    overwrite check_config_mode in the platform specific driver and return False. """ - def check_config_mode(self, check_string: str = "", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "", pattern: str = "", force_regex: bool = False + ) -> bool: return True def config_mode( @@ -115,23 +124,29 @@

    Subclasses

    Methods

    -def check_config_mode(self, check_string='', pattern='') +def check_config_mode(self, check_string: str = '', pattern: str = '', force_regex: bool = False) ‑> bool
    -
    +
    -Source code -
    def check_config_mode(self, check_string: str = "", pattern: str = "") -> bool:
    +
    +Expand source code
    +
    +
    def check_config_mode(
    +    self, check_string: str = "", pattern: str = "", force_regex: bool = False
    +) -> bool:
         return True
    -def config_mode(self, config_command='', pattern='', re_flags=0) +def config_mode(self, config_command: str = '', pattern: str = '', re_flags: int = 0) ‑> str
    -
    +
    -Source code + +Expand source code +
    def config_mode(
         self, config_command: str = "", pattern: str = "", re_flags: int = 0
     ) -> str:
    @@ -139,12 +154,14 @@ 

    Methods

    -def exit_config_mode(self, exit_config='', pattern='') +def exit_config_mode(self, exit_config: str = '', pattern: str = '') ‑> str
    -
    +
    -Source code + +Expand source code +
    def exit_config_mode(self, exit_config: str = "", pattern: str = "") -> str:
         return ""
    @@ -181,9 +198,7 @@

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/no_enable.html b/docs/netmiko/no_enable.html index 63bc944df..2534109fe 100644 --- a/docs/netmiko/no_enable.html +++ b/docs/netmiko/no_enable.html @@ -3,15 +3,17 @@ - + netmiko.no_enable API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.no_enable

    -Source code + +Expand source code +
    from typing import Optional
     import re
     
    @@ -68,19 +72,20 @@ 

    Classes

    class NoEnable -(*args, **kwargs)
    -

    Class for platforms that have no enable mode.

    +

    Class for platforms that have no enable mode.

    Netmiko translates the meaning of "enable" mode to be a proxy for "can go into config mode". In other words, that you ultimately have privileges to execute configuration changes.

    The expectation on platforms that have no method for elevating privileges is that the standard default privileges allow configuration changes.

    Consequently check_enable_mode returns True by default for platforms that -don't explicitly support enable mode.

    +don't explicitly support enable mode.

    -Source code + +Expand source code +
    class NoEnable:
         """
         Class for platforms that have no enable mode.
    @@ -132,34 +137,39 @@ 

    Subclasses

  • KeymileSSH
  • MikrotikBase
  • NetAppcDotSSH
  • +
  • NokiaSrlSSH
  • PaloAltoPanosBase
  • RadETXBase
  • SixwindOSBase
  • SophosSfosSSH
  • -
  • VyOSSSH
  • SmciSwitchSmisBase
  • +
  • VyOSSSH
  • ZyxelSSH
  • Methods

    -def check_enable_mode(self, check_string='') +def check_enable_mode(self, check_string: str = '') ‑> bool
    -
    +
    -Source code + +Expand source code +
    def check_enable_mode(self, check_string: str = "") -> bool:
         return True
    -def enable(self, cmd='', pattern='', enable_pattern=None, re_flags=re.IGNORECASE) +def enable(self, cmd: str = '', pattern: str = '', enable_pattern: Optional[str] = None, re_flags: int = re.IGNORECASE) ‑> str
    -
    +
    -Source code + +Expand source code +
    def enable(
         self,
         cmd: str = "",
    @@ -171,12 +181,14 @@ 

    Methods

    -def exit_enable_mode(self, exit_command='') +def exit_enable_mode(self, exit_command: str = '') ‑> str
    -
    +
    -Source code + +Expand source code +
    def exit_enable_mode(self, exit_command: str = "") -> str:
         return ""
    @@ -213,9 +225,7 @@

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/nokia/index.html b/docs/netmiko/nokia/index.html index 7693616a1..e6ce6f7d1 100644 --- a/docs/netmiko/nokia/index.html +++ b/docs/netmiko/nokia/index.html @@ -3,15 +3,17 @@ - + netmiko.nokia API documentation - - - - - + + + + + + +
    @@ -21,22 +23,30 @@

    Module netmiko.nokia

    -Source code + +Expand source code +
    from netmiko.nokia.nokia_sros import (
         NokiaSrosSSH,
         NokiaSrosTelnet,
         NokiaSrosFileTransfer,
     )
     
    -__all__ = ["NokiaSrosSSH", "NokiaSrosFileTransfer", "NokiaSrosTelnet"]
    +from netmiko.nokia.nokia_srl import NokiaSrlSSH + +__all__ = ["NokiaSrosSSH", "NokiaSrosFileTransfer", "NokiaSrosTelnet", "NokiaSrlSSH"]

    Sub-modules

    +
    netmiko.nokia.nokia_srl
    +
    +
    +
    netmiko.nokia.nokia_sros
    -
    +
    @@ -47,14 +57,432 @@

    Sub-modules

    Classes

    +
    +class NokiaSrlSSH +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +
    +
    +

    Implement methods for interacting with Nokia SRL devices for SSH.

    +

    Not applicable in Nokia SRL: +- check_enable_mode() +- enable() +- exit_enable_mode()

    +

    By default, the SR Linux CLI prompt consists of two lines of text, +indicating with an asterisk whether the configuration has been modified or +a plus sign whether the configuration has been saved, the current mode and +session type, the current CLI context, and the host name of the SR Linux device.

    +

    Examples:

    +

    –{ running }–[ interface ethernet-1/1 subinterface 1 ]– +A:ams01#

    +

    –{ * candidate private private-admin }–[ interface ethernet-1/1 subinterface 1 ]– +A:ams01#

    +

    –{ + candidate private private-admin }–[ interface ethernet-1/1 subinterface 1 ]– +A:ams01#

    +

    This class support the default prompt configuration.

    +
        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 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 timeout: 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 keepalive: Send SSH 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 fast_cli: Provide a way 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).
    +
    +
    + +Expand source code + +
    class NokiaSrlSSH(BaseConnection, NoEnable):
    +    """
    +    Implement methods for interacting with Nokia SRL devices for SSH.
    +
    +    Not applicable in Nokia SRL:
    +        - check_enable_mode()
    +        - enable()
    +        - exit_enable_mode()
    +
    +    By default, the SR Linux CLI prompt consists of two lines of text,
    +    indicating with an asterisk whether the configuration has been modified or
    +    a plus sign whether the configuration has been saved, the current mode and
    +    session type, the current CLI context, and the host name of the SR Linux device.
    +
    +    Examples:
    +
    +    --{ running }--[ interface ethernet-1/1 subinterface 1 ]--
    +    A:ams01#
    +
    +    --{ * candidate private private-admin }--[ interface ethernet-1/1 subinterface 1 ]--
    +    A:ams01#
    +
    +    --{ + candidate private private-admin }--[ interface ethernet-1/1 subinterface 1 ]--
    +    A:ams01#
    +
    +    This class support the default prompt configuration.
    +    """
    +
    +    def session_preparation(self) -> None:
    +        self._test_channel_read(pattern=r"#")
    +        self.ansi_escape_codes = True
    +        # Bottom toolbar text not required
    +        commands = [
    +            "environment complete-on-space false",
    +            "environment cli-engine type basic",
    +        ]
    +        for command in commands:
    +            self.disable_paging(command=command, cmd_verify=True, pattern=r"#")
    +        self.set_base_prompt()
    +
    +    def set_base_prompt(
    +        self,
    +        pri_prompt_terminator: str = "#",
    +        alt_prompt_terminator: str = "#",
    +        delay_factor: float = 1.0,
    +        pattern: Optional[str] = r"#",
    +    ) -> str:
    +        return super().set_base_prompt(
    +            pri_prompt_terminator=pri_prompt_terminator,
    +            alt_prompt_terminator=alt_prompt_terminator,
    +            delay_factor=delay_factor,
    +            pattern=pattern,
    +        )
    +
    +    def config_mode(
    +        self,
    +        config_command: str = "enter candidate private",
    +        pattern: str = r"#",
    +        re_flags: int = 0,
    +    ) -> str:
    +        return super().config_mode(
    +            config_command=config_command, pattern=pattern, re_flags=re_flags
    +        )
    +
    +    def check_config_mode(
    +        self,
    +        check_string: str = r"\n--{( | \* | \+ | \+\* | \!\+ | \!\* )candidate",
    +        pattern: str = r"#",
    +        force_regex: bool = True,
    +    ) -> bool:
    +
    +        return super().check_config_mode(
    +            check_string=check_string, pattern=pattern, force_regex=force_regex
    +        )
    +
    +    def commit(self) -> str:
    +        """Commit changes by using 'commit stay'."""
    +        cmd = "commit stay"
    +        output = self._send_command_str(
    +            command_string=cmd, strip_prompt=False, strip_command=False
    +        )
    +        return output
    +
    +    def save_config(
    +        self,
    +        cmd: str = "save startup",
    +        confirm: bool = False,
    +        confirm_response: str = "",
    +    ) -> str:
    +        """Save current running configuration as initial (startup) configuration"""
    +        return self._send_command_str(
    +            command_string=cmd, strip_prompt=False, strip_command=False
    +        )
    +
    +    def exit_config_mode(self, exit_config: str = "", pattern: str = "") -> str:
    +        """Exit the candidate private mode"""
    +        output = ""
    +        self.write_channel(self.RETURN)
    +        prompt = self.read_until_pattern(pattern="#")
    +
    +        if self._has_uncommitted_changes(prompt):
    +            # Changes were made but not committed. Discarding changes
    +            output += self._discard()
    +        # Switch to 'running' mode
    +        output += self._running_mode()
    +        return output
    +
    +    def send_config_set(
    +        self,
    +        config_commands: Union[str, Sequence[str], TextIO, None] = None,
    +        exit_config_mode: bool = False,
    +        **kwargs: Any,
    +    ) -> str:
    +        """Nokia SRL requires you not exit from configuration mode."""
    +        return super().send_config_set(
    +            config_commands=config_commands, exit_config_mode=exit_config_mode, **kwargs
    +        )
    +
    +    def _discard(self) -> str:
    +        """Discard changes made in candidate private mode"""
    +        log.warning("Uncommitted changes will be discarted!")
    +        cmd = "discard stay"
    +        output = self._send_command_str(
    +            command_string=cmd, strip_prompt=False, strip_command=False
    +        )
    +        return output
    +
    +    def _running_mode(self) -> str:
    +        """Enter running mode"""
    +        cmd = "enter running"
    +        output = self._send_command_str(
    +            command_string=cmd, strip_prompt=False, strip_command=False
    +        )
    +        return output
    +
    +    def _has_uncommitted_changes(self, prompt: str) -> bool:
    +        """
    +        The asterix (*) next to the mode name indicates that the candidate configuration
    +        has changes that have not yet been committed.
    +
    +        The plus sign (+) in the prompt indicates that the running configuration differs
    +        from the startup configuration. After you enter the save startup command,
    +        the running configuration is synchronized with the startup configuration,
    +        and the plus sign is removed from the prompt.
    +
    +        The exclamation mark (!) in the prompt indicates that another user has commited
    +        changes to the running datastore.
    +        """
    +        matches = re.search(r"\n--{( | \* | \+ | \+\* | \!\+ | \!\* )candidate", prompt)
    +        return True if matches and "*" in matches.group() else False
    +
    +

    Ancestors

    + +

    Methods

    +
    +
    +def commit(self) ‑> str +
    +
    +

    Commit changes by using 'commit stay'.

    +
    + +Expand source code + +
    def commit(self) -> str:
    +    """Commit changes by using 'commit stay'."""
    +    cmd = "commit stay"
    +    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 +
    +
    +

    Exit the candidate private mode

    +
    + +Expand source code + +
    def exit_config_mode(self, exit_config: str = "", pattern: str = "") -> str:
    +    """Exit the candidate private mode"""
    +    output = ""
    +    self.write_channel(self.RETURN)
    +    prompt = self.read_until_pattern(pattern="#")
    +
    +    if self._has_uncommitted_changes(prompt):
    +        # Changes were made but not committed. Discarding changes
    +        output += self._discard()
    +    # Switch to 'running' mode
    +    output += self._running_mode()
    +    return output
    +
    +
    +
    +def save_config(self, cmd: str = 'save startup', confirm: bool = False, confirm_response: str = '') ‑> str +
    +
    +

    Save current running configuration as initial (startup) configuration

    +
    + +Expand source code + +
    def save_config(
    +    self,
    +    cmd: str = "save startup",
    +    confirm: bool = False,
    +    confirm_response: str = "",
    +) -> str:
    +    """Save current running configuration as initial (startup) configuration"""
    +    return self._send_command_str(
    +        command_string=cmd, strip_prompt=False, strip_command=False
    +    )
    +
    +
    +
    +def send_config_set(self, config_commands: Union[str, Sequence[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, **kwargs: Any) ‑> str +
    +
    +

    Nokia SRL requires you not exit from configuration mode.

    +
    + +Expand source code + +
    def send_config_set(
    +    self,
    +    config_commands: Union[str, Sequence[str], TextIO, None] = None,
    +    exit_config_mode: bool = False,
    +    **kwargs: Any,
    +) -> str:
    +    """Nokia SRL requires you not exit from configuration mode."""
    +    return super().send_config_set(
    +        config_commands=config_commands, exit_config_mode=exit_config_mode, **kwargs
    +    )
    +
    +
    +
    +

    Inherited members

    + +
    class NokiaSrosFileTransfer -(ssh_conn, source_file, dest_file, file_system=None, direction='put', socket_timeout=10.0, progress=None, progress4=None, hash_supported=False) +(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: Optional[str] = None, direction: str = 'put', socket_timeout: float = 10.0, progress: Optional[Callable[..., Any]] = None, progress4: Optional[Callable[..., Any]] = None, hash_supported: bool = False)
    -

    Class to manage SCP file transfer and associated SSH control channel.

    +

    Class to manage SCP file transfer and associated SSH control channel.

    -Source code + +Expand source code +
    class NokiaSrosFileTransfer(BaseFileTransfer):
         def __init__(
             self,
    @@ -190,12 +618,14 @@ 

    Ancestors

    Methods

    -def check_file_exists(self, remote_cmd='') +def check_file_exists(self, remote_cmd: str = '') ‑> bool
    -

    Check if destination file exists (returns boolean).

    +

    Check if destination file exists (returns boolean).

    -Source code + +Expand source code +
    def check_file_exists(self, remote_cmd: str = "") -> bool:
         """Check if destination file exists (returns boolean)."""
     
    @@ -219,12 +649,14 @@ 

    Methods

    -def verify_file(self) +def verify_file(self) ‑> bool
    -

    Verify the file has been transferred correctly based on filesize.

    +

    Verify the file has been transferred correctly based on filesize.

    -Source code + +Expand source code +
    def verify_file(self) -> bool:
         """Verify the file has been transferred correctly based on filesize."""
         if self.direction == "put":
    @@ -266,16 +698,16 @@ 

    Inherited members

    class NokiaSrosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Nokia SR OS SSH driver.

    +

    Nokia SR OS SSH driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -314,7 +746,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -359,12 +791,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -372,9 +804,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class NokiaSrosSSH(NokiaSros):
         """Nokia SR OS SSH driver."""
     
    @@ -436,16 +870,16 @@ 

    Inherited members

    class NokiaSrosTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Nokia SR OS Telnet driver.

    +

    Nokia SR OS Telnet driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -484,7 +918,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -529,12 +963,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -542,9 +976,11 @@

    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). -
    +

    -Source code + +Expand source code +
    class NokiaSrosTelnet(NokiaSros):
         """Nokia SR OS Telnet driver."""
     
    @@ -620,12 +1056,22 @@ 

    Index

  • Sub-modules

  • Classes

    • +

      NokiaSrlSSH

      + +
    • +
    • NokiaSrosFileTransfer

      • check_file_exists
      • @@ -644,9 +1090,7 @@

        -

        Generated by pdoc 0.6.3.

        +

        Generated by pdoc 0.10.0.

        - - \ No newline at end of file diff --git a/docs/netmiko/nokia/nokia_srl.html b/docs/netmiko/nokia/nokia_srl.html new file mode 100644 index 000000000..9013c670e --- /dev/null +++ b/docs/netmiko/nokia/nokia_srl.html @@ -0,0 +1,655 @@ + + + + + + +netmiko.nokia.nokia_srl API documentation + + + + + + + + + + + +
        +
        +
        +

        Module netmiko.nokia.nokia_srl

        +
        +
        +
        + +Expand source code + +
        #!/usr/bin/python
        +# -*- coding: utf-8 -*-
        +# Copyright (c) 2014 - 2022 Kirk Byers
        +# Copyright (c) 2014 - 2022 Twin Bridges Technology
        +# Copyright (c) 2019 - 2022 NOKIA Inc.
        +# MIT License - See License file at:
        +#   https://github.com/ktbyers/netmiko/blob/develop/LICENSE
        +
        +import re
        +from typing import Any, Optional, Sequence, TextIO, Union
        +from netmiko import log
        +from netmiko.no_enable import NoEnable
        +from netmiko.base_connection import BaseConnection
        +
        +
        +class NokiaSrlSSH(BaseConnection, NoEnable):
        +    """
        +    Implement methods for interacting with Nokia SRL devices for SSH.
        +
        +    Not applicable in Nokia SRL:
        +        - check_enable_mode()
        +        - enable()
        +        - exit_enable_mode()
        +
        +    By default, the SR Linux CLI prompt consists of two lines of text,
        +    indicating with an asterisk whether the configuration has been modified or
        +    a plus sign whether the configuration has been saved, the current mode and
        +    session type, the current CLI context, and the host name of the SR Linux device.
        +
        +    Examples:
        +
        +    --{ running }--[ interface ethernet-1/1 subinterface 1 ]--
        +    A:ams01#
        +
        +    --{ * candidate private private-admin }--[ interface ethernet-1/1 subinterface 1 ]--
        +    A:ams01#
        +
        +    --{ + candidate private private-admin }--[ interface ethernet-1/1 subinterface 1 ]--
        +    A:ams01#
        +
        +    This class support the default prompt configuration.
        +    """
        +
        +    def session_preparation(self) -> None:
        +        self._test_channel_read(pattern=r"#")
        +        self.ansi_escape_codes = True
        +        # Bottom toolbar text not required
        +        commands = [
        +            "environment complete-on-space false",
        +            "environment cli-engine type basic",
        +        ]
        +        for command in commands:
        +            self.disable_paging(command=command, cmd_verify=True, pattern=r"#")
        +        self.set_base_prompt()
        +
        +    def set_base_prompt(
        +        self,
        +        pri_prompt_terminator: str = "#",
        +        alt_prompt_terminator: str = "#",
        +        delay_factor: float = 1.0,
        +        pattern: Optional[str] = r"#",
        +    ) -> str:
        +        return super().set_base_prompt(
        +            pri_prompt_terminator=pri_prompt_terminator,
        +            alt_prompt_terminator=alt_prompt_terminator,
        +            delay_factor=delay_factor,
        +            pattern=pattern,
        +        )
        +
        +    def config_mode(
        +        self,
        +        config_command: str = "enter candidate private",
        +        pattern: str = r"#",
        +        re_flags: int = 0,
        +    ) -> str:
        +        return super().config_mode(
        +            config_command=config_command, pattern=pattern, re_flags=re_flags
        +        )
        +
        +    def check_config_mode(
        +        self,
        +        check_string: str = r"\n--{( | \* | \+ | \+\* | \!\+ | \!\* )candidate",
        +        pattern: str = r"#",
        +        force_regex: bool = True,
        +    ) -> bool:
        +
        +        return super().check_config_mode(
        +            check_string=check_string, pattern=pattern, force_regex=force_regex
        +        )
        +
        +    def commit(self) -> str:
        +        """Commit changes by using 'commit stay'."""
        +        cmd = "commit stay"
        +        output = self._send_command_str(
        +            command_string=cmd, strip_prompt=False, strip_command=False
        +        )
        +        return output
        +
        +    def save_config(
        +        self,
        +        cmd: str = "save startup",
        +        confirm: bool = False,
        +        confirm_response: str = "",
        +    ) -> str:
        +        """Save current running configuration as initial (startup) configuration"""
        +        return self._send_command_str(
        +            command_string=cmd, strip_prompt=False, strip_command=False
        +        )
        +
        +    def exit_config_mode(self, exit_config: str = "", pattern: str = "") -> str:
        +        """Exit the candidate private mode"""
        +        output = ""
        +        self.write_channel(self.RETURN)
        +        prompt = self.read_until_pattern(pattern="#")
        +
        +        if self._has_uncommitted_changes(prompt):
        +            # Changes were made but not committed. Discarding changes
        +            output += self._discard()
        +        # Switch to 'running' mode
        +        output += self._running_mode()
        +        return output
        +
        +    def send_config_set(
        +        self,
        +        config_commands: Union[str, Sequence[str], TextIO, None] = None,
        +        exit_config_mode: bool = False,
        +        **kwargs: Any,
        +    ) -> str:
        +        """Nokia SRL requires you not exit from configuration mode."""
        +        return super().send_config_set(
        +            config_commands=config_commands, exit_config_mode=exit_config_mode, **kwargs
        +        )
        +
        +    def _discard(self) -> str:
        +        """Discard changes made in candidate private mode"""
        +        log.warning("Uncommitted changes will be discarted!")
        +        cmd = "discard stay"
        +        output = self._send_command_str(
        +            command_string=cmd, strip_prompt=False, strip_command=False
        +        )
        +        return output
        +
        +    def _running_mode(self) -> str:
        +        """Enter running mode"""
        +        cmd = "enter running"
        +        output = self._send_command_str(
        +            command_string=cmd, strip_prompt=False, strip_command=False
        +        )
        +        return output
        +
        +    def _has_uncommitted_changes(self, prompt: str) -> bool:
        +        """
        +        The asterix (*) next to the mode name indicates that the candidate configuration
        +        has changes that have not yet been committed.
        +
        +        The plus sign (+) in the prompt indicates that the running configuration differs
        +        from the startup configuration. After you enter the save startup command,
        +        the running configuration is synchronized with the startup configuration,
        +        and the plus sign is removed from the prompt.
        +
        +        The exclamation mark (!) in the prompt indicates that another user has commited
        +        changes to the running datastore.
        +        """
        +        matches = re.search(r"\n--{( | \* | \+ | \+\* | \!\+ | \!\* )candidate", prompt)
        +        return True if matches and "*" in matches.group() else False
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +

        Classes

        +
        +
        +class NokiaSrlSSH +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +
        +
        +

        Implement methods for interacting with Nokia SRL devices for SSH.

        +

        Not applicable in Nokia SRL: +- check_enable_mode() +- enable() +- exit_enable_mode()

        +

        By default, the SR Linux CLI prompt consists of two lines of text, +indicating with an asterisk whether the configuration has been modified or +a plus sign whether the configuration has been saved, the current mode and +session type, the current CLI context, and the host name of the SR Linux device.

        +

        Examples:

        +

        –{ running }–[ interface ethernet-1/1 subinterface 1 ]– +A:ams01#

        +

        –{ * candidate private private-admin }–[ interface ethernet-1/1 subinterface 1 ]– +A:ams01#

        +

        –{ + candidate private private-admin }–[ interface ethernet-1/1 subinterface 1 ]– +A:ams01#

        +

        This class support the default prompt configuration.

        +
            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 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 timeout: 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 keepalive: Send SSH 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 fast_cli: Provide a way 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).
        +
        +
        + +Expand source code + +
        class NokiaSrlSSH(BaseConnection, NoEnable):
        +    """
        +    Implement methods for interacting with Nokia SRL devices for SSH.
        +
        +    Not applicable in Nokia SRL:
        +        - check_enable_mode()
        +        - enable()
        +        - exit_enable_mode()
        +
        +    By default, the SR Linux CLI prompt consists of two lines of text,
        +    indicating with an asterisk whether the configuration has been modified or
        +    a plus sign whether the configuration has been saved, the current mode and
        +    session type, the current CLI context, and the host name of the SR Linux device.
        +
        +    Examples:
        +
        +    --{ running }--[ interface ethernet-1/1 subinterface 1 ]--
        +    A:ams01#
        +
        +    --{ * candidate private private-admin }--[ interface ethernet-1/1 subinterface 1 ]--
        +    A:ams01#
        +
        +    --{ + candidate private private-admin }--[ interface ethernet-1/1 subinterface 1 ]--
        +    A:ams01#
        +
        +    This class support the default prompt configuration.
        +    """
        +
        +    def session_preparation(self) -> None:
        +        self._test_channel_read(pattern=r"#")
        +        self.ansi_escape_codes = True
        +        # Bottom toolbar text not required
        +        commands = [
        +            "environment complete-on-space false",
        +            "environment cli-engine type basic",
        +        ]
        +        for command in commands:
        +            self.disable_paging(command=command, cmd_verify=True, pattern=r"#")
        +        self.set_base_prompt()
        +
        +    def set_base_prompt(
        +        self,
        +        pri_prompt_terminator: str = "#",
        +        alt_prompt_terminator: str = "#",
        +        delay_factor: float = 1.0,
        +        pattern: Optional[str] = r"#",
        +    ) -> str:
        +        return super().set_base_prompt(
        +            pri_prompt_terminator=pri_prompt_terminator,
        +            alt_prompt_terminator=alt_prompt_terminator,
        +            delay_factor=delay_factor,
        +            pattern=pattern,
        +        )
        +
        +    def config_mode(
        +        self,
        +        config_command: str = "enter candidate private",
        +        pattern: str = r"#",
        +        re_flags: int = 0,
        +    ) -> str:
        +        return super().config_mode(
        +            config_command=config_command, pattern=pattern, re_flags=re_flags
        +        )
        +
        +    def check_config_mode(
        +        self,
        +        check_string: str = r"\n--{( | \* | \+ | \+\* | \!\+ | \!\* )candidate",
        +        pattern: str = r"#",
        +        force_regex: bool = True,
        +    ) -> bool:
        +
        +        return super().check_config_mode(
        +            check_string=check_string, pattern=pattern, force_regex=force_regex
        +        )
        +
        +    def commit(self) -> str:
        +        """Commit changes by using 'commit stay'."""
        +        cmd = "commit stay"
        +        output = self._send_command_str(
        +            command_string=cmd, strip_prompt=False, strip_command=False
        +        )
        +        return output
        +
        +    def save_config(
        +        self,
        +        cmd: str = "save startup",
        +        confirm: bool = False,
        +        confirm_response: str = "",
        +    ) -> str:
        +        """Save current running configuration as initial (startup) configuration"""
        +        return self._send_command_str(
        +            command_string=cmd, strip_prompt=False, strip_command=False
        +        )
        +
        +    def exit_config_mode(self, exit_config: str = "", pattern: str = "") -> str:
        +        """Exit the candidate private mode"""
        +        output = ""
        +        self.write_channel(self.RETURN)
        +        prompt = self.read_until_pattern(pattern="#")
        +
        +        if self._has_uncommitted_changes(prompt):
        +            # Changes were made but not committed. Discarding changes
        +            output += self._discard()
        +        # Switch to 'running' mode
        +        output += self._running_mode()
        +        return output
        +
        +    def send_config_set(
        +        self,
        +        config_commands: Union[str, Sequence[str], TextIO, None] = None,
        +        exit_config_mode: bool = False,
        +        **kwargs: Any,
        +    ) -> str:
        +        """Nokia SRL requires you not exit from configuration mode."""
        +        return super().send_config_set(
        +            config_commands=config_commands, exit_config_mode=exit_config_mode, **kwargs
        +        )
        +
        +    def _discard(self) -> str:
        +        """Discard changes made in candidate private mode"""
        +        log.warning("Uncommitted changes will be discarted!")
        +        cmd = "discard stay"
        +        output = self._send_command_str(
        +            command_string=cmd, strip_prompt=False, strip_command=False
        +        )
        +        return output
        +
        +    def _running_mode(self) -> str:
        +        """Enter running mode"""
        +        cmd = "enter running"
        +        output = self._send_command_str(
        +            command_string=cmd, strip_prompt=False, strip_command=False
        +        )
        +        return output
        +
        +    def _has_uncommitted_changes(self, prompt: str) -> bool:
        +        """
        +        The asterix (*) next to the mode name indicates that the candidate configuration
        +        has changes that have not yet been committed.
        +
        +        The plus sign (+) in the prompt indicates that the running configuration differs
        +        from the startup configuration. After you enter the save startup command,
        +        the running configuration is synchronized with the startup configuration,
        +        and the plus sign is removed from the prompt.
        +
        +        The exclamation mark (!) in the prompt indicates that another user has commited
        +        changes to the running datastore.
        +        """
        +        matches = re.search(r"\n--{( | \* | \+ | \+\* | \!\+ | \!\* )candidate", prompt)
        +        return True if matches and "*" in matches.group() else False
        +
        +

        Ancestors

        + +

        Methods

        +
        +
        +def commit(self) ‑> str +
        +
        +

        Commit changes by using 'commit stay'.

        +
        + +Expand source code + +
        def commit(self) -> str:
        +    """Commit changes by using 'commit stay'."""
        +    cmd = "commit stay"
        +    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 +
        +
        +

        Exit the candidate private mode

        +
        + +Expand source code + +
        def exit_config_mode(self, exit_config: str = "", pattern: str = "") -> str:
        +    """Exit the candidate private mode"""
        +    output = ""
        +    self.write_channel(self.RETURN)
        +    prompt = self.read_until_pattern(pattern="#")
        +
        +    if self._has_uncommitted_changes(prompt):
        +        # Changes were made but not committed. Discarding changes
        +        output += self._discard()
        +    # Switch to 'running' mode
        +    output += self._running_mode()
        +    return output
        +
        +
        +
        +def save_config(self, cmd: str = 'save startup', confirm: bool = False, confirm_response: str = '') ‑> str +
        +
        +

        Save current running configuration as initial (startup) configuration

        +
        + +Expand source code + +
        def save_config(
        +    self,
        +    cmd: str = "save startup",
        +    confirm: bool = False,
        +    confirm_response: str = "",
        +) -> str:
        +    """Save current running configuration as initial (startup) configuration"""
        +    return self._send_command_str(
        +        command_string=cmd, strip_prompt=False, strip_command=False
        +    )
        +
        +
        +
        +def send_config_set(self, config_commands: Union[str, Sequence[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, **kwargs: Any) ‑> str +
        +
        +

        Nokia SRL requires you not exit from configuration mode.

        +
        + +Expand source code + +
        def send_config_set(
        +    self,
        +    config_commands: Union[str, Sequence[str], TextIO, None] = None,
        +    exit_config_mode: bool = False,
        +    **kwargs: Any,
        +) -> str:
        +    """Nokia SRL requires you not exit from configuration mode."""
        +    return super().send_config_set(
        +        config_commands=config_commands, exit_config_mode=exit_config_mode, **kwargs
        +    )
        +
        +
        +
        +

        Inherited members

        + +
        +
        +
        +
        + +
        + + + \ No newline at end of file diff --git a/docs/netmiko/nokia/nokia_sros.html b/docs/netmiko/nokia/nokia_sros.html index e8d46e0f4..1d7740019 100644 --- a/docs/netmiko/nokia/nokia_sros.html +++ b/docs/netmiko/nokia/nokia_sros.html @@ -3,15 +3,17 @@ - + netmiko.nokia.nokia_sros API documentation - - - - - + + + + + + +
        @@ -21,7 +23,9 @@

        Module netmiko.nokia.nokia_sros

        -Source code + +Expand source code +
        #!/usr/bin/python
         # -*- coding: utf-8 -*-
         # Copyright (c) 2014 - 2022 Kirk Byers
        @@ -177,7 +181,10 @@ 

        Module netmiko.nokia.nokia_sros

        return output def check_config_mode( - self, check_string: str = r"(ex)[", pattern: str = r"@" + self, + check_string: str = r"(ex)[", + pattern: str = r"@", + force_regex: bool = False, ) -> bool: """Check config mode for Nokia SR OS""" if "@" not in self.base_prompt: @@ -426,10 +433,10 @@

        Classes

        class NokiaSros -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
        -

        Implement methods for interacting with Nokia SR OS devices +

        Implement methods for interacting with Nokia SR OS devices for both SSH and telnet.

        Not applicable in Nokia SR OS (disabled): - exit_enable_mode()

        @@ -446,10 +453,10 @@

        Classes

        - check_enable_mode()

            Initialize attributes for establishing connection to target device.
         
        -    :param ip: IP address of target device. Not required if `host` is
        +    :param ip: IP address of target device. Not required if <code>host</code> is
                 provided.
         
        -    :param host: Hostname of target device. Not required if `ip` is
        +    :param host: Hostname of target device. Not required if <code>ip</code> is
                     provided.
         
             :param username: Username to authenticate against target device if
        @@ -488,7 +495,7 @@ 

        Classes

        :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -533,12 +540,12 @@

        Classes

        :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -546,9 +553,11 @@

        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). -
        +
        -Source code + +Expand source code +
        class NokiaSros(BaseConnection):
             """
             Implement methods for interacting with Nokia SR OS devices
        @@ -685,7 +694,10 @@ 

        Classes

        return output def check_config_mode( - self, check_string: str = r"(ex)[", pattern: str = r"@" + self, + check_string: str = r"(ex)[", + pattern: str = r"@", + force_regex: bool = False, ) -> bool: """Check config mode for Nokia SR OS""" if "@" not in self.base_prompt: @@ -793,14 +805,19 @@

        Subclasses

        Methods

        -def check_config_mode(self, check_string='(ex)[', pattern='@') +def check_config_mode(self, check_string: str = '(ex)[', pattern: str = '@', force_regex: bool = False) ‑> bool
        -

        Check config mode for Nokia SR OS

        +

        Check config mode for Nokia SR OS

        -Source code + +Expand source code +
        def check_config_mode(
        -    self, check_string: str = r"(ex)[", pattern: str = r"@"
        +    self,
        +    check_string: str = r"(ex)[",
        +    pattern: str = r"@",
        +    force_regex: bool = False,
         ) -> bool:
             """Check config mode for Nokia SR OS"""
             if "@" not in self.base_prompt:
        @@ -812,12 +829,14 @@ 

        Methods

        -def check_enable_mode(self, check_string='in admin mode') +def check_enable_mode(self, check_string: str = 'in admin mode') ‑> bool
        -

        Check if in enable mode.

        +

        Check if in enable mode.

        -Source code + +Expand source code +
        def check_enable_mode(self, check_string: str = "in admin mode") -> bool:
             """Check if in enable mode."""
             cmd = "enable"
        @@ -834,12 +853,14 @@ 

        Methods

        -def cleanup(self, command='logout') +def cleanup(self, command: str = 'logout') ‑> None
        -

        Gracefully exit the SSH session.

        +

        Gracefully exit the SSH session.

        -Source code + +Expand source code +
        def cleanup(self, command: str = "logout") -> None:
             """Gracefully exit the SSH session."""
             try:
        @@ -854,12 +875,14 @@ 

        Methods

        -def commit(self, *args, **kwargs) +def commit(self, *args: Any, **kwargs: Any) ‑> str
        -

        Activate changes from private candidate for Nokia SR OS

        +

        Activate changes from private candidate for Nokia SR OS

        -Source code + +Expand source code +
        def commit(self, *args: Any, **kwargs: Any) -> str:
             """Activate changes from private candidate for Nokia SR OS"""
             output = self._exit_all()
        @@ -877,12 +900,14 @@ 

        Methods

        -def config_mode(self, config_command='edit-config exclusive', pattern='', re_flags=0) +def config_mode(self, config_command: str = 'edit-config exclusive', pattern: str = '', re_flags: int = 0) ‑> str
        -

        Enable config edit-mode for Nokia SR OS

        +

        Enable config edit-mode for Nokia SR OS

        -Source code + +Expand source code +
        def config_mode(
             self,
             config_command: str = "edit-config exclusive",
        @@ -903,12 +928,14 @@ 

        Methods

        -def enable(self, cmd='enable', pattern='ssword', enable_pattern=None, re_flags=re.IGNORECASE) +def enable(self, cmd: str = 'enable', pattern: str = 'ssword', enable_pattern: Optional[str] = None, re_flags: int = re.IGNORECASE) ‑> str
        -

        Enable SR OS administrative mode

        +

        Enable SR OS administrative mode

        -Source code + +Expand source code +
        def enable(
             self,
             cmd: str = "enable",
        @@ -923,12 +950,14 @@ 

        Methods

        -def exit_config_mode(self, *args, **kwargs) +def exit_config_mode(self, *args: Any, **kwargs: Any) ‑> str
        -

        Disable config edit-mode for Nokia SR OS

        +

        Disable config edit-mode for Nokia SR OS

        -Source code + +Expand source code +
        def exit_config_mode(self, *args: Any, **kwargs: Any) -> str:
             """Disable config edit-mode for Nokia SR OS"""
             output = self._exit_all()
        @@ -951,36 +980,42 @@ 

        Methods

        -def exit_enable_mode(self, *args, **kwargs) +def exit_enable_mode(self, *args: Any, **kwargs: Any) ‑> str
        -

        Nokia SR OS does not have a notion of exiting administrative mode

        +

        Nokia SR OS does not have a notion of exiting administrative mode

        -Source code + +Expand source code +
        def exit_enable_mode(self, *args: Any, **kwargs: Any) -> str:
             """Nokia SR OS does not have a notion of exiting administrative mode"""
             return ""
        -def save_config(self, *args, **kwargs) +def save_config(self, *args: Any, **kwargs: Any) ‑> str
        -

        Persist configuration to cflash for Nokia SR OS

        +

        Persist configuration to cflash for Nokia SR OS

        -Source code + +Expand source code +
        def save_config(self, *args: Any, **kwargs: Any) -> str:
             """Persist configuration to cflash for Nokia SR OS"""
             return self._send_command_str(command_string="/admin save", expect_string=r"#")
        -def send_config_set(self, config_commands=None, exit_config_mode=None, **kwargs) +def send_config_set(self, config_commands: Union[str, Sequence[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = None, **kwargs: Any) ‑> str
        -

        Model driven CLI requires you not exit from configuration mode.

        +

        Model driven CLI requires you not exit from configuration mode.

        -Source code + +Expand source code +
        def send_config_set(
             self,
             config_commands: Union[str, Sequence[str], TextIO, None] = None,
        @@ -997,12 +1032,14 @@ 

        Methods

        -def set_base_prompt(self, *args, **kwargs) +def set_base_prompt(self, *args: Any, **kwargs: Any) ‑> str
        -

        Remove the > when navigating into the different config level.

        +

        Remove the > when navigating into the different config level.

        -Source code + +Expand source code +
        def set_base_prompt(self, *args: Any, **kwargs: Any) -> str:
             """Remove the > when navigating into the different config level."""
             cur_base_prompt = super().set_base_prompt(*args, **kwargs)
        @@ -1015,12 +1052,14 @@ 

        Methods

        -def strip_prompt(self, *args, **kwargs) +def strip_prompt(self, *args: Any, **kwargs: Any) ‑> str
        -

        Strip prompt from the output.

        +

        Strip prompt from the output.

        -Source code + +Expand source code +
        def strip_prompt(self, *args: Any, **kwargs: Any) -> str:
             """Strip prompt from the output."""
             output = super().strip_prompt(*args, **kwargs)
        @@ -1076,12 +1115,14 @@ 

        Inherited members

        class NokiaSrosFileTransfer -(ssh_conn, source_file, dest_file, file_system=None, direction='put', socket_timeout=10.0, progress=None, progress4=None, hash_supported=False) +(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: Optional[str] = None, direction: str = 'put', socket_timeout: float = 10.0, progress: Optional[Callable[..., Any]] = None, progress4: Optional[Callable[..., Any]] = None, hash_supported: bool = False)
        -

        Class to manage SCP file transfer and associated SSH control channel.

        +

        Class to manage SCP file transfer and associated SSH control channel.

        -Source code + +Expand source code +
        class NokiaSrosFileTransfer(BaseFileTransfer):
             def __init__(
                 self,
        @@ -1217,12 +1258,14 @@ 

        Ancestors

        Methods

        -def check_file_exists(self, remote_cmd='') +def check_file_exists(self, remote_cmd: str = '') ‑> bool
        -

        Check if destination file exists (returns boolean).

        +

        Check if destination file exists (returns boolean).

        -Source code + +Expand source code +
        def check_file_exists(self, remote_cmd: str = "") -> bool:
             """Check if destination file exists (returns boolean)."""
         
        @@ -1246,12 +1289,14 @@ 

        Methods

        -def verify_file(self) +def verify_file(self) ‑> bool
        -

        Verify the file has been transferred correctly based on filesize.

        +

        Verify the file has been transferred correctly based on filesize.

        -Source code + +Expand source code +
        def verify_file(self) -> bool:
             """Verify the file has been transferred correctly based on filesize."""
             if self.direction == "put":
        @@ -1293,16 +1338,16 @@ 

        Inherited members

        class NokiaSrosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
        -

        Nokia SR OS SSH driver.

        +

        Nokia SR OS SSH driver.

            Initialize attributes for establishing connection to target device.
         
        -    :param ip: IP address of target device. Not required if `host` is
        +    :param ip: IP address of target device. Not required if <code>host</code> is
                 provided.
         
        -    :param host: Hostname of target device. Not required if `ip` is
        +    :param host: Hostname of target device. Not required if <code>ip</code> is
                     provided.
         
             :param username: Username to authenticate against target device if
        @@ -1341,7 +1386,7 @@ 

        Inherited members

        :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -1386,12 +1431,12 @@

        Inherited members

        :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -1399,9 +1444,11 @@

        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). -
        +
        -Source code + +Expand source code +
        class NokiaSrosSSH(NokiaSros):
             """Nokia SR OS SSH driver."""
         
        @@ -1463,16 +1510,16 @@ 

        Inherited members

        class NokiaSrosTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
        -

        Nokia SR OS Telnet driver.

        +

        Nokia SR OS Telnet driver.

            Initialize attributes for establishing connection to target device.
         
        -    :param ip: IP address of target device. Not required if `host` is
        +    :param ip: IP address of target device. Not required if <code>host</code> is
                 provided.
         
        -    :param host: Hostname of target device. Not required if `ip` is
        +    :param host: Hostname of target device. Not required if <code>ip</code> is
                     provided.
         
             :param username: Username to authenticate against target device if
        @@ -1511,7 +1558,7 @@ 

        Inherited members

        :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -1556,12 +1603,12 @@

        Inherited members

        :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -1569,9 +1616,11 @@

        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). -
        +
        -Source code + +Expand source code +
        class NokiaSrosTelnet(NokiaSros):
             """Nokia SR OS Telnet driver."""
         
        @@ -1683,9 +1732,7 @@ 

        -

        Generated by pdoc 0.6.3.

        +

        Generated by pdoc 0.10.0.

        - - \ No newline at end of file diff --git a/docs/netmiko/oneaccess/index.html b/docs/netmiko/oneaccess/index.html index 612cc8cd3..51c103220 100644 --- a/docs/netmiko/oneaccess/index.html +++ b/docs/netmiko/oneaccess/index.html @@ -3,15 +3,17 @@ - + netmiko.oneaccess API documentation - - - - - + + + + + + +
        @@ -21,7 +23,9 @@

        Module netmiko.oneaccess

        -Source code + +Expand source code +
        from netmiko.oneaccess.oneaccess_oneos import OneaccessOneOSSSH, OneaccessOneOSTelnet
         
         __all__ = ["OneaccessOneOSSSH", "OneaccessOneOSTelnet"]
        @@ -32,7 +36,7 @@

        Sub-modules

        netmiko.oneaccess.oneaccess_oneos
        -

        Netmiko driver for OneAccess ONEOS

        +

        Netmiko driver for OneAccess ONEOS

        @@ -45,13 +49,15 @@

        Classes

        class OneaccessOneOSSSH -(*args, **kwargs) +(*args: Any, **kwargs: Any)
        -

        Base Class for cisco-like behavior.

        -

        Init connection - similar as Cisco

        +

        Base Class for cisco-like behavior.

        +

        Init connection - similar as Cisco

        -Source code + +Expand source code +
        class OneaccessOneOSSSH(OneaccessOneOSBase):
             pass
        @@ -112,13 +118,15 @@

        Inherited members

        class OneaccessOneOSTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
        -

        Base Class for cisco-like behavior.

        -

        Init connection - similar as Cisco

        +

        Base Class for cisco-like behavior.

        +

        Init connection - similar as Cisco

        -Source code + +Expand source code +
        class OneaccessOneOSTelnet(OneaccessOneOSBase):
             pass
        @@ -210,9 +218,7 @@

        -

        Generated by pdoc 0.6.3.

        +

        Generated by pdoc 0.10.0.

        - - \ No newline at end of file diff --git a/docs/netmiko/oneaccess/oneaccess_oneos.html b/docs/netmiko/oneaccess/oneaccess_oneos.html index 1d89ad497..f1a44b212 100644 --- a/docs/netmiko/oneaccess/oneaccess_oneos.html +++ b/docs/netmiko/oneaccess/oneaccess_oneos.html @@ -3,15 +3,17 @@ - + netmiko.oneaccess.oneaccess_oneos API documentation - - - - - + + + + + + +
        @@ -22,7 +24,9 @@

        Module netmiko.oneaccess.oneaccess_oneos

        Netmiko driver for OneAccess ONEOS

        -Source code + +Expand source code +
        """Netmiko driver for OneAccess ONEOS"""
         import time
         from typing import Any
        @@ -75,13 +79,15 @@ 

        Classes

        class OneaccessOneOSBase -(*args, **kwargs) +(*args: Any, **kwargs: Any)
        -

        Base Class for cisco-like behavior.

        -

        Init connection - similar as Cisco

        +

        Base Class for cisco-like behavior.

        +

        Init connection - similar as Cisco

        -Source code + +Expand source code +
        class OneaccessOneOSBase(CiscoBaseConnection):
             def __init__(self, *args: Any, **kwargs: Any) -> None:
                 """Init connection - similar as Cisco"""
        @@ -120,12 +126,14 @@ 

        Subclasses

        Methods

        -def save_config(self, cmd='write mem', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'write mem', confirm: bool = False, confirm_response: str = '') ‑> str
        -

        Save config: write mem

        +

        Save config: write mem

        -Source code + +Expand source code +
        def save_config(
             self, cmd: str = "write mem", confirm: bool = False, confirm_response: str = ""
         ) -> str:
        @@ -136,12 +144,14 @@ 

        Methods

        -def session_preparation(self) +def session_preparation(self) ‑> None
        -

        Prepare connection - disable paging

        +

        Prepare connection - disable paging

        -Source code + +Expand source code +
        def session_preparation(self) -> None:
             """Prepare connection - disable paging"""
             self._test_channel_read()
        @@ -203,13 +213,15 @@ 

        Inherited members

        class OneaccessOneOSSSH -(*args, **kwargs) +(*args: Any, **kwargs: Any)
        -

        Base Class for cisco-like behavior.

        -

        Init connection - similar as Cisco

        +

        Base Class for cisco-like behavior.

        +

        Init connection - similar as Cisco

        -Source code + +Expand source code +
        class OneaccessOneOSSSH(OneaccessOneOSBase):
             pass
        @@ -270,13 +282,15 @@

        Inherited members

        class OneaccessOneOSTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
        -

        Base Class for cisco-like behavior.

        -

        Init connection - similar as Cisco

        +

        Base Class for cisco-like behavior.

        +

        Init connection - similar as Cisco

        -Source code + +Expand source code +
        class OneaccessOneOSTelnet(OneaccessOneOSBase):
             pass
        @@ -370,9 +384,7 @@

        - - \ No newline at end of file diff --git a/docs/netmiko/ovs/index.html b/docs/netmiko/ovs/index.html index b4c57ddae..d2f5f3c1a 100644 --- a/docs/netmiko/ovs/index.html +++ b/docs/netmiko/ovs/index.html @@ -3,15 +3,17 @@ - + netmiko.ovs API documentation - - - - - + + + + + + +
        @@ -21,7 +23,9 @@

        Module netmiko.ovs

        -Source code + +Expand source code +
        from netmiko.ovs.ovs_linux_ssh import OvsLinuxSSH
         
         __all__ = ["OvsLinuxSSH"]
        @@ -32,7 +36,7 @@

        Sub-modules

        netmiko.ovs.ovs_linux_ssh
        -
        +
        @@ -45,16 +49,16 @@

        Classes

        class OvsLinuxSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
        -

        Base Class for cisco-like behavior.

        +

        Base Class for cisco-like behavior.

            Initialize attributes for establishing connection to target device.
         
        -    :param ip: IP address of target device. Not required if `host` is
        +    :param ip: IP address of target device. Not required if <code>host</code> is
                 provided.
         
        -    :param host: Hostname of target device. Not required if `ip` is
        +    :param host: Hostname of target device. Not required if <code>ip</code> is
                     provided.
         
             :param username: Username to authenticate against target device if
        @@ -93,7 +97,7 @@ 

        Classes

        :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -138,12 +142,12 @@

        Classes

        :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -151,9 +155,11 @@

        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). -
        +

        -Source code + +Expand source code +
        class OvsLinuxSSH(LinuxSSH):
             pass
        @@ -243,9 +249,7 @@

        Ovs

        - - \ No newline at end of file diff --git a/docs/netmiko/ovs/ovs_linux_ssh.html b/docs/netmiko/ovs/ovs_linux_ssh.html index 848615588..1aaf126a5 100644 --- a/docs/netmiko/ovs/ovs_linux_ssh.html +++ b/docs/netmiko/ovs/ovs_linux_ssh.html @@ -3,15 +3,17 @@ - + netmiko.ovs.ovs_linux_ssh API documentation - - - - - + + + + + + +
        @@ -21,7 +23,9 @@

        Module netmiko.ovs.ovs_linux_ssh

        -Source code + +Expand source code +
        from netmiko.linux.linux_ssh import LinuxSSH
         
         
        @@ -40,16 +44,16 @@ 

        Classes

        class OvsLinuxSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
        -

        Base Class for cisco-like behavior.

        +

        Base Class for cisco-like behavior.

            Initialize attributes for establishing connection to target device.
         
        -    :param ip: IP address of target device. Not required if `host` is
        +    :param ip: IP address of target device. Not required if <code>host</code> is
                 provided.
         
        -    :param host: Hostname of target device. Not required if `ip` is
        +    :param host: Hostname of target device. Not required if <code>ip</code> is
                     provided.
         
             :param username: Username to authenticate against target device if
        @@ -88,7 +92,7 @@ 

        Classes

        :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -133,12 +137,12 @@

        Classes

        :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -146,9 +150,11 @@

        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). -
        +
        -Source code + +Expand source code +
        class OvsLinuxSSH(LinuxSSH):
             pass
        @@ -233,9 +239,7 @@

        -

        Generated by pdoc 0.6.3.

        +

        Generated by pdoc 0.10.0.

        - - \ No newline at end of file diff --git a/docs/netmiko/paloalto/index.html b/docs/netmiko/paloalto/index.html index bea5de377..6ffb5c23f 100644 --- a/docs/netmiko/paloalto/index.html +++ b/docs/netmiko/paloalto/index.html @@ -3,15 +3,17 @@ - + netmiko.paloalto API documentation - - - - - + + + + + + +
        @@ -21,7 +23,9 @@

        Module netmiko.paloalto

        -Source code + +Expand source code +
        from netmiko.paloalto.paloalto_panos import PaloAltoPanosSSH, PaloAltoPanosTelnet
         
         __all__ = ["PaloAltoPanosSSH", "PaloAltoPanosTelnet"]
        @@ -32,7 +36,7 @@

        Sub-modules

        netmiko.paloalto.paloalto_panos
        -
        +
        @@ -45,19 +49,19 @@

        Classes

        class PaloAltoPanosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
        -

        Implement methods for interacting with PaloAlto devices.

        +

        Implement methods for interacting with PaloAlto devices.

        Disables enable() and check_enable_mode() methods. Overrides several methods for PaloAlto-specific compatibility.

            Initialize attributes for establishing connection to target device.
         
        -    :param ip: IP address of target device. Not required if `host` is
        +    :param ip: IP address of target device. Not required if <code>host</code> is
                 provided.
         
        -    :param host: Hostname of target device. Not required if `ip` is
        +    :param host: Hostname of target device. Not required if <code>ip</code> is
                     provided.
         
             :param username: Username to authenticate against target device if
        @@ -96,7 +100,7 @@ 

        Classes

        :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -141,12 +145,12 @@

        Classes

        :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -154,9 +158,11 @@

        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). -
        +

  • -Source code + +Expand source code +
    class PaloAltoPanosSSH(PaloAltoPanosBase):
         def _build_ssh_client(self) -> SSHClient:
             """Prepare for Paramiko SSH connection."""
    @@ -236,19 +242,19 @@ 

    Inherited members

    class PaloAltoPanosTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Implement methods for interacting with PaloAlto devices.

    +

    Implement methods for interacting with PaloAlto devices.

    Disables enable() and check_enable_mode() methods. Overrides several methods for PaloAlto-specific compatibility.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -287,7 +293,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -332,12 +338,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -345,9 +351,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class PaloAltoPanosTelnet(PaloAltoPanosBase):
         pass
    @@ -440,9 +448,7 @@

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/paloalto/paloalto_panos.html b/docs/netmiko/paloalto/paloalto_panos.html index 782396800..d62d8bf34 100644 --- a/docs/netmiko/paloalto/paloalto_panos.html +++ b/docs/netmiko/paloalto/paloalto_panos.html @@ -3,15 +3,17 @@ - + netmiko.paloalto.paloalto_panos API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.paloalto.paloalto_panos

    -Source code + +Expand source code +
    from typing import Optional, List, Any, Tuple
     import re
     import warnings
    @@ -110,7 +114,9 @@ 

    Module netmiko.paloalto.paloalto_panos

    """PA devices can be very slow to respond (in certain situations)""" return super().find_prompt(delay_factor=delay_factor, pattern=pattern) - def check_config_mode(self, check_string: str = "]", pattern: str = "") -> bool: + 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.""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -287,19 +293,19 @@

    Classes

    class PaloAltoPanosBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Implement methods for interacting with PaloAlto devices.

    +

    Implement methods for interacting with PaloAlto devices.

    Disables enable() and check_enable_mode() methods. Overrides several methods for PaloAlto-specific compatibility.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -338,7 +344,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -383,12 +389,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -396,9 +402,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class PaloAltoPanosBase(NoEnable, BaseConnection):
         """
         Implement methods for interacting with PaloAlto devices.
    @@ -436,7 +444,9 @@ 

    Classes

    """PA devices can be very slow to respond (in certain situations)""" return super().find_prompt(delay_factor=delay_factor, pattern=pattern) - def check_config_mode(self, check_string: str = "]", pattern: str = "") -> bool: + 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.""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -588,24 +598,30 @@

    Subclasses

    Methods

    -def check_config_mode(self, check_string=']', pattern='') +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.

    +

    Checks if the device is in configuration mode or not.

    -Source code -
    def check_config_mode(self, check_string: str = "]", pattern: str = "") -> bool:
    +
    +Expand source code
    +
    +
    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."""
         return super().check_config_mode(check_string=check_string, pattern=pattern)
    -def cleanup(self, command='exit') +def cleanup(self, command: str = 'exit') ‑> None
    -

    Gracefully exit the SSH session.

    +

    Gracefully exit the SSH session.

    -Source code + +Expand source code +
    def cleanup(self, command: str = "exit") -> None:
         """Gracefully exit the SSH session."""
         try:
    @@ -620,10 +636,10 @@ 

    Methods

    -def commit(self, comment='', force=False, partial=False, device_and_network=False, policy_and_objects=False, vsys='', no_vsys=False, read_timeout=120.0, delay_factor=None) +def commit(self, comment: str = '', force: bool = False, partial: bool = False, device_and_network: bool = False, policy_and_objects: bool = False, vsys: str = '', no_vsys: bool = False, read_timeout: float = 120.0, delay_factor: Optional[float] = None) ‑> str
    -

    Commit the candidate configuration.

    +

    Commit the candidate configuration.

    Commit the entered configuration. Raise an error and return the failure if the commit fails.

    Automatically enters configuration mode

    @@ -632,9 +648,11 @@

    Methods

    (device_and_network or policy_and_objects or vsys or no_vsys) and not partial: Exception

    -

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    +

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    -Source code + +Expand source code +
    def commit(
         self,
         comment: str = "",
    @@ -713,12 +731,14 @@ 

    Methods

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

    Enter configuration mode.

    +

    Enter configuration mode.

    -Source code + +Expand source code +
    def config_mode(
         self, config_command: str = "configure", pattern: str = r"#", re_flags: int = 0
     ) -> str:
    @@ -729,24 +749,28 @@ 

    Methods

    -def exit_config_mode(self, exit_config='exit', pattern='>') +def exit_config_mode(self, exit_config: str = 'exit', pattern: str = '>') ‑> str
    -

    Exit configuration mode.

    +

    Exit configuration mode.

    -Source code + +Expand source code +
    def exit_config_mode(self, exit_config: str = "exit", pattern: str = r">") -> str:
         """Exit configuration mode."""
         return super().exit_config_mode(exit_config=exit_config, pattern=pattern)
    -def find_prompt(self, delay_factor=5.0, pattern=None) +def find_prompt(self, delay_factor: float = 5.0, pattern: Optional[str] = None) ‑> str
    -

    PA devices can be very slow to respond (in certain situations)

    +

    PA devices can be very slow to respond (in certain situations)

    -Source code + +Expand source code +
    def find_prompt(
         self, delay_factor: float = 5.0, pattern: Optional[str] = None
     ) -> str:
    @@ -755,14 +779,16 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    Disable paging (the '–more–' prompts). -Set the base prompt for interaction ('>').

    +Set the base prompt for interaction ('>').

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """
         Prepare the session after the connection has been established.
    @@ -788,12 +814,14 @@ 

    Methods

    -def strip_command(self, command_string, output) +def strip_command(self, command_string: str, output: str) ‑> str
    -

    Strip command_string from output string.

    +

    Strip command_string from output string.

    -Source code + +Expand source code +
    def strip_command(self, command_string: str, output: str) -> str:
         """Strip command_string from output string."""
         output_list = output.split(command_string)
    @@ -801,15 +829,17 @@ 

    Methods

    -def strip_context_items(self, a_string) +def strip_context_items(self, a_string: str) ‑> str
    -

    Strip PaloAlto-specific output.

    +

    Strip PaloAlto-specific output.

    PaloAlto will also put a configuration context: [edit]

    -

    This method removes those lines.

    +

    This method removes those lines.

    -Source code + +Expand source code +
    def strip_context_items(self, a_string: str) -> str:
         """Strip PaloAlto-specific output.
     
    @@ -831,12 +861,14 @@ 

    Methods

    -def strip_prompt(self, a_string) +def strip_prompt(self, a_string: str) ‑> str
    -

    Strip the trailing router prompt from the output.

    +

    Strip the trailing router prompt from the output.

    -Source code + +Expand source code +
    def strip_prompt(self, a_string: str) -> str:
         """Strip the trailing router prompt from the output."""
         response_list = a_string.split(self.RESPONSE_RETURN)
    @@ -892,19 +924,19 @@ 

    Inherited members

    class PaloAltoPanosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Implement methods for interacting with PaloAlto devices.

    +

    Implement methods for interacting with PaloAlto devices.

    Disables enable() and check_enable_mode() methods. Overrides several methods for PaloAlto-specific compatibility.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -943,7 +975,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -988,12 +1020,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -1001,9 +1033,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class PaloAltoPanosSSH(PaloAltoPanosBase):
         def _build_ssh_client(self) -> SSHClient:
             """Prepare for Paramiko SSH connection."""
    @@ -1083,19 +1117,19 @@ 

    Inherited members

    class PaloAltoPanosTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Implement methods for interacting with PaloAlto devices.

    +

    Implement methods for interacting with PaloAlto devices.

    Disables enable() and check_enable_mode() methods. Overrides several methods for PaloAlto-specific compatibility.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -1134,7 +1168,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -1179,12 +1213,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -1192,9 +1226,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class PaloAltoPanosTelnet(PaloAltoPanosBase):
         pass
    @@ -1258,10 +1294,12 @@

    Inherited members

    class SSHClient_interactive
    -

    Set noauth when manually handling SSH authentication.

    -

    Create a new SSHClient.

    +

    Set noauth when manually handling SSH authentication.

    +

    Create a new SSHClient.

    -Source code + +Expand source code +
    class SSHClient_interactive(SSHClient):
         """Set noauth when manually handling SSH authentication."""
     
    @@ -1310,12 +1348,14 @@ 

    Ancestors

    Methods

    -def pa_banner_handler(self, title, instructions, prompt_list) +def pa_banner_handler(self, title: str, instructions: str, prompt_list: List[Tuple[str, bool]]) ‑> List[str]
    -
    +
    -Source code + +Expand source code +
    def pa_banner_handler(
         self, title: str, instructions: str, prompt_list: List[Tuple[str, bool]]
     ) -> List[str]:
    @@ -1381,9 +1421,7 @@ 

    - - \ No newline at end of file diff --git a/docs/netmiko/pluribus/index.html b/docs/netmiko/pluribus/index.html index 3f5d5306a..5eb84d089 100644 --- a/docs/netmiko/pluribus/index.html +++ b/docs/netmiko/pluribus/index.html @@ -3,15 +3,17 @@ - + netmiko.pluribus API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.pluribus

    -Source code + +Expand source code +
    # -*- coding: utf-8 -*-
     from netmiko.pluribus.pluribus_ssh import PluribusSSH
     
    @@ -33,7 +37,7 @@ 

    Sub-modules

    netmiko.pluribus.pluribus_ssh
    -
    +
    @@ -46,12 +50,14 @@

    Classes

    class PluribusSSH -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Common methods for Pluribus.

    +

    Common methods for Pluribus.

    -Source code + +Expand source code +
    class PluribusSSH(NoConfig, BaseConnection):
         """Common methods for Pluribus."""
     
    @@ -76,12 +82,14 @@ 

    Ancestors

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the netmiko session.

    +

    Prepare the netmiko session.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the netmiko session."""
         self._test_channel_read()
    @@ -174,9 +182,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/pluribus/pluribus_ssh.html b/docs/netmiko/pluribus/pluribus_ssh.html index f9885b8cd..50ceebe09 100644 --- a/docs/netmiko/pluribus/pluribus_ssh.html +++ b/docs/netmiko/pluribus/pluribus_ssh.html @@ -3,15 +3,17 @@ - + netmiko.pluribus.pluribus_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.pluribus.pluribus_ssh

    -Source code + +Expand source code +
    import time
     from typing import Any
     
    @@ -57,12 +61,14 @@ 

    Classes

    class PluribusSSH -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Common methods for Pluribus.

    +

    Common methods for Pluribus.

    -Source code + +Expand source code +
    class PluribusSSH(NoConfig, BaseConnection):
         """Common methods for Pluribus."""
     
    @@ -87,12 +93,14 @@ 

    Ancestors

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the netmiko session.

    +

    Prepare the netmiko session.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the netmiko session."""
         self._test_channel_read()
    @@ -180,9 +188,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/quanta/index.html b/docs/netmiko/quanta/index.html index abfa144d1..898d79c14 100644 --- a/docs/netmiko/quanta/index.html +++ b/docs/netmiko/quanta/index.html @@ -3,15 +3,17 @@ - + netmiko.quanta API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.quanta

    -Source code + +Expand source code +
    from netmiko.quanta.quanta_mesh_ssh import QuantaMeshSSH
     
     __all__ = ["QuantaMeshSSH"]
    @@ -32,7 +36,7 @@

    Sub-modules

    netmiko.quanta.quanta_mesh_ssh
    -
    +
    @@ -45,16 +49,16 @@

    Classes

    class QuantaMeshSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -93,7 +97,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -138,12 +142,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -151,9 +155,11 @@

    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). -
    +

    -Source code + +Expand source code +
    class QuantaMeshSSH(CiscoSSHConnection):
         def session_preparation(self) -> None:
             self._test_channel_read()
    @@ -188,12 +194,14 @@ 

    Ancestors

    Methods

    -def save_config(self, cmd='copy running-config startup-config', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'copy running-config startup-config', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Saves Config

    +

    Saves Config

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "copy running-config startup-config",
    @@ -288,9 +296,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/quanta/quanta_mesh_ssh.html b/docs/netmiko/quanta/quanta_mesh_ssh.html index e89fd5363..4ba8f38cf 100644 --- a/docs/netmiko/quanta/quanta_mesh_ssh.html +++ b/docs/netmiko/quanta/quanta_mesh_ssh.html @@ -3,15 +3,17 @@ - + netmiko.quanta.quanta_mesh_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.quanta.quanta_mesh_ssh

    -Source code + +Expand source code +
    from netmiko.cisco_base_connection import CiscoSSHConnection
     
     
    @@ -62,16 +66,16 @@ 

    Classes

    class QuantaMeshSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -110,7 +114,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -155,12 +159,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -168,9 +172,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class QuantaMeshSSH(CiscoSSHConnection):
         def session_preparation(self) -> None:
             self._test_channel_read()
    @@ -205,12 +211,14 @@ 

    Ancestors

    Methods

    -def save_config(self, cmd='copy running-config startup-config', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'copy running-config startup-config', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Saves Config

    +

    Saves Config

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "copy running-config startup-config",
    @@ -300,9 +308,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/rad/index.html b/docs/netmiko/rad/index.html index 1d449b3f4..567cec3b6 100644 --- a/docs/netmiko/rad/index.html +++ b/docs/netmiko/rad/index.html @@ -3,15 +3,17 @@ - + netmiko.rad API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.rad

    -Source code + +Expand source code +
    from netmiko.rad.rad_etx import RadETXSSH
     from netmiko.rad.rad_etx import RadETXTelnet
     
    @@ -33,7 +37,7 @@ 

    Sub-modules

    netmiko.rad.rad_etx
    -
    +
    @@ -46,16 +50,16 @@

    Classes

    class RadETXSSH -(**kwargs) +(**kwargs: Any)
    -

    RAD ETX SSH Support.

    +

    RAD ETX SSH Support.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -94,7 +98,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -139,12 +143,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -152,9 +156,11 @@

    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). -
    +

    -Source code + +Expand source code +
    class RadETXSSH(RadETXBase):
         """RAD ETX SSH Support."""
     
    @@ -220,16 +226,16 @@ 

    Inherited members

    class RadETXTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    RAD ETX Telnet Support.

    +

    RAD ETX Telnet Support.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -268,7 +274,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -313,12 +319,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -326,9 +332,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class RadETXTelnet(RadETXBase):
         """RAD ETX Telnet Support."""
     
    @@ -367,14 +375,16 @@ 

    Ancestors

    Methods

    -def telnet_login(self, pri_prompt_terminator='#\\s*$', alt_prompt_terminator='#\\s*$', username_pattern='(?:user>)', pwd_pattern='assword', delay_factor=1.0, max_loops=20) +def telnet_login(self, pri_prompt_terminator: str = '#\\s*$', alt_prompt_terminator: str = '#\\s*$', username_pattern: str = '(?:user>)', pwd_pattern: str = 'assword', delay_factor: float = 1.0, max_loops: int = 20) ‑> str
    -

    RAD presents with the following on login

    +

    RAD presents with the following on login

    user>

    -

    password> ****

    +

    password> ****

    -Source code + +Expand source code +
    def telnet_login(
         self,
         pri_prompt_terminator: str = r"#\s*$",
    @@ -487,9 +497,7 @@ 

    R

    - - \ No newline at end of file diff --git a/docs/netmiko/rad/rad_etx.html b/docs/netmiko/rad/rad_etx.html index 234846db8..bb3a7d260 100644 --- a/docs/netmiko/rad/rad_etx.html +++ b/docs/netmiko/rad/rad_etx.html @@ -3,15 +3,17 @@ - + netmiko.rad.rad_etx API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.rad.rad_etx

    -Source code + +Expand source code +
    import time
     from typing import Any
     
    @@ -68,7 +72,10 @@ 

    Module netmiko.rad.rad_etx

    ) def check_config_mode( - self, check_string: str = ">config", pattern: str = "" + self, + check_string: str = ">config", + pattern: str = "", + force_regex: bool = False, ) -> bool: """ Checks if the device is in configuration mode or not. @@ -134,16 +141,16 @@

    Classes

    class RadETXBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    RAD ETX Support, Tested on RAD 203AX, 205A and 220A.

    +

    RAD ETX Support, Tested on RAD 203AX, 205A and 220A.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -182,7 +189,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -227,12 +234,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -240,9 +247,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class RadETXBase(NoEnable, BaseConnection):
         """RAD ETX Support, Tested on RAD 203AX, 205A and 220A."""
     
    @@ -282,7 +291,10 @@ 

    Classes

    ) def check_config_mode( - self, check_string: str = ">config", pattern: str = "" + self, + check_string: str = ">config", + pattern: str = "", + force_regex: bool = False, ) -> bool: """ Checks if the device is in configuration mode or not. @@ -310,15 +322,20 @@

    Subclasses

    Methods

    -def check_config_mode(self, check_string='>config', pattern='') +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.

    -

    Rad config starts with baseprompt>config.

    +

    Checks if the device is in configuration mode or not.

    +

    Rad config starts with baseprompt>config.

    -Source code + +Expand source code +
    def check_config_mode(
    -    self, check_string: str = ">config", pattern: str = ""
    +    self,
    +    check_string: str = ">config",
    +    pattern: str = "",
    +    force_regex: bool = False,
     ) -> bool:
         """
         Checks if the device is in configuration mode or not.
    @@ -329,12 +346,14 @@ 

    Methods

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

    Enter into configuration mode on remote device.

    +

    Enter into configuration mode on remote device.

    -Source code + +Expand source code +
    def config_mode(
         self,
         config_command: str = "config",
    @@ -348,12 +367,14 @@ 

    Methods

    -def exit_config_mode(self, exit_config='exit all', pattern='#') +def exit_config_mode(self, exit_config: str = 'exit all', pattern: str = '#') ‑> str
    -

    Exit from configuration mode.

    +

    Exit from configuration mode.

    -Source code + +Expand source code +
    def exit_config_mode(
         self, exit_config: str = "exit all", pattern: str = "#"
     ) -> str:
    @@ -362,12 +383,14 @@ 

    Methods

    -def save_config(self, cmd='admin save', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'admin save', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Saves Config Using admin save.

    +

    Saves Config Using admin save.

    -Source code + +Expand source code +
    def save_config(
         self, cmd: str = "admin save", confirm: bool = False, confirm_response: str = ""
     ) -> str:
    @@ -433,16 +456,16 @@ 

    Inherited members

    class RadETXSSH -(**kwargs) +(**kwargs: Any)
    -

    RAD ETX SSH Support.

    +

    RAD ETX SSH Support.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -481,7 +504,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -526,12 +549,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -539,9 +562,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class RadETXSSH(RadETXBase):
         """RAD ETX SSH Support."""
     
    @@ -607,16 +632,16 @@ 

    Inherited members

    class RadETXTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    RAD ETX Telnet Support.

    +

    RAD ETX Telnet Support.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -655,7 +680,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -700,12 +725,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -713,9 +738,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class RadETXTelnet(RadETXBase):
         """RAD ETX Telnet Support."""
     
    @@ -754,14 +781,16 @@ 

    Ancestors

    Methods

    -def telnet_login(self, pri_prompt_terminator='#\\s*$', alt_prompt_terminator='#\\s*$', username_pattern='(?:user>)', pwd_pattern='assword', delay_factor=1.0, max_loops=20) +def telnet_login(self, pri_prompt_terminator: str = '#\\s*$', alt_prompt_terminator: str = '#\\s*$', username_pattern: str = '(?:user>)', pwd_pattern: str = 'assword', delay_factor: float = 1.0, max_loops: int = 20) ‑> str
    -

    RAD presents with the following on login

    +

    RAD presents with the following on login

    user>

    -

    password> ****

    +

    password> ****

    -Source code + +Expand source code +
    def telnet_login(
         self,
         pri_prompt_terminator: str = r"#\s*$",
    @@ -878,9 +907,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/raisecom/index.html b/docs/netmiko/raisecom/index.html index d41a2d803..12f855256 100644 --- a/docs/netmiko/raisecom/index.html +++ b/docs/netmiko/raisecom/index.html @@ -3,15 +3,17 @@ - + netmiko.raisecom API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.raisecom

    -Source code + +Expand source code +
    from netmiko.raisecom.raisecom_roap import RaisecomRoapSSH
     from netmiko.raisecom.raisecom_roap import RaisecomRoapTelnet
     
    @@ -33,7 +37,7 @@ 

    Sub-modules

    netmiko.raisecom.raisecom_roap
    -
    +
    @@ -46,16 +50,16 @@

    Classes

    class RaisecomRoapSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -94,7 +98,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -139,12 +143,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -152,9 +156,11 @@

    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). -
    +

    -Source code + +Expand source code +
    class RaisecomRoapSSH(RaisecomRoapBase):
         def special_login_handler(self, delay_factor: float = 1.0) -> None:
             """
    @@ -190,14 +196,16 @@ 

    Ancestors

    Methods

    -def special_login_handler(self, delay_factor=1.0) +def special_login_handler(self, delay_factor: float = 1.0) ‑> None
    -

    Raisecom presents with the following on login (in certain OS versions) +

    Raisecom presents with the following on login (in certain OS versions) Login: user -Password:****

    +Password:****

    -Source code + +Expand source code +
    def special_login_handler(self, delay_factor: float = 1.0) -> None:
         """
         Raisecom presents with the following on login (in certain OS versions)
    @@ -275,16 +283,16 @@ 

    Inherited members

    class RaisecomRoapTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -323,7 +331,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -368,12 +376,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -381,9 +389,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class RaisecomRoapTelnet(RaisecomRoapBase):
         @staticmethod
         def _process_option(telnet_sock: socket, cmd: bytes, opt: bytes) -> None:
    @@ -566,9 +576,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/raisecom/raisecom_roap.html b/docs/netmiko/raisecom/raisecom_roap.html index 2fce28543..2f91259e0 100644 --- a/docs/netmiko/raisecom/raisecom_roap.html +++ b/docs/netmiko/raisecom/raisecom_roap.html @@ -3,15 +3,17 @@ - + netmiko.raisecom.raisecom_roap API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.raisecom.raisecom_roap

    -Source code + +Expand source code +
    from netmiko.cisco_base_connection import CiscoBaseConnection
     import re
     import time
    @@ -42,7 +46,9 @@ 

    Module netmiko.raisecom.raisecom_roap

    time.sleep(0.3 * self.global_delay_factor) self.clear_buffer() - def check_config_mode(self, check_string: str = ")#", pattern: str = "#") -> bool: + 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. """ @@ -192,16 +198,16 @@

    Classes

    class RaisecomRoapBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -240,7 +246,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -285,12 +291,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -298,9 +304,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class RaisecomRoapBase(CiscoBaseConnection):
         def session_preparation(self) -> None:
             """Prepare the session after the connection has been established."""
    @@ -312,7 +320,9 @@ 

    Classes

    time.sleep(0.3 * self.global_delay_factor) self.clear_buffer() - def check_config_mode(self, check_string: str = ")#", pattern: str = "#") -> bool: + 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. """ @@ -344,13 +354,17 @@

    Subclasses

    Methods

    -def check_config_mode(self, check_string=')#', pattern='#') +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.

    +

    Checks if the device is in configuration mode or not.

    -Source code -
    def check_config_mode(self, check_string: str = ")#", pattern: str = "#") -> bool:
    +
    +Expand source code
    +
    +
    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.
         """
    @@ -358,12 +372,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read(pattern=r"[>#]")
    @@ -425,16 +441,16 @@ 

    Inherited members

    class RaisecomRoapSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -473,7 +489,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -518,12 +534,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -531,9 +547,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class RaisecomRoapSSH(RaisecomRoapBase):
         def special_login_handler(self, delay_factor: float = 1.0) -> None:
             """
    @@ -569,14 +587,16 @@ 

    Ancestors

    Methods

    -def special_login_handler(self, delay_factor=1.0) +def special_login_handler(self, delay_factor: float = 1.0) ‑> None
    -

    Raisecom presents with the following on login (in certain OS versions) +

    Raisecom presents with the following on login (in certain OS versions) Login: user -Password:****

    +Password:****

    -Source code + +Expand source code +
    def special_login_handler(self, delay_factor: float = 1.0) -> None:
         """
         Raisecom presents with the following on login (in certain OS versions)
    @@ -654,16 +674,16 @@ 

    Inherited members

    class RaisecomRoapTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -702,7 +722,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -747,12 +767,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -760,9 +780,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class RaisecomRoapTelnet(RaisecomRoapBase):
         @staticmethod
         def _process_option(telnet_sock: socket, cmd: bytes, opt: bytes) -> None:
    @@ -947,9 +969,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/ruckus/index.html b/docs/netmiko/ruckus/index.html index cec5ffe17..ca808e4fd 100644 --- a/docs/netmiko/ruckus/index.html +++ b/docs/netmiko/ruckus/index.html @@ -3,15 +3,17 @@ - + netmiko.ruckus API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.ruckus

    -Source code + +Expand source code +
    from netmiko.ruckus.ruckus_fastiron import RuckusFastironSSH
     from netmiko.ruckus.ruckus_fastiron import RuckusFastironTelnet
     
    @@ -33,7 +37,7 @@ 

    Sub-modules

    netmiko.ruckus.ruckus_fastiron
    -
    +
    @@ -46,16 +50,16 @@

    Classes

    class RuckusFastironSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Ruckus FastIron aka ICX support.

    +

    Ruckus FastIron aka ICX support.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -94,7 +98,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -139,12 +143,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -152,9 +156,11 @@

    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). -
    +

    -Source code + +Expand source code +
    class RuckusFastironSSH(RuckusFastironBase):
         pass
    @@ -216,16 +222,16 @@

    Inherited members

    class RuckusFastironTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Ruckus FastIron aka ICX support.

    +

    Ruckus FastIron aka ICX support.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -264,7 +270,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -309,12 +315,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -322,9 +328,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class RuckusFastironTelnet(RuckusFastironBase):
         def __init__(self, *args: Any, **kwargs: Any) -> None:
             default_enter = kwargs.get("default_enter")
    @@ -439,9 +447,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/ruckus/ruckus_fastiron.html b/docs/netmiko/ruckus/ruckus_fastiron.html index 023186b1a..7a22001be 100644 --- a/docs/netmiko/ruckus/ruckus_fastiron.html +++ b/docs/netmiko/ruckus/ruckus_fastiron.html @@ -3,15 +3,17 @@ - + netmiko.ruckus.ruckus_fastiron API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.ruckus.ruckus_fastiron

    -Source code + +Expand source code +
    import re
     import time
     from socket import socket
    @@ -145,16 +149,16 @@ 

    Classes

    class RuckusFastironBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Ruckus FastIron aka ICX support.

    +

    Ruckus FastIron aka ICX support.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -193,7 +197,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -238,12 +242,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -251,9 +255,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class RuckusFastironBase(CiscoSSHConnection):
         """Ruckus FastIron aka ICX support."""
     
    @@ -334,23 +340,25 @@ 

    Ancestors

    Subclasses

    Methods

    -def enable(self, cmd='enable', pattern='(ssword|User Name)', enable_pattern=None, re_flags=re.IGNORECASE) +def enable(self, cmd: str = 'enable', pattern: str = '(ssword|User Name)', enable_pattern: Optional[str] = None, re_flags: int = re.IGNORECASE) ‑> str
    -

    Enter enable mode. +

    Enter enable mode. With RADIUS can prompt for User Name SSH@Lab-ICX7250>en User Name:service_netmiko Password: -SSH@Lab-ICX7250#

    +SSH@Lab-ICX7250#

    -Source code + +Expand source code +
    def enable(
         self,
         cmd: str = "enable",
    @@ -404,12 +412,14 @@ 

    Methods

    -def save_config(self, cmd='write mem', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'write mem', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Saves configuration.

    +

    Saves configuration.

    -Source code + +Expand source code +
    def save_config(
         self, cmd: str = "write mem", confirm: bool = False, confirm_response: str = ""
     ) -> str:
    @@ -420,12 +430,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    FastIron requires to be enable mode to disable paging.

    +

    FastIron requires to be enable mode to disable paging.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """FastIron requires to be enable mode to disable paging."""
         self._test_channel_read()
    @@ -486,16 +498,16 @@ 

    Inherited members

    class RuckusFastironSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Ruckus FastIron aka ICX support.

    +

    Ruckus FastIron aka ICX support.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -534,7 +546,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -579,12 +591,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -592,9 +604,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class RuckusFastironSSH(RuckusFastironBase):
         pass
    @@ -656,16 +670,16 @@

    Inherited members

    class RuckusFastironTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Ruckus FastIron aka ICX support.

    +

    Ruckus FastIron aka ICX support.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -704,7 +718,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -749,12 +763,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -762,9 +776,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class RuckusFastironTelnet(RuckusFastironBase):
         def __init__(self, *args: Any, **kwargs: Any) -> None:
             default_enter = kwargs.get("default_enter")
    @@ -882,9 +898,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/ruijie/index.html b/docs/netmiko/ruijie/index.html index ec693b736..b22cfac3a 100644 --- a/docs/netmiko/ruijie/index.html +++ b/docs/netmiko/ruijie/index.html @@ -3,15 +3,17 @@ - + netmiko.ruijie API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.ruijie

    -Source code + +Expand source code +
    from netmiko.ruijie.ruijie_os import RuijieOSSSH, RuijieOSTelnet
     
     __all__ = ["RuijieOSSSH", "RuijieOSTelnet"]
    @@ -32,7 +36,7 @@

    Sub-modules

    netmiko.ruijie.ruijie_os
    -

    Ruijie RGOS Support

    +

    Ruijie RGOS Support

    @@ -45,16 +49,16 @@

    Classes

    class RuijieOSSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -93,7 +97,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -138,12 +142,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -151,9 +155,11 @@

    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). -
    +

    -Source code + +Expand source code +
    class RuijieOSSSH(RuijieOSBase):
     
         pass
    @@ -215,16 +221,16 @@

    Inherited members

    class RuijieOSTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -263,7 +269,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -308,12 +314,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -321,9 +327,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class RuijieOSTelnet(RuijieOSBase):
         def __init__(self, *args: Any, **kwargs: Any) -> None:
             default_enter = kwargs.get("default_enter")
    @@ -418,9 +426,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/ruijie/ruijie_os.html b/docs/netmiko/ruijie/ruijie_os.html index 8d281c753..a7d61ff16 100644 --- a/docs/netmiko/ruijie/ruijie_os.html +++ b/docs/netmiko/ruijie/ruijie_os.html @@ -3,15 +3,17 @@ - + netmiko.ruijie.ruijie_os API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.ruijie.ruijie_os

    Ruijie RGOS Support

    -Source code + +Expand source code +
    """Ruijie RGOS Support"""
     import time
     from typing import Any
    @@ -75,16 +79,16 @@ 

    Classes

    class RuijieOSBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -123,7 +127,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -168,12 +172,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -181,9 +185,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class RuijieOSBase(CiscoBaseConnection):
         def session_preparation(self) -> None:
             """Prepare the session after the connection has been established."""
    @@ -218,12 +224,14 @@ 

    Subclasses

    Methods

    -def save_config(self, cmd='write', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'write', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Save config: write

    +

    Save config: write

    -Source code + +Expand source code +
    def save_config(
         self, cmd: str = "write", confirm: bool = False, confirm_response: str = ""
     ) -> str:
    @@ -234,12 +242,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read(pattern=r"[>#]")
    @@ -303,16 +313,16 @@ 

    Inherited members

    class RuijieOSSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -351,7 +361,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -396,12 +406,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -409,9 +419,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class RuijieOSSSH(RuijieOSBase):
     
         pass
    @@ -473,16 +485,16 @@

    Inherited members

    class RuijieOSTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -521,7 +533,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -566,12 +578,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -579,9 +591,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class RuijieOSTelnet(RuijieOSBase):
         def __init__(self, *args: Any, **kwargs: Any) -> None:
             default_enter = kwargs.get("default_enter")
    @@ -678,9 +692,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/scp_functions.html b/docs/netmiko/scp_functions.html index 2287195d7..d5fac3392 100644 --- a/docs/netmiko/scp_functions.html +++ b/docs/netmiko/scp_functions.html @@ -3,15 +3,17 @@ - + netmiko.scp_functions API documentation - - - - - + + + + + + +
    @@ -24,7 +26,9 @@

    Module netmiko.scp_functions

    Supports file get and file put operations.

    SCP requires a separate SSH connection for a control channel.

    -Source code + +Expand source code +
    """
     Netmiko SCP operations.
     
    @@ -192,18 +196,20 @@ 

    Module netmiko.scp_functions

    Functions

    -def file_transfer(ssh_conn, source_file, dest_file, file_system=None, direction='put', disable_md5=False, inline_transfer=False, overwrite_file=False, socket_timeout=10.0, progress=None, progress4=None, verify_file=None) +def file_transfer(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: Optional[str] = None, direction: str = 'put', disable_md5: bool = False, inline_transfer: bool = False, overwrite_file: bool = False, socket_timeout: float = 10.0, progress: Optional[Callable[..., Any]] = None, progress4: Optional[Callable[..., Any]] = None, verify_file: Optional[bool] = None) ‑> Dict[str, bool]
    -

    Use Secure Copy or Inline (IOS-only) to transfer files to/from network devices.

    +

    Use Secure Copy or Inline (IOS-only) to transfer files to/from network devices.

    inline_transfer ONLY SUPPORTS TEXT FILES and will not support binary file transfers.

    return { 'file_exists': boolean, 'file_transferred': boolean, 'file_verified': boolean, -}

    +}

    -Source code + +Expand source code +
    def file_transfer(
         ssh_conn: "BaseConnection",
         source_file: str,
    @@ -312,12 +318,14 @@ 

    Functions

    -def progress_bar(filename, size, sent, peername=None) +def progress_bar(filename: ~AnyStr, size: int, sent: int, peername: Optional[str] = None) ‑> None
    -
    +
    -Source code + +Expand source code +
    def progress_bar(
         filename: AnyStr, size: int, sent: int, peername: Optional[str] = None
     ) -> None:
    @@ -347,12 +355,14 @@ 

    Functions

    -def verifyspace_and_transferfile(scp_transfer) +def verifyspace_and_transferfile(scp_transfer: BaseFileTransfer) ‑> None
    -

    Verify space and transfer file.

    +

    Verify space and transfer file.

    -Source code + +Expand source code +
    def verifyspace_and_transferfile(scp_transfer: BaseFileTransfer) -> None:
         """Verify space and transfer file."""
         if not scp_transfer.verify_space_available():
    @@ -387,9 +397,7 @@ 

    Index

    - - \ No newline at end of file diff --git a/docs/netmiko/scp_handler.html b/docs/netmiko/scp_handler.html index 83dd64efd..8a1d72f45 100644 --- a/docs/netmiko/scp_handler.html +++ b/docs/netmiko/scp_handler.html @@ -3,15 +3,17 @@ - + netmiko.scp_handler API documentation - - - - - + + + + + + +
    @@ -24,7 +26,9 @@

    Module netmiko.scp_handler

    Supports file get and file put operations.

    SCP requires a separate SSH connection for a control channel.

    -Source code + +Expand source code +
    """
     Netmiko SCP operations.
     
    @@ -467,12 +471,14 @@ 

    Classes

    class BaseFileTransfer -(ssh_conn, source_file, dest_file, file_system=None, direction='put', socket_timeout=10.0, progress=None, progress4=None, hash_supported=True) +(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: Optional[str] = None, direction: str = 'put', socket_timeout: float = 10.0, progress: Optional[Callable[..., Any]] = None, progress4: Optional[Callable[..., Any]] = None, hash_supported: bool = True)
    -

    Class to manage SCP file transfer and associated SSH control channel.

    +

    Class to manage SCP file transfer and associated SSH control channel.

    -Source code + +Expand source code +
    class BaseFileTransfer(object):
         """Class to manage SCP file transfer and associated SSH control channel."""
     
    @@ -835,25 +841,28 @@ 

    Classes

    Subclasses

    Static methods

    -def process_md5(md5_output, pattern='=\\s+(\\S+)') +def process_md5(md5_output: str, pattern: str = '=\\s+(\\S+)') ‑> str
    -

    Process the string to retrieve the MD5 hash

    +

    Process the string to retrieve the MD5 hash

    Output from Cisco IOS (ASA is similar) .MD5 of flash:file_name Done! -verify /md5 (flash:file_name) = 410db2a7015eaa42b1fe71f1bf3d59a2

    +verify /md5 (flash:file_name) = 410db2a7015eaa42b1fe71f1bf3d59a2

    -Source code + +Expand source code +
    @staticmethod
     def process_md5(md5_output: str, pattern: str = r"=\s+(\S+)") -> str:
         """
    @@ -874,12 +883,14 @@ 

    Static methods

    Methods

    -def check_file_exists(self, remote_cmd='') +def check_file_exists(self, remote_cmd: str = '') ‑> bool
    -

    Check if the dest_file already exists on the file system (return boolean).

    +

    Check if the dest_file already exists on the file system (return boolean).

    -Source code + +Expand source code +
    def check_file_exists(self, remote_cmd: str = "") -> bool:
         """Check if the dest_file already exists on the file system (return boolean)."""
         if self.direction == "put":
    @@ -904,12 +915,14 @@ 

    Methods

    -def close_scp_chan(self) +def close_scp_chan(self) ‑> None
    -

    Close the SCP connection to the remote network device.

    +

    Close the SCP connection to the remote network device.

    -Source code + +Expand source code +
    def close_scp_chan(self) -> None:
         """Close the SCP connection to the remote network device."""
         self.scp_conn.close()
    @@ -917,12 +930,14 @@ 

    Methods

    -def compare_md5(self) +def compare_md5(self) ‑> bool
    -

    Compare md5 of file on network device to md5 of local file.

    +

    Compare md5 of file on network device to md5 of local file.

    -Source code + +Expand source code +
    def compare_md5(self) -> bool:
         """Compare md5 of file on network device to md5 of local file."""
         if self.direction == "put":
    @@ -936,13 +951,15 @@ 

    Methods

    -def disable_scp(self, cmd='no ip scp server enable') +def disable_scp(self, cmd: str = 'no ip scp server enable') ‑> None
    -

    Disable SCP on remote device.

    -

    Defaults to Cisco IOS command

    +

    Disable SCP on remote device.

    +

    Defaults to Cisco IOS command

    -Source code + +Expand source code +
    def disable_scp(self, cmd: str = "no ip scp server enable") -> None:
         """
         Disable SCP on remote device.
    @@ -953,13 +970,15 @@ 

    Methods

    -def enable_scp(self, cmd='ip scp server enable') +def enable_scp(self, cmd: str = 'ip scp server enable') ‑> None
    -

    Enable SCP on remote device.

    -

    Defaults to Cisco IOS command

    +

    Enable SCP on remote device.

    +

    Defaults to Cisco IOS command

    -Source code + +Expand source code +
    def enable_scp(self, cmd: str = "ip scp server enable") -> None:
         """
         Enable SCP on remote device.
    @@ -970,12 +989,14 @@ 

    Methods

    -def establish_scp_conn(self) +def establish_scp_conn(self) ‑> None
    -

    Establish SCP connection.

    +

    Establish SCP connection.

    -Source code + +Expand source code +
    def establish_scp_conn(self) -> None:
         """Establish SCP connection."""
         self.scp_conn = SCPConn(
    @@ -987,10 +1008,10 @@ 

    Methods

    -def file_md5(self, file_name, add_newline=False) +def file_md5(self, file_name: str, add_newline: bool = False) ‑> str
    -

    Compute MD5 hash of file.

    +

    Compute MD5 hash of file.

    add_newline is needed to support Cisco IOS MD5 calculation which expects the newline in the string

    Args

    @@ -999,9 +1020,11 @@

    Args

    name of file to get md5 digest of
    add_newline
    add newline to end of file contents or not
    -

    +

    -Source code + +Expand source code +
    def file_md5(self, file_name: str, add_newline: bool = False) -> str:
         """Compute MD5 hash of file.
     
    @@ -1026,12 +1049,14 @@ 

    Args

    -def get_file(self) +def get_file(self) ‑> None
    -

    SCP copy the file from the remote device to local system.

    +

    SCP copy the file from the remote device to local system.

    -Source code + +Expand source code +
    def get_file(self) -> None:
         """SCP copy the file from the remote device to local system."""
         source_file = f"{self.file_system}/{self.source_file}"
    @@ -1040,12 +1065,14 @@ 

    Args

    -def local_space_available(self) +def local_space_available(self) ‑> int
    -

    Return space available on local filesystem.

    +

    Return space available on local filesystem.

    -Source code + +Expand source code +
    def local_space_available(self) -> int:
         """Return space available on local filesystem."""
         if sys.platform == "win32":
    @@ -1062,12 +1089,14 @@ 

    Args

    -def put_file(self) +def put_file(self) ‑> None
    -

    SCP copy the file from the local system to the remote device.

    +

    SCP copy the file from the local system to the remote device.

    -Source code + +Expand source code +
    def put_file(self) -> None:
         """SCP copy the file from the local system to the remote device."""
         destination = f"{self.file_system}/{self.dest_file}"
    @@ -1077,12 +1106,14 @@ 

    Args

    -def remote_file_size(self, remote_cmd='', remote_file=None) +def remote_file_size(self, remote_cmd: str = '', remote_file: Optional[str] = None) ‑> int
    -

    Get the file size of the remote file.

    +

    Get the file size of the remote file.

    -Source code + +Expand source code +
    def remote_file_size(
         self, remote_cmd: str = "", remote_file: Optional[str] = None
     ) -> int:
    @@ -1117,13 +1148,15 @@ 

    Args

    -def remote_md5(self, base_cmd='verify /md5', remote_file=None) +def remote_md5(self, base_cmd: str = 'verify /md5', remote_file: Optional[str] = None) ‑> str
    -

    Calculate remote MD5 and returns the hash.

    -

    This command can be CPU intensive on the remote device.

    +

    Calculate remote MD5 and returns the hash.

    +

    This command can be CPU intensive on the remote device.

    -Source code + +Expand source code +
    def remote_md5(
         self, base_cmd: str = "verify /md5", remote_file: Optional[str] = None
     ) -> str:
    @@ -1143,12 +1176,14 @@ 

    Args

    -def remote_space_available(self, search_pattern='(\\d+) \\w+ free') +def remote_space_available(self, search_pattern: str = '(\\d+) \\w+ free') ‑> int
    -

    Return space available on remote device.

    +

    Return space available on remote device.

    -Source code + +Expand source code +
    def remote_space_available(self, search_pattern: str = r"(\d+) \w+ free") -> int:
         """Return space available on remote device."""
         remote_cmd = f"dir {self.file_system}"
    @@ -1166,12 +1201,14 @@ 

    Args

    -def transfer_file(self) +def transfer_file(self) ‑> None
    -

    SCP transfer file.

    +

    SCP transfer file.

    -Source code + +Expand source code +
    def transfer_file(self) -> None:
         """SCP transfer file."""
         if self.direction == "put":
    @@ -1183,24 +1220,28 @@ 

    Args

    -def verify_file(self) +def verify_file(self) ‑> bool
    -

    Verify the file has been transferred correctly.

    +

    Verify the file has been transferred correctly.

    -Source code + +Expand source code +
    def verify_file(self) -> bool:
         """Verify the file has been transferred correctly."""
         return self.compare_md5()
    -def verify_space_available(self, search_pattern='(\\d+) \\w+ free') +def verify_space_available(self, search_pattern: str = '(\\d+) \\w+ free') ‑> bool
    -

    Verify sufficient space is available on destination file system (return boolean).

    +

    Verify sufficient space is available on destination file system (return boolean).

    -Source code + +Expand source code +
    def verify_space_available(self, search_pattern: str = r"(\d+) \w+ free") -> bool:
         """Verify sufficient space is available on destination file system (return boolean)."""
         if self.direction == "put":
    @@ -1216,13 +1257,15 @@ 

    Args

    class SCPConn -(ssh_conn, socket_timeout=10.0, progress=None, progress4=None) +(ssh_conn: BaseConnection, socket_timeout: float = 10.0, progress: Optional[Callable[..., Any]] = None, progress4: Optional[Callable[..., Any]] = None)
    -

    Establish a secure copy channel to the remote network device.

    -

    Must close the SCP connection to get the file to write to the remote filesystem

    +

    Establish a secure copy channel to the remote network device.

    +

    Must close the SCP connection to get the file to write to the remote filesystem

    -Source code + +Expand source code +
    class SCPConn(object):
         """
         Establish a secure copy channel to the remote network device.
    @@ -1274,24 +1317,28 @@ 

    Args

    Methods

    -def close(self) +def close(self) ‑> None
    -

    Close the SCP connection.

    +

    Close the SCP connection.

    -Source code + +Expand source code +
    def close(self) -> None:
         """Close the SCP connection."""
         self.scp_conn.close()
    -def establish_scp_conn(self) +def establish_scp_conn(self) ‑> None
    -

    Establish the secure copy connection.

    +

    Establish the secure copy connection.

    -Source code + +Expand source code +
    def establish_scp_conn(self) -> None:
         """Establish the secure copy connection."""
         ssh_connect_params = self.ssh_ctl_chan._connect_params_dict()
    @@ -1306,36 +1353,42 @@ 

    Methods

    -def scp_get_file(self, source_file, dest_file) +def scp_get_file(self, source_file: str, dest_file: str) ‑> None
    -

    Get file using SCP.

    +

    Get file using SCP.

    -Source code + +Expand source code +
    def scp_get_file(self, source_file: str, dest_file: str) -> None:
         """Get file using SCP."""
         self.scp_client.get(source_file, dest_file)
    -def scp_put_file(self, source_file, dest_file) +def scp_put_file(self, source_file: str, dest_file: str) ‑> None
    -

    Put file using SCP.

    +

    Put file using SCP.

    -Source code + +Expand source code +
    def scp_put_file(self, source_file: str, dest_file: str) -> None:
         """Put file using SCP."""
         self.scp_client.put(source_file, dest_file)
    -def scp_transfer_file(self, source_file, dest_file) +def scp_transfer_file(self, source_file: str, dest_file: str) ‑> None
    -

    Put file using SCP (for backwards compatibility).

    +

    Put file using SCP (for backwards compatibility).

    -Source code + +Expand source code +
    def scp_transfer_file(self, source_file: str, dest_file: str) -> None:
         """Put file using SCP (for backwards compatibility)."""
         self.scp_client.put(source_file, dest_file)
    @@ -1397,9 +1450,7 @@

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/session_log.html b/docs/netmiko/session_log.html index 419f0ca7f..da58de640 100644 --- a/docs/netmiko/session_log.html +++ b/docs/netmiko/session_log.html @@ -3,15 +3,17 @@ - + netmiko.session_log API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.session_log

    -Source code + +Expand source code +
    import io
     from netmiko.utilities import write_bytes
     from typing import Dict, Any, Union, Optional, TextIO
    @@ -105,12 +109,14 @@ 

    Classes

    class SessionLog -(file_name=None, buffered_io=None, file_mode='write', file_encoding='utf-8', no_log=None, record_writes=False) +(file_name: Optional[str] = None, buffered_io: Optional[io.BufferedIOBase] = None, file_mode: str = 'write', file_encoding: str = 'utf-8', no_log: Dict[str, Any] = None, record_writes: bool = False)
    -
    +
    -Source code + +Expand source code +
    class SessionLog:
         def __init__(
             self,
    @@ -180,12 +186,14 @@ 

    Classes

    Methods

    -def close(self) +def close(self) ‑> None
    -

    Close the session_log file (if it is a file that we opened).

    +

    Close the session_log file (if it is a file that we opened).

    -Source code + +Expand source code +
    def close(self) -> None:
         """Close the session_log file (if it is a file that we opened)."""
         if self.session_log and self._session_log_close:
    @@ -194,12 +202,14 @@ 

    Methods

    -def open(self) +def open(self) ‑> None
    -

    Open the session_log file.

    +

    Open the session_log file.

    -Source code + +Expand source code +
    def open(self) -> None:
         """Open the session_log file."""
         if self.file_name is None:
    @@ -216,12 +226,14 @@ 

    Methods

    -def write(self, data) +def write(self, data: str) ‑> None
    -
    +
    -Source code + +Expand source code +
    def write(self, data: str) -> None:
         if self.session_log is not None and len(data) > 0:
             # Hide the password and secret in the session_log
    @@ -271,9 +283,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/sixwind/index.html b/docs/netmiko/sixwind/index.html index 68802591d..7f4ddb656 100644 --- a/docs/netmiko/sixwind/index.html +++ b/docs/netmiko/sixwind/index.html @@ -3,15 +3,17 @@ - + netmiko.sixwind API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.sixwind

    -Source code + +Expand source code +
    from netmiko.sixwind.sixwind_os import SixwindOSSSH
     
     __all__ = ["SixwindOSSSH"]
    @@ -32,7 +36,7 @@

    Sub-modules

    netmiko.sixwind.sixwind_os
    -
    +
    @@ -45,10 +49,10 @@

    Classes

    class SixwindOSSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Class for platforms that have no enable mode.

    +

    Class for platforms that have no enable mode.

    Netmiko translates the meaning of "enable" mode to be a proxy for "can go into config mode". In other words, that you ultimately have privileges to execute configuration changes.

    @@ -58,10 +62,10 @@

    Classes

    don't explicitly support enable mode.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -100,7 +104,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -145,12 +149,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -158,9 +162,11 @@

    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). -
    +

    -Source code + +Expand source code +
    class SixwindOSSSH(SixwindOSBase):
     
         pass
    @@ -251,9 +257,7 @@

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/sixwind/sixwind_os.html b/docs/netmiko/sixwind/sixwind_os.html index 71fbc3476..1bb7eb40c 100644 --- a/docs/netmiko/sixwind/sixwind_os.html +++ b/docs/netmiko/sixwind/sixwind_os.html @@ -3,15 +3,17 @@ - + netmiko.sixwind.sixwind_os API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.sixwind.sixwind_os

    -Source code + +Expand source code +
    from typing import Optional, Any
     import time
     import warnings
    @@ -111,7 +115,9 @@ 

    Module netmiko.sixwind.sixwind_os

    return super().exit_config_mode(exit_config=exit_config, pattern=pattern) - def check_config_mode(self, check_string: str = "#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "#", pattern: str = "", force_regex: bool = False + ) -> bool: """Checks whether in configuration mode. Returns a boolean.""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -145,10 +151,10 @@

    Classes

    class SixwindOSBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Class for platforms that have no enable mode.

    +

    Class for platforms that have no enable mode.

    Netmiko translates the meaning of "enable" mode to be a proxy for "can go into config mode". In other words, that you ultimately have privileges to execute configuration changes.

    @@ -158,10 +164,10 @@

    Classes

    don't explicitly support enable mode.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -200,7 +206,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -245,12 +251,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -258,9 +264,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class SixwindOSBase(NoEnable, CiscoBaseConnection):
         def session_preparation(self) -> None:
             """Prepare the session after the connection has been established."""
    @@ -342,7 +350,9 @@ 

    Classes

    return super().exit_config_mode(exit_config=exit_config, pattern=pattern) - def check_config_mode(self, check_string: str = "#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "#", pattern: str = "", force_regex: bool = False + ) -> bool: """Checks whether in configuration mode. Returns a boolean.""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -372,27 +382,33 @@

    Subclasses

    Methods

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

    Checks whether in configuration mode. Returns a boolean.

    +

    Checks whether in configuration mode. Returns a boolean.

    -Source code -
    def check_config_mode(self, check_string: str = "#", pattern: str = "") -> bool:
    +
    +Expand source code
    +
    +
    def check_config_mode(
    +    self, check_string: str = "#", pattern: str = "", force_regex: bool = False
    +) -> bool:
         """Checks whether in configuration mode. Returns a boolean."""
     
         return super().check_config_mode(check_string=check_string, pattern=pattern)
    -def commit(self, comment='', read_timeout=120.0, delay_factor=None) +def commit(self, comment: str = '', read_timeout: float = 120.0, delay_factor: Optional[float] = None) ‑> str
    -

    Commit the candidate configuration.

    +

    Commit the candidate configuration.

    Raise an error and return the failure if the commit fails.

    -

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    +

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    -Source code + +Expand source code +
    def commit(
         self,
         comment: str = "",
    @@ -431,24 +447,28 @@ 

    Methods

    -def disable_paging(self, *args, **kwargs) +def disable_paging(self, *args: Any, **kwargs: Any) ‑> str
    -

    6WIND requires no-pager at the end of command, not implemented at this time.

    +

    6WIND requires no-pager at the end of command, not implemented at this time.

    -Source code + +Expand source code +
    def disable_paging(self, *args: Any, **kwargs: Any) -> str:
         """6WIND requires no-pager at the end of command, not implemented at this time."""
         pass
    -def exit_config_mode(self, exit_config='exit', pattern='>') +def exit_config_mode(self, exit_config: str = 'exit', pattern: str = '>') ‑> str
    -

    Exit configuration mode.

    +

    Exit configuration mode.

    -Source code + +Expand source code +
    def exit_config_mode(self, exit_config: str = "exit", pattern: str = r">") -> str:
         """Exit configuration mode."""
     
    @@ -456,12 +476,14 @@ 

    Methods

    -def save_config(self, cmd='copy running startup', confirm=True, confirm_response='y') +def save_config(self, cmd: str = 'copy running startup', confirm: bool = True, confirm_response: str = 'y') ‑> str
    -

    Save Config for 6WIND

    +

    Save Config for 6WIND

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "copy running startup",
    @@ -476,12 +498,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self.ansi_escape_codes = True
    @@ -493,12 +517,14 @@ 

    Methods

    -def set_base_prompt(self, pri_prompt_terminator='>', alt_prompt_terminator='#', delay_factor=1.0, pattern=None) +def set_base_prompt(self, pri_prompt_terminator: str = '>', alt_prompt_terminator: str = '#', delay_factor: float = 1.0, pattern: Optional[str] = None) ‑> str
    -

    Sets self.base_prompt: used as delimiter for stripping of trailing prompt in output.

    +

    Sets self.base_prompt: used as delimiter for stripping of trailing prompt in output.

    -Source code + +Expand source code +
    def set_base_prompt(
         self,
         pri_prompt_terminator: str = ">",
    @@ -564,10 +590,10 @@ 

    Inherited members

    class SixwindOSSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Class for platforms that have no enable mode.

    +

    Class for platforms that have no enable mode.

    Netmiko translates the meaning of "enable" mode to be a proxy for "can go into config mode". In other words, that you ultimately have privileges to execute configuration changes.

    @@ -577,10 +603,10 @@

    Inherited members

    don't explicitly support enable mode.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -619,7 +645,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -664,12 +690,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -677,9 +703,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class SixwindOSSSH(SixwindOSBase):
     
         pass
    @@ -777,9 +805,7 @@

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/snmp_autodetect.html b/docs/netmiko/snmp_autodetect.html index 819d62b05..f4dbd0b4f 100644 --- a/docs/netmiko/snmp_autodetect.html +++ b/docs/netmiko/snmp_autodetect.html @@ -3,16 +3,18 @@ - + netmiko.snmp_autodetect API documentation - - - - - + + + + + + +
    @@ -35,7 +37,9 @@

    Example:

    Note, pysnmp is a required dependency for SNMPDetect and is intentionally not included in netmiko requirements. So installation of pysnmp might be required.

    -Source code + +Expand source code +
    """
     This module is used to auto-detect the type of a device in order to automatically create a
     Netmiko connection.
    @@ -382,6 +386,7 @@ 

    Example:

    self._response_cache[oid] = snmp_response # See if we had a match + assert isinstance(snmp_response, str) if re.search(regex, snmp_response): assert isinstance(device_type, str) return device_type @@ -400,16 +405,16 @@

    Classes

    class SNMPDetect -(hostname, snmp_version='v3', snmp_port=161, community=None, user='', auth_key='', encrypt_key='', auth_proto='sha', encrypt_proto='aes128') +(hostname: str, snmp_version: str = 'v3', snmp_port: int = 161, community: Optional[str] = None, user: str = '', auth_key: str = '', encrypt_key: str = '', auth_proto: str = 'sha', encrypt_proto: str = 'aes128')
    -

    The SNMPDetect class tries to automatically determine the device type.

    +

    The SNMPDetect class tries to automatically determine the device type.

    Typically this will use the MIB-2 SysDescr and regular expressions.

    Parameters

    hostname : str
    The name or IP address of the hostname we want to guess the type
    -
    snmp_version : str, optional ('v1', 'v2c' or 'v3')
    +
    snmp_version : str, optional ('v1', 'v2c' or 'v3')
    The SNMP version that is running on the device (default: 'v3')
    snmp_port : int, optional
    The UDP port on which SNMP is listening (default: 161)
    @@ -421,9 +426,9 @@

    Parameters

    The SNMPv3 authentication key (default: '')
    encrypt_key : str, optional
    The SNMPv3 encryption key (default: '')
    -
    auth_proto : str, optional ('des', '3des', 'aes128', 'aes192', 'aes256')
    +
    auth_proto : str, optional ('des', '3des', 'aes128', 'aes192', 'aes256')
    The SNMPv3 authentication protocol (default: 'aes128')
    -
    encrypt_proto : str, optional ('sha', 'md5')
    +
    encrypt_proto : str, optional ('sha', 'md5')
    The SNMPv3 encryption protocol (default: 'sha')

    Attributes

    @@ -449,9 +454,11 @@

    Attributes

    Methods

    autodetect() -Try to determine the device type.

    +Try to determine the device type.

    -Source code + +Expand source code +
    class SNMPDetect(object):
         """
         The SNMPDetect class tries to automatically determine the device type.
    @@ -672,6 +679,7 @@ 

    Methods

    self._response_cache[oid] = snmp_response # See if we had a match + assert isinstance(snmp_response, str) if re.search(regex, snmp_response): assert isinstance(device_type, str) return device_type @@ -681,10 +689,10 @@

    Methods

    Methods

    -def autodetect(self) +def autodetect(self) ‑> Optional[str]
    -

    Try to guess the device_type using SNMP GET based on the SNMP_MAPPER dict. The type which +

    Try to guess the device_type using SNMP GET based on the SNMP_MAPPER dict. The type which is returned is directly matching the name in netmiko.ssh_dispatcher.CLASS_MAPPER_BASE dict.

    Thus you can use this name to retrieve automatically the right ConnectionClass

    @@ -692,9 +700,11 @@

    Returns

    potential_type : str
    The name of the device_type that must be running.
    -
    +
    -Source code + +Expand source code +
    def autodetect(self) -> Optional[str]:
         """
         Try to guess the device_type using SNMP GET based on the SNMP_MAPPER dict. The type which
    @@ -730,6 +740,7 @@ 

    Returns

    self._response_cache[oid] = snmp_response # See if we had a match + assert isinstance(snmp_response, str) if re.search(regex, snmp_response): assert isinstance(device_type, str) return device_type @@ -769,9 +780,7 @@

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/sophos/index.html b/docs/netmiko/sophos/index.html index 6b7b0b883..85d148422 100644 --- a/docs/netmiko/sophos/index.html +++ b/docs/netmiko/sophos/index.html @@ -3,15 +3,17 @@ - + netmiko.sophos API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.sophos

    -Source code + +Expand source code +
    from netmiko.sophos.sophos_sfos_ssh import SophosSfosSSH
     
     __all__ = ["SophosSfosSSH"]
    @@ -32,7 +36,7 @@

    Sub-modules

    netmiko.sophos.sophos_sfos_ssh
    -

    SophosXG (SFOS) Firewall support

    +

    SophosXG (SFOS) Firewall support

    @@ -45,10 +49,10 @@

    Classes

    class SophosSfosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Class for platforms that have no enable mode.

    +

    Class for platforms that have no enable mode.

    Netmiko translates the meaning of "enable" mode to be a proxy for "can go into config mode". In other words, that you ultimately have privileges to execute configuration changes.

    @@ -58,10 +62,10 @@

    Classes

    don't explicitly support enable mode.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -100,7 +104,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -145,12 +149,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -158,9 +162,11 @@

    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). -
    +

    -Source code + +Expand source code +
    class SophosSfosSSH(NoEnable, NoConfig, CiscoSSHConnection):
         def session_preparation(self) -> None:
             """Prepare the session after the connection has been established."""
    @@ -203,24 +209,28 @@ 

    Ancestors

    Methods

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

    Not Implemented

    +

    Not Implemented

    -Source code + +Expand source code +
    def save_config(self, *args: Any, **kwargs: Any) -> str:
         """Not Implemented"""
         raise NotImplementedError
    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read()
    @@ -330,9 +340,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/sophos/sophos_sfos_ssh.html b/docs/netmiko/sophos/sophos_sfos_ssh.html index 85d1af375..47f51f0ce 100644 --- a/docs/netmiko/sophos/sophos_sfos_ssh.html +++ b/docs/netmiko/sophos/sophos_sfos_ssh.html @@ -3,15 +3,17 @@ - + netmiko.sophos.sophos_sfos_ssh API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.sophos.sophos_sfos_ssh

    SophosXG (SFOS) Firewall support

    -Source code + +Expand source code +
    """SophosXG (SFOS) Firewall support"""
     import time
     from typing import Any
    @@ -75,10 +79,10 @@ 

    Classes

    class SophosSfosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Class for platforms that have no enable mode.

    +

    Class for platforms that have no enable mode.

    Netmiko translates the meaning of "enable" mode to be a proxy for "can go into config mode". In other words, that you ultimately have privileges to execute configuration changes.

    @@ -88,10 +92,10 @@

    Classes

    don't explicitly support enable mode.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -130,7 +134,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -175,12 +179,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -188,9 +192,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class SophosSfosSSH(NoEnable, NoConfig, CiscoSSHConnection):
         def session_preparation(self) -> None:
             """Prepare the session after the connection has been established."""
    @@ -233,24 +239,28 @@ 

    Ancestors

    Methods

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

    Not Implemented

    +

    Not Implemented

    -Source code + +Expand source code +
    def save_config(self, *args: Any, **kwargs: Any) -> str:
         """Not Implemented"""
         raise NotImplementedError
    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read()
    @@ -355,9 +365,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/ssh_auth.html b/docs/netmiko/ssh_auth.html index 3d3fe4ce8..db0413d5a 100644 --- a/docs/netmiko/ssh_auth.html +++ b/docs/netmiko/ssh_auth.html @@ -3,15 +3,17 @@ - + netmiko.ssh_auth API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.ssh_auth

    -Source code + +Expand source code +
    from typing import Any
     from paramiko import SSHClient
     
    @@ -49,10 +53,12 @@ 

    Classes

    class SSHClient_noauth
    -

    Set noauth when manually handling SSH authentication.

    -

    Create a new SSHClient.

    +

    Set noauth when manually handling SSH authentication.

    +

    Create a new SSHClient.

    -Source code + +Expand source code +
    class SSHClient_noauth(SSHClient):
         """Set noauth when manually handling SSH authentication."""
     
    @@ -93,9 +99,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/ssh_autodetect.html b/docs/netmiko/ssh_autodetect.html index 6b9969ef3..aae6d5ca3 100644 --- a/docs/netmiko/ssh_autodetect.html +++ b/docs/netmiko/ssh_autodetect.html @@ -3,16 +3,18 @@ - + netmiko.ssh_autodetect API documentation - - - - - + + + + + + +
    @@ -39,26 +41,25 @@

    Notes

    Examples

    Auto-detection section

    -
    >>> from netmiko.ssh_autodetect import SSHDetect
    +
    >>> from netmiko.ssh_autodetect import SSHDetect
     >>> from netmiko.ssh_dispatcher import ConnectHandler
     >>> remote_device = {'device_type': 'autodetect',
                          'host': 'remote.host',
    -
    -
    -                 'username': 'test',
    -                 'password': 'foo'}
    -
    +                     'username': 'test',
    +                     'password': 'foo'}
     >>> guesser = SSHDetect(**remote_device)
     >>> best_match = guesser.autodetect()
     >>> print(best_match) # Name of the best device_type to use further
     >>> print(guesser.potential_matches) # Dictionary of the whole matching result
     

    Netmiko connection creation section

    -
    >>> remote_device['device_type'] = best_match
    +
    >>> remote_device['device_type'] = best_match
     >>> connection = ConnectHandler(**remote_device)
     
    -Source code + +Expand source code +
    """
     The ssh_autodetect module is used to auto-detect the netmiko device_type to use to further initiate
     a new SSH connection with a remote host. This auto-detection is based on a unique class called
    @@ -560,10 +561,10 @@ 

    Classes

    class SSHDetect -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    The SSHDetect class tries to automatically guess the device type running on the SSH remote end. +

    The SSHDetect class tries to automatically guess the device type running on the SSH remote end. Be careful that the kwargs 'device_type' must be set to 'autodetect', otherwise it won't work at all.

    Parameters

    @@ -575,7 +576,7 @@

    Parameters

    Attributes

    -
    connection : TerminalServerSSH
    +
    connection : TerminalServerSSH
    A basic connection to the remote SSH end.
    potential_matches : dict
    Dict of (device_type, accuracy) that is populated through an interaction with the @@ -584,9 +585,11 @@

    Attributes

    Methods

    autodetect() Try to determine the device type.

    -

    Constructor of the SSHDetect class

    +

    Constructor of the SSHDetect class

    -Source code + +Expand source code +
    class SSHDetect(object):
         """
         The SSHDetect class tries to automatically guess the device type running on the SSH remote end.
    @@ -807,17 +810,19 @@ 

    Methods

    Methods

    -def autodetect(self) +def autodetect(self) ‑> Optional[str]
    -

    Try to guess the best 'device_type' based on patterns defined in SSH_MAPPER_BASE

    +

    Try to guess the best 'device_type' based on patterns defined in SSH_MAPPER_BASE

    Returns

    best_match : str or None
    The device type that is currently the best to use to interact with the device
    -
    +
    -Source code + +Expand source code +
    def autodetect(self) -> Union[str, None]:
         """
         Try to guess the best 'device_type' based on patterns defined in SSH_MAPPER_BASE
    @@ -892,9 +897,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/supermicro/index.html b/docs/netmiko/supermicro/index.html index 2e888cb54..7bb350bd8 100644 --- a/docs/netmiko/supermicro/index.html +++ b/docs/netmiko/supermicro/index.html @@ -3,15 +3,17 @@ - + netmiko.supermicro API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.supermicro

    -Source code + +Expand source code +
    from netmiko.supermicro.smci_smis import SmciSwitchSmisTelnet, SmciSwitchSmisSSH
     
     __all__ = ["SmciSwitchSmisSSH", "SmciSwitchSmisTelnet"]
    @@ -32,7 +36,7 @@

    Sub-modules

    netmiko.supermicro.smci_smis
    -
    +
    @@ -45,10 +49,10 @@

    Classes

    class SmciSwitchSmisSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Class for platforms that have no enable mode.

    +

    Class for platforms that have no enable mode.

    Netmiko translates the meaning of "enable" mode to be a proxy for "can go into config mode". In other words, that you ultimately have privileges to execute configuration changes.

    @@ -58,10 +62,10 @@

    Classes

    don't explicitly support enable mode.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -100,7 +104,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -145,12 +149,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -158,9 +162,11 @@

    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). -
    +

    -Source code + +Expand source code +
    class SmciSwitchSmisSSH(SmciSwitchSmisBase):
         pass
    @@ -222,10 +228,10 @@

    Inherited members

    class SmciSwitchSmisTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Class for platforms that have no enable mode.

    +

    Class for platforms that have no enable mode.

    Netmiko translates the meaning of "enable" mode to be a proxy for "can go into config mode". In other words, that you ultimately have privileges to execute configuration changes.

    @@ -235,10 +241,10 @@

    Inherited members

    don't explicitly support enable mode.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -277,7 +283,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -322,12 +328,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -335,9 +341,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class SmciSwitchSmisTelnet(SmciSwitchSmisBase):
         pass
    @@ -430,9 +438,7 @@

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/supermicro/smci_smis.html b/docs/netmiko/supermicro/smci_smis.html index 8a0bed97b..46ca4b754 100644 --- a/docs/netmiko/supermicro/smci_smis.html +++ b/docs/netmiko/supermicro/smci_smis.html @@ -3,15 +3,17 @@ - + netmiko.supermicro.smci_smis API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.supermicro.smci_smis

    -Source code + +Expand source code +
    from netmiko.cisco_base_connection import CiscoBaseConnection
     from netmiko.no_enable import NoEnable
     import time
    @@ -75,10 +79,10 @@ 

    Classes

    class SmciSwitchSmisBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Class for platforms that have no enable mode.

    +

    Class for platforms that have no enable mode.

    Netmiko translates the meaning of "enable" mode to be a proxy for "can go into config mode". In other words, that you ultimately have privileges to execute configuration changes.

    @@ -88,10 +92,10 @@

    Classes

    don't explicitly support enable mode.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -130,7 +134,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -175,12 +179,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -188,9 +192,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class SmciSwitchSmisBase(NoEnable, CiscoBaseConnection):
         def session_preparation(self) -> None:
             """Prepare the session after the connection has been established."""
    @@ -233,12 +239,14 @@ 

    Subclasses

    Methods

    -def save_config(self, cmd='write startup-config', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'write startup-config', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Save config

    +

    Save config

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "write startup-config",
    @@ -252,12 +260,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read(pattern=r"[>#]")
    @@ -321,10 +331,10 @@ 

    Inherited members

    class SmciSwitchSmisSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Class for platforms that have no enable mode.

    +

    Class for platforms that have no enable mode.

    Netmiko translates the meaning of "enable" mode to be a proxy for "can go into config mode". In other words, that you ultimately have privileges to execute configuration changes.

    @@ -334,10 +344,10 @@

    Inherited members

    don't explicitly support enable mode.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -376,7 +386,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -421,12 +431,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -434,9 +444,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class SmciSwitchSmisSSH(SmciSwitchSmisBase):
         pass
    @@ -498,10 +510,10 @@

    Inherited members

    class SmciSwitchSmisTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Class for platforms that have no enable mode.

    +

    Class for platforms that have no enable mode.

    Netmiko translates the meaning of "enable" mode to be a proxy for "can go into config mode". In other words, that you ultimately have privileges to execute configuration changes.

    @@ -511,10 +523,10 @@

    Inherited members

    don't explicitly support enable mode.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -553,7 +565,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -598,12 +610,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -611,9 +623,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class SmciSwitchSmisTelnet(SmciSwitchSmisBase):
         pass
    @@ -708,9 +722,7 @@

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/terminal_server/index.html b/docs/netmiko/terminal_server/index.html index a2f6147a1..90bf923ff 100644 --- a/docs/netmiko/terminal_server/index.html +++ b/docs/netmiko/terminal_server/index.html @@ -3,15 +3,17 @@ - + netmiko.terminal_server API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.terminal_server

    -Source code + +Expand source code +
    from netmiko.terminal_server.terminal_server import TerminalServerSSH
     from netmiko.terminal_server.terminal_server import TerminalServerTelnet
     
    @@ -33,7 +37,7 @@ 

    Sub-modules

    netmiko.terminal_server.terminal_server
    -

    Generic Terminal Server driver.

    +

    Generic Terminal Server driver.

    @@ -46,16 +50,16 @@

    Classes

    class TerminalServerSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Generic Terminal Server driver SSH.

    +

    Generic Terminal Server driver SSH.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -94,7 +98,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -139,12 +143,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -152,9 +156,11 @@

    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). -
    +

    -Source code + +Expand source code +
    class TerminalServerSSH(TerminalServer):
         """Generic Terminal Server driver SSH."""
     
    @@ -216,16 +222,16 @@ 

    Inherited members

    class TerminalServerTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Generic Terminal Server driver telnet.

    +

    Generic Terminal Server driver telnet.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -264,7 +270,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -309,12 +315,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -322,9 +328,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class TerminalServerTelnet(TerminalServer):
         """Generic Terminal Server driver telnet."""
     
    @@ -343,12 +351,14 @@ 

    Ancestors

    Methods

    -def std_login(self, *args, **kwargs) +def std_login(self, *args: Any, **kwargs: Any) ‑> str
    -
    +
    -Source code + +Expand source code +
    def std_login(self, *args: Any, **kwargs: Any) -> str:
         return super().telnet_login(*args, **kwargs)
    @@ -439,9 +449,7 @@

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/terminal_server/terminal_server.html b/docs/netmiko/terminal_server/terminal_server.html index 609ba1d99..3ebdc59e0 100644 --- a/docs/netmiko/terminal_server/terminal_server.html +++ b/docs/netmiko/terminal_server/terminal_server.html @@ -3,15 +3,17 @@ - + netmiko.terminal_server.terminal_server API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.terminal_server.terminal_server

    Generic Terminal Server driver.

    -Source code + +Expand source code +
    """Generic Terminal Server driver."""
     from typing import Any
     
    @@ -69,18 +73,18 @@ 

    Classes

    class TerminalServer -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Generic Terminal Server driver.

    +

    Generic Terminal Server driver.

    Allow direct write_channel / read_channel operations without session_preparation causing an exception.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -119,7 +123,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -164,12 +168,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -177,9 +181,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class TerminalServer(BaseConnection):
         """Generic Terminal Server driver.
     
    @@ -203,12 +209,14 @@ 

    Subclasses

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Do nothing here; base_prompt is not set; paging is not disabled.

    +

    Do nothing here; base_prompt is not set; paging is not disabled.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Do nothing here; base_prompt is not set; paging is not disabled."""
         pass
    @@ -265,16 +273,16 @@

    Inherited members

    class TerminalServerSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Generic Terminal Server driver SSH.

    +

    Generic Terminal Server driver SSH.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -313,7 +321,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -358,12 +366,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -371,9 +379,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class TerminalServerSSH(TerminalServer):
         """Generic Terminal Server driver SSH."""
     
    @@ -435,16 +445,16 @@ 

    Inherited members

    class TerminalServerTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Generic Terminal Server driver telnet.

    +

    Generic Terminal Server driver telnet.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -483,7 +493,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -528,12 +538,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -541,9 +551,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class TerminalServerTelnet(TerminalServer):
         """Generic Terminal Server driver telnet."""
     
    @@ -562,12 +574,14 @@ 

    Ancestors

    Methods

    -def std_login(self, *args, **kwargs) +def std_login(self, *args: Any, **kwargs: Any) ‑> str
    -
    +
    -Source code + +Expand source code +
    def std_login(self, *args: Any, **kwargs: Any) -> str:
         return super().telnet_login(*args, **kwargs)
    @@ -659,9 +673,7 @@

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/tplink/index.html b/docs/netmiko/tplink/index.html index dd01b0d60..e08b5783e 100644 --- a/docs/netmiko/tplink/index.html +++ b/docs/netmiko/tplink/index.html @@ -3,15 +3,17 @@ - + netmiko.tplink API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.tplink

    -Source code + +Expand source code +
    from netmiko.tplink.tplink_jetstream import TPLinkJetStreamSSH, TPLinkJetStreamTelnet
     
     __all__ = ["TPLinkJetStreamSSH", "TPLinkJetStreamTelnet"]
    @@ -32,7 +36,7 @@

    Sub-modules

    netmiko.tplink.tplink_jetstream
    -
    +
    @@ -45,16 +49,16 @@

    Classes

    class TPLinkJetStreamSSH -(**kwargs) +(**kwargs: Any)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -93,7 +97,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -138,12 +142,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -151,9 +155,11 @@

    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). -
    +

    -Source code + +Expand source code +
    class TPLinkJetStreamSSH(TPLinkJetStreamBase):
         def __init__(self, **kwargs: Any) -> None:
             setattr(dsa, "_check_dsa_parameters", self._override_check_dsa_parameters)
    @@ -241,16 +247,16 @@ 

    Inherited members

    class TPLinkJetStreamTelnet -(**kwargs) +(**kwargs: Any)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -289,7 +295,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -334,12 +340,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -347,9 +353,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class TPLinkJetStreamTelnet(TPLinkJetStreamBase):
         def telnet_login(
             self,
    @@ -380,12 +388,14 @@ 

    Ancestors

    Methods

    -def telnet_login(self, pri_prompt_terminator='#', alt_prompt_terminator='>', username_pattern='User:', pwd_pattern='Password:', delay_factor=1.0, max_loops=60) +def telnet_login(self, pri_prompt_terminator: str = '#', alt_prompt_terminator: str = '>', username_pattern: str = 'User:', pwd_pattern: str = 'Password:', delay_factor: float = 1.0, max_loops: int = 60) ‑> str
    -

    Telnet login: can be username/password or just password.

    +

    Telnet login: can be username/password or just password.

    -Source code + +Expand source code +
    def telnet_login(
         self,
         pri_prompt_terminator: str = "#",
    @@ -491,9 +501,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/tplink/tplink_jetstream.html b/docs/netmiko/tplink/tplink_jetstream.html index f571e7c33..7e6df6b8c 100644 --- a/docs/netmiko/tplink/tplink_jetstream.html +++ b/docs/netmiko/tplink/tplink_jetstream.html @@ -3,15 +3,17 @@ - + netmiko.tplink.tplink_jetstream API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.tplink.tplink_jetstream

    -Source code + +Expand source code +
    import re
     import time
     from typing import Any, Optional
    @@ -133,7 +137,10 @@ 

    Module netmiko.tplink.tplink_jetstream

    return output def check_config_mode( - self, check_string: str = "(config", pattern: str = r"#" + self, + check_string: str = "(config", + pattern: str = r"#", + force_regex: bool = False, ) -> bool: """Check whether device is in configuration mode. Return a boolean.""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -226,16 +233,16 @@

    Classes

    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -274,7 +281,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -319,12 +326,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -332,9 +339,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class TPLinkJetStreamBase(CiscoSSHConnection):
         def __init__(self, **kwargs: Any) -> None:
             # TP-Link doesn't have a way to set terminal width which breaks cmd_verify
    @@ -434,7 +443,10 @@ 

    Classes

    return output def check_config_mode( - self, check_string: str = "(config", pattern: str = r"#" + self, + check_string: str = "(config", + pattern: str = r"#", + force_regex: bool = False, ) -> bool: """Check whether device is in configuration mode. Return a boolean.""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -478,29 +490,36 @@

    Subclasses

    Methods

    -

    Check whether device is in configuration mode. Return a boolean.

    +

    Check whether device is in configuration mode. Return a boolean.

    -Source code + +Expand source code +
    def check_config_mode(
    -    self, check_string: str = "(config", pattern: str = r"#"
    +    self,
    +    check_string: str = "(config",
    +    pattern: str = r"#",
    +    force_regex: bool = False,
     ) -> bool:
         """Check whether device is in configuration mode. Return a boolean."""
         return super().check_config_mode(check_string=check_string, pattern=pattern)
    -

    TPLink JetStream requires you to first execute "enable" and then execute "enable-admin". +

    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.

    +enable all functions.

    -Source code + +Expand source code +
    def enable(
         self,
         cmd: str = "",
    @@ -544,15 +563,17 @@ 

    Methods

    -

    Exit config mode.

    +

    Exit config mode.

    Like the Mellanox equipment, the TP-Link Jetstream does not support a single command to completely exit the configuration mode.

    -

    Consequently, need to keep checking and sending "exit".

    +

    Consequently, need to keep checking and sending "exit".

    -Source code + +Expand source code +
    def exit_config_mode(self, exit_config: str = "exit", pattern: str = r"#") -> str:
         """
         Exit config mode.
    @@ -580,12 +601,14 @@ 

    Methods

    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """
         Prepare the session after the connection has been established.
    @@ -603,17 +626,19 @@ 

    Methods

    -

    Sets self.base_prompt

    +

    Sets self.base_prompt

    Used as delimiter for stripping of trailing prompt in output.

    Should be set to something that is general and applies in multiple contexts. For TP-Link this will be the router prompt with > or # stripped off.

    -

    This will be set on logging in, but not when entering system-view

    +

    This will be set on logging in, but not when entering system-view

    -Source code + +Expand source code +
    def set_base_prompt(
         self,
         pri_prompt_terminator: str = ">",
    @@ -687,16 +712,16 @@ 

    Inherited members

    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -735,7 +760,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -780,12 +805,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -793,9 +818,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class TPLinkJetStreamSSH(TPLinkJetStreamBase):
         def __init__(self, **kwargs: Any) -> None:
             setattr(dsa, "_check_dsa_parameters", self._override_check_dsa_parameters)
    @@ -883,16 +910,16 @@ 

    Inherited members

    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -931,7 +958,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -976,12 +1003,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -989,9 +1016,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class TPLinkJetStreamTelnet(TPLinkJetStreamBase):
         def telnet_login(
             self,
    @@ -1022,12 +1051,14 @@ 

    Ancestors

    Methods

    -

    Telnet login: can be username/password or just password.

    +

    Telnet login: can be username/password or just password.

    -Source code + +Expand source code +
    def telnet_login(
         self,
         pri_prompt_terminator: str = "#",
    @@ -1138,9 +1169,7 @@ 

    - - \ No newline at end of file diff --git a/docs/netmiko/ubiquiti/edge_ssh.html b/docs/netmiko/ubiquiti/edge_ssh.html index cfc876d11..505160bf5 100644 --- a/docs/netmiko/ubiquiti/edge_ssh.html +++ b/docs/netmiko/ubiquiti/edge_ssh.html @@ -3,15 +3,17 @@ - + netmiko.ubiquiti.edge_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.ubiquiti.edge_ssh

    -Source code + +Expand source code +
    import time
     from netmiko.cisco_base_connection import CiscoSSHConnection
     
    @@ -47,7 +51,9 @@ 

    Module netmiko.ubiquiti.edge_ssh

    time.sleep(0.3 * self.global_delay_factor) self.clear_buffer() - def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool: + 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.""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -118,18 +124,18 @@

    Classes

    class UbiquitiEdgeSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Implements support for Ubiquity EdgeSwitch devices.

    +

    Implements support for Ubiquity EdgeSwitch devices.

    Mostly conforms to Cisco IOS style syntax with a few minor changes.

    This is NOT for EdgeRouter devices.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -168,7 +174,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -213,12 +219,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -226,9 +232,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class UbiquitiEdgeSSH(CiscoSSHConnection):
         """
         Implements support for Ubiquity EdgeSwitch devices.
    @@ -250,7 +258,9 @@ 

    Classes

    time.sleep(0.3 * self.global_delay_factor) self.clear_buffer() - def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool: + 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.""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -322,24 +332,30 @@

    Subclasses

    Methods

    -def check_config_mode(self, check_string=')#', pattern='') +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.

    +

    Checks if the device is in configuration mode or not.

    -Source code -
    def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool:
    +
    +Expand source code
    +
    +
    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."""
         return super().check_config_mode(check_string=check_string, pattern=pattern)
    -def config_mode(self, config_command='configure', pattern='', re_flags=0) +def config_mode(self, config_command: str = 'configure', pattern: str = '', re_flags: int = 0) ‑> str
    -

    Enter configuration mode.

    +

    Enter configuration mode.

    -Source code + +Expand source code +
    def config_mode(
         self, config_command: str = "configure", pattern: str = "", re_flags: int = 0
     ) -> str:
    @@ -350,39 +366,45 @@ 

    Methods

    -def exit_config_mode(self, exit_config='exit', pattern='#.*') +def exit_config_mode(self, exit_config: str = 'exit', pattern: str = '#.*') ‑> str
    -

    Exit configuration mode.

    +

    Exit configuration mode.

    -Source code + +Expand source code +
    def exit_config_mode(self, exit_config: str = "exit", pattern: str = r"#.*") -> str:
         """Exit configuration mode."""
         return super().exit_config_mode(exit_config=exit_config, pattern=pattern)
    -def exit_enable_mode(self, exit_command='exit') +def exit_enable_mode(self, exit_command: str = 'exit') ‑> str
    -

    Exit enable mode.

    +

    Exit enable mode.

    -Source code + +Expand source code +
    def exit_enable_mode(self, exit_command: str = "exit") -> str:
         """Exit enable mode."""
         return super().exit_enable_mode(exit_command=exit_command)
    -def save_config(self, cmd='write memory', confirm=True, confirm_response='y') +def save_config(self, cmd: str = 'write memory', confirm: bool = True, confirm_response: str = 'y') ‑> str
    -

    EdgeSwitch might do the following:

    +

    EdgeSwitch might do the following:

    Are you sure you want to save? (y/n) y

    It is not clear to me that it always does this (or sometimes doesn't).

    -

    Consequently, save_config() handles both cases.

    +

    Consequently, save_config() handles both cases.

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "write memory",
    @@ -500,9 +522,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/ubiquiti/edgerouter_ssh.html b/docs/netmiko/ubiquiti/edgerouter_ssh.html index ddb2238a8..0808fa794 100644 --- a/docs/netmiko/ubiquiti/edgerouter_ssh.html +++ b/docs/netmiko/ubiquiti/edgerouter_ssh.html @@ -3,15 +3,17 @@ - + netmiko.ubiquiti.edgerouter_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.ubiquiti.edgerouter_ssh

    -Source code + +Expand source code +
    import time
     from netmiko.vyos.vyos_ssh import VyOSSSH
     
    @@ -62,16 +66,16 @@ 

    Classes

    class UbiquitiEdgeRouterSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Implement methods for interacting with EdgeOS EdgeRouter network devices.

    +

    Implement methods for interacting with EdgeOS EdgeRouter network devices.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -110,7 +114,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -155,12 +159,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -168,9 +172,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class UbiquitiEdgeRouterSSH(VyOSSSH):
         """Implement methods for interacting with EdgeOS EdgeRouter network devices."""
     
    @@ -277,9 +283,7 @@ 

    - - \ No newline at end of file diff --git a/docs/netmiko/ubiquiti/index.html b/docs/netmiko/ubiquiti/index.html index c5cb7867c..c55b63e7d 100644 --- a/docs/netmiko/ubiquiti/index.html +++ b/docs/netmiko/ubiquiti/index.html @@ -3,15 +3,17 @@ - + netmiko.ubiquiti API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.ubiquiti

    -Source code + +Expand source code +
    from netmiko.ubiquiti.edge_ssh import UbiquitiEdgeSSH
     from netmiko.ubiquiti.edgerouter_ssh import UbiquitiEdgeRouterSSH
     from netmiko.ubiquiti.unifiswitch_ssh import UbiquitiUnifiSwitchSSH
    @@ -38,15 +42,15 @@ 

    Sub-modules

    netmiko.ubiquiti.edge_ssh
    -
    +
    netmiko.ubiquiti.edgerouter_ssh
    -
    +
    netmiko.ubiquiti.unifiswitch_ssh
    -
    +
    @@ -59,16 +63,16 @@

    Classes

    class UbiquitiEdgeRouterSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Implement methods for interacting with EdgeOS EdgeRouter network devices.

    +

    Implement methods for interacting with EdgeOS EdgeRouter network devices.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -107,7 +111,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -152,12 +156,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -165,9 +169,11 @@

    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). -
    +

    -Source code + +Expand source code +
    class UbiquitiEdgeRouterSSH(VyOSSSH):
         """Implement methods for interacting with EdgeOS EdgeRouter network devices."""
     
    @@ -251,18 +257,18 @@ 

    Inherited members

    class UbiquitiEdgeSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Implements support for Ubiquity EdgeSwitch devices.

    +

    Implements support for Ubiquity EdgeSwitch devices.

    Mostly conforms to Cisco IOS style syntax with a few minor changes.

    This is NOT for EdgeRouter devices.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -301,7 +307,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -346,12 +352,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -359,9 +365,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class UbiquitiEdgeSSH(CiscoSSHConnection):
         """
         Implements support for Ubiquity EdgeSwitch devices.
    @@ -383,7 +391,9 @@ 

    Inherited members

    time.sleep(0.3 * self.global_delay_factor) self.clear_buffer() - def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool: + 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.""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -455,24 +465,30 @@

    Subclasses

    Methods

    -def check_config_mode(self, check_string=')#', pattern='') +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.

    +

    Checks if the device is in configuration mode or not.

    -Source code -
    def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool:
    +
    +Expand source code
    +
    +
    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."""
         return super().check_config_mode(check_string=check_string, pattern=pattern)
    -def config_mode(self, config_command='configure', pattern='', re_flags=0) +def config_mode(self, config_command: str = 'configure', pattern: str = '', re_flags: int = 0) ‑> str
    -

    Enter configuration mode.

    +

    Enter configuration mode.

    -Source code + +Expand source code +
    def config_mode(
         self, config_command: str = "configure", pattern: str = "", re_flags: int = 0
     ) -> str:
    @@ -483,39 +499,45 @@ 

    Methods

    -def exit_config_mode(self, exit_config='exit', pattern='#.*') +def exit_config_mode(self, exit_config: str = 'exit', pattern: str = '#.*') ‑> str
    -

    Exit configuration mode.

    +

    Exit configuration mode.

    -Source code + +Expand source code +
    def exit_config_mode(self, exit_config: str = "exit", pattern: str = r"#.*") -> str:
         """Exit configuration mode."""
         return super().exit_config_mode(exit_config=exit_config, pattern=pattern)
    -def exit_enable_mode(self, exit_command='exit') +def exit_enable_mode(self, exit_command: str = 'exit') ‑> str
    -

    Exit enable mode.

    +

    Exit enable mode.

    -Source code + +Expand source code +
    def exit_enable_mode(self, exit_command: str = "exit") -> str:
         """Exit enable mode."""
         return super().exit_enable_mode(exit_command=exit_command)
    -def save_config(self, cmd='write memory', confirm=True, confirm_response='y') +def save_config(self, cmd: str = 'write memory', confirm: bool = True, confirm_response: str = 'y') ‑> str
    -

    EdgeSwitch might do the following:

    +

    EdgeSwitch might do the following:

    Are you sure you want to save? (y/n) y

    It is not clear to me that it always does this (or sometimes doesn't).

    -

    Consequently, save_config() handles both cases.

    +

    Consequently, save_config() handles both cases.

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "write memory",
    @@ -603,18 +625,18 @@ 

    Inherited members

    class UbiquitiUnifiSwitchSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Implements support for Ubiquity EdgeSwitch devices.

    +

    Implements support for Ubiquity EdgeSwitch devices.

    Mostly conforms to Cisco IOS style syntax with a few minor changes.

    This is NOT for EdgeRouter devices.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -653,7 +675,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -698,12 +720,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -711,9 +733,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class UbiquitiUnifiSwitchSSH(UbiquitiEdgeSSH):
         def session_preparation(self) -> None:
             """
    @@ -761,16 +785,18 @@ 

    Ancestors

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established. +

    Prepare the session after the connection has been established. When SSHing to a UniFi switch, the session initially starts at a Linux shell. Nothing interesting can be done in this environment, however, running telnet localhost drops the session to a more familiar -environment.

    +environment.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """
         Prepare the session after the connection has been established.
    @@ -891,9 +917,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/ubiquiti/unifiswitch_ssh.html b/docs/netmiko/ubiquiti/unifiswitch_ssh.html index 13ea4fe67..e69e5bd1b 100644 --- a/docs/netmiko/ubiquiti/unifiswitch_ssh.html +++ b/docs/netmiko/ubiquiti/unifiswitch_ssh.html @@ -3,15 +3,17 @@ - + netmiko.ubiquiti.unifiswitch_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.ubiquiti.unifiswitch_ssh

    -Source code + +Expand source code +
    import time
     from netmiko.ubiquiti.edge_ssh import UbiquitiEdgeSSH
     
    @@ -75,18 +79,18 @@ 

    Classes

    class UbiquitiUnifiSwitchSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Implements support for Ubiquity EdgeSwitch devices.

    +

    Implements support for Ubiquity EdgeSwitch devices.

    Mostly conforms to Cisco IOS style syntax with a few minor changes.

    This is NOT for EdgeRouter devices.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -125,7 +129,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -170,12 +174,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -183,9 +187,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class UbiquitiUnifiSwitchSSH(UbiquitiEdgeSSH):
         def session_preparation(self) -> None:
             """
    @@ -233,16 +239,18 @@ 

    Ancestors

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established. +

    Prepare the session after the connection has been established. When SSHing to a UniFi switch, the session initially starts at a Linux shell. Nothing interesting can be done in this environment, however, running telnet localhost drops the session to a more familiar -environment.

    +environment.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """
         Prepare the session after the connection has been established.
    @@ -343,9 +351,7 @@ 

    - - \ No newline at end of file diff --git a/docs/netmiko/utilities.html b/docs/netmiko/utilities.html index 0b1e54edc..f1e75721c 100644 --- a/docs/netmiko/utilities.html +++ b/docs/netmiko/utilities.html @@ -3,15 +3,17 @@ - + netmiko.utilities API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.utilities

    Miscellaneous utility functions.

    -Source code + +Expand source code +
    """Miscellaneous utility functions."""
     from typing import (
         Any,
    @@ -323,7 +327,7 @@ 

    Module netmiko.utilities

    else: # Try 'pip installed' ntc-templates try: - with pkg_resources.path( # type: ignore + with pkg_resources.path( package="ntc_templates", resource="parse.py" ) as posix_path: # Example: /opt/venv/netmiko/lib/python3.8/site-packages/ntc_templates/templates @@ -700,19 +704,21 @@

    Module netmiko.utilities

    Functions

    -def calc_old_timeout(max_loops=None, delay_factor=None, loop_delay=0.2, old_timeout=100) +def calc_old_timeout(max_loops: Optional[int] = None, delay_factor: Optional[float] = None, loop_delay: float = 0.2, old_timeout: int = 100) ‑> float
    -

    loop_delay is .2 in Netmiko 3.x +

    loop_delay is .2 in Netmiko 3.x delay_factor would multiple the loop delay Number of loops was typically 500

    Thus each loop would sleep (loop_delay * delay_factor) seconds That sleep would happen max_loops time

    Formula is (loop_delay * delay_factor) * max_loops

    There was a way Netmiko's self.timeout could override the default settings and essentially be -used to adjust max_loops (this was probably rarely used).

    +used to adjust max_loops (this was probably rarely used).

    -Source code + +Expand source code +
    def calc_old_timeout(
         max_loops: Optional[int] = None,
         delay_factor: Optional[float] = None,
    @@ -744,12 +750,14 @@ 

    Functions

    -def check_serial_port(name) +def check_serial_port(name: str) ‑> str
    -

    returns valid COM Port.

    +

    returns valid COM Port.

    -Source code + +Expand source code +
    def check_serial_port(name: str) -> str:
         """returns valid COM Port."""
     
    @@ -775,12 +783,14 @@ 

    Functions

    -def clitable_to_dict(cli_table) +def clitable_to_dict(cli_table: textfsm.clitable.CliTable) ‑> List[Dict[str, str]]
    -

    Converts TextFSM cli_table object to list of dictionaries.

    +

    Converts TextFSM cli_table object to list of dictionaries.

    -Source code + +Expand source code +
    def clitable_to_dict(cli_table: clitable.CliTable) -> List[Dict[str, str]]:
         """Converts TextFSM cli_table object to list of dictionaries."""
         return_list = []
    @@ -793,12 +803,14 @@ 

    Functions

    -def display_inventory(my_devices) +def display_inventory(my_devices: Dict[str, Union[List[str], Dict[str, Any]]]) ‑> None
    -

    Print out inventory devices and groups.

    +

    Print out inventory devices and groups.

    -Source code + +Expand source code +
    def display_inventory(my_devices: Dict[str, Union[List[str], Dict[str, Any]]]) -> None:
         """Print out inventory devices and groups."""
         inventory_groups = ["all"]
    @@ -824,12 +836,14 @@ 

    Functions

    -def ensure_dir_exists(verify_dir) +def ensure_dir_exists(verify_dir: str) ‑> None
    -

    Ensure directory exists. Create if necessary.

    +

    Ensure directory exists. Create if necessary.

    -Source code + +Expand source code +
    def ensure_dir_exists(verify_dir: str) -> None:
         """Ensure directory exists. Create if necessary."""
         if not os.path.exists(verify_dir):
    @@ -843,12 +857,14 @@ 

    Functions

    -def f_exec_time(func) +def f_exec_time(func: ~F) ‑> ~F
    -
    +
    -Source code + +Expand source code +
    def f_exec_time(func: F) -> F:
         @functools.wraps(func)
         def wrapper_decorator(*args: Any, **kwargs: Any) -> Any:
    @@ -862,17 +878,19 @@ 

    Functions

    -def find_cfg_file(file_name=None) +def find_cfg_file(file_name: Union[str, bytes, ForwardRef('PathLike[Any]'), ForwardRef(None)] = None) ‑> Union[str, bytes, PathLike[Any]]
    -

    Search for netmiko_tools inventory file in the following order: +

    Search for netmiko_tools inventory file in the following order: NETMIKO_TOOLS_CFG environment variable Current directory Home directory Look for file named: .netmiko.yml or netmiko.yml -Also allow NETMIKO_TOOLS_CFG to point directly at a file

    +Also allow NETMIKO_TOOLS_CFG to point directly at a file

    -Source code + +Expand source code +
    def find_cfg_file(
         file_name: Union[str, bytes, "PathLike[Any]", None] = None
     ) -> Union[str, bytes, "PathLike[Any]"]:
    @@ -903,12 +921,14 @@ 

    Functions

    -def find_netmiko_dir() +def find_netmiko_dir() ‑> Tuple[str, str]
    -

    Check environment first, then default dir

    +

    Check environment first, then default dir

    -Source code + +Expand source code +
    def find_netmiko_dir() -> Tuple[str, str]:
         """Check environment first, then default dir"""
         try:
    @@ -923,14 +943,16 @@ 

    Functions

    -def get_structured_data(raw_output, platform=None, command=None, template=None) +def get_structured_data(raw_output: str, platform: Optional[str] = None, command: Optional[str] = None, template: Optional[str] = None) ‑> Union[str, List[Dict[str, str]]]
    -

    Convert raw CLI output to structured data using TextFSM template.

    +

    Convert raw CLI output to structured data using TextFSM template.

    You can use a straight TextFSM file i.e. specify "template". If no template is specified, -then you must use an CliTable index file.

    +then you must use an CliTable index file.

    -Source code + +Expand source code +
    def get_structured_data_textfsm(
         raw_output: str,
         platform: Optional[str] = None,
    @@ -976,12 +998,14 @@ 

    Functions

    -def get_structured_data_genie(raw_output, platform, command) +def get_structured_data_genie(raw_output: str, platform: str, command: str) ‑> Union[str, Dict[str, Any]]
    -
    +
    -Source code + +Expand source code +
    def get_structured_data_genie(
         raw_output: str, platform: str, command: str
     ) -> Union[str, Dict[str, Any]]:
    @@ -1033,14 +1057,16 @@ 

    Functions

    -def get_structured_data_textfsm(raw_output, platform=None, command=None, template=None) +def get_structured_data_textfsm(raw_output: str, platform: Optional[str] = None, command: Optional[str] = None, template: Optional[str] = None) ‑> Union[str, List[Dict[str, str]]]
    -

    Convert raw CLI output to structured data using TextFSM template.

    +

    Convert raw CLI output to structured data using TextFSM template.

    You can use a straight TextFSM file i.e. specify "template". If no template is specified, -then you must use an CliTable index file.

    +then you must use an CliTable index file.

    -Source code + +Expand source code +
    def get_structured_data_textfsm(
         raw_output: str,
         platform: Optional[str] = None,
    @@ -1086,13 +1112,15 @@ 

    Functions

    -def get_structured_data_ttp(raw_output, template) +def get_structured_data_ttp(raw_output: str, template: str) ‑> Union[str, List[Any]]
    -

    Convert raw CLI output to structured data using TTP template.

    -

    You can use a straight TextFSM file i.e. specify "template"

    +

    Convert raw CLI output to structured data using TTP template.

    +

    You can use a straight TextFSM file i.e. specify "template"

    -Source code + +Expand source code +
    def get_structured_data_ttp(raw_output: str, template: str) -> Union[str, List[Any]]:
         """
         Convert raw CLI output to structured data using TTP template.
    @@ -1113,18 +1141,20 @@ 

    Functions

    -def get_template_dir() +def get_template_dir() ‑> str
    -

    Find and return the directory containing the TextFSM index file.

    +

    Find and return the directory containing the TextFSM index file.

    Order of preference is: 1) Find directory in NET_TEXTFSM Environment Variable. 2) Check for pip installed ntc-templates location in this environment. 3) ~/ntc-templates/ntc_templates/templates.

    If index file is not found in any of these locations, raise ValueError

    -

    :return: directory containing the TextFSM index file

    +

    :return: directory containing the TextFSM index file

    -Source code + +Expand source code +
    def get_template_dir(_skip_ntc_package: bool = False) -> str:
         """
         Find and return the directory containing the TextFSM index file.
    @@ -1162,7 +1192,7 @@ 

    Functions

    else: # Try 'pip installed' ntc-templates try: - with pkg_resources.path( # type: ignore + with pkg_resources.path( package="ntc_templates", resource="parse.py" ) as posix_path: # Example: /opt/venv/netmiko/lib/python3.8/site-packages/ntc_templates/templates @@ -1185,12 +1215,14 @@

    Functions

    -def load_devices(file_name=None) +def load_devices(file_name: Union[str, bytes, ForwardRef('PathLike[Any]'), ForwardRef(None)] = None) ‑> Any
    -

    Find and load .netmiko.yml file.

    +

    Find and load .netmiko.yml file.

    -Source code + +Expand source code +
    def load_devices(file_name: Union[str, bytes, "PathLike[Any]", None] = None) -> Any:
         """Find and load .netmiko.yml file."""
         yaml_devices_file = find_cfg_file(file_name)
    @@ -1198,12 +1230,14 @@ 

    Functions

    -def load_yaml_file(yaml_file) +def load_yaml_file(yaml_file: Union[str, bytes, ForwardRef('PathLike[Any]')]) ‑> Any
    -

    Read YAML file.

    +

    Read YAML file.

    -Source code + +Expand source code +
    def load_yaml_file(yaml_file: Union[str, bytes, "PathLike[Any]"]) -> Any:
         """Read YAML file."""
         try:
    @@ -1218,12 +1252,14 @@ 

    Functions

    -def m_exec_time(func) +def m_exec_time(func: ~F) ‑> ~F
    -
    +
    -Source code + +Expand source code +
    def m_exec_time(func: F) -> F:
         @functools.wraps(func)
         def wrapper_decorator(self: Any, *args: Any, **kwargs: Any) -> Any:
    @@ -1238,15 +1274,17 @@ 

    Functions

    -def nokia_context_filter(data, re_flags=re.MULTILINE) +def nokia_context_filter(data: str, re_flags: int = re.MULTILINE) ‑> str
    -

    Nokia context from string. Examples:

    +

    Nokia context from string. Examples:

    (ro)[]

    (ex)[configure router "Base" bgp]

    -

    Converted over to a standalone function for easier unit testing.

    +

    Converted over to a standalone function for easier unit testing.

    -Source code + +Expand source code +
    def nokia_context_filter(data: str, re_flags: int = re.M) -> str:
         """
         Nokia context from string. Examples:
    @@ -1262,12 +1300,14 @@ 

    Functions

    -def obtain_all_devices(my_devices) +def obtain_all_devices(my_devices: Dict[str, Union[List[str], Dict[str, Any]]]) ‑> Dict[str, Dict[str, Any]]
    -

    Dynamically create 'all' group.

    +

    Dynamically create 'all' group.

    -Source code + +Expand source code +
    def obtain_all_devices(
         my_devices: Dict[str, Union[List[str], Dict[str, Any]]]
     ) -> Dict[str, Dict[str, Any]]:
    @@ -1281,12 +1321,14 @@ 

    Functions

    -def obtain_netmiko_filename(device_name) +def obtain_netmiko_filename(device_name: str) ‑> str
    -

    Create file name based on device_name.

    +

    Create file name based on device_name.

    -Source code + +Expand source code +
    def obtain_netmiko_filename(device_name: str) -> str:
         """Create file name based on device_name."""
         _, netmiko_full_dir = find_netmiko_dir()
    @@ -1294,16 +1336,18 @@ 

    Functions

    -def run_ttp_template(connection, template, res_kwargs, **kwargs) +def run_ttp_template(connection: BaseConnection, template: Union[str, bytes, ForwardRef('PathLike[Any]')], res_kwargs: Dict[str, Any], **kwargs: Any) ‑> Any
    -

    Helper function to run TTP template parsing.

    +

    Helper function to run TTP template parsing.

    :param connection: Netmiko connection object

    :param template: TTP template

    :param res_kwargs: **res_kwargs arguments for TTP result method

    -

    :param kwargs: **kwargs for TTP object instantiation

    +

    :param kwargs: **kwargs for TTP object instantiation

    -Source code + +Expand source code +
    def run_ttp_template(
         connection: "BaseConnection",
         template: Union[str, bytes, "PathLike[Any]"],
    @@ -1373,12 +1417,14 @@ 

    Functions

    -def select_cmd_verify(func) +def select_cmd_verify(func: ~F) ‑> ~F
    -

    Override function cmd_verify argument with global setting.

    +

    Override function cmd_verify argument with global setting.

    -Source code + +Expand source code +
    def select_cmd_verify(func: F) -> F:
         """Override function cmd_verify argument with global setting."""
     
    @@ -1392,13 +1438,15 @@ 

    Functions

    -def structured_data_converter(raw_data, command, platform, use_textfsm=False, use_ttp=False, use_genie=False, textfsm_template=None, ttp_template=None) +def structured_data_converter(raw_data: str, command: str, platform: str, use_textfsm: bool = False, use_ttp: bool = False, use_genie: bool = False, textfsm_template: Optional[str] = None, ttp_template: Optional[str] = None) ‑> Union[str, List[Any], Dict[str, Any]]
    -

    Try structured data converters in the following order: TextFSM, TTP, Genie.

    -

    Return the first structured data found, else return the raw_data as-is.

    +

    Try structured data converters in the following order: TextFSM, TTP, Genie.

    +

    Return the first structured data found, else return the raw_data as-is.

    -Source code + +Expand source code +
    def structured_data_converter(
         raw_data: str,
         command: str,
    @@ -1446,12 +1494,14 @@ 

    Functions

    -def write_bytes(out_data, encoding='ascii') +def write_bytes(out_data: ~AnyStr, encoding: str = 'ascii') ‑> bytes
    -

    Legacy for Python2 and Python3 compatible byte stream.

    +

    Legacy for Python2 and Python3 compatible byte stream.

    -Source code + +Expand source code +
    def write_bytes(out_data: AnyStr, encoding: str = "ascii") -> bytes:
         """Legacy for Python2 and Python3 compatible byte stream."""
         if sys.version_info[0] >= 3:
    @@ -1467,12 +1517,14 @@ 

    Functions

    -def write_tmp_file(device_name, output) +def write_tmp_file(device_name: str, output: str) ‑> str
    -
    +
    -Source code + +Expand source code +
    def write_tmp_file(device_name: str, output: str) -> str:
         file_name = obtain_netmiko_filename(device_name)
         with open(file_name, "w") as f:
    @@ -1528,9 +1580,7 @@ 

    Index

    - - \ No newline at end of file diff --git a/docs/netmiko/vyos/index.html b/docs/netmiko/vyos/index.html index 1512bfa58..596c68356 100644 --- a/docs/netmiko/vyos/index.html +++ b/docs/netmiko/vyos/index.html @@ -3,15 +3,17 @@ - + netmiko.vyos API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.vyos

    -Source code + +Expand source code +
    from netmiko.vyos.vyos_ssh import VyOSSSH
     
     __all__ = ["VyOSSSH"]
    @@ -32,7 +36,7 @@

    Sub-modules

    netmiko.vyos.vyos_ssh
    -
    +
    @@ -45,16 +49,16 @@

    Classes

    class VyOSSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Implement methods for interacting with VyOS network devices.

    +

    Implement methods for interacting with VyOS network devices.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -93,7 +97,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -138,12 +142,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -151,9 +155,11 @@

    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). -
    +

    -Source code + +Expand source code +
    class VyOSSSH(NoEnable, CiscoSSHConnection):
         """Implement methods for interacting with VyOS network devices."""
     
    @@ -167,7 +173,9 @@ 

    Classes

    time.sleep(0.3 * self.global_delay_factor) self.clear_buffer() - def check_config_mode(self, check_string: str = "#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "#", pattern: str = "", force_regex: bool = False + ) -> bool: """Checks if the device is in configuration mode""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -302,31 +310,37 @@

    Subclasses

    Methods

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

    Checks if the device is in configuration mode

    +

    Checks if the device is in configuration mode

    -Source code -
    def check_config_mode(self, check_string: str = "#", pattern: str = "") -> bool:
    +
    +Expand source code
    +
    +
    def check_config_mode(
    +    self, check_string: str = "#", pattern: str = "", force_regex: bool = False
    +) -> bool:
         """Checks if the device is in configuration mode"""
         return super().check_config_mode(check_string=check_string, pattern=pattern)
    -def commit(self, comment='', read_timeout=120.0, delay_factor=None) +def commit(self, comment: str = '', read_timeout: float = 120.0, delay_factor: Optional[float] = None) ‑> str
    -

    Commit the candidate configuration.

    +

    Commit the candidate configuration.

    Commit the entered configuration. Raise an error and return the failure if the commit fails.

    default: command_string = commit comment: command_string = commit comment

    -

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    +

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    -Source code + +Expand source code +
    def commit(
         self,
         comment: str = "",
    @@ -371,12 +385,14 @@ 

    Methods

    -def exit_config_mode(self, exit_config='exit', pattern='exit') +def exit_config_mode(self, exit_config: str = 'exit', pattern: str = 'exit') ‑> str
    -

    Exit configuration mode

    +

    Exit configuration mode

    -Source code + +Expand source code +
    def exit_config_mode(
         self, exit_config: str = "exit", pattern: str = r"exit"
     ) -> str:
    @@ -396,12 +412,14 @@ 

    Methods

    -def send_config_set(self, config_commands=None, exit_config_mode=False, **kwargs) +def send_config_set(self, config_commands: Union[str, Sequence[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, **kwargs: Any) ‑> str
    -

    Remain in configuration mode.

    +

    Remain in configuration mode.

    -Source code + +Expand source code +
    def send_config_set(
         self,
         config_commands: Union[str, Sequence[str], TextIO, None] = None,
    @@ -415,12 +433,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read()
    @@ -433,12 +453,14 @@ 

    Methods

    -def set_base_prompt(self, pri_prompt_terminator='$', alt_prompt_terminator='#', delay_factor=1.0, pattern=None) +def set_base_prompt(self, pri_prompt_terminator: str = '$', alt_prompt_terminator: str = '#', delay_factor: float = 1.0, pattern: Optional[str] = None) ‑> str
    -

    Sets self.base_prompt: used as delimiter for stripping of trailing prompt in output.

    +

    Sets self.base_prompt: used as delimiter for stripping of trailing prompt in output.

    -Source code + +Expand source code +
    def set_base_prompt(
         self,
         pri_prompt_terminator: str = "$",
    @@ -548,9 +570,7 @@ 

    VyOSSSH

    - - \ No newline at end of file diff --git a/docs/netmiko/vyos/vyos_ssh.html b/docs/netmiko/vyos/vyos_ssh.html index b11ac83d1..5d16530c3 100644 --- a/docs/netmiko/vyos/vyos_ssh.html +++ b/docs/netmiko/vyos/vyos_ssh.html @@ -3,15 +3,17 @@ - + netmiko.vyos.vyos_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.vyos.vyos_ssh

    -Source code + +Expand source code +
    from typing import Optional, Union, Sequence, TextIO, Any
     import time
     import warnings
    @@ -44,7 +48,9 @@ 

    Module netmiko.vyos.vyos_ssh

    time.sleep(0.3 * self.global_delay_factor) self.clear_buffer() - def check_config_mode(self, check_string: str = "#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "#", pattern: str = "", force_regex: bool = False + ) -> bool: """Checks if the device is in configuration mode""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -177,16 +183,16 @@

    Classes

    class VyOSSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Implement methods for interacting with VyOS network devices.

    +

    Implement methods for interacting with VyOS network devices.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -225,7 +231,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -270,12 +276,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -283,9 +289,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class VyOSSSH(NoEnable, CiscoSSHConnection):
         """Implement methods for interacting with VyOS network devices."""
     
    @@ -299,7 +307,9 @@ 

    Classes

    time.sleep(0.3 * self.global_delay_factor) self.clear_buffer() - def check_config_mode(self, check_string: str = "#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "#", pattern: str = "", force_regex: bool = False + ) -> bool: """Checks if the device is in configuration mode""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -434,31 +444,37 @@

    Subclasses

    Methods

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

    Checks if the device is in configuration mode

    +

    Checks if the device is in configuration mode

    -Source code -
    def check_config_mode(self, check_string: str = "#", pattern: str = "") -> bool:
    +
    +Expand source code
    +
    +
    def check_config_mode(
    +    self, check_string: str = "#", pattern: str = "", force_regex: bool = False
    +) -> bool:
         """Checks if the device is in configuration mode"""
         return super().check_config_mode(check_string=check_string, pattern=pattern)
    -def commit(self, comment='', read_timeout=120.0, delay_factor=None) +def commit(self, comment: str = '', read_timeout: float = 120.0, delay_factor: Optional[float] = None) ‑> str
    -

    Commit the candidate configuration.

    +

    Commit the candidate configuration.

    Commit the entered configuration. Raise an error and return the failure if the commit fails.

    default: command_string = commit comment: command_string = commit comment

    -

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    +

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    -Source code + +Expand source code +
    def commit(
         self,
         comment: str = "",
    @@ -503,12 +519,14 @@ 

    Methods

    -def exit_config_mode(self, exit_config='exit', pattern='exit') +def exit_config_mode(self, exit_config: str = 'exit', pattern: str = 'exit') ‑> str
    -

    Exit configuration mode

    +

    Exit configuration mode

    -Source code + +Expand source code +
    def exit_config_mode(
         self, exit_config: str = "exit", pattern: str = r"exit"
     ) -> str:
    @@ -528,12 +546,14 @@ 

    Methods

    -def send_config_set(self, config_commands=None, exit_config_mode=False, **kwargs) +def send_config_set(self, config_commands: Union[str, Sequence[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, **kwargs: Any) ‑> str
    -

    Remain in configuration mode.

    +

    Remain in configuration mode.

    -Source code + +Expand source code +
    def send_config_set(
         self,
         config_commands: Union[str, Sequence[str], TextIO, None] = None,
    @@ -547,12 +567,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read()
    @@ -565,12 +587,14 @@ 

    Methods

    -def set_base_prompt(self, pri_prompt_terminator='$', alt_prompt_terminator='#', delay_factor=1.0, pattern=None) +def set_base_prompt(self, pri_prompt_terminator: str = '$', alt_prompt_terminator: str = '#', delay_factor: float = 1.0, pattern: Optional[str] = None) ‑> str
    -

    Sets self.base_prompt: used as delimiter for stripping of trailing prompt in output.

    +

    Sets self.base_prompt: used as delimiter for stripping of trailing prompt in output.

    -Source code + +Expand source code +
    def set_base_prompt(
         self,
         pri_prompt_terminator: str = "$",
    @@ -675,9 +699,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/watchguard/fireware_ssh.html b/docs/netmiko/watchguard/fireware_ssh.html index 8546dea8f..673592fe6 100644 --- a/docs/netmiko/watchguard/fireware_ssh.html +++ b/docs/netmiko/watchguard/fireware_ssh.html @@ -3,15 +3,17 @@ - + netmiko.watchguard.fireware_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.watchguard.fireware_ssh

    -Source code + +Expand source code +
    import time
     from typing import Any
     
    @@ -45,7 +49,9 @@ 

    Module netmiko.watchguard.fireware_ssh

    time.sleep(0.3 * self.global_delay_factor) self.clear_buffer() - def check_config_mode(self, check_string: str = ")#", pattern: str = "#") -> bool: + 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. """ @@ -77,16 +83,16 @@

    Classes

    class WatchguardFirewareSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Implements methods for communicating with Watchguard Firebox firewalls.

    +

    Implements methods for communicating with Watchguard Firebox firewalls.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -125,7 +131,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -170,12 +176,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -183,9 +189,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class WatchguardFirewareSSH(BaseConnection):
         """
         Implements methods for communicating with Watchguard Firebox firewalls.
    @@ -203,7 +211,9 @@ 

    Classes

    time.sleep(0.3 * self.global_delay_factor) self.clear_buffer() - def check_config_mode(self, check_string: str = ")#", pattern: str = "#") -> bool: + 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. """ @@ -230,13 +240,17 @@

    Ancestors

    Methods

    -def check_config_mode(self, check_string=')#', pattern='#') +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.

    +

    Checks if the device is in configuration mode or not.

    -Source code -
    def check_config_mode(self, check_string: str = ")#", pattern: str = "#") -> bool:
    +
    +Expand source code
    +
    +
    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.
         """
    @@ -244,25 +258,29 @@ 

    Methods

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

    No save config on Watchguard.

    +

    No save config on Watchguard.

    -Source code + +Expand source code +
    def save_config(self, *args: Any, **kwargs: Any) -> str:
         """No save config on Watchguard."""
         pass
    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    -

    Set the base prompt for interaction ('#').

    +

    Prepare the session after the connection has been established.

    +

    Set the base prompt for interaction ('#').

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """
         Prepare the session after the connection has been established.
    @@ -353,9 +371,7 @@ 

    - - \ No newline at end of file diff --git a/docs/netmiko/watchguard/index.html b/docs/netmiko/watchguard/index.html index 083667d98..75b40aa4e 100644 --- a/docs/netmiko/watchguard/index.html +++ b/docs/netmiko/watchguard/index.html @@ -3,15 +3,17 @@ - + netmiko.watchguard API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.watchguard

    -Source code + +Expand source code +
    from netmiko.watchguard.fireware_ssh import WatchguardFirewareSSH
     
     __all__ = ["WatchguardFirewareSSH"]
    @@ -32,7 +36,7 @@

    Sub-modules

    netmiko.watchguard.fireware_ssh
    -
    +
    @@ -45,16 +49,16 @@

    Classes

    class WatchguardFirewareSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Implements methods for communicating with Watchguard Firebox firewalls.

    +

    Implements methods for communicating with Watchguard Firebox firewalls.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -93,7 +97,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -138,12 +142,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -151,9 +155,11 @@

    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). -
    +

    -Source code + +Expand source code +
    class WatchguardFirewareSSH(BaseConnection):
         """
         Implements methods for communicating with Watchguard Firebox firewalls.
    @@ -171,7 +177,9 @@ 

    Classes

    time.sleep(0.3 * self.global_delay_factor) self.clear_buffer() - def check_config_mode(self, check_string: str = ")#", pattern: str = "#") -> bool: + 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. """ @@ -198,13 +206,17 @@

    Ancestors

    Methods

    -def check_config_mode(self, check_string=')#', pattern='#') +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.

    +

    Checks if the device is in configuration mode or not.

    -Source code -
    def check_config_mode(self, check_string: str = ")#", pattern: str = "#") -> bool:
    +
    +Expand source code
    +
    +
    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.
         """
    @@ -212,25 +224,29 @@ 

    Methods

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

    No save config on Watchguard.

    +

    No save config on Watchguard.

    -Source code + +Expand source code +
    def save_config(self, *args: Any, **kwargs: Any) -> str:
         """No save config on Watchguard."""
         pass
    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    -

    Set the base prompt for interaction ('#').

    +

    Prepare the session after the connection has been established.

    +

    Set the base prompt for interaction ('#').

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """
         Prepare the session after the connection has been established.
    @@ -326,9 +342,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/yamaha/index.html b/docs/netmiko/yamaha/index.html index e491543f5..f8f64973b 100644 --- a/docs/netmiko/yamaha/index.html +++ b/docs/netmiko/yamaha/index.html @@ -3,15 +3,17 @@ - + netmiko.yamaha API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.yamaha

    -Source code + +Expand source code +
    from __future__ import unicode_literals
     from netmiko.yamaha.yamaha import YamahaSSH, YamahaTelnet
     
    @@ -33,7 +37,7 @@ 

    Sub-modules

    netmiko.yamaha.yamaha
    -
    +
    @@ -46,16 +50,16 @@

    Classes

    class YamahaSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Yamaha SSH driver.

    +

    Yamaha SSH driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -94,7 +98,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -139,12 +143,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -152,9 +156,11 @@

    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). -
    +

    -Source code + +Expand source code +
    class YamahaSSH(YamahaBase):
         """Yamaha SSH driver."""
     
    @@ -216,16 +222,16 @@ 

    Inherited members

    class YamahaTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Yamaha Telnet driver.

    +

    Yamaha Telnet driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -264,7 +270,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -309,12 +315,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -322,9 +328,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class YamahaTelnet(YamahaBase):
         """Yamaha Telnet driver."""
     
    @@ -420,9 +428,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/yamaha/yamaha.html b/docs/netmiko/yamaha/yamaha.html index 44db311aa..ce141ee17 100644 --- a/docs/netmiko/yamaha/yamaha.html +++ b/docs/netmiko/yamaha/yamaha.html @@ -3,15 +3,17 @@ - + netmiko.yamaha.yamaha API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.yamaha.yamaha

    -Source code + +Expand source code +
    import time
     import re
     from typing import Any, Optional
    @@ -70,7 +74,9 @@ 

    Module netmiko.yamaha.yamaha

    raise ValueError("Failed to exit enable mode.") return output - def check_config_mode(self, check_string: str = "#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "#", pattern: str = "", force_regex: bool = False + ) -> bool: """Checks if the device is in administrator mode or not.""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -126,17 +132,17 @@

    Classes

    class YamahaBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Defines vendor independent methods.

    +

    Defines vendor independent methods.

    Otherwise method left as a stub method.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -175,7 +181,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -220,12 +226,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -233,9 +239,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class YamahaBase(BaseConnection):
         def session_preparation(self) -> None:
             """Prepare the session after the connection has been established."""
    @@ -277,7 +285,9 @@ 

    Classes

    raise ValueError("Failed to exit enable mode.") return output - def check_config_mode(self, check_string: str = "#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "#", pattern: str = "", force_regex: bool = False + ) -> bool: """Checks if the device is in administrator mode or not.""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -318,25 +328,31 @@

    Subclasses

    Methods

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

    Checks if the device is in administrator mode or not.

    +

    Checks if the device is in administrator mode or not.

    -Source code -
    def check_config_mode(self, check_string: str = "#", pattern: str = "") -> bool:
    +
    +Expand source code
    +
    +
    def check_config_mode(
    +    self, check_string: str = "#", pattern: str = "", force_regex: bool = False
    +) -> bool:
         """Checks if the device is in administrator mode or not."""
         return super().check_config_mode(check_string=check_string, pattern=pattern)
    -def exit_config_mode(self, exit_config='exit', pattern='>') +def exit_config_mode(self, exit_config: str = 'exit', pattern: str = '>') ‑> str
    -

    No action taken. Call 'exit_enable_mode()' to explicitly exit Administration -Level.

    +

    No action taken. Call 'exit_enable_mode()' to explicitly exit Administration +Level.

    -Source code + +Expand source code +
    def exit_config_mode(self, exit_config: str = "exit", pattern: str = ">") -> str:
         """
         No action taken. Call 'exit_enable_mode()' to explicitly exit Administration
    @@ -346,13 +362,15 @@ 

    Methods

    -def exit_enable_mode(self, exit_command='exit') +def exit_enable_mode(self, exit_command: str = 'exit') ‑> str
    -

    When any changes have been made, the prompt 'Save new configuration ? (Y/N)' -appears before exiting. Ignore this by entering 'N'.

    +

    When any changes have been made, the prompt 'Save new configuration ? (Y/N)' +appears before exiting. Ignore this by entering 'N'.

    -Source code + +Expand source code +
    def exit_enable_mode(self, exit_command: str = "exit") -> str:
         """
         When any changes have been made, the prompt 'Save new configuration ? (Y/N)'
    @@ -373,12 +391,14 @@ 

    Methods

    -def save_config(self, cmd='save', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'save', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Saves Config.

    +

    Saves Config.

    -Source code + +Expand source code +
    def save_config(
         self, cmd: str = "save", confirm: bool = False, confirm_response: str = ""
     ) -> str:
    @@ -391,12 +411,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read(pattern=r"[>#]")
    @@ -453,16 +475,16 @@ 

    Inherited members

    class YamahaSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Yamaha SSH driver.

    +

    Yamaha SSH driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -501,7 +523,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -546,12 +568,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -559,9 +581,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class YamahaSSH(YamahaBase):
         """Yamaha SSH driver."""
     
    @@ -623,16 +647,16 @@ 

    Inherited members

    class YamahaTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Yamaha Telnet driver.

    +

    Yamaha Telnet driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -671,7 +695,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -716,12 +740,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -729,9 +753,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class YamahaTelnet(YamahaBase):
         """Yamaha Telnet driver."""
     
    @@ -832,9 +858,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/zte/index.html b/docs/netmiko/zte/index.html index 737071577..651e8f62d 100644 --- a/docs/netmiko/zte/index.html +++ b/docs/netmiko/zte/index.html @@ -3,15 +3,17 @@ - + netmiko.zte API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.zte

    -Source code + +Expand source code +
    from netmiko.zte.zte_zxros import ZteZxrosSSH
     from netmiko.zte.zte_zxros import ZteZxrosTelnet
     
    @@ -33,7 +37,7 @@ 

    Sub-modules

    netmiko.zte.zte_zxros
    -
    +
    @@ -46,16 +50,16 @@

    Classes

    class ZteZxrosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -94,7 +98,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -139,12 +143,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -152,9 +156,11 @@

    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). -
    +

    -Source code + +Expand source code +
    class ZteZxrosSSH(ZteZxrosBase):
         pass
    @@ -215,16 +221,16 @@

    Inherited members

    class ZteZxrosTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -263,7 +269,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -308,12 +314,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -321,9 +327,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class ZteZxrosTelnet(ZteZxrosBase):
         @staticmethod
         def _process_option(telnet_sock: socket, cmd: bytes, opt: bytes) -> None:
    @@ -440,9 +448,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/zte/zte_zxros.html b/docs/netmiko/zte/zte_zxros.html index 30039d1b7..6b54a5c76 100644 --- a/docs/netmiko/zte/zte_zxros.html +++ b/docs/netmiko/zte/zte_zxros.html @@ -3,15 +3,17 @@ - + netmiko.zte.zte_zxros API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.zte.zte_zxros

    -Source code + +Expand source code +
    import time
     from socket import socket
     from typing import Any
    @@ -40,7 +44,9 @@ 

    Module netmiko.zte.zte_zxros

    time.sleep(0.3 * self.global_delay_factor) self.clear_buffer() - def check_config_mode(self, check_string: str = ")#", pattern: str = "#") -> bool: + 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. """ @@ -99,16 +105,16 @@

    Classes

    class ZteZxrosBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -147,7 +153,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -192,12 +198,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -205,9 +211,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class ZteZxrosBase(CiscoBaseConnection):
         def session_preparation(self) -> None:
             """Prepare the session after the connection has been established."""
    @@ -218,7 +226,9 @@ 

    Classes

    time.sleep(0.3 * self.global_delay_factor) self.clear_buffer() - def check_config_mode(self, check_string: str = ")#", pattern: str = "#") -> bool: + 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. """ @@ -245,13 +255,17 @@

    Subclasses

    Methods

    -def check_config_mode(self, check_string=')#', pattern='#') +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.

    +

    Checks if the device is in configuration mode or not.

    -Source code -
    def check_config_mode(self, check_string: str = ")#", pattern: str = "#") -> bool:
    +
    +Expand source code
    +
    +
    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.
         """
    @@ -259,12 +273,14 @@ 

    Methods

    -def save_config(self, cmd='write', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'write', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Saves Config Using Copy Run Start

    +

    Saves Config Using Copy Run Start

    -Source code + +Expand source code +
    def save_config(
         self, cmd: str = "write", confirm: bool = False, confirm_response: str = ""
     ) -> str:
    @@ -275,12 +291,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read(pattern=r"[>#]")
    @@ -340,16 +358,16 @@ 

    Inherited members

    class ZteZxrosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -388,7 +406,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -433,12 +451,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -446,9 +464,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class ZteZxrosSSH(ZteZxrosBase):
         pass
    @@ -509,16 +529,16 @@

    Inherited members

    class ZteZxrosTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -557,7 +577,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -602,12 +622,12 @@

    Inherited members

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -615,9 +635,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class ZteZxrosTelnet(ZteZxrosBase):
         @staticmethod
         def _process_option(telnet_sock: socket, cmd: bytes, opt: bytes) -> None:
    @@ -737,9 +759,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/zyxel/index.html b/docs/netmiko/zyxel/index.html index 771c1a05e..8cfaac954 100644 --- a/docs/netmiko/zyxel/index.html +++ b/docs/netmiko/zyxel/index.html @@ -3,15 +3,17 @@ - + netmiko.zyxel API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.zyxel

    -Source code + +Expand source code +
    from netmiko.zyxel.zyxel_ssh import ZyxelSSH
     
     
    @@ -33,7 +37,7 @@ 

    Sub-modules

    netmiko.zyxel.zyxel_ssh
    -
    +
    @@ -46,10 +50,10 @@

    Classes

    class ZyxelSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Class for platforms that have no enable mode.

    +

    Class for platforms that have no enable mode.

    Netmiko translates the meaning of "enable" mode to be a proxy for "can go into config mode". In other words, that you ultimately have privileges to execute configuration changes.

    @@ -59,10 +63,10 @@

    Classes

    don't explicitly support enable mode.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -101,7 +105,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -146,12 +150,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -159,9 +163,11 @@

    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). -
    +

    -Source code + +Expand source code +
    class ZyxelSSH(NoEnable, NoConfig, CiscoSSHConnection):
         def disable_paging(self, *args: Any, **kwargs: Any) -> str:
             """No paging on Zyxel"""
    @@ -198,24 +204,28 @@ 

    Ancestors

    Methods

    -def disable_paging(self, *args, **kwargs) +def disable_paging(self, *args: Any, **kwargs: Any) ‑> str
    -

    No paging on Zyxel

    +

    No paging on Zyxel

    -Source code + +Expand source code +
    def disable_paging(self, *args: Any, **kwargs: Any) -> str:
         """No paging on Zyxel"""
         return ""
    -def send_config_set(self, config_commands=None, exit_config_mode=False, enter_config_mode=False, **kwargs) +def send_config_set(self, config_commands: Union[str, Sequence[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, enter_config_mode: bool = False, **kwargs: Any) ‑> str
    -

    No config mode on Zyxel

    +

    No config mode on Zyxel

    -Source code + +Expand source code +
    def send_config_set(
         self,
         config_commands: Union[str, Sequence[str], TextIO, None] = None,
    @@ -314,9 +324,7 @@ 

    Zyxel

    - - \ No newline at end of file diff --git a/docs/netmiko/zyxel/zyxel_ssh.html b/docs/netmiko/zyxel/zyxel_ssh.html index 6dd88ccac..e6ad58db4 100644 --- a/docs/netmiko/zyxel/zyxel_ssh.html +++ b/docs/netmiko/zyxel/zyxel_ssh.html @@ -3,15 +3,17 @@ - + netmiko.zyxel.zyxel_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.zyxel.zyxel_ssh

    -Source code + +Expand source code +
    from typing import Any, Sequence, TextIO, Union
     from netmiko.cisco_base_connection import CiscoSSHConnection
     from netmiko.no_enable import NoEnable
    @@ -65,10 +69,10 @@ 

    Classes

    class ZyxelSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Class for platforms that have no enable mode.

    +

    Class for platforms that have no enable mode.

    Netmiko translates the meaning of "enable" mode to be a proxy for "can go into config mode". In other words, that you ultimately have privileges to execute configuration changes.

    @@ -78,10 +82,10 @@

    Classes

    don't explicitly support enable mode.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -120,7 +124,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :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). @@ -165,12 +169,12 @@

    Classes

    :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 `.Channel`) to use for + :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 `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (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). @@ -178,9 +182,11 @@

    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). -
    +
    -Source code + +Expand source code +
    class ZyxelSSH(NoEnable, NoConfig, CiscoSSHConnection):
         def disable_paging(self, *args: Any, **kwargs: Any) -> str:
             """No paging on Zyxel"""
    @@ -217,24 +223,28 @@ 

    Ancestors

    Methods

    -def disable_paging(self, *args, **kwargs) +def disable_paging(self, *args: Any, **kwargs: Any) ‑> str
    -

    No paging on Zyxel

    +

    No paging on Zyxel

    -Source code + +Expand source code +
    def disable_paging(self, *args: Any, **kwargs: Any) -> str:
         """No paging on Zyxel"""
         return ""
    -def send_config_set(self, config_commands=None, exit_config_mode=False, enter_config_mode=False, **kwargs) +def send_config_set(self, config_commands: Union[str, Sequence[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, enter_config_mode: bool = False, **kwargs: Any) ‑> str
    -

    No config mode on Zyxel

    +

    No config mode on Zyxel

    -Source code + +Expand source code +
    def send_config_set(
         self,
         config_commands: Union[str, Sequence[str], TextIO, None] = None,
    @@ -328,9 +338,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/netmiko/__init__.py b/netmiko/__init__.py index 00ff2dc7b..3b3f80637 100644 --- a/netmiko/__init__.py +++ b/netmiko/__init__.py @@ -1,6 +1,6 @@ import sys -__version__ = "4.1.1-a1" +__version__ = "4.1.1" PY_MAJ_VER = 3 PY_MIN_VER = 7 MIN_PYTHON_VER = "3.7" diff --git a/release_process.txt b/release_process.txt index b1294e67e..f6d476429 100644 --- a/release_process.txt +++ b/release_process.txt @@ -1,5 +1,5 @@ -# Use pydev1 machine +# Use pydev2 machine # Use virtual environment = .venv # Run the following command to update docs: diff --git a/requirements-dev.txt b/requirements-dev.txt index 3b21b292c..2f7b6d332 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -6,6 +6,7 @@ pytest==7.1.2 pylama==8.3.8 twine==1.15.0 pysnmp==4.4.12 +pdoc3==0.10.0 # Black/click issue (can go away when black is upgraded to >= 22.3.0) # click==8.0.0 types-paramiko