From cd5f987ebd0d640a4d68bcd7ce9177e16c9390f9 Mon Sep 17 00:00:00 2001 From: Pau Nadeu Rabat Date: Sat, 16 May 2020 23:52:18 +0200 Subject: [PATCH 01/42] New vendor added --- netmiko/sixwind/__init__.py | 3 ++ netmiko/sixwind/sixwind.py | 88 +++++++++++++++++++++++++++++++++++++ netmiko/ssh_dispatcher.py | 3 +- 3 files changed, 93 insertions(+), 1 deletion(-) create mode 100644 netmiko/sixwind/__init__.py create mode 100644 netmiko/sixwind/sixwind.py diff --git a/netmiko/sixwind/__init__.py b/netmiko/sixwind/__init__.py new file mode 100644 index 000000000..cf2117356 --- /dev/null +++ b/netmiko/sixwind/__init__.py @@ -0,0 +1,3 @@ +from netmiko.sixwind.sixwind import SixwindSSH, SixwindBase + +__all__ = ['SixwindSSH', 'SixwindBase'] \ No newline at end of file diff --git a/netmiko/sixwind/sixwind.py b/netmiko/sixwind/sixwind.py new file mode 100644 index 000000000..542159f6a --- /dev/null +++ b/netmiko/sixwind/sixwind.py @@ -0,0 +1,88 @@ +import time +from netmiko.cisco_base_connection import CiscoBaseConnection, CiscoSSHConnection + +class SixwindBase(CiscoBaseConnection): + def disable_paging(self, *args, **kwargs): + """6WIND requires | no-pager at the end of command, not implemented at this time.""" + return "" + + def session_preparation(self): + """Prepare the session after the connection has been established.""" + self.ansi_escape_codes = True + self._test_channel_read() + self.set_base_prompt() + # Clear the read buffer + time.sleep(0.3 * self.global_delay_factor) + self.clear_buffer() + + def set_base_prompt( + self, pri_prompt_terminator=">", alt_prompt_terminator="#", delay_factor=1 + ): + """Sets self.base_prompt: used as delimiter for stripping of trailing prompt in output.""" + prompt = super().set_base_prompt( + pri_prompt_terminator=pri_prompt_terminator, + alt_prompt_terminator=alt_prompt_terminator, + delay_factor=delay_factor, + ) + prompt = prompt.strip() + self.base_prompt = prompt + return self.base_prompt + + def config_mode(self, config_command="edit running"): + """Enter configuration mode.""" + return super().config_mode(config_command=config_command) + + def commit(self, comment="", delay_factor=1): + """ + 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 = self.select_delay_factor(delay_factor) + error_marker = "Failed to generate committed config" + command_string = "commit" + + output = self.config_mode() + output += self.send_command_expect( + command_string, + strip_prompt=False, + strip_command=False, + delay_factor=delay_factor, + expect_string=r"#", + ) + output += self.exit_config_mode() + + if error_marker in output: + raise ValueError(f"Commit failed with following errors:\n\n{output}") + return output + + def exit_config_mode(self, exit_config="exit", pattern=r">"): + """Exit configuration mode.""" + return super().exit_config_mode(exit_config=exit_config, pattern=pattern) + + def check_config_mode(self, check_string="#"): + """Checks whether in configuration mode. Returns a boolean.""" + return super().check_config_mode(check_string=check_string) + + def save_config(self, cmd="copy running startup", confirm=True, confirm_response="y"): + """ Save Config for 6WIND""" + return super().save_config( + cmd=cmd, confirm=confirm, confirm_response=confirm_response + ) + + def check_enable_mode(self, *args, **kwargs): + """6WIND has no enable mode.""" + pass + + def enable(self, *args, **kwargs): + """6WIND has no enable mode.""" + pass + + def exit_enable_mode(self, *args, **kwargs): + """6WIND has no enable mode.""" + pass + +class SixwindSSH(SixwindBase): + pass \ No newline at end of file diff --git a/netmiko/ssh_dispatcher.py b/netmiko/ssh_dispatcher.py index f45064914..553845d42 100755 --- a/netmiko/ssh_dispatcher.py +++ b/netmiko/ssh_dispatcher.py @@ -74,6 +74,7 @@ from netmiko.ruckus import RuckusFastironSSH from netmiko.ruckus import RuckusFastironTelnet from netmiko.ruijie import RuijieOSSSH, RuijieOSTelnet +from netmiko.sixwind import SixwindSSH from netmiko.sophos import SophosSfosSSH from netmiko.terminal_server import TerminalServerSSH from netmiko.terminal_server import TerminalServerTelnet @@ -169,6 +170,7 @@ "rad_etx": RadETXSSH, "ruckus_fastiron": RuckusFastironSSH, "ruijie_os": RuijieOSSSH, + "sixwind": SixwindSSH, "sophos_sfos": SophosSfosSSH, "ubiquiti_edge": UbiquitiEdgeSSH, "ubiquiti_edgeswitch": UbiquitiEdgeSSH, @@ -234,7 +236,6 @@ CLASS_MAPPER["rad_etx_telnet"] = RadETXTelnet CLASS_MAPPER["ruckus_fastiron_telnet"] = RuckusFastironTelnet CLASS_MAPPER["ruijie_os_telnet"] = RuijieOSTelnet - # Add serial drivers CLASS_MAPPER["cisco_ios_serial"] = CiscoIosSerial From aa84853dfc22c8801fca6ef365429b0ca40adc51 Mon Sep 17 00:00:00 2001 From: Pau Nadeu Rabat Date: Sun, 17 May 2020 00:38:34 +0200 Subject: [PATCH 02/42] Solving some TRAVIS issues --- netmiko/sixwind/__init__.py | 2 +- netmiko/sixwind/sixwind.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/netmiko/sixwind/__init__.py b/netmiko/sixwind/__init__.py index cf2117356..d608f7367 100644 --- a/netmiko/sixwind/__init__.py +++ b/netmiko/sixwind/__init__.py @@ -1,3 +1,3 @@ from netmiko.sixwind.sixwind import SixwindSSH, SixwindBase -__all__ = ['SixwindSSH', 'SixwindBase'] \ No newline at end of file +__all__ = ['SixwindSSH', 'SixwindBase'] diff --git a/netmiko/sixwind/sixwind.py b/netmiko/sixwind/sixwind.py index 542159f6a..3538160d6 100644 --- a/netmiko/sixwind/sixwind.py +++ b/netmiko/sixwind/sixwind.py @@ -1,7 +1,9 @@ import time -from netmiko.cisco_base_connection import CiscoBaseConnection, CiscoSSHConnection +from netmiko.cisco_base_connection import CiscoBaseConnection + class SixwindBase(CiscoBaseConnection): + def disable_paging(self, *args, **kwargs): """6WIND requires | no-pager at the end of command, not implemented at this time.""" return "" From f5b9e44c26cbf67b9f9d6858cd4cacb0502ea3dc Mon Sep 17 00:00:00 2001 From: Pau Nadeu Rabat Date: Sun, 17 May 2020 00:41:59 +0200 Subject: [PATCH 03/42] LINT fail, no \n at EOF. expect two \n. --- netmiko/sixwind/sixwind.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/netmiko/sixwind/sixwind.py b/netmiko/sixwind/sixwind.py index 3538160d6..9e8b6946d 100644 --- a/netmiko/sixwind/sixwind.py +++ b/netmiko/sixwind/sixwind.py @@ -86,5 +86,6 @@ def exit_enable_mode(self, *args, **kwargs): """6WIND has no enable mode.""" pass + class SixwindSSH(SixwindBase): - pass \ No newline at end of file + pass From 8140897f9ba9c9a8a96dfbe35f5b3a54cf378dfa Mon Sep 17 00:00:00 2001 From: Pau Nadeu Rabat Date: Sun, 17 May 2020 01:12:27 +0200 Subject: [PATCH 04/42] Added to platforms --- PLATFORMS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/PLATFORMS.md b/PLATFORMS.md index 859a327b3..4cd8ed240 100644 --- a/PLATFORMS.md +++ b/PLATFORMS.md @@ -76,3 +76,4 @@ - Ubiquiti Unifi Switch - Versa Networks FlexVNF - Watchguard Firebox +- 6WIND TurboRouter \ No newline at end of file From 191933428f1f615a1a585bfd0b837471918fee55 Mon Sep 17 00:00:00 2001 From: Pau Nadeu Rabat Date: Sun, 17 May 2020 01:15:09 +0200 Subject: [PATCH 05/42] Reformat code --- netmiko/sixwind/sixwind.py | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/netmiko/sixwind/sixwind.py b/netmiko/sixwind/sixwind.py index 9e8b6946d..56c10e85f 100644 --- a/netmiko/sixwind/sixwind.py +++ b/netmiko/sixwind/sixwind.py @@ -17,15 +17,9 @@ def session_preparation(self): time.sleep(0.3 * self.global_delay_factor) self.clear_buffer() - def set_base_prompt( - self, pri_prompt_terminator=">", alt_prompt_terminator="#", delay_factor=1 - ): + def set_base_prompt(self, pri_prompt_terminator=">", alt_prompt_terminator="#", delay_factor=1): """Sets self.base_prompt: used as delimiter for stripping of trailing prompt in output.""" - prompt = super().set_base_prompt( - pri_prompt_terminator=pri_prompt_terminator, - alt_prompt_terminator=alt_prompt_terminator, - delay_factor=delay_factor, - ) + prompt = super().set_base_prompt(pri_prompt_terminator=pri_prompt_terminator,alt_prompt_terminator=alt_prompt_terminator,delay_factor=delay_factor,) prompt = prompt.strip() self.base_prompt = prompt return self.base_prompt @@ -47,13 +41,7 @@ def commit(self, comment="", delay_factor=1): command_string = "commit" output = self.config_mode() - output += self.send_command_expect( - command_string, - strip_prompt=False, - strip_command=False, - delay_factor=delay_factor, - expect_string=r"#", - ) + output += self.send_command_expect(command_string, strip_prompt=False, strip_command=False, delay_factor=delay_factor, expect_string=r"#") output += self.exit_config_mode() if error_marker in output: @@ -70,9 +58,7 @@ def check_config_mode(self, check_string="#"): def save_config(self, cmd="copy running startup", confirm=True, confirm_response="y"): """ Save Config for 6WIND""" - return super().save_config( - cmd=cmd, confirm=confirm, confirm_response=confirm_response - ) + return super().save_config(cmd=cmd, confirm=confirm, confirm_response=confirm_response) def check_enable_mode(self, *args, **kwargs): """6WIND has no enable mode.""" From ad473dd524008aed50b90b87a199da73729fb063 Mon Sep 17 00:00:00 2001 From: Pau Nadeu Rabat Date: Sun, 17 May 2020 01:26:16 +0200 Subject: [PATCH 06/42] Oops! I did it again. --- netmiko/sixwind/sixwind.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/netmiko/sixwind/sixwind.py b/netmiko/sixwind/sixwind.py index 56c10e85f..986114efa 100644 --- a/netmiko/sixwind/sixwind.py +++ b/netmiko/sixwind/sixwind.py @@ -19,7 +19,9 @@ def session_preparation(self): def set_base_prompt(self, pri_prompt_terminator=">", alt_prompt_terminator="#", delay_factor=1): """Sets self.base_prompt: used as delimiter for stripping of trailing prompt in output.""" - prompt = super().set_base_prompt(pri_prompt_terminator=pri_prompt_terminator,alt_prompt_terminator=alt_prompt_terminator,delay_factor=delay_factor,) + prompt = super().set_base_prompt(pri_prompt_terminator=pri_prompt_terminator, + alt_prompt_terminator=alt_prompt_terminator, + delay_factor=delay_factor) prompt = prompt.strip() self.base_prompt = prompt return self.base_prompt @@ -41,7 +43,8 @@ def commit(self, comment="", delay_factor=1): command_string = "commit" output = self.config_mode() - output += self.send_command_expect(command_string, strip_prompt=False, strip_command=False, delay_factor=delay_factor, expect_string=r"#") + output += self.send_command_expect(command_string, strip_prompt=False, strip_command=False, + delay_factor=delay_factor, expect_string=r"#") output += self.exit_config_mode() if error_marker in output: From ad5b85e34ddb133e404bfea2b714f80b08c623aa Mon Sep 17 00:00:00 2001 From: Pau Nadeu Rabat Date: Sun, 17 May 2020 01:28:56 +0200 Subject: [PATCH 07/42] I want solve LINT test. --- netmiko/sixwind/sixwind.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/netmiko/sixwind/sixwind.py b/netmiko/sixwind/sixwind.py index 986114efa..1dbf9a0e9 100644 --- a/netmiko/sixwind/sixwind.py +++ b/netmiko/sixwind/sixwind.py @@ -5,11 +5,13 @@ class SixwindBase(CiscoBaseConnection): def disable_paging(self, *args, **kwargs): - """6WIND requires | no-pager at the end of command, not implemented at this time.""" - return "" + """6WIND requires no-pager at the end of command, not implemented at this time.""" + + pass def session_preparation(self): """Prepare the session after the connection has been established.""" + self.ansi_escape_codes = True self._test_channel_read() self.set_base_prompt() @@ -19,6 +21,7 @@ def session_preparation(self): def set_base_prompt(self, pri_prompt_terminator=">", alt_prompt_terminator="#", delay_factor=1): """Sets self.base_prompt: used as delimiter for stripping of trailing prompt in output.""" + prompt = super().set_base_prompt(pri_prompt_terminator=pri_prompt_terminator, alt_prompt_terminator=alt_prompt_terminator, delay_factor=delay_factor) @@ -28,6 +31,7 @@ def set_base_prompt(self, pri_prompt_terminator=">", alt_prompt_terminator="#", def config_mode(self, config_command="edit running"): """Enter configuration mode.""" + return super().config_mode(config_command=config_command) def commit(self, comment="", delay_factor=1): @@ -38,6 +42,7 @@ def commit(self, comment="", delay_factor=1): default: command_string = commit """ + delay_factor = self.select_delay_factor(delay_factor) error_marker = "Failed to generate committed config" command_string = "commit" @@ -53,26 +58,32 @@ def commit(self, comment="", delay_factor=1): def exit_config_mode(self, exit_config="exit", pattern=r">"): """Exit configuration mode.""" + return super().exit_config_mode(exit_config=exit_config, pattern=pattern) def check_config_mode(self, check_string="#"): """Checks whether in configuration mode. Returns a boolean.""" + return super().check_config_mode(check_string=check_string) def save_config(self, cmd="copy running startup", confirm=True, confirm_response="y"): """ Save Config for 6WIND""" + return super().save_config(cmd=cmd, confirm=confirm, confirm_response=confirm_response) def check_enable_mode(self, *args, **kwargs): """6WIND has no enable mode.""" + pass def enable(self, *args, **kwargs): """6WIND has no enable mode.""" + pass def exit_enable_mode(self, *args, **kwargs): """6WIND has no enable mode.""" + pass From c255f20aaba3bef3c906723f76c65ea6d01accd7 Mon Sep 17 00:00:00 2001 From: Pau Nadeu Rabat Date: Sun, 17 May 2020 01:35:29 +0200 Subject: [PATCH 08/42] Never give up. --- netmiko/sixwind/__init__.py | 2 +- netmiko/sixwind/sixwind.py | 44 +++++++++++++++++++++++++++---------- 2 files changed, 34 insertions(+), 12 deletions(-) diff --git a/netmiko/sixwind/__init__.py b/netmiko/sixwind/__init__.py index d608f7367..ba757bcb1 100644 --- a/netmiko/sixwind/__init__.py +++ b/netmiko/sixwind/__init__.py @@ -1,3 +1,3 @@ from netmiko.sixwind.sixwind import SixwindSSH, SixwindBase -__all__ = ['SixwindSSH', 'SixwindBase'] +__all__ = ["SixwindSSH", "SixwindBase"] diff --git a/netmiko/sixwind/sixwind.py b/netmiko/sixwind/sixwind.py index 1dbf9a0e9..2238ec7d4 100644 --- a/netmiko/sixwind/sixwind.py +++ b/netmiko/sixwind/sixwind.py @@ -22,9 +22,11 @@ def session_preparation(self): def set_base_prompt(self, pri_prompt_terminator=">", alt_prompt_terminator="#", delay_factor=1): """Sets self.base_prompt: used as delimiter for stripping of trailing prompt in output.""" - prompt = super().set_base_prompt(pri_prompt_terminator=pri_prompt_terminator, - alt_prompt_terminator=alt_prompt_terminator, - delay_factor=delay_factor) + prompt = super().set_base_prompt( + pri_prompt_terminator=pri_prompt_terminator, + alt_prompt_terminator=alt_prompt_terminator, + delay_factor=delay_factor + ) prompt = prompt.strip() self.base_prompt = prompt return self.base_prompt @@ -32,7 +34,9 @@ def set_base_prompt(self, pri_prompt_terminator=">", alt_prompt_terminator="#", def config_mode(self, config_command="edit running"): """Enter configuration mode.""" - return super().config_mode(config_command=config_command) + return super().config_mode( + config_command=config_command + ) def commit(self, comment="", delay_factor=1): """ @@ -43,33 +47,51 @@ def commit(self, comment="", delay_factor=1): command_string = commit """ - delay_factor = self.select_delay_factor(delay_factor) + delay_factor = self.select_delay_factor( + delay_factor + ) error_marker = "Failed to generate committed config" command_string = "commit" output = self.config_mode() - output += self.send_command_expect(command_string, strip_prompt=False, strip_command=False, - delay_factor=delay_factor, expect_string=r"#") + output += self.send_command_expect( + command_string, + strip_prompt=False, + strip_command=False, + delay_factor=delay_factor, + expect_string=r"#" + ) output += self.exit_config_mode() if error_marker in output: - raise ValueError(f"Commit failed with following errors:\n\n{output}") + raise ValueError( + f"Commit failed with following errors:\n\n{output}" + ) return output def exit_config_mode(self, exit_config="exit", pattern=r">"): """Exit configuration mode.""" - return super().exit_config_mode(exit_config=exit_config, pattern=pattern) + return super().exit_config_mode( + exit_config=exit_config, + pattern=pattern + ) def check_config_mode(self, check_string="#"): """Checks whether in configuration mode. Returns a boolean.""" - return super().check_config_mode(check_string=check_string) + return super().check_config_mode( + check_string=check_string + ) def save_config(self, cmd="copy running startup", confirm=True, confirm_response="y"): """ Save Config for 6WIND""" - return super().save_config(cmd=cmd, confirm=confirm, confirm_response=confirm_response) + return super().save_config( + cmd=cmd, + confirm=confirm, + confirm_response=confirm_response + ) def check_enable_mode(self, *args, **kwargs): """6WIND has no enable mode.""" From 64ba80c4ba039d8b76e72efa53810832bf127dde Mon Sep 17 00:00:00 2001 From: Pau Nadeu Rabat Date: Sun, 17 May 2020 01:39:21 +0200 Subject: [PATCH 09/42] I think I will leave for tomorrow what I could do today --- netmiko/sixwind/sixwind.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/netmiko/sixwind/sixwind.py b/netmiko/sixwind/sixwind.py index 2238ec7d4..952fd390c 100644 --- a/netmiko/sixwind/sixwind.py +++ b/netmiko/sixwind/sixwind.py @@ -34,9 +34,7 @@ def set_base_prompt(self, pri_prompt_terminator=">", alt_prompt_terminator="#", def config_mode(self, config_command="edit running"): """Enter configuration mode.""" - return super().config_mode( - config_command=config_command - ) + return super().config_mode(config_command=config_command) def commit(self, comment="", delay_factor=1): """ @@ -67,6 +65,7 @@ def commit(self, comment="", delay_factor=1): raise ValueError( f"Commit failed with following errors:\n\n{output}" ) + return output def exit_config_mode(self, exit_config="exit", pattern=r">"): @@ -80,12 +79,10 @@ def exit_config_mode(self, exit_config="exit", pattern=r">"): def check_config_mode(self, check_string="#"): """Checks whether in configuration mode. Returns a boolean.""" - return super().check_config_mode( - check_string=check_string - ) + return super().check_config_mode(check_string=check_string) def save_config(self, cmd="copy running startup", confirm=True, confirm_response="y"): - """ Save Config for 6WIND""" + """Save Config for 6WIND""" return super().save_config( cmd=cmd, @@ -110,4 +107,5 @@ def exit_enable_mode(self, *args, **kwargs): class SixwindSSH(SixwindBase): + pass From dc6312e02ac4117d69a200dad034152e772cf01a Mon Sep 17 00:00:00 2001 From: Pau Nadeu Rabat Date: Sun, 17 May 2020 01:42:09 +0200 Subject: [PATCH 10/42] Black on local. Night! --- netmiko/sixwind/sixwind.py | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/netmiko/sixwind/sixwind.py b/netmiko/sixwind/sixwind.py index 952fd390c..5d66bdebe 100644 --- a/netmiko/sixwind/sixwind.py +++ b/netmiko/sixwind/sixwind.py @@ -3,7 +3,6 @@ class SixwindBase(CiscoBaseConnection): - def disable_paging(self, *args, **kwargs): """6WIND requires no-pager at the end of command, not implemented at this time.""" @@ -19,13 +18,15 @@ def session_preparation(self): time.sleep(0.3 * self.global_delay_factor) self.clear_buffer() - def set_base_prompt(self, pri_prompt_terminator=">", alt_prompt_terminator="#", delay_factor=1): + def set_base_prompt( + self, pri_prompt_terminator=">", alt_prompt_terminator="#", delay_factor=1 + ): """Sets self.base_prompt: used as delimiter for stripping of trailing prompt in output.""" prompt = super().set_base_prompt( pri_prompt_terminator=pri_prompt_terminator, alt_prompt_terminator=alt_prompt_terminator, - delay_factor=delay_factor + delay_factor=delay_factor, ) prompt = prompt.strip() self.base_prompt = prompt @@ -45,9 +46,7 @@ def commit(self, comment="", delay_factor=1): command_string = commit """ - delay_factor = self.select_delay_factor( - delay_factor - ) + delay_factor = self.select_delay_factor(delay_factor) error_marker = "Failed to generate committed config" command_string = "commit" @@ -57,37 +56,32 @@ def commit(self, comment="", delay_factor=1): strip_prompt=False, strip_command=False, delay_factor=delay_factor, - expect_string=r"#" + expect_string=r"#", ) output += self.exit_config_mode() if error_marker in output: - raise ValueError( - f"Commit failed with following errors:\n\n{output}" - ) + raise ValueError(f"Commit failed with following errors:\n\n{output}") return output def exit_config_mode(self, exit_config="exit", pattern=r">"): """Exit configuration mode.""" - return super().exit_config_mode( - exit_config=exit_config, - pattern=pattern - ) + return super().exit_config_mode(exit_config=exit_config, pattern=pattern) def check_config_mode(self, check_string="#"): """Checks whether in configuration mode. Returns a boolean.""" return super().check_config_mode(check_string=check_string) - def save_config(self, cmd="copy running startup", confirm=True, confirm_response="y"): + def save_config( + self, cmd="copy running startup", confirm=True, confirm_response="y" + ): """Save Config for 6WIND""" return super().save_config( - cmd=cmd, - confirm=confirm, - confirm_response=confirm_response + cmd=cmd, confirm=confirm, confirm_response=confirm_response ) def check_enable_mode(self, *args, **kwargs): From 3f68b7f6fbf5116553d9dc88e27d7be0b2579d07 Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Tue, 19 May 2020 10:12:41 -0700 Subject: [PATCH 11/42] Fixing disable_paging and set_terminal_width so cmd_verify is not used as we are still in session_preparation phase. Cleaning up some disable_paging calls to have **kwargs in method definition. --- netmiko/base_connection.py | 14 ++++---------- netmiko/cloudgenix/cloudgenix_ion.py | 2 +- netmiko/fortinet/fortinet_ssh.py | 2 +- netmiko/huawei/huawei_smartax.py | 4 ++-- 4 files changed, 8 insertions(+), 14 deletions(-) diff --git a/netmiko/base_connection.py b/netmiko/base_connection.py index 185038cbf..fb2cf848d 100644 --- a/netmiko/base_connection.py +++ b/netmiko/base_connection.py @@ -1022,11 +1022,8 @@ def disable_paging(self, command="terminal length 0", delay_factor=1): log.debug("In disable_paging") log.debug(f"Command: {command}") self.write_channel(command) - # Make sure you read until you detect the command echo (avoid getting out of sync) - if self.global_cmd_verify is not False: - output = self.read_until_pattern(pattern=re.escape(command.strip())) - else: - output = self.read_until_prompt() + # Do not use command_verify here as still in session_preparation stage. + output = self.read_until_prompt() log.debug(f"{output}") log.debug("Exiting disable_paging") return output @@ -1048,11 +1045,8 @@ def set_terminal_width(self, command="", delay_factor=1): delay_factor = self.select_delay_factor(delay_factor) command = self.normalize_cmd(command) self.write_channel(command) - # Make sure you read until you detect the command echo (avoid getting out of sync) - if self.global_cmd_verify is not False: - output = self.read_until_pattern(pattern=re.escape(command.strip())) - else: - output = self.read_until_prompt() + # Do not use command_verify here as still in session_preparation stage. + output = self.read_until_prompt() return output def set_base_prompt( diff --git a/netmiko/cloudgenix/cloudgenix_ion.py b/netmiko/cloudgenix/cloudgenix_ion.py index db0f7482b..cfd7ad376 100644 --- a/netmiko/cloudgenix/cloudgenix_ion.py +++ b/netmiko/cloudgenix/cloudgenix_ion.py @@ -12,7 +12,7 @@ def session_preparation(self, *args, **kwargs): self.write_channel(self.RETURN) self.set_base_prompt(delay_factor=5) - def disable_paging(self): + def disable_paging(self, *args, **kwargs): """Cloud Genix ION sets terminal height in establish_connection""" return "" diff --git a/netmiko/fortinet/fortinet_ssh.py b/netmiko/fortinet/fortinet_ssh.py index c2af54f62..1e42d22eb 100644 --- a/netmiko/fortinet/fortinet_ssh.py +++ b/netmiko/fortinet/fortinet_ssh.py @@ -38,7 +38,7 @@ def session_preparation(self): time.sleep(0.3 * self.global_delay_factor) self.clear_buffer() - def disable_paging(self, delay_factor=1): + def disable_paging(self, delay_factor=1, **kwargs): """Disable paging is only available with specific roles so it may fail.""" check_command = "get system status | grep Virtual" output = self.send_command_timing(check_command) diff --git a/netmiko/huawei/huawei_smartax.py b/netmiko/huawei/huawei_smartax.py index 6fd3e807e..5905a9da8 100644 --- a/netmiko/huawei/huawei_smartax.py +++ b/netmiko/huawei/huawei_smartax.py @@ -50,8 +50,8 @@ def _disable_smart_interaction(self, command="undo smart", delay_factor=1): log.debug(f"{output}") log.debug("Exiting disable_smart_interaction") - def disable_paging(self, command="scroll"): - return super().disable_paging(command=command) + def disable_paging(self, command="scroll", **kwargs): + return super().disable_paging(command=command, **kwargs) def config_mode(self, config_command="config", pattern=""): """Enter configuration mode.""" From 78fa28a7bf95e6038d8ab88f94c140b482a6f817 Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Thu, 21 May 2020 10:43:33 -0700 Subject: [PATCH 12/42] Convert to canonical 'configure terminal' command --- netmiko/cisco_base_connection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netmiko/cisco_base_connection.py b/netmiko/cisco_base_connection.py index bc8031ac6..d63f5e1fa 100644 --- a/netmiko/cisco_base_connection.py +++ b/netmiko/cisco_base_connection.py @@ -29,7 +29,7 @@ def check_config_mode(self, check_string=")#", pattern=""): """ return super().check_config_mode(check_string=check_string, pattern=pattern) - def config_mode(self, config_command="config term", pattern=""): + def config_mode(self, config_command="configure terminal", pattern=""): """ Enter into configuration mode on remote device. From 2693370c1514942cbeafa128de7ab04c760804a3 Mon Sep 17 00:00:00 2001 From: jinl Date: Fri, 22 May 2020 09:41:33 +0800 Subject: [PATCH 13/42] add centec-switch platform --- PLATFORMS.md | 1 + docs/netmiko/centec/centec_os.html | 758 ++++++++++++++++++++++++ docs/netmiko/centec/index.html | 470 +++++++++++++++ docs/netmiko/cisco_base_connection.html | 1 + netmiko/centec/__init__.py | 3 + netmiko/centec/centec_os.py | 42 ++ netmiko/ssh_dispatcher.py | 3 + tests/etc/commands.yml.example | 11 + tests/etc/responses.yml.example | 8 + tests/etc/test_devices.yml.example | 7 + 10 files changed, 1304 insertions(+) create mode 100644 docs/netmiko/centec/centec_os.html create mode 100644 docs/netmiko/centec/index.html create mode 100644 netmiko/centec/__init__.py create mode 100644 netmiko/centec/centec_os.py diff --git a/PLATFORMS.md b/PLATFORMS.md index 859a327b3..59b7d4645 100644 --- a/PLATFORMS.md +++ b/PLATFORMS.md @@ -43,6 +43,7 @@ - Pluribus - Ruckus ICX/FastIron - Ruijie Networks +- Centec Networks - Ubiquiti EdgeSwitch - Vyatta VyOS diff --git a/docs/netmiko/centec/centec_os.html b/docs/netmiko/centec/centec_os.html new file mode 100644 index 000000000..6464596b3 --- /dev/null +++ b/docs/netmiko/centec/centec_os.html @@ -0,0 +1,758 @@ + + + + + + +netmiko.centec.centec_os API documentation + + + + + + + + + +
+
+
+

Module netmiko.centec.centec_os

+
+
+

centec RGOS Support

+
+Source code +
""""""Centec OS Support"""
+from netmiko.cisco_base_connection import CiscoBaseConnection
+import time
+import re
+
+
+class CentecOSBase(CiscoBaseConnection):
+    def session_preparation(self):
+        """Prepare the session after the connection has been established."""
+        self._test_channel_read(pattern=r"[>#]")
+        self.set_base_prompt()
+        self.disable_paging()
+        self.set_terminal_width(command="terminal length 0")
+        # Clear the read buffer
+        time.sleep(0.3 * self.global_delay_factor)
+        self.clear_buffer()
+
+    def config_mode(self, config_command="configure terminal", pattern=""):
+        """
+        Enter into configuration mode on remote device.
+
+        Centec IOS devices abbreviate the prompt at 20 chars in config mode
+        """
+        if not pattern:
+            pattern = re.escape(self.base_prompt[:16])
+
+        return super().config_mode(config_command=config_command, pattern=pattern)
+
+    def save_config(self, cmd="write", confirm=False, confirm_response=""):
+        """Save config: write"""
+        return super().save_config(
+            cmd=cmd, confirm=confirm, confirm_response=confirm_response
+        )
+
+class CentecOSSSH(CentecOSBase):
+
+    pass
+
+
+class CentecOSTelnet(CentecOSBase):
+
+    pass
+
+
+
+
+
+
+
+
+
+
+

Classes

+
+
+class centecOSBase +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +
+
+

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
+        provided.
+    :type ip: str
+
+    :param host: Hostname of target device. Not required if `ip` is
+            provided.
+    :type host: str
+
+    :param username: Username to authenticate against target device if
+            required.
+    :type username: str
+
+    :param password: Password to authenticate against target device if
+            required.
+    :type password: str
+
+    :param secret: The enable password if target device requires one.
+    :type secret: str
+
+    :param port: The destination port used to connect to the target
+            device.
+    :type port: int or None
+
+    :param device_type: Class selection based on device type.
+    :type device_type: str
+
+    :param verbose: Enable additional messages to standard output.
+    :type verbose: bool
+
+    :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
+    :type global_delay_factor: int
+
+    :param use_keys: Connect to target device using SSH keys.
+    :type use_keys: bool
+
+    :param key_file: Filename path of the SSH key file to use.
+    :type key_file: str
+
+    :param pkey: SSH key object to use.
+    :type pkey: paramiko.PKey
+
+    :param passphrase: Passphrase to use for encrypted key; password will be used for key
+            decryption if not specified.
+    :type passphrase: str
+
+    :param allow_agent: Enable use of SSH key-agent.
+    :type allow_agent: bool
+
+    :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
+            means unknown SSH host keys will be accepted).
+    :type ssh_strict: bool
+
+    :param system_host_keys: Load host keys from the users known_hosts file.
+    :type system_host_keys: bool
+    :param alt_host_keys: If `True` host keys will be loaded from the file specified in
+            alt_key_file.
+    :type alt_host_keys: bool
+
+    :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
+    :type alt_key_file: str
+
+    :param ssh_config_file: File name of OpenSSH configuration file.
+    :type ssh_config_file: str
+
+    :param timeout: Connection timeout.
+    :type timeout: float
+
+    :param session_timeout: Set a timeout for parallel requests.
+    :type session_timeout: float
+
+    :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
+    :type auth_timeout: float
+
+    :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+    :type banner_timeout: float
+
+    :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
+            Currently defaults to 0, for backwards compatibility (it will not attempt
+            to keep the connection alive).
+    :type keepalive: int
+
+    :param default_enter: Character(s) to send to correspond to enter key (default:
+
+

). +:type default_enter: str

+
    :param response_return: Character(s) to use in normalized return data to represent
+            enter key (default:
+
+

) +:type response_return: str

+
    :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+            to select smallest of global and specific. Sets default global_delay_factor to .1
+            (default: False)
+    :type fast_cli: boolean
+
+    :param session_log: File path or BufferedIOBase subclass object to write the session log to.
+    :type session_log: str
+
+    :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).
+    :type session_log_record_writes: boolean
+
+    :param session_log_file_mode: "write" or "append" for session_log file mode
+            (default: "write")
+    :type session_log_file_mode: str
+
+    :param allow_auto_change: Allow automatic configuration changes for terminal settings.
+            (default: False)
+    :type allow_auto_change: bool
+
+    :param encoding: Encoding to be used when writing bytes to the output channel.
+            (default: ascii)
+    :type encoding: str
+
+    :param sock: An open socket or socket-like object (such as a `.Channel`) to use for
+            communication to the target host (default: None).
+    :type sock: socket
+
+    :param global_cmd_verify: Control whether command echo verification is enabled or disabled
+            (default: None). Global attribute takes precedence over function `cmd_verify`
+            argument. Value of `None` indicates to use function `cmd_verify` argument.
+    :type global_cmd_verify: bool|None
+
+
+Source code +
class CentecOSBase(CiscoBaseConnection):
+    def session_preparation(self):
+        """Prepare the session after the connection has been established."""
+        self._test_channel_read(pattern=r"[>#]")
+        self.set_base_prompt()
+        self.disable_paging()
+        self.set_terminal_width(command="terminal length 0")
+        # Clear the read buffer
+        time.sleep(0.3 * self.global_delay_factor)
+        self.clear_buffer()
+
+    def config_mode(self, config_command="configure terminal", pattern=""):
+        """
+        Enter into configuration mode on remote device.
+
+        Centec IOS devices abbreviate the prompt at 20 chars in config mode
+        """
+        if not pattern:
+            pattern = re.escape(self.base_prompt[:16])
+
+        return super().config_mode(config_command=config_command, pattern=pattern)
+
+    def save_config(self, cmd="write", confirm=False, confirm_response=""):
+        """Save config: write"""
+        return super().save_config(
+            cmd=cmd, confirm=confirm, confirm_response=confirm_response
+        )
+
+
+

Ancestors

+ +

Subclasses

+ +

Methods

+
+
+def save_config(self, cmd='write', confirm=False, confirm_response='') +
+
+

Save config: write

+
+Source code +
    def save_config(self, cmd="write", confirm=False, confirm_response=""):
+        """Save config: write"""
+        return super().save_config(
+            cmd=cmd, confirm=confirm, confirm_response=confirm_response
+        )
+
+
+
+def session_preparation(self) +
+
+

Prepare the session after the connection has been established.

+
+Source code +
def session_preparation(self):
+        """Prepare the session after the connection has been established."""
+        self._test_channel_read(pattern=r"[>#]")
+        self.set_base_prompt()
+        self.disable_paging()
+        self.set_terminal_width(command="terminal length 0")
+        # Clear the read buffer
+        time.sleep(0.3 * self.global_delay_factor)
+        self.clear_buffer()
+
+
+
+

Inherited members

+ +
+
+class centecOSSSH +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +
+
+

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
+        provided.
+    :type ip: str
+
+    :param host: Hostname of target device. Not required if `ip` is
+            provided.
+    :type host: str
+
+    :param username: Username to authenticate against target device if
+            required.
+    :type username: str
+
+    :param password: Password to authenticate against target device if
+            required.
+    :type password: str
+
+    :param secret: The enable password if target device requires one.
+    :type secret: str
+
+    :param port: The destination port used to connect to the target
+            device.
+    :type port: int or None
+
+    :param device_type: Class selection based on device type.
+    :type device_type: str
+
+    :param verbose: Enable additional messages to standard output.
+    :type verbose: bool
+
+    :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
+    :type global_delay_factor: int
+
+    :param use_keys: Connect to target device using SSH keys.
+    :type use_keys: bool
+
+    :param key_file: Filename path of the SSH key file to use.
+    :type key_file: str
+
+    :param pkey: SSH key object to use.
+    :type pkey: paramiko.PKey
+
+    :param passphrase: Passphrase to use for encrypted key; password will be used for key
+            decryption if not specified.
+    :type passphrase: str
+
+    :param allow_agent: Enable use of SSH key-agent.
+    :type allow_agent: bool
+
+    :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
+            means unknown SSH host keys will be accepted).
+    :type ssh_strict: bool
+
+    :param system_host_keys: Load host keys from the users known_hosts file.
+    :type system_host_keys: bool
+    :param alt_host_keys: If `True` host keys will be loaded from the file specified in
+            alt_key_file.
+    :type alt_host_keys: bool
+
+    :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
+    :type alt_key_file: str
+
+    :param ssh_config_file: File name of OpenSSH configuration file.
+    :type ssh_config_file: str
+
+    :param timeout: Connection timeout.
+    :type timeout: float
+
+    :param session_timeout: Set a timeout for parallel requests.
+    :type session_timeout: float
+
+    :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
+    :type auth_timeout: float
+
+    :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+    :type banner_timeout: float
+
+    :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
+            Currently defaults to 0, for backwards compatibility (it will not attempt
+            to keep the connection alive).
+    :type keepalive: int
+
+    :param default_enter: Character(s) to send to correspond to enter key (default:
+
+

). +:type default_enter: str

+
    :param response_return: Character(s) to use in normalized return data to represent
+            enter key (default:
+
+

) +:type response_return: str

+
    :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+            to select smallest of global and specific. Sets default global_delay_factor to .1
+            (default: False)
+    :type fast_cli: boolean
+
+    :param session_log: File path or BufferedIOBase subclass object to write the session log to.
+    :type session_log: str
+
+    :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).
+    :type session_log_record_writes: boolean
+
+    :param session_log_file_mode: "write" or "append" for session_log file mode
+            (default: "write")
+    :type session_log_file_mode: str
+
+    :param allow_auto_change: Allow automatic configuration changes for terminal settings.
+            (default: False)
+    :type allow_auto_change: bool
+
+    :param encoding: Encoding to be used when writing bytes to the output channel.
+            (default: ascii)
+    :type encoding: str
+
+    :param sock: An open socket or socket-like object (such as a `.Channel`) to use for
+            communication to the target host (default: None).
+    :type sock: socket
+
+    :param global_cmd_verify: Control whether command echo verification is enabled or disabled
+            (default: None). Global attribute takes precedence over function `cmd_verify`
+            argument. Value of `None` indicates to use function `cmd_verify` argument.
+    :type global_cmd_verify: bool|None
+
+
+Source code +
class centecOSSSH(centecOSBase):
+
+    pass
+
+

Ancestors

+ +

Inherited members

+ +
+
+class centecOSTelnet +(*args, **kwargs) +
+
+

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
+        provided.
+    :type ip: str
+
+    :param host: Hostname of target device. Not required if `ip` is
+            provided.
+    :type host: str
+
+    :param username: Username to authenticate against target device if
+            required.
+    :type username: str
+
+    :param password: Password to authenticate against target device if
+            required.
+    :type password: str
+
+    :param secret: The enable password if target device requires one.
+    :type secret: str
+
+    :param port: The destination port used to connect to the target
+            device.
+    :type port: int or None
+
+    :param device_type: Class selection based on device type.
+    :type device_type: str
+
+    :param verbose: Enable additional messages to standard output.
+    :type verbose: bool
+
+    :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
+    :type global_delay_factor: int
+
+    :param use_keys: Connect to target device using SSH keys.
+    :type use_keys: bool
+
+    :param key_file: Filename path of the SSH key file to use.
+    :type key_file: str
+
+    :param pkey: SSH key object to use.
+    :type pkey: paramiko.PKey
+
+    :param passphrase: Passphrase to use for encrypted key; password will be used for key
+            decryption if not specified.
+    :type passphrase: str
+
+    :param allow_agent: Enable use of SSH key-agent.
+    :type allow_agent: bool
+
+    :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
+            means unknown SSH host keys will be accepted).
+    :type ssh_strict: bool
+
+    :param system_host_keys: Load host keys from the users known_hosts file.
+    :type system_host_keys: bool
+    :param alt_host_keys: If `True` host keys will be loaded from the file specified in
+            alt_key_file.
+    :type alt_host_keys: bool
+
+    :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
+    :type alt_key_file: str
+
+    :param ssh_config_file: File name of OpenSSH configuration file.
+    :type ssh_config_file: str
+
+    :param timeout: Connection timeout.
+    :type timeout: float
+
+    :param session_timeout: Set a timeout for parallel requests.
+    :type session_timeout: float
+
+    :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
+    :type auth_timeout: float
+
+    :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+    :type banner_timeout: float
+
+    :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
+            Currently defaults to 0, for backwards compatibility (it will not attempt
+            to keep the connection alive).
+    :type keepalive: int
+
+    :param default_enter: Character(s) to send to correspond to enter key (default:
+
+

). +:type default_enter: str

+
    :param response_return: Character(s) to use in normalized return data to represent
+            enter key (default:
+
+

) +:type response_return: str

+
    :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+            to select smallest of global and specific. Sets default global_delay_factor to .1
+            (default: False)
+    :type fast_cli: boolean
+
+    :param session_log: File path or BufferedIOBase subclass object to write the session log to.
+    :type session_log: str
+
+    :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).
+    :type session_log_record_writes: boolean
+
+    :param session_log_file_mode: "write" or "append" for session_log file mode
+            (default: "write")
+    :type session_log_file_mode: str
+
+    :param allow_auto_change: Allow automatic configuration changes for terminal settings.
+            (default: False)
+    :type allow_auto_change: bool
+
+    :param encoding: Encoding to be used when writing bytes to the output channel.
+            (default: ascii)
+    :type encoding: str
+
+    :param sock: An open socket or socket-like object (such as a `.Channel`) to use for
+            communication to the target host (default: None).
+    :type sock: socket
+
+    :param global_cmd_verify: Control whether command echo verification is enabled or disabled
+            (default: None). Global attribute takes precedence over function `cmd_verify`
+            argument. Value of `None` indicates to use function `cmd_verify` argument.
+    :type global_cmd_verify: bool|None
+
+
+Source code +
class CentecOSTelnet(CentecOSBase):
+
+    pass
+
+

Ancestors

+ +

Inherited members

+ +
+
+
+
+ +
+ + + + + \ No newline at end of file diff --git a/docs/netmiko/centec/index.html b/docs/netmiko/centec/index.html new file mode 100644 index 000000000..16e6fff50 --- /dev/null +++ b/docs/netmiko/centec/index.html @@ -0,0 +1,470 @@ + + + + + + +netmiko.centec API documentation + + + + + + + + + +
+
+
+

Module netmiko.centec

+
+
+
+Source code +
from netmiko.centec.centec_os import centecOSSSH, centecOSTelnet
+
+__all__ = ["centecOSSSH", "centecOSTelnet"]
+
+
+
+

Sub-modules

+
+
netmiko.centec.centec_os
+
+

centec RGOS Support

+
+
+
+
+
+
+
+
+

Classes

+
+
+class centecOSSSH +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +
+
+

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
+        provided.
+    :type ip: str
+
+    :param host: Hostname of target device. Not required if `ip` is
+            provided.
+    :type host: str
+
+    :param username: Username to authenticate against target device if
+            required.
+    :type username: str
+
+    :param password: Password to authenticate against target device if
+            required.
+    :type password: str
+
+    :param secret: The enable password if target device requires one.
+    :type secret: str
+
+    :param port: The destination port used to connect to the target
+            device.
+    :type port: int or None
+
+    :param device_type: Class selection based on device type.
+    :type device_type: str
+
+    :param verbose: Enable additional messages to standard output.
+    :type verbose: bool
+
+    :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
+    :type global_delay_factor: int
+
+    :param use_keys: Connect to target device using SSH keys.
+    :type use_keys: bool
+
+    :param key_file: Filename path of the SSH key file to use.
+    :type key_file: str
+
+    :param pkey: SSH key object to use.
+    :type pkey: paramiko.PKey
+
+    :param passphrase: Passphrase to use for encrypted key; password will be used for key
+            decryption if not specified.
+    :type passphrase: str
+
+    :param allow_agent: Enable use of SSH key-agent.
+    :type allow_agent: bool
+
+    :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
+            means unknown SSH host keys will be accepted).
+    :type ssh_strict: bool
+
+    :param system_host_keys: Load host keys from the users known_hosts file.
+    :type system_host_keys: bool
+    :param alt_host_keys: If `True` host keys will be loaded from the file specified in
+            alt_key_file.
+    :type alt_host_keys: bool
+
+    :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
+    :type alt_key_file: str
+
+    :param ssh_config_file: File name of OpenSSH configuration file.
+    :type ssh_config_file: str
+
+    :param timeout: Connection timeout.
+    :type timeout: float
+
+    :param session_timeout: Set a timeout for parallel requests.
+    :type session_timeout: float
+
+    :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
+    :type auth_timeout: float
+
+    :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+    :type banner_timeout: float
+
+    :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
+            Currently defaults to 0, for backwards compatibility (it will not attempt
+            to keep the connection alive).
+    :type keepalive: int
+
+    :param default_enter: Character(s) to send to correspond to enter key (default:
+
+

). +:type default_enter: str

+
    :param response_return: Character(s) to use in normalized return data to represent
+            enter key (default:
+
+

) +:type response_return: str

+
    :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+            to select smallest of global and specific. Sets default global_delay_factor to .1
+            (default: False)
+    :type fast_cli: boolean
+
+    :param session_log: File path or BufferedIOBase subclass object to write the session log to.
+    :type session_log: str
+
+    :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).
+    :type session_log_record_writes: boolean
+
+    :param session_log_file_mode: "write" or "append" for session_log file mode
+            (default: "write")
+    :type session_log_file_mode: str
+
+    :param allow_auto_change: Allow automatic configuration changes for terminal settings.
+            (default: False)
+    :type allow_auto_change: bool
+
+    :param encoding: Encoding to be used when writing bytes to the output channel.
+            (default: ascii)
+    :type encoding: str
+
+    :param sock: An open socket or socket-like object (such as a `.Channel`) to use for
+            communication to the target host (default: None).
+    :type sock: socket
+
+    :param global_cmd_verify: Control whether command echo verification is enabled or disabled
+            (default: None). Global attribute takes precedence over function `cmd_verify`
+            argument. Value of `None` indicates to use function `cmd_verify` argument.
+    :type global_cmd_verify: bool|None
+
+
+Source code +
class centecOSSSH(centecOSBase):
+
+    pass
+
+

Ancestors

+ +

Inherited members

+ +
+
+class centecOSTelnet +(*args, **kwargs) +
+
+

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
+        provided.
+    :type ip: str
+
+    :param host: Hostname of target device. Not required if `ip` is
+            provided.
+    :type host: str
+
+    :param username: Username to authenticate against target device if
+            required.
+    :type username: str
+
+    :param password: Password to authenticate against target device if
+            required.
+    :type password: str
+
+    :param secret: The enable password if target device requires one.
+    :type secret: str
+
+    :param port: The destination port used to connect to the target
+            device.
+    :type port: int or None
+
+    :param device_type: Class selection based on device type.
+    :type device_type: str
+
+    :param verbose: Enable additional messages to standard output.
+    :type verbose: bool
+
+    :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
+    :type global_delay_factor: int
+
+    :param use_keys: Connect to target device using SSH keys.
+    :type use_keys: bool
+
+    :param key_file: Filename path of the SSH key file to use.
+    :type key_file: str
+
+    :param pkey: SSH key object to use.
+    :type pkey: paramiko.PKey
+
+    :param passphrase: Passphrase to use for encrypted key; password will be used for key
+            decryption if not specified.
+    :type passphrase: str
+
+    :param allow_agent: Enable use of SSH key-agent.
+    :type allow_agent: bool
+
+    :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
+            means unknown SSH host keys will be accepted).
+    :type ssh_strict: bool
+
+    :param system_host_keys: Load host keys from the users known_hosts file.
+    :type system_host_keys: bool
+    :param alt_host_keys: If `True` host keys will be loaded from the file specified in
+            alt_key_file.
+    :type alt_host_keys: bool
+
+    :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
+    :type alt_key_file: str
+
+    :param ssh_config_file: File name of OpenSSH configuration file.
+    :type ssh_config_file: str
+
+    :param timeout: Connection timeout.
+    :type timeout: float
+
+    :param session_timeout: Set a timeout for parallel requests.
+    :type session_timeout: float
+
+    :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
+    :type auth_timeout: float
+
+    :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
+    :type banner_timeout: float
+
+    :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
+            Currently defaults to 0, for backwards compatibility (it will not attempt
+            to keep the connection alive).
+    :type keepalive: int
+
+    :param default_enter: Character(s) to send to correspond to enter key (default:
+
+

). +:type default_enter: str

+
    :param response_return: Character(s) to use in normalized return data to represent
+            enter key (default:
+
+

) +:type response_return: str

+
    :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
+            to select smallest of global and specific. Sets default global_delay_factor to .1
+            (default: False)
+    :type fast_cli: boolean
+
+    :param session_log: File path or BufferedIOBase subclass object to write the session log to.
+    :type session_log: str
+
+    :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).
+    :type session_log_record_writes: boolean
+
+    :param session_log_file_mode: "write" or "append" for session_log file mode
+            (default: "write")
+    :type session_log_file_mode: str
+
+    :param allow_auto_change: Allow automatic configuration changes for terminal settings.
+            (default: False)
+    :type allow_auto_change: bool
+
+    :param encoding: Encoding to be used when writing bytes to the output channel.
+            (default: ascii)
+    :type encoding: str
+
+    :param sock: An open socket or socket-like object (such as a `.Channel`) to use for
+            communication to the target host (default: None).
+    :type sock: socket
+
+    :param global_cmd_verify: Control whether command echo verification is enabled or disabled
+            (default: None). Global attribute takes precedence over function `cmd_verify`
+            argument. Value of `None` indicates to use function `cmd_verify` argument.
+    :type global_cmd_verify: bool|None
+
+
+Source code +
class centecOSTelnet(centecOSBase):
+    def __init__(self, *args, **kwargs):
+        default_enter = kwargs.get("default_enter")
+        kwargs["default_enter"] = "\r\n" if default_enter is None else default_enter
+        super().__init__(*args, **kwargs)
+
+

Ancestors

+ +

Inherited members

+ +
+
+
+
+ +
+ + + + + \ No newline at end of file diff --git a/docs/netmiko/cisco_base_connection.html b/docs/netmiko/cisco_base_connection.html index 29ae6d36b..a9c01e6c1 100644 --- a/docs/netmiko/cisco_base_connection.html +++ b/docs/netmiko/cisco_base_connection.html @@ -628,6 +628,7 @@

Subclasses

  • IpInfusionOcNOSBase
  • OneaccessOneOSBase
  • RuijieOSBase
  • +
  • CentecOSBase
  • Methods

    diff --git a/netmiko/centec/__init__.py b/netmiko/centec/__init__.py new file mode 100644 index 000000000..8ca6d8130 --- /dev/null +++ b/netmiko/centec/__init__.py @@ -0,0 +1,3 @@ +from netmiko.centec.centec_os import CentecOSSSH, CentecOSTelnet + +__all__ = ["CentecOSSSH", "CentecOSTelnet"] diff --git a/netmiko/centec/centec_os.py b/netmiko/centec/centec_os.py new file mode 100644 index 000000000..b34fa6fee --- /dev/null +++ b/netmiko/centec/centec_os.py @@ -0,0 +1,42 @@ +"""Centec OS Support""" +from netmiko.cisco_base_connection import CiscoBaseConnection +import time +import re + + +class CentecOSBase(CiscoBaseConnection): + def session_preparation(self): + """Prepare the session after the connection has been established.""" + self._test_channel_read(pattern=r"[>#]") + self.set_base_prompt() + self.disable_paging() + self.set_terminal_width(command="terminal length 0") + # Clear the read buffer + time.sleep(0.3 * self.global_delay_factor) + self.clear_buffer() + + def config_mode(self, config_command="configure terminal", pattern=""): + """ + Enter into configuration mode on remote device. + + Centec IOS devices abbreviate the prompt at 20 chars in config mode + """ + if not pattern: + pattern = re.escape(self.base_prompt[:16]) + + return super().config_mode(config_command=config_command, pattern=pattern) + + def save_config(self, cmd="write", confirm=False, confirm_response=""): + """Save config: write""" + return super().save_config( + cmd=cmd, confirm=confirm, confirm_response=confirm_response + ) + +class CentecOSSSH(CentecOSBase): + + pass + + +class CentecOSTelnet(CentecOSBase): + + pass diff --git a/netmiko/ssh_dispatcher.py b/netmiko/ssh_dispatcher.py index f45064914..52b707cdd 100755 --- a/netmiko/ssh_dispatcher.py +++ b/netmiko/ssh_dispatcher.py @@ -74,6 +74,7 @@ from netmiko.ruckus import RuckusFastironSSH from netmiko.ruckus import RuckusFastironTelnet from netmiko.ruijie import RuijieOSSSH, RuijieOSTelnet +from netmiko.centec import CentecOSSSH, CentecOSTelnet from netmiko.sophos import SophosSfosSSH from netmiko.terminal_server import TerminalServerSSH from netmiko.terminal_server import TerminalServerTelnet @@ -169,6 +170,7 @@ "rad_etx": RadETXSSH, "ruckus_fastiron": RuckusFastironSSH, "ruijie_os": RuijieOSSSH, + "centec_os": CentecOSSSH, "sophos_sfos": SophosSfosSSH, "ubiquiti_edge": UbiquitiEdgeSSH, "ubiquiti_edgeswitch": UbiquitiEdgeSSH, @@ -234,6 +236,7 @@ CLASS_MAPPER["rad_etx_telnet"] = RadETXTelnet CLASS_MAPPER["ruckus_fastiron_telnet"] = RuckusFastironTelnet CLASS_MAPPER["ruijie_os_telnet"] = RuijieOSTelnet +CLASS_MAPPER["centec_os_telnet"] = CentecOSTelnet # Add serial drivers CLASS_MAPPER["cisco_ios_serial"] = CiscoIosSerial diff --git a/tests/etc/commands.yml.example b/tests/etc/commands.yml.example index bb254cab1..d33cf2e58 100644 --- a/tests/etc/commands.yml.example +++ b/tests/etc/commands.yml.example @@ -415,6 +415,17 @@ ruijie_os: save_config_confirm: False save_config_response: 'OK' +centec_os: + version: "show version" + basic: "show ip interface brief" + extended_output: "show version" + config: + - "ip access-list centec" + - "logging buffer 1000" + config_verification: "show running-config | include interface" + save_config_cmd: 'write' + save_config_response: 'OK' + sophos_sfos: version: "system diagnostics show version-info" basic: "system diagnostics utilities route lookup 172.16.16.16" diff --git a/tests/etc/responses.yml.example b/tests/etc/responses.yml.example index 886b28e91..a405d592a 100644 --- a/tests/etc/responses.yml.example +++ b/tests/etc/responses.yml.example @@ -260,6 +260,14 @@ ruijie_os: file_check_cmd: "logging buffered 8880" save_config: 'OK' +centec_os: + base_prompt: Centec + router_prompt : Centec> + enable_prompt: Centec# + interface_ip: 172.30.31.101 + version_banner: "Centec Networks" + multiple_line_output: "" + sophos_sfos: base_prompt: "console" router_prompt: "console>" diff --git a/tests/etc/test_devices.yml.example b/tests/etc/test_devices.yml.example index 12c287fcb..9fbf5e4f6 100644 --- a/tests/etc/test_devices.yml.example +++ b/tests/etc/test_devices.yml.example @@ -197,6 +197,13 @@ ruijie_os: password: ruijie secret: ruijie +centec_os: + device_type: centec_os + ip: 1.1.1.1 + username: centec + password: centec + secret: centec + sophos_sfos: device_type: sophos_sfos ip: 172.16.16.16 From 43ce93b3aec74ff5cea3bfc7631634d6ce1f3879 Mon Sep 17 00:00:00 2001 From: jinl Date: Fri, 22 May 2020 10:49:55 +0800 Subject: [PATCH 14/42] add centec-switch platform --- netmiko/centec/centec_os.py | 1 + 1 file changed, 1 insertion(+) diff --git a/netmiko/centec/centec_os.py b/netmiko/centec/centec_os.py index b34fa6fee..bb65b510c 100644 --- a/netmiko/centec/centec_os.py +++ b/netmiko/centec/centec_os.py @@ -32,6 +32,7 @@ def save_config(self, cmd="write", confirm=False, confirm_response=""): cmd=cmd, confirm=confirm, confirm_response=confirm_response ) + class CentecOSSSH(CentecOSBase): pass From 75b4be2bad0112c8339e1061f7fb65add92c60ea Mon Sep 17 00:00:00 2001 From: jinl Date: Fri, 22 May 2020 13:18:01 +0800 Subject: [PATCH 15/42] add centec-switch platform --- tests/etc/commands.yml.example | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/etc/commands.yml.example b/tests/etc/commands.yml.example index d33cf2e58..8d72722dc 100644 --- a/tests/etc/commands.yml.example +++ b/tests/etc/commands.yml.example @@ -421,8 +421,7 @@ centec_os: extended_output: "show version" config: - "ip access-list centec" - - "logging buffer 1000" - config_verification: "show running-config | include interface" + config_verification: "show running-config | include ip access-list centec" save_config_cmd: 'write' save_config_response: 'OK' From 36e5ba4dfd08aef32bbce24b514873fe4d853fc8 Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Fri, 22 May 2020 14:50:03 -0700 Subject: [PATCH 16/42] Minor Centec improvements --- netmiko/centec/centec_os.py | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/netmiko/centec/centec_os.py b/netmiko/centec/centec_os.py index bb65b510c..4487fc8e5 100644 --- a/netmiko/centec/centec_os.py +++ b/netmiko/centec/centec_os.py @@ -1,7 +1,6 @@ """Centec OS Support""" from netmiko.cisco_base_connection import CiscoBaseConnection import time -import re class CentecOSBase(CiscoBaseConnection): @@ -10,22 +9,11 @@ def session_preparation(self): self._test_channel_read(pattern=r"[>#]") self.set_base_prompt() self.disable_paging() - self.set_terminal_width(command="terminal length 0") + self.set_terminal_width(command="terminal width 511") # Clear the read buffer time.sleep(0.3 * self.global_delay_factor) self.clear_buffer() - def config_mode(self, config_command="configure terminal", pattern=""): - """ - Enter into configuration mode on remote device. - - Centec IOS devices abbreviate the prompt at 20 chars in config mode - """ - if not pattern: - pattern = re.escape(self.base_prompt[:16]) - - return super().config_mode(config_command=config_command, pattern=pattern) - def save_config(self, cmd="write", confirm=False, confirm_response=""): """Save config: write""" return super().save_config( From 0c312b6ad50fc090066b758b4755d5a4b25721f4 Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Fri, 22 May 2020 14:53:53 -0700 Subject: [PATCH 17/42] Update docs on Centec --- docs/netmiko/centec/centec_os.html | 284 +++++++++++------------- docs/netmiko/centec/index.html | 198 ++++++++--------- docs/netmiko/cisco_base_connection.html | 8 +- 3 files changed, 232 insertions(+), 258 deletions(-) diff --git a/docs/netmiko/centec/centec_os.html b/docs/netmiko/centec/centec_os.html index 6464596b3..b076acfe7 100644 --- a/docs/netmiko/centec/centec_os.html +++ b/docs/netmiko/centec/centec_os.html @@ -5,7 +5,7 @@ netmiko.centec.centec_os API documentation - + @@ -20,43 +20,32 @@

    Module netmiko.centec.centec_os

    -

    centec RGOS Support

    +

    Centec OS Support

    Source code -
    """"""Centec OS Support"""
    +
    """Centec OS Support"""
     from netmiko.cisco_base_connection import CiscoBaseConnection
     import time
    -import re
     
     
     class CentecOSBase(CiscoBaseConnection):
         def session_preparation(self):
    -        """Prepare the session after the connection has been established."""
    -        self._test_channel_read(pattern=r"[>#]")
    +        """Prepare the session after the connection has been established."""
    +        self._test_channel_read(pattern=r"[>#]")
             self.set_base_prompt()
             self.disable_paging()
    -        self.set_terminal_width(command="terminal length 0")
    +        self.set_terminal_width(command="terminal width 511")
             # Clear the read buffer
             time.sleep(0.3 * self.global_delay_factor)
             self.clear_buffer()
     
    -    def config_mode(self, config_command="configure terminal", pattern=""):
    -        """
    -        Enter into configuration mode on remote device.
    -
    -        Centec IOS devices abbreviate the prompt at 20 chars in config mode
    -        """
    -        if not pattern:
    -            pattern = re.escape(self.base_prompt[:16])
    -
    -        return super().config_mode(config_command=config_command, pattern=pattern)
    -
    -    def save_config(self, cmd="write", confirm=False, confirm_response=""):
    -        """Save config: write"""
    +    def save_config(self, cmd="write", confirm=False, confirm_response=""):
    +        """Save config: write"""
             return super().save_config(
                 cmd=cmd, confirm=confirm, confirm_response=confirm_response
             )
     
    +
     class CentecOSSSH(CentecOSBase):
     
         pass
    @@ -64,8 +53,7 @@ 

    Module netmiko.centec.centec_os

    class CentecOSTelnet(CentecOSBase): - pass -
    + pass
    @@ -77,8 +65,8 @@

    Module netmiko.centec.centec_os

    Classes

    -
    -class centecOSBase +
    +class CentecOSBase (ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None)
    @@ -213,32 +201,20 @@

    Classes

    Source code
    class CentecOSBase(CiscoBaseConnection):
         def session_preparation(self):
    -        """Prepare the session after the connection has been established."""
    -        self._test_channel_read(pattern=r"[>#]")
    +        """Prepare the session after the connection has been established."""
    +        self._test_channel_read(pattern=r"[>#]")
             self.set_base_prompt()
             self.disable_paging()
    -        self.set_terminal_width(command="terminal length 0")
    +        self.set_terminal_width(command="terminal width 511")
             # Clear the read buffer
             time.sleep(0.3 * self.global_delay_factor)
             self.clear_buffer()
     
    -    def config_mode(self, config_command="configure terminal", pattern=""):
    -        """
    -        Enter into configuration mode on remote device.
    -
    -        Centec IOS devices abbreviate the prompt at 20 chars in config mode
    -        """
    -        if not pattern:
    -            pattern = re.escape(self.base_prompt[:16])
    -
    -        return super().config_mode(config_command=config_command, pattern=pattern)
    -
    -    def save_config(self, cmd="write", confirm=False, confirm_response=""):
    -        """Save config: write"""
    +    def save_config(self, cmd="write", confirm=False, confirm_response=""):
    +        """Save config: write"""
             return super().save_config(
                 cmd=cmd, confirm=confirm, confirm_response=confirm_response
    -        )
    -
    + )

    Ancestors

      @@ -247,26 +223,26 @@

      Ancestors

    Subclasses

    Methods

    -
    +
    def save_config(self, cmd='write', confirm=False, confirm_response='')

    Save config: write

    Source code -
        def save_config(self, cmd="write", confirm=False, confirm_response=""):
    -        """Save config: write"""
    -        return super().save_config(
    -            cmd=cmd, confirm=confirm, confirm_response=confirm_response
    -        )
    +
    def save_config(self, cmd="write", confirm=False, confirm_response=""):
    +    """Save config: write"""
    +    return super().save_config(
    +        cmd=cmd, confirm=confirm, confirm_response=confirm_response
    +    )
    -
    +
    def session_preparation(self)
    @@ -274,14 +250,14 @@

    Methods

    Source code
    def session_preparation(self):
    -        """Prepare the session after the connection has been established."""
    -        self._test_channel_read(pattern=r"[>#]")
    -        self.set_base_prompt()
    -        self.disable_paging()
    -        self.set_terminal_width(command="terminal length 0")
    -        # Clear the read buffer
    -        time.sleep(0.3 * self.global_delay_factor)
    -        self.clear_buffer()
    + """Prepare the session after the connection has been established.""" + self._test_channel_read(pattern=r"[>#]") + self.set_base_prompt() + self.disable_paging() + self.set_terminal_width(command="terminal width 511") + # Clear the read buffer + time.sleep(0.3 * self.global_delay_factor) + self.clear_buffer()
    @@ -331,8 +307,8 @@

    Inherited members

    -
    -class centecOSSSH +
    +class CentecOSSSH (ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None)
    @@ -465,67 +441,67 @@

    Inherited members

    Source code -
    class centecOSSSH(centecOSBase):
    +
    class CentecOSSSH(CentecOSBase):
     
         pass

    Ancestors

    Inherited members

    -
    -class centecOSTelnet -(*args, **kwargs) +
    +class CentecOSTelnet +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None)

    Base Class for cisco-like behavior.

    @@ -663,54 +639,54 @@

    Inherited members

    Ancestors

    Inherited members

    @@ -732,17 +708,17 @@

    Index

  • Classes

  • diff --git a/docs/netmiko/centec/index.html b/docs/netmiko/centec/index.html index 16e6fff50..760e1ff5b 100644 --- a/docs/netmiko/centec/index.html +++ b/docs/netmiko/centec/index.html @@ -22,9 +22,9 @@

    Module netmiko.centec

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

    Sub-modules

    netmiko.centec.centec_os
    -

    centec RGOS Support

    +

    Centec OS Support

    @@ -43,8 +43,8 @@

    Sub-modules

    Classes

    -
    -class centecOSSSH +
    +class CentecOSSSH (ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None)
    @@ -177,67 +177,67 @@

    Classes

    Source code -
    class centecOSSSH(centecOSBase):
    +
    class CentecOSSSH(CentecOSBase):
     
         pass

    Ancestors

    Inherited members

    -
    -class centecOSTelnet -(*args, **kwargs) +
    +class CentecOSTelnet +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None)

    Base Class for cisco-like behavior.

    @@ -369,62 +369,60 @@

    Inherited members

    Source code -
    class centecOSTelnet(centecOSBase):
    -    def __init__(self, *args, **kwargs):
    -        default_enter = kwargs.get("default_enter")
    -        kwargs["default_enter"] = "\r\n" if default_enter is None else default_enter
    -        super().__init__(*args, **kwargs)
    +
    class CentecOSTelnet(CentecOSBase):
    +
    +    pass

    Ancestors

    Inherited members

    @@ -451,10 +449,10 @@

    Index

  • Classes

  • diff --git a/docs/netmiko/cisco_base_connection.html b/docs/netmiko/cisco_base_connection.html index a9c01e6c1..33e6e18ae 100644 --- a/docs/netmiko/cisco_base_connection.html +++ b/docs/netmiko/cisco_base_connection.html @@ -54,7 +54,7 @@

    Module netmiko.cisco_base_connection

    """ return super().check_config_mode(check_string=check_string, pattern=pattern) - def config_mode(self, config_command="config term", pattern=""): + def config_mode(self, config_command="configure terminal", pattern=""): """ Enter into configuration mode on remote device. @@ -421,7 +421,7 @@

    Classes

    """ return super().check_config_mode(check_string=check_string, pattern=pattern) - def config_mode(self, config_command="config term", pattern=""): + def config_mode(self, config_command="configure terminal", pattern=""): """ Enter into configuration mode on remote device. @@ -682,14 +682,14 @@

    Methods

    -def config_mode(self, config_command='config term', pattern='') +def config_mode(self, config_command='configure terminal', pattern='')

    Enter into configuration mode on remote device.

    Cisco IOS devices abbreviate the prompt at 20 chars in config mode

    Source code -
    def config_mode(self, config_command="config term", pattern=""):
    +
    def config_mode(self, config_command="configure terminal", pattern=""):
         """
         Enter into configuration mode on remote device.
     
    
    From c8e664e9c6e1ba770d93919fec6fbecaa448d40b Mon Sep 17 00:00:00 2001
    From: Kirk Byers 
    Date: Fri, 22 May 2020 15:36:53 -0700
    Subject: [PATCH 18/42] Sixwind Driver Update
    
    ---
     netmiko/sixwind/__init__.py                   |  4 +--
     netmiko/sixwind/{sixwind.py => sixwind_os.py} | 30 ++++++++-----------
     netmiko/ssh_dispatcher.py                     |  4 +--
     3 files changed, 17 insertions(+), 21 deletions(-)
     rename netmiko/sixwind/{sixwind.py => sixwind_os.py} (87%)
    
    diff --git a/netmiko/sixwind/__init__.py b/netmiko/sixwind/__init__.py
    index ba757bcb1..8d36e89b7 100644
    --- a/netmiko/sixwind/__init__.py
    +++ b/netmiko/sixwind/__init__.py
    @@ -1,3 +1,3 @@
    -from netmiko.sixwind.sixwind import SixwindSSH, SixwindBase
    +from netmiko.sixwind.sixwind_os import SixwindOSSSH
     
    -__all__ = ["SixwindSSH", "SixwindBase"]
    +__all__ = ["SixwindOSSSH"]
    diff --git a/netmiko/sixwind/sixwind.py b/netmiko/sixwind/sixwind_os.py
    similarity index 87%
    rename from netmiko/sixwind/sixwind.py
    rename to netmiko/sixwind/sixwind_os.py
    index 5d66bdebe..e6ffc6dd2 100644
    --- a/netmiko/sixwind/sixwind.py
    +++ b/netmiko/sixwind/sixwind_os.py
    @@ -2,15 +2,9 @@
     from netmiko.cisco_base_connection import CiscoBaseConnection
     
     
    -class SixwindBase(CiscoBaseConnection):
    -    def disable_paging(self, *args, **kwargs):
    -        """6WIND requires no-pager at the end of command, not implemented at this time."""
    -
    -    pass
    -
    +class SixwindOSBase(CiscoBaseConnection):
         def session_preparation(self):
             """Prepare the session after the connection has been established."""
    -
             self.ansi_escape_codes = True
             self._test_channel_read()
             self.set_base_prompt()
    @@ -18,6 +12,10 @@ def session_preparation(self):
             time.sleep(0.3 * self.global_delay_factor)
             self.clear_buffer()
     
    +    def disable_paging(self, *args, **kwargs):
    +        """6WIND requires no-pager at the end of command, not implemented at this time."""
    +        pass
    +
         def set_base_prompt(
             self, pri_prompt_terminator=">", alt_prompt_terminator="#", delay_factor=1
         ):
    @@ -32,18 +30,16 @@ def set_base_prompt(
             self.base_prompt = prompt
             return self.base_prompt
     
    -    def config_mode(self, config_command="edit running"):
    +    def config_mode(self, config_command="edit running", pattern=""):
             """Enter configuration mode."""
     
    -        return super().config_mode(config_command=config_command)
    +        return super().config_mode(config_command=config_command, pattern=pattern)
     
         def commit(self, comment="", delay_factor=1):
             """
             Commit the candidate configuration.
    -        Commit the entered configuration. Raise an error and return the failure
    -        if the commit fails.
    -        default:
    -           command_string = commit
    +
    +        Raise an error and return the failure if the commit fails.
             """
     
             delay_factor = self.select_delay_factor(delay_factor)
    @@ -51,7 +47,7 @@ def commit(self, comment="", delay_factor=1):
             command_string = "commit"
     
             output = self.config_mode()
    -        output += self.send_command_expect(
    +        output += self.send_command(
                 command_string,
                 strip_prompt=False,
                 strip_command=False,
    @@ -70,10 +66,10 @@ def exit_config_mode(self, exit_config="exit", pattern=r">"):
     
             return super().exit_config_mode(exit_config=exit_config, pattern=pattern)
     
    -    def check_config_mode(self, check_string="#"):
    +    def check_config_mode(self, check_string="#", pattern=""):
             """Checks whether in configuration mode. Returns a boolean."""
     
    -        return super().check_config_mode(check_string=check_string)
    +        return super().check_config_mode(check_string=check_string, pattern=pattern)
     
         def save_config(
             self, cmd="copy running startup", confirm=True, confirm_response="y"
    @@ -100,6 +96,6 @@ def exit_enable_mode(self, *args, **kwargs):
             pass
     
     
    -class SixwindSSH(SixwindBase):
    +class SixwindOSSSH(SixwindOSBase):
     
         pass
    diff --git a/netmiko/ssh_dispatcher.py b/netmiko/ssh_dispatcher.py
    index 07cd588ef..a8317b2fe 100755
    --- a/netmiko/ssh_dispatcher.py
    +++ b/netmiko/ssh_dispatcher.py
    @@ -75,7 +75,7 @@
     from netmiko.ruckus import RuckusFastironSSH
     from netmiko.ruckus import RuckusFastironTelnet
     from netmiko.ruijie import RuijieOSSSH, RuijieOSTelnet
    -from netmiko.sixwind import SixwindSSH
    +from netmiko.sixwind import SixwindOSSSH
     from netmiko.sophos import SophosSfosSSH
     from netmiko.terminal_server import TerminalServerSSH
     from netmiko.terminal_server import TerminalServerTelnet
    @@ -172,7 +172,7 @@
         "rad_etx": RadETXSSH,
         "ruckus_fastiron": RuckusFastironSSH,
         "ruijie_os": RuijieOSSSH,
    -    "sixwind": SixwindSSH,
    +    "sixwind_os": SixwindOSSSH,
         "sophos_sfos": SophosSfosSSH,
         "ubiquiti_edge": UbiquitiEdgeSSH,
         "ubiquiti_edgeswitch": UbiquitiEdgeSSH,
    
    From a9c9dc9e7c82237a540ffd686d82c662014023a3 Mon Sep 17 00:00:00 2001
    From: Kirk Byers 
    Date: Sat, 23 May 2020 11:21:42 -0700
    Subject: [PATCH 19/42] Update to Centec driver and Docs
    
    ---
     docs/netmiko/centec/centec_os.html | 3 ---
     netmiko/centec/centec_os.py        | 1 -
     2 files changed, 4 deletions(-)
    
    diff --git a/docs/netmiko/centec/centec_os.html b/docs/netmiko/centec/centec_os.html
    index b076acfe7..6588eda49 100644
    --- a/docs/netmiko/centec/centec_os.html
    +++ b/docs/netmiko/centec/centec_os.html
    @@ -34,7 +34,6 @@ 

    Module netmiko.centec.centec_os

    self._test_channel_read(pattern=r"[>#]") self.set_base_prompt() self.disable_paging() - self.set_terminal_width(command="terminal width 511") # Clear the read buffer time.sleep(0.3 * self.global_delay_factor) self.clear_buffer() @@ -205,7 +204,6 @@

    Classes

    self._test_channel_read(pattern=r"[>#]") self.set_base_prompt() self.disable_paging() - self.set_terminal_width(command="terminal width 511") # Clear the read buffer time.sleep(0.3 * self.global_delay_factor) self.clear_buffer() @@ -254,7 +252,6 @@

    Methods

    self._test_channel_read(pattern=r"[>#]") self.set_base_prompt() self.disable_paging() - self.set_terminal_width(command="terminal width 511") # Clear the read buffer time.sleep(0.3 * self.global_delay_factor) self.clear_buffer()
    diff --git a/netmiko/centec/centec_os.py b/netmiko/centec/centec_os.py index 4487fc8e5..b0411ae28 100644 --- a/netmiko/centec/centec_os.py +++ b/netmiko/centec/centec_os.py @@ -9,7 +9,6 @@ def session_preparation(self): self._test_channel_read(pattern=r"[>#]") self.set_base_prompt() self.disable_paging() - self.set_terminal_width(command="terminal width 511") # Clear the read buffer time.sleep(0.3 * self.global_delay_factor) self.clear_buffer() From 20e0ab5c06e2e20df8444623d490c889094f5a02 Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Mon, 25 May 2020 19:46:05 -0700 Subject: [PATCH 20/42] Updating docs --- docs/netmiko/base_connection.html | 42 +- docs/netmiko/cisco_base_connection.html | 3 +- docs/netmiko/cloudgenix/cloudgenix_ion.html | 8 +- docs/netmiko/cloudgenix/index.html | 6 +- docs/netmiko/fortinet/fortinet_ssh.html | 8 +- docs/netmiko/fortinet/index.html | 6 +- docs/netmiko/huawei/huawei_smartax.html | 8 +- docs/netmiko/huawei/index.html | 4 +- docs/netmiko/index.html | 38 +- docs/netmiko/sixwind/index.html | 273 +++++++ docs/netmiko/sixwind/sixwind_os.html | 832 ++++++++++++++++++++ 11 files changed, 1157 insertions(+), 71 deletions(-) create mode 100644 docs/netmiko/sixwind/index.html create mode 100644 docs/netmiko/sixwind/sixwind_os.html diff --git a/docs/netmiko/base_connection.html b/docs/netmiko/base_connection.html index b130f3029..89fb32192 100644 --- a/docs/netmiko/base_connection.html +++ b/docs/netmiko/base_connection.html @@ -1050,11 +1050,8 @@

    Module netmiko.base_connection

    log.debug("In disable_paging") log.debug(f"Command: {command}") self.write_channel(command) - # Make sure you read until you detect the command echo (avoid getting out of sync) - if self.global_cmd_verify is not False: - output = self.read_until_pattern(pattern=re.escape(command.strip())) - else: - output = self.read_until_prompt() + # Do not use command_verify here as still in session_preparation stage. + output = self.read_until_prompt() log.debug(f"{output}") log.debug("Exiting disable_paging") return output @@ -1076,11 +1073,8 @@

    Module netmiko.base_connection

    delay_factor = self.select_delay_factor(delay_factor) command = self.normalize_cmd(command) self.write_channel(command) - # Make sure you read until you detect the command echo (avoid getting out of sync) - if self.global_cmd_verify is not False: - output = self.read_until_pattern(pattern=re.escape(command.strip())) - else: - output = self.read_until_prompt() + # Do not use command_verify here as still in session_preparation stage. + output = self.read_until_prompt() return output def set_base_prompt( @@ -3083,11 +3077,8 @@

    Classes

    log.debug("In disable_paging") log.debug(f"Command: {command}") self.write_channel(command) - # Make sure you read until you detect the command echo (avoid getting out of sync) - if self.global_cmd_verify is not False: - output = self.read_until_pattern(pattern=re.escape(command.strip())) - else: - output = self.read_until_prompt() + # Do not use command_verify here as still in session_preparation stage. + output = self.read_until_prompt() log.debug(f"{output}") log.debug("Exiting disable_paging") return output @@ -3109,11 +3100,8 @@

    Classes

    delay_factor = self.select_delay_factor(delay_factor) command = self.normalize_cmd(command) self.write_channel(command) - # Make sure you read until you detect the command echo (avoid getting out of sync) - if self.global_cmd_verify is not False: - output = self.read_until_pattern(pattern=re.escape(command.strip())) - else: - output = self.read_until_prompt() + # Do not use command_verify here as still in session_preparation stage. + output = self.read_until_prompt() return output def set_base_prompt( @@ -4195,11 +4183,8 @@

    Methods

    log.debug("In disable_paging") log.debug(f"Command: {command}") self.write_channel(command) - # Make sure you read until you detect the command echo (avoid getting out of sync) - if self.global_cmd_verify is not False: - output = self.read_until_pattern(pattern=re.escape(command.strip())) - else: - output = self.read_until_prompt() + # Do not use command_verify here as still in session_preparation stage. + output = self.read_until_prompt() log.debug(f"{output}") log.debug("Exiting disable_paging") return output
    @@ -5372,11 +5357,8 @@

    Methods

    delay_factor = self.select_delay_factor(delay_factor) command = self.normalize_cmd(command) self.write_channel(command) - # Make sure you read until you detect the command echo (avoid getting out of sync) - if self.global_cmd_verify is not False: - output = self.read_until_pattern(pattern=re.escape(command.strip())) - else: - output = self.read_until_prompt() + # Do not use command_verify here as still in session_preparation stage. + output = self.read_until_prompt() return output
    diff --git a/docs/netmiko/cisco_base_connection.html b/docs/netmiko/cisco_base_connection.html index 33e6e18ae..727691d68 100644 --- a/docs/netmiko/cisco_base_connection.html +++ b/docs/netmiko/cisco_base_connection.html @@ -620,6 +620,7 @@

    Ancestors

    Subclasses

    Methods

    diff --git a/docs/netmiko/cloudgenix/cloudgenix_ion.html b/docs/netmiko/cloudgenix/cloudgenix_ion.html index 282d0540e..e2c875e25 100644 --- a/docs/netmiko/cloudgenix/cloudgenix_ion.html +++ b/docs/netmiko/cloudgenix/cloudgenix_ion.html @@ -36,7 +36,7 @@

    Module netmiko.cloudgenix.cloudgenix_ion

    self.write_channel(self.RETURN) self.set_base_prompt(delay_factor=5) - def disable_paging(self): + def disable_paging(self, *args, **kwargs): """Cloud Genix ION sets terminal height in establish_connection""" return "" @@ -227,7 +227,7 @@

    Classes

    self.write_channel(self.RETURN) self.set_base_prompt(delay_factor=5) - def disable_paging(self): + def disable_paging(self, *args, **kwargs): """Cloud Genix ION sets terminal height in establish_connection""" return "" @@ -296,13 +296,13 @@

    Methods

    -def disable_paging(self) +def disable_paging(self, *args, **kwargs)

    Cloud Genix ION sets terminal height in establish_connection

    Source code -
    def disable_paging(self):
    +
    def disable_paging(self, *args, **kwargs):
         """Cloud Genix ION sets terminal height in establish_connection"""
         return ""
    diff --git a/docs/netmiko/cloudgenix/index.html b/docs/netmiko/cloudgenix/index.html index 078544e10..42040ab03 100644 --- a/docs/netmiko/cloudgenix/index.html +++ b/docs/netmiko/cloudgenix/index.html @@ -188,7 +188,7 @@

    Classes

    self.write_channel(self.RETURN) self.set_base_prompt(delay_factor=5) - def disable_paging(self): + def disable_paging(self, *args, **kwargs): """Cloud Genix ION sets terminal height in establish_connection""" return "" @@ -257,13 +257,13 @@

    Methods

    -def disable_paging(self) +def disable_paging(self, *args, **kwargs)

    Cloud Genix ION sets terminal height in establish_connection

    Source code -
    def disable_paging(self):
    +
    def disable_paging(self, *args, **kwargs):
         """Cloud Genix ION sets terminal height in establish_connection"""
         return ""
    diff --git a/docs/netmiko/fortinet/fortinet_ssh.html b/docs/netmiko/fortinet/fortinet_ssh.html index de8c05f6d..47b6e02a9 100644 --- a/docs/netmiko/fortinet/fortinet_ssh.html +++ b/docs/netmiko/fortinet/fortinet_ssh.html @@ -62,7 +62,7 @@

    Module netmiko.fortinet.fortinet_ssh

    time.sleep(0.3 * self.global_delay_factor) self.clear_buffer() - def disable_paging(self, delay_factor=1): + def disable_paging(self, delay_factor=1, **kwargs): """Disable paging is only available with specific roles so it may fail.""" check_command = "get system status | grep Virtual" output = self.send_command_timing(check_command) @@ -312,7 +312,7 @@

    Classes

    time.sleep(0.3 * self.global_delay_factor) self.clear_buffer() - def disable_paging(self, delay_factor=1): + def disable_paging(self, delay_factor=1, **kwargs): """Disable paging is only available with specific roles so it may fail.""" check_command = "get system status | grep Virtual" output = self.send_command_timing(check_command) @@ -426,13 +426,13 @@

    Methods

    -def disable_paging(self, delay_factor=1) +def disable_paging(self, delay_factor=1, **kwargs)

    Disable paging is only available with specific roles so it may fail.

    Source code -
    def disable_paging(self, delay_factor=1):
    +
    def disable_paging(self, delay_factor=1, **kwargs):
         """Disable paging is only available with specific roles so it may fail."""
         check_command = "get system status | grep Virtual"
         output = self.send_command_timing(check_command)
    diff --git a/docs/netmiko/fortinet/index.html b/docs/netmiko/fortinet/index.html
    index 7e776d616..645d5e709 100644
    --- a/docs/netmiko/fortinet/index.html
    +++ b/docs/netmiko/fortinet/index.html
    @@ -211,7 +211,7 @@ 

    Classes

    time.sleep(0.3 * self.global_delay_factor) self.clear_buffer() - def disable_paging(self, delay_factor=1): + def disable_paging(self, delay_factor=1, **kwargs): """Disable paging is only available with specific roles so it may fail.""" check_command = "get system status | grep Virtual" output = self.send_command_timing(check_command) @@ -325,13 +325,13 @@

    Methods

    -def disable_paging(self, delay_factor=1) +def disable_paging(self, delay_factor=1, **kwargs)

    Disable paging is only available with specific roles so it may fail.

    Source code -
    def disable_paging(self, delay_factor=1):
    +
    def disable_paging(self, delay_factor=1, **kwargs):
         """Disable paging is only available with specific roles so it may fail."""
         check_command = "get system status | grep Virtual"
         output = self.send_command_timing(check_command)
    diff --git a/docs/netmiko/huawei/huawei_smartax.html b/docs/netmiko/huawei/huawei_smartax.html
    index 86dd935ee..34d4ff350 100644
    --- a/docs/netmiko/huawei/huawei_smartax.html
    +++ b/docs/netmiko/huawei/huawei_smartax.html
    @@ -74,8 +74,8 @@ 

    Module netmiko.huawei.huawei_smartax

    log.debug(f"{output}") log.debug("Exiting disable_smart_interaction") - def disable_paging(self, command="scroll"): - return super().disable_paging(command=command) + def disable_paging(self, command="scroll", **kwargs): + return super().disable_paging(command=command, **kwargs) def config_mode(self, config_command="config", pattern=""): """Enter configuration mode.""" @@ -295,8 +295,8 @@

    Classes

    log.debug(f"{output}") log.debug("Exiting disable_smart_interaction") - def disable_paging(self, command="scroll"): - return super().disable_paging(command=command) + def disable_paging(self, command="scroll", **kwargs): + return super().disable_paging(command=command, **kwargs) def config_mode(self, config_command="config", pattern=""): """Enter configuration mode.""" diff --git a/docs/netmiko/huawei/index.html b/docs/netmiko/huawei/index.html index 183702529..3429a04c0 100644 --- a/docs/netmiko/huawei/index.html +++ b/docs/netmiko/huawei/index.html @@ -456,8 +456,8 @@

    Inherited members

    log.debug(f"{output}") log.debug("Exiting disable_smart_interaction") - def disable_paging(self, command="scroll"): - return super().disable_paging(command=command) + def disable_paging(self, command="scroll", **kwargs): + return super().disable_paging(command=command, **kwargs) def config_mode(self, config_command="config", pattern=""): """Enter configuration mode.""" diff --git a/docs/netmiko/index.html b/docs/netmiko/index.html index 54220c5da..7bcd2ab05 100644 --- a/docs/netmiko/index.html +++ b/docs/netmiko/index.html @@ -105,6 +105,10 @@

    Sub-modules

    +
    netmiko.centec
    +
    +
    +
    netmiko.checkpoint
    @@ -257,6 +261,10 @@

    Sub-modules

    Netmiko SCP operations …

    +
    netmiko.sixwind
    +
    +
    +
    netmiko.snmp_autodetect

    This module is used to auto-detect the type of a device in order to automatically create a @@ -1634,11 +1642,8 @@

    Classes

    log.debug("In disable_paging") log.debug(f"Command: {command}") self.write_channel(command) - # Make sure you read until you detect the command echo (avoid getting out of sync) - if self.global_cmd_verify is not False: - output = self.read_until_pattern(pattern=re.escape(command.strip())) - else: - output = self.read_until_prompt() + # Do not use command_verify here as still in session_preparation stage. + output = self.read_until_prompt() log.debug(f"{output}") log.debug("Exiting disable_paging") return output @@ -1660,11 +1665,8 @@

    Classes

    delay_factor = self.select_delay_factor(delay_factor) command = self.normalize_cmd(command) self.write_channel(command) - # Make sure you read until you detect the command echo (avoid getting out of sync) - if self.global_cmd_verify is not False: - output = self.read_until_pattern(pattern=re.escape(command.strip())) - else: - output = self.read_until_prompt() + # Do not use command_verify here as still in session_preparation stage. + output = self.read_until_prompt() return output def set_base_prompt( @@ -2746,11 +2748,8 @@

    Methods

    log.debug("In disable_paging") log.debug(f"Command: {command}") self.write_channel(command) - # Make sure you read until you detect the command echo (avoid getting out of sync) - if self.global_cmd_verify is not False: - output = self.read_until_pattern(pattern=re.escape(command.strip())) - else: - output = self.read_until_prompt() + # Do not use command_verify here as still in session_preparation stage. + output = self.read_until_prompt() log.debug(f"{output}") log.debug("Exiting disable_paging") return output
    @@ -3923,11 +3922,8 @@

    Methods

    delay_factor = self.select_delay_factor(delay_factor) command = self.normalize_cmd(command) self.write_channel(command) - # Make sure you read until you detect the command echo (avoid getting out of sync) - if self.global_cmd_verify is not False: - output = self.read_until_pattern(pattern=re.escape(command.strip())) - else: - output = self.read_until_prompt() + # Do not use command_verify here as still in session_preparation stage. + output = self.read_until_prompt() return output
    @@ -5003,6 +4999,7 @@

    Index

  • netmiko.aruba
  • netmiko.base_connection
  • netmiko.calix
  • +
  • netmiko.centec
  • netmiko.checkpoint
  • netmiko.ciena
  • netmiko.cisco
  • @@ -5041,6 +5038,7 @@

    Index

  • netmiko.ruijie
  • netmiko.scp_functions
  • netmiko.scp_handler
  • +
  • netmiko.sixwind
  • netmiko.snmp_autodetect
  • netmiko.sophos
  • netmiko.ssh_autodetect
  • diff --git a/docs/netmiko/sixwind/index.html b/docs/netmiko/sixwind/index.html new file mode 100644 index 000000000..eeb3ed31c --- /dev/null +++ b/docs/netmiko/sixwind/index.html @@ -0,0 +1,273 @@ + + + + + + +netmiko.sixwind API documentation + + + + + + + + + +
    +
    +
    +

    Module netmiko.sixwind

    +
    +
    +
    +Source code +
    from netmiko.sixwind.sixwind_os import SixwindOSSSH
    +
    +__all__ = ["SixwindOSSSH"]
    +
    +
    +
    +

    Sub-modules

    +
    +
    netmiko.sixwind.sixwind_os
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    Classes

    +
    +
    +class SixwindOSSSH +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +
    +
    +

    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
    +        provided.
    +    :type ip: str
    +
    +    :param host: Hostname of target device. Not required if `ip` is
    +            provided.
    +    :type host: str
    +
    +    :param username: Username to authenticate against target device if
    +            required.
    +    :type username: str
    +
    +    :param password: Password to authenticate against target device if
    +            required.
    +    :type password: str
    +
    +    :param secret: The enable password if target device requires one.
    +    :type secret: str
    +
    +    :param port: The destination port used to connect to the target
    +            device.
    +    :type port: int or None
    +
    +    :param device_type: Class selection based on device type.
    +    :type device_type: str
    +
    +    :param verbose: Enable additional messages to standard output.
    +    :type verbose: bool
    +
    +    :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
    +    :type global_delay_factor: int
    +
    +    :param use_keys: Connect to target device using SSH keys.
    +    :type use_keys: bool
    +
    +    :param key_file: Filename path of the SSH key file to use.
    +    :type key_file: str
    +
    +    :param pkey: SSH key object to use.
    +    :type pkey: paramiko.PKey
    +
    +    :param passphrase: Passphrase to use for encrypted key; password will be used for key
    +            decryption if not specified.
    +    :type passphrase: str
    +
    +    :param allow_agent: Enable use of SSH key-agent.
    +    :type allow_agent: bool
    +
    +    :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
    +            means unknown SSH host keys will be accepted).
    +    :type ssh_strict: bool
    +
    +    :param system_host_keys: Load host keys from the users known_hosts file.
    +    :type system_host_keys: bool
    +    :param alt_host_keys: If `True` host keys will be loaded from the file specified in
    +            alt_key_file.
    +    :type alt_host_keys: bool
    +
    +    :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
    +    :type alt_key_file: str
    +
    +    :param ssh_config_file: File name of OpenSSH configuration file.
    +    :type ssh_config_file: str
    +
    +    :param timeout: Connection timeout.
    +    :type timeout: float
    +
    +    :param session_timeout: Set a timeout for parallel requests.
    +    :type session_timeout: float
    +
    +    :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
    +    :type auth_timeout: float
    +
    +    :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
    +    :type banner_timeout: float
    +
    +    :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
    +            Currently defaults to 0, for backwards compatibility (it will not attempt
    +            to keep the connection alive).
    +    :type keepalive: int
    +
    +    :param default_enter: Character(s) to send to correspond to enter key (default:
    +
    +

    ). +:type default_enter: str

    +
        :param response_return: Character(s) to use in normalized return data to represent
    +            enter key (default:
    +
    +

    ) +:type response_return: str

    +
        :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
    +            to select smallest of global and specific. Sets default global_delay_factor to .1
    +            (default: False)
    +    :type fast_cli: boolean
    +
    +    :param session_log: File path or BufferedIOBase subclass object to write the session log to.
    +    :type session_log: str
    +
    +    :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).
    +    :type session_log_record_writes: boolean
    +
    +    :param session_log_file_mode: "write" or "append" for session_log file mode
    +            (default: "write")
    +    :type session_log_file_mode: str
    +
    +    :param allow_auto_change: Allow automatic configuration changes for terminal settings.
    +            (default: False)
    +    :type allow_auto_change: bool
    +
    +    :param encoding: Encoding to be used when writing bytes to the output channel.
    +            (default: ascii)
    +    :type encoding: str
    +
    +    :param sock: An open socket or socket-like object (such as a `.Channel`) to use for
    +            communication to the target host (default: None).
    +    :type sock: socket
    +
    +    :param global_cmd_verify: Control whether command echo verification is enabled or disabled
    +            (default: None). Global attribute takes precedence over function `cmd_verify`
    +            argument. Value of `None` indicates to use function `cmd_verify` argument.
    +    :type global_cmd_verify: bool|None
    +
    +
    +Source code +
    class SixwindOSSSH(SixwindOSBase):
    +
    +    pass
    +
    +

    Ancestors

    + +

    Inherited members

    + +
    +
    +
    +
    + +
    + + + + + \ No newline at end of file diff --git a/docs/netmiko/sixwind/sixwind_os.html b/docs/netmiko/sixwind/sixwind_os.html new file mode 100644 index 000000000..a5eab7bc3 --- /dev/null +++ b/docs/netmiko/sixwind/sixwind_os.html @@ -0,0 +1,832 @@ + + + + + + +netmiko.sixwind.sixwind_os API documentation + + + + + + + + + +
    +
    +
    +

    Module netmiko.sixwind.sixwind_os

    +
    +
    +
    +Source code +
    import time
    +from netmiko.cisco_base_connection import CiscoBaseConnection
    +
    +
    +class SixwindOSBase(CiscoBaseConnection):
    +    def session_preparation(self):
    +        """Prepare the session after the connection has been established."""
    +        self.ansi_escape_codes = True
    +        self._test_channel_read()
    +        self.set_base_prompt()
    +        # Clear the read buffer
    +        time.sleep(0.3 * self.global_delay_factor)
    +        self.clear_buffer()
    +
    +    def disable_paging(self, *args, **kwargs):
    +        """6WIND requires no-pager at the end of command, not implemented at this time."""
    +        pass
    +
    +    def set_base_prompt(
    +        self, pri_prompt_terminator=">", alt_prompt_terminator="#", delay_factor=1
    +    ):
    +        """Sets self.base_prompt: used as delimiter for stripping of trailing prompt in output."""
    +
    +        prompt = super().set_base_prompt(
    +            pri_prompt_terminator=pri_prompt_terminator,
    +            alt_prompt_terminator=alt_prompt_terminator,
    +            delay_factor=delay_factor,
    +        )
    +        prompt = prompt.strip()
    +        self.base_prompt = prompt
    +        return self.base_prompt
    +
    +    def config_mode(self, config_command="edit running", pattern=""):
    +        """Enter configuration mode."""
    +
    +        return super().config_mode(config_command=config_command, pattern=pattern)
    +
    +    def commit(self, comment="", delay_factor=1):
    +        """
    +        Commit the candidate configuration.
    +
    +        Raise an error and return the failure if the commit fails.
    +        """
    +
    +        delay_factor = self.select_delay_factor(delay_factor)
    +        error_marker = "Failed to generate committed config"
    +        command_string = "commit"
    +
    +        output = self.config_mode()
    +        output += self.send_command(
    +            command_string,
    +            strip_prompt=False,
    +            strip_command=False,
    +            delay_factor=delay_factor,
    +            expect_string=r"#",
    +        )
    +        output += self.exit_config_mode()
    +
    +        if error_marker in output:
    +            raise ValueError(f"Commit failed with following errors:\n\n{output}")
    +
    +        return output
    +
    +    def exit_config_mode(self, exit_config="exit", pattern=r">"):
    +        """Exit configuration mode."""
    +
    +        return super().exit_config_mode(exit_config=exit_config, pattern=pattern)
    +
    +    def check_config_mode(self, check_string="#", pattern=""):
    +        """Checks whether in configuration mode. Returns a boolean."""
    +
    +        return super().check_config_mode(check_string=check_string, pattern=pattern)
    +
    +    def save_config(
    +        self, cmd="copy running startup", confirm=True, confirm_response="y"
    +    ):
    +        """Save Config for 6WIND"""
    +
    +        return super().save_config(
    +            cmd=cmd, confirm=confirm, confirm_response=confirm_response
    +        )
    +
    +    def check_enable_mode(self, *args, **kwargs):
    +        """6WIND has no enable mode."""
    +
    +        pass
    +
    +    def enable(self, *args, **kwargs):
    +        """6WIND has no enable mode."""
    +
    +        pass
    +
    +    def exit_enable_mode(self, *args, **kwargs):
    +        """6WIND has no enable mode."""
    +
    +        pass
    +
    +
    +class SixwindOSSSH(SixwindOSBase):
    +
    +    pass
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    Classes

    +
    +
    +class SixwindOSBase +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +
    +
    +

    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
    +        provided.
    +    :type ip: str
    +
    +    :param host: Hostname of target device. Not required if `ip` is
    +            provided.
    +    :type host: str
    +
    +    :param username: Username to authenticate against target device if
    +            required.
    +    :type username: str
    +
    +    :param password: Password to authenticate against target device if
    +            required.
    +    :type password: str
    +
    +    :param secret: The enable password if target device requires one.
    +    :type secret: str
    +
    +    :param port: The destination port used to connect to the target
    +            device.
    +    :type port: int or None
    +
    +    :param device_type: Class selection based on device type.
    +    :type device_type: str
    +
    +    :param verbose: Enable additional messages to standard output.
    +    :type verbose: bool
    +
    +    :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
    +    :type global_delay_factor: int
    +
    +    :param use_keys: Connect to target device using SSH keys.
    +    :type use_keys: bool
    +
    +    :param key_file: Filename path of the SSH key file to use.
    +    :type key_file: str
    +
    +    :param pkey: SSH key object to use.
    +    :type pkey: paramiko.PKey
    +
    +    :param passphrase: Passphrase to use for encrypted key; password will be used for key
    +            decryption if not specified.
    +    :type passphrase: str
    +
    +    :param allow_agent: Enable use of SSH key-agent.
    +    :type allow_agent: bool
    +
    +    :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
    +            means unknown SSH host keys will be accepted).
    +    :type ssh_strict: bool
    +
    +    :param system_host_keys: Load host keys from the users known_hosts file.
    +    :type system_host_keys: bool
    +    :param alt_host_keys: If `True` host keys will be loaded from the file specified in
    +            alt_key_file.
    +    :type alt_host_keys: bool
    +
    +    :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
    +    :type alt_key_file: str
    +
    +    :param ssh_config_file: File name of OpenSSH configuration file.
    +    :type ssh_config_file: str
    +
    +    :param timeout: Connection timeout.
    +    :type timeout: float
    +
    +    :param session_timeout: Set a timeout for parallel requests.
    +    :type session_timeout: float
    +
    +    :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
    +    :type auth_timeout: float
    +
    +    :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
    +    :type banner_timeout: float
    +
    +    :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
    +            Currently defaults to 0, for backwards compatibility (it will not attempt
    +            to keep the connection alive).
    +    :type keepalive: int
    +
    +    :param default_enter: Character(s) to send to correspond to enter key (default:
    +
    +

    ). +:type default_enter: str

    +
        :param response_return: Character(s) to use in normalized return data to represent
    +            enter key (default:
    +
    +

    ) +:type response_return: str

    +
        :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
    +            to select smallest of global and specific. Sets default global_delay_factor to .1
    +            (default: False)
    +    :type fast_cli: boolean
    +
    +    :param session_log: File path or BufferedIOBase subclass object to write the session log to.
    +    :type session_log: str
    +
    +    :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).
    +    :type session_log_record_writes: boolean
    +
    +    :param session_log_file_mode: "write" or "append" for session_log file mode
    +            (default: "write")
    +    :type session_log_file_mode: str
    +
    +    :param allow_auto_change: Allow automatic configuration changes for terminal settings.
    +            (default: False)
    +    :type allow_auto_change: bool
    +
    +    :param encoding: Encoding to be used when writing bytes to the output channel.
    +            (default: ascii)
    +    :type encoding: str
    +
    +    :param sock: An open socket or socket-like object (such as a `.Channel`) to use for
    +            communication to the target host (default: None).
    +    :type sock: socket
    +
    +    :param global_cmd_verify: Control whether command echo verification is enabled or disabled
    +            (default: None). Global attribute takes precedence over function `cmd_verify`
    +            argument. Value of `None` indicates to use function `cmd_verify` argument.
    +    :type global_cmd_verify: bool|None
    +
    +
    +Source code +
    class SixwindOSBase(CiscoBaseConnection):
    +    def session_preparation(self):
    +        """Prepare the session after the connection has been established."""
    +        self.ansi_escape_codes = True
    +        self._test_channel_read()
    +        self.set_base_prompt()
    +        # Clear the read buffer
    +        time.sleep(0.3 * self.global_delay_factor)
    +        self.clear_buffer()
    +
    +    def disable_paging(self, *args, **kwargs):
    +        """6WIND requires no-pager at the end of command, not implemented at this time."""
    +        pass
    +
    +    def set_base_prompt(
    +        self, pri_prompt_terminator=">", alt_prompt_terminator="#", delay_factor=1
    +    ):
    +        """Sets self.base_prompt: used as delimiter for stripping of trailing prompt in output."""
    +
    +        prompt = super().set_base_prompt(
    +            pri_prompt_terminator=pri_prompt_terminator,
    +            alt_prompt_terminator=alt_prompt_terminator,
    +            delay_factor=delay_factor,
    +        )
    +        prompt = prompt.strip()
    +        self.base_prompt = prompt
    +        return self.base_prompt
    +
    +    def config_mode(self, config_command="edit running", pattern=""):
    +        """Enter configuration mode."""
    +
    +        return super().config_mode(config_command=config_command, pattern=pattern)
    +
    +    def commit(self, comment="", delay_factor=1):
    +        """
    +        Commit the candidate configuration.
    +
    +        Raise an error and return the failure if the commit fails.
    +        """
    +
    +        delay_factor = self.select_delay_factor(delay_factor)
    +        error_marker = "Failed to generate committed config"
    +        command_string = "commit"
    +
    +        output = self.config_mode()
    +        output += self.send_command(
    +            command_string,
    +            strip_prompt=False,
    +            strip_command=False,
    +            delay_factor=delay_factor,
    +            expect_string=r"#",
    +        )
    +        output += self.exit_config_mode()
    +
    +        if error_marker in output:
    +            raise ValueError(f"Commit failed with following errors:\n\n{output}")
    +
    +        return output
    +
    +    def exit_config_mode(self, exit_config="exit", pattern=r">"):
    +        """Exit configuration mode."""
    +
    +        return super().exit_config_mode(exit_config=exit_config, pattern=pattern)
    +
    +    def check_config_mode(self, check_string="#", pattern=""):
    +        """Checks whether in configuration mode. Returns a boolean."""
    +
    +        return super().check_config_mode(check_string=check_string, pattern=pattern)
    +
    +    def save_config(
    +        self, cmd="copy running startup", confirm=True, confirm_response="y"
    +    ):
    +        """Save Config for 6WIND"""
    +
    +        return super().save_config(
    +            cmd=cmd, confirm=confirm, confirm_response=confirm_response
    +        )
    +
    +    def check_enable_mode(self, *args, **kwargs):
    +        """6WIND has no enable mode."""
    +
    +        pass
    +
    +    def enable(self, *args, **kwargs):
    +        """6WIND has no enable mode."""
    +
    +        pass
    +
    +    def exit_enable_mode(self, *args, **kwargs):
    +        """6WIND has no enable mode."""
    +
    +        pass
    +
    +

    Ancestors

    + +

    Subclasses

    + +

    Methods

    +
    +
    +def check_config_mode(self, check_string='#', pattern='') +
    +
    +

    Checks whether in configuration mode. Returns a boolean.

    +
    +Source code +
    def check_config_mode(self, check_string="#", pattern=""):
    +    """Checks whether in configuration mode. Returns a boolean."""
    +
    +    return super().check_config_mode(check_string=check_string, pattern=pattern)
    +
    +
    +
    +def check_enable_mode(self, *args, **kwargs) +
    +
    +

    6WIND has no enable mode.

    +
    +Source code +
    def check_enable_mode(self, *args, **kwargs):
    +    """6WIND has no enable mode."""
    +
    +    pass
    +
    +
    +
    +def commit(self, comment='', delay_factor=1) +
    +
    +

    Commit the candidate configuration.

    +

    Raise an error and return the failure if the commit fails.

    +
    +Source code +
    def commit(self, comment="", delay_factor=1):
    +    """
    +    Commit the candidate configuration.
    +
    +    Raise an error and return the failure if the commit fails.
    +    """
    +
    +    delay_factor = self.select_delay_factor(delay_factor)
    +    error_marker = "Failed to generate committed config"
    +    command_string = "commit"
    +
    +    output = self.config_mode()
    +    output += self.send_command(
    +        command_string,
    +        strip_prompt=False,
    +        strip_command=False,
    +        delay_factor=delay_factor,
    +        expect_string=r"#",
    +    )
    +    output += self.exit_config_mode()
    +
    +    if error_marker in output:
    +        raise ValueError(f"Commit failed with following errors:\n\n{output}")
    +
    +    return output
    +
    +
    +
    +def config_mode(self, config_command='edit running', pattern='') +
    +
    +

    Enter configuration mode.

    +
    +Source code +
    def config_mode(self, config_command="edit running", pattern=""):
    +    """Enter configuration mode."""
    +
    +    return super().config_mode(config_command=config_command, pattern=pattern)
    +
    +
    +
    +def disable_paging(self, *args, **kwargs) +
    +
    +

    6WIND requires no-pager at the end of command, not implemented at this time.

    +
    +Source code +
    def disable_paging(self, *args, **kwargs):
    +    """6WIND requires no-pager at the end of command, not implemented at this time."""
    +    pass
    +
    +
    +
    +def enable(self, *args, **kwargs) +
    +
    +

    6WIND has no enable mode.

    +
    +Source code +
    def enable(self, *args, **kwargs):
    +    """6WIND has no enable mode."""
    +
    +    pass
    +
    +
    +
    +def exit_config_mode(self, exit_config='exit', pattern='>') +
    +
    +

    Exit configuration mode.

    +
    +Source code +
    def exit_config_mode(self, exit_config="exit", pattern=r">"):
    +    """Exit configuration mode."""
    +
    +    return super().exit_config_mode(exit_config=exit_config, pattern=pattern)
    +
    +
    +
    +def exit_enable_mode(self, *args, **kwargs) +
    +
    +

    6WIND has no enable mode.

    +
    +Source code +
    def exit_enable_mode(self, *args, **kwargs):
    +    """6WIND has no enable mode."""
    +
    +    pass
    +
    +
    +
    +def save_config(self, cmd='copy running startup', confirm=True, confirm_response='y') +
    +
    +

    Save Config for 6WIND

    +
    +Source code +
    def save_config(
    +    self, cmd="copy running startup", confirm=True, confirm_response="y"
    +):
    +    """Save Config for 6WIND"""
    +
    +    return super().save_config(
    +        cmd=cmd, confirm=confirm, confirm_response=confirm_response
    +    )
    +
    +
    +
    +def session_preparation(self) +
    +
    +

    Prepare the session after the connection has been established.

    +
    +Source code +
    def session_preparation(self):
    +    """Prepare the session after the connection has been established."""
    +    self.ansi_escape_codes = True
    +    self._test_channel_read()
    +    self.set_base_prompt()
    +    # Clear the read buffer
    +    time.sleep(0.3 * self.global_delay_factor)
    +    self.clear_buffer()
    +
    +
    +
    +def set_base_prompt(self, pri_prompt_terminator='>', alt_prompt_terminator='#', delay_factor=1) +
    +
    +

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

    +
    +Source code +
    def set_base_prompt(
    +    self, pri_prompt_terminator=">", alt_prompt_terminator="#", delay_factor=1
    +):
    +    """Sets self.base_prompt: used as delimiter for stripping of trailing prompt in output."""
    +
    +    prompt = super().set_base_prompt(
    +        pri_prompt_terminator=pri_prompt_terminator,
    +        alt_prompt_terminator=alt_prompt_terminator,
    +        delay_factor=delay_factor,
    +    )
    +    prompt = prompt.strip()
    +    self.base_prompt = prompt
    +    return self.base_prompt
    +
    +
    +
    +

    Inherited members

    + +
    +
    +class SixwindOSSSH +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +
    +
    +

    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
    +        provided.
    +    :type ip: str
    +
    +    :param host: Hostname of target device. Not required if `ip` is
    +            provided.
    +    :type host: str
    +
    +    :param username: Username to authenticate against target device if
    +            required.
    +    :type username: str
    +
    +    :param password: Password to authenticate against target device if
    +            required.
    +    :type password: str
    +
    +    :param secret: The enable password if target device requires one.
    +    :type secret: str
    +
    +    :param port: The destination port used to connect to the target
    +            device.
    +    :type port: int or None
    +
    +    :param device_type: Class selection based on device type.
    +    :type device_type: str
    +
    +    :param verbose: Enable additional messages to standard output.
    +    :type verbose: bool
    +
    +    :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
    +    :type global_delay_factor: int
    +
    +    :param use_keys: Connect to target device using SSH keys.
    +    :type use_keys: bool
    +
    +    :param key_file: Filename path of the SSH key file to use.
    +    :type key_file: str
    +
    +    :param pkey: SSH key object to use.
    +    :type pkey: paramiko.PKey
    +
    +    :param passphrase: Passphrase to use for encrypted key; password will be used for key
    +            decryption if not specified.
    +    :type passphrase: str
    +
    +    :param allow_agent: Enable use of SSH key-agent.
    +    :type allow_agent: bool
    +
    +    :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
    +            means unknown SSH host keys will be accepted).
    +    :type ssh_strict: bool
    +
    +    :param system_host_keys: Load host keys from the users known_hosts file.
    +    :type system_host_keys: bool
    +    :param alt_host_keys: If `True` host keys will be loaded from the file specified in
    +            alt_key_file.
    +    :type alt_host_keys: bool
    +
    +    :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
    +    :type alt_key_file: str
    +
    +    :param ssh_config_file: File name of OpenSSH configuration file.
    +    :type ssh_config_file: str
    +
    +    :param timeout: Connection timeout.
    +    :type timeout: float
    +
    +    :param session_timeout: Set a timeout for parallel requests.
    +    :type session_timeout: float
    +
    +    :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
    +    :type auth_timeout: float
    +
    +    :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
    +    :type banner_timeout: float
    +
    +    :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
    +            Currently defaults to 0, for backwards compatibility (it will not attempt
    +            to keep the connection alive).
    +    :type keepalive: int
    +
    +    :param default_enter: Character(s) to send to correspond to enter key (default:
    +
    +

    ). +:type default_enter: str

    +
        :param response_return: Character(s) to use in normalized return data to represent
    +            enter key (default:
    +
    +

    ) +:type response_return: str

    +
        :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
    +            to select smallest of global and specific. Sets default global_delay_factor to .1
    +            (default: False)
    +    :type fast_cli: boolean
    +
    +    :param session_log: File path or BufferedIOBase subclass object to write the session log to.
    +    :type session_log: str
    +
    +    :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).
    +    :type session_log_record_writes: boolean
    +
    +    :param session_log_file_mode: "write" or "append" for session_log file mode
    +            (default: "write")
    +    :type session_log_file_mode: str
    +
    +    :param allow_auto_change: Allow automatic configuration changes for terminal settings.
    +            (default: False)
    +    :type allow_auto_change: bool
    +
    +    :param encoding: Encoding to be used when writing bytes to the output channel.
    +            (default: ascii)
    +    :type encoding: str
    +
    +    :param sock: An open socket or socket-like object (such as a `.Channel`) to use for
    +            communication to the target host (default: None).
    +    :type sock: socket
    +
    +    :param global_cmd_verify: Control whether command echo verification is enabled or disabled
    +            (default: None). Global attribute takes precedence over function `cmd_verify`
    +            argument. Value of `None` indicates to use function `cmd_verify` argument.
    +    :type global_cmd_verify: bool|None
    +
    +
    +Source code +
    class SixwindOSSSH(SixwindOSBase):
    +
    +    pass
    +
    +

    Ancestors

    + +

    Inherited members

    + +
    +
    +
    +
    + +
    + + + + + \ No newline at end of file From 4d22ae9372523f66bdaabd41d513a09b16bd0745 Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Wed, 27 May 2020 08:17:45 -0700 Subject: [PATCH 21/42] Disable cmd_verify on Comware (#1763) --- netmiko/hp/hp_comware.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/netmiko/hp/hp_comware.py b/netmiko/hp/hp_comware.py index 6e3524762..7de45882b 100644 --- a/netmiko/hp/hp_comware.py +++ b/netmiko/hp/hp_comware.py @@ -3,6 +3,13 @@ class HPComwareBase(CiscoSSHConnection): + def __init__(self, **kwargs): + # Comware doesn't have a way to set terminal width which breaks cmd_verify + global_cmd_verify = kwargs.get("global_cmd_verify") + if global_cmd_verify is None: + kwargs["global_cmd_verify"] = False + return super().__init__(**kwargs) + def session_preparation(self): """ Prepare the session after the connection has been established. From fab9b4128260c7feaefe4f32c94726bdd2618c07 Mon Sep 17 00:00:00 2001 From: icovada Date: Fri, 5 Jun 2020 00:00:17 +0200 Subject: [PATCH 22/42] check text with config_md5 (#1774) Restore previous code, config_md5 needs to check text, not contents of file --- netmiko/cisco/cisco_ios.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/netmiko/cisco/cisco_ios.py b/netmiko/cisco/cisco_ios.py index 932f3c135..f9810f0a4 100644 --- a/netmiko/cisco/cisco_ios.py +++ b/netmiko/cisco/cisco_ios.py @@ -169,7 +169,10 @@ def file_md5(self, file_name): return hashlib.md5(file_contents).hexdigest() def config_md5(self, source_config): - return super().file_md5(source_config, add_newline=True) + """Compute MD5 hash of text.""" + file_contents = source_config + "\n" # Cisco IOS automatically adds this + file_contents = file_contents.encode("UTF-8") + return hashlib.md5(file_contents).hexdigest() def put_file(self): curlybrace = r"{" From 7320b35e9c98e5ef3a4b290c1b546a2bc2f6dbf4 Mon Sep 17 00:00:00 2001 From: Alejandro Suarez Date: Sun, 7 Jun 2020 13:06:25 -0400 Subject: [PATCH 23/42] Add support for vendor/os: broacom_icos. --- netmiko/broadcom/__init__.py | 4 +++ netmiko/broadcom/broadcom_icos_ssh.py | 43 +++++++++++++++++++++++++++ netmiko/ssh_dispatcher.py | 2 ++ tests/test_broadcom_icos.sh | 12 ++++++++ 4 files changed, 61 insertions(+) create mode 100644 netmiko/broadcom/__init__.py create mode 100644 netmiko/broadcom/broadcom_icos_ssh.py create mode 100644 tests/test_broadcom_icos.sh diff --git a/netmiko/broadcom/__init__.py b/netmiko/broadcom/__init__.py new file mode 100644 index 000000000..615e33f6f --- /dev/null +++ b/netmiko/broadcom/__init__.py @@ -0,0 +1,4 @@ +from netmiko.broadcom.broadcom_icos_ssh import BroadcomIcosSSH + + +__all__ = ["BroadcomIcosSSH"] diff --git a/netmiko/broadcom/broadcom_icos_ssh.py b/netmiko/broadcom/broadcom_icos_ssh.py new file mode 100644 index 000000000..10c2b8fea --- /dev/null +++ b/netmiko/broadcom/broadcom_icos_ssh.py @@ -0,0 +1,43 @@ +import time +from netmiko.cisco_base_connection import CiscoSSHConnection + + +class BroadcomIcosSSH(CiscoSSHConnection): + """ + Implements support for Broadcom Icos devices. + Syntax its almost identical to Cisco IOS in most cases + """ + + def session_preparation(self): + self._test_channel_read() + self.set_base_prompt() + self.enable() + self.set_base_prompt() + self.disable_paging() + self.set_terminal_width() + + # Clear the read buffer + time.sleep(0.3 * self.global_delay_factor) + self.clear_buffer() + + def check_config_mode(self, check_string=")#"): + """Checks if the device is in configuration mode or not.""" + return super().check_config_mode(check_string=check_string) + + def config_mode(self, config_command="configure"): + """Enter configuration mode.""" + return super().config_mode(config_command=config_command) + + def exit_config_mode(self, exit_config="exit"): + """Exit configuration mode.""" + return super().exit_config_mode(exit_config=exit_config) + + def exit_enable_mode(self, exit_command="exit"): + """Exit enable mode.""" + return super().exit_enable_mode(exit_command=exit_command) + + def save_config(self, cmd="write memory", confirm=False, confirm_response=""): + """Saves configuration.""" + return super().save_config( + cmd=cmd, confirm=confirm, confirm_response=confirm_response + ) diff --git a/netmiko/ssh_dispatcher.py b/netmiko/ssh_dispatcher.py index a8317b2fe..9745ad5b9 100755 --- a/netmiko/ssh_dispatcher.py +++ b/netmiko/ssh_dispatcher.py @@ -6,6 +6,7 @@ from netmiko.arista import AristaFileTransfer from netmiko.apresia import ApresiaAeosSSH, ApresiaAeosTelnet from netmiko.aruba import ArubaSSH +from netmiko.broadcom import BroadcomIcosSSH from netmiko.calix import CalixB6SSH, CalixB6Telnet from netmiko.centec import CentecOSSSH, CentecOSTelnet from netmiko.checkpoint import CheckPointGaiaSSH @@ -96,6 +97,7 @@ "aruba_os": ArubaSSH, "avaya_ers": ExtremeErsSSH, "avaya_vsp": ExtremeVspSSH, + "broadcom_icos": BroadcomIcosSSH, "brocade_fastiron": RuckusFastironSSH, "brocade_netiron": ExtremeNetironSSH, "brocade_nos": ExtremeNosSSH, diff --git a/tests/test_broadcom_icos.sh b/tests/test_broadcom_icos.sh new file mode 100644 index 000000000..d15f462b4 --- /dev/null +++ b/tests/test_broadcom_icos.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +RETURN_CODE=0 + +# Exit on the first test failure and set RETURN_CODE = 1 +echo "Starting tests...good luck:" \ +&& echo "Broadcom Icos" \ +&& py.test -v test_netmiko_show.py --test_device broadcom_icos \ +&& py.test -v test_netmiko_config.py --test_device broadcom_icos \ +|| RETURN_CODE=1 + +exit $RETURN_CODE From 5e51b8917975c96b3320f7d0111e0b058b3cfb5d Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Sun, 7 Jun 2020 10:47:49 -0700 Subject: [PATCH 24/42] Yamaha Driver (#1778) --- netmiko/ssh_autodetect.py | 6 ++++ netmiko/ssh_dispatcher.py | 4 +++ netmiko/yamaha/__init__.py | 4 +++ netmiko/yamaha/yamaha.py | 70 ++++++++++++++++++++++++++++++++++++++ tests/test_yamaha.sh | 11 ++++++ 5 files changed, 95 insertions(+) create mode 100644 netmiko/yamaha/__init__.py create mode 100644 netmiko/yamaha/yamaha.py create mode 100644 tests/test_yamaha.sh diff --git a/netmiko/ssh_autodetect.py b/netmiko/ssh_autodetect.py index c9e65f0d7..5899d8731 100644 --- a/netmiko/ssh_autodetect.py +++ b/netmiko/ssh_autodetect.py @@ -193,6 +193,12 @@ "priority": 99, "dispatch": "_autodetect_std", }, + "yamaha": { + "cmd": "show copyright", + "search_patterns": [r"Yamaha Corporation"], + "priority": 99, + "dispatch": "_autodetect_std", + }, } diff --git a/netmiko/ssh_dispatcher.py b/netmiko/ssh_dispatcher.py index 9745ad5b9..a00787e53 100755 --- a/netmiko/ssh_dispatcher.py +++ b/netmiko/ssh_dispatcher.py @@ -84,6 +84,8 @@ from netmiko.ubiquiti import UbiquitiUnifiSwitchSSH from netmiko.vyos import VyOSSSH from netmiko.watchguard import WatchguardFirewareSSH +from netmiko.yamaha import YamahaSSH +from netmiko.yamaha import YamahaTelnet # The keys of this dictionary are the supported device_types @@ -182,6 +184,7 @@ "vyatta_vyos": VyOSSSH, "vyos": VyOSSSH, "watchguard_fireware": WatchguardFirewareSSH, + "yamaha": YamahaSSH, } FILE_TRANSFER_MAP = { @@ -241,6 +244,7 @@ CLASS_MAPPER["rad_etx_telnet"] = RadETXTelnet CLASS_MAPPER["ruckus_fastiron_telnet"] = RuckusFastironTelnet CLASS_MAPPER["ruijie_os_telnet"] = RuijieOSTelnet +CLASS_MAPPER["yamaha_telnet"] = YamahaTelnet # Add serial drivers CLASS_MAPPER["cisco_ios_serial"] = CiscoIosSerial diff --git a/netmiko/yamaha/__init__.py b/netmiko/yamaha/__init__.py new file mode 100644 index 000000000..0fd92834e --- /dev/null +++ b/netmiko/yamaha/__init__.py @@ -0,0 +1,4 @@ +from __future__ import unicode_literals +from netmiko.yamaha.yamaha import YamahaSSH, YamahaTelnet + +__all__ = ["YamahaSSH", "YamahaTelnet"] diff --git a/netmiko/yamaha/yamaha.py b/netmiko/yamaha/yamaha.py new file mode 100644 index 000000000..650f2c7b8 --- /dev/null +++ b/netmiko/yamaha/yamaha.py @@ -0,0 +1,70 @@ +from netmiko.base_connection import BaseConnection +import time + + +class YamahaBase(BaseConnection): + def session_preparation(self): + """Prepare the session after the connection has been established.""" + self._test_channel_read(pattern=r"[>#]") + self.set_base_prompt() + self.disable_paging(command="console lines infinity") + time.sleep(0.3 * self.global_delay_factor) + self.clear_buffer() + + def check_enable_mode(self, check_string="#"): + return super().check_enable_mode(check_string=check_string) + + def enable(self, cmd="administrator", pattern=r"Password", **kwargs): + return super().enable(cmd=cmd, pattern=pattern, **kwargs) + + def exit_enable_mode(self, exit_command="exit"): + """ + When any changes have been made, the prompt 'Save new configuration ? (Y/N)' + appears before exiting. Ignore this by entering 'N'. + """ + output = "" + if self.check_enable_mode(): + self.write_channel(self.normalize_cmd(exit_command)) + time.sleep(1) + output = self.read_channel() + if "(Y/N)" in output: + self.write_channel("N") + output += self.read_until_prompt() + if self.check_enable_mode(): + raise ValueError("Failed to exit enable mode.") + return output + + def check_config_mode(self, check_string="#", pattern=""): + """Checks if the device is in administrator mode or not.""" + return super().check_config_mode(check_string=check_string, pattern=pattern) + + def config_mode(self, config_command="administrator", pattern="ssword"): + """Enter into administrator mode and configure device.""" + return self.enable() + + def exit_config_mode(self, exit_config="exit", pattern=">"): + """ + No action taken. Call 'exit_enable_mode()' to explicitly exit Administration + Level. + """ + return "" + + def save_config(self, cmd="save", confirm=False, confirm_response=""): + """Saves Config.""" + if confirm is True: + raise ValueError("Yamaha does not support save_config confirmation.") + self.enable() + # Some devices are slow so match on trailing-prompt if you can + return self.send_command(command_string=cmd) + + +class YamahaSSH(YamahaBase): + """Yamaha SSH driver.""" + + pass + + +class YamahaTelnet(YamahaBase): + """Yamaha Telnet driver.""" + + pass diff --git a/tests/test_yamaha.sh b/tests/test_yamaha.sh new file mode 100644 index 000000000..7c8d05ad6 --- /dev/null +++ b/tests/test_yamaha.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +RETURN_CODE=0 + +# Exit on the first test failure and set RETURN_CODE = 1 +echo "Starting tests...good luck:" \ +&& py.test -v test_netmiko_show.py --test_device yamaha \ +&& py.test -v test_netmiko_config.py --test_device yamaha \ +|| RETURN_CODE=1 + +exit $RETURN_CODE From a7cbb41877983b9f378ddf3c8d48283d67ed6633 Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Sun, 14 Jun 2020 18:26:30 -0700 Subject: [PATCH 25/42] Bypass automatic _open() call (#1790) --- netmiko/base_connection.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/netmiko/base_connection.py b/netmiko/base_connection.py index fb2cf848d..6f2d66199 100644 --- a/netmiko/base_connection.py +++ b/netmiko/base_connection.py @@ -78,6 +78,7 @@ def __init__( allow_auto_change=False, encoding="ascii", sock=None, + auto_connect=True, ): """ Initialize attributes for establishing connection to target device. @@ -204,6 +205,9 @@ def __init__( argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool """ self.remote_conn = None @@ -324,7 +328,8 @@ def __init__( self.ssh_config_file = ssh_config_file # Establish the remote connection - self._open() + if auto_connect: + self._open() def _open(self): """Decouple connection creation from __init__ for mocking.""" From 5903c03e1fbe33de5d261469638e4d08ddd0b590 Mon Sep 17 00:00:00 2001 From: wvandeun <7521270+wvandeun@users.noreply.github.com> Date: Mon, 15 Jun 2020 03:54:25 +0200 Subject: [PATCH 26/42] raises NetmikoAuthenticationException when asa_login fails (#1648) --- netmiko/cisco/cisco_asa_ssh.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/netmiko/cisco/cisco_asa_ssh.py b/netmiko/cisco/cisco_asa_ssh.py index 5aece81ca..b6e3d3ce5 100644 --- a/netmiko/cisco/cisco_asa_ssh.py +++ b/netmiko/cisco/cisco_asa_ssh.py @@ -2,6 +2,7 @@ import re import time from netmiko.cisco_base_connection import CiscoSSHConnection, CiscoFileTransfer +from netmiko.ssh_exception import NetmikoAuthenticationException class CiscoAsaSSH(CiscoSSHConnection): @@ -91,12 +92,14 @@ def asa_login(self): twb-dc-fw1> login Username: admin - Password: ************ + + Raises NetmikoAuthenticationException, if we do not reach privilege + level 15 after 3 attempts. """ delay_factor = self.select_delay_factor(0) i = 1 - max_attempts = 50 + max_attempts = 3 self.write_channel("login" + self.RETURN) while i <= max_attempts: time.sleep(0.5 * delay_factor) @@ -106,11 +109,14 @@ def asa_login(self): elif "ssword" in output: self.write_channel(self.password + self.RETURN) elif "#" in output: - break + return True else: self.write_channel("login" + self.RETURN) i += 1 + msg = "Unable to get to enable mode!" + raise NetmikoAuthenticationException(msg) + def save_config(self, cmd="write mem", confirm=False, confirm_response=""): """Saves Config""" return super().save_config( From 41195537ebc83a6c7e7a54bf6bee00c003a66f36 Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Sun, 14 Jun 2020 19:03:20 -0700 Subject: [PATCH 27/42] Increasing ASA login loops (#1791) --- netmiko/cisco/cisco_asa_ssh.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/netmiko/cisco/cisco_asa_ssh.py b/netmiko/cisco/cisco_asa_ssh.py index b6e3d3ce5..cdad7a3d1 100644 --- a/netmiko/cisco/cisco_asa_ssh.py +++ b/netmiko/cisco/cisco_asa_ssh.py @@ -94,12 +94,12 @@ def asa_login(self): Username: admin Raises NetmikoAuthenticationException, if we do not reach privilege - level 15 after 3 attempts. + level 15 after 10 loops. """ delay_factor = self.select_delay_factor(0) i = 1 - max_attempts = 3 + max_attempts = 10 self.write_channel("login" + self.RETURN) while i <= max_attempts: time.sleep(0.5 * delay_factor) @@ -109,12 +109,12 @@ def asa_login(self): elif "ssword" in output: self.write_channel(self.password + self.RETURN) elif "#" in output: - return True + return else: self.write_channel("login" + self.RETURN) i += 1 - msg = "Unable to get to enable mode!" + msg = "Unable to enter enable mode!" raise NetmikoAuthenticationException(msg) def save_config(self, cmd="write mem", confirm=False, confirm_response=""): From 7ae1e8ff9029da69606a8be28467100ceb598c84 Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Sun, 14 Jun 2020 19:56:37 -0700 Subject: [PATCH 28/42] ZTE Driver Pull Request (#1792) --- netmiko/ssh_dispatcher.py | 4 +++ netmiko/zte/__init__.py | 4 +++ netmiko/zte/zte_zxros.py | 58 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 66 insertions(+) create mode 100644 netmiko/zte/__init__.py create mode 100644 netmiko/zte/zte_zxros.py diff --git a/netmiko/ssh_dispatcher.py b/netmiko/ssh_dispatcher.py index a00787e53..361249c26 100755 --- a/netmiko/ssh_dispatcher.py +++ b/netmiko/ssh_dispatcher.py @@ -86,6 +86,8 @@ from netmiko.watchguard import WatchguardFirewareSSH from netmiko.yamaha import YamahaSSH from netmiko.yamaha import YamahaTelnet +from netmiko.zte import ZteZxrosSSH +from netmiko.zte import ZteZxrosTelnet # The keys of this dictionary are the supported device_types @@ -184,6 +186,7 @@ "vyatta_vyos": VyOSSSH, "vyos": VyOSSSH, "watchguard_fireware": WatchguardFirewareSSH, + "zte_zxros": ZteZxrosSSH, "yamaha": YamahaSSH, } @@ -245,6 +248,7 @@ CLASS_MAPPER["ruckus_fastiron_telnet"] = RuckusFastironTelnet CLASS_MAPPER["ruijie_os_telnet"] = RuijieOSTelnet CLASS_MAPPER["yamaha_telnet"] = YamahaTelnet +CLASS_MAPPER["zte_zxros_telnet"] = ZteZxrosTelnet # Add serial drivers CLASS_MAPPER["cisco_ios_serial"] = CiscoIosSerial diff --git a/netmiko/zte/__init__.py b/netmiko/zte/__init__.py new file mode 100644 index 000000000..447a015c4 --- /dev/null +++ b/netmiko/zte/__init__.py @@ -0,0 +1,4 @@ +from netmiko.zte.zte_zxros import ZteZxrosSSH +from netmiko.zte.zte_zxros import ZteZxrosTelnet + +__all__ = ["ZteZxrosSSH", "ZteZxrosTelnet"] diff --git a/netmiko/zte/zte_zxros.py b/netmiko/zte/zte_zxros.py new file mode 100644 index 000000000..9cb0c2bb5 --- /dev/null +++ b/netmiko/zte/zte_zxros.py @@ -0,0 +1,58 @@ +from netmiko.cisco_base_connection import CiscoBaseConnection +import time +from telnetlib import IAC, DO, DONT, WILL, WONT, SB, SE, ECHO, SGA, NAWS + + +class ZteZxrosBase(CiscoBaseConnection): + def session_preparation(self): + """Prepare the session after the connection has been established.""" + self._test_channel_read(pattern=r"[>#]") + self.set_base_prompt() + self.disable_paging() + # Clear the read buffer + time.sleep(0.3 * self.global_delay_factor) + self.clear_buffer() + + def check_config_mode(self, check_string=")#", pattern="#"): + """ + Checks if the device is in configuration mode or not. + """ + return super().check_config_mode(check_string=check_string, pattern=pattern) + + def save_config(self, cmd="write", confirm=False, confirm_response=""): + """Saves Config Using Copy Run Start""" + return super().save_config( + cmd=cmd, confirm=confirm, confirm_response=confirm_response + ) + + +class ZteZxrosSSH(ZteZxrosBase): + pass + + +class ZteZxrosTelnet(ZteZxrosBase): + @staticmethod + def _process_option(telnet_sock, cmd, opt): + """ + ZTE need manually reply DO ECHO to enable echo command. + enable ECHO, SGA, set window size to [500, 50] + """ + if cmd == WILL: + if opt in [ECHO, SGA]: + # reply DO ECHO / DO SGA + telnet_sock.sendall(IAC + DO + opt) + else: + telnet_sock.sendall(IAC + DONT + opt) + elif cmd == DO: + if opt == NAWS: + # negotiate about window size + telnet_sock.sendall(IAC + WILL + opt) + # Width:500, Height:50 + telnet_sock.sendall(IAC + SB + NAWS + b"\x01\xf4\x00\x32" + IAC + SE) + else: + telnet_sock.sendall(IAC + WONT + opt) + + def telnet_login(self, *args, **kwargs): + # set callback function to handle telnet options. + self.remote_conn.set_option_negotiation_callback(self._process_option) + return super().telnet_login(*args, **kwargs) From 72c3eb4ad65cc786de8f3b1d5375be3fc588d9c8 Mon Sep 17 00:00:00 2001 From: Codekuu <47852530+codekuu@users.noreply.github.com> Date: Wed, 17 Jun 2020 16:50:32 +0200 Subject: [PATCH 29/42] Added HPE Comware support (#1796) Added HPE Comware support for ssh autodetect. --- netmiko/ssh_autodetect.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/netmiko/ssh_autodetect.py b/netmiko/ssh_autodetect.py index 5899d8731..d2491893f 100644 --- a/netmiko/ssh_autodetect.py +++ b/netmiko/ssh_autodetect.py @@ -138,6 +138,12 @@ "priority": 99, "dispatch": "_autodetect_std", }, + "hp_comware": { + "cmd": "display version", + "search_patterns": ["HPE Comware"], + "priority": 99, + "dispatch": "_autodetect_std", + }, "huawei": { "cmd": "display version", "search_patterns": [ From ffde4d6c683c5d6eeaa166c26ee7814a5bb9d497 Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Fri, 19 Jun 2020 09:14:52 -0700 Subject: [PATCH 30/42] Generic driver (#1800) --- PLATFORMS.md | 7 +- docs/netmiko/a10/a10_ssh.html | 6 +- docs/netmiko/a10/index.html | 6 +- docs/netmiko/accedian/accedian_ssh.html | 6 +- docs/netmiko/accedian/index.html | 6 +- docs/netmiko/alcatel/alcatel_aos_ssh.html | 6 +- docs/netmiko/alcatel/index.html | 6 +- docs/netmiko/apresia/apresia_aeos.html | 16 +- docs/netmiko/apresia/index.html | 10 +- docs/netmiko/arista/arista.html | 16 +- docs/netmiko/arista/index.html | 10 +- docs/netmiko/aruba/aruba_ssh.html | 4 + docs/netmiko/aruba/index.html | 4 + docs/netmiko/base_connection.html | 27 +- docs/netmiko/broadcom/broadcom_icos_ssh.html | 409 ++++++++ docs/netmiko/broadcom/index.html | 382 ++++++++ docs/netmiko/calix/calix_b6.html | 12 + docs/netmiko/calix/index.html | 8 + docs/netmiko/centec/centec_os.html | 18 +- docs/netmiko/centec/index.html | 12 +- .../checkpoint/checkpoint_gaia_ssh.html | 6 +- docs/netmiko/checkpoint/index.html | 6 +- docs/netmiko/ciena/ciena_saos.html | 16 +- docs/netmiko/ciena/index.html | 10 +- docs/netmiko/cisco/cisco_asa_ssh.html | 47 +- docs/netmiko/cisco/cisco_ios.html | 41 +- docs/netmiko/cisco/cisco_nxos_ssh.html | 6 +- docs/netmiko/cisco/cisco_s300.html | 6 +- docs/netmiko/cisco/cisco_tp_tcce.html | 4 + docs/netmiko/cisco/cisco_wlc_ssh.html | 6 +- docs/netmiko/cisco/cisco_xr.html | 18 +- docs/netmiko/cisco/index.html | 105 ++- docs/netmiko/cisco_base_connection.html | 14 +- docs/netmiko/citrix/index.html | 6 +- docs/netmiko/citrix/netscaler_ssh.html | 6 +- docs/netmiko/cloudgenix/cloudgenix_ion.html | 6 +- docs/netmiko/cloudgenix/index.html | 6 +- docs/netmiko/coriant/coriant_ssh.html | 6 +- docs/netmiko/coriant/index.html | 6 +- docs/netmiko/dell/dell_dnos6.html | 18 +- docs/netmiko/dell/dell_force10_ssh.html | 6 +- docs/netmiko/dell/dell_isilon_ssh.html | 6 +- docs/netmiko/dell/dell_os10_ssh.html | 6 +- docs/netmiko/dell/dell_powerconnect.html | 18 +- docs/netmiko/dell/index.html | 42 +- docs/netmiko/dlink/dlink_ds.html | 16 +- docs/netmiko/dlink/index.html | 10 +- docs/netmiko/eltex/eltex_esr_ssh.html | 6 +- docs/netmiko/eltex/eltex_ssh.html | 6 +- docs/netmiko/eltex/index.html | 12 +- docs/netmiko/endace/endace_ssh.html | 6 +- docs/netmiko/endace/index.html | 6 +- docs/netmiko/enterasys/enterasys_ssh.html | 6 +- docs/netmiko/enterasys/index.html | 6 +- docs/netmiko/extreme/extreme_ers_ssh.html | 6 +- docs/netmiko/extreme/extreme_exos.html | 16 +- docs/netmiko/extreme/extreme_netiron.html | 16 +- docs/netmiko/extreme/extreme_nos_ssh.html | 6 +- docs/netmiko/extreme/extreme_slx_ssh.html | 6 +- docs/netmiko/extreme/extreme_vsp_ssh.html | 6 +- docs/netmiko/extreme/extreme_wing_ssh.html | 6 +- docs/netmiko/extreme/index.html | 50 +- docs/netmiko/f5/f5_linux_ssh.html | 6 +- docs/netmiko/f5/f5_tmsh_ssh.html | 6 +- docs/netmiko/f5/index.html | 12 +- docs/netmiko/flexvnf/flexvnf_ssh.html | 6 +- docs/netmiko/flexvnf/index.html | 6 +- docs/netmiko/fortinet/fortinet_ssh.html | 6 +- docs/netmiko/fortinet/index.html | 6 +- docs/netmiko/hp/hp_comware.html | 30 +- docs/netmiko/hp/hp_procurve.html | 18 +- docs/netmiko/hp/index.html | 22 +- docs/netmiko/huawei/huawei.html | 24 +- docs/netmiko/huawei/huawei_smartax.html | 6 +- docs/netmiko/huawei/index.html | 24 +- docs/netmiko/index.html | 41 +- docs/netmiko/ipinfusion/index.html | 8 + docs/netmiko/ipinfusion/ipinfusion_ocnos.html | 12 + docs/netmiko/juniper/index.html | 16 +- docs/netmiko/juniper/juniper.html | 16 +- docs/netmiko/juniper/juniper_screenos.html | 6 +- docs/netmiko/keymile/index.html | 10 +- docs/netmiko/keymile/keymile_nos_ssh.html | 6 +- docs/netmiko/keymile/keymile_ssh.html | 4 + docs/netmiko/linux/index.html | 6 +- docs/netmiko/linux/linux_ssh.html | 6 +- docs/netmiko/mellanox/index.html | 6 +- .../netmiko/mellanox/mellanox_mlnxos_ssh.html | 6 +- docs/netmiko/mikrotik/index.html | 8 + docs/netmiko/mikrotik/mikrotik_ssh.html | 12 + docs/netmiko/mrv/index.html | 12 +- docs/netmiko/mrv/mrv_lx.html | 6 +- docs/netmiko/mrv/mrv_ssh.html | 6 +- docs/netmiko/netapp/index.html | 6 +- docs/netmiko/netapp/netapp_cdot_ssh.html | 6 +- docs/netmiko/nokia/index.html | 6 +- docs/netmiko/nokia/nokia_sros_ssh.html | 6 +- docs/netmiko/ovs/index.html | 6 +- docs/netmiko/ovs/ovs_linux_ssh.html | 6 +- docs/netmiko/paloalto/index.html | 12 +- docs/netmiko/paloalto/paloalto_panos.html | 18 +- docs/netmiko/pluribus/index.html | 4 + docs/netmiko/pluribus/pluribus_ssh.html | 4 + docs/netmiko/quanta/index.html | 6 +- docs/netmiko/quanta/quanta_mesh_ssh.html | 6 +- docs/netmiko/rad/index.html | 10 +- docs/netmiko/rad/rad_etx.html | 16 +- docs/netmiko/ruckus/index.html | 10 +- docs/netmiko/ruckus/ruckus_fastiron.html | 16 +- docs/netmiko/ruijie/index.html | 10 +- docs/netmiko/ruijie/ruijie_os.html | 16 +- docs/netmiko/sixwind/index.html | 6 +- docs/netmiko/sixwind/sixwind_os.html | 12 +- docs/netmiko/sophos/index.html | 6 +- docs/netmiko/sophos/sophos_sfos_ssh.html | 6 +- docs/netmiko/ssh_autodetect.html | 12 + docs/netmiko/terminal_server/index.html | 12 +- .../terminal_server/terminal_server.html | 18 +- docs/netmiko/ubiquiti/edge_ssh.html | 6 +- docs/netmiko/ubiquiti/index.html | 12 +- docs/netmiko/ubiquiti/unifiswitch_ssh.html | 6 +- docs/netmiko/vyos/index.html | 6 +- docs/netmiko/vyos/vyos_ssh.html | 6 +- docs/netmiko/watchguard/fireware_ssh.html | 6 +- docs/netmiko/watchguard/index.html | 6 +- docs/netmiko/yamaha/index.html | 477 ++++++++++ docs/netmiko/yamaha/yamaha.html | 888 ++++++++++++++++++ docs/netmiko/zte/index.html | 499 ++++++++++ docs/netmiko/zte/zte_zxros.html | 812 ++++++++++++++++ netmiko/ssh_dispatcher.py | 4 + 130 files changed, 4684 insertions(+), 213 deletions(-) create mode 100644 docs/netmiko/broadcom/broadcom_icos_ssh.html create mode 100644 docs/netmiko/broadcom/index.html create mode 100644 docs/netmiko/yamaha/index.html create mode 100644 docs/netmiko/yamaha/yamaha.html create mode 100644 docs/netmiko/zte/index.html create mode 100644 docs/netmiko/zte/zte_zxros.html diff --git a/PLATFORMS.md b/PLATFORMS.md index d485fd4aa..2801891d3 100644 --- a/PLATFORMS.md +++ b/PLATFORMS.md @@ -17,7 +17,9 @@ - Alcatel AOS6/AOS8 - Apresia Systems AEOS +- Broadcom ICOS - Calix B6 +- Centec Networks - Cisco AireOS (Wireless LAN Controllers) - CloudGenix ION - Dell OS9 (Force10) @@ -43,9 +45,10 @@ - Pluribus - Ruckus ICX/FastIron - Ruijie Networks -- Centec Networks - Ubiquiti EdgeSwitch - Vyatta VyOS +- Yamaha +- ZTE ZXROS ###### Experimental @@ -77,4 +80,4 @@ - Ubiquiti Unifi Switch - Versa Networks FlexVNF - Watchguard Firebox -- 6WIND TurboRouter \ No newline at end of file +- 6WIND TurboRouter diff --git a/docs/netmiko/a10/a10_ssh.html b/docs/netmiko/a10/a10_ssh.html index 36d972f9e..917d3792c 100644 --- a/docs/netmiko/a10/a10_ssh.html +++ b/docs/netmiko/a10/a10_ssh.html @@ -61,7 +61,7 @@

    Classes

    class A10SSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    A10 support.

    @@ -190,6 +190,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/a10/index.html b/docs/netmiko/a10/index.html index e8fcac443..250f885b2 100644 --- a/docs/netmiko/a10/index.html +++ b/docs/netmiko/a10/index.html @@ -45,7 +45,7 @@

    Classes

    class A10SSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    A10 support.

    @@ -174,6 +174,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/accedian/accedian_ssh.html b/docs/netmiko/accedian/accedian_ssh.html index daf969f1b..5fe4497bc 100644 --- a/docs/netmiko/accedian/accedian_ssh.html +++ b/docs/netmiko/accedian/accedian_ssh.html @@ -82,7 +82,7 @@

    Classes

    class AccedianSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Base Class for cisco-like behavior.

    @@ -211,6 +211,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/accedian/index.html b/docs/netmiko/accedian/index.html index d10082e25..823722262 100644 --- a/docs/netmiko/accedian/index.html +++ b/docs/netmiko/accedian/index.html @@ -45,7 +45,7 @@

    Classes

    class AccedianSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Base Class for cisco-like behavior.

    @@ -174,6 +174,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/alcatel/alcatel_aos_ssh.html b/docs/netmiko/alcatel/alcatel_aos_ssh.html index aeaed4c7b..a69bdab8a 100644 --- a/docs/netmiko/alcatel/alcatel_aos_ssh.html +++ b/docs/netmiko/alcatel/alcatel_aos_ssh.html @@ -83,7 +83,7 @@

    Classes

    class AlcatelAosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

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

    @@ -212,6 +212,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/alcatel/index.html b/docs/netmiko/alcatel/index.html index 232a0a12a..ed31aa3b0 100644 --- a/docs/netmiko/alcatel/index.html +++ b/docs/netmiko/alcatel/index.html @@ -45,7 +45,7 @@

    Classes

    class AlcatelAosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

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

    @@ -174,6 +174,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/apresia/apresia_aeos.html b/docs/netmiko/apresia/apresia_aeos.html index 7788ac408..0899b407d 100644 --- a/docs/netmiko/apresia/apresia_aeos.html +++ b/docs/netmiko/apresia/apresia_aeos.html @@ -68,7 +68,7 @@

    Classes

    class ApresiaAeosBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Base Class for cisco-like behavior.

    @@ -197,6 +197,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -299,7 +303,7 @@

    Inherited members

    class ApresiaAeosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Base Class for cisco-like behavior.

    @@ -428,6 +432,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -620,6 +628,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/apresia/index.html b/docs/netmiko/apresia/index.html index aa10219b6..5df5bc411 100644 --- a/docs/netmiko/apresia/index.html +++ b/docs/netmiko/apresia/index.html @@ -45,7 +45,7 @@

    Classes

    class ApresiaAeosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Base Class for cisco-like behavior.

    @@ -174,6 +174,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -366,6 +370,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/arista/arista.html b/docs/netmiko/arista/arista.html index 16cec21a4..9ace0b999 100644 --- a/docs/netmiko/arista/arista.html +++ b/docs/netmiko/arista/arista.html @@ -143,7 +143,7 @@

    Classes

    class AristaBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Base Class for cisco-like behavior.

    @@ -272,6 +272,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -513,7 +517,7 @@

    Inherited members

    class AristaSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Base Class for cisco-like behavior.

    @@ -642,6 +646,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -834,6 +842,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/arista/index.html b/docs/netmiko/arista/index.html index 8621f82b7..483c1c199 100644 --- a/docs/netmiko/arista/index.html +++ b/docs/netmiko/arista/index.html @@ -137,7 +137,7 @@

    Inherited members

    class AristaSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Base Class for cisco-like behavior.

    @@ -266,6 +266,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -458,6 +462,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/aruba/aruba_ssh.html b/docs/netmiko/aruba/aruba_ssh.html index a19342dd4..7e09c85e2 100644 --- a/docs/netmiko/aruba/aruba_ssh.html +++ b/docs/netmiko/aruba/aruba_ssh.html @@ -209,6 +209,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/aruba/index.html b/docs/netmiko/aruba/index.html index 43750fefd..5a97540e7 100644 --- a/docs/netmiko/aruba/index.html +++ b/docs/netmiko/aruba/index.html @@ -174,6 +174,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/base_connection.html b/docs/netmiko/base_connection.html index 89fb32192..955d7e54e 100644 --- a/docs/netmiko/base_connection.html +++ b/docs/netmiko/base_connection.html @@ -106,6 +106,7 @@

    Module netmiko.base_connection

    allow_auto_change=False, encoding="ascii", sock=None, + auto_connect=True, ): """ Initialize attributes for establishing connection to target device. @@ -232,6 +233,9 @@

    Module netmiko.base_connection

    argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool """ self.remote_conn = None @@ -352,7 +356,8 @@

    Module netmiko.base_connection

    self.ssh_config_file = ssh_config_file # Establish the remote connection - self._open() + if auto_connect: + self._open() def _open(self): """Decouple connection creation from __init__ for mocking.""" @@ -1955,7 +1960,7 @@

    Classes

    class BaseConnection -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Defines vendor independent methods.

    @@ -2085,6 +2090,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -2133,6 +2142,7 @@

    Classes

    allow_auto_change=False, encoding="ascii", sock=None, + auto_connect=True, ): """ Initialize attributes for establishing connection to target device. @@ -2259,6 +2269,9 @@

    Classes

    argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool """ self.remote_conn = None @@ -2379,7 +2392,8 @@

    Classes

    self.ssh_config_file = ssh_config_file # Establish the remote connection - self._open() + if auto_connect: + self._open() def _open(self): """Decouple connection creation from __init__ for mocking.""" @@ -3986,6 +4000,7 @@

    Subclasses

  • RadETXBase
  • TerminalServer
  • WatchguardFirewareSSH
  • +
  • YamahaBase
  • Static methods

    @@ -5705,7 +5720,7 @@

    Methods

    class TelnetConnection -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Defines vendor independent methods.

    @@ -5835,6 +5850,10 @@

    Methods

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/broadcom/broadcom_icos_ssh.html b/docs/netmiko/broadcom/broadcom_icos_ssh.html new file mode 100644 index 000000000..7ea4f6aa8 --- /dev/null +++ b/docs/netmiko/broadcom/broadcom_icos_ssh.html @@ -0,0 +1,409 @@ + + + + + + +netmiko.broadcom.broadcom_icos_ssh API documentation + + + + + + + + + +
    +
    +
    +

    Module netmiko.broadcom.broadcom_icos_ssh

    +
    +
    +
    +Source code +
    import time
    +from netmiko.cisco_base_connection import CiscoSSHConnection
    +
    +
    +class BroadcomIcosSSH(CiscoSSHConnection):
    +    """
    +    Implements support for Broadcom Icos devices.
    +    Syntax its almost identical to Cisco IOS in most cases
    +    """
    +
    +    def session_preparation(self):
    +        self._test_channel_read()
    +        self.set_base_prompt()
    +        self.enable()
    +        self.set_base_prompt()
    +        self.disable_paging()
    +        self.set_terminal_width()
    +
    +        # Clear the read buffer
    +        time.sleep(0.3 * self.global_delay_factor)
    +        self.clear_buffer()
    +
    +    def check_config_mode(self, check_string=")#"):
    +        """Checks if the device is in configuration mode or not."""
    +        return super().check_config_mode(check_string=check_string)
    +
    +    def config_mode(self, config_command="configure"):
    +        """Enter configuration mode."""
    +        return super().config_mode(config_command=config_command)
    +
    +    def exit_config_mode(self, exit_config="exit"):
    +        """Exit configuration mode."""
    +        return super().exit_config_mode(exit_config=exit_config)
    +
    +    def exit_enable_mode(self, exit_command="exit"):
    +        """Exit enable mode."""
    +        return super().exit_enable_mode(exit_command=exit_command)
    +
    +    def save_config(self, cmd="write memory", confirm=False, confirm_response=""):
    +        """Saves configuration."""
    +        return super().save_config(
    +            cmd=cmd, confirm=confirm, confirm_response=confirm_response
    +        )
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    Classes

    +
    +
    +class BroadcomIcosSSH +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True) +
    +
    +

    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
    +        provided.
    +    :type ip: str
    +
    +    :param host: Hostname of target device. Not required if `ip` is
    +            provided.
    +    :type host: str
    +
    +    :param username: Username to authenticate against target device if
    +            required.
    +    :type username: str
    +
    +    :param password: Password to authenticate against target device if
    +            required.
    +    :type password: str
    +
    +    :param secret: The enable password if target device requires one.
    +    :type secret: str
    +
    +    :param port: The destination port used to connect to the target
    +            device.
    +    :type port: int or None
    +
    +    :param device_type: Class selection based on device type.
    +    :type device_type: str
    +
    +    :param verbose: Enable additional messages to standard output.
    +    :type verbose: bool
    +
    +    :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
    +    :type global_delay_factor: int
    +
    +    :param use_keys: Connect to target device using SSH keys.
    +    :type use_keys: bool
    +
    +    :param key_file: Filename path of the SSH key file to use.
    +    :type key_file: str
    +
    +    :param pkey: SSH key object to use.
    +    :type pkey: paramiko.PKey
    +
    +    :param passphrase: Passphrase to use for encrypted key; password will be used for key
    +            decryption if not specified.
    +    :type passphrase: str
    +
    +    :param allow_agent: Enable use of SSH key-agent.
    +    :type allow_agent: bool
    +
    +    :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
    +            means unknown SSH host keys will be accepted).
    +    :type ssh_strict: bool
    +
    +    :param system_host_keys: Load host keys from the users known_hosts file.
    +    :type system_host_keys: bool
    +    :param alt_host_keys: If `True` host keys will be loaded from the file specified in
    +            alt_key_file.
    +    :type alt_host_keys: bool
    +
    +    :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
    +    :type alt_key_file: str
    +
    +    :param ssh_config_file: File name of OpenSSH configuration file.
    +    :type ssh_config_file: str
    +
    +    :param timeout: Connection timeout.
    +    :type timeout: float
    +
    +    :param session_timeout: Set a timeout for parallel requests.
    +    :type session_timeout: float
    +
    +    :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
    +    :type auth_timeout: float
    +
    +    :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
    +    :type banner_timeout: float
    +
    +    :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
    +            Currently defaults to 0, for backwards compatibility (it will not attempt
    +            to keep the connection alive).
    +    :type keepalive: int
    +
    +    :param default_enter: Character(s) to send to correspond to enter key (default:
    +
    +

    ). +:type default_enter: str

    +
        :param response_return: Character(s) to use in normalized return data to represent
    +            enter key (default:
    +
    +

    ) +:type response_return: str

    +
        :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
    +            to select smallest of global and specific. Sets default global_delay_factor to .1
    +            (default: False)
    +    :type fast_cli: boolean
    +
    +    :param session_log: File path or BufferedIOBase subclass object to write the session log to.
    +    :type session_log: str
    +
    +    :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).
    +    :type session_log_record_writes: boolean
    +
    +    :param session_log_file_mode: "write" or "append" for session_log file mode
    +            (default: "write")
    +    :type session_log_file_mode: str
    +
    +    :param allow_auto_change: Allow automatic configuration changes for terminal settings.
    +            (default: False)
    +    :type allow_auto_change: bool
    +
    +    :param encoding: Encoding to be used when writing bytes to the output channel.
    +            (default: ascii)
    +    :type encoding: str
    +
    +    :param sock: An open socket or socket-like object (such as a `.Channel`) to use for
    +            communication to the target host (default: None).
    +    :type sock: socket
    +
    +    :param global_cmd_verify: Control whether command echo verification is enabled or disabled
    +            (default: None). Global attribute takes precedence over function `cmd_verify`
    +            argument. Value of `None` indicates to use function `cmd_verify` argument.
    +    :type global_cmd_verify: bool|None
    +
    +    :param auto_connect: Control whether Netmiko automatically establishes the connection as
    +            part of the object creation (default: True).
    +    :type auto_connect: bool
    +
    +
    +Source code +
    class BroadcomIcosSSH(CiscoSSHConnection):
    +    """
    +    Implements support for Broadcom Icos devices.
    +    Syntax its almost identical to Cisco IOS in most cases
    +    """
    +
    +    def session_preparation(self):
    +        self._test_channel_read()
    +        self.set_base_prompt()
    +        self.enable()
    +        self.set_base_prompt()
    +        self.disable_paging()
    +        self.set_terminal_width()
    +
    +        # Clear the read buffer
    +        time.sleep(0.3 * self.global_delay_factor)
    +        self.clear_buffer()
    +
    +    def check_config_mode(self, check_string=")#"):
    +        """Checks if the device is in configuration mode or not."""
    +        return super().check_config_mode(check_string=check_string)
    +
    +    def config_mode(self, config_command="configure"):
    +        """Enter configuration mode."""
    +        return super().config_mode(config_command=config_command)
    +
    +    def exit_config_mode(self, exit_config="exit"):
    +        """Exit configuration mode."""
    +        return super().exit_config_mode(exit_config=exit_config)
    +
    +    def exit_enable_mode(self, exit_command="exit"):
    +        """Exit enable mode."""
    +        return super().exit_enable_mode(exit_command=exit_command)
    +
    +    def save_config(self, cmd="write memory", confirm=False, confirm_response=""):
    +        """Saves configuration."""
    +        return super().save_config(
    +            cmd=cmd, confirm=confirm, confirm_response=confirm_response
    +        )
    +
    +

    Ancestors

    + +

    Methods

    +
    +
    +def check_config_mode(self, check_string=')#') +
    +
    +

    Checks if the device is in configuration mode or not.

    +
    +Source code +
    def check_config_mode(self, check_string=")#"):
    +    """Checks if the device is in configuration mode or not."""
    +    return super().check_config_mode(check_string=check_string)
    +
    +
    +
    +def config_mode(self, config_command='configure') +
    +
    +

    Enter configuration mode.

    +
    +Source code +
    def config_mode(self, config_command="configure"):
    +    """Enter configuration mode."""
    +    return super().config_mode(config_command=config_command)
    +
    +
    +
    +def exit_config_mode(self, exit_config='exit') +
    +
    +

    Exit configuration mode.

    +
    +Source code +
    def exit_config_mode(self, exit_config="exit"):
    +    """Exit configuration mode."""
    +    return super().exit_config_mode(exit_config=exit_config)
    +
    +
    +
    +def exit_enable_mode(self, exit_command='exit') +
    +
    +

    Exit enable mode.

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

    Saves configuration.

    +
    +Source code +
    def save_config(self, cmd="write memory", confirm=False, confirm_response=""):
    +    """Saves configuration."""
    +    return super().save_config(
    +        cmd=cmd, confirm=confirm, confirm_response=confirm_response
    +    )
    +
    +
    +
    +

    Inherited members

    + +
    +
    +
    +
    + +
    + + + + + \ No newline at end of file diff --git a/docs/netmiko/broadcom/index.html b/docs/netmiko/broadcom/index.html new file mode 100644 index 000000000..34eb0461a --- /dev/null +++ b/docs/netmiko/broadcom/index.html @@ -0,0 +1,382 @@ + + + + + + +netmiko.broadcom API documentation + + + + + + + + + +
    +
    +
    +

    Module netmiko.broadcom

    +
    +
    +
    +Source code +
    from netmiko.broadcom.broadcom_icos_ssh import BroadcomIcosSSH
    +
    +
    +__all__ = ["BroadcomIcosSSH"]
    +
    +
    +
    +

    Sub-modules

    +
    +
    netmiko.broadcom.broadcom_icos_ssh
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    Classes

    +
    +
    +class BroadcomIcosSSH +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True) +
    +
    +

    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
    +        provided.
    +    :type ip: str
    +
    +    :param host: Hostname of target device. Not required if `ip` is
    +            provided.
    +    :type host: str
    +
    +    :param username: Username to authenticate against target device if
    +            required.
    +    :type username: str
    +
    +    :param password: Password to authenticate against target device if
    +            required.
    +    :type password: str
    +
    +    :param secret: The enable password if target device requires one.
    +    :type secret: str
    +
    +    :param port: The destination port used to connect to the target
    +            device.
    +    :type port: int or None
    +
    +    :param device_type: Class selection based on device type.
    +    :type device_type: str
    +
    +    :param verbose: Enable additional messages to standard output.
    +    :type verbose: bool
    +
    +    :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
    +    :type global_delay_factor: int
    +
    +    :param use_keys: Connect to target device using SSH keys.
    +    :type use_keys: bool
    +
    +    :param key_file: Filename path of the SSH key file to use.
    +    :type key_file: str
    +
    +    :param pkey: SSH key object to use.
    +    :type pkey: paramiko.PKey
    +
    +    :param passphrase: Passphrase to use for encrypted key; password will be used for key
    +            decryption if not specified.
    +    :type passphrase: str
    +
    +    :param allow_agent: Enable use of SSH key-agent.
    +    :type allow_agent: bool
    +
    +    :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
    +            means unknown SSH host keys will be accepted).
    +    :type ssh_strict: bool
    +
    +    :param system_host_keys: Load host keys from the users known_hosts file.
    +    :type system_host_keys: bool
    +    :param alt_host_keys: If `True` host keys will be loaded from the file specified in
    +            alt_key_file.
    +    :type alt_host_keys: bool
    +
    +    :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
    +    :type alt_key_file: str
    +
    +    :param ssh_config_file: File name of OpenSSH configuration file.
    +    :type ssh_config_file: str
    +
    +    :param timeout: Connection timeout.
    +    :type timeout: float
    +
    +    :param session_timeout: Set a timeout for parallel requests.
    +    :type session_timeout: float
    +
    +    :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
    +    :type auth_timeout: float
    +
    +    :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
    +    :type banner_timeout: float
    +
    +    :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
    +            Currently defaults to 0, for backwards compatibility (it will not attempt
    +            to keep the connection alive).
    +    :type keepalive: int
    +
    +    :param default_enter: Character(s) to send to correspond to enter key (default:
    +
    +

    ). +:type default_enter: str

    +
        :param response_return: Character(s) to use in normalized return data to represent
    +            enter key (default:
    +
    +

    ) +:type response_return: str

    +
        :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
    +            to select smallest of global and specific. Sets default global_delay_factor to .1
    +            (default: False)
    +    :type fast_cli: boolean
    +
    +    :param session_log: File path or BufferedIOBase subclass object to write the session log to.
    +    :type session_log: str
    +
    +    :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).
    +    :type session_log_record_writes: boolean
    +
    +    :param session_log_file_mode: "write" or "append" for session_log file mode
    +            (default: "write")
    +    :type session_log_file_mode: str
    +
    +    :param allow_auto_change: Allow automatic configuration changes for terminal settings.
    +            (default: False)
    +    :type allow_auto_change: bool
    +
    +    :param encoding: Encoding to be used when writing bytes to the output channel.
    +            (default: ascii)
    +    :type encoding: str
    +
    +    :param sock: An open socket or socket-like object (such as a `.Channel`) to use for
    +            communication to the target host (default: None).
    +    :type sock: socket
    +
    +    :param global_cmd_verify: Control whether command echo verification is enabled or disabled
    +            (default: None). Global attribute takes precedence over function `cmd_verify`
    +            argument. Value of `None` indicates to use function `cmd_verify` argument.
    +    :type global_cmd_verify: bool|None
    +
    +    :param auto_connect: Control whether Netmiko automatically establishes the connection as
    +            part of the object creation (default: True).
    +    :type auto_connect: bool
    +
    +
    +Source code +
    class BroadcomIcosSSH(CiscoSSHConnection):
    +    """
    +    Implements support for Broadcom Icos devices.
    +    Syntax its almost identical to Cisco IOS in most cases
    +    """
    +
    +    def session_preparation(self):
    +        self._test_channel_read()
    +        self.set_base_prompt()
    +        self.enable()
    +        self.set_base_prompt()
    +        self.disable_paging()
    +        self.set_terminal_width()
    +
    +        # Clear the read buffer
    +        time.sleep(0.3 * self.global_delay_factor)
    +        self.clear_buffer()
    +
    +    def check_config_mode(self, check_string=")#"):
    +        """Checks if the device is in configuration mode or not."""
    +        return super().check_config_mode(check_string=check_string)
    +
    +    def config_mode(self, config_command="configure"):
    +        """Enter configuration mode."""
    +        return super().config_mode(config_command=config_command)
    +
    +    def exit_config_mode(self, exit_config="exit"):
    +        """Exit configuration mode."""
    +        return super().exit_config_mode(exit_config=exit_config)
    +
    +    def exit_enable_mode(self, exit_command="exit"):
    +        """Exit enable mode."""
    +        return super().exit_enable_mode(exit_command=exit_command)
    +
    +    def save_config(self, cmd="write memory", confirm=False, confirm_response=""):
    +        """Saves configuration."""
    +        return super().save_config(
    +            cmd=cmd, confirm=confirm, confirm_response=confirm_response
    +        )
    +
    +

    Ancestors

    + +

    Methods

    +
    +
    +def check_config_mode(self, check_string=')#') +
    +
    +

    Checks if the device is in configuration mode or not.

    +
    +Source code +
    def check_config_mode(self, check_string=")#"):
    +    """Checks if the device is in configuration mode or not."""
    +    return super().check_config_mode(check_string=check_string)
    +
    +
    +
    +def config_mode(self, config_command='configure') +
    +
    +

    Enter configuration mode.

    +
    +Source code +
    def config_mode(self, config_command="configure"):
    +    """Enter configuration mode."""
    +    return super().config_mode(config_command=config_command)
    +
    +
    +
    +def exit_config_mode(self, exit_config='exit') +
    +
    +

    Exit configuration mode.

    +
    +Source code +
    def exit_config_mode(self, exit_config="exit"):
    +    """Exit configuration mode."""
    +    return super().exit_config_mode(exit_config=exit_config)
    +
    +
    +
    +def exit_enable_mode(self, exit_command='exit') +
    +
    +

    Exit enable mode.

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

    Saves configuration.

    +
    +Source code +
    def save_config(self, cmd="write memory", confirm=False, confirm_response=""):
    +    """Saves configuration."""
    +    return super().save_config(
    +        cmd=cmd, confirm=confirm, confirm_response=confirm_response
    +    )
    +
    +
    +
    +

    Inherited members

    + +
    +
    +
    +
    + +
    + + + + + \ No newline at end of file diff --git a/docs/netmiko/calix/calix_b6.html b/docs/netmiko/calix/calix_b6.html index 86d1a145e..a9d634f9d 100644 --- a/docs/netmiko/calix/calix_b6.html +++ b/docs/netmiko/calix/calix_b6.html @@ -267,6 +267,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -581,6 +585,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -796,6 +804,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/calix/index.html b/docs/netmiko/calix/index.html index bbe4a3acb..4b3118726 100644 --- a/docs/netmiko/calix/index.html +++ b/docs/netmiko/calix/index.html @@ -176,6 +176,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -391,6 +395,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/centec/centec_os.html b/docs/netmiko/centec/centec_os.html index 6588eda49..a3bebb600 100644 --- a/docs/netmiko/centec/centec_os.html +++ b/docs/netmiko/centec/centec_os.html @@ -66,7 +66,7 @@

    Classes

    class CentecOSBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Base Class for cisco-like behavior.

    @@ -195,6 +195,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -306,7 +310,7 @@

    Inherited members

    class CentecOSSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Base Class for cisco-like behavior.

    @@ -435,6 +439,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -498,7 +506,7 @@

    Inherited members

    class CentecOSTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Base Class for cisco-like behavior.

    @@ -627,6 +635,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/centec/index.html b/docs/netmiko/centec/index.html index 760e1ff5b..c2828c430 100644 --- a/docs/netmiko/centec/index.html +++ b/docs/netmiko/centec/index.html @@ -45,7 +45,7 @@

    Classes

    class CentecOSSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Base Class for cisco-like behavior.

    @@ -174,6 +174,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -237,7 +241,7 @@

    Inherited members

    class CentecOSTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Base Class for cisco-like behavior.

    @@ -366,6 +370,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/checkpoint/checkpoint_gaia_ssh.html b/docs/netmiko/checkpoint/checkpoint_gaia_ssh.html index 4205cee6f..5793fcf8f 100644 --- a/docs/netmiko/checkpoint/checkpoint_gaia_ssh.html +++ b/docs/netmiko/checkpoint/checkpoint_gaia_ssh.html @@ -69,7 +69,7 @@

    Classes

    class CheckPointGaiaSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Implements methods for communicating with Check Point Gaia @@ -199,6 +199,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/checkpoint/index.html b/docs/netmiko/checkpoint/index.html index 2af311eea..ab97157b9 100644 --- a/docs/netmiko/checkpoint/index.html +++ b/docs/netmiko/checkpoint/index.html @@ -45,7 +45,7 @@

    Classes

    class CheckPointGaiaSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Implements methods for communicating with Check Point Gaia @@ -175,6 +175,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/ciena/ciena_saos.html b/docs/netmiko/ciena/ciena_saos.html index 57507b06b..2fffd017c 100644 --- a/docs/netmiko/ciena/ciena_saos.html +++ b/docs/netmiko/ciena/ciena_saos.html @@ -252,7 +252,7 @@

    Classes

    class CienaSaosBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Ciena SAOS support.

    @@ -384,6 +384,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -819,7 +823,7 @@

    Inherited members

    class CienaSaosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Ciena SAOS support.

    @@ -951,6 +955,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -1144,6 +1152,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/ciena/index.html b/docs/netmiko/ciena/index.html index 7ba934490..4ce9b135f 100644 --- a/docs/netmiko/ciena/index.html +++ b/docs/netmiko/ciena/index.html @@ -284,7 +284,7 @@

    Inherited members

    class CienaSaosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Ciena SAOS support.

    @@ -416,6 +416,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -609,6 +613,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/cisco/cisco_asa_ssh.html b/docs/netmiko/cisco/cisco_asa_ssh.html index c2b09f108..105347174 100644 --- a/docs/netmiko/cisco/cisco_asa_ssh.html +++ b/docs/netmiko/cisco/cisco_asa_ssh.html @@ -27,6 +27,7 @@

    Module netmiko.cisco.cisco_asa_ssh

    import re import time from netmiko.cisco_base_connection import CiscoSSHConnection, CiscoFileTransfer +from netmiko.ssh_exception import NetmikoAuthenticationException class CiscoAsaSSH(CiscoSSHConnection): @@ -116,12 +117,14 @@

    Module netmiko.cisco.cisco_asa_ssh

    twb-dc-fw1> login Username: admin - Password: ************ + + Raises NetmikoAuthenticationException, if we do not reach privilege + level 15 after 10 loops. """ delay_factor = self.select_delay_factor(0) i = 1 - max_attempts = 50 + max_attempts = 10 self.write_channel("login" + self.RETURN) while i <= max_attempts: time.sleep(0.5 * delay_factor) @@ -131,11 +134,14 @@

    Module netmiko.cisco.cisco_asa_ssh

    elif "ssword" in output: self.write_channel(self.password + self.RETURN) elif "#" in output: - break + return else: self.write_channel("login" + self.RETURN) i += 1 + msg = "Unable to enter enable mode!" + raise NetmikoAuthenticationException(msg) + def save_config(self, cmd="write mem", confirm=False, confirm_response=""): """Saves Config""" return super().save_config( @@ -203,7 +209,7 @@

    Inherited members

    class CiscoAsaSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Subclass specific to Cisco ASA.

    @@ -332,6 +338,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -422,12 +432,14 @@

    Inherited members

    twb-dc-fw1> login Username: admin - Password: ************ + + Raises NetmikoAuthenticationException, if we do not reach privilege + level 15 after 10 loops. """ delay_factor = self.select_delay_factor(0) i = 1 - max_attempts = 50 + max_attempts = 10 self.write_channel("login" + self.RETURN) while i <= max_attempts: time.sleep(0.5 * delay_factor) @@ -437,11 +449,14 @@

    Inherited members

    elif "ssword" in output: self.write_channel(self.password + self.RETURN) elif "#" in output: - break + return else: self.write_channel("login" + self.RETURN) i += 1 + msg = "Unable to enter enable mode!" + raise NetmikoAuthenticationException(msg) + def save_config(self, cmd="write mem", confirm=False, confirm_response=""): """Saves Config""" return super().save_config( @@ -462,8 +477,9 @@

    Methods

    Handle ASA reaching privilege level 15 using login

    twb-dc-fw1> login -Username: admin -Password: **

    +Username: admin

    +

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

    Source code
    def asa_login(self):
    @@ -472,12 +488,14 @@ 

    Methods

    twb-dc-fw1> login Username: admin - Password: ************ + + Raises NetmikoAuthenticationException, if we do not reach privilege + level 15 after 10 loops. """ delay_factor = self.select_delay_factor(0) i = 1 - max_attempts = 50 + max_attempts = 10 self.write_channel("login" + self.RETURN) while i <= max_attempts: time.sleep(0.5 * delay_factor) @@ -487,10 +505,13 @@

    Methods

    elif "ssword" in output: self.write_channel(self.password + self.RETURN) elif "#" in output: - break + return else: self.write_channel("login" + self.RETURN) - i += 1
    + i += 1 + + msg = "Unable to enter enable mode!" + raise NetmikoAuthenticationException(msg)
    diff --git a/docs/netmiko/cisco/cisco_ios.html b/docs/netmiko/cisco/cisco_ios.html index 1409834e9..ff8b8218f 100644 --- a/docs/netmiko/cisco/cisco_ios.html +++ b/docs/netmiko/cisco/cisco_ios.html @@ -193,7 +193,10 @@

    Module netmiko.cisco.cisco_ios

    return hashlib.md5(file_contents).hexdigest() def config_md5(self, source_config): - return super().file_md5(source_config, add_newline=True) + """Compute MD5 hash of text.""" + file_contents = source_config + "\n" # Cisco IOS automatically adds this + file_contents = file_contents.encode("UTF-8") + return hashlib.md5(file_contents).hexdigest() def put_file(self): curlybrace = r"{" @@ -264,7 +267,7 @@

    Classes

    class CiscoIosBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Common Methods for IOS (both SSH and telnet).

    @@ -393,6 +396,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -566,7 +573,7 @@

    Inherited members

    class CiscoIosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Cisco IOS SSH driver.

    @@ -695,6 +702,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -759,7 +770,7 @@

    Inherited members

    class CiscoIosSerial -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Cisco IOS Serial driver.

    @@ -888,6 +899,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -952,7 +967,7 @@

    Inherited members

    class CiscoIosTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Cisco IOS Telnet driver.

    @@ -1081,6 +1096,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -1261,7 +1280,10 @@

    Inherited members

    return hashlib.md5(file_contents).hexdigest() def config_md5(self, source_config): - return super().file_md5(source_config, add_newline=True) + """Compute MD5 hash of text.""" + file_contents = source_config + "\n" # Cisco IOS automatically adds this + file_contents = file_contents.encode("UTF-8") + return hashlib.md5(file_contents).hexdigest() def put_file(self): curlybrace = r"{" @@ -1332,11 +1354,14 @@

    Methods

    def config_md5(self, source_config)
    -
    +

    Compute MD5 hash of text.

    Source code
    def config_md5(self, source_config):
    -    return super().file_md5(source_config, add_newline=True)
    + """Compute MD5 hash of text.""" + file_contents = source_config + "\n" # Cisco IOS automatically adds this + file_contents = file_contents.encode("UTF-8") + return hashlib.md5(file_contents).hexdigest()
    diff --git a/docs/netmiko/cisco/cisco_nxos_ssh.html b/docs/netmiko/cisco/cisco_nxos_ssh.html index 9079cba9f..28d0b3362 100644 --- a/docs/netmiko/cisco/cisco_nxos_ssh.html +++ b/docs/netmiko/cisco/cisco_nxos_ssh.html @@ -305,7 +305,7 @@

    Inherited members

    class CiscoNxosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Base Class for cisco-like behavior.

    @@ -434,6 +434,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/cisco/cisco_s300.html b/docs/netmiko/cisco/cisco_s300.html index 924b68b36..7a71b8393 100644 --- a/docs/netmiko/cisco/cisco_s300.html +++ b/docs/netmiko/cisco/cisco_s300.html @@ -63,7 +63,7 @@

    Classes

    class CiscoS300SSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Support for Cisco SG300 series of devices.

    @@ -195,6 +195,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/cisco/cisco_tp_tcce.html b/docs/netmiko/cisco/cisco_tp_tcce.html index b5fc84929..fe3c6e594 100644 --- a/docs/netmiko/cisco/cisco_tp_tcce.html +++ b/docs/netmiko/cisco/cisco_tp_tcce.html @@ -253,6 +253,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/cisco/cisco_wlc_ssh.html b/docs/netmiko/cisco/cisco_wlc_ssh.html index 237680a0b..bfb401c15 100644 --- a/docs/netmiko/cisco/cisco_wlc_ssh.html +++ b/docs/netmiko/cisco/cisco_wlc_ssh.html @@ -230,7 +230,7 @@

    Classes

    class CiscoWlcSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Netmiko Cisco WLC support.

    @@ -359,6 +359,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/cisco/cisco_xr.html b/docs/netmiko/cisco/cisco_xr.html index 8f39184e0..a670b434e 100644 --- a/docs/netmiko/cisco/cisco_xr.html +++ b/docs/netmiko/cisco/cisco_xr.html @@ -231,7 +231,7 @@

    Classes

    class CiscoXrBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Base Class for cisco-like behavior.

    @@ -360,6 +360,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -902,7 +906,7 @@

    Inherited members

    class CiscoXrSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Cisco XR SSH driver.

    @@ -1031,6 +1035,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -1095,7 +1103,7 @@

    Inherited members

    class CiscoXrTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Cisco XR Telnet driver.

    @@ -1224,6 +1232,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/cisco/index.html b/docs/netmiko/cisco/index.html index b226e88b0..7d4f4029e 100644 --- a/docs/netmiko/cisco/index.html +++ b/docs/netmiko/cisco/index.html @@ -144,7 +144,7 @@

    Inherited members

    class CiscoAsaSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Subclass specific to Cisco ASA.

    @@ -273,6 +273,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -363,12 +367,14 @@

    Inherited members

    twb-dc-fw1> login Username: admin - Password: ************ + + Raises NetmikoAuthenticationException, if we do not reach privilege + level 15 after 10 loops. """ delay_factor = self.select_delay_factor(0) i = 1 - max_attempts = 50 + max_attempts = 10 self.write_channel("login" + self.RETURN) while i <= max_attempts: time.sleep(0.5 * delay_factor) @@ -378,11 +384,14 @@

    Inherited members

    elif "ssword" in output: self.write_channel(self.password + self.RETURN) elif "#" in output: - break + return else: self.write_channel("login" + self.RETURN) i += 1 + msg = "Unable to enter enable mode!" + raise NetmikoAuthenticationException(msg) + def save_config(self, cmd="write mem", confirm=False, confirm_response=""): """Saves Config""" return super().save_config( @@ -403,8 +412,9 @@

    Methods

    Handle ASA reaching privilege level 15 using login

    twb-dc-fw1> login -Username: admin -Password: **

    +Username: admin

    +

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

    Source code
    def asa_login(self):
    @@ -413,12 +423,14 @@ 

    Methods

    twb-dc-fw1> login Username: admin - Password: ************ + + Raises NetmikoAuthenticationException, if we do not reach privilege + level 15 after 10 loops. """ delay_factor = self.select_delay_factor(0) i = 1 - max_attempts = 50 + max_attempts = 10 self.write_channel("login" + self.RETURN) while i <= max_attempts: time.sleep(0.5 * delay_factor) @@ -428,10 +440,13 @@

    Methods

    elif "ssword" in output: self.write_channel(self.password + self.RETURN) elif "#" in output: - break + return else: self.write_channel("login" + self.RETURN) - i += 1
    + i += 1 + + msg = "Unable to enter enable mode!" + raise NetmikoAuthenticationException(msg)
    @@ -616,7 +631,7 @@

    Inherited members

    class CiscoIosBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Common Methods for IOS (both SSH and telnet).

    @@ -745,6 +760,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -918,7 +937,7 @@

    Inherited members

    class CiscoIosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Cisco IOS SSH driver.

    @@ -1047,6 +1066,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -1111,7 +1134,7 @@

    Inherited members

    class CiscoIosSerial -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Cisco IOS Serial driver.

    @@ -1240,6 +1263,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -1304,7 +1331,7 @@

    Inherited members

    class CiscoIosTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Cisco IOS Telnet driver.

    @@ -1433,6 +1460,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -1644,7 +1675,7 @@

    Inherited members

    class CiscoNxosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Base Class for cisco-like behavior.

    @@ -1773,6 +1804,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -1903,7 +1938,7 @@

    Inherited members

    class CiscoS300SSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Support for Cisco SG300 series of devices.

    @@ -2035,6 +2070,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -2268,6 +2307,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -2525,7 +2568,7 @@

    Inherited members

    class CiscoWlcSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Netmiko Cisco WLC support.

    @@ -2654,6 +2697,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -3266,7 +3313,7 @@

    Inherited members

    class CiscoXrSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Cisco XR SSH driver.

    @@ -3395,6 +3442,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -3459,7 +3510,7 @@

    Inherited members

    class CiscoXrTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Cisco XR Telnet driver.

    @@ -3588,6 +3639,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -3768,7 +3823,10 @@

    Inherited members

    return hashlib.md5(file_contents).hexdigest() def config_md5(self, source_config): - return super().file_md5(source_config, add_newline=True) + """Compute MD5 hash of text.""" + file_contents = source_config + "\n" # Cisco IOS automatically adds this + file_contents = file_contents.encode("UTF-8") + return hashlib.md5(file_contents).hexdigest() def put_file(self): curlybrace = r"{" @@ -3839,11 +3897,14 @@

    Methods

    def config_md5(self, source_config)
    -
    +

    Compute MD5 hash of text.

    Source code
    def config_md5(self, source_config):
    -    return super().file_md5(source_config, add_newline=True)
    + """Compute MD5 hash of text.""" + file_contents = source_config + "\n" # Cisco IOS automatically adds this + file_contents = file_contents.encode("UTF-8") + return hashlib.md5(file_contents).hexdigest()
    diff --git a/docs/netmiko/cisco_base_connection.html b/docs/netmiko/cisco_base_connection.html index 727691d68..fc28bb28d 100644 --- a/docs/netmiko/cisco_base_connection.html +++ b/docs/netmiko/cisco_base_connection.html @@ -266,7 +266,7 @@

    Classes

    class CiscoBaseConnection -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Base Class for cisco-like behavior.

    @@ -395,6 +395,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -630,6 +634,7 @@

    Subclasses

  • OneaccessOneOSBase
  • RuijieOSBase
  • SixwindOSBase
  • +
  • ZteZxrosBase
  • Methods

    @@ -994,7 +999,7 @@

    Inherited members

    class CiscoSSHConnection -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Base Class for cisco-like behavior.

    @@ -1123,6 +1128,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -1142,6 +1151,7 @@

    Subclasses

  • AristaBase
  • ApresiaAeosBase
  • ArubaSSH
  • +
  • BroadcomIcosSSH
  • CalixB6Base
  • CiscoAsaSSH
  • CiscoNxosSSH
  • diff --git a/docs/netmiko/citrix/index.html b/docs/netmiko/citrix/index.html index 2292efc08..4328b8b22 100644 --- a/docs/netmiko/citrix/index.html +++ b/docs/netmiko/citrix/index.html @@ -45,7 +45,7 @@

    Classes

    class NetscalerSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Netscaler SSH class.

    @@ -174,6 +174,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/citrix/netscaler_ssh.html b/docs/netmiko/citrix/netscaler_ssh.html index c71862276..b77859ef5 100644 --- a/docs/netmiko/citrix/netscaler_ssh.html +++ b/docs/netmiko/citrix/netscaler_ssh.html @@ -95,7 +95,7 @@

    Classes

    class NetscalerSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Netscaler SSH class.

    @@ -224,6 +224,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/cloudgenix/cloudgenix_ion.html b/docs/netmiko/cloudgenix/cloudgenix_ion.html index e2c875e25..2000c6740 100644 --- a/docs/netmiko/cloudgenix/cloudgenix_ion.html +++ b/docs/netmiko/cloudgenix/cloudgenix_ion.html @@ -84,7 +84,7 @@

    Classes

    class CloudGenixIonSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Base Class for cisco-like behavior.

    @@ -213,6 +213,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/cloudgenix/index.html b/docs/netmiko/cloudgenix/index.html index 42040ab03..4bc2a676f 100644 --- a/docs/netmiko/cloudgenix/index.html +++ b/docs/netmiko/cloudgenix/index.html @@ -45,7 +45,7 @@

    Classes

    class CloudGenixIonSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Base Class for cisco-like behavior.

    @@ -174,6 +174,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/coriant/coriant_ssh.html b/docs/netmiko/coriant/coriant_ssh.html index e4b5180fb..b39aed730 100644 --- a/docs/netmiko/coriant/coriant_ssh.html +++ b/docs/netmiko/coriant/coriant_ssh.html @@ -78,7 +78,7 @@

    Classes

    class CoriantSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Base Class for cisco-like behavior.

    @@ -207,6 +207,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/coriant/index.html b/docs/netmiko/coriant/index.html index e55cf96c5..1784d0d52 100644 --- a/docs/netmiko/coriant/index.html +++ b/docs/netmiko/coriant/index.html @@ -45,7 +45,7 @@

    Classes

    class CoriantSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Base Class for cisco-like behavior.

    @@ -174,6 +174,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/dell/dell_dnos6.html b/docs/netmiko/dell/dell_dnos6.html index bd0ecaf48..eda6b51d4 100644 --- a/docs/netmiko/dell/dell_dnos6.html +++ b/docs/netmiko/dell/dell_dnos6.html @@ -72,7 +72,7 @@

    Classes

    class DellDNOS6Base -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Dell PowerConnect Driver.

    @@ -201,6 +201,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -310,7 +314,7 @@

    Inherited members

    class DellDNOS6SSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Dell PowerConnect Driver.

    @@ -439,6 +443,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -502,7 +510,7 @@

    Inherited members

    class DellDNOS6Telnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Dell PowerConnect Driver.

    @@ -631,6 +639,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/dell/dell_force10_ssh.html b/docs/netmiko/dell/dell_force10_ssh.html index 7d881a11a..01484e826 100644 --- a/docs/netmiko/dell/dell_force10_ssh.html +++ b/docs/netmiko/dell/dell_force10_ssh.html @@ -53,7 +53,7 @@

    Classes

    class DellForce10SSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Dell Force10 Driver - supports DNOS9.

    @@ -182,6 +182,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/dell/dell_isilon_ssh.html b/docs/netmiko/dell/dell_isilon_ssh.html index 7442dc452..573caa06f 100644 --- a/docs/netmiko/dell/dell_isilon_ssh.html +++ b/docs/netmiko/dell/dell_isilon_ssh.html @@ -121,7 +121,7 @@

    Classes

    class DellIsilonSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Defines vendor independent methods.

    @@ -251,6 +251,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/dell/dell_os10_ssh.html b/docs/netmiko/dell/dell_os10_ssh.html index b625fd88d..f92a69b7b 100644 --- a/docs/netmiko/dell/dell_os10_ssh.html +++ b/docs/netmiko/dell/dell_os10_ssh.html @@ -297,7 +297,7 @@

    Inherited members

    class DellOS10SSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Dell EMC Networking OS10 Driver - supports dellos10.

    @@ -426,6 +426,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/dell/dell_powerconnect.html b/docs/netmiko/dell/dell_powerconnect.html index 525cfd8ab..2b5ea2d16 100644 --- a/docs/netmiko/dell/dell_powerconnect.html +++ b/docs/netmiko/dell/dell_powerconnect.html @@ -145,7 +145,7 @@

    Classes

    class DellPowerConnectBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Dell PowerConnect Driver.

    @@ -274,6 +274,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -436,7 +440,7 @@

    Inherited members

    class DellPowerConnectSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Dell PowerConnect Driver.

    @@ -567,6 +571,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -719,7 +727,7 @@

    Inherited members

    class DellPowerConnectTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Dell PowerConnect Telnet Driver.

    @@ -848,6 +856,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/dell/index.html b/docs/netmiko/dell/index.html index 5341348b3..122da8471 100644 --- a/docs/netmiko/dell/index.html +++ b/docs/netmiko/dell/index.html @@ -76,7 +76,7 @@

    Classes

    class DellDNOS6SSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Dell PowerConnect Driver.

    @@ -205,6 +205,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -268,7 +272,7 @@

    Inherited members

    class DellDNOS6Telnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Dell PowerConnect Driver.

    @@ -397,6 +401,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -460,7 +468,7 @@

    Inherited members

    class DellForce10SSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Dell Force10 Driver - supports DNOS9.

    @@ -589,6 +597,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -683,7 +695,7 @@

    Inherited members

    class DellIsilonSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Defines vendor independent methods.

    @@ -813,6 +825,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -1259,7 +1275,7 @@

    Inherited members

    class DellOS10SSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Dell EMC Networking OS10 Driver - supports dellos10.

    @@ -1388,6 +1404,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -1482,7 +1502,7 @@

    Inherited members

    class DellPowerConnectSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Dell PowerConnect Driver.

    @@ -1613,6 +1633,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -1765,7 +1789,7 @@

    Inherited members

    class DellPowerConnectTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Dell PowerConnect Telnet Driver.

    @@ -1894,6 +1918,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/dlink/dlink_ds.html b/docs/netmiko/dlink/dlink_ds.html index a149ab193..67addb0c8 100644 --- a/docs/netmiko/dlink/dlink_ds.html +++ b/docs/netmiko/dlink/dlink_ds.html @@ -100,7 +100,7 @@

    Classes

    Supports D-Link DGS/DES device series (there are some DGS/DES devices that are web-only)

    @@ -229,6 +229,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -455,7 +459,7 @@

    Inherited members

    Supports D-Link DGS/DES device series (there are some DGS/DES devices that are web-only)

    @@ -584,6 +588,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -776,6 +784,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/dlink/index.html b/docs/netmiko/dlink/index.html index 10048b17d..e7982b629 100644 --- a/docs/netmiko/dlink/index.html +++ b/docs/netmiko/dlink/index.html @@ -45,7 +45,7 @@

    Classes

    class DlinkDSSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Supports D-Link DGS/DES device series (there are some DGS/DES devices that are web-only)

    @@ -174,6 +174,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -366,6 +370,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/eltex/eltex_esr_ssh.html b/docs/netmiko/eltex/eltex_esr_ssh.html index 850ecef93..4b1f4cdff 100644 --- a/docs/netmiko/eltex/eltex_esr_ssh.html +++ b/docs/netmiko/eltex/eltex_esr_ssh.html @@ -138,7 +138,7 @@

    Classes

    class EltexEsrSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Netmiko support for routers Eltex ESR.

    @@ -267,6 +267,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/eltex/eltex_ssh.html b/docs/netmiko/eltex/eltex_ssh.html index b88545355..01cb343df 100644 --- a/docs/netmiko/eltex/eltex_ssh.html +++ b/docs/netmiko/eltex/eltex_ssh.html @@ -54,7 +54,7 @@

    Classes

    class EltexSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Base Class for cisco-like behavior.

    @@ -183,6 +183,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/eltex/index.html b/docs/netmiko/eltex/index.html index c89f9ab9f..4b347f5e9 100644 --- a/docs/netmiko/eltex/index.html +++ b/docs/netmiko/eltex/index.html @@ -50,7 +50,7 @@

    Classes

    class EltexEsrSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Netmiko support for routers Eltex ESR.

    @@ -179,6 +179,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -431,7 +435,7 @@

    Inherited members

    class EltexSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Base Class for cisco-like behavior.

    @@ -560,6 +564,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/endace/endace_ssh.html b/docs/netmiko/endace/endace_ssh.html index 942503d29..4e3bded80 100644 --- a/docs/netmiko/endace/endace_ssh.html +++ b/docs/netmiko/endace/endace_ssh.html @@ -74,7 +74,7 @@

    Classes

    class EndaceSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Base Class for cisco-like behavior.

    @@ -203,6 +203,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/endace/index.html b/docs/netmiko/endace/index.html index 265ec0b76..083591b72 100644 --- a/docs/netmiko/endace/index.html +++ b/docs/netmiko/endace/index.html @@ -45,7 +45,7 @@

    Classes

    class EndaceSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Base Class for cisco-like behavior.

    @@ -174,6 +174,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/enterasys/enterasys_ssh.html b/docs/netmiko/enterasys/enterasys_ssh.html index d1f26de3f..0b8da5163 100644 --- a/docs/netmiko/enterasys/enterasys_ssh.html +++ b/docs/netmiko/enterasys/enterasys_ssh.html @@ -56,7 +56,7 @@

    Classes

    class EnterasysSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Enterasys support.

    @@ -185,6 +185,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/enterasys/index.html b/docs/netmiko/enterasys/index.html index dbc3b22d0..537b976b0 100644 --- a/docs/netmiko/enterasys/index.html +++ b/docs/netmiko/enterasys/index.html @@ -45,7 +45,7 @@

    Classes

    class EnterasysSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Enterasys support.

    @@ -174,6 +174,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/extreme/extreme_ers_ssh.html b/docs/netmiko/extreme/extreme_ers_ssh.html index 82aaa242f..aa08fa4aa 100644 --- a/docs/netmiko/extreme/extreme_ers_ssh.html +++ b/docs/netmiko/extreme/extreme_ers_ssh.html @@ -79,7 +79,7 @@

    Classes

    class ExtremeErsSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Netmiko support for Extreme Ethernet Routing Switch.

    @@ -208,6 +208,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/extreme/extreme_exos.html b/docs/netmiko/extreme/extreme_exos.html index 2594b1272..bb8a2a409 100644 --- a/docs/netmiko/extreme/extreme_exos.html +++ b/docs/netmiko/extreme/extreme_exos.html @@ -121,7 +121,7 @@

    Classes

    class ExtremeExosBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Extreme Exos support.

    @@ -251,6 +251,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -493,7 +497,7 @@

    Inherited members

    class ExtremeExosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Extreme Exos support.

    @@ -623,6 +627,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -816,6 +824,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/extreme/extreme_netiron.html b/docs/netmiko/extreme/extreme_netiron.html index efa4d8940..83f01127b 100644 --- a/docs/netmiko/extreme/extreme_netiron.html +++ b/docs/netmiko/extreme/extreme_netiron.html @@ -55,7 +55,7 @@

    Classes

    class ExtremeNetironBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Base Class for cisco-like behavior.

    @@ -184,6 +184,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -271,7 +275,7 @@

    Inherited members

    class ExtremeNetironSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Base Class for cisco-like behavior.

    @@ -400,6 +404,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -592,6 +600,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/extreme/extreme_nos_ssh.html b/docs/netmiko/extreme/extreme_nos_ssh.html index 2660995b6..60f94d296 100644 --- a/docs/netmiko/extreme/extreme_nos_ssh.html +++ b/docs/netmiko/extreme/extreme_nos_ssh.html @@ -68,7 +68,7 @@

    Classes

    class ExtremeNosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Support for Extreme NOS/VDX.

    @@ -197,6 +197,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/extreme/extreme_slx_ssh.html b/docs/netmiko/extreme/extreme_slx_ssh.html index 6dd204872..b139cadff 100644 --- a/docs/netmiko/extreme/extreme_slx_ssh.html +++ b/docs/netmiko/extreme/extreme_slx_ssh.html @@ -68,7 +68,7 @@

    Classes

    class ExtremeSlxSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Support for Extreme SLX.

    @@ -197,6 +197,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/extreme/extreme_vsp_ssh.html b/docs/netmiko/extreme/extreme_vsp_ssh.html index 52037eae9..f1cfca02a 100644 --- a/docs/netmiko/extreme/extreme_vsp_ssh.html +++ b/docs/netmiko/extreme/extreme_vsp_ssh.html @@ -58,7 +58,7 @@

    Classes

    class ExtremeVspSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Extreme Virtual Services Platform Support.

    @@ -187,6 +187,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/extreme/extreme_wing_ssh.html b/docs/netmiko/extreme/extreme_wing_ssh.html index 40ed16248..723c5fa8b 100644 --- a/docs/netmiko/extreme/extreme_wing_ssh.html +++ b/docs/netmiko/extreme/extreme_wing_ssh.html @@ -50,7 +50,7 @@

    Classes

    class ExtremeWingSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Extreme WiNG support.

    @@ -179,6 +179,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/extreme/index.html b/docs/netmiko/extreme/index.html index b365d05b4..62447cc7a 100644 --- a/docs/netmiko/extreme/index.html +++ b/docs/netmiko/extreme/index.html @@ -87,7 +87,7 @@

    Classes

    class ExtremeErsSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Netmiko support for Extreme Ethernet Routing Switch.

    @@ -216,6 +216,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -362,7 +366,7 @@

    Inherited members

    class ExtremeExosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Extreme Exos support.

    @@ -492,6 +496,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -685,6 +693,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -751,7 +763,7 @@

    Inherited members

    class ExtremeNetironSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Base Class for cisco-like behavior.

    @@ -880,6 +892,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -1072,6 +1088,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -1138,7 +1158,7 @@

    Inherited members

    class ExtremeNosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Support for Extreme NOS/VDX.

    @@ -1267,6 +1287,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -1410,7 +1434,7 @@

    Inherited members

    class ExtremeSlxSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Support for Extreme SLX.

    @@ -1539,6 +1563,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -1682,7 +1710,7 @@

    Inherited members

    class ExtremeVspSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Extreme Virtual Services Platform Support.

    @@ -1811,6 +1839,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -1920,7 +1952,7 @@

    Inherited members

    class ExtremeWingSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Extreme WiNG support.

    @@ -2049,6 +2081,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/f5/f5_linux_ssh.html b/docs/netmiko/f5/f5_linux_ssh.html index db179f783..cadecb947 100644 --- a/docs/netmiko/f5/f5_linux_ssh.html +++ b/docs/netmiko/f5/f5_linux_ssh.html @@ -40,7 +40,7 @@

    Classes

    class F5LinuxSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Base Class for cisco-like behavior.

    @@ -169,6 +169,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/f5/f5_tmsh_ssh.html b/docs/netmiko/f5/f5_tmsh_ssh.html index 5b3a32a09..f5480a693 100644 --- a/docs/netmiko/f5/f5_tmsh_ssh.html +++ b/docs/netmiko/f5/f5_tmsh_ssh.html @@ -62,7 +62,7 @@

    Classes

    class F5TmshSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Defines vendor independent methods.

    @@ -192,6 +192,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/f5/index.html b/docs/netmiko/f5/index.html index 47761c802..a6988cdde 100644 --- a/docs/netmiko/f5/index.html +++ b/docs/netmiko/f5/index.html @@ -50,7 +50,7 @@

    Classes

    class F5LinuxSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Base Class for cisco-like behavior.

    @@ -179,6 +179,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -242,7 +246,7 @@

    Inherited members

    class F5TmshSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Defines vendor independent methods.

    @@ -372,6 +376,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/flexvnf/flexvnf_ssh.html b/docs/netmiko/flexvnf/flexvnf_ssh.html index 9e9106a5d..850de9f85 100644 --- a/docs/netmiko/flexvnf/flexvnf_ssh.html +++ b/docs/netmiko/flexvnf/flexvnf_ssh.html @@ -239,7 +239,7 @@

    Classes

    class FlexvnfSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Defines vendor independent methods.

    @@ -369,6 +369,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/flexvnf/index.html b/docs/netmiko/flexvnf/index.html index 0cb153b29..ede6c7367 100644 --- a/docs/netmiko/flexvnf/index.html +++ b/docs/netmiko/flexvnf/index.html @@ -45,7 +45,7 @@

    Classes

    class FlexvnfSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Defines vendor independent methods.

    @@ -175,6 +175,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/fortinet/fortinet_ssh.html b/docs/netmiko/fortinet/fortinet_ssh.html index 47b6e02a9..1ed740f9a 100644 --- a/docs/netmiko/fortinet/fortinet_ssh.html +++ b/docs/netmiko/fortinet/fortinet_ssh.html @@ -146,7 +146,7 @@

    Classes

    class FortinetSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Base Class for cisco-like behavior.

    @@ -275,6 +275,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/fortinet/index.html b/docs/netmiko/fortinet/index.html index 645d5e709..11d0d9067 100644 --- a/docs/netmiko/fortinet/index.html +++ b/docs/netmiko/fortinet/index.html @@ -45,7 +45,7 @@

    Classes

    class FortinetSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Base Class for cisco-like behavior.

    @@ -174,6 +174,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/hp/hp_comware.html b/docs/netmiko/hp/hp_comware.html index 0eb798cd0..e63e4d101 100644 --- a/docs/netmiko/hp/hp_comware.html +++ b/docs/netmiko/hp/hp_comware.html @@ -27,6 +27,13 @@

    Module netmiko.hp.hp_comware

    class HPComwareBase(CiscoSSHConnection): + def __init__(self, **kwargs): + # Comware doesn't have a way to set terminal width which breaks cmd_verify + global_cmd_verify = kwargs.get("global_cmd_verify") + if global_cmd_verify is None: + kwargs["global_cmd_verify"] = False + return super().__init__(**kwargs) + def session_preparation(self): """ Prepare the session after the connection has been established. @@ -129,7 +136,7 @@

    Classes

    class HPComwareBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(**kwargs)

    Base Class for cisco-like behavior.

    @@ -258,10 +265,21 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code
    class HPComwareBase(CiscoSSHConnection):
    +    def __init__(self, **kwargs):
    +        # Comware doesn't have a way to set terminal width which breaks cmd_verify
    +        global_cmd_verify = kwargs.get("global_cmd_verify")
    +        if global_cmd_verify is None:
    +            kwargs["global_cmd_verify"] = False
    +        return super().__init__(**kwargs)
    +
         def session_preparation(self):
             """
             Prepare the session after the connection has been established.
    @@ -552,7 +570,7 @@ 

    Inherited members

    class HPComwareSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(**kwargs)

    Base Class for cisco-like behavior.

    @@ -681,6 +699,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -873,6 +895,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/hp/hp_procurve.html b/docs/netmiko/hp/hp_procurve.html index 52ab2a542..4f2a38902 100644 --- a/docs/netmiko/hp/hp_procurve.html +++ b/docs/netmiko/hp/hp_procurve.html @@ -224,7 +224,7 @@

    Classes

    class HPProcurveBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Base Class for cisco-like behavior.

    @@ -353,6 +353,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -615,7 +619,7 @@

    Inherited members

    class HPProcurveSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Base Class for cisco-like behavior.

    @@ -744,6 +748,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -846,7 +854,7 @@

    Inherited members

    class HPProcurveTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Base Class for cisco-like behavior.

    @@ -975,6 +983,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/hp/index.html b/docs/netmiko/hp/index.html index c62b7ef6e..3779d98f0 100644 --- a/docs/netmiko/hp/index.html +++ b/docs/netmiko/hp/index.html @@ -50,7 +50,7 @@

    Classes

    class HPComwareSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(**kwargs)

    Base Class for cisco-like behavior.

    @@ -179,6 +179,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -371,6 +375,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -437,7 +445,7 @@

    Inherited members

    class HPProcurveSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Base Class for cisco-like behavior.

    @@ -566,6 +574,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -668,7 +680,7 @@

    Inherited members

    class HPProcurveTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Base Class for cisco-like behavior.

    @@ -797,6 +809,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/huawei/huawei.html b/docs/netmiko/huawei/huawei.html index e521551c0..1bc6c7155 100644 --- a/docs/netmiko/huawei/huawei.html +++ b/docs/netmiko/huawei/huawei.html @@ -272,7 +272,7 @@

    Classes

    class HuaweiBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Base Class for cisco-like behavior.

    @@ -401,6 +401,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -740,7 +744,7 @@

    Inherited members

    class HuaweiSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Huawei SSH driver.

    @@ -869,6 +873,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -967,7 +975,7 @@

    Inherited members

    class HuaweiTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Huawei Telnet driver.

    @@ -1096,6 +1104,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -1314,7 +1326,7 @@

    Inherited members

    class HuaweiVrpv8SSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Huawei SSH driver.

    @@ -1443,6 +1455,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/huawei/huawei_smartax.html b/docs/netmiko/huawei/huawei_smartax.html index 34d4ff350..a28f6fa3e 100644 --- a/docs/netmiko/huawei/huawei_smartax.html +++ b/docs/netmiko/huawei/huawei_smartax.html @@ -117,7 +117,7 @@

    Classes

    class HuaweiSmartAXSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Supports Huawei SmartAX and OLT.

    @@ -246,6 +246,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/huawei/index.html b/docs/netmiko/huawei/index.html index 3429a04c0..7ce9e9103 100644 --- a/docs/netmiko/huawei/index.html +++ b/docs/netmiko/huawei/index.html @@ -51,7 +51,7 @@

    Classes

    class HuaweiSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Huawei SSH driver.

    @@ -180,6 +180,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -278,7 +282,7 @@

    Inherited members

    class HuaweiSmartAXSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Supports Huawei SmartAX and OLT.

    @@ -407,6 +411,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -612,7 +620,7 @@

    Inherited members

    class HuaweiTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Huawei Telnet driver.

    @@ -741,6 +749,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -959,7 +971,7 @@

    Inherited members

    class HuaweiVrpv8SSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Huawei SSH driver.

    @@ -1088,6 +1100,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/index.html b/docs/netmiko/index.html index 7bcd2ab05..5fa28d437 100644 --- a/docs/netmiko/index.html +++ b/docs/netmiko/index.html @@ -101,6 +101,10 @@

    Sub-modules

    Base connection class for netmiko …

    +
    netmiko.broadcom
    +
    +
    +
    netmiko.calix
    @@ -303,6 +307,14 @@

    Sub-modules

    +
    netmiko.yamaha
    +
    +
    +
    +
    netmiko.zte
    +
    +
    +
    @@ -520,7 +532,7 @@

    Classes

    class BaseConnection -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Defines vendor independent methods.

    @@ -650,6 +662,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -698,6 +714,7 @@

    Classes

    allow_auto_change=False, encoding="ascii", sock=None, + auto_connect=True, ): """ Initialize attributes for establishing connection to target device. @@ -824,6 +841,9 @@

    Classes

    argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool """ self.remote_conn = None @@ -944,7 +964,8 @@

    Classes

    self.ssh_config_file = ssh_config_file # Establish the remote connection - self._open() + if auto_connect: + self._open() def _open(self): """Decouple connection creation from __init__ for mocking.""" @@ -2551,6 +2572,7 @@

    Subclasses

  • RadETXBase
  • TerminalServer
  • WatchguardFirewareSSH
  • +
  • YamahaBase
  • Static methods

    @@ -4386,7 +4408,10 @@

    Methods

    return hashlib.md5(file_contents).hexdigest() def config_md5(self, source_config): - return super().file_md5(source_config, add_newline=True) + """Compute MD5 hash of text.""" + file_contents = source_config + "\n" # Cisco IOS automatically adds this + file_contents = file_contents.encode("UTF-8") + return hashlib.md5(file_contents).hexdigest() def put_file(self): curlybrace = r"{" @@ -4457,11 +4482,14 @@

    Methods

    def config_md5(self, source_config)
    -
    +

    Compute MD5 hash of text.

    Source code
    def config_md5(self, source_config):
    -    return super().file_md5(source_config, add_newline=True)
    + """Compute MD5 hash of text.""" + file_contents = source_config + "\n" # Cisco IOS automatically adds this + file_contents = file_contents.encode("UTF-8") + return hashlib.md5(file_contents).hexdigest()
    @@ -4998,6 +5026,7 @@

    Index

  • netmiko.arista
  • netmiko.aruba
  • netmiko.base_connection
  • +
  • netmiko.broadcom
  • netmiko.calix
  • netmiko.centec
  • netmiko.checkpoint
  • @@ -5048,6 +5077,8 @@

    Index

  • netmiko.utilities
  • netmiko.vyos
  • netmiko.watchguard
  • +
  • netmiko.yamaha
  • +
  • netmiko.zte
  • Functions

    diff --git a/docs/netmiko/ipinfusion/index.html b/docs/netmiko/ipinfusion/index.html index c58a973f7..460746eaf 100644 --- a/docs/netmiko/ipinfusion/index.html +++ b/docs/netmiko/ipinfusion/index.html @@ -177,6 +177,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -371,6 +375,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/ipinfusion/ipinfusion_ocnos.html b/docs/netmiko/ipinfusion/ipinfusion_ocnos.html index 1b32f4dc8..3015ee2fc 100644 --- a/docs/netmiko/ipinfusion/ipinfusion_ocnos.html +++ b/docs/netmiko/ipinfusion/ipinfusion_ocnos.html @@ -235,6 +235,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -466,6 +470,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -660,6 +668,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/juniper/index.html b/docs/netmiko/juniper/index.html index 7cd1fe141..13f77be8b 100644 --- a/docs/netmiko/juniper/index.html +++ b/docs/netmiko/juniper/index.html @@ -131,7 +131,7 @@

    Inherited members

  • class JuniperSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Implement methods for interacting with Juniper Networks devices.

    @@ -263,6 +263,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -326,7 +330,7 @@

    Inherited members

    class JuniperScreenOsSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Implement methods for interacting with Juniper ScreenOS devices.

    @@ -455,6 +459,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -794,6 +802,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/juniper/juniper.html b/docs/netmiko/juniper/juniper.html index 9f334f794..0322a3dc7 100644 --- a/docs/netmiko/juniper/juniper.html +++ b/docs/netmiko/juniper/juniper.html @@ -320,7 +320,7 @@

    Classes

    class JuniperBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Implement methods for interacting with Juniper Networks devices.

    @@ -452,6 +452,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -1114,7 +1118,7 @@

    Inherited members

    class JuniperSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Implement methods for interacting with Juniper Networks devices.

    @@ -1246,6 +1250,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -1441,6 +1449,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/juniper/juniper_screenos.html b/docs/netmiko/juniper/juniper_screenos.html index 7330858af..bce0749e2 100644 --- a/docs/netmiko/juniper/juniper_screenos.html +++ b/docs/netmiko/juniper/juniper_screenos.html @@ -85,7 +85,7 @@

    Classes

    class JuniperScreenOsSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Implement methods for interacting with Juniper ScreenOS devices.

    @@ -214,6 +214,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/keymile/index.html b/docs/netmiko/keymile/index.html index 55e314af7..ff3fc2694 100644 --- a/docs/netmiko/keymile/index.html +++ b/docs/netmiko/keymile/index.html @@ -50,7 +50,7 @@

    Classes

    class KeymileNOSSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Common Methods for IOS (both SSH and telnet).

    @@ -179,6 +179,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -410,6 +414,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/keymile/keymile_nos_ssh.html b/docs/netmiko/keymile/keymile_nos_ssh.html index 4f7dc4d7e..9a6f9ecc8 100644 --- a/docs/netmiko/keymile/keymile_nos_ssh.html +++ b/docs/netmiko/keymile/keymile_nos_ssh.html @@ -69,7 +69,7 @@

    Classes

    class KeymileNOSSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Common Methods for IOS (both SSH and telnet).

    @@ -198,6 +198,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/keymile/keymile_ssh.html b/docs/netmiko/keymile/keymile_ssh.html index 5497ab4f2..6c9fa6cef 100644 --- a/docs/netmiko/keymile/keymile_ssh.html +++ b/docs/netmiko/keymile/keymile_ssh.html @@ -218,6 +218,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/linux/index.html b/docs/netmiko/linux/index.html index 5159c94c2..c1add5cd1 100644 --- a/docs/netmiko/linux/index.html +++ b/docs/netmiko/linux/index.html @@ -148,7 +148,7 @@

    Inherited members

    class LinuxSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Base Class for cisco-like behavior.

    @@ -277,6 +277,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/linux/linux_ssh.html b/docs/netmiko/linux/linux_ssh.html index b4dbf43e9..28cd08c1e 100644 --- a/docs/netmiko/linux/linux_ssh.html +++ b/docs/netmiko/linux/linux_ssh.html @@ -314,7 +314,7 @@

    Inherited members

    class LinuxSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Base Class for cisco-like behavior.

    @@ -443,6 +443,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/mellanox/index.html b/docs/netmiko/mellanox/index.html index fb706913e..4969a5002 100644 --- a/docs/netmiko/mellanox/index.html +++ b/docs/netmiko/mellanox/index.html @@ -45,7 +45,7 @@

    Classes

    class MellanoxMlnxosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Mellanox MLNX-OS Switch support.

    @@ -174,6 +174,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/mellanox/mellanox_mlnxos_ssh.html b/docs/netmiko/mellanox/mellanox_mlnxos_ssh.html index a9f25296f..a1c9780ed 100644 --- a/docs/netmiko/mellanox/mellanox_mlnxos_ssh.html +++ b/docs/netmiko/mellanox/mellanox_mlnxos_ssh.html @@ -97,7 +97,7 @@

    Classes

    class MellanoxMlnxosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Mellanox MLNX-OS Switch support.

    @@ -226,6 +226,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/mikrotik/index.html b/docs/netmiko/mikrotik/index.html index 7a633e746..a8fdde528 100644 --- a/docs/netmiko/mikrotik/index.html +++ b/docs/netmiko/mikrotik/index.html @@ -175,6 +175,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -369,6 +373,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/mikrotik/mikrotik_ssh.html b/docs/netmiko/mikrotik/mikrotik_ssh.html index 54795770b..73a13dfc8 100644 --- a/docs/netmiko/mikrotik/mikrotik_ssh.html +++ b/docs/netmiko/mikrotik/mikrotik_ssh.html @@ -272,6 +272,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -727,6 +731,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -921,6 +929,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/mrv/index.html b/docs/netmiko/mrv/index.html index 85e9c35b3..3207c1975 100644 --- a/docs/netmiko/mrv/index.html +++ b/docs/netmiko/mrv/index.html @@ -50,7 +50,7 @@

    Classes

    class MrvLxSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    MRV Communications Driver (LX).

    @@ -179,6 +179,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -309,7 +313,7 @@

    Inherited members

    class MrvOptiswitchSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    MRV Communications Driver (OptiSwitch).

    @@ -438,6 +442,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/mrv/mrv_lx.html b/docs/netmiko/mrv/mrv_lx.html index 5d264ebc9..b34506231 100644 --- a/docs/netmiko/mrv/mrv_lx.html +++ b/docs/netmiko/mrv/mrv_lx.html @@ -69,7 +69,7 @@

    Classes

    class MrvLxSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    MRV Communications Driver (LX).

    @@ -198,6 +198,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/mrv/mrv_ssh.html b/docs/netmiko/mrv/mrv_ssh.html index 85d40c03b..0ca9ac5a7 100644 --- a/docs/netmiko/mrv/mrv_ssh.html +++ b/docs/netmiko/mrv/mrv_ssh.html @@ -78,7 +78,7 @@

    Classes

    class MrvOptiswitchSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    MRV Communications Driver (OptiSwitch).

    @@ -207,6 +207,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/netapp/index.html b/docs/netmiko/netapp/index.html index 6e74f4a8d..ad75279f1 100644 --- a/docs/netmiko/netapp/index.html +++ b/docs/netmiko/netapp/index.html @@ -45,7 +45,7 @@

    Classes

    class NetAppcDotSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Defines vendor independent methods.

    @@ -175,6 +175,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/netapp/netapp_cdot_ssh.html b/docs/netmiko/netapp/netapp_cdot_ssh.html index 4ad7db5aa..cd9008f08 100644 --- a/docs/netmiko/netapp/netapp_cdot_ssh.html +++ b/docs/netmiko/netapp/netapp_cdot_ssh.html @@ -73,7 +73,7 @@

    Classes

    class NetAppcDotSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Defines vendor independent methods.

    @@ -203,6 +203,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/nokia/index.html b/docs/netmiko/nokia/index.html index fc69b2878..039cb9613 100644 --- a/docs/netmiko/nokia/index.html +++ b/docs/netmiko/nokia/index.html @@ -228,7 +228,7 @@

    Inherited members

    class NokiaSrosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Implement methods for interacting with Nokia SR OS devices.

    @@ -370,6 +370,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/nokia/nokia_sros_ssh.html b/docs/netmiko/nokia/nokia_sros_ssh.html index 26e7604a8..4c61176f8 100644 --- a/docs/netmiko/nokia/nokia_sros_ssh.html +++ b/docs/netmiko/nokia/nokia_sros_ssh.html @@ -505,7 +505,7 @@

    Inherited members

    class NokiaSrosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Implement methods for interacting with Nokia SR OS devices.

    @@ -647,6 +647,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/ovs/index.html b/docs/netmiko/ovs/index.html index 226328f3d..f9cc26d63 100644 --- a/docs/netmiko/ovs/index.html +++ b/docs/netmiko/ovs/index.html @@ -45,7 +45,7 @@

    Classes

    class OvsLinuxSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Base Class for cisco-like behavior.

    @@ -174,6 +174,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/ovs/ovs_linux_ssh.html b/docs/netmiko/ovs/ovs_linux_ssh.html index ef6192645..785a3864d 100644 --- a/docs/netmiko/ovs/ovs_linux_ssh.html +++ b/docs/netmiko/ovs/ovs_linux_ssh.html @@ -40,7 +40,7 @@

    Classes

    class OvsLinuxSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Base Class for cisco-like behavior.

    @@ -169,6 +169,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/paloalto/index.html b/docs/netmiko/paloalto/index.html index dcaa78d56..dec4b184f 100644 --- a/docs/netmiko/paloalto/index.html +++ b/docs/netmiko/paloalto/index.html @@ -45,7 +45,7 @@

    Classes

    class PaloAltoPanosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Implement methods for interacting with PaloAlto devices.

    @@ -177,6 +177,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -239,7 +243,7 @@

    Inherited members

    class PaloAltoPanosTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Implement methods for interacting with PaloAlto devices.

    @@ -371,6 +375,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/paloalto/paloalto_panos.html b/docs/netmiko/paloalto/paloalto_panos.html index 276752fb1..be6bc6a7c 100644 --- a/docs/netmiko/paloalto/paloalto_panos.html +++ b/docs/netmiko/paloalto/paloalto_panos.html @@ -215,7 +215,7 @@

    Classes

    class PaloAltoPanosBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Implement methods for interacting with PaloAlto devices.

    @@ -347,6 +347,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -852,7 +856,7 @@

    Inherited members

    class PaloAltoPanosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Implement methods for interacting with PaloAlto devices.

    @@ -984,6 +988,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -1046,7 +1054,7 @@

    Inherited members

    class PaloAltoPanosTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Implement methods for interacting with PaloAlto devices.

    @@ -1178,6 +1186,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/pluribus/index.html b/docs/netmiko/pluribus/index.html index 2329492c6..4e4ced627 100644 --- a/docs/netmiko/pluribus/index.html +++ b/docs/netmiko/pluribus/index.html @@ -175,6 +175,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/pluribus/pluribus_ssh.html b/docs/netmiko/pluribus/pluribus_ssh.html index f54b0c046..d8fc8b621 100644 --- a/docs/netmiko/pluribus/pluribus_ssh.html +++ b/docs/netmiko/pluribus/pluribus_ssh.html @@ -204,6 +204,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/quanta/index.html b/docs/netmiko/quanta/index.html index f93e1c351..2be4e0719 100644 --- a/docs/netmiko/quanta/index.html +++ b/docs/netmiko/quanta/index.html @@ -45,7 +45,7 @@

    Classes

    class QuantaMeshSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Base Class for cisco-like behavior.

    @@ -174,6 +174,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/quanta/quanta_mesh_ssh.html b/docs/netmiko/quanta/quanta_mesh_ssh.html index e5c9663bd..dcde1e46e 100644 --- a/docs/netmiko/quanta/quanta_mesh_ssh.html +++ b/docs/netmiko/quanta/quanta_mesh_ssh.html @@ -57,7 +57,7 @@

    Classes

    class QuantaMeshSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Base Class for cisco-like behavior.

    @@ -186,6 +186,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/rad/index.html b/docs/netmiko/rad/index.html index 4afdbb4c3..0d08479f4 100644 --- a/docs/netmiko/rad/index.html +++ b/docs/netmiko/rad/index.html @@ -175,6 +175,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -241,7 +245,7 @@

    Inherited members

    class RadETXTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    RAD ETX Telnet Support.

    @@ -370,6 +374,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/rad/rad_etx.html b/docs/netmiko/rad/rad_etx.html index a20fa7631..2f5c53cbe 100644 --- a/docs/netmiko/rad/rad_etx.html +++ b/docs/netmiko/rad/rad_etx.html @@ -121,7 +121,7 @@

    Classes

    class RadETXBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    RAD ETX Support, Tested on RAD 203AX, 205A and 220A.

    @@ -250,6 +250,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -589,6 +593,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -655,7 +663,7 @@

    Inherited members

    class RadETXTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    RAD ETX Telnet Support.

    @@ -784,6 +792,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/ruckus/index.html b/docs/netmiko/ruckus/index.html index 2a64058c4..ff9451870 100644 --- a/docs/netmiko/ruckus/index.html +++ b/docs/netmiko/ruckus/index.html @@ -46,7 +46,7 @@

    Classes

    class RuckusFastironSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Ruckus FastIron aka ICX support.

    @@ -175,6 +175,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -367,6 +371,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/ruckus/ruckus_fastiron.html b/docs/netmiko/ruckus/ruckus_fastiron.html index 92e8cdd8a..bfe645001 100644 --- a/docs/netmiko/ruckus/ruckus_fastiron.html +++ b/docs/netmiko/ruckus/ruckus_fastiron.html @@ -133,7 +133,7 @@

    Classes

    class RuckusFastironBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Ruckus FastIron aka ICX support.

    @@ -262,6 +262,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -480,7 +484,7 @@

    Inherited members

    class RuckusFastironSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Ruckus FastIron aka ICX support.

    @@ -609,6 +613,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -801,6 +809,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/ruijie/index.html b/docs/netmiko/ruijie/index.html index 0858d069b..e78fccf04 100644 --- a/docs/netmiko/ruijie/index.html +++ b/docs/netmiko/ruijie/index.html @@ -45,7 +45,7 @@

    Classes

    class RuijieOSSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Base Class for cisco-like behavior.

    @@ -174,6 +174,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -366,6 +370,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/ruijie/ruijie_os.html b/docs/netmiko/ruijie/ruijie_os.html index 11de715f9..f65ff3e83 100644 --- a/docs/netmiko/ruijie/ruijie_os.html +++ b/docs/netmiko/ruijie/ruijie_os.html @@ -71,7 +71,7 @@

    Classes

    class RuijieOSBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Base Class for cisco-like behavior.

    @@ -200,6 +200,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -317,7 +321,7 @@

    Inherited members

    class RuijieOSSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Base Class for cisco-like behavior.

    @@ -446,6 +450,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -638,6 +646,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/sixwind/index.html b/docs/netmiko/sixwind/index.html index eeb3ed31c..31d5ad446 100644 --- a/docs/netmiko/sixwind/index.html +++ b/docs/netmiko/sixwind/index.html @@ -45,7 +45,7 @@

    Classes

    class SixwindOSSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Base Class for cisco-like behavior.

    @@ -174,6 +174,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/sixwind/sixwind_os.html b/docs/netmiko/sixwind/sixwind_os.html index a5eab7bc3..4368a5572 100644 --- a/docs/netmiko/sixwind/sixwind_os.html +++ b/docs/netmiko/sixwind/sixwind_os.html @@ -136,7 +136,7 @@

    Classes

    class SixwindOSBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Base Class for cisco-like behavior.

    @@ -265,6 +265,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -593,7 +597,7 @@

    Inherited members

    class SixwindOSSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Base Class for cisco-like behavior.

    @@ -722,6 +726,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/sophos/index.html b/docs/netmiko/sophos/index.html index 3022d9ce2..ee2a44410 100644 --- a/docs/netmiko/sophos/index.html +++ b/docs/netmiko/sophos/index.html @@ -45,7 +45,7 @@

    Classes

    class SophosSfosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Base Class for cisco-like behavior.

    @@ -174,6 +174,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/sophos/sophos_sfos_ssh.html b/docs/netmiko/sophos/sophos_sfos_ssh.html index 5d4db0ceb..722975df4 100644 --- a/docs/netmiko/sophos/sophos_sfos_ssh.html +++ b/docs/netmiko/sophos/sophos_sfos_ssh.html @@ -95,7 +95,7 @@

    Classes

    class SophosSfosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Base Class for cisco-like behavior.

    @@ -224,6 +224,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/ssh_autodetect.html b/docs/netmiko/ssh_autodetect.html index 593dbfc73..27a02c70f 100644 --- a/docs/netmiko/ssh_autodetect.html +++ b/docs/netmiko/ssh_autodetect.html @@ -199,6 +199,12 @@

    Netmiko connection creation section "priority": 99, "dispatch": "_autodetect_std", }, + "hp_comware": { + "cmd": "display version", + "search_patterns": ["HPE Comware"], + "priority": 99, + "dispatch": "_autodetect_std", + }, "huawei": { "cmd": "display version", "search_patterns": [ @@ -254,6 +260,12 @@

    Netmiko connection creation section "priority": 99, "dispatch": "_autodetect_std", }, + "yamaha": { + "cmd": "show copyright", + "search_patterns": [r"Yamaha Corporation"], + "priority": 99, + "dispatch": "_autodetect_std", + }, } diff --git a/docs/netmiko/terminal_server/index.html b/docs/netmiko/terminal_server/index.html index a3da85ff2..aff420a46 100644 --- a/docs/netmiko/terminal_server/index.html +++ b/docs/netmiko/terminal_server/index.html @@ -46,7 +46,7 @@

    Classes

    class TerminalServerSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Generic Terminal Server driver SSH.

    @@ -175,6 +175,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -238,7 +242,7 @@

    Inherited members

    class TerminalServerTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Generic Terminal Server driver telnet.

    @@ -367,6 +371,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/terminal_server/terminal_server.html b/docs/netmiko/terminal_server/terminal_server.html index c9b6eefd1..0d50dbe11 100644 --- a/docs/netmiko/terminal_server/terminal_server.html +++ b/docs/netmiko/terminal_server/terminal_server.html @@ -67,7 +67,7 @@

    Classes

    class TerminalServer -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Generic Terminal Server driver.

    @@ -198,6 +198,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -285,7 +289,7 @@

    Inherited members

    class TerminalServerSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Generic Terminal Server driver SSH.

    @@ -414,6 +418,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -477,7 +485,7 @@

    Inherited members

    class TerminalServerTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Generic Terminal Server driver telnet.

    @@ -606,6 +614,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/ubiquiti/edge_ssh.html b/docs/netmiko/ubiquiti/edge_ssh.html index 66c4ae32d..f24cb61f3 100644 --- a/docs/netmiko/ubiquiti/edge_ssh.html +++ b/docs/netmiko/ubiquiti/edge_ssh.html @@ -81,7 +81,7 @@

    Classes

    class UbiquitiEdgeSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Implements support for Ubiquity EdgeSwitch devices.

    @@ -212,6 +212,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/ubiquiti/index.html b/docs/netmiko/ubiquiti/index.html index c992b98c8..9aa61b413 100644 --- a/docs/netmiko/ubiquiti/index.html +++ b/docs/netmiko/ubiquiti/index.html @@ -50,7 +50,7 @@

    Classes

    class UbiquitiEdgeSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Implements support for Ubiquity EdgeSwitch devices.

    @@ -181,6 +181,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code @@ -347,7 +351,7 @@

    Inherited members

    class UbiquitiUnifiSwitchSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Implements support for Ubiquity EdgeSwitch devices.

    @@ -478,6 +482,10 @@

    Inherited members

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/ubiquiti/unifiswitch_ssh.html b/docs/netmiko/ubiquiti/unifiswitch_ssh.html index 46d4db64f..3b632a9aa 100644 --- a/docs/netmiko/ubiquiti/unifiswitch_ssh.html +++ b/docs/netmiko/ubiquiti/unifiswitch_ssh.html @@ -75,7 +75,7 @@

    Classes

    class UbiquitiUnifiSwitchSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Implements support for Ubiquity EdgeSwitch devices.

    @@ -206,6 +206,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/vyos/index.html b/docs/netmiko/vyos/index.html index 21a6cf9f6..923a6df6f 100644 --- a/docs/netmiko/vyos/index.html +++ b/docs/netmiko/vyos/index.html @@ -45,7 +45,7 @@

    Classes

    class VyOSSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Implement methods for interacting with VyOS network devices.

    @@ -174,6 +174,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/vyos/vyos_ssh.html b/docs/netmiko/vyos/vyos_ssh.html index b28129b2c..1e57a3c2d 100644 --- a/docs/netmiko/vyos/vyos_ssh.html +++ b/docs/netmiko/vyos/vyos_ssh.html @@ -141,7 +141,7 @@

    Classes

    class VyOSSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Implement methods for interacting with VyOS network devices.

    @@ -270,6 +270,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/watchguard/fireware_ssh.html b/docs/netmiko/watchguard/fireware_ssh.html index 443504414..98f766c62 100644 --- a/docs/netmiko/watchguard/fireware_ssh.html +++ b/docs/netmiko/watchguard/fireware_ssh.html @@ -71,7 +71,7 @@

    Classes

    class WatchguardFirewareSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Implements methods for communicating with Watchguard Firebox firewalls.

    @@ -200,6 +200,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/watchguard/index.html b/docs/netmiko/watchguard/index.html index 7a4740e78..b5a396883 100644 --- a/docs/netmiko/watchguard/index.html +++ b/docs/netmiko/watchguard/index.html @@ -45,7 +45,7 @@

    Classes

    class WatchguardFirewareSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None) +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True)

    Implements methods for communicating with Watchguard Firebox firewalls.

    @@ -174,6 +174,10 @@

    Classes

    (default: None). Global attribute takes precedence over function `cmd_verify` argument. Value of `None` indicates to use function `cmd_verify` argument. :type global_cmd_verify: bool|None + + :param auto_connect: Control whether Netmiko automatically establishes the connection as + part of the object creation (default: True). + :type auto_connect: bool
    Source code diff --git a/docs/netmiko/yamaha/index.html b/docs/netmiko/yamaha/index.html new file mode 100644 index 000000000..1a89b3e97 --- /dev/null +++ b/docs/netmiko/yamaha/index.html @@ -0,0 +1,477 @@ + + + + + + +netmiko.yamaha API documentation + + + + + + + + + +
    +
    +
    +

    Module netmiko.yamaha

    +
    +
    +
    +Source code +
    from __future__ import unicode_literals
    +from netmiko.yamaha.yamaha import YamahaSSH, YamahaTelnet
    +
    +__all__ = ["YamahaSSH", "YamahaTelnet"]
    +
    +
    +
    +

    Sub-modules

    +
    +
    netmiko.yamaha.yamaha
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    Classes

    +
    +
    +class YamahaSSH +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True) +
    +
    +

    Yamaha SSH driver.

    +
        Initialize attributes for establishing connection to target device.
    +
    +    :param ip: IP address of target device. Not required if `host` is
    +        provided.
    +    :type ip: str
    +
    +    :param host: Hostname of target device. Not required if `ip` is
    +            provided.
    +    :type host: str
    +
    +    :param username: Username to authenticate against target device if
    +            required.
    +    :type username: str
    +
    +    :param password: Password to authenticate against target device if
    +            required.
    +    :type password: str
    +
    +    :param secret: The enable password if target device requires one.
    +    :type secret: str
    +
    +    :param port: The destination port used to connect to the target
    +            device.
    +    :type port: int or None
    +
    +    :param device_type: Class selection based on device type.
    +    :type device_type: str
    +
    +    :param verbose: Enable additional messages to standard output.
    +    :type verbose: bool
    +
    +    :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
    +    :type global_delay_factor: int
    +
    +    :param use_keys: Connect to target device using SSH keys.
    +    :type use_keys: bool
    +
    +    :param key_file: Filename path of the SSH key file to use.
    +    :type key_file: str
    +
    +    :param pkey: SSH key object to use.
    +    :type pkey: paramiko.PKey
    +
    +    :param passphrase: Passphrase to use for encrypted key; password will be used for key
    +            decryption if not specified.
    +    :type passphrase: str
    +
    +    :param allow_agent: Enable use of SSH key-agent.
    +    :type allow_agent: bool
    +
    +    :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
    +            means unknown SSH host keys will be accepted).
    +    :type ssh_strict: bool
    +
    +    :param system_host_keys: Load host keys from the users known_hosts file.
    +    :type system_host_keys: bool
    +    :param alt_host_keys: If `True` host keys will be loaded from the file specified in
    +            alt_key_file.
    +    :type alt_host_keys: bool
    +
    +    :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
    +    :type alt_key_file: str
    +
    +    :param ssh_config_file: File name of OpenSSH configuration file.
    +    :type ssh_config_file: str
    +
    +    :param timeout: Connection timeout.
    +    :type timeout: float
    +
    +    :param session_timeout: Set a timeout for parallel requests.
    +    :type session_timeout: float
    +
    +    :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
    +    :type auth_timeout: float
    +
    +    :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
    +    :type banner_timeout: float
    +
    +    :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
    +            Currently defaults to 0, for backwards compatibility (it will not attempt
    +            to keep the connection alive).
    +    :type keepalive: int
    +
    +    :param default_enter: Character(s) to send to correspond to enter key (default:
    +
    +

    ). +:type default_enter: str

    +
        :param response_return: Character(s) to use in normalized return data to represent
    +            enter key (default:
    +
    +

    ) +:type response_return: str

    +
        :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
    +            to select smallest of global and specific. Sets default global_delay_factor to .1
    +            (default: False)
    +    :type fast_cli: boolean
    +
    +    :param session_log: File path or BufferedIOBase subclass object to write the session log to.
    +    :type session_log: str
    +
    +    :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).
    +    :type session_log_record_writes: boolean
    +
    +    :param session_log_file_mode: "write" or "append" for session_log file mode
    +            (default: "write")
    +    :type session_log_file_mode: str
    +
    +    :param allow_auto_change: Allow automatic configuration changes for terminal settings.
    +            (default: False)
    +    :type allow_auto_change: bool
    +
    +    :param encoding: Encoding to be used when writing bytes to the output channel.
    +            (default: ascii)
    +    :type encoding: str
    +
    +    :param sock: An open socket or socket-like object (such as a `.Channel`) to use for
    +            communication to the target host (default: None).
    +    :type sock: socket
    +
    +    :param global_cmd_verify: Control whether command echo verification is enabled or disabled
    +            (default: None). Global attribute takes precedence over function `cmd_verify`
    +            argument. Value of `None` indicates to use function `cmd_verify` argument.
    +    :type global_cmd_verify: bool|None
    +
    +    :param auto_connect: Control whether Netmiko automatically establishes the connection as
    +            part of the object creation (default: True).
    +    :type auto_connect: bool
    +
    +
    +Source code +
    class YamahaSSH(YamahaBase):
    +    """Yamaha SSH driver."""
    +
    +    pass
    +
    +

    Ancestors

    + +

    Inherited members

    + +
    +
    +class YamahaTelnet +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True) +
    +
    +

    Yamaha Telnet driver.

    +
        Initialize attributes for establishing connection to target device.
    +
    +    :param ip: IP address of target device. Not required if `host` is
    +        provided.
    +    :type ip: str
    +
    +    :param host: Hostname of target device. Not required if `ip` is
    +            provided.
    +    :type host: str
    +
    +    :param username: Username to authenticate against target device if
    +            required.
    +    :type username: str
    +
    +    :param password: Password to authenticate against target device if
    +            required.
    +    :type password: str
    +
    +    :param secret: The enable password if target device requires one.
    +    :type secret: str
    +
    +    :param port: The destination port used to connect to the target
    +            device.
    +    :type port: int or None
    +
    +    :param device_type: Class selection based on device type.
    +    :type device_type: str
    +
    +    :param verbose: Enable additional messages to standard output.
    +    :type verbose: bool
    +
    +    :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
    +    :type global_delay_factor: int
    +
    +    :param use_keys: Connect to target device using SSH keys.
    +    :type use_keys: bool
    +
    +    :param key_file: Filename path of the SSH key file to use.
    +    :type key_file: str
    +
    +    :param pkey: SSH key object to use.
    +    :type pkey: paramiko.PKey
    +
    +    :param passphrase: Passphrase to use for encrypted key; password will be used for key
    +            decryption if not specified.
    +    :type passphrase: str
    +
    +    :param allow_agent: Enable use of SSH key-agent.
    +    :type allow_agent: bool
    +
    +    :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
    +            means unknown SSH host keys will be accepted).
    +    :type ssh_strict: bool
    +
    +    :param system_host_keys: Load host keys from the users known_hosts file.
    +    :type system_host_keys: bool
    +    :param alt_host_keys: If `True` host keys will be loaded from the file specified in
    +            alt_key_file.
    +    :type alt_host_keys: bool
    +
    +    :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
    +    :type alt_key_file: str
    +
    +    :param ssh_config_file: File name of OpenSSH configuration file.
    +    :type ssh_config_file: str
    +
    +    :param timeout: Connection timeout.
    +    :type timeout: float
    +
    +    :param session_timeout: Set a timeout for parallel requests.
    +    :type session_timeout: float
    +
    +    :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
    +    :type auth_timeout: float
    +
    +    :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
    +    :type banner_timeout: float
    +
    +    :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
    +            Currently defaults to 0, for backwards compatibility (it will not attempt
    +            to keep the connection alive).
    +    :type keepalive: int
    +
    +    :param default_enter: Character(s) to send to correspond to enter key (default:
    +
    +

    ). +:type default_enter: str

    +
        :param response_return: Character(s) to use in normalized return data to represent
    +            enter key (default:
    +
    +

    ) +:type response_return: str

    +
        :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
    +            to select smallest of global and specific. Sets default global_delay_factor to .1
    +            (default: False)
    +    :type fast_cli: boolean
    +
    +    :param session_log: File path or BufferedIOBase subclass object to write the session log to.
    +    :type session_log: str
    +
    +    :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).
    +    :type session_log_record_writes: boolean
    +
    +    :param session_log_file_mode: "write" or "append" for session_log file mode
    +            (default: "write")
    +    :type session_log_file_mode: str
    +
    +    :param allow_auto_change: Allow automatic configuration changes for terminal settings.
    +            (default: False)
    +    :type allow_auto_change: bool
    +
    +    :param encoding: Encoding to be used when writing bytes to the output channel.
    +            (default: ascii)
    +    :type encoding: str
    +
    +    :param sock: An open socket or socket-like object (such as a `.Channel`) to use for
    +            communication to the target host (default: None).
    +    :type sock: socket
    +
    +    :param global_cmd_verify: Control whether command echo verification is enabled or disabled
    +            (default: None). Global attribute takes precedence over function `cmd_verify`
    +            argument. Value of `None` indicates to use function `cmd_verify` argument.
    +    :type global_cmd_verify: bool|None
    +
    +    :param auto_connect: Control whether Netmiko automatically establishes the connection as
    +            part of the object creation (default: True).
    +    :type auto_connect: bool
    +
    +
    +Source code +
    class YamahaTelnet(YamahaBase):
    +    """Yamaha Telnet driver."""
    +
    +    pass
    +
    +

    Ancestors

    + +

    Inherited members

    + +
    +
    +
    +
    + +
    + + + + + \ No newline at end of file diff --git a/docs/netmiko/yamaha/yamaha.html b/docs/netmiko/yamaha/yamaha.html new file mode 100644 index 000000000..39e5665f4 --- /dev/null +++ b/docs/netmiko/yamaha/yamaha.html @@ -0,0 +1,888 @@ + + + + + + +netmiko.yamaha.yamaha API documentation + + + + + + + + + +
    +
    +
    +

    Module netmiko.yamaha.yamaha

    +
    +
    +
    +Source code +
    from netmiko.base_connection import BaseConnection
    +import time
    +
    +
    +class YamahaBase(BaseConnection):
    +    def session_preparation(self):
    +        """Prepare the session after the connection has been established."""
    +        self._test_channel_read(pattern=r"[>#]")
    +        self.set_base_prompt()
    +        self.disable_paging(command="console lines infinity")
    +        time.sleep(0.3 * self.global_delay_factor)
    +        self.clear_buffer()
    +
    +    def check_enable_mode(self, check_string="#"):
    +        return super().check_enable_mode(check_string=check_string)
    +
    +    def enable(self, cmd="administrator", pattern=r"Password", **kwargs):
    +        return super().enable(cmd=cmd, pattern=pattern, **kwargs)
    +
    +    def exit_enable_mode(self, exit_command="exit"):
    +        """
    +        When any changes have been made, the prompt 'Save new configuration ? (Y/N)'
    +        appears before exiting. Ignore this by entering 'N'.
    +        """
    +        output = ""
    +        if self.check_enable_mode():
    +            self.write_channel(self.normalize_cmd(exit_command))
    +            time.sleep(1)
    +            output = self.read_channel()
    +            if "(Y/N)" in output:
    +                self.write_channel("N")
    +            output += self.read_until_prompt()
    +            if self.check_enable_mode():
    +                raise ValueError("Failed to exit enable mode.")
    +        return output
    +
    +    def check_config_mode(self, check_string="#", pattern=""):
    +        """Checks if the device is in administrator mode or not."""
    +        return super().check_config_mode(check_string=check_string, pattern=pattern)
    +
    +    def config_mode(self, config_command="administrator", pattern="ssword"):
    +        """Enter into administrator mode and configure device."""
    +        return self.enable()
    +
    +    def exit_config_mode(self, exit_config="exit", pattern=">"):
    +        """
    +        No action taken. Call 'exit_enable_mode()' to explicitly exit Administration
    +        Level.
    +        """
    +        return ""
    +
    +    def save_config(self, cmd="save", confirm=False, confirm_response=""):
    +        """Saves Config."""
    +        if confirm is True:
    +            raise ValueError("Yamaha does not support save_config confirmation.")
    +        self.enable()
    +        # Some devices are slow so match on trailing-prompt if you can
    +        return self.send_command(command_string=cmd)
    +
    +
    +class YamahaSSH(YamahaBase):
    +    """Yamaha SSH driver."""
    +
    +    pass
    +
    +
    +class YamahaTelnet(YamahaBase):
    +    """Yamaha Telnet driver."""
    +
    +    pass
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    Classes

    +
    +
    +class YamahaBase +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True) +
    +
    +

    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
    +        provided.
    +    :type ip: str
    +
    +    :param host: Hostname of target device. Not required if `ip` is
    +            provided.
    +    :type host: str
    +
    +    :param username: Username to authenticate against target device if
    +            required.
    +    :type username: str
    +
    +    :param password: Password to authenticate against target device if
    +            required.
    +    :type password: str
    +
    +    :param secret: The enable password if target device requires one.
    +    :type secret: str
    +
    +    :param port: The destination port used to connect to the target
    +            device.
    +    :type port: int or None
    +
    +    :param device_type: Class selection based on device type.
    +    :type device_type: str
    +
    +    :param verbose: Enable additional messages to standard output.
    +    :type verbose: bool
    +
    +    :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
    +    :type global_delay_factor: int
    +
    +    :param use_keys: Connect to target device using SSH keys.
    +    :type use_keys: bool
    +
    +    :param key_file: Filename path of the SSH key file to use.
    +    :type key_file: str
    +
    +    :param pkey: SSH key object to use.
    +    :type pkey: paramiko.PKey
    +
    +    :param passphrase: Passphrase to use for encrypted key; password will be used for key
    +            decryption if not specified.
    +    :type passphrase: str
    +
    +    :param allow_agent: Enable use of SSH key-agent.
    +    :type allow_agent: bool
    +
    +    :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
    +            means unknown SSH host keys will be accepted).
    +    :type ssh_strict: bool
    +
    +    :param system_host_keys: Load host keys from the users known_hosts file.
    +    :type system_host_keys: bool
    +    :param alt_host_keys: If `True` host keys will be loaded from the file specified in
    +            alt_key_file.
    +    :type alt_host_keys: bool
    +
    +    :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
    +    :type alt_key_file: str
    +
    +    :param ssh_config_file: File name of OpenSSH configuration file.
    +    :type ssh_config_file: str
    +
    +    :param timeout: Connection timeout.
    +    :type timeout: float
    +
    +    :param session_timeout: Set a timeout for parallel requests.
    +    :type session_timeout: float
    +
    +    :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
    +    :type auth_timeout: float
    +
    +    :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
    +    :type banner_timeout: float
    +
    +    :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
    +            Currently defaults to 0, for backwards compatibility (it will not attempt
    +            to keep the connection alive).
    +    :type keepalive: int
    +
    +    :param default_enter: Character(s) to send to correspond to enter key (default:
    +
    +

    ). +:type default_enter: str

    +
        :param response_return: Character(s) to use in normalized return data to represent
    +            enter key (default:
    +
    +

    ) +:type response_return: str

    +
        :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
    +            to select smallest of global and specific. Sets default global_delay_factor to .1
    +            (default: False)
    +    :type fast_cli: boolean
    +
    +    :param session_log: File path or BufferedIOBase subclass object to write the session log to.
    +    :type session_log: str
    +
    +    :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).
    +    :type session_log_record_writes: boolean
    +
    +    :param session_log_file_mode: "write" or "append" for session_log file mode
    +            (default: "write")
    +    :type session_log_file_mode: str
    +
    +    :param allow_auto_change: Allow automatic configuration changes for terminal settings.
    +            (default: False)
    +    :type allow_auto_change: bool
    +
    +    :param encoding: Encoding to be used when writing bytes to the output channel.
    +            (default: ascii)
    +    :type encoding: str
    +
    +    :param sock: An open socket or socket-like object (such as a `.Channel`) to use for
    +            communication to the target host (default: None).
    +    :type sock: socket
    +
    +    :param global_cmd_verify: Control whether command echo verification is enabled or disabled
    +            (default: None). Global attribute takes precedence over function `cmd_verify`
    +            argument. Value of `None` indicates to use function `cmd_verify` argument.
    +    :type global_cmd_verify: bool|None
    +
    +    :param auto_connect: Control whether Netmiko automatically establishes the connection as
    +            part of the object creation (default: True).
    +    :type auto_connect: bool
    +
    +
    +Source code +
    class YamahaBase(BaseConnection):
    +    def session_preparation(self):
    +        """Prepare the session after the connection has been established."""
    +        self._test_channel_read(pattern=r"[>#]")
    +        self.set_base_prompt()
    +        self.disable_paging(command="console lines infinity")
    +        time.sleep(0.3 * self.global_delay_factor)
    +        self.clear_buffer()
    +
    +    def check_enable_mode(self, check_string="#"):
    +        return super().check_enable_mode(check_string=check_string)
    +
    +    def enable(self, cmd="administrator", pattern=r"Password", **kwargs):
    +        return super().enable(cmd=cmd, pattern=pattern, **kwargs)
    +
    +    def exit_enable_mode(self, exit_command="exit"):
    +        """
    +        When any changes have been made, the prompt 'Save new configuration ? (Y/N)'
    +        appears before exiting. Ignore this by entering 'N'.
    +        """
    +        output = ""
    +        if self.check_enable_mode():
    +            self.write_channel(self.normalize_cmd(exit_command))
    +            time.sleep(1)
    +            output = self.read_channel()
    +            if "(Y/N)" in output:
    +                self.write_channel("N")
    +            output += self.read_until_prompt()
    +            if self.check_enable_mode():
    +                raise ValueError("Failed to exit enable mode.")
    +        return output
    +
    +    def check_config_mode(self, check_string="#", pattern=""):
    +        """Checks if the device is in administrator mode or not."""
    +        return super().check_config_mode(check_string=check_string, pattern=pattern)
    +
    +    def config_mode(self, config_command="administrator", pattern="ssword"):
    +        """Enter into administrator mode and configure device."""
    +        return self.enable()
    +
    +    def exit_config_mode(self, exit_config="exit", pattern=">"):
    +        """
    +        No action taken. Call 'exit_enable_mode()' to explicitly exit Administration
    +        Level.
    +        """
    +        return ""
    +
    +    def save_config(self, cmd="save", confirm=False, confirm_response=""):
    +        """Saves Config."""
    +        if confirm is True:
    +            raise ValueError("Yamaha does not support save_config confirmation.")
    +        self.enable()
    +        # Some devices are slow so match on trailing-prompt if you can
    +        return self.send_command(command_string=cmd)
    +
    +

    Ancestors

    + +

    Subclasses

    + +

    Methods

    +
    +
    +def check_config_mode(self, check_string='#', pattern='') +
    +
    +

    Checks if the device is in administrator mode or not.

    +
    +Source code +
    def check_config_mode(self, check_string="#", pattern=""):
    +    """Checks if the device is in administrator mode or not."""
    +    return super().check_config_mode(check_string=check_string, pattern=pattern)
    +
    +
    +
    +def config_mode(self, config_command='administrator', pattern='ssword') +
    +
    +

    Enter into administrator mode and configure device.

    +
    +Source code +
    def config_mode(self, config_command="administrator", pattern="ssword"):
    +    """Enter into administrator mode and configure device."""
    +    return self.enable()
    +
    +
    +
    +def exit_config_mode(self, exit_config='exit', pattern='>') +
    +
    +

    No action taken. Call 'exit_enable_mode()' to explicitly exit Administration +Level.

    +
    +Source code +
    def exit_config_mode(self, exit_config="exit", pattern=">"):
    +    """
    +    No action taken. Call 'exit_enable_mode()' to explicitly exit Administration
    +    Level.
    +    """
    +    return ""
    +
    +
    +
    +def exit_enable_mode(self, exit_command='exit') +
    +
    +

    When any changes have been made, the prompt 'Save new configuration ? (Y/N)' +appears before exiting. Ignore this by entering 'N'.

    +
    +Source code +
    def exit_enable_mode(self, exit_command="exit"):
    +    """
    +    When any changes have been made, the prompt 'Save new configuration ? (Y/N)'
    +    appears before exiting. Ignore this by entering 'N'.
    +    """
    +    output = ""
    +    if self.check_enable_mode():
    +        self.write_channel(self.normalize_cmd(exit_command))
    +        time.sleep(1)
    +        output = self.read_channel()
    +        if "(Y/N)" in output:
    +            self.write_channel("N")
    +        output += self.read_until_prompt()
    +        if self.check_enable_mode():
    +            raise ValueError("Failed to exit enable mode.")
    +    return output
    +
    +
    +
    +def save_config(self, cmd='save', confirm=False, confirm_response='') +
    +
    +

    Saves Config.

    +
    +Source code +
    def save_config(self, cmd="save", confirm=False, confirm_response=""):
    +    """Saves Config."""
    +    if confirm is True:
    +        raise ValueError("Yamaha does not support save_config confirmation.")
    +    self.enable()
    +    # Some devices are slow so match on trailing-prompt if you can
    +    return self.send_command(command_string=cmd)
    +
    +
    +
    +def session_preparation(self) +
    +
    +

    Prepare the session after the connection has been established.

    +
    +Source code +
    def session_preparation(self):
    +    """Prepare the session after the connection has been established."""
    +    self._test_channel_read(pattern=r"[>#]")
    +    self.set_base_prompt()
    +    self.disable_paging(command="console lines infinity")
    +    time.sleep(0.3 * self.global_delay_factor)
    +    self.clear_buffer()
    +
    +
    +
    +

    Inherited members

    + +
    +
    +class YamahaSSH +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True) +
    +
    +

    Yamaha SSH driver.

    +
        Initialize attributes for establishing connection to target device.
    +
    +    :param ip: IP address of target device. Not required if `host` is
    +        provided.
    +    :type ip: str
    +
    +    :param host: Hostname of target device. Not required if `ip` is
    +            provided.
    +    :type host: str
    +
    +    :param username: Username to authenticate against target device if
    +            required.
    +    :type username: str
    +
    +    :param password: Password to authenticate against target device if
    +            required.
    +    :type password: str
    +
    +    :param secret: The enable password if target device requires one.
    +    :type secret: str
    +
    +    :param port: The destination port used to connect to the target
    +            device.
    +    :type port: int or None
    +
    +    :param device_type: Class selection based on device type.
    +    :type device_type: str
    +
    +    :param verbose: Enable additional messages to standard output.
    +    :type verbose: bool
    +
    +    :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
    +    :type global_delay_factor: int
    +
    +    :param use_keys: Connect to target device using SSH keys.
    +    :type use_keys: bool
    +
    +    :param key_file: Filename path of the SSH key file to use.
    +    :type key_file: str
    +
    +    :param pkey: SSH key object to use.
    +    :type pkey: paramiko.PKey
    +
    +    :param passphrase: Passphrase to use for encrypted key; password will be used for key
    +            decryption if not specified.
    +    :type passphrase: str
    +
    +    :param allow_agent: Enable use of SSH key-agent.
    +    :type allow_agent: bool
    +
    +    :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
    +            means unknown SSH host keys will be accepted).
    +    :type ssh_strict: bool
    +
    +    :param system_host_keys: Load host keys from the users known_hosts file.
    +    :type system_host_keys: bool
    +    :param alt_host_keys: If `True` host keys will be loaded from the file specified in
    +            alt_key_file.
    +    :type alt_host_keys: bool
    +
    +    :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
    +    :type alt_key_file: str
    +
    +    :param ssh_config_file: File name of OpenSSH configuration file.
    +    :type ssh_config_file: str
    +
    +    :param timeout: Connection timeout.
    +    :type timeout: float
    +
    +    :param session_timeout: Set a timeout for parallel requests.
    +    :type session_timeout: float
    +
    +    :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
    +    :type auth_timeout: float
    +
    +    :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
    +    :type banner_timeout: float
    +
    +    :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
    +            Currently defaults to 0, for backwards compatibility (it will not attempt
    +            to keep the connection alive).
    +    :type keepalive: int
    +
    +    :param default_enter: Character(s) to send to correspond to enter key (default:
    +
    +

    ). +:type default_enter: str

    +
        :param response_return: Character(s) to use in normalized return data to represent
    +            enter key (default:
    +
    +

    ) +:type response_return: str

    +
        :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
    +            to select smallest of global and specific. Sets default global_delay_factor to .1
    +            (default: False)
    +    :type fast_cli: boolean
    +
    +    :param session_log: File path or BufferedIOBase subclass object to write the session log to.
    +    :type session_log: str
    +
    +    :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).
    +    :type session_log_record_writes: boolean
    +
    +    :param session_log_file_mode: "write" or "append" for session_log file mode
    +            (default: "write")
    +    :type session_log_file_mode: str
    +
    +    :param allow_auto_change: Allow automatic configuration changes for terminal settings.
    +            (default: False)
    +    :type allow_auto_change: bool
    +
    +    :param encoding: Encoding to be used when writing bytes to the output channel.
    +            (default: ascii)
    +    :type encoding: str
    +
    +    :param sock: An open socket or socket-like object (such as a `.Channel`) to use for
    +            communication to the target host (default: None).
    +    :type sock: socket
    +
    +    :param global_cmd_verify: Control whether command echo verification is enabled or disabled
    +            (default: None). Global attribute takes precedence over function `cmd_verify`
    +            argument. Value of `None` indicates to use function `cmd_verify` argument.
    +    :type global_cmd_verify: bool|None
    +
    +    :param auto_connect: Control whether Netmiko automatically establishes the connection as
    +            part of the object creation (default: True).
    +    :type auto_connect: bool
    +
    +
    +Source code +
    class YamahaSSH(YamahaBase):
    +    """Yamaha SSH driver."""
    +
    +    pass
    +
    +

    Ancestors

    + +

    Inherited members

    + +
    +
    +class YamahaTelnet +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True) +
    +
    +

    Yamaha Telnet driver.

    +
        Initialize attributes for establishing connection to target device.
    +
    +    :param ip: IP address of target device. Not required if `host` is
    +        provided.
    +    :type ip: str
    +
    +    :param host: Hostname of target device. Not required if `ip` is
    +            provided.
    +    :type host: str
    +
    +    :param username: Username to authenticate against target device if
    +            required.
    +    :type username: str
    +
    +    :param password: Password to authenticate against target device if
    +            required.
    +    :type password: str
    +
    +    :param secret: The enable password if target device requires one.
    +    :type secret: str
    +
    +    :param port: The destination port used to connect to the target
    +            device.
    +    :type port: int or None
    +
    +    :param device_type: Class selection based on device type.
    +    :type device_type: str
    +
    +    :param verbose: Enable additional messages to standard output.
    +    :type verbose: bool
    +
    +    :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
    +    :type global_delay_factor: int
    +
    +    :param use_keys: Connect to target device using SSH keys.
    +    :type use_keys: bool
    +
    +    :param key_file: Filename path of the SSH key file to use.
    +    :type key_file: str
    +
    +    :param pkey: SSH key object to use.
    +    :type pkey: paramiko.PKey
    +
    +    :param passphrase: Passphrase to use for encrypted key; password will be used for key
    +            decryption if not specified.
    +    :type passphrase: str
    +
    +    :param allow_agent: Enable use of SSH key-agent.
    +    :type allow_agent: bool
    +
    +    :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
    +            means unknown SSH host keys will be accepted).
    +    :type ssh_strict: bool
    +
    +    :param system_host_keys: Load host keys from the users known_hosts file.
    +    :type system_host_keys: bool
    +    :param alt_host_keys: If `True` host keys will be loaded from the file specified in
    +            alt_key_file.
    +    :type alt_host_keys: bool
    +
    +    :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
    +    :type alt_key_file: str
    +
    +    :param ssh_config_file: File name of OpenSSH configuration file.
    +    :type ssh_config_file: str
    +
    +    :param timeout: Connection timeout.
    +    :type timeout: float
    +
    +    :param session_timeout: Set a timeout for parallel requests.
    +    :type session_timeout: float
    +
    +    :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
    +    :type auth_timeout: float
    +
    +    :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
    +    :type banner_timeout: float
    +
    +    :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
    +            Currently defaults to 0, for backwards compatibility (it will not attempt
    +            to keep the connection alive).
    +    :type keepalive: int
    +
    +    :param default_enter: Character(s) to send to correspond to enter key (default:
    +
    +

    ). +:type default_enter: str

    +
        :param response_return: Character(s) to use in normalized return data to represent
    +            enter key (default:
    +
    +

    ) +:type response_return: str

    +
        :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
    +            to select smallest of global and specific. Sets default global_delay_factor to .1
    +            (default: False)
    +    :type fast_cli: boolean
    +
    +    :param session_log: File path or BufferedIOBase subclass object to write the session log to.
    +    :type session_log: str
    +
    +    :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).
    +    :type session_log_record_writes: boolean
    +
    +    :param session_log_file_mode: "write" or "append" for session_log file mode
    +            (default: "write")
    +    :type session_log_file_mode: str
    +
    +    :param allow_auto_change: Allow automatic configuration changes for terminal settings.
    +            (default: False)
    +    :type allow_auto_change: bool
    +
    +    :param encoding: Encoding to be used when writing bytes to the output channel.
    +            (default: ascii)
    +    :type encoding: str
    +
    +    :param sock: An open socket or socket-like object (such as a `.Channel`) to use for
    +            communication to the target host (default: None).
    +    :type sock: socket
    +
    +    :param global_cmd_verify: Control whether command echo verification is enabled or disabled
    +            (default: None). Global attribute takes precedence over function `cmd_verify`
    +            argument. Value of `None` indicates to use function `cmd_verify` argument.
    +    :type global_cmd_verify: bool|None
    +
    +    :param auto_connect: Control whether Netmiko automatically establishes the connection as
    +            part of the object creation (default: True).
    +    :type auto_connect: bool
    +
    +
    +Source code +
    class YamahaTelnet(YamahaBase):
    +    """Yamaha Telnet driver."""
    +
    +    pass
    +
    +

    Ancestors

    + +

    Inherited members

    + +
    +
    +
    +
    + +
    + + + + + \ No newline at end of file diff --git a/docs/netmiko/zte/index.html b/docs/netmiko/zte/index.html new file mode 100644 index 000000000..ee6632b01 --- /dev/null +++ b/docs/netmiko/zte/index.html @@ -0,0 +1,499 @@ + + + + + + +netmiko.zte API documentation + + + + + + + + + +
    +
    +
    +

    Module netmiko.zte

    +
    +
    +
    +Source code +
    from netmiko.zte.zte_zxros import ZteZxrosSSH
    +from netmiko.zte.zte_zxros import ZteZxrosTelnet
    +
    +__all__ = ["ZteZxrosSSH", "ZteZxrosTelnet"]
    +
    +
    +
    +

    Sub-modules

    +
    +
    netmiko.zte.zte_zxros
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    Classes

    +
    +
    +class ZteZxrosSSH +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True) +
    +
    +

    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
    +        provided.
    +    :type ip: str
    +
    +    :param host: Hostname of target device. Not required if `ip` is
    +            provided.
    +    :type host: str
    +
    +    :param username: Username to authenticate against target device if
    +            required.
    +    :type username: str
    +
    +    :param password: Password to authenticate against target device if
    +            required.
    +    :type password: str
    +
    +    :param secret: The enable password if target device requires one.
    +    :type secret: str
    +
    +    :param port: The destination port used to connect to the target
    +            device.
    +    :type port: int or None
    +
    +    :param device_type: Class selection based on device type.
    +    :type device_type: str
    +
    +    :param verbose: Enable additional messages to standard output.
    +    :type verbose: bool
    +
    +    :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
    +    :type global_delay_factor: int
    +
    +    :param use_keys: Connect to target device using SSH keys.
    +    :type use_keys: bool
    +
    +    :param key_file: Filename path of the SSH key file to use.
    +    :type key_file: str
    +
    +    :param pkey: SSH key object to use.
    +    :type pkey: paramiko.PKey
    +
    +    :param passphrase: Passphrase to use for encrypted key; password will be used for key
    +            decryption if not specified.
    +    :type passphrase: str
    +
    +    :param allow_agent: Enable use of SSH key-agent.
    +    :type allow_agent: bool
    +
    +    :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
    +            means unknown SSH host keys will be accepted).
    +    :type ssh_strict: bool
    +
    +    :param system_host_keys: Load host keys from the users known_hosts file.
    +    :type system_host_keys: bool
    +    :param alt_host_keys: If `True` host keys will be loaded from the file specified in
    +            alt_key_file.
    +    :type alt_host_keys: bool
    +
    +    :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
    +    :type alt_key_file: str
    +
    +    :param ssh_config_file: File name of OpenSSH configuration file.
    +    :type ssh_config_file: str
    +
    +    :param timeout: Connection timeout.
    +    :type timeout: float
    +
    +    :param session_timeout: Set a timeout for parallel requests.
    +    :type session_timeout: float
    +
    +    :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
    +    :type auth_timeout: float
    +
    +    :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
    +    :type banner_timeout: float
    +
    +    :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
    +            Currently defaults to 0, for backwards compatibility (it will not attempt
    +            to keep the connection alive).
    +    :type keepalive: int
    +
    +    :param default_enter: Character(s) to send to correspond to enter key (default:
    +
    +

    ). +:type default_enter: str

    +
        :param response_return: Character(s) to use in normalized return data to represent
    +            enter key (default:
    +
    +

    ) +:type response_return: str

    +
        :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
    +            to select smallest of global and specific. Sets default global_delay_factor to .1
    +            (default: False)
    +    :type fast_cli: boolean
    +
    +    :param session_log: File path or BufferedIOBase subclass object to write the session log to.
    +    :type session_log: str
    +
    +    :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).
    +    :type session_log_record_writes: boolean
    +
    +    :param session_log_file_mode: "write" or "append" for session_log file mode
    +            (default: "write")
    +    :type session_log_file_mode: str
    +
    +    :param allow_auto_change: Allow automatic configuration changes for terminal settings.
    +            (default: False)
    +    :type allow_auto_change: bool
    +
    +    :param encoding: Encoding to be used when writing bytes to the output channel.
    +            (default: ascii)
    +    :type encoding: str
    +
    +    :param sock: An open socket or socket-like object (such as a `.Channel`) to use for
    +            communication to the target host (default: None).
    +    :type sock: socket
    +
    +    :param global_cmd_verify: Control whether command echo verification is enabled or disabled
    +            (default: None). Global attribute takes precedence over function `cmd_verify`
    +            argument. Value of `None` indicates to use function `cmd_verify` argument.
    +    :type global_cmd_verify: bool|None
    +
    +    :param auto_connect: Control whether Netmiko automatically establishes the connection as
    +            part of the object creation (default: True).
    +    :type auto_connect: bool
    +
    +
    +Source code +
    class ZteZxrosSSH(ZteZxrosBase):
    +    pass
    +
    +

    Ancestors

    + +

    Inherited members

    + +
    +
    +class ZteZxrosTelnet +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True) +
    +
    +

    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
    +        provided.
    +    :type ip: str
    +
    +    :param host: Hostname of target device. Not required if `ip` is
    +            provided.
    +    :type host: str
    +
    +    :param username: Username to authenticate against target device if
    +            required.
    +    :type username: str
    +
    +    :param password: Password to authenticate against target device if
    +            required.
    +    :type password: str
    +
    +    :param secret: The enable password if target device requires one.
    +    :type secret: str
    +
    +    :param port: The destination port used to connect to the target
    +            device.
    +    :type port: int or None
    +
    +    :param device_type: Class selection based on device type.
    +    :type device_type: str
    +
    +    :param verbose: Enable additional messages to standard output.
    +    :type verbose: bool
    +
    +    :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
    +    :type global_delay_factor: int
    +
    +    :param use_keys: Connect to target device using SSH keys.
    +    :type use_keys: bool
    +
    +    :param key_file: Filename path of the SSH key file to use.
    +    :type key_file: str
    +
    +    :param pkey: SSH key object to use.
    +    :type pkey: paramiko.PKey
    +
    +    :param passphrase: Passphrase to use for encrypted key; password will be used for key
    +            decryption if not specified.
    +    :type passphrase: str
    +
    +    :param allow_agent: Enable use of SSH key-agent.
    +    :type allow_agent: bool
    +
    +    :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
    +            means unknown SSH host keys will be accepted).
    +    :type ssh_strict: bool
    +
    +    :param system_host_keys: Load host keys from the users known_hosts file.
    +    :type system_host_keys: bool
    +    :param alt_host_keys: If `True` host keys will be loaded from the file specified in
    +            alt_key_file.
    +    :type alt_host_keys: bool
    +
    +    :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
    +    :type alt_key_file: str
    +
    +    :param ssh_config_file: File name of OpenSSH configuration file.
    +    :type ssh_config_file: str
    +
    +    :param timeout: Connection timeout.
    +    :type timeout: float
    +
    +    :param session_timeout: Set a timeout for parallel requests.
    +    :type session_timeout: float
    +
    +    :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
    +    :type auth_timeout: float
    +
    +    :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
    +    :type banner_timeout: float
    +
    +    :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
    +            Currently defaults to 0, for backwards compatibility (it will not attempt
    +            to keep the connection alive).
    +    :type keepalive: int
    +
    +    :param default_enter: Character(s) to send to correspond to enter key (default:
    +
    +

    ). +:type default_enter: str

    +
        :param response_return: Character(s) to use in normalized return data to represent
    +            enter key (default:
    +
    +

    ) +:type response_return: str

    +
        :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
    +            to select smallest of global and specific. Sets default global_delay_factor to .1
    +            (default: False)
    +    :type fast_cli: boolean
    +
    +    :param session_log: File path or BufferedIOBase subclass object to write the session log to.
    +    :type session_log: str
    +
    +    :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).
    +    :type session_log_record_writes: boolean
    +
    +    :param session_log_file_mode: "write" or "append" for session_log file mode
    +            (default: "write")
    +    :type session_log_file_mode: str
    +
    +    :param allow_auto_change: Allow automatic configuration changes for terminal settings.
    +            (default: False)
    +    :type allow_auto_change: bool
    +
    +    :param encoding: Encoding to be used when writing bytes to the output channel.
    +            (default: ascii)
    +    :type encoding: str
    +
    +    :param sock: An open socket or socket-like object (such as a `.Channel`) to use for
    +            communication to the target host (default: None).
    +    :type sock: socket
    +
    +    :param global_cmd_verify: Control whether command echo verification is enabled or disabled
    +            (default: None). Global attribute takes precedence over function `cmd_verify`
    +            argument. Value of `None` indicates to use function `cmd_verify` argument.
    +    :type global_cmd_verify: bool|None
    +
    +    :param auto_connect: Control whether Netmiko automatically establishes the connection as
    +            part of the object creation (default: True).
    +    :type auto_connect: bool
    +
    +
    +Source code +
    class ZteZxrosTelnet(ZteZxrosBase):
    +    @staticmethod
    +    def _process_option(telnet_sock, cmd, opt):
    +        """
    +        ZTE need manually reply DO ECHO to enable echo command.
    +        enable ECHO, SGA, set window size to [500, 50]
    +        """
    +        if cmd == WILL:
    +            if opt in [ECHO, SGA]:
    +                # reply DO ECHO / DO SGA
    +                telnet_sock.sendall(IAC + DO + opt)
    +            else:
    +                telnet_sock.sendall(IAC + DONT + opt)
    +        elif cmd == DO:
    +            if opt == NAWS:
    +                # negotiate about window size
    +                telnet_sock.sendall(IAC + WILL + opt)
    +                # Width:500, Height:50
    +                telnet_sock.sendall(IAC + SB + NAWS + b"\x01\xf4\x00\x32" + IAC + SE)
    +            else:
    +                telnet_sock.sendall(IAC + WONT + opt)
    +
    +    def telnet_login(self, *args, **kwargs):
    +        # set callback function to handle telnet options.
    +        self.remote_conn.set_option_negotiation_callback(self._process_option)
    +        return super().telnet_login(*args, **kwargs)
    +
    +

    Ancestors

    + +

    Inherited members

    + +
    +
    +
    +
    + +
    + + + + + \ No newline at end of file diff --git a/docs/netmiko/zte/zte_zxros.html b/docs/netmiko/zte/zte_zxros.html new file mode 100644 index 000000000..0e4a1f264 --- /dev/null +++ b/docs/netmiko/zte/zte_zxros.html @@ -0,0 +1,812 @@ + + + + + + +netmiko.zte.zte_zxros API documentation + + + + + + + + + +
    +
    +
    +

    Module netmiko.zte.zte_zxros

    +
    +
    +
    +Source code +
    from netmiko.cisco_base_connection import CiscoBaseConnection
    +import time
    +from telnetlib import IAC, DO, DONT, WILL, WONT, SB, SE, ECHO, SGA, NAWS
    +
    +
    +class ZteZxrosBase(CiscoBaseConnection):
    +    def session_preparation(self):
    +        """Prepare the session after the connection has been established."""
    +        self._test_channel_read(pattern=r"[>#]")
    +        self.set_base_prompt()
    +        self.disable_paging()
    +        # Clear the read buffer
    +        time.sleep(0.3 * self.global_delay_factor)
    +        self.clear_buffer()
    +
    +    def check_config_mode(self, check_string=")#", pattern="#"):
    +        """
    +        Checks if the device is in configuration mode or not.
    +        """
    +        return super().check_config_mode(check_string=check_string, pattern=pattern)
    +
    +    def save_config(self, cmd="write", confirm=False, confirm_response=""):
    +        """Saves Config Using Copy Run Start"""
    +        return super().save_config(
    +            cmd=cmd, confirm=confirm, confirm_response=confirm_response
    +        )
    +
    +
    +class ZteZxrosSSH(ZteZxrosBase):
    +    pass
    +
    +
    +class ZteZxrosTelnet(ZteZxrosBase):
    +    @staticmethod
    +    def _process_option(telnet_sock, cmd, opt):
    +        """
    +        ZTE need manually reply DO ECHO to enable echo command.
    +        enable ECHO, SGA, set window size to [500, 50]
    +        """
    +        if cmd == WILL:
    +            if opt in [ECHO, SGA]:
    +                # reply DO ECHO / DO SGA
    +                telnet_sock.sendall(IAC + DO + opt)
    +            else:
    +                telnet_sock.sendall(IAC + DONT + opt)
    +        elif cmd == DO:
    +            if opt == NAWS:
    +                # negotiate about window size
    +                telnet_sock.sendall(IAC + WILL + opt)
    +                # Width:500, Height:50
    +                telnet_sock.sendall(IAC + SB + NAWS + b"\x01\xf4\x00\x32" + IAC + SE)
    +            else:
    +                telnet_sock.sendall(IAC + WONT + opt)
    +
    +    def telnet_login(self, *args, **kwargs):
    +        # set callback function to handle telnet options.
    +        self.remote_conn.set_option_negotiation_callback(self._process_option)
    +        return super().telnet_login(*args, **kwargs)
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    Classes

    +
    +
    +class ZteZxrosBase +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True) +
    +
    +

    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
    +        provided.
    +    :type ip: str
    +
    +    :param host: Hostname of target device. Not required if `ip` is
    +            provided.
    +    :type host: str
    +
    +    :param username: Username to authenticate against target device if
    +            required.
    +    :type username: str
    +
    +    :param password: Password to authenticate against target device if
    +            required.
    +    :type password: str
    +
    +    :param secret: The enable password if target device requires one.
    +    :type secret: str
    +
    +    :param port: The destination port used to connect to the target
    +            device.
    +    :type port: int or None
    +
    +    :param device_type: Class selection based on device type.
    +    :type device_type: str
    +
    +    :param verbose: Enable additional messages to standard output.
    +    :type verbose: bool
    +
    +    :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
    +    :type global_delay_factor: int
    +
    +    :param use_keys: Connect to target device using SSH keys.
    +    :type use_keys: bool
    +
    +    :param key_file: Filename path of the SSH key file to use.
    +    :type key_file: str
    +
    +    :param pkey: SSH key object to use.
    +    :type pkey: paramiko.PKey
    +
    +    :param passphrase: Passphrase to use for encrypted key; password will be used for key
    +            decryption if not specified.
    +    :type passphrase: str
    +
    +    :param allow_agent: Enable use of SSH key-agent.
    +    :type allow_agent: bool
    +
    +    :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
    +            means unknown SSH host keys will be accepted).
    +    :type ssh_strict: bool
    +
    +    :param system_host_keys: Load host keys from the users known_hosts file.
    +    :type system_host_keys: bool
    +    :param alt_host_keys: If `True` host keys will be loaded from the file specified in
    +            alt_key_file.
    +    :type alt_host_keys: bool
    +
    +    :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
    +    :type alt_key_file: str
    +
    +    :param ssh_config_file: File name of OpenSSH configuration file.
    +    :type ssh_config_file: str
    +
    +    :param timeout: Connection timeout.
    +    :type timeout: float
    +
    +    :param session_timeout: Set a timeout for parallel requests.
    +    :type session_timeout: float
    +
    +    :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
    +    :type auth_timeout: float
    +
    +    :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
    +    :type banner_timeout: float
    +
    +    :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
    +            Currently defaults to 0, for backwards compatibility (it will not attempt
    +            to keep the connection alive).
    +    :type keepalive: int
    +
    +    :param default_enter: Character(s) to send to correspond to enter key (default:
    +
    +

    ). +:type default_enter: str

    +
        :param response_return: Character(s) to use in normalized return data to represent
    +            enter key (default:
    +
    +

    ) +:type response_return: str

    +
        :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
    +            to select smallest of global and specific. Sets default global_delay_factor to .1
    +            (default: False)
    +    :type fast_cli: boolean
    +
    +    :param session_log: File path or BufferedIOBase subclass object to write the session log to.
    +    :type session_log: str
    +
    +    :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).
    +    :type session_log_record_writes: boolean
    +
    +    :param session_log_file_mode: "write" or "append" for session_log file mode
    +            (default: "write")
    +    :type session_log_file_mode: str
    +
    +    :param allow_auto_change: Allow automatic configuration changes for terminal settings.
    +            (default: False)
    +    :type allow_auto_change: bool
    +
    +    :param encoding: Encoding to be used when writing bytes to the output channel.
    +            (default: ascii)
    +    :type encoding: str
    +
    +    :param sock: An open socket or socket-like object (such as a `.Channel`) to use for
    +            communication to the target host (default: None).
    +    :type sock: socket
    +
    +    :param global_cmd_verify: Control whether command echo verification is enabled or disabled
    +            (default: None). Global attribute takes precedence over function `cmd_verify`
    +            argument. Value of `None` indicates to use function `cmd_verify` argument.
    +    :type global_cmd_verify: bool|None
    +
    +    :param auto_connect: Control whether Netmiko automatically establishes the connection as
    +            part of the object creation (default: True).
    +    :type auto_connect: bool
    +
    +
    +Source code +
    class ZteZxrosBase(CiscoBaseConnection):
    +    def session_preparation(self):
    +        """Prepare the session after the connection has been established."""
    +        self._test_channel_read(pattern=r"[>#]")
    +        self.set_base_prompt()
    +        self.disable_paging()
    +        # Clear the read buffer
    +        time.sleep(0.3 * self.global_delay_factor)
    +        self.clear_buffer()
    +
    +    def check_config_mode(self, check_string=")#", pattern="#"):
    +        """
    +        Checks if the device is in configuration mode or not.
    +        """
    +        return super().check_config_mode(check_string=check_string, pattern=pattern)
    +
    +    def save_config(self, cmd="write", confirm=False, confirm_response=""):
    +        """Saves Config Using Copy Run Start"""
    +        return super().save_config(
    +            cmd=cmd, confirm=confirm, confirm_response=confirm_response
    +        )
    +
    +

    Ancestors

    + +

    Subclasses

    + +

    Methods

    +
    +
    +def check_config_mode(self, check_string=')#', pattern='#') +
    +
    +

    Checks if the device is in configuration mode or not.

    +
    +Source code +
    def check_config_mode(self, check_string=")#", pattern="#"):
    +    """
    +    Checks if the device is in configuration mode or not.
    +    """
    +    return super().check_config_mode(check_string=check_string, pattern=pattern)
    +
    +
    +
    +def save_config(self, cmd='write', confirm=False, confirm_response='') +
    +
    +

    Saves Config Using Copy Run Start

    +
    +Source code +
    def save_config(self, cmd="write", confirm=False, confirm_response=""):
    +    """Saves Config Using Copy Run Start"""
    +    return super().save_config(
    +        cmd=cmd, confirm=confirm, confirm_response=confirm_response
    +    )
    +
    +
    +
    +def session_preparation(self) +
    +
    +

    Prepare the session after the connection has been established.

    +
    +Source code +
    def session_preparation(self):
    +    """Prepare the session after the connection has been established."""
    +    self._test_channel_read(pattern=r"[>#]")
    +    self.set_base_prompt()
    +    self.disable_paging()
    +    # Clear the read buffer
    +    time.sleep(0.3 * self.global_delay_factor)
    +    self.clear_buffer()
    +
    +
    +
    +

    Inherited members

    + +
    +
    +class ZteZxrosSSH +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True) +
    +
    +

    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
    +        provided.
    +    :type ip: str
    +
    +    :param host: Hostname of target device. Not required if `ip` is
    +            provided.
    +    :type host: str
    +
    +    :param username: Username to authenticate against target device if
    +            required.
    +    :type username: str
    +
    +    :param password: Password to authenticate against target device if
    +            required.
    +    :type password: str
    +
    +    :param secret: The enable password if target device requires one.
    +    :type secret: str
    +
    +    :param port: The destination port used to connect to the target
    +            device.
    +    :type port: int or None
    +
    +    :param device_type: Class selection based on device type.
    +    :type device_type: str
    +
    +    :param verbose: Enable additional messages to standard output.
    +    :type verbose: bool
    +
    +    :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
    +    :type global_delay_factor: int
    +
    +    :param use_keys: Connect to target device using SSH keys.
    +    :type use_keys: bool
    +
    +    :param key_file: Filename path of the SSH key file to use.
    +    :type key_file: str
    +
    +    :param pkey: SSH key object to use.
    +    :type pkey: paramiko.PKey
    +
    +    :param passphrase: Passphrase to use for encrypted key; password will be used for key
    +            decryption if not specified.
    +    :type passphrase: str
    +
    +    :param allow_agent: Enable use of SSH key-agent.
    +    :type allow_agent: bool
    +
    +    :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
    +            means unknown SSH host keys will be accepted).
    +    :type ssh_strict: bool
    +
    +    :param system_host_keys: Load host keys from the users known_hosts file.
    +    :type system_host_keys: bool
    +    :param alt_host_keys: If `True` host keys will be loaded from the file specified in
    +            alt_key_file.
    +    :type alt_host_keys: bool
    +
    +    :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
    +    :type alt_key_file: str
    +
    +    :param ssh_config_file: File name of OpenSSH configuration file.
    +    :type ssh_config_file: str
    +
    +    :param timeout: Connection timeout.
    +    :type timeout: float
    +
    +    :param session_timeout: Set a timeout for parallel requests.
    +    :type session_timeout: float
    +
    +    :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
    +    :type auth_timeout: float
    +
    +    :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
    +    :type banner_timeout: float
    +
    +    :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
    +            Currently defaults to 0, for backwards compatibility (it will not attempt
    +            to keep the connection alive).
    +    :type keepalive: int
    +
    +    :param default_enter: Character(s) to send to correspond to enter key (default:
    +
    +

    ). +:type default_enter: str

    +
        :param response_return: Character(s) to use in normalized return data to represent
    +            enter key (default:
    +
    +

    ) +:type response_return: str

    +
        :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
    +            to select smallest of global and specific. Sets default global_delay_factor to .1
    +            (default: False)
    +    :type fast_cli: boolean
    +
    +    :param session_log: File path or BufferedIOBase subclass object to write the session log to.
    +    :type session_log: str
    +
    +    :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).
    +    :type session_log_record_writes: boolean
    +
    +    :param session_log_file_mode: "write" or "append" for session_log file mode
    +            (default: "write")
    +    :type session_log_file_mode: str
    +
    +    :param allow_auto_change: Allow automatic configuration changes for terminal settings.
    +            (default: False)
    +    :type allow_auto_change: bool
    +
    +    :param encoding: Encoding to be used when writing bytes to the output channel.
    +            (default: ascii)
    +    :type encoding: str
    +
    +    :param sock: An open socket or socket-like object (such as a `.Channel`) to use for
    +            communication to the target host (default: None).
    +    :type sock: socket
    +
    +    :param global_cmd_verify: Control whether command echo verification is enabled or disabled
    +            (default: None). Global attribute takes precedence over function `cmd_verify`
    +            argument. Value of `None` indicates to use function `cmd_verify` argument.
    +    :type global_cmd_verify: bool|None
    +
    +    :param auto_connect: Control whether Netmiko automatically establishes the connection as
    +            part of the object creation (default: True).
    +    :type auto_connect: bool
    +
    +
    +Source code +
    class ZteZxrosSSH(ZteZxrosBase):
    +    pass
    +
    +

    Ancestors

    + +

    Inherited members

    + +
    +
    +class ZteZxrosTelnet +(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, timeout=100, session_timeout=60, auth_timeout=None, blocking_timeout=20, banner_timeout=15, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=False, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True) +
    +
    +

    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
    +        provided.
    +    :type ip: str
    +
    +    :param host: Hostname of target device. Not required if `ip` is
    +            provided.
    +    :type host: str
    +
    +    :param username: Username to authenticate against target device if
    +            required.
    +    :type username: str
    +
    +    :param password: Password to authenticate against target device if
    +            required.
    +    :type password: str
    +
    +    :param secret: The enable password if target device requires one.
    +    :type secret: str
    +
    +    :param port: The destination port used to connect to the target
    +            device.
    +    :type port: int or None
    +
    +    :param device_type: Class selection based on device type.
    +    :type device_type: str
    +
    +    :param verbose: Enable additional messages to standard output.
    +    :type verbose: bool
    +
    +    :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
    +    :type global_delay_factor: int
    +
    +    :param use_keys: Connect to target device using SSH keys.
    +    :type use_keys: bool
    +
    +    :param key_file: Filename path of the SSH key file to use.
    +    :type key_file: str
    +
    +    :param pkey: SSH key object to use.
    +    :type pkey: paramiko.PKey
    +
    +    :param passphrase: Passphrase to use for encrypted key; password will be used for key
    +            decryption if not specified.
    +    :type passphrase: str
    +
    +    :param allow_agent: Enable use of SSH key-agent.
    +    :type allow_agent: bool
    +
    +    :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
    +            means unknown SSH host keys will be accepted).
    +    :type ssh_strict: bool
    +
    +    :param system_host_keys: Load host keys from the users known_hosts file.
    +    :type system_host_keys: bool
    +    :param alt_host_keys: If `True` host keys will be loaded from the file specified in
    +            alt_key_file.
    +    :type alt_host_keys: bool
    +
    +    :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
    +    :type alt_key_file: str
    +
    +    :param ssh_config_file: File name of OpenSSH configuration file.
    +    :type ssh_config_file: str
    +
    +    :param timeout: Connection timeout.
    +    :type timeout: float
    +
    +    :param session_timeout: Set a timeout for parallel requests.
    +    :type session_timeout: float
    +
    +    :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
    +    :type auth_timeout: float
    +
    +    :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
    +    :type banner_timeout: float
    +
    +    :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
    +            Currently defaults to 0, for backwards compatibility (it will not attempt
    +            to keep the connection alive).
    +    :type keepalive: int
    +
    +    :param default_enter: Character(s) to send to correspond to enter key (default:
    +
    +

    ). +:type default_enter: str

    +
        :param response_return: Character(s) to use in normalized return data to represent
    +            enter key (default:
    +
    +

    ) +:type response_return: str

    +
        :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
    +            to select smallest of global and specific. Sets default global_delay_factor to .1
    +            (default: False)
    +    :type fast_cli: boolean
    +
    +    :param session_log: File path or BufferedIOBase subclass object to write the session log to.
    +    :type session_log: str
    +
    +    :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).
    +    :type session_log_record_writes: boolean
    +
    +    :param session_log_file_mode: "write" or "append" for session_log file mode
    +            (default: "write")
    +    :type session_log_file_mode: str
    +
    +    :param allow_auto_change: Allow automatic configuration changes for terminal settings.
    +            (default: False)
    +    :type allow_auto_change: bool
    +
    +    :param encoding: Encoding to be used when writing bytes to the output channel.
    +            (default: ascii)
    +    :type encoding: str
    +
    +    :param sock: An open socket or socket-like object (such as a `.Channel`) to use for
    +            communication to the target host (default: None).
    +    :type sock: socket
    +
    +    :param global_cmd_verify: Control whether command echo verification is enabled or disabled
    +            (default: None). Global attribute takes precedence over function `cmd_verify`
    +            argument. Value of `None` indicates to use function `cmd_verify` argument.
    +    :type global_cmd_verify: bool|None
    +
    +    :param auto_connect: Control whether Netmiko automatically establishes the connection as
    +            part of the object creation (default: True).
    +    :type auto_connect: bool
    +
    +
    +Source code +
    class ZteZxrosTelnet(ZteZxrosBase):
    +    @staticmethod
    +    def _process_option(telnet_sock, cmd, opt):
    +        """
    +        ZTE need manually reply DO ECHO to enable echo command.
    +        enable ECHO, SGA, set window size to [500, 50]
    +        """
    +        if cmd == WILL:
    +            if opt in [ECHO, SGA]:
    +                # reply DO ECHO / DO SGA
    +                telnet_sock.sendall(IAC + DO + opt)
    +            else:
    +                telnet_sock.sendall(IAC + DONT + opt)
    +        elif cmd == DO:
    +            if opt == NAWS:
    +                # negotiate about window size
    +                telnet_sock.sendall(IAC + WILL + opt)
    +                # Width:500, Height:50
    +                telnet_sock.sendall(IAC + SB + NAWS + b"\x01\xf4\x00\x32" + IAC + SE)
    +            else:
    +                telnet_sock.sendall(IAC + WONT + opt)
    +
    +    def telnet_login(self, *args, **kwargs):
    +        # set callback function to handle telnet options.
    +        self.remote_conn.set_option_negotiation_callback(self._process_option)
    +        return super().telnet_login(*args, **kwargs)
    +
    +

    Ancestors

    + +

    Inherited members

    + +
    +
    +
    +
    + +
    + + + + + \ No newline at end of file diff --git a/netmiko/ssh_dispatcher.py b/netmiko/ssh_dispatcher.py index 361249c26..cee6c5c47 100755 --- a/netmiko/ssh_dispatcher.py +++ b/netmiko/ssh_dispatcher.py @@ -89,6 +89,8 @@ from netmiko.zte import ZteZxrosSSH from netmiko.zte import ZteZxrosTelnet +GenericSSH = TerminalServerSSH +GenericTelnet = TerminalServerTelnet # The keys of this dictionary are the supported device_types CLASS_MAPPER_BASE = { @@ -147,6 +149,7 @@ "f5_linux": F5LinuxSSH, "flexvnf": FlexvnfSSH, "fortinet": FortinetSSH, + "generic": GenericSSH, "generic_termserver": TerminalServerSSH, "hp_comware": HPComwareSSH, "hp_procurve": HPProcurveSSH, @@ -235,6 +238,7 @@ CLASS_MAPPER["extreme_telnet"] = ExtremeExosTelnet CLASS_MAPPER["extreme_exos_telnet"] = ExtremeExosTelnet CLASS_MAPPER["extreme_netiron_telnet"] = ExtremeNetironTelnet +CLASS_MAPPER["generic_telnet"] = GenericTelnet CLASS_MAPPER["generic_termserver_telnet"] = TerminalServerTelnet CLASS_MAPPER["hp_procurve_telnet"] = HPProcurveTelnet CLASS_MAPPER["hp_comware_telnet"] = HPComwareTelnet From 73fbd8f1808ff5933899fd2b2c72901c5cc7ce32 Mon Sep 17 00:00:00 2001 From: Andrew Riachi Date: Tue, 23 Jun 2020 12:14:00 -0500 Subject: [PATCH 31/42] Tell aruba connection to strip ansi codes from switches (#1808) --- netmiko/aruba/aruba_ssh.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/netmiko/aruba/aruba_ssh.py b/netmiko/aruba/aruba_ssh.py index 3338ccd0a..8657eef77 100644 --- a/netmiko/aruba/aruba_ssh.py +++ b/netmiko/aruba/aruba_ssh.py @@ -17,6 +17,9 @@ def __init__(self, **kwargs): def session_preparation(self): """Aruba OS requires enable mode to disable paging.""" + # Aruba switches output ansi codes + self.ansi_escape_codes = True + delay_factor = self.select_delay_factor(delay_factor=0) time.sleep(1 * delay_factor) self._test_channel_read() From 84724c4ce936465429f61c88f967da0c2d268a7d Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Mon, 29 Jun 2020 09:03:17 -0700 Subject: [PATCH 32/42] Improved documentation examples (#1816) --- EXAMPLES.md | 1079 +++++++++++++++++ README.md | 1 + examples/autodetect_snmp.py | 20 + .../autodetect_snmp_v3.py | 16 +- .../case8_autodetect => }/autodetect_ssh.py | 10 +- examples/config_change.py | 19 + examples/config_change_file.py | 26 + examples/config_changes.txt | 2 + .../conn_multiple_dev.py | 21 +- examples/conn_ssh_keys.py | 16 + examples/conn_ssh_proxy.py | 17 + .../case2_using_dict => }/conn_with_dict.py | 6 +- examples/conn_with_dict_cm.py | 14 + examples/delay_factor.py | 33 + examples/enable.py | 19 + examples/global_delay_factor.py | 19 + examples/invalid_device_type.py | 13 + ...onn_with_logging.py => netmiko_logging.py} | 10 +- .../case14_secure_copy => }/secure_copy.py | 7 +- examples/send_command.py | 20 + examples/send_command_genie.py | 18 + examples/send_command_prompting.py | 38 + examples/send_command_prompting_expect.py | 45 + examples/send_command_textfsm.py | 20 + examples/session_log.py | 16 + .../case1_simple_conn => }/simple_conn.py | 0 examples/ssh_config | 12 + examples/term_server.py | 68 ++ .../{use_cases/case11_logging => }/test.log | 41 +- .../case14_secure_copy => }/test1.txt | 0 .../case10_ssh_proxy/conn_ssh_proxy.py | 19 - .../use_cases/case10_ssh_proxy/ssh_config | 7 - .../case13_term_server/term_server.py | 56 - .../genie_show_ip_route_ios.py | 21 - examples/use_cases/case2_using_dict/enable.py | 27 - .../case2_using_dict/invalid_device_type.py | 14 - .../case4_show_commands/send_command.py | 20 - .../case4_show_commands/send_command_delay.py | 19 - .../send_command_expect.py | 20 - .../send_command_textfsm.py | 20 - .../case5_prompting/send_command_prompting.py | 23 - .../case6_config_change/config_change.py | 21 - .../case6_config_change/config_change_file.py | 22 - .../case6_config_change/config_changes.txt | 6 - .../case8_autodetect/autodetect_snmp.py | 16 - .../use_cases/case9_ssh_keys/conn_ssh_keys.py | 18 - .../adding_delay/add_delay.py | 0 {examples => examples_old}/asa_upgrade.py | 0 .../configuration_changes/change_file.txt | 0 .../configuration_changes/config_changes.py | 0 .../config_changes_from_file.py | 0 .../config_changes_to_device_list.py | 0 .../connect_multiple.py | 0 {examples => examples_old}/enable/enable.py | 0 .../handle_prompts/handle_prompts.py | 0 .../show_command/show_command.py | 0 .../show_command/show_command_textfsm.py | 0 .../simple_connection/simple_conn.py | 0 .../simple_connection/simple_conn_dict.py | 0 .../troubleshooting/enable_logging.py | 0 .../use_cases/case12_telnet/conn_telnet.py | 0 .../case15_netmiko_tools/.netmiko.yml_example | 0 .../use_cases/case15_netmiko_tools/vlans.txt | 0 .../case16_concurrency/my_devices.py | 0 .../case16_concurrency/processes_netmiko.py | 0 .../processes_netmiko_queue.py | 0 .../case16_concurrency/threads_netmiko.py | 0 .../use_cases/case17_jinja2/jinja2_crypto.py | 0 .../case17_jinja2/jinja2_for_loop.py | 0 .../case17_jinja2/jinja2_ospf_file.py | 0 .../use_cases/case17_jinja2/jinja2_vlans.py | 0 .../use_cases/case17_jinja2/ospf_config.j2 | 0 .../genie_show_mac_nxos.py | 0 .../genie_show_platform_iosxr.py | 0 .../genie_textfsm_combined_ex1.py | 0 .../genie_textfsm_combined_ex2.py | 0 .../case7_commit/config_change_jnpr.py | 0 .../use_cases}/write_channel.py | 0 images/netmiko_logo_gh.png | Bin 0 -> 40341 bytes netmiko/aruba/aruba_ssh.py | 2 +- netmiko/base_connection.py | 20 +- netmiko/cisco_base_connection.py | 105 +- netmiko/juniper/juniper.py | 12 + netmiko/ssh_dispatcher.py | 17 +- requirements-dev.txt | 2 +- test.log | 129 ++ 86 files changed, 1797 insertions(+), 445 deletions(-) create mode 100644 EXAMPLES.md create mode 100644 examples/autodetect_snmp.py rename examples/{use_cases/case8_autodetect => }/autodetect_snmp_v3.py (55%) rename examples/{use_cases/case8_autodetect => }/autodetect_ssh.py (64%) create mode 100644 examples/config_change.py create mode 100644 examples/config_change_file.py create mode 100644 examples/config_changes.txt rename examples/{use_cases/case3_multiple_devices => }/conn_multiple_dev.py (70%) create mode 100644 examples/conn_ssh_keys.py create mode 100644 examples/conn_ssh_proxy.py rename examples/{use_cases/case2_using_dict => }/conn_with_dict.py (66%) create mode 100644 examples/conn_with_dict_cm.py create mode 100644 examples/delay_factor.py create mode 100644 examples/enable.py create mode 100644 examples/global_delay_factor.py create mode 100644 examples/invalid_device_type.py rename examples/{use_cases/case11_logging/conn_with_logging.py => netmiko_logging.py} (65%) rename examples/{use_cases/case14_secure_copy => }/secure_copy.py (80%) create mode 100644 examples/send_command.py create mode 100644 examples/send_command_genie.py create mode 100644 examples/send_command_prompting.py create mode 100644 examples/send_command_prompting_expect.py create mode 100644 examples/send_command_textfsm.py create mode 100644 examples/session_log.py rename examples/{use_cases/case1_simple_conn => }/simple_conn.py (100%) create mode 100644 examples/ssh_config create mode 100644 examples/term_server.py rename examples/{use_cases/case11_logging => }/test.log (72%) rename examples/{use_cases/case14_secure_copy => }/test1.txt (100%) delete mode 100644 examples/use_cases/case10_ssh_proxy/conn_ssh_proxy.py delete mode 100644 examples/use_cases/case10_ssh_proxy/ssh_config delete mode 100644 examples/use_cases/case13_term_server/term_server.py delete mode 100644 examples/use_cases/case18_structured_data_genie/genie_show_ip_route_ios.py delete mode 100644 examples/use_cases/case2_using_dict/enable.py delete mode 100644 examples/use_cases/case2_using_dict/invalid_device_type.py delete mode 100644 examples/use_cases/case4_show_commands/send_command.py delete mode 100644 examples/use_cases/case4_show_commands/send_command_delay.py delete mode 100644 examples/use_cases/case4_show_commands/send_command_expect.py delete mode 100644 examples/use_cases/case4_show_commands/send_command_textfsm.py delete mode 100644 examples/use_cases/case5_prompting/send_command_prompting.py delete mode 100644 examples/use_cases/case6_config_change/config_change.py delete mode 100644 examples/use_cases/case6_config_change/config_change_file.py delete mode 100644 examples/use_cases/case6_config_change/config_changes.txt delete mode 100644 examples/use_cases/case8_autodetect/autodetect_snmp.py delete mode 100644 examples/use_cases/case9_ssh_keys/conn_ssh_keys.py rename {examples => examples_old}/adding_delay/add_delay.py (100%) rename {examples => examples_old}/asa_upgrade.py (100%) rename {examples => examples_old}/configuration_changes/change_file.txt (100%) rename {examples => examples_old}/configuration_changes/config_changes.py (100%) rename {examples => examples_old}/configuration_changes/config_changes_from_file.py (100%) rename {examples => examples_old}/configuration_changes/config_changes_to_device_list.py (100%) rename {examples => examples_old}/connect_multiple_devices/connect_multiple.py (100%) rename {examples => examples_old}/enable/enable.py (100%) rename {examples => examples_old}/handle_prompts/handle_prompts.py (100%) rename {examples => examples_old}/show_command/show_command.py (100%) rename {examples => examples_old}/show_command/show_command_textfsm.py (100%) rename {examples => examples_old}/simple_connection/simple_conn.py (100%) rename {examples => examples_old}/simple_connection/simple_conn_dict.py (100%) rename {examples => examples_old}/troubleshooting/enable_logging.py (100%) rename {examples => examples_old}/use_cases/case12_telnet/conn_telnet.py (100%) rename {examples => examples_old}/use_cases/case15_netmiko_tools/.netmiko.yml_example (100%) rename {examples => examples_old}/use_cases/case15_netmiko_tools/vlans.txt (100%) rename {examples => examples_old}/use_cases/case16_concurrency/my_devices.py (100%) rename {examples => examples_old}/use_cases/case16_concurrency/processes_netmiko.py (100%) rename {examples => examples_old}/use_cases/case16_concurrency/processes_netmiko_queue.py (100%) rename {examples => examples_old}/use_cases/case16_concurrency/threads_netmiko.py (100%) rename {examples => examples_old}/use_cases/case17_jinja2/jinja2_crypto.py (100%) rename {examples => examples_old}/use_cases/case17_jinja2/jinja2_for_loop.py (100%) rename {examples => examples_old}/use_cases/case17_jinja2/jinja2_ospf_file.py (100%) rename {examples => examples_old}/use_cases/case17_jinja2/jinja2_vlans.py (100%) rename {examples => examples_old}/use_cases/case17_jinja2/ospf_config.j2 (100%) rename {examples => examples_old}/use_cases/case18_structured_data_genie/genie_show_mac_nxos.py (100%) rename {examples => examples_old}/use_cases/case18_structured_data_genie/genie_show_platform_iosxr.py (100%) rename {examples => examples_old}/use_cases/case18_structured_data_genie/genie_textfsm_combined_ex1.py (100%) rename {examples => examples_old}/use_cases/case18_structured_data_genie/genie_textfsm_combined_ex2.py (100%) rename {examples => examples_old}/use_cases/case7_commit/config_change_jnpr.py (100%) rename {examples/use_cases/case11_logging => examples_old/use_cases}/write_channel.py (100%) create mode 100644 images/netmiko_logo_gh.png create mode 100644 test.log diff --git a/EXAMPLES.md b/EXAMPLES.md new file mode 100644 index 000000000..5b5cbb0bf --- /dev/null +++ b/EXAMPLES.md @@ -0,0 +1,1079 @@ + + +Netmiko Examples +======= + +A set of common Netmiko use cases. + +
    + +## Table of contents + +#### Available Device Types +- [Available device types](#available-device-types) + +#### Simple Examples +- [Simple example](#simple-example) +- [Connect using a dictionary](#connect-using-a-dictionary) +- [Dictionary with a context manager](#dictionary-with-a-context-manager) +- [Enable mode](#enable-mode) + +#### Multiple Devices (simple example) +- [Connecting to multiple devices](#connecting-to-multiple-devices) + +#### Show Commands +- [Executing a show command](#executing-show-command) +- [Handling commands that prompt (timing)](#handling-commands-that-prompt-timing) +- [Handling commands that prompt (expect_string)](#handling-commands-that-prompt-expect_string) +- [Using global_delay_factor](#using-global_delay_factor) +- [Adjusting delay_factor](#adjusting-delay_factor) + +#### Parsers (TextFSM and Genie) +- [TextFSM example](#using-textfsm) +- [Genie example](#using-genie) + +#### Configuration Changes +- [Configuration changes](#configuration-changes) +- [Configuration changes from a file](#configuration-changes-from-a-file) + +#### SSH keys and SSH config_file +- [SSH keys](#ssh-keys) +- [SSH config file](#ssh-config-file) + +#### Logging and Session Log +- [Session log](#session-log) +- [Standard logging](#standard-logging) + +#### Secure Copy +- [Secure Copy](#secure-copy) + +#### Auto Detection of Device Type +- [Auto detection using SSH](#auto-detection-using-ssh) +- [Auto detection using SNMPv3](#auto-detection-using-snmpv3) +- [Auto detection using SNMPv2c](#auto-detection-using-snmpv2c) + +#### Terminal Server Example +- [Terminal Server and Redispatch](#terminal-server-and-redispatch) + + +
    + +## Available device types + +```py +from netmiko import ConnectHandler + +# Just pick an 'invalid' device_type +cisco1 = { + "device_type": "invalid", + "host": "cisco1.lasthop.io", + "username": "pyclass", + "password": "invalid" +} + +net_connect = ConnectHandler(**cisco1) +net_connect.disconnect() +``` + +#### The above code will output all of the available SSH device types. Switch to 'invalid_telnet' to see 'telnet' device types. + +``` +Traceback (most recent call last): + File "invalid_device_type.py", line 12, in + net_connect = ConnectHandler(**cisco1) + File "./netmiko/ssh_dispatcher.py", line 263, in ConnectHandler + "currently supported platforms are: {}".format(platforms_str) +ValueError: Unsupported 'device_type' currently supported platforms are: +a10 +accedian +alcatel_aos +alcatel_sros +apresia_aeos +arista_eos +aruba_os +avaya_ers +avaya_vsp +... and a lot more. +``` + +
    + +## Simple example + +```py +from netmiko import ConnectHandler +from getpass import getpass + +net_connect = ConnectHandler( + device_type="cisco_ios", + host="cisco1.lasthop.io", + username="pyclass", + password=getpass(), +) + +print(net_connect.find_prompt()) +net_connect.disconnect() +``` + +
    + +## Connect using a dictionary + +```py +from netmiko import ConnectHandler +from getpass import getpass + +cisco1 = { + "device_type": "cisco_ios", + "host": "cisco1.lasthop.io", + "username": "pyclass", + "password": getpass(), +} + +net_connect = ConnectHandler(**cisco1) +print(net_connect.find_prompt()) +net_connect.disconnect() +``` + +
    + +## Dictionary with a context manager + +```py +from netmiko import ConnectHandler +from getpass import getpass + +cisco1 = { + "device_type": "cisco_ios", + "host": "cisco1.lasthop.io", + "username": "pyclass", + "password": getpass(), +} + +# Will automatically 'disconnect()' +with ConnectHandler(**cisco1) as net_connect: + print(net_connect.find_prompt()) +``` + +
    + +## Enable mode + +```py +from netmiko import ConnectHandler +from getpass import getpass + +password = getpass() +secret = getpass("Enter secret: ") + +cisco1 = { + "device_type": "cisco_ios", + "host": "cisco1.lasthop.io", + "username": "pyclass", + "password": password, + "secret": secret, +} + +net_connect = ConnectHandler(**cisco1) +# Call 'enable()' method to elevate privileges +net_connect.enable() +print(net_connect.find_prompt()) +net_connect.disconnect() +``` + +
    + +## Connecting to multiple devices. + +```py +from netmiko import ConnectHandler +from getpass import getpass + +password = getpass() + +cisco1 = { + "device_type": "cisco_ios", + "host": "cisco1.lasthop.io", + "username": "pyclass", + "password": password, +} + +cisco2 = { + "device_type": "cisco_ios", + "host": "cisco2.lasthop.io", + "username": "pyclass", + "password": password, +} + +nxos1 = { + "device_type": "cisco_nxos", + "host": "nxos1.lasthop.io", + "username": "pyclass", + "password": password, +} + +srx1 = { + "device_type": "juniper_junos", + "host": "srx1.lasthop.io", + "username": "pyclass", + "password": password, +} + +for device in (cisco1, cisco2, nxos1, srx1): + net_connect = ConnectHandler(**device) + print(net_connect.find_prompt()) + net_connect.disconnect() +``` + +
    + +## Executing show command. + +```py +from netmiko import ConnectHandler +from getpass import getpass + +cisco1 = { + "device_type": "cisco_ios", + "host": "cisco1.lasthop.io", + "username": "pyclass", + "password": getpass(), +} + +# Show command that we execute. +command = "show ip int brief" + +with ConnectHandler(**cisco1) as net_connect: + output = net_connect.send_command(command) + +# Automatically cleans-up the output so that only the show output is returned +print() +print(output) +print() +``` + +#### Output from the above execution: + +``` +Password: + +Interface IP-Address OK? Method Status Protocol +FastEthernet0 unassigned YES unset down down +FastEthernet1 unassigned YES unset down down +FastEthernet2 unassigned YES unset down down +FastEthernet3 unassigned YES unset down down +FastEthernet4 10.220.88.20 YES NVRAM up up +Vlan1 unassigned YES unset down down + +``` + +
    + +## Adjusting delay_factor + +[Additional details on delay_factor](https://pynet.twb-tech.com/blog/automation/netmiko-what-is-done.html) + +```py +from netmiko import ConnectHandler +from getpass import getpass +from datetime import datetime + +cisco1 = { + "device_type": "cisco_ios", + "host": "cisco1.lasthop.io", + "username": "pyclass", + "password": getpass(), +} + +command = "copy flash:c880data-universalk9-mz.155-3.M8.bin flash:test1.bin" + +# Start clock +start_time = datetime.now() + +net_connect = ConnectHandler(**cisco1) + +# Netmiko normally allows 100 seconds for send_command to complete +# delay_factor=4 would allow 400 seconds. +output = net_connect.send_command_timing( + command, strip_prompt=False, strip_command=False, delay_factor=4 +) +# Router prompted in this example: +# ------- +# cisco1#copy flash:c880data-universalk9-mz.155-3.M8.bin flash:test1.bin +# Destination filename [test1.bin]? +# Copy in progress...CCCCCCC +# ------- +if "Destination filename" in output: + print("Starting copy...") + output += net_connect.send_command("\n", delay_factor=4, expect_string=r"#") +net_connect.disconnect() + +end_time = datetime.now() +print(f"\n{output}\n") +print("done") +print(f"Execution time: {start_time - end_time}") +``` + +
    + +## Using global_delay_factor + +[Additional details on global_delay_factor](https://pynet.twb-tech.com/blog/automation/netmiko-what-is-done.html) + +```py +from netmiko import ConnectHandler +from getpass import getpass + +cisco1 = { + "device_type": "cisco_ios", + "host": "cisco1.lasthop.io", + "username": "pyclass", + "password": getpass(), + # Multiple all of the delays by a factor of two + "global_delay_factor": 2, +} + +command = "show ip arp" +net_connect = ConnectHandler(**cisco1) +output = net_connect.send_command(command) +net_connect.disconnect() + +print(f"\n{output}\n") +``` + +
    + +## Using TextFSM + +[Additional Details on Netmiko and TextFSM](https://pynet.twb-tech.com/blog/automation/netmiko-textfsm.html) + +```py +from netmiko import ConnectHandler +from getpass import getpass +from pprint import pprint + +cisco1 = { + "device_type": "cisco_ios", + "host": "cisco1.lasthop.io", + "username": "pyclass", + "password": getpass(), +} + +command = "show ip int brief" +with ConnectHandler(**cisco1) as net_connect: + # Use TextFSM to retrieve structured data + output = net_connect.send_command(command, use_textfsm=True) + +print() +pprint(output) +print() +``` + + +#### Output from the above execution: + +``` +Password: + +[{'intf': 'FastEthernet0', + 'ipaddr': 'unassigned', + 'proto': 'down', + 'status': 'down'}, + {'intf': 'FastEthernet1', + 'ipaddr': 'unassigned', + 'proto': 'down', + 'status': 'down'}, + {'intf': 'FastEthernet2', + 'ipaddr': 'unassigned', + 'proto': 'down', + 'status': 'down'}, + {'intf': 'FastEthernet3', + 'ipaddr': 'unassigned', + 'proto': 'down', + 'status': 'down'}, + {'intf': 'FastEthernet4', + 'ipaddr': '10.220.88.20', + 'proto': 'up', + 'status': 'up'}, + {'intf': 'Vlan1', + 'ipaddr': 'unassigned', + 'proto': 'down', + 'status': 'down'}] + +``` + +
    + +## Using Genie + +```py +from getpass import getpass +from pprint import pprint +from netmiko import ConnectHandler + +device = { + "device_type": "cisco_ios", + "host": "cisco1.lasthop.io", + "username": "pyclass", + "password": getpass() +} + +with ConnectHandler(**device) as net_connect: + output = net_connect.send_command("show ip interface brief", use_genie=True) + +print() +pprint(output) +print() +``` + +#### Output from the above execution: + +``` +$ python send_command_genie.py +Password: + +{'interface': {'FastEthernet0': {'interface_is_ok': 'YES', + 'ip_address': 'unassigned', + 'method': 'unset', + 'protocol': 'down', + 'status': 'down'}, + 'FastEthernet1': {'interface_is_ok': 'YES', + 'ip_address': 'unassigned', + 'method': 'unset', + 'protocol': 'down', + 'status': 'down'}, + 'FastEthernet2': {'interface_is_ok': 'YES', + 'ip_address': 'unassigned', + 'method': 'unset', + 'protocol': 'down', + 'status': 'down'}, + 'FastEthernet3': {'interface_is_ok': 'YES', + 'ip_address': 'unassigned', + 'method': 'unset', + 'protocol': 'down', + 'status': 'down'}, + 'FastEthernet4': {'interface_is_ok': 'YES', + 'ip_address': '10.220.88.20', + 'method': 'NVRAM', + 'protocol': 'up', + 'status': 'up'}, + 'Vlan1': {'interface_is_ok': 'YES', + 'ip_address': 'unassigned', + 'method': 'unset', + 'protocol': 'down', + 'status': 'down'}}} + +``` + +
    + +## Handling commands that prompt (timing) + +```py +from netmiko import ConnectHandler +from getpass import getpass + +cisco1 = { + "device_type": "cisco_ios", + "host": "cisco1.lasthop.io", + "username": "pyclass", + "password": getpass(), +} + +command = "del flash:/test3.txt" +net_connect = ConnectHandler(**cisco1) + +# CLI Interaction is as follows: +# cisco1#delete flash:/testb.txt +# Delete filename [testb.txt]? +# Delete flash:/testb.txt? [confirm]y + +# Use 'send_command_timing' which is entirely delay based. +# strip_prompt=False and strip_command=False make the output +# easier to read in this context. +output = net_connect.send_command_timing( + command_string=command, + strip_prompt=False, + strip_command=False +) +if "Delete filename" in output: + output += net_connect.send_command_timing( + command_string="\n", + strip_prompt=False, + strip_command=False + ) +if "confirm" in output: + output += net_connect.send_command_timing( + command_string="y", + strip_prompt=False, + strip_command=False + ) +net_connect.disconnect() + +print() +print(output) +print() +``` + +#### Output from the above execution: + +``` +Password: + +del flash:/test3.txt +Delete filename [test3.txt]? +Delete flash:/test3.txt? [confirm]y +cisco1# +cisco1# + +``` + +
    + +## Handling commands that prompt (expect_string) + +```py +from netmiko import ConnectHandler +from getpass import getpass + +cisco1 = { + "device_type": "cisco_ios", + "host": "cisco1.lasthop.io", + "username": "pyclass", + "password": getpass(), +} + +command = "del flash:/test4.txt" +net_connect = ConnectHandler(**cisco1) + +# CLI Interaction is as follows: +# cisco1#delete flash:/testb.txt +# Delete filename [testb.txt]? +# Delete flash:/testb.txt? [confirm]y + +# Use 'send_command' and the 'expect_string' argument (note, expect_string uses +# RegEx patterns). Netmiko will move-on to the next command when the +# 'expect_string' is detected. + +# strip_prompt=False and strip_command=False make the output +# easier to read in this context. +output = net_connect.send_command( + command_string=command, + expect_string=r"Delete filename", + strip_prompt=False, + strip_command=False +) +output += net_connect.send_command( + command_string="\n", + expect_string=r"confirm", + strip_prompt=False, + strip_command=False +) +output += net_connect.send_command( + command_string="y", + expect_string=r"#", + strip_prompt=False, + strip_command=False +) +net_connect.disconnect() + +print() +print(output) +print() +``` + +#### Output from the above execution: + +``` +$ python send_command_prompting_expect.py +Password: + +del flash:/test4.txt +Delete filename [test4.txt]? +Delete flash:/test4.txt? [confirm]y +cisco1# + +``` + +
    + +## Configuration changes + +```py +#!/usr/bin/env python +from netmiko import ConnectHandler +from getpass import getpass + +device = { + "device_type": "cisco_ios", + "host": "cisco1.lasthop.io", + "username": "pyclass", + "password": getpass(), +} + +commands = ["logging buffered 100000"] +with ConnectHandler(**device) as net_connect: + output = net_connect.send_config_set(commands) + output += net_connect.save_config() + +print() +print(output) +print() +``` + +#### Netmiko will automatically enter and exit config mode. +#### Output from the above execution: + +``` +$ python config_change.py +Password: + +configure terminal +Enter configuration commands, one per line. End with CNTL/Z. +cisco1(config)#logging buffered 100000 +cisco1(config)#end +cisco1#write mem +Building configuration... +[OK] +cisco1# + +``` + +
    + +## Configuration changes from a file + +```py +#!/usr/bin/env python +from netmiko import ConnectHandler +from getpass import getpass + +device1 = { + "device_type": "cisco_ios", + "host": "cisco1.lasthop.io", + "username": "pyclass", + "password": getpass(), +} + +# File in same directory as script that contains +# +# $ cat config_changes.txt +# -------------- +# logging buffered 100000 +# no logging console + +cfg_file = "config_changes.txt" +with ConnectHandler(**device1) as net_connect: + output = net_connect.send_config_from_file(cfg_file) + output += net_connect.save_config() + +print() +print(output) +print() +``` + +#### Netmiko will automatically enter and exit config mode. +#### Output from the above execution: + +``` +$ python config_change_file.py +Password: + +configure terminal +Enter configuration commands, one per line. End with CNTL/Z. +cisco1(config)#logging buffered 100000 +cisco1(config)#no logging console +cisco1(config)#end +cisco1#write mem +Building configuration... +[OK] +cisco1# + +``` + +
    + +## SSH keys + +```py +from netmiko import ConnectHandler + +key_file = "~/.ssh/test_rsa" +cisco1 = { + "device_type": "cisco_ios", + "host": "cisco1.lasthop.io", + "username": "testuser", + "use_keys": True, + "key_file": key_file, +} + +with ConnectHandler(**cisco1) as net_connect: + output = net_connect.send_command("show ip arp") + +print(f"\n{output}\n") +``` + +
    + +## SSH Config File + +```py +#!/usr/bin/env python +from netmiko import ConnectHandler +from getpass import getpass + + +cisco1 = { + "device_type": "cisco_ios", + "host": "cisco1.lasthop.io", + "username": "pyclass", + "password": getpass(), + "ssh_config_file": "~/.ssh/ssh_config", +} + +with ConnectHandler(**cisco1) as net_connect: + output = net_connect.send_command("show users") + +print(output) +``` + +#### Contents of 'ssh_config' file + +``` +host jumphost + IdentitiesOnly yes + IdentityFile ~/.ssh/test_rsa + User gituser + HostName pynetqa.lasthop.io + +host * !jumphost + User pyclass + # Force usage of this SSH config file + ProxyCommand ssh -F ~/.ssh/ssh_config -W %h:%p jumphost + # Alternate solution using netcat + #ProxyCommand ssh -F ./ssh_config jumphost nc %h %p +``` + +#### Script execution + +``` +# 3.82.44.123 is the IP address of the 'jumphost' +$ python conn_ssh_proxy.py +Password: + +Line User Host(s) Idle Location +* 8 vty 0 pyclass idle 00:00:00 3.82.44.123 + + Interface User Mode Idle Peer Address + +``` + +
    + +## Session log + +```py +#!/usr/bin/env python +from netmiko import ConnectHandler +from getpass import getpass + +cisco1 = { + "device_type": "cisco_ios", + "host": "cisco1.lasthop.io", + "username": "pyclass", + "password": getpass(), + # File name to save the 'session_log' to + "session_log": "output.txt" +} + +# Show command that we execute +command = "show ip int brief" +with ConnectHandler(**cisco1) as net_connect: + output = net_connect.send_command(command) +``` + +#### Contents of 'output.txt' after execution + +``` +$ cat output.txt + +cisco1# +cisco1#terminal length 0 +cisco1#terminal width 511 +cisco1# +cisco1#show ip int brief +Interface IP-Address OK? Method Status Protocol +FastEthernet0 unassigned YES unset down down +FastEthernet1 unassigned YES unset down down +FastEthernet2 unassigned YES unset down down +FastEthernet3 unassigned YES unset down down +FastEthernet4 10.220.88.20 YES NVRAM up up +Vlan1 unassigned YES unset down down +cisco1# +cisco1#exit +``` + +
    + +## Standard Logging + +The below will create a file named "test.log". This file will contain a lot of +low-level details. + +```py +from netmiko import ConnectHandler +from getpass import getpass + +# Logging section ############## +import logging + +logging.basicConfig(filename="test.log", level=logging.DEBUG) +logger = logging.getLogger("netmiko") +# Logging section ############## + +cisco1 = { + "device_type": "cisco_ios", + "host": "cisco1.lasthop.io", + "username": "pyclass", + "password": getpass(), +} + +net_connect = ConnectHandler(**cisco1) +print(net_connect.find_prompt()) +net_connect.disconnect() +``` + +
    + +## Secure Copy + +[Additional details on Netmiko and Secure Copy](https://pynet.twb-tech.com/blog/automation/netmiko-scp.html) + +```py +from getpass import getpass +from netmiko import ConnectHandler, file_transfer + +cisco = { + "device_type": "cisco_ios", + "host": "cisco1.lasthop.io", + "username": "pyclass", + "password": getpass(), +} + +# A secure copy server must be enable on the device ('ip scp server enable') +source_file = "test1.txt" +dest_file = "test1.txt" +direction = "put" +file_system = "flash:" + +ssh_conn = ConnectHandler(**cisco) +transfer_dict = file_transfer( + ssh_conn, + source_file=source_file, + dest_file=dest_file, + file_system=file_system, + direction=direction, + # Force an overwrite of the file if it already exists + overwrite_file=True, +) + +print(transfer_dict) +``` + +
    + +## Auto detection using SSH + +```py +from netmiko import SSHDetect, ConnectHandler +from getpass import getpass + +device = { + "device_type": "autodetect", + "host": "cisco1.lasthop.io", + "username": "pyclass", + "password": getpass(), +} + +guesser = SSHDetect(**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 +# Update the 'device' dictionary with the device_type +device["device_type"] = best_match + +with ConnectHandler(**device) as connection: + print(connection.find_prompt()) +``` + +
    + +## Auto detection using SNMPv2c + +Requires 'pysnmp'. + +```py +import sys +from getpass import getpass +from netmiko.snmp_autodetect import SNMPDetect +from netmiko import ConnectHandler + +host = "cisco1.lasthop.io" +device = { + "host": host, + "username": "pyclass", + "password": getpass() +} + +snmp_community = getpass("Enter SNMP community: ") +my_snmp = SNMPDetect( + host, snmp_version="v2c", community=snmp_community +) +device_type = my_snmp.autodetect() +print(device_type) + +if device_type is None: + sys.exit("SNMP failed!") + +# Update the device dictionary with the device_type and connect +device["device_type"] = device_type +with ConnectHandler(**device) as net_connect: + print(net_connect.find_prompt()) +``` + +
    + +## Auto detection using SNMPv3 + +Requires 'pysnmp'. + +```py +import sys +from getpass import getpass +from netmiko.snmp_autodetect import SNMPDetect +from netmiko import ConnectHandler + +device = {"host": "cisco1.lasthop.io", "username": "pyclass", "password": getpass()} + +snmp_key = getpass("Enter SNMP community: ") +my_snmp = SNMPDetect( + "cisco1.lasthop.io", + snmp_version="v3", + user="pysnmp", + auth_key=snmp_key, + encrypt_key=snmp_key, + auth_proto="sha", + encrypt_proto="aes128", +) +device_type = my_snmp.autodetect() +print(device_type) + +if device_type is None: + sys.exit("SNMP failed!") + +# Update the device_type with information discovered using SNMP +device["device_type"] = device_type +net_connect = ConnectHandler(**device) +print(net_connect.find_prompt()) +net_connect.disconnect() +``` + +
    + +## Terminal server and redispatch + +```py +""" +This is a complicated example. + +It illustrates both using a terminal server and bouncing through multiple +devices. + +It also illustrates using 'redispatch()' to change the Netmiko class. + +The setup is: + +Linux Server + --> Small Switch (SSH) + --> Terminal Server (telnet) + --> Juniper SRX (serial) +""" +import os +from getpass import getpass +from netmiko import ConnectHandler, redispatch + +# Hiding these IP addresses +terminal_server_ip = os.environ["TERMINAL_SERVER_IP"] +public_ip = os.environ["PUBLIC_IP"] + +s300_pass = getpass("Enter password of s300: ") +term_serv_pass = getpass("Enter the terminal server password: ") +srx2_pass = getpass("Enter SRX2 password: ") + +# For internal reasons I have to bounce through this small switch to access +# my terminal server. +device = { + "device_type": "cisco_s300", + "host": public_ip, + "username": "admin", + "password": s300_pass, + "session_log": "output.txt", +} + +# Initial connection to the S300 switch +net_connect = ConnectHandler(**device) +print(net_connect.find_prompt()) + +# Update the password as the terminal server uses different credentials +net_connect.password = term_serv_pass +net_connect.secret = term_serv_pass +# Telnet to the terminal server +command = f"telnet {terminal_server_ip}\n" +net_connect.write_channel(command) +# Use the telnet_login() method to handle the login process +net_connect.telnet_login() +print(net_connect.find_prompt()) + +# Made it to the terminal server (this terminal server is "cisco_ios") +# Use redispatch to re-initialize the right class. +redispatch(net_connect, device_type="cisco_ios") +net_connect.enable() +print(net_connect.find_prompt()) + +# Now connect to the end-device via the terminal server (Juniper SRX2) +net_connect.write_channel("srx2\n") +# Update the credentials for SRX2 as these are different. +net_connect.username = "pyclass" +net_connect.password = srx2_pass +# Use the telnet_login() method to connect to the SRX +net_connect.telnet_login() +redispatch(net_connect, device_type="juniper_junos") +print(net_connect.find_prompt()) + +# Now we could do something on the SRX +output = net_connect.send_command("show version") +print(output) + +net_connect.disconnect() +``` + +#### Output from execution of this code (slightly cleaned-up). + +``` +$ python term_server.py +Enter password of s300: +Enter the terminal server password: +Enter SRX2 password: + +sf-dc-sw1# + +twb-dc-termsrv> +twb-dc-termsrv# + +pyclass@srx2> + +Hostname: srx2 +Model: srx110h2-va +JUNOS Software Release [] + +``` diff --git a/README.md b/README.md index 3fc64774c..ed3deb910 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ ![GitHub contributors](https://img.shields.io/github/contributors/ktbyers/netmiko.svg) [![Code Style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black) + Netmiko ======= diff --git a/examples/autodetect_snmp.py b/examples/autodetect_snmp.py new file mode 100644 index 000000000..f5263fe58 --- /dev/null +++ b/examples/autodetect_snmp.py @@ -0,0 +1,20 @@ +import sys +from getpass import getpass +from netmiko.snmp_autodetect import SNMPDetect +from netmiko import ConnectHandler + +host = "cisco1.lasthop.io" +device = {"host": host, "username": "pyclass", "password": getpass()} + +snmp_community = getpass("Enter SNMP community: ") +my_snmp = SNMPDetect(host, snmp_version="v2c", community=snmp_community) +device_type = my_snmp.autodetect() +print(device_type) + +if device_type is None: + sys.exit("SNMP failed!") + +# Update the device dictionary with the device_type and connect +device["device_type"] = device_type +with ConnectHandler(**device) as net_connect: + print(net_connect.find_prompt()) diff --git a/examples/use_cases/case8_autodetect/autodetect_snmp_v3.py b/examples/autodetect_snmp_v3.py similarity index 55% rename from examples/use_cases/case8_autodetect/autodetect_snmp_v3.py rename to examples/autodetect_snmp_v3.py index 0cd32e7ae..55dfa3524 100644 --- a/examples/use_cases/case8_autodetect/autodetect_snmp_v3.py +++ b/examples/autodetect_snmp_v3.py @@ -1,13 +1,14 @@ # SNMPv3 -from netmiko.snmp_autodetect import SNMPDetect -from netmiko import Netmiko +import sys from getpass import getpass +from netmiko.snmp_autodetect import SNMPDetect +from netmiko import ConnectHandler -device = {"host": "cisco1.twb-tech.com", "username": "pyclass", "password": getpass()} +device = {"host": "cisco1.lasthop.io", "username": "pyclass", "password": getpass()} snmp_key = getpass("Enter SNMP community: ") my_snmp = SNMPDetect( - "cisco1.twb-tech.com", + "cisco1.lasthop.io", snmp_version="v3", user="pysnmp", auth_key=snmp_key, @@ -18,6 +19,11 @@ device_type = my_snmp.autodetect() print(device_type) +if device_type is None: + sys.exit("SNMP failed!") + +# Update the device_type with information discovered using SNMP device["device_type"] = device_type -net_connect = Netmiko(**device) +net_connect = ConnectHandler(**device) print(net_connect.find_prompt()) +net_connect.disconnect() diff --git a/examples/use_cases/case8_autodetect/autodetect_ssh.py b/examples/autodetect_ssh.py similarity index 64% rename from examples/use_cases/case8_autodetect/autodetect_ssh.py rename to examples/autodetect_ssh.py index 8ab66bcf3..cd60658b8 100644 --- a/examples/use_cases/case8_autodetect/autodetect_ssh.py +++ b/examples/autodetect_ssh.py @@ -1,10 +1,10 @@ #!/usr/bin/env python -from netmiko import SSHDetect, Netmiko +from netmiko import SSHDetect, ConnectHandler from getpass import getpass device = { "device_type": "autodetect", - "host": "cisco1.twb-tech.com", + "host": "cisco1.lasthop.io", "username": "pyclass", "password": getpass(), } @@ -13,8 +13,8 @@ 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 - +# Update the 'device' dictionary with the device_type device["device_type"] = best_match -connection = Netmiko(**device) -print(connection.find_prompt()) +with ConnectHandler(**device) as connection: + print(connection.find_prompt()) diff --git a/examples/config_change.py b/examples/config_change.py new file mode 100644 index 000000000..c614a0bac --- /dev/null +++ b/examples/config_change.py @@ -0,0 +1,19 @@ +#!/usr/bin/env python +from netmiko import ConnectHandler +from getpass import getpass + +device = { + "device_type": "cisco_ios", + "host": "cisco1.lasthop.io", + "username": "pyclass", + "password": getpass(), +} + +commands = ["logging buffered 100000"] +with ConnectHandler(**device) as net_connect: + output = net_connect.send_config_set(commands) + output += net_connect.save_config() + +print() +print(output) +print() diff --git a/examples/config_change_file.py b/examples/config_change_file.py new file mode 100644 index 000000000..38d0010cf --- /dev/null +++ b/examples/config_change_file.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python +from netmiko import ConnectHandler +from getpass import getpass + +device1 = { + "device_type": "cisco_ios", + "host": "cisco1.lasthop.io", + "username": "pyclass", + "password": getpass(), +} + +# File in same directory as script that contains +# +# $ cat config_changes.txt +# -------------- +# logging buffered 100000 +# no logging console + +cfg_file = "config_changes.txt" +with ConnectHandler(**device1) as net_connect: + output = net_connect.send_config_from_file(cfg_file) + output += net_connect.save_config() + +print() +print(output) +print() diff --git a/examples/config_changes.txt b/examples/config_changes.txt new file mode 100644 index 000000000..8bbe9ba01 --- /dev/null +++ b/examples/config_changes.txt @@ -0,0 +1,2 @@ +logging buffered 100000 +no logging console diff --git a/examples/use_cases/case3_multiple_devices/conn_multiple_dev.py b/examples/conn_multiple_dev.py similarity index 70% rename from examples/use_cases/case3_multiple_devices/conn_multiple_dev.py rename to examples/conn_multiple_dev.py index 2e605ce80..926b3c9d3 100644 --- a/examples/use_cases/case3_multiple_devices/conn_multiple_dev.py +++ b/examples/conn_multiple_dev.py @@ -1,37 +1,38 @@ #!/usr/bin/env python -from netmiko import Netmiko +from netmiko import ConnectHandler from getpass import getpass password = getpass() cisco1 = { - "host": "cisco1.twb-tech.com", + "device_type": "cisco_ios", + "host": "cisco1.lasthop.io", "username": "pyclass", "password": password, - "device_type": "cisco_ios", } cisco2 = { - "host": "cisco2.twb-tech.com", + "device_type": "cisco_ios", + "host": "cisco2.lasthop.io", "username": "pyclass", "password": password, - "device_type": "cisco_ios", } nxos1 = { - "host": "nxos1.twb-tech.com", + "device_type": "cisco_nxos", + "host": "nxos1.lasthop.io", "username": "pyclass", "password": password, - "device_type": "cisco_nxos", } srx1 = { - "host": "srx1.twb-tech.com", + "device_type": "juniper_junos", + "host": "srx1.lasthop.io", "username": "pyclass", "password": password, - "device_type": "juniper_junos", } for device in (cisco1, cisco2, nxos1, srx1): - net_connect = Netmiko(**device) + net_connect = ConnectHandler(**device) print(net_connect.find_prompt()) + net_connect.disconnect() diff --git a/examples/conn_ssh_keys.py b/examples/conn_ssh_keys.py new file mode 100644 index 000000000..42e1d0816 --- /dev/null +++ b/examples/conn_ssh_keys.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python +from netmiko import ConnectHandler + +key_file = "~/.ssh/test_rsa" +cisco1 = { + "device_type": "cisco_ios", + "host": "cisco1.lasthop.io", + "username": "testuser", + "use_keys": True, + "key_file": key_file, +} + +with ConnectHandler(**cisco1) as net_connect: + output = net_connect.send_command("show ip arp") + +print(f"\n{output}\n") diff --git a/examples/conn_ssh_proxy.py b/examples/conn_ssh_proxy.py new file mode 100644 index 000000000..309334354 --- /dev/null +++ b/examples/conn_ssh_proxy.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python +from netmiko import ConnectHandler +from getpass import getpass + + +cisco1 = { + "device_type": "cisco_ios", + "host": "cisco1.lasthop.io", + "username": "pyclass", + "password": getpass(), + "ssh_config_file": "~/.ssh/ssh_config", +} + +with ConnectHandler(**cisco1) as net_connect: + output = net_connect.send_command("show users") + +print(f"\n{output}\n") diff --git a/examples/use_cases/case2_using_dict/conn_with_dict.py b/examples/conn_with_dict.py similarity index 66% rename from examples/use_cases/case2_using_dict/conn_with_dict.py rename to examples/conn_with_dict.py index ed3d46f31..d778c6060 100644 --- a/examples/use_cases/case2_using_dict/conn_with_dict.py +++ b/examples/conn_with_dict.py @@ -1,14 +1,14 @@ #!/usr/bin/env python -from netmiko import Netmiko +from netmiko import ConnectHandler from getpass import getpass cisco1 = { - "host": "cisco1.twb-tech.com", + "host": "cisco1.lasthop.io", "username": "pyclass", "password": getpass(), "device_type": "cisco_ios", } -net_connect = Netmiko(**cisco1) +net_connect = ConnectHandler(**cisco1) print(net_connect.find_prompt()) net_connect.disconnect() diff --git a/examples/conn_with_dict_cm.py b/examples/conn_with_dict_cm.py new file mode 100644 index 000000000..dcc9da0f1 --- /dev/null +++ b/examples/conn_with_dict_cm.py @@ -0,0 +1,14 @@ +#!/usr/bin/env python +from netmiko import ConnectHandler +from getpass import getpass + +cisco1 = { + "device_type": "cisco_ios", + "host": "cisco1.lasthop.io", + "username": "pyclass", + "password": getpass(), +} + +# Will automatically 'disconnect()' +with ConnectHandler(**cisco1) as net_connect: + print(net_connect.find_prompt()) diff --git a/examples/delay_factor.py b/examples/delay_factor.py new file mode 100644 index 000000000..570518363 --- /dev/null +++ b/examples/delay_factor.py @@ -0,0 +1,33 @@ +#!/usr/bin/env python +from netmiko import ConnectHandler +from getpass import getpass +from datetime import datetime + +cisco1 = { + "device_type": "cisco_ios", + "host": "cisco1.lasthop.io", + "username": "pyclass", + "password": getpass(), +} + +command = "copy flash:c880data-universalk9-mz.155-3.M8.bin flash:test1.bin" + +# Start clock +start_time = datetime.now() + +net_connect = ConnectHandler(**cisco1) + +# Netmiko normally allows 100 seconds for send_command to complete +# delay_factor=4 would allow 400 seconds. +output = net_connect.send_command_timing( + command, strip_prompt=False, strip_command=False, delay_factor=4 +) +if "Destination filename" in output: + print("Starting copy...") + output += net_connect.send_command("\n", delay_factor=4, expect_string=r"#") +net_connect.disconnect() + +end_time = datetime.now() +print(f"\n{output}\n") +print("done") +print(f"Execution time: {start_time - end_time}") diff --git a/examples/enable.py b/examples/enable.py new file mode 100644 index 000000000..a8ec0c09e --- /dev/null +++ b/examples/enable.py @@ -0,0 +1,19 @@ +#!/usr/bin/env python +from netmiko import ConnectHandler +from getpass import getpass + +password = getpass() +secret = getpass("Enter secret: ") + +cisco1 = { + "device_type": "cisco_ios", + "host": "cisco1.lasthop.io", + "username": "pyclass", + "password": password, + "secret": secret, +} + +net_connect = ConnectHandler(**cisco1) +# Call 'enable()' method to elevate privileges +net_connect.enable() +print(net_connect.find_prompt()) diff --git a/examples/global_delay_factor.py b/examples/global_delay_factor.py new file mode 100644 index 000000000..a06c2fca4 --- /dev/null +++ b/examples/global_delay_factor.py @@ -0,0 +1,19 @@ +#!/usr/bin/env python +from netmiko import ConnectHandler +from getpass import getpass + +cisco1 = { + "device_type": "cisco_ios", + "host": "cisco1.lasthop.io", + "username": "pyclass", + "password": getpass(), + # Multiple all of the delays by a factor of two + "global_delay_factor": 2, +} + +command = "show ip arp" +net_connect = ConnectHandler(**cisco1) +output = net_connect.send_command(command) +net_connect.disconnect() + +print(f"\n{output}\n") diff --git a/examples/invalid_device_type.py b/examples/invalid_device_type.py new file mode 100644 index 000000000..7a2d05478 --- /dev/null +++ b/examples/invalid_device_type.py @@ -0,0 +1,13 @@ +#!/usr/bin/env python +from netmiko import ConnectHandler + +cisco1 = { + # Just pick an 'invalid' device_type + "device_type": "invalid", + "host": "cisco1.lasthop.io", + "username": "pyclass", + "password": "invalid", +} + +net_connect = ConnectHandler(**cisco1) +net_connect.disconnect() diff --git a/examples/use_cases/case11_logging/conn_with_logging.py b/examples/netmiko_logging.py similarity index 65% rename from examples/use_cases/case11_logging/conn_with_logging.py rename to examples/netmiko_logging.py index f34b599b7..1e80efbd8 100644 --- a/examples/use_cases/case11_logging/conn_with_logging.py +++ b/examples/netmiko_logging.py @@ -1,19 +1,21 @@ #!/usr/bin/env python -from netmiko import Netmiko +from netmiko import ConnectHandler from getpass import getpass +# Logging section ############## import logging logging.basicConfig(filename="test.log", level=logging.DEBUG) logger = logging.getLogger("netmiko") +# Logging section ############## cisco1 = { - "host": "cisco1.twb-tech.com", + "device_type": "cisco_ios", + "host": "cisco1.lasthop.io", "username": "pyclass", "password": getpass(), - "device_type": "cisco_ios", } -net_connect = Netmiko(**cisco1) +net_connect = ConnectHandler(**cisco1) print(net_connect.find_prompt()) net_connect.disconnect() diff --git a/examples/use_cases/case14_secure_copy/secure_copy.py b/examples/secure_copy.py similarity index 80% rename from examples/use_cases/case14_secure_copy/secure_copy.py rename to examples/secure_copy.py index 7ce61bccf..181c2cb7c 100644 --- a/examples/use_cases/case14_secure_copy/secure_copy.py +++ b/examples/secure_copy.py @@ -2,13 +2,11 @@ from getpass import getpass from netmiko import ConnectHandler, file_transfer -password = getpass() - cisco = { "device_type": "cisco_ios", - "host": "cisco1.twb-tech.com", + "host": "cisco1.lasthop.io", "username": "pyclass", - "password": password, + "password": getpass(), } source_file = "test1.txt" @@ -23,6 +21,7 @@ dest_file=dest_file, file_system=file_system, direction=direction, + # Force an overwrite of the file if it already exists overwrite_file=True, ) diff --git a/examples/send_command.py b/examples/send_command.py new file mode 100644 index 000000000..03a2c8a47 --- /dev/null +++ b/examples/send_command.py @@ -0,0 +1,20 @@ +#!/usr/bin/env python +from netmiko import ConnectHandler +from getpass import getpass + +cisco1 = { + "device_type": "cisco_ios", + "host": "cisco1.lasthop.io", + "username": "pyclass", + "password": getpass(), +} + +# Show command that we execute +command = "show ip int brief" +with ConnectHandler(**cisco1) as net_connect: + output = net_connect.send_command(command) + +# Automatically cleans-up the output so that only the show output is returned +print() +print(output) +print() diff --git a/examples/send_command_genie.py b/examples/send_command_genie.py new file mode 100644 index 000000000..3e5e89115 --- /dev/null +++ b/examples/send_command_genie.py @@ -0,0 +1,18 @@ +#!/usr/bin/env python +from getpass import getpass +from pprint import pprint +from netmiko import ConnectHandler + +device = { + "device_type": "cisco_ios", + "host": "cisco1.lasthop.io", + "username": "pyclass", + "password": getpass(), +} + +with ConnectHandler(**device) as net_connect: + output = net_connect.send_command("show ip interface brief", use_genie=True) + +print() +pprint(output) +print() diff --git a/examples/send_command_prompting.py b/examples/send_command_prompting.py new file mode 100644 index 000000000..9d98742b3 --- /dev/null +++ b/examples/send_command_prompting.py @@ -0,0 +1,38 @@ +#!/usr/bin/env python +from netmiko import ConnectHandler +from getpass import getpass + +cisco1 = { + "device_type": "cisco_ios", + "host": "cisco1.lasthop.io", + "username": "pyclass", + "password": getpass(), +} + +command = "del flash:/test3.txt" +net_connect = ConnectHandler(**cisco1) + +# CLI Interaction is as follows: +# cisco1#delete flash:/testb.txt +# Delete filename [testb.txt]? +# Delete flash:/testb.txt? [confirm]y + +# Use 'send_command_timing' which is entirely delay based. +# strip_prompt=False and strip_command=False make the output +# easier to read in this context. +output = net_connect.send_command_timing( + command_string=command, strip_prompt=False, strip_command=False +) +if "Delete filename" in output: + output += net_connect.send_command_timing( + command_string="\n", strip_prompt=False, strip_command=False + ) +if "confirm" in output: + output += net_connect.send_command_timing( + command_string="y", strip_prompt=False, strip_command=False + ) +net_connect.disconnect() + +print() +print(output) +print() diff --git a/examples/send_command_prompting_expect.py b/examples/send_command_prompting_expect.py new file mode 100644 index 000000000..f189621b2 --- /dev/null +++ b/examples/send_command_prompting_expect.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python +from netmiko import ConnectHandler +from getpass import getpass + +cisco1 = { + "device_type": "cisco_ios", + "host": "cisco1.lasthop.io", + "username": "pyclass", + "password": getpass(), +} + +command = "del flash:/test4.txt" +net_connect = ConnectHandler(**cisco1) + +# CLI Interaction is as follows: +# cisco1#delete flash:/testb.txt +# Delete filename [testb.txt]? +# Delete flash:/testb.txt? [confirm]y + +# Use 'send_command' and the 'expect_string' argument (note, expect_string uses +# RegEx patterns). Netmiko will move-on to the next command when the +# 'expect_string' is detected. + +# strip_prompt=False and strip_command=False make the output +# easier to read in this context. +output = net_connect.send_command( + command_string=command, + expect_string=r"Delete filename", + strip_prompt=False, + strip_command=False, +) +output += net_connect.send_command( + command_string="\n", + expect_string=r"confirm", + strip_prompt=False, + strip_command=False, +) +output += net_connect.send_command( + command_string="y", expect_string=r"#", strip_prompt=False, strip_command=False +) +net_connect.disconnect() + +print() +print(output) +print() diff --git a/examples/send_command_textfsm.py b/examples/send_command_textfsm.py new file mode 100644 index 000000000..da2bcaa2d --- /dev/null +++ b/examples/send_command_textfsm.py @@ -0,0 +1,20 @@ +#!/usr/bin/env python +from netmiko import ConnectHandler +from getpass import getpass +from pprint import pprint + +cisco1 = { + "device_type": "cisco_ios", + "host": "cisco1.lasthop.io", + "username": "pyclass", + "password": getpass(), +} + +command = "show ip int brief" +with ConnectHandler(**cisco1) as net_connect: + # Use TextFSM to retrieve structured data + output = net_connect.send_command(command, use_textfsm=True) + +print() +pprint(output) +print() diff --git a/examples/session_log.py b/examples/session_log.py new file mode 100644 index 000000000..39df5786c --- /dev/null +++ b/examples/session_log.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python +from netmiko import ConnectHandler +from getpass import getpass + +cisco1 = { + "device_type": "cisco_ios", + "host": "cisco1.lasthop.io", + "username": "pyclass", + "password": getpass(), + "session_log": "output.txt", +} + +# Show command that we execute +command = "show ip int brief" +with ConnectHandler(**cisco1) as net_connect: + output = net_connect.send_command(command) diff --git a/examples/use_cases/case1_simple_conn/simple_conn.py b/examples/simple_conn.py similarity index 100% rename from examples/use_cases/case1_simple_conn/simple_conn.py rename to examples/simple_conn.py diff --git a/examples/ssh_config b/examples/ssh_config new file mode 100644 index 000000000..deb818fd3 --- /dev/null +++ b/examples/ssh_config @@ -0,0 +1,12 @@ +host jumphost + IdentitiesOnly yes + IdentityFile ~/.ssh/test_rsa + User gituser + HostName pynetqa.lasthop.io + +host * !jumphost + User pyclass + # Force usage of this SSH config file + ProxyCommand ssh -F ~/.ssh/ssh_config -W %h:%p jumphost + # Alternate solution using netcat + #ProxyCommand ssh -F ./ssh_config jumphost nc %h %p diff --git a/examples/term_server.py b/examples/term_server.py new file mode 100644 index 000000000..c825104bb --- /dev/null +++ b/examples/term_server.py @@ -0,0 +1,68 @@ +#!/usr/bin/env python +""" +This is a complicated example, but it illustrates both using a terminal server +and bouncing through multiple devices. + +It also illustrates using 'redispatch()' to dynamically switch the Netmiko class + +The setup here is: + +Linux Server --(ssh)--> Small Switch --(telnet)--> Terminal Server --(serial)--> Juniper SRX +""" +import os +from getpass import getpass +from netmiko import ConnectHandler, redispatch + +# Hiding these IP addresses +terminal_server_ip = os.environ["TERMINAL_SERVER_IP"] +public_ip = os.environ["PUBLIC_IP"] + +s300_pass = getpass("Enter password of s300: ") +term_serv_pass = getpass("Enter the terminal server password: ") +srx2_pass = getpass("Enter SRX2 password: ") + +# For internal reasons I have to bounce through this small switch to access +# my terminal server. +device = { + "device_type": "cisco_s300", + "host": public_ip, + "username": "admin", + "password": s300_pass, + "session_log": "output.txt", +} + +# Initial connection to the S300 switch +net_connect = ConnectHandler(**device) +print(net_connect.find_prompt()) + +# Update the password as the terminal server uses different credentials +net_connect.password = term_serv_pass +net_connect.secret = term_serv_pass +# Telnet to the terminal server +command = f"telnet {terminal_server_ip}\n" +net_connect.write_channel(command) +# Use the telnet_login() method to handle the login process +net_connect.telnet_login() +print(net_connect.find_prompt()) + +# Made it to the terminal server (this terminal server is "cisco_ios") +# Use redispatch to re-initialize the right class. +redispatch(net_connect, device_type="cisco_ios") +net_connect.enable() +print(net_connect.find_prompt()) + +# Now connect to the end-device via the terminal server (Juniper SRX2) +net_connect.write_channel("srx2\n") +# Update the credentials for SRX2 as these are different. +net_connect.username = "pyclass" +net_connect.password = srx2_pass +# Use the telnet_login() method to connect to the SRX +net_connect.telnet_login() +redispatch(net_connect, device_type="juniper_junos") +print(net_connect.find_prompt()) + +# Now we could do something on the SRX +output = net_connect.send_command("show version") +print(output) + +net_connect.disconnect() diff --git a/examples/use_cases/case11_logging/test.log b/examples/test.log similarity index 72% rename from examples/use_cases/case11_logging/test.log rename to examples/test.log index f27e55345..68843deb7 100644 --- a/examples/use_cases/case11_logging/test.log +++ b/examples/test.log @@ -1,8 +1,8 @@ -DEBUG:paramiko.transport:starting thread (client mode): 0xb63946ec -DEBUG:paramiko.transport:Local version/idstring: SSH-2.0-paramiko_2.4.1 +DEBUG:paramiko.transport:starting thread (client mode): 0x14f3a470 +DEBUG:paramiko.transport:Local version/idstring: SSH-2.0-paramiko_2.7.1 DEBUG:paramiko.transport:Remote version/idstring: SSH-2.0-Cisco-1.25 INFO:paramiko.transport:Connected (version 2.0, client Cisco-1.25) -DEBUG:paramiko.transport:kex algos:['diffie-hellman-group-exchange-sha1', 'diffie-hellman-group14-sha1', 'diffie-hellman-group1-sha1'] server key:['ssh-rsa'] client encrypt:['aes128-ctr', 'aes192-ctr', 'aes256-ctr', 'aes128-cbc', '3des-cbc', 'aes192-cbc', 'aes256-cbc'] server encrypt:['aes128-ctr', 'aes192-ctr', 'aes256-ctr', 'aes128-cbc', '3des-cbc', 'aes192-cbc', 'aes256-cbc'] client mac:['hmac-sha1', 'hmac-sha1-96', 'hmac-md5', 'hmac-md5-96'] server mac:['hmac-sha1', 'hmac-sha1-96', 'hmac-md5', 'hmac-md5-96'] client compress:['none'] server compress:['none'] client lang:[''] server lang:[''] kex follows?False +DEBUG:paramiko.transport:kex algos:['diffie-hellman-group-exchange-sha1', 'diffie-hellman-group14-sha1', 'diffie-hellman-group1-sha1'] server key:['ssh-rsa'] client encrypt:['aes128-ctr', 'aes192-ctr', 'aes256-ctr', 'aes128-cbc', '3des-cbc', 'aes192-cbc', 'aes256-cbc'] server encrypt:['aes128-ctr', 'aes192-ctr', 'aes256-ctr', 'aes128-cbc', '3des-cbc', 'aes192-cbc', 'aes256-cbc'] client mac:['hmac-sha1', 'hmac-sha1-96'] server mac:['hmac-sha1', 'hmac-sha1-96'] client compress:['none'] server compress:['none'] client lang:[''] server lang:[''] kex follows?False DEBUG:paramiko.transport:Kex agreed: diffie-hellman-group-exchange-sha1 DEBUG:paramiko.transport:HostKey agreed: ssh-rsa DEBUG:paramiko.transport:Cipher agreed: aes128-ctr @@ -11,7 +11,7 @@ DEBUG:paramiko.transport:Compression agreed: none DEBUG:paramiko.transport:Got server p (2048 bits) DEBUG:paramiko.transport:kex engine KexGex specified hash_algo DEBUG:paramiko.transport:Switch to new keys ... -DEBUG:paramiko.transport:Adding ssh-rsa host key for cisco1.twb-tech.com: b'c77967d9e78b5c6d9acaaa55cc7ad897' +DEBUG:paramiko.transport:Adding ssh-rsa host key for cisco1.lasthop.io: b'539a8d09e0dab9e8f7ef2b61ba1d5805' DEBUG:paramiko.transport:userauth is OK INFO:paramiko.transport:Authentication (password) successful! DEBUG:paramiko.transport:[chan 0] Max packet in: 32768 bytes @@ -20,45 +20,46 @@ DEBUG:paramiko.transport:Secsh channel 0 opened. DEBUG:paramiko.transport:[chan 0] Sesch channel 0 request ok DEBUG:paramiko.transport:[chan 0] Sesch channel 0 request ok DEBUG:netmiko:read_channel: -pynet-rtr1# +cisco1# DEBUG:netmiko:read_channel: DEBUG:netmiko:read_channel: DEBUG:netmiko:read_channel: DEBUG:netmiko:write_channel: b'\n' DEBUG:netmiko:read_channel: -pynet-rtr1# +cisco1# DEBUG:netmiko:read_channel: +DEBUG:netmiko:[find_prompt()]: prompt is cisco1# DEBUG:netmiko:read_channel: DEBUG:netmiko:In disable_paging DEBUG:netmiko:Command: terminal length 0 DEBUG:netmiko:write_channel: b'terminal length 0\n' -DEBUG:netmiko:Pattern is: pynet\-rtr1 -DEBUG:netmiko:_read_channel_expect read_data: ter -DEBUG:netmiko:_read_channel_expect read_data: minal length 0 -pynet-rtr1# -DEBUG:netmiko:Pattern found: pynet\-rtr1 terminal length 0 -pynet-rtr1# +DEBUG:netmiko:Pattern is: terminal\ length\ 0 +DEBUG:netmiko:_read_channel_expect read_data: t +DEBUG:netmiko:_read_channel_expect read_data: erminal length 0 +cisco1# +DEBUG:netmiko:Pattern found: terminal\ length\ 0 terminal length 0 +cisco1# DEBUG:netmiko:terminal length 0 -pynet-rtr1# +cisco1# DEBUG:netmiko:Exiting disable_paging DEBUG:netmiko:write_channel: b'terminal width 511\n' -DEBUG:netmiko:Pattern is: pynet\-rtr1 +DEBUG:netmiko:Pattern is: terminal\ width\ 511 DEBUG:netmiko:_read_channel_expect read_data: t DEBUG:netmiko:_read_channel_expect read_data: erminal width 511 -pynet-rtr1# -DEBUG:netmiko:Pattern found: pynet\-rtr1 terminal width 511 -pynet-rtr1# +cisco1# +DEBUG:netmiko:Pattern found: terminal\ width\ 511 terminal width 511 +cisco1# DEBUG:netmiko:read_channel: DEBUG:netmiko:read_channel: DEBUG:netmiko:write_channel: b'\n' DEBUG:netmiko:read_channel: -pynet-rtr1# +cisco1# DEBUG:netmiko:read_channel: +DEBUG:netmiko:[find_prompt()]: prompt is cisco1# DEBUG:netmiko:write_channel: b'\n' DEBUG:netmiko:read_channel: -pynet-rtr1# +cisco1# DEBUG:netmiko:read_channel: DEBUG:netmiko:read_channel: -DEBUG:netmiko:exit_config_mode: DEBUG:netmiko:write_channel: b'exit\n' diff --git a/examples/use_cases/case14_secure_copy/test1.txt b/examples/test1.txt similarity index 100% rename from examples/use_cases/case14_secure_copy/test1.txt rename to examples/test1.txt diff --git a/examples/use_cases/case10_ssh_proxy/conn_ssh_proxy.py b/examples/use_cases/case10_ssh_proxy/conn_ssh_proxy.py deleted file mode 100644 index 21e2d3f9c..000000000 --- a/examples/use_cases/case10_ssh_proxy/conn_ssh_proxy.py +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env python -from netmiko import Netmiko -from getpass import getpass - -key_file = "/home/gituser/.ssh/test_rsa" - -cisco1 = { - "device_type": "cisco_ios", - "host": "cisco1.twb-tech.com", - "username": "testuser", - "use_keys": True, - "key_file": key_file, - "ssh_config_file": "./ssh_config", -} - -net_connect = Netmiko(**cisco1) -print(net_connect.find_prompt()) -output = net_connect.send_command("show ip arp") -print(output) diff --git a/examples/use_cases/case10_ssh_proxy/ssh_config b/examples/use_cases/case10_ssh_proxy/ssh_config deleted file mode 100644 index ddf95d531..000000000 --- a/examples/use_cases/case10_ssh_proxy/ssh_config +++ /dev/null @@ -1,7 +0,0 @@ -host jumphost - IdentityFile ~/.ssh/test_rsa - user gituser - hostname 10.10.10.159 - -host * !jumphost - ProxyCommand ssh jumphost nc %h %p diff --git a/examples/use_cases/case13_term_server/term_server.py b/examples/use_cases/case13_term_server/term_server.py deleted file mode 100644 index 8da67da04..000000000 --- a/examples/use_cases/case13_term_server/term_server.py +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/env python -import time -from netmiko import ConnectHandler, redispatch - -net_connect = ConnectHandler( - device_type="terminal_server", - ip="10.10.10.10", - username="admin", - password="admin123", - secret="secret123", -) - -# Manually handle interaction in the Terminal Server (fictional example, but -# hopefully you see the pattern) -net_connect.write_channel("\r\n") -time.sleep(1) -net_connect.write_channel("\r\n") -time.sleep(1) -output = net_connect.read_channel() -# Should hopefully see the terminal server prompt -print(output) - -# Login to end device from terminal server -net_connect.write_channel("connect 1\r\n") -time.sleep(1) - -# Manually handle the Username and Password -max_loops = 10 -i = 1 -while i <= max_loops: - output = net_connect.read_channel() - - if "Username" in output: - net_connect.write_channel(net_connect.username + "\r\n") - time.sleep(1) - output = net_connect.read_channel() - - # Search for password pattern / send password - if "Password" in output: - net_connect.write_channel(net_connect.password + "\r\n") - time.sleep(0.5) - output = net_connect.read_channel() - # Did we successfully login - if ">" in output or "#" in output: - break - - net_connect.write_channel("\r\n") - time.sleep(0.5) - i += 1 - -# We are now logged into the end device -# Dynamically reset the class back to the proper Netmiko class -redispatch(net_connect, device_type="cisco_ios") - -# Now just do your normal Netmiko operations -new_output = net_connect.send_command("show ip int brief") diff --git a/examples/use_cases/case18_structured_data_genie/genie_show_ip_route_ios.py b/examples/use_cases/case18_structured_data_genie/genie_show_ip_route_ios.py deleted file mode 100644 index fcdd22210..000000000 --- a/examples/use_cases/case18_structured_data_genie/genie_show_ip_route_ios.py +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env python -from getpass import getpass -from pprint import pprint -from netmiko import ConnectHandler - -PASSWORD = getpass() - - -def main(): - conn = ConnectHandler( - host="cisco1.lasthop.io", - device_type="cisco_xe", - username="username", - password=PASSWORD, - ) - output = conn.send_command("show ip route", use_genie=True) - pprint(output) - - -if __name__ == "__main__": - main() diff --git a/examples/use_cases/case2_using_dict/enable.py b/examples/use_cases/case2_using_dict/enable.py deleted file mode 100644 index 498e6cd08..000000000 --- a/examples/use_cases/case2_using_dict/enable.py +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env python -from netmiko import Netmiko -from getpass import getpass - -password = getpass() - -cisco1 = { - "host": "cisco1.twb-tech.com", - "username": "pyclass", - "password": password, - "device_type": "cisco_ios", - "secret": password, -} - -net_connect = Netmiko(**cisco1) -print(net_connect.find_prompt()) -net_connect.send_command_timing("disable") -print(net_connect.find_prompt()) -net_connect.enable() -print(net_connect.find_prompt()) - -# Go into config mode -net_connect.config_mode() -print(net_connect.find_prompt()) -net_connect.exit_config_mode() -print(net_connect.find_prompt()) -net_connect.disconnect() diff --git a/examples/use_cases/case2_using_dict/invalid_device_type.py b/examples/use_cases/case2_using_dict/invalid_device_type.py deleted file mode 100644 index 1471cfe96..000000000 --- a/examples/use_cases/case2_using_dict/invalid_device_type.py +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env python -from netmiko import Netmiko -from getpass import getpass - -cisco1 = { - "host": "cisco1.twb-tech.com", - "username": "pyclass", - "password": getpass(), - "device_type": "whatever", -} - -net_connect = Netmiko(**cisco1) -print(net_connect.find_prompt()) -net_connect.disconnect() diff --git a/examples/use_cases/case4_show_commands/send_command.py b/examples/use_cases/case4_show_commands/send_command.py deleted file mode 100644 index 1c49b4d84..000000000 --- a/examples/use_cases/case4_show_commands/send_command.py +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env python -from netmiko import Netmiko -from getpass import getpass - -cisco1 = { - "host": "cisco1.twb-tech.com", - "username": "pyclass", - "password": getpass(), - "device_type": "cisco_ios", -} - -net_connect = Netmiko(**cisco1) -command = "show ip int brief" - -print() -print(net_connect.find_prompt()) -output = net_connect.send_command(command) -net_connect.disconnect() -print(output) -print() diff --git a/examples/use_cases/case4_show_commands/send_command_delay.py b/examples/use_cases/case4_show_commands/send_command_delay.py deleted file mode 100644 index c80744ba5..000000000 --- a/examples/use_cases/case4_show_commands/send_command_delay.py +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env python -from netmiko import Netmiko -from getpass import getpass - -cisco1 = { - "host": "cisco1.twb-tech.com", - "username": "pyclass", - "password": getpass(), - "device_type": "cisco_ios", -} - -net_connect = Netmiko(**cisco1) -command = "copy flash:c880data-universalk9-mz.154-2.T1.bin flash:test1.bin" - -print() -print(net_connect.find_prompt()) -output = net_connect.send_command(command, delay_factor=4) -print(output) -print() diff --git a/examples/use_cases/case4_show_commands/send_command_expect.py b/examples/use_cases/case4_show_commands/send_command_expect.py deleted file mode 100644 index ba73303b4..000000000 --- a/examples/use_cases/case4_show_commands/send_command_expect.py +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env python -from netmiko import Netmiko -from getpass import getpass - -cisco1 = { - "host": "cisco1.twb-tech.com", - "username": "pyclass", - "password": getpass(), - "device_type": "cisco_ios", -} - -net_connect = Netmiko(**cisco1) -command = "show ip int brief" - -print() -print(net_connect.find_prompt()) -output = net_connect.send_command(command, expect_string=r"#") -net_connect.disconnect() -print(output) -print() diff --git a/examples/use_cases/case4_show_commands/send_command_textfsm.py b/examples/use_cases/case4_show_commands/send_command_textfsm.py deleted file mode 100644 index fadd0b494..000000000 --- a/examples/use_cases/case4_show_commands/send_command_textfsm.py +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env python -from netmiko import Netmiko -from getpass import getpass - -cisco1 = { - "host": "cisco1.twb-tech.com", - "username": "pyclass", - "password": getpass(), - "device_type": "cisco_ios", -} - -net_connect = Netmiko(**cisco1) -command = "show ip int brief" - -print() -print(net_connect.find_prompt()) -output = net_connect.send_command(command, use_textfsm=True) -net_connect.disconnect() -print(output) -print() diff --git a/examples/use_cases/case5_prompting/send_command_prompting.py b/examples/use_cases/case5_prompting/send_command_prompting.py deleted file mode 100644 index 54284df91..000000000 --- a/examples/use_cases/case5_prompting/send_command_prompting.py +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env python -from netmiko import Netmiko -from getpass import getpass - -cisco1 = { - "host": "cisco1.twb-tech.com", - "username": "pyclass", - "password": getpass(), - "device_type": "cisco_ios", -} - -net_connect = Netmiko(**cisco1) -command = "del flash:/test1.txt" -print() -print(net_connect.find_prompt()) -output = net_connect.send_command_timing(command) -if "confirm" in output: - output += net_connect.send_command_timing( - "y", strip_prompt=False, strip_command=False - ) -net_connect.disconnect() -print(output) -print() diff --git a/examples/use_cases/case6_config_change/config_change.py b/examples/use_cases/case6_config_change/config_change.py deleted file mode 100644 index 419f0f172..000000000 --- a/examples/use_cases/case6_config_change/config_change.py +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env python -from netmiko import Netmiko -from getpass import getpass - -nxos1 = { - "host": "nxos1.twb-tech.com", - "username": "pyclass", - "password": getpass(), - "device_type": "cisco_nxos", -} - -commands = ["logging history size 500"] - -net_connect = Netmiko(**nxos1) - -print() -print(net_connect.find_prompt()) -output = net_connect.send_config_set(commands) -output += net_connect.send_command("copy run start") -print(output) -print() diff --git a/examples/use_cases/case6_config_change/config_change_file.py b/examples/use_cases/case6_config_change/config_change_file.py deleted file mode 100644 index 23189dd11..000000000 --- a/examples/use_cases/case6_config_change/config_change_file.py +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env python -from netmiko import Netmiko -from getpass import getpass - -nxos1 = { - "host": "nxos1.twb-tech.com", - "username": "pyclass", - "password": getpass(), - "device_type": "cisco_nxos", -} - -cfg_file = "config_changes.txt" -net_connect = Netmiko(**nxos1) - -print() -print(net_connect.find_prompt()) -output = net_connect.send_config_from_file(cfg_file) -print(output) -print() - -net_connect.save_config() -net_connect.disconnect() diff --git a/examples/use_cases/case6_config_change/config_changes.txt b/examples/use_cases/case6_config_change/config_changes.txt deleted file mode 100644 index 35d43ba89..000000000 --- a/examples/use_cases/case6_config_change/config_changes.txt +++ /dev/null @@ -1,6 +0,0 @@ -vlan 100 - name blue100 -vlan 101 - name blue101 -vlan 102 - name blue102 diff --git a/examples/use_cases/case8_autodetect/autodetect_snmp.py b/examples/use_cases/case8_autodetect/autodetect_snmp.py deleted file mode 100644 index 11a49a16f..000000000 --- a/examples/use_cases/case8_autodetect/autodetect_snmp.py +++ /dev/null @@ -1,16 +0,0 @@ -from netmiko.snmp_autodetect import SNMPDetect -from netmiko import Netmiko -from getpass import getpass - -device = {"host": "cisco1.twb-tech.com", "username": "pyclass", "password": getpass()} - -snmp_community = getpass("Enter SNMP community: ") -my_snmp = SNMPDetect( - "cisco1.twb-tech.com", snmp_version="v2c", community=snmp_community -) -device_type = my_snmp.autodetect() -print(device_type) - -device["device_type"] = device_type -net_connect = Netmiko(**device) -print(net_connect.find_prompt()) diff --git a/examples/use_cases/case9_ssh_keys/conn_ssh_keys.py b/examples/use_cases/case9_ssh_keys/conn_ssh_keys.py deleted file mode 100644 index fe2e7a149..000000000 --- a/examples/use_cases/case9_ssh_keys/conn_ssh_keys.py +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env python -from netmiko import Netmiko -from getpass import getpass - -key_file = "/home/gituser/.ssh/test_rsa" - -cisco1 = { - "device_type": "cisco_ios", - "host": "cisco1.twb-tech.com", - "username": "testuser", - "use_keys": True, - "key_file": key_file, -} - -net_connect = Netmiko(**cisco1) -print(net_connect.find_prompt()) -output = net_connect.send_command("show ip arp") -print(output) diff --git a/examples/adding_delay/add_delay.py b/examples_old/adding_delay/add_delay.py similarity index 100% rename from examples/adding_delay/add_delay.py rename to examples_old/adding_delay/add_delay.py diff --git a/examples/asa_upgrade.py b/examples_old/asa_upgrade.py similarity index 100% rename from examples/asa_upgrade.py rename to examples_old/asa_upgrade.py diff --git a/examples/configuration_changes/change_file.txt b/examples_old/configuration_changes/change_file.txt similarity index 100% rename from examples/configuration_changes/change_file.txt rename to examples_old/configuration_changes/change_file.txt diff --git a/examples/configuration_changes/config_changes.py b/examples_old/configuration_changes/config_changes.py similarity index 100% rename from examples/configuration_changes/config_changes.py rename to examples_old/configuration_changes/config_changes.py diff --git a/examples/configuration_changes/config_changes_from_file.py b/examples_old/configuration_changes/config_changes_from_file.py similarity index 100% rename from examples/configuration_changes/config_changes_from_file.py rename to examples_old/configuration_changes/config_changes_from_file.py diff --git a/examples/configuration_changes/config_changes_to_device_list.py b/examples_old/configuration_changes/config_changes_to_device_list.py similarity index 100% rename from examples/configuration_changes/config_changes_to_device_list.py rename to examples_old/configuration_changes/config_changes_to_device_list.py diff --git a/examples/connect_multiple_devices/connect_multiple.py b/examples_old/connect_multiple_devices/connect_multiple.py similarity index 100% rename from examples/connect_multiple_devices/connect_multiple.py rename to examples_old/connect_multiple_devices/connect_multiple.py diff --git a/examples/enable/enable.py b/examples_old/enable/enable.py similarity index 100% rename from examples/enable/enable.py rename to examples_old/enable/enable.py diff --git a/examples/handle_prompts/handle_prompts.py b/examples_old/handle_prompts/handle_prompts.py similarity index 100% rename from examples/handle_prompts/handle_prompts.py rename to examples_old/handle_prompts/handle_prompts.py diff --git a/examples/show_command/show_command.py b/examples_old/show_command/show_command.py similarity index 100% rename from examples/show_command/show_command.py rename to examples_old/show_command/show_command.py diff --git a/examples/show_command/show_command_textfsm.py b/examples_old/show_command/show_command_textfsm.py similarity index 100% rename from examples/show_command/show_command_textfsm.py rename to examples_old/show_command/show_command_textfsm.py diff --git a/examples/simple_connection/simple_conn.py b/examples_old/simple_connection/simple_conn.py similarity index 100% rename from examples/simple_connection/simple_conn.py rename to examples_old/simple_connection/simple_conn.py diff --git a/examples/simple_connection/simple_conn_dict.py b/examples_old/simple_connection/simple_conn_dict.py similarity index 100% rename from examples/simple_connection/simple_conn_dict.py rename to examples_old/simple_connection/simple_conn_dict.py diff --git a/examples/troubleshooting/enable_logging.py b/examples_old/troubleshooting/enable_logging.py similarity index 100% rename from examples/troubleshooting/enable_logging.py rename to examples_old/troubleshooting/enable_logging.py diff --git a/examples/use_cases/case12_telnet/conn_telnet.py b/examples_old/use_cases/case12_telnet/conn_telnet.py similarity index 100% rename from examples/use_cases/case12_telnet/conn_telnet.py rename to examples_old/use_cases/case12_telnet/conn_telnet.py diff --git a/examples/use_cases/case15_netmiko_tools/.netmiko.yml_example b/examples_old/use_cases/case15_netmiko_tools/.netmiko.yml_example similarity index 100% rename from examples/use_cases/case15_netmiko_tools/.netmiko.yml_example rename to examples_old/use_cases/case15_netmiko_tools/.netmiko.yml_example diff --git a/examples/use_cases/case15_netmiko_tools/vlans.txt b/examples_old/use_cases/case15_netmiko_tools/vlans.txt similarity index 100% rename from examples/use_cases/case15_netmiko_tools/vlans.txt rename to examples_old/use_cases/case15_netmiko_tools/vlans.txt diff --git a/examples/use_cases/case16_concurrency/my_devices.py b/examples_old/use_cases/case16_concurrency/my_devices.py similarity index 100% rename from examples/use_cases/case16_concurrency/my_devices.py rename to examples_old/use_cases/case16_concurrency/my_devices.py diff --git a/examples/use_cases/case16_concurrency/processes_netmiko.py b/examples_old/use_cases/case16_concurrency/processes_netmiko.py similarity index 100% rename from examples/use_cases/case16_concurrency/processes_netmiko.py rename to examples_old/use_cases/case16_concurrency/processes_netmiko.py diff --git a/examples/use_cases/case16_concurrency/processes_netmiko_queue.py b/examples_old/use_cases/case16_concurrency/processes_netmiko_queue.py similarity index 100% rename from examples/use_cases/case16_concurrency/processes_netmiko_queue.py rename to examples_old/use_cases/case16_concurrency/processes_netmiko_queue.py diff --git a/examples/use_cases/case16_concurrency/threads_netmiko.py b/examples_old/use_cases/case16_concurrency/threads_netmiko.py similarity index 100% rename from examples/use_cases/case16_concurrency/threads_netmiko.py rename to examples_old/use_cases/case16_concurrency/threads_netmiko.py diff --git a/examples/use_cases/case17_jinja2/jinja2_crypto.py b/examples_old/use_cases/case17_jinja2/jinja2_crypto.py similarity index 100% rename from examples/use_cases/case17_jinja2/jinja2_crypto.py rename to examples_old/use_cases/case17_jinja2/jinja2_crypto.py diff --git a/examples/use_cases/case17_jinja2/jinja2_for_loop.py b/examples_old/use_cases/case17_jinja2/jinja2_for_loop.py similarity index 100% rename from examples/use_cases/case17_jinja2/jinja2_for_loop.py rename to examples_old/use_cases/case17_jinja2/jinja2_for_loop.py diff --git a/examples/use_cases/case17_jinja2/jinja2_ospf_file.py b/examples_old/use_cases/case17_jinja2/jinja2_ospf_file.py similarity index 100% rename from examples/use_cases/case17_jinja2/jinja2_ospf_file.py rename to examples_old/use_cases/case17_jinja2/jinja2_ospf_file.py diff --git a/examples/use_cases/case17_jinja2/jinja2_vlans.py b/examples_old/use_cases/case17_jinja2/jinja2_vlans.py similarity index 100% rename from examples/use_cases/case17_jinja2/jinja2_vlans.py rename to examples_old/use_cases/case17_jinja2/jinja2_vlans.py diff --git a/examples/use_cases/case17_jinja2/ospf_config.j2 b/examples_old/use_cases/case17_jinja2/ospf_config.j2 similarity index 100% rename from examples/use_cases/case17_jinja2/ospf_config.j2 rename to examples_old/use_cases/case17_jinja2/ospf_config.j2 diff --git a/examples/use_cases/case18_structured_data_genie/genie_show_mac_nxos.py b/examples_old/use_cases/case18_structured_data_genie/genie_show_mac_nxos.py similarity index 100% rename from examples/use_cases/case18_structured_data_genie/genie_show_mac_nxos.py rename to examples_old/use_cases/case18_structured_data_genie/genie_show_mac_nxos.py diff --git a/examples/use_cases/case18_structured_data_genie/genie_show_platform_iosxr.py b/examples_old/use_cases/case18_structured_data_genie/genie_show_platform_iosxr.py similarity index 100% rename from examples/use_cases/case18_structured_data_genie/genie_show_platform_iosxr.py rename to examples_old/use_cases/case18_structured_data_genie/genie_show_platform_iosxr.py diff --git a/examples/use_cases/case18_structured_data_genie/genie_textfsm_combined_ex1.py b/examples_old/use_cases/case18_structured_data_genie/genie_textfsm_combined_ex1.py similarity index 100% rename from examples/use_cases/case18_structured_data_genie/genie_textfsm_combined_ex1.py rename to examples_old/use_cases/case18_structured_data_genie/genie_textfsm_combined_ex1.py diff --git a/examples/use_cases/case18_structured_data_genie/genie_textfsm_combined_ex2.py b/examples_old/use_cases/case18_structured_data_genie/genie_textfsm_combined_ex2.py similarity index 100% rename from examples/use_cases/case18_structured_data_genie/genie_textfsm_combined_ex2.py rename to examples_old/use_cases/case18_structured_data_genie/genie_textfsm_combined_ex2.py diff --git a/examples/use_cases/case7_commit/config_change_jnpr.py b/examples_old/use_cases/case7_commit/config_change_jnpr.py similarity index 100% rename from examples/use_cases/case7_commit/config_change_jnpr.py rename to examples_old/use_cases/case7_commit/config_change_jnpr.py diff --git a/examples/use_cases/case11_logging/write_channel.py b/examples_old/use_cases/write_channel.py similarity index 100% rename from examples/use_cases/case11_logging/write_channel.py rename to examples_old/use_cases/write_channel.py diff --git a/images/netmiko_logo_gh.png b/images/netmiko_logo_gh.png new file mode 100644 index 0000000000000000000000000000000000000000..7ffcf67c97b747eb41efbb0383c817d94b06f6df GIT binary patch literal 40341 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 literal 0 HcmV?d00001 diff --git a/netmiko/aruba/aruba_ssh.py b/netmiko/aruba/aruba_ssh.py index 8657eef77..6651e7be7 100644 --- a/netmiko/aruba/aruba_ssh.py +++ b/netmiko/aruba/aruba_ssh.py @@ -19,7 +19,7 @@ def session_preparation(self): """Aruba OS requires enable mode to disable paging.""" # Aruba switches output ansi codes self.ansi_escape_codes = True - + delay_factor = self.select_delay_factor(delay_factor=0) time.sleep(1 * delay_factor) self._test_channel_read() diff --git a/netmiko/base_connection.py b/netmiko/base_connection.py index 6f2d66199..0e5777800 100644 --- a/netmiko/base_connection.py +++ b/netmiko/base_connection.py @@ -316,7 +316,9 @@ def __init__( # Options for SSH host_keys self.use_keys = use_keys - self.key_file = key_file + self.key_file = ( + path.abspath(path.expanduser(key_file)) if key_file else None + ) self.pkey = pkey self.passphrase = passphrase self.allow_agent = allow_agent @@ -706,14 +708,16 @@ def telnet_login( # Search for username pattern / send username if re.search(username_pattern, output, flags=re.I): - self.write_channel(self.username + self.TELNET_RETURN) + # Sometimes username/password must be terminated with "\r" and not "\r\n" + self.write_channel(self.username + "\r") time.sleep(1 * delay_factor) output = self.read_channel() return_msg += output # Search for password pattern / send password if re.search(pwd_pattern, output, flags=re.I): - self.write_channel(self.password + self.TELNET_RETURN) + # Sometimes username/password must be terminated with "\r" and not "\r\n" + self.write_channel(self.password + "\r") time.sleep(0.5 * delay_factor) output = self.read_channel() return_msg += output @@ -1802,8 +1806,6 @@ def strip_ansi_escape_codes(self, string_buffer): :param string_buffer: The string to be processed to remove ANSI escape codes :type string_buffer: str """ # noqa - log.debug("In strip_ansi_escape_codes") - log.debug(f"repr = {repr(string_buffer)}") code_position_cursor = chr(27) + r"\[\d+;\d+H" code_show_cursor = chr(27) + r"\[\?25h" @@ -1859,13 +1861,7 @@ def strip_ansi_escape_codes(self, string_buffer): output = re.sub(ansi_esc_code, "", output) # CODE_NEXT_LINE must substitute with return - output = re.sub(code_next_line, self.RETURN, output) - - log.debug("Stripping ANSI escape codes") - log.debug(f"new_output = {output}") - log.debug(f"repr = {repr(output)}") - - return output + return re.sub(code_next_line, self.RETURN, output) def cleanup(self, command=""): """Logout of the session on the network device plus any additional cleanup.""" diff --git a/netmiko/cisco_base_connection.py b/netmiko/cisco_base_connection.py index d63f5e1fa..112a6764e 100644 --- a/netmiko/cisco_base_connection.py +++ b/netmiko/cisco_base_connection.py @@ -83,65 +83,76 @@ def telnet_login( output = "" return_msg = "" + outer_loops = 3 + inner_loops = int(max_loops / outer_loops) i = 1 - while i <= max_loops: - try: - output = self.read_channel() - return_msg += output - - # Search for username pattern / send username - if re.search(username_pattern, output, flags=re.I): - self.write_channel(self.username + self.TELNET_RETURN) - time.sleep(1 * delay_factor) + for _ in range(outer_loops): + while i <= inner_loops: + try: output = self.read_channel() return_msg += output - # Search for password pattern / send password - if re.search(pwd_pattern, output, flags=re.I): - self.write_channel(self.password + self.TELNET_RETURN) - time.sleep(0.5 * delay_factor) - output = self.read_channel() - return_msg += output + # Search for username pattern / send username + if re.search(username_pattern, output, flags=re.I): + # Sometimes username/password must be terminated with "\r" and not "\r\n" + self.write_channel(self.username + "\r") + time.sleep(1 * delay_factor) + output = self.read_channel() + return_msg += output + + # Search for password pattern / send password + if re.search(pwd_pattern, output, flags=re.I): + # Sometimes username/password must be terminated with "\r" and not "\r\n" + self.write_channel(self.password + "\r") + time.sleep(0.5 * delay_factor) + output = self.read_channel() + return_msg += output + if re.search( + pri_prompt_terminator, output, flags=re.M + ) or re.search(alt_prompt_terminator, output, flags=re.M): + return return_msg + + # Support direct telnet through terminal server + if re.search( + r"initial configuration dialog\? \[yes/no\]: ", output + ): + self.write_channel("no" + self.TELNET_RETURN) + time.sleep(0.5 * delay_factor) + count = 0 + while count < 15: + output = self.read_channel() + return_msg += output + if re.search(r"ress RETURN to get started", output): + output = "" + break + time.sleep(2 * delay_factor) + count += 1 + + # Check for device with no password configured + if re.search(r"assword required, but none set", output): + self.remote_conn.close() + msg = "Login failed - Password required, but none set: {}".format( + self.host + ) + raise NetmikoAuthenticationException(msg) + + # Check if proper data received if re.search( pri_prompt_terminator, output, flags=re.M ) or re.search(alt_prompt_terminator, output, flags=re.M): return return_msg - # Support direct telnet through terminal server - if re.search(r"initial configuration dialog\? \[yes/no\]: ", output): - self.write_channel("no" + self.TELNET_RETURN) - time.sleep(0.5 * delay_factor) - count = 0 - while count < 15: - output = self.read_channel() - return_msg += output - if re.search(r"ress RETURN to get started", output): - output = "" - break - time.sleep(2 * delay_factor) - count += 1 - - # Check for device with no password configured - if re.search(r"assword required, but none set", output): + i += 1 + + except EOFError: self.remote_conn.close() - msg = "Login failed - Password required, but none set: {}".format( - self.host - ) + msg = f"Login failed: {self.host}" raise NetmikoAuthenticationException(msg) - # Check if proper data received - if re.search(pri_prompt_terminator, output, flags=re.M) or re.search( - alt_prompt_terminator, output, flags=re.M - ): - return return_msg - - self.write_channel(self.TELNET_RETURN) - time.sleep(0.5 * delay_factor) - i += 1 - except EOFError: - self.remote_conn.close() - msg = f"Login failed: {self.host}" - raise NetmikoAuthenticationException(msg) + # Try sending an to restart the login process + self.write_channel(self.TELNET_RETURN) + time.sleep(0.5 * delay_factor) + i = 1 # Last try to see if we already logged in self.write_channel(self.TELNET_RETURN) diff --git a/netmiko/juniper/juniper.py b/netmiko/juniper/juniper.py index b7fa4a0c3..14d113420 100644 --- a/netmiko/juniper/juniper.py +++ b/netmiko/juniper/juniper.py @@ -228,6 +228,18 @@ def strip_context_items(self, a_string): return self.RESPONSE_RETURN.join(response_list[:-1]) return a_string + def cleanup(self, command="exit"): + """Gracefully exit the SSH session.""" + try: + # The pattern="" forces use of send_command_timing + if self.check_config_mode(pattern=""): + self.exit_config_mode() + except Exception: + pass + # Always try to send final 'exit' (command) + self._session_log_fin = True + self.write_channel(command + self.RETURN) + class JuniperSSH(JuniperBase): pass diff --git a/netmiko/ssh_dispatcher.py b/netmiko/ssh_dispatcher.py index cee6c5c47..de6813dab 100755 --- a/netmiko/ssh_dispatcher.py +++ b/netmiko/ssh_dispatcher.py @@ -273,15 +273,24 @@ scp_platforms_str = "\n".join(scp_platforms) scp_platforms_str = "\n" + scp_platforms_str +telnet_platforms = [x for x in platforms if "telnet" in x] +telnet_platforms_str = "\n".join(telnet_platforms) +telnet_platforms_str = "\n" + telnet_platforms_str + def ConnectHandler(*args, **kwargs): """Factory function selects the proper class and creates object based on device_type.""" - if kwargs["device_type"] not in platforms: + device_type = kwargs["device_type"] + if device_type not in platforms: + if device_type is None: + msg_str = platforms_str + else: + msg_str = telnet_platforms_str if "telnet" in device_type else platforms_str raise ValueError( - "Unsupported device_type: " - "currently supported platforms are: {}".format(platforms_str) + "Unsupported 'device_type' " + "currently supported platforms are: {}".format(msg_str) ) - ConnectionClass = ssh_dispatcher(kwargs["device_type"]) + ConnectionClass = ssh_dispatcher(device_type) return ConnectionClass(*args, **kwargs) diff --git a/requirements-dev.txt b/requirements-dev.txt index ac8acc0d6..2a09c7a6f 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -3,6 +3,6 @@ pytest==5.1.2 pylama==7.7.1 tox==3.14.5 twine==1.13.0 -pysnmp==4.4.11 +pysnmp==4.4.12 pdoc3==0.6.3 -r requirements.txt diff --git a/test.log b/test.log new file mode 100644 index 000000000..62c13507b --- /dev/null +++ b/test.log @@ -0,0 +1,129 @@ +DEBUG:paramiko.transport:starting thread (client mode): 0xb63946ec +DEBUG:paramiko.transport:Local version/idstring: SSH-2.0-paramiko_2.4.1 +DEBUG:paramiko.transport:Remote version/idstring: SSH-2.0-Cisco-1.25 +INFO:paramiko.transport:Connected (version 2.0, client Cisco-1.25) +DEBUG:paramiko.transport:kex algos:['diffie-hellman-group-exchange-sha1', 'diffie-hellman-group14-sha1', 'diffie-hellman-group1-sha1'] server key:['ssh-rsa'] client encrypt:['aes128-ctr', 'aes192-ctr', 'aes256-ctr', 'aes128-cbc', '3des-cbc', 'aes192-cbc', 'aes256-cbc'] server encrypt:['aes128-ctr', 'aes192-ctr', 'aes256-ctr', 'aes128-cbc', '3des-cbc', 'aes192-cbc', 'aes256-cbc'] client mac:['hmac-sha1', 'hmac-sha1-96', 'hmac-md5', 'hmac-md5-96'] server mac:['hmac-sha1', 'hmac-sha1-96', 'hmac-md5', 'hmac-md5-96'] client compress:['none'] server compress:['none'] client lang:[''] server lang:[''] kex follows?False +DEBUG:paramiko.transport:Kex agreed: diffie-hellman-group-exchange-sha1 +DEBUG:paramiko.transport:HostKey agreed: ssh-rsa +DEBUG:paramiko.transport:Cipher agreed: aes128-ctr +DEBUG:paramiko.transport:MAC agreed: hmac-sha1 +DEBUG:paramiko.transport:Compression agreed: none +DEBUG:paramiko.transport:Got server p (2048 bits) +DEBUG:paramiko.transport:kex engine KexGex specified hash_algo +DEBUG:paramiko.transport:Switch to new keys ... +DEBUG:paramiko.transport:Adding ssh-rsa host key for cisco1.twb-tech.com: b'c77967d9e78b5c6d9acaaa55cc7ad897' +DEBUG:paramiko.transport:userauth is OK +INFO:paramiko.transport:Authentication (password) successful! +DEBUG:paramiko.transport:[chan 0] Max packet in: 32768 bytes +DEBUG:paramiko.transport:[chan 0] Max packet out: 4096 bytes +DEBUG:paramiko.transport:Secsh channel 0 opened. +DEBUG:paramiko.transport:[chan 0] Sesch channel 0 request ok +DEBUG:paramiko.transport:[chan 0] Sesch channel 0 request ok +DEBUG:netmiko:read_channel: +pynet-rtr1# +DEBUG:netmiko:read_channel: +DEBUG:netmiko:read_channel: +DEBUG:netmiko:read_channel: +DEBUG:netmiko:write_channel: b'\n' +DEBUG:netmiko:read_channel: +pynet-rtr1# +DEBUG:netmiko:read_channel: +DEBUG:netmiko:read_channel: +DEBUG:netmiko:In disable_paging +DEBUG:netmiko:Command: terminal length 0 + +DEBUG:netmiko:write_channel: b'terminal length 0\n' +DEBUG:netmiko:Pattern is: pynet\-rtr1 +DEBUG:netmiko:_read_channel_expect read_data: ter +DEBUG:netmiko:_read_channel_expect read_data: minal length 0 +pynet-rtr1# +DEBUG:netmiko:Pattern found: pynet\-rtr1 terminal length 0 +pynet-rtr1# +DEBUG:netmiko:terminal length 0 +pynet-rtr1# +DEBUG:netmiko:Exiting disable_paging +DEBUG:netmiko:write_channel: b'terminal width 511\n' +DEBUG:netmiko:Pattern is: pynet\-rtr1 +DEBUG:netmiko:_read_channel_expect read_data: t +DEBUG:netmiko:_read_channel_expect read_data: erminal width 511 +pynet-rtr1# +DEBUG:netmiko:Pattern found: pynet\-rtr1 terminal width 511 +pynet-rtr1# +DEBUG:netmiko:read_channel: +DEBUG:netmiko:read_channel: +DEBUG:netmiko:write_channel: b'\n' +DEBUG:netmiko:read_channel: +pynet-rtr1# +DEBUG:netmiko:read_channel: +DEBUG:netmiko:write_channel: b'\n' +DEBUG:netmiko:read_channel: +pynet-rtr1# +DEBUG:netmiko:read_channel: +DEBUG:netmiko:read_channel: +DEBUG:netmiko:exit_config_mode: +DEBUG:netmiko:write_channel: b'exit\n' +DEBUG:paramiko.transport:starting thread (client mode): 0xfb54d3c8 +DEBUG:paramiko.transport:Local version/idstring: SSH-2.0-paramiko_2.7.1 +DEBUG:paramiko.transport:Remote version/idstring: SSH-2.0-Cisco-1.25 +INFO:paramiko.transport:Connected (version 2.0, client Cisco-1.25) +DEBUG:paramiko.transport:kex algos:['diffie-hellman-group-exchange-sha1', 'diffie-hellman-group14-sha1', 'diffie-hellman-group1-sha1'] server key:['ssh-rsa'] client encrypt:['aes128-ctr', 'aes192-ctr', 'aes256-ctr', 'aes128-cbc', '3des-cbc', 'aes192-cbc', 'aes256-cbc'] server encrypt:['aes128-ctr', 'aes192-ctr', 'aes256-ctr', 'aes128-cbc', '3des-cbc', 'aes192-cbc', 'aes256-cbc'] client mac:['hmac-sha1', 'hmac-sha1-96'] server mac:['hmac-sha1', 'hmac-sha1-96'] client compress:['none'] server compress:['none'] client lang:[''] server lang:[''] kex follows?False +DEBUG:paramiko.transport:Kex agreed: diffie-hellman-group-exchange-sha1 +DEBUG:paramiko.transport:HostKey agreed: ssh-rsa +DEBUG:paramiko.transport:Cipher agreed: aes128-ctr +DEBUG:paramiko.transport:MAC agreed: hmac-sha1 +DEBUG:paramiko.transport:Compression agreed: none +DEBUG:paramiko.transport:Got server p (2048 bits) +DEBUG:paramiko.transport:kex engine KexGex specified hash_algo +DEBUG:paramiko.transport:Switch to new keys ... +DEBUG:paramiko.transport:Adding ssh-rsa host key for cisco1.lasthop.io: b'539a8d09e0dab9e8f7ef2b61ba1d5805' +DEBUG:paramiko.transport:userauth is OK +INFO:paramiko.transport:Authentication (password) successful! +DEBUG:paramiko.transport:[chan 0] Max packet in: 32768 bytes +DEBUG:paramiko.transport:[chan 0] Max packet out: 4096 bytes +DEBUG:paramiko.transport:Secsh channel 0 opened. +DEBUG:paramiko.transport:[chan 0] Sesch channel 0 request ok +DEBUG:paramiko.transport:[chan 0] Sesch channel 0 request ok +DEBUG:netmiko:read_channel: +cisco1# +DEBUG:netmiko:read_channel: +DEBUG:netmiko:read_channel: +DEBUG:netmiko:read_channel: +DEBUG:netmiko:write_channel: b'\n' +DEBUG:netmiko:read_channel: +cisco1# +DEBUG:netmiko:read_channel: +DEBUG:netmiko:[find_prompt()]: prompt is cisco1# +DEBUG:netmiko:read_channel: +DEBUG:netmiko:In disable_paging +DEBUG:netmiko:Command: terminal length 0 + +DEBUG:netmiko:write_channel: b'terminal length 0\n' +DEBUG:netmiko:Pattern is: terminal\ length\ 0 +DEBUG:netmiko:_read_channel_expect read_data: t +DEBUG:netmiko:_read_channel_expect read_data: erminal length 0 +cisco1# +DEBUG:netmiko:Pattern found: terminal\ length\ 0 terminal length 0 +cisco1# +DEBUG:netmiko:terminal length 0 +cisco1# +DEBUG:netmiko:Exiting disable_paging +DEBUG:netmiko:write_channel: b'terminal width 511\n' +DEBUG:netmiko:Pattern is: terminal\ width\ 511 +DEBUG:netmiko:_read_channel_expect read_data: t +DEBUG:netmiko:_read_channel_expect read_data: erminal width 511 +cisco1# +DEBUG:netmiko:Pattern found: terminal\ width\ 511 terminal width 511 +cisco1# +DEBUG:netmiko:read_channel: +DEBUG:netmiko:read_channel: +DEBUG:netmiko:write_channel: b'\n' +DEBUG:netmiko:read_channel: +cisco1# +DEBUG:netmiko:read_channel: +DEBUG:netmiko:[find_prompt()]: prompt is cisco1# +DEBUG:netmiko:write_channel: b'\n' +DEBUG:netmiko:read_channel: +cisco1# +DEBUG:netmiko:read_channel: +DEBUG:netmiko:read_channel: +DEBUG:netmiko:write_channel: b'exit\n' From 1489ac1f6ad9f84131a0a612febbe700f86705b6 Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Mon, 29 Jun 2020 09:15:44 -0700 Subject: [PATCH 33/42] Update some examples references (#1817) --- README.md | 11 +- examples_old/adding_delay/add_delay.py | 21 ---- examples_old/asa_upgrade.py | 95 ---------------- .../case12_telnet/conn_telnet.py | 0 .../case15_netmiko_tools/.netmiko.yml_example | 0 .../case15_netmiko_tools/vlans.txt | 0 .../case16_concurrency/my_devices.py | 0 .../case16_concurrency/processes_netmiko.py | 0 .../processes_netmiko_queue.py | 0 .../case16_concurrency/threads_netmiko.py | 0 .../case17_jinja2/jinja2_crypto.py | 0 .../case17_jinja2/jinja2_for_loop.py | 0 .../case17_jinja2/jinja2_ospf_file.py | 0 .../case17_jinja2/jinja2_vlans.py | 0 .../case17_jinja2/ospf_config.j2 | 0 .../genie_show_mac_nxos.py | 0 .../genie_show_platform_iosxr.py | 0 .../genie_textfsm_combined_ex1.py | 0 .../genie_textfsm_combined_ex2.py | 0 .../case7_commit/config_change_jnpr.py | 0 .../configuration_changes/change_file.txt | 2 - .../configuration_changes/config_changes.py | 22 ---- .../config_changes_from_file.py | 21 ---- .../config_changes_to_device_list.py | 105 ------------------ .../connect_multiple.py | 37 ------ examples_old/enable/enable.py | 20 ---- examples_old/handle_prompts/handle_prompts.py | 36 ------ examples_old/show_command/show_command.py | 20 ---- .../show_command/show_command_textfsm.py | 18 --- examples_old/simple_connection/simple_conn.py | 16 --- .../simple_connection/simple_conn_dict.py | 17 --- .../troubleshooting/enable_logging.py | 23 ---- examples_old/{use_cases => }/write_channel.py | 0 33 files changed, 2 insertions(+), 462 deletions(-) delete mode 100755 examples_old/adding_delay/add_delay.py delete mode 100755 examples_old/asa_upgrade.py rename examples_old/{use_cases => }/case12_telnet/conn_telnet.py (100%) rename examples_old/{use_cases => }/case15_netmiko_tools/.netmiko.yml_example (100%) rename examples_old/{use_cases => }/case15_netmiko_tools/vlans.txt (100%) rename examples_old/{use_cases => }/case16_concurrency/my_devices.py (100%) rename examples_old/{use_cases => }/case16_concurrency/processes_netmiko.py (100%) rename examples_old/{use_cases => }/case16_concurrency/processes_netmiko_queue.py (100%) rename examples_old/{use_cases => }/case16_concurrency/threads_netmiko.py (100%) rename examples_old/{use_cases => }/case17_jinja2/jinja2_crypto.py (100%) rename examples_old/{use_cases => }/case17_jinja2/jinja2_for_loop.py (100%) rename examples_old/{use_cases => }/case17_jinja2/jinja2_ospf_file.py (100%) rename examples_old/{use_cases => }/case17_jinja2/jinja2_vlans.py (100%) rename examples_old/{use_cases => }/case17_jinja2/ospf_config.j2 (100%) rename examples_old/{use_cases => }/case18_structured_data_genie/genie_show_mac_nxos.py (100%) rename examples_old/{use_cases => }/case18_structured_data_genie/genie_show_platform_iosxr.py (100%) rename examples_old/{use_cases => }/case18_structured_data_genie/genie_textfsm_combined_ex1.py (100%) rename examples_old/{use_cases => }/case18_structured_data_genie/genie_textfsm_combined_ex2.py (100%) rename examples_old/{use_cases => }/case7_commit/config_change_jnpr.py (100%) delete mode 100644 examples_old/configuration_changes/change_file.txt delete mode 100755 examples_old/configuration_changes/config_changes.py delete mode 100755 examples_old/configuration_changes/config_changes_from_file.py delete mode 100644 examples_old/configuration_changes/config_changes_to_device_list.py delete mode 100755 examples_old/connect_multiple_devices/connect_multiple.py delete mode 100755 examples_old/enable/enable.py delete mode 100755 examples_old/handle_prompts/handle_prompts.py delete mode 100755 examples_old/show_command/show_command.py delete mode 100755 examples_old/show_command/show_command_textfsm.py delete mode 100755 examples_old/simple_connection/simple_conn.py delete mode 100755 examples_old/simple_connection/simple_conn_dict.py delete mode 100755 examples_old/troubleshooting/enable_logging.py rename examples_old/{use_cases => }/write_channel.py (100%) diff --git a/README.md b/README.md index ed3deb910..3f8cd6203 100644 --- a/README.md +++ b/README.md @@ -65,16 +65,9 @@ Netmiko has the following requirements (which pip will install for you) - [Netmiko and what constitutes done](https://pynet.twb-tech.com/blog/automation/netmiko-what-is-done.html) -### Example Scripts: +### Examples: -See the following directory for [example scripts](https://github.com/ktbyers/netmiko/tree/develop/examples/use_cases), including examples of: - -- [Simple Connection](https://github.com/ktbyers/netmiko/blob/develop/examples/use_cases/case1_simple_conn/simple_conn.py) -- [Sending Show Commands](https://github.com/ktbyers/netmiko/tree/develop/examples/use_cases/case4_show_commands) -- [Sending Configuration Commands](https://github.com/ktbyers/netmiko/tree/develop/examples/use_cases/case6_config_change) -- [Handling Additional Prompting](https://github.com/ktbyers/netmiko/blob/develop/examples/use_cases/case5_prompting/send_command_prompting.py) -- [Connecting with SSH Keys](https://github.com/ktbyers/netmiko/blob/develop/examples/use_cases/case9_ssh_keys/conn_ssh_keys.py) -- [Cisco Genie Integration](https://github.com/ktbyers/netmiko/blob/develop/examples/use_cases/case18_structured_data_genie) +A whole bunch of [examples](https://github.com/ktbyers/netmiko/blob/develop/EXAMPLES.md) ### Getting Started: diff --git a/examples_old/adding_delay/add_delay.py b/examples_old/adding_delay/add_delay.py deleted file mode 100755 index 4bf1e9252..000000000 --- a/examples_old/adding_delay/add_delay.py +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env python -from __future__ import print_function, unicode_literals - -# Netmiko is the same as ConnectHandler -from netmiko import Netmiko -from getpass import getpass - -my_device = { - "host": "host.domain.com", - "username": "pyclass", - "password": getpass(), - "device_type": "cisco_ios", - # Increase (essentially) all sleeps by a factor of 2 - "global_delay_factor": 2, -} - -net_connect = Netmiko(**my_device) -# Increase the sleeps for just send_command by a factor of 2 -output = net_connect.send_command("show ip int brief", delay_factor=2) -print(output) -net_connect.disconnect() diff --git a/examples_old/asa_upgrade.py b/examples_old/asa_upgrade.py deleted file mode 100755 index 93abf8025..000000000 --- a/examples_old/asa_upgrade.py +++ /dev/null @@ -1,95 +0,0 @@ -#!/usr/bin/env python -"""Script to upgrade a Cisco ASA.""" -from __future__ import print_function -from datetime import datetime -from getpass import getpass -from netmiko import ConnectHandler, FileTransfer - - -def asa_scp_handler(ssh_conn, cmd="ssh scopy enable", mode="enable"): - """Enable/disable SCP on Cisco ASA.""" - if mode == "disable": - cmd = "no " + cmd - return ssh_conn.send_config_set([cmd]) - - -def main(): - """Script to upgrade a Cisco ASA.""" - try: - ip_addr = raw_input("Enter ASA IP address: ") - except NameError: - ip_addr = input("Enter ASA IP address: ") - my_pass = getpass() - start_time = datetime.now() - print(">>>> {}".format(start_time)) - - net_device = { - "device_type": "cisco_asa", - "ip": ip_addr, - "username": "admin", - "password": my_pass, - "secret": my_pass, - "port": 22, - } - - print("\nLogging in to ASA") - ssh_conn = ConnectHandler(**net_device) - print() - - # ADJUST TO TRANSFER IMAGE FILE - dest_file_system = "disk0:" - source_file = "test1.txt" - dest_file = "test1.txt" - alt_dest_file = "asa825-59-k8.bin" - - with FileTransfer( - ssh_conn, - source_file=source_file, - dest_file=dest_file, - file_system=dest_file_system, - ) as scp_transfer: - - if not scp_transfer.check_file_exists(): - if not scp_transfer.verify_space_available(): - raise ValueError("Insufficient space available on remote device") - - print("Enabling SCP") - output = asa_scp_handler(ssh_conn, mode="enable") - print(output) - - print("\nTransferring file\n") - scp_transfer.transfer_file() - - print("Disabling SCP") - output = asa_scp_handler(ssh_conn, mode="disable") - print(output) - - print("\nVerifying file") - if scp_transfer.verify_file(): - print("Source and destination MD5 matches") - else: - raise ValueError("MD5 failure between source and destination files") - - print("\nSending boot commands") - full_file_name = "{}/{}".format(dest_file_system, alt_dest_file) - boot_cmd = "boot system {}".format(full_file_name) - output = ssh_conn.send_config_set([boot_cmd]) - print(output) - - print("\nVerifying state") - output = ssh_conn.send_command("show boot") - print(output) - - # UNCOMMENT TO PERFORM WR MEM AND RELOAD - # print("\nWrite mem and reload") - # output = ssh_conn.send_command_expect('write mem') - # output += ssh_conn.send_command('reload') - # output += ssh_conn.send_command('y') - # print(output) - - print("\n>>>> {}".format(datetime.now() - start_time)) - print() - - -if __name__ == "__main__": - main() diff --git a/examples_old/use_cases/case12_telnet/conn_telnet.py b/examples_old/case12_telnet/conn_telnet.py similarity index 100% rename from examples_old/use_cases/case12_telnet/conn_telnet.py rename to examples_old/case12_telnet/conn_telnet.py diff --git a/examples_old/use_cases/case15_netmiko_tools/.netmiko.yml_example b/examples_old/case15_netmiko_tools/.netmiko.yml_example similarity index 100% rename from examples_old/use_cases/case15_netmiko_tools/.netmiko.yml_example rename to examples_old/case15_netmiko_tools/.netmiko.yml_example diff --git a/examples_old/use_cases/case15_netmiko_tools/vlans.txt b/examples_old/case15_netmiko_tools/vlans.txt similarity index 100% rename from examples_old/use_cases/case15_netmiko_tools/vlans.txt rename to examples_old/case15_netmiko_tools/vlans.txt diff --git a/examples_old/use_cases/case16_concurrency/my_devices.py b/examples_old/case16_concurrency/my_devices.py similarity index 100% rename from examples_old/use_cases/case16_concurrency/my_devices.py rename to examples_old/case16_concurrency/my_devices.py diff --git a/examples_old/use_cases/case16_concurrency/processes_netmiko.py b/examples_old/case16_concurrency/processes_netmiko.py similarity index 100% rename from examples_old/use_cases/case16_concurrency/processes_netmiko.py rename to examples_old/case16_concurrency/processes_netmiko.py diff --git a/examples_old/use_cases/case16_concurrency/processes_netmiko_queue.py b/examples_old/case16_concurrency/processes_netmiko_queue.py similarity index 100% rename from examples_old/use_cases/case16_concurrency/processes_netmiko_queue.py rename to examples_old/case16_concurrency/processes_netmiko_queue.py diff --git a/examples_old/use_cases/case16_concurrency/threads_netmiko.py b/examples_old/case16_concurrency/threads_netmiko.py similarity index 100% rename from examples_old/use_cases/case16_concurrency/threads_netmiko.py rename to examples_old/case16_concurrency/threads_netmiko.py diff --git a/examples_old/use_cases/case17_jinja2/jinja2_crypto.py b/examples_old/case17_jinja2/jinja2_crypto.py similarity index 100% rename from examples_old/use_cases/case17_jinja2/jinja2_crypto.py rename to examples_old/case17_jinja2/jinja2_crypto.py diff --git a/examples_old/use_cases/case17_jinja2/jinja2_for_loop.py b/examples_old/case17_jinja2/jinja2_for_loop.py similarity index 100% rename from examples_old/use_cases/case17_jinja2/jinja2_for_loop.py rename to examples_old/case17_jinja2/jinja2_for_loop.py diff --git a/examples_old/use_cases/case17_jinja2/jinja2_ospf_file.py b/examples_old/case17_jinja2/jinja2_ospf_file.py similarity index 100% rename from examples_old/use_cases/case17_jinja2/jinja2_ospf_file.py rename to examples_old/case17_jinja2/jinja2_ospf_file.py diff --git a/examples_old/use_cases/case17_jinja2/jinja2_vlans.py b/examples_old/case17_jinja2/jinja2_vlans.py similarity index 100% rename from examples_old/use_cases/case17_jinja2/jinja2_vlans.py rename to examples_old/case17_jinja2/jinja2_vlans.py diff --git a/examples_old/use_cases/case17_jinja2/ospf_config.j2 b/examples_old/case17_jinja2/ospf_config.j2 similarity index 100% rename from examples_old/use_cases/case17_jinja2/ospf_config.j2 rename to examples_old/case17_jinja2/ospf_config.j2 diff --git a/examples_old/use_cases/case18_structured_data_genie/genie_show_mac_nxos.py b/examples_old/case18_structured_data_genie/genie_show_mac_nxos.py similarity index 100% rename from examples_old/use_cases/case18_structured_data_genie/genie_show_mac_nxos.py rename to examples_old/case18_structured_data_genie/genie_show_mac_nxos.py diff --git a/examples_old/use_cases/case18_structured_data_genie/genie_show_platform_iosxr.py b/examples_old/case18_structured_data_genie/genie_show_platform_iosxr.py similarity index 100% rename from examples_old/use_cases/case18_structured_data_genie/genie_show_platform_iosxr.py rename to examples_old/case18_structured_data_genie/genie_show_platform_iosxr.py diff --git a/examples_old/use_cases/case18_structured_data_genie/genie_textfsm_combined_ex1.py b/examples_old/case18_structured_data_genie/genie_textfsm_combined_ex1.py similarity index 100% rename from examples_old/use_cases/case18_structured_data_genie/genie_textfsm_combined_ex1.py rename to examples_old/case18_structured_data_genie/genie_textfsm_combined_ex1.py diff --git a/examples_old/use_cases/case18_structured_data_genie/genie_textfsm_combined_ex2.py b/examples_old/case18_structured_data_genie/genie_textfsm_combined_ex2.py similarity index 100% rename from examples_old/use_cases/case18_structured_data_genie/genie_textfsm_combined_ex2.py rename to examples_old/case18_structured_data_genie/genie_textfsm_combined_ex2.py diff --git a/examples_old/use_cases/case7_commit/config_change_jnpr.py b/examples_old/case7_commit/config_change_jnpr.py similarity index 100% rename from examples_old/use_cases/case7_commit/config_change_jnpr.py rename to examples_old/case7_commit/config_change_jnpr.py diff --git a/examples_old/configuration_changes/change_file.txt b/examples_old/configuration_changes/change_file.txt deleted file mode 100644 index b331444e6..000000000 --- a/examples_old/configuration_changes/change_file.txt +++ /dev/null @@ -1,2 +0,0 @@ -logging buffered 8000 -logging console diff --git a/examples_old/configuration_changes/config_changes.py b/examples_old/configuration_changes/config_changes.py deleted file mode 100755 index 317e65503..000000000 --- a/examples_old/configuration_changes/config_changes.py +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env python -from __future__ import print_function, unicode_literals - -# Netmiko is the same as ConnectHandler -from netmiko import Netmiko -from getpass import getpass - -my_device = { - "host": "host.domain.com", - "username": "pyclass", - "password": getpass(), - "device_type": "cisco_ios", -} - -net_connect = Netmiko(**my_device) -cfg_commands = ["logging buffered 10000", "no logging console"] - -# send_config_set() will automatically enter/exit config mode -output = net_connect.send_config_set(cfg_commands) -print(output) - -net_connect.disconnect() diff --git a/examples_old/configuration_changes/config_changes_from_file.py b/examples_old/configuration_changes/config_changes_from_file.py deleted file mode 100755 index e76c2f4a8..000000000 --- a/examples_old/configuration_changes/config_changes_from_file.py +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env python -from __future__ import print_function, unicode_literals - -# Netmiko is the same as ConnectHandler -from netmiko import Netmiko -from getpass import getpass - -my_device = { - "host": "host.domain.com", - "username": "pyclass", - "password": getpass(), - "device_type": "cisco_ios", -} - -net_connect = Netmiko(**my_device) - -# Make configuration changes using an external file -output = net_connect.send_config_from_file("change_file.txt") -print(output) - -net_connect.disconnect() diff --git a/examples_old/configuration_changes/config_changes_to_device_list.py b/examples_old/configuration_changes/config_changes_to_device_list.py deleted file mode 100644 index b33e5f9b8..000000000 --- a/examples_old/configuration_changes/config_changes_to_device_list.py +++ /dev/null @@ -1,105 +0,0 @@ -#!/usr/bin/env python -# Author: Peter Bruno -# Purpose: Script commands to group of Cisco devices with -# success/failure feedback. -from __future__ import print_function, unicode_literals -import sys -from netmiko import ConnectHandler -from getpass import getpass - - -def usage(ext): - # exit with description and command line example - print("\nInput file should contain list of switch IP addresses.") - print("Commands should be the commands you wish to run on your") - print('network devices enclosed in "quotes".') - print( - "Results key: # = enable mode, * = successful command", - "w = write mem, ! = command failure", - ) - print("\nusage:") - print( - ("\n%s " % sys.argv[0]), - '"command1"', - '"command2"', - '"command3"', - "wr", - ) - sys.exit(ext) - - -def get_cmd_line(): - if len(sys.argv) < 2: - usage(0) - cmdlist = sys.argv[2:] - try: - with open(sys.argv[1], "r") as f: - switchip = f.read().splitlines() - f.close() - except (IndexError, IOError): - usage(0) - return switchip, cmdlist - - -def main(): - inputfile, config_commands = get_cmd_line() - - print("Switch configuration updater. Please provide login information.\n") - # Get username and password information. - username = input("Username: ") - password = getpass("Password: ") - enasecret = getpass("Enable Secret: ") - - print("{}{:<20}{:<40}{:<20}".format("\n", "IP Address", "Name", "Results"), end="") - - for switchip in inputfile: - ciscosw = { - "device_type": "cisco_ios", - "ip": switchip.strip(), - "username": username.strip(), - "password": password.strip(), - "secret": enasecret.strip(), - } - print() - print("{:<20}".format(switchip.strip()), end="", flush=True) - try: - # Connect to switch and enter enable mode. - net_connect = ConnectHandler(**ciscosw) - except Exception: - print("** Failed to connect.", end="", flush=True) - continue - - prompt = net_connect.find_prompt() - # Print out the prompt/hostname of the device - print("{:<40}".format(prompt), end="", flush=True) - try: - # Ensure we are in enable mode and can make changes. - if "#" not in prompt[-1]: - net_connect.enable() - print("#", end="", flush=True) - except Exception: - print("Unable to enter enable mode.", end="", flush=True) - continue - - else: - for cmd in config_commands: - # Make requested configuration changes. - try: - if cmd in ("w", "wr"): - output = net_connect.save_config() - print("w", end="", flush=True) - else: - output = net_connect.send_config_set(cmd) - if "Invalid input" in output: - # Unsupported command in this IOS version. - print("Invalid input: ", cmd, end="", flush=True) - print("*", end="", flush=True) - except Exception: - # Command failed! Stop processing further commands. - print("!") - break - net_connect.disconnect() - - -if __name__ == "__main__": - main() diff --git a/examples_old/connect_multiple_devices/connect_multiple.py b/examples_old/connect_multiple_devices/connect_multiple.py deleted file mode 100755 index 14f53a663..000000000 --- a/examples_old/connect_multiple_devices/connect_multiple.py +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env python -""" -This example is serial (i.e. no concurrency). Connect to one device, after the other, -after the other. -""" -from __future__ import print_function, unicode_literals - -# Netmiko is the same as ConnectHandler -from netmiko import Netmiko -from getpass import getpass - -password = getpass() - -cisco1 = { - "host": "host1.domain.com", - "username": "pyclass", - "password": password, - "device_type": "cisco_ios", -} - -arista1 = { - "host": "host2.domain.com", - "username": "pyclass", - "password": password, - "device_type": "arista_eos", -} - -srx1 = { - "host": "host3.domain.com", - "username": "pyclass", - "password": password, - "device_type": "juniper_junos", -} - -for device in (cisco1, arista1, srx1): - net_connect = Netmiko(**device) - print(net_connect.find_prompt()) diff --git a/examples_old/enable/enable.py b/examples_old/enable/enable.py deleted file mode 100755 index 13c44c0d2..000000000 --- a/examples_old/enable/enable.py +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env python -from __future__ import print_function, unicode_literals - -# Netmiko is the same as ConnectHandler -from netmiko import Netmiko -from getpass import getpass - -my_device = { - "host": "host.domain.com", - "username": "pyclass", - "password": getpass(), - "device_type": "cisco_ios", -} - -net_connect = Netmiko(**my_device) -# Ensure in enable mode -net_connect.enable() -print(net_connect.find_prompt()) - -net_connect.disconnect() diff --git a/examples_old/handle_prompts/handle_prompts.py b/examples_old/handle_prompts/handle_prompts.py deleted file mode 100755 index b9a86d4ef..000000000 --- a/examples_old/handle_prompts/handle_prompts.py +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env python -"""Handling commands that prompt for additional information.""" -from __future__ import print_function, unicode_literals - -# Netmiko is the same as ConnectHandler -from netmiko import Netmiko -from getpass import getpass - -my_device = { - "host": "host.domain.com", - "username": "pyclass", - "password": getpass(), - "device_type": "cisco_ios", -} - -""" -Cisco IOS behavior on file delete: - -pynet-rtr1# delete flash:/small_file_bim.txt -Delete flash:/test1.txt? [confirm]y -pynet-rtr1 -""" - -net_connect = Netmiko(**my_device) -filename = "text1234.txt" -cmd = "delete flash:{}".format(filename) - -# send_command_timing as the router prompt is not returned -output = net_connect.send_command_timing(cmd, strip_command=False, strip_prompt=False) -if "confirm" in output: - output += net_connect.send_command_timing( - "\n", strip_command=False, strip_prompt=False - ) - -net_connect.disconnect() -print(output) diff --git a/examples_old/show_command/show_command.py b/examples_old/show_command/show_command.py deleted file mode 100755 index 9925b693d..000000000 --- a/examples_old/show_command/show_command.py +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env python -from __future__ import print_function, unicode_literals - -# Netmiko is the same as ConnectHandler -from netmiko import Netmiko -from getpass import getpass - -my_device = { - "host": "host.domain.com", - "username": "pyclass", - "password": getpass(), - "device_type": "cisco_ios", -} - -net_connect = Netmiko(**my_device) - -output = net_connect.send_command("show ip int brief") -print(output) - -net_connect.disconnect() diff --git a/examples_old/show_command/show_command_textfsm.py b/examples_old/show_command/show_command_textfsm.py deleted file mode 100755 index b348c21a9..000000000 --- a/examples_old/show_command/show_command_textfsm.py +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env python -from __future__ import print_function, unicode_literals - -# Netmiko is the same as ConnectHandler -from netmiko import Netmiko -from getpass import getpass - -my_device = { - "host": "host.domain.com", - "username": "pyclass", - "password": getpass(), - "device_type": "cisco_ios", -} - -net_connect = Netmiko(**my_device) -# Requires ntc-templates to be installed in ~/ntc-templates/templates -output = net_connect.send_command("show ip int brief", use_textfsm=True) -print(output) diff --git a/examples_old/simple_connection/simple_conn.py b/examples_old/simple_connection/simple_conn.py deleted file mode 100755 index 4ab34b32b..000000000 --- a/examples_old/simple_connection/simple_conn.py +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env python -from __future__ import print_function, unicode_literals - -# Netmiko is the same as ConnectHandler -from netmiko import Netmiko -from getpass import getpass - -net_connect = Netmiko( - host="host.domain.com", - username="pyclass", - password=getpass(), - device_type="cisco_ios", -) - -print(net_connect.find_prompt()) -net_connect.disconnect() diff --git a/examples_old/simple_connection/simple_conn_dict.py b/examples_old/simple_connection/simple_conn_dict.py deleted file mode 100755 index 870835eeb..000000000 --- a/examples_old/simple_connection/simple_conn_dict.py +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env python -from __future__ import print_function, unicode_literals - -# Netmiko is the same as ConnectHandler -from netmiko import Netmiko -from getpass import getpass - -my_device = { - "host": "host.domain.com", - "username": "pyclass", - "password": getpass(), - "device_type": "cisco_ios", -} - -net_connect = Netmiko(**my_device) -print(net_connect.find_prompt()) -net_connect.disconnect() diff --git a/examples_old/troubleshooting/enable_logging.py b/examples_old/troubleshooting/enable_logging.py deleted file mode 100755 index c1bbb85d5..000000000 --- a/examples_old/troubleshooting/enable_logging.py +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env python -from __future__ import print_function, unicode_literals - -import logging -from netmiko import Netmiko -from getpass import getpass - -# This will create a file named 'test.log' in your current directory. -# It will log all reads and writes on the SSH channel. -logging.basicConfig(filename="test.log", level=logging.DEBUG) -logger = logging.getLogger("netmiko") - -my_device = { - "host": "host.domain.com", - "username": "pyclass", - "password": getpass(), - "device_type": "cisco_ios", -} - -net_connect = Netmiko(**my_device) -output = net_connect.send_command("show ip int brief") -print(output) -net_connect.disconnect() diff --git a/examples_old/use_cases/write_channel.py b/examples_old/write_channel.py similarity index 100% rename from examples_old/use_cases/write_channel.py rename to examples_old/write_channel.py From 7b2f71fb9b7dd7a13b0c35a942154d5863687860 Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Thu, 2 Jul 2020 10:22:37 -0700 Subject: [PATCH 34/42] Fixing Arista check_config_mode bug with hostname change (#1826) --- netmiko/arista/arista.py | 10 +++++----- tests/test_netmiko_config.py | 13 +++++++++++++ 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/netmiko/arista/arista.py b/netmiko/arista/arista.py index a3c9c557a..695637a2b 100644 --- a/netmiko/arista/arista.py +++ b/netmiko/arista/arista.py @@ -1,7 +1,6 @@ import time from netmiko.cisco_base_connection import CiscoSSHConnection from netmiko.cisco_base_connection import CiscoFileTransfer -from netmiko import log class AristaBase(CiscoSSHConnection): @@ -24,13 +23,14 @@ def check_config_mode(self, check_string=")#", pattern=""): Can also be (s2) """ - log.debug(f"pattern: {pattern}") self.write_channel(self.RETURN) - output = self.read_until_pattern(pattern=pattern) - log.debug(f"check_config_mode: {repr(output)}") + # You can encounter an issue here (on router name changes) prefer delay-based solution + if not pattern: + output = self._read_channel_timing() + else: + output = self.read_until_pattern(pattern=pattern) output = output.replace("(s1)", "") output = output.replace("(s2)", "") - log.debug(f"check_config_mode: {repr(output)}") return check_string in output def _enter_shell(self): diff --git a/tests/test_netmiko_config.py b/tests/test_netmiko_config.py index 79fe02cb9..5e9ab1525 100755 --- a/tests/test_netmiko_config.py +++ b/tests/test_netmiko_config.py @@ -80,6 +80,19 @@ def test_config_set_longcommand(net_connect, commands, expected_responses): assert True +def test_config_hostname(net_connect, commands, expected_responses): + hostname = "test-netmiko1" + command = f"hostname {hostname}" + if "arista" in net_connect.device_type: + current_hostname = net_connect.find_prompt()[:-1] + net_connect.send_config_set(command) + new_hostname = net_connect.find_prompt() + assert hostname in new_hostname + # Reset prompt back to original value + net_connect.set_base_prompt() + net_connect.send_config_set(f"hostname {current_hostname}") + + def test_config_from_file(net_connect, commands, expected_responses): """ Test sending configuration commands from a file From 0aa11265ea962f743f0ffa97d35ed4fa9aa0837d Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Sun, 5 Jul 2020 06:39:37 -0700 Subject: [PATCH 35/42] Ansi insert line for ProCurve and Aruba (#1827) --- netmiko/base_connection.py | 18 +++++++++++++----- tests/unit/test_base_connection.py | 7 ++++++- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/netmiko/base_connection.py b/netmiko/base_connection.py index 0e5777800..2a047a407 100644 --- a/netmiko/base_connection.py +++ b/netmiko/base_connection.py @@ -1109,7 +1109,6 @@ def find_prompt(self, delay_factor=1): prompt = self.read_channel().strip() if not prompt: self.write_channel(self.RETURN) - # log.debug(f"find_prompt sleep time: {sleep_time}") time.sleep(sleep_time) if sleep_time <= 3: # Double the sleep_time when it is small @@ -1814,19 +1813,19 @@ def strip_ansi_escape_codes(self, string_buffer): code_erase_line = chr(27) + r"\[2K" code_erase_start_line = chr(27) + r"\[K" code_enable_scroll = chr(27) + r"\[\d+;\d+r" - code_form_feed = chr(27) + r"\[1L" + code_insert_line = chr(27) + r"\[(\d+)L" code_carriage_return = chr(27) + r"\[1M" code_disable_line_wrapping = chr(27) + r"\[\?7l" code_reset_mode_screen_options = chr(27) + r"\[\?\d+l" code_reset_graphics_mode = chr(27) + r"\[00m" code_erase_display = chr(27) + r"\[2J" + code_erase_display_0 = chr(27) + r"\[J" code_graphics_mode = chr(27) + r"\[\d\d;\d\dm" code_graphics_mode2 = chr(27) + r"\[\d\d;\d\d;\d\dm" code_graphics_mode3 = chr(27) + r"\[(3|4)\dm" code_graphics_mode4 = chr(27) + r"\[(9|10)[0-7]m" code_get_cursor_position = chr(27) + r"\[6n" code_cursor_position = chr(27) + r"\[m" - code_erase_display = chr(27) + r"\[J" code_attrs_off = chr(27) + r"\[0m" code_reverse = chr(27) + r"\[7m" code_cursor_left = chr(27) + r"\[\d+D" @@ -1837,7 +1836,6 @@ def strip_ansi_escape_codes(self, string_buffer): code_erase_line, code_enable_scroll, code_erase_start_line, - code_form_feed, code_carriage_return, code_disable_line_wrapping, code_erase_line_end, @@ -1851,6 +1849,7 @@ def strip_ansi_escape_codes(self, string_buffer): code_get_cursor_position, code_cursor_position, code_erase_display, + code_erase_display_0, code_attrs_off, code_reverse, code_cursor_left, @@ -1861,7 +1860,16 @@ def strip_ansi_escape_codes(self, string_buffer): output = re.sub(ansi_esc_code, "", output) # CODE_NEXT_LINE must substitute with return - return re.sub(code_next_line, self.RETURN, output) + output = re.sub(code_next_line, self.RETURN, output) + + # Aruba and ProCurve switches can use code_insert_line for + insert_line_match = re.search(code_insert_line, output) + if insert_line_match: + # Substitute each insert_line with a new + count = int(insert_line_match.group(1)) + output = re.sub(code_insert_line, count * self.RETURN, output) + + return output def cleanup(self, command=""): """Logout of the session on the network device plus any additional cleanup.""" diff --git a/tests/unit/test_base_connection.py b/tests/unit/test_base_connection.py index 81d1af3cc..8731e9cf9 100755 --- a/tests/unit/test_base_connection.py +++ b/tests/unit/test_base_connection.py @@ -449,7 +449,6 @@ def test_strip_ansi_codes(): "\x1b[2K", # code_erase_line "\x1b[K", # code_erase_start_line "\x1b[1;2r", # code_enable_scroll - "\x1b[1L", # code_form_feed "\x1b[1M", # code_carriage_return "\x1b[?7l", # code_disable_line_wrapping "\x1b[?7l", # code_reset_mode_screen_options @@ -464,5 +463,11 @@ def test_strip_ansi_codes(): for ansi_code in ansi_codes_to_strip: assert connection.strip_ansi_escape_codes(ansi_code) == "" + # code_insert_line must be substituted with n-returns + ansi_insert_line = "\x1b[1L" + assert connection.strip_ansi_escape_codes(ansi_insert_line) == "\n" + ansi_insert_line = "\x1b[3L" + assert connection.strip_ansi_escape_codes(ansi_insert_line) == "\n\n\n" + # code_next_line must be substituted with a return assert connection.strip_ansi_escape_codes("\x1bE") == "\n" From e7651384991c643ef7fe277e877c6ecaeb6b8bfd Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Sun, 5 Jul 2020 10:02:08 -0700 Subject: [PATCH 36/42] Add progress bar for Secure Copy (#1828) --- EXAMPLES.md | 2 +- netmiko/__init__.py | 3 ++- netmiko/cisco/cisco_ios.py | 11 +++++++++++ netmiko/cisco/cisco_nxos_ssh.py | 4 ++++ netmiko/scp_functions.py | 27 +++++++++++++++++++++++++++ netmiko/scp_handler.py | 20 +++++++++++++++++--- 6 files changed, 62 insertions(+), 5 deletions(-) diff --git a/EXAMPLES.md b/EXAMPLES.md index 5b5cbb0bf..cf995ef87 100644 --- a/EXAMPLES.md +++ b/EXAMPLES.md @@ -45,7 +45,7 @@ A set of common Netmiko use cases. - [Standard logging](#standard-logging) #### Secure Copy -- [Secure Copy](#secure-copy) +- [Secure Copy](#secure-copy-1) #### Auto Detection of Device Type - [Auto detection using SSH](#auto-detection-using-ssh) diff --git a/netmiko/__init__.py b/netmiko/__init__.py index 66b3d6cb1..6a405879d 100644 --- a/netmiko/__init__.py +++ b/netmiko/__init__.py @@ -18,7 +18,7 @@ ) from netmiko.ssh_autodetect import SSHDetect from netmiko.base_connection import BaseConnection -from netmiko.scp_functions import file_transfer +from netmiko.scp_functions import file_transfer, progress_bar # Alternate naming Netmiko = ConnectHandler @@ -40,6 +40,7 @@ "BaseConnection", "Netmiko", "file_transfer", + "progress_bar", ) # Cisco cntl-shift-six sequence diff --git a/netmiko/cisco/cisco_ios.py b/netmiko/cisco/cisco_ios.py index f9810f0a4..0d4e2b9cd 100644 --- a/netmiko/cisco/cisco_ios.py +++ b/netmiko/cisco/cisco_ios.py @@ -71,13 +71,24 @@ def __init__( direction="put", source_config=None, socket_timeout=10.0, + progress=None, + progress4=None, ): + if source_file and source_config: msg = "Invalid call to InLineTransfer both source_file and source_config specified." raise ValueError(msg) if direction != "put": raise ValueError("Only put operation supported by InLineTransfer.") + if progress is not None or progress4 is not None: + raise NotImplementedError( + "Progress bar is not supported on inline transfers." + ) + else: + self.progress = progress + self.progress4 = progress4 + self.ssh_ctl_chan = ssh_conn if source_file: self.source_file = source_file diff --git a/netmiko/cisco/cisco_nxos_ssh.py b/netmiko/cisco/cisco_nxos_ssh.py index d1c67eff5..0f6abab91 100644 --- a/netmiko/cisco/cisco_nxos_ssh.py +++ b/netmiko/cisco/cisco_nxos_ssh.py @@ -39,6 +39,8 @@ def __init__( file_system="bootflash:", direction="put", socket_timeout=10.0, + progress=None, + progress4=None, ): self.ssh_ctl_chan = ssh_conn self.source_file = source_file @@ -60,6 +62,8 @@ def __init__( raise ValueError("Invalid direction specified") self.socket_timeout = socket_timeout + self.progress = progress + self.progress4 = progress4 def check_file_exists(self, remote_cmd=""): """Check if the dest_file already exists on the file system (return boolean).""" diff --git a/netmiko/scp_functions.py b/netmiko/scp_functions.py index b1f1357db..6b50920b0 100644 --- a/netmiko/scp_functions.py +++ b/netmiko/scp_functions.py @@ -10,6 +10,29 @@ from netmiko import FileTransfer, InLineTransfer +def progress_bar(filename, size, sent, peername=None): + max_width = 50 + filename = filename.decode() + clear_screen = chr(27) + "[2J" + terminating_char = "|" + + # Percentage done + percent_complete = sent / size + percent_str = f"{percent_complete*100:.2f}%" + hash_count = int(percent_complete * max_width) + progress = hash_count * ">" + + if peername is None: + header_msg = f"Transferring file: {filename}\n" + else: + header_msg = f"Transferring file to {peername}: {filename}\n" + + msg = f"{progress:<50}{terminating_char:1} ({percent_str})" + print(clear_screen) + print(header_msg) + print(msg) + + def verifyspace_and_transferfile(scp_transfer): """Verify space and transfer file.""" if not scp_transfer.verify_space_available(): @@ -27,6 +50,8 @@ def file_transfer( inline_transfer=False, overwrite_file=False, socket_timeout=10.0, + progress=None, + progress4=None, verify_file=None, ): """Use Secure Copy or Inline (IOS-only) to transfer files to/from network devices. @@ -72,6 +97,8 @@ def file_transfer( "dest_file": dest_file, "direction": direction, "socket_timeout": socket_timeout, + "progress": progress, + "progress4": progress4, } if file_system is not None: scp_args["file_system"] = file_system diff --git a/netmiko/scp_handler.py b/netmiko/scp_handler.py index 456473eb6..11c49fb78 100644 --- a/netmiko/scp_handler.py +++ b/netmiko/scp_handler.py @@ -22,9 +22,11 @@ class SCPConn(object): Must close the SCP connection to get the file to write to the remote filesystem """ - def __init__(self, ssh_conn, socket_timeout=10.0): + def __init__(self, ssh_conn, socket_timeout=10.0, progress=None, progress4=None): self.ssh_ctl_chan = ssh_conn self.socket_timeout = socket_timeout + self.progress = progress + self.progress4 = progress4 self.establish_scp_conn() def establish_scp_conn(self): @@ -33,7 +35,10 @@ def establish_scp_conn(self): self.scp_conn = self.ssh_ctl_chan._build_ssh_client() self.scp_conn.connect(**ssh_connect_params) self.scp_client = scp.SCPClient( - self.scp_conn.get_transport(), socket_timeout=self.socket_timeout + self.scp_conn.get_transport(), + socket_timeout=self.socket_timeout, + progress=self.progress, + progress4=self.progress4, ) def scp_transfer_file(self, source_file, dest_file): @@ -64,6 +69,8 @@ def __init__( file_system=None, direction="put", socket_timeout=10.0, + progress=None, + progress4=None, hash_supported=True, ): self.ssh_ctl_chan = ssh_conn @@ -71,6 +78,8 @@ def __init__( self.dest_file = dest_file self.direction = direction self.socket_timeout = socket_timeout + self.progress = progress + self.progress4 = progress4 auto_flag = ( "cisco_ios" in ssh_conn.device_type @@ -107,7 +116,12 @@ def __exit__(self, exc_type, exc_value, traceback): def establish_scp_conn(self): """Establish SCP connection.""" - self.scp_conn = SCPConn(self.ssh_ctl_chan, socket_timeout=self.socket_timeout) + self.scp_conn = SCPConn( + self.ssh_ctl_chan, + socket_timeout=self.socket_timeout, + progress=self.progress, + progress4=self.progress4, + ) def close_scp_chan(self): """Close the SCP connection to the remote network device.""" From fc903cfa8c3d16b1802c432729fa8bbbf0b76997 Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Sun, 5 Jul 2020 15:38:06 -0700 Subject: [PATCH 37/42] Raisecom driver (#1829) --- PLATFORMS.md | 1 + netmiko/raisecom/__init__.py | 4 + netmiko/raisecom/raisecom_roap.py | 149 ++++++++++++++++++++++++++++++ netmiko/ssh_dispatcher.py | 4 + 4 files changed, 158 insertions(+) create mode 100644 netmiko/raisecom/__init__.py create mode 100644 netmiko/raisecom/raisecom_roap.py diff --git a/PLATFORMS.md b/PLATFORMS.md index 2801891d3..f86240b8a 100644 --- a/PLATFORMS.md +++ b/PLATFORMS.md @@ -76,6 +76,7 @@ - Nokia/Alcatel SR-OS - QuantaMesh - Rad ETX +- Raisecom ROAP - Sophos SFOS - Ubiquiti Unifi Switch - Versa Networks FlexVNF diff --git a/netmiko/raisecom/__init__.py b/netmiko/raisecom/__init__.py new file mode 100644 index 000000000..865212095 --- /dev/null +++ b/netmiko/raisecom/__init__.py @@ -0,0 +1,4 @@ +from netmiko.raisecom.raisecom_roap import RaisecomRoapSSH +from netmiko.raisecom.raisecom_roap import RaisecomRoapTelnet + +__all__ = ["RaisecomRoapSSH", "RaisecomRoapTelnet"] diff --git a/netmiko/raisecom/raisecom_roap.py b/netmiko/raisecom/raisecom_roap.py new file mode 100644 index 000000000..3ca739baa --- /dev/null +++ b/netmiko/raisecom/raisecom_roap.py @@ -0,0 +1,149 @@ +from netmiko.cisco_base_connection import CiscoBaseConnection +import re +import time +from telnetlib import IAC, DO, DONT, WILL, WONT, SB, SE, ECHO, SGA, NAWS +from netmiko.ssh_exception import NetmikoAuthenticationException + + +class RaisecomRoapBase(CiscoBaseConnection): + def session_preparation(self): + """Prepare the session after the connection has been established.""" + self._test_channel_read(pattern=r"[>#]") + self.set_base_prompt() + self.enable() + self.disable_paging("terminal page-break disable") + # Clear the read buffer + time.sleep(0.3 * self.global_delay_factor) + self.clear_buffer() + + def check_config_mode(self, check_string=")#", pattern="#"): + """ + Checks if the device is in configuration mode or not. + """ + return super().check_config_mode(check_string=check_string, pattern=pattern) + + def save_config( + self, cmd="write startup-config", confirm=False, confirm_response="" + ): + """Saves Config.""" + self.exit_config_mode() + self.enable() + return super().save_config( + cmd=cmd, confirm=confirm, confirm_response=confirm_response + ) + + +class RaisecomRoapSSH(RaisecomRoapBase): + def special_login_handler(self, delay_factor=1): + """ + Raisecom presents with the following on login (in certain OS versions) + Login: user + Password:**** + """ + delay_factor = self.select_delay_factor(delay_factor) + i = 0 + time.sleep(delay_factor * 0.5) + output = "" + while i <= 12: + output = self.read_channel() + if output: + if "Login:" in output: + self.write_channel(self.username + self.RETURN) + elif "Password:" in output: + self.write_channel(self.password + self.RETURN) + break + time.sleep(delay_factor * 1) + else: + self.write_channel(self.RETURN) + time.sleep(delay_factor * 1.5) + i += 1 + + +class RaisecomRoapTelnet(RaisecomRoapBase): + @staticmethod + def _process_option(telnet_sock, cmd, opt): + """ + enable ECHO, SGA, set window size to [500, 50] + """ + if cmd == WILL: + if opt in [ECHO, SGA]: + # reply DO ECHO / DO SGA + telnet_sock.sendall(IAC + DO + opt) + else: + telnet_sock.sendall(IAC + DONT + opt) + elif cmd == DO: + if opt == NAWS: + # negotiate about window size + telnet_sock.sendall(IAC + WILL + opt) + # Width:500, Weight:50 + telnet_sock.sendall(IAC + SB + NAWS + b"\x01\xf4\x00\x32" + IAC + SE) + else: + telnet_sock.sendall(IAC + WONT + opt) + + def telnet_login( + self, + pri_prompt_terminator=r"#\s*$", + alt_prompt_terminator=r">\s*$", + username_pattern=r"(Login|Username)", + pwd_pattern=r"Password", + delay_factor=1, + max_loops=20, + ): + + # set callback function to handle telnet options. + self.remote_conn.set_option_negotiation_callback(self._process_option) + delay_factor = self.select_delay_factor(delay_factor) + time.sleep(1 * delay_factor) + + output = "" + return_msg = "" + i = 1 + while i <= max_loops: + try: + output = self.read_channel() + return_msg += output + + # Search for username pattern / send username + if re.search(username_pattern, output, flags=re.I): + self.write_channel(self.username + self.TELNET_RETURN) + time.sleep(1 * delay_factor) + output = self.read_channel() + return_msg += output + + # Search for password pattern / send password + if re.search(pwd_pattern, output, flags=re.I): + self.write_channel(self.password + self.TELNET_RETURN) + time.sleep(0.5 * delay_factor) + output = self.read_channel() + return_msg += output + if re.search( + pri_prompt_terminator, output, flags=re.M + ) or re.search(alt_prompt_terminator, output, flags=re.M): + return return_msg + + # Check if proper data received + if re.search(pri_prompt_terminator, output, flags=re.M) or re.search( + alt_prompt_terminator, output, flags=re.M + ): + return return_msg + + time.sleep(0.5 * delay_factor) + i += 1 + except EOFError: + self.remote_conn.close() + msg = f"Login failed: {self.host}" + raise NetmikoAuthenticationException(msg) + + # Last try to see if we already logged in + self.write_channel(self.TELNET_RETURN) + time.sleep(0.5 * delay_factor) + output = self.read_channel() + return_msg += output + if re.search(pri_prompt_terminator, output, flags=re.M) or re.search( + alt_prompt_terminator, output, flags=re.M + ): + return return_msg + + msg = f"Login failed: {self.host}" + self.remote_conn.close() + raise NetmikoAuthenticationException(msg) diff --git a/netmiko/ssh_dispatcher.py b/netmiko/ssh_dispatcher.py index de6813dab..b1992faf1 100755 --- a/netmiko/ssh_dispatcher.py +++ b/netmiko/ssh_dispatcher.py @@ -73,6 +73,8 @@ from netmiko.quanta import QuantaMeshSSH from netmiko.rad import RadETXSSH from netmiko.rad import RadETXTelnet +from netmiko.raisecom import RaisecomRoapSSH +from netmiko.raisecom import RaisecomRoapTelnet from netmiko.ruckus import RuckusFastironSSH from netmiko.ruckus import RuckusFastironTelnet from netmiko.ruijie import RuijieOSSSH, RuijieOSTelnet @@ -179,6 +181,7 @@ "pluribus": PluribusSSH, "quanta_mesh": QuantaMeshSSH, "rad_etx": RadETXSSH, + "raisecom_roap": RaisecomRoapSSH, "ruckus_fastiron": RuckusFastironSSH, "ruijie_os": RuijieOSSSH, "sixwind_os": SixwindOSSSH, @@ -249,6 +252,7 @@ CLASS_MAPPER["paloalto_panos_telnet"] = PaloAltoPanosTelnet CLASS_MAPPER["oneaccess_oneos_telnet"] = OneaccessOneOSTelnet CLASS_MAPPER["rad_etx_telnet"] = RadETXTelnet +CLASS_MAPPER["raisecom_telnet"] = RaisecomRoapTelnet CLASS_MAPPER["ruckus_fastiron_telnet"] = RuckusFastironTelnet CLASS_MAPPER["ruijie_os_telnet"] = RuijieOSTelnet CLASS_MAPPER["yamaha_telnet"] = YamahaTelnet From 85306621a75d795499fb0c0fa15feaf3bc78d82c Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Tue, 14 Jul 2020 16:10:07 -0700 Subject: [PATCH 38/42] Fix unicode char issue in session log output (#1844) --- netmiko/base_connection.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/netmiko/base_connection.py b/netmiko/base_connection.py index 2a047a407..ee7d0296a 100644 --- a/netmiko/base_connection.py +++ b/netmiko/base_connection.py @@ -1909,9 +1909,9 @@ def save_config(self, *args, **kwargs): def open_session_log(self, filename, mode="write"): """Open the session_log file.""" if mode == "append": - self.session_log = open(filename, mode="a") + self.session_log = open(filename, mode="a", encoding=self.encoding) else: - self.session_log = open(filename, mode="w") + self.session_log = open(filename, mode="w", encoding=self.encoding) self._session_log_close = True def close_session_log(self): From baa06359ca4798dfcb39ae5bfb74a9b8c9476d52 Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Wed, 15 Jul 2020 14:09:49 -0700 Subject: [PATCH 39/42] Fix admin save and * in prompt (#1849) --- netmiko/nokia/nokia_sros_ssh.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/netmiko/nokia/nokia_sros_ssh.py b/netmiko/nokia/nokia_sros_ssh.py index 4d71ef016..98117867b 100755 --- a/netmiko/nokia/nokia_sros_ssh.py +++ b/netmiko/nokia/nokia_sros_ssh.py @@ -112,8 +112,7 @@ def check_config_mode(self, check_string=r"(ex)[", pattern=r"@"): def save_config(self, *args, **kwargs): """Persist configuration to cflash for Nokia SR OS""" - output = self.send_command(command_string="/admin save") - return output + return self.send_command(command_string="/admin save", expect_string=r"#") def send_config_set(self, config_commands=None, exit_config_mode=None, **kwargs): """Model driven CLI requires you not exit from configuration mode.""" From dca515d60fdffcced81250e85df514e1efabc5ac Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Fri, 17 Jul 2020 08:31:01 -0700 Subject: [PATCH 40/42] Add connection timeout argument (conn_timeout) (#1853) --- .gitignore | 1 + netmiko/base_connection.py | 47 ++++++++++++++----- tests/SLOG/cisco881_slog_wr.log | 1 + tests/test_netmiko_exceptions.py | 72 ++++++++++++++++++++++++++++++ tests/test_suite_alt.sh | 3 ++ tests/unit/test_base_connection.py | 9 ++-- 6 files changed, 118 insertions(+), 15 deletions(-) create mode 100755 tests/test_netmiko_exceptions.py diff --git a/.gitignore b/.gitignore index c2be9af79..c6ef50b6f 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ tests/standard_tests.sh tests/etc/test_devices.yml tests/etc/commands.yml tests/etc/responses.yml +tests/etc/test_devices_exc.yml examples/SECRET_DEVICE_CREDS.py ./build ./build/* diff --git a/netmiko/base_connection.py b/netmiko/base_connection.py index ee7d0296a..9f46e281b 100644 --- a/netmiko/base_connection.py +++ b/netmiko/base_connection.py @@ -62,11 +62,17 @@ def __init__( alt_host_keys=False, alt_key_file="", ssh_config_file=None, - timeout=100, - session_timeout=60, - auth_timeout=None, - blocking_timeout=20, - banner_timeout=15, + # + # Connect timeouts + # ssh-connect --> TCP conn (conn_timeout) --> SSH-banner (banner_timeout) + # --> Auth response (auth_timeout) + conn_timeout=5, + auth_timeout=None, # Timeout to wait for authentication response + banner_timeout=15, # Timeout to wait for the banner to be presented (post TCP-connect) + # Other timeouts + blocking_timeout=20, # Read blocking timeout + timeout=100, # TCP connect timeout | overloaded to read-loop timeout + session_timeout=60, # Used for locking/sharing the connection keepalive=0, default_enter=None, response_return=None, @@ -241,11 +247,12 @@ def __init__( self.device_type = device_type self.ansi_escape_codes = False self.verbose = verbose - self.timeout = timeout self.auth_timeout = auth_timeout self.banner_timeout = banner_timeout - self.session_timeout = session_timeout self.blocking_timeout = blocking_timeout + self.conn_timeout = conn_timeout + self.session_timeout = session_timeout + self.timeout = timeout self.keepalive = keepalive self.allow_auto_change = allow_auto_change self.encoding = encoding @@ -849,7 +856,7 @@ def _connect_params_dict(self): "key_filename": self.key_file, "pkey": self.pkey, "passphrase": self.passphrase, - "timeout": self.timeout, + "timeout": self.conn_timeout, "auth_timeout": self.auth_timeout, "banner_timeout": self.banner_timeout, "sock": self.sock, @@ -906,11 +913,27 @@ def establish_connection(self, width=511, height=1000): # initiate SSH connection try: self.remote_conn_pre.connect(**ssh_connect_params) - except socket.error: + except socket.error as conn_error: self.paramiko_cleanup() - msg = "Connection to device timed-out: {device_type} {ip}:{port}".format( - device_type=self.device_type, ip=self.host, port=self.port - ) + msg = f"""TCP connection to device failed. + +Common causes of this problem are: +1. Incorrect hostname or IP address. +2. Wrong TCP port. +3. Intermediate firewall blocking access. + +Device settings: {self.device_type} {self.host}:{self.port} + +""" + + # Handle DNS failures separately + if "Name or service not known" in str(conn_error): + msg = ( + f"DNS failure--the hostname you provided was not resolvable " + f"in DNS: {self.host}:{self.port}" + ) + + msg = msg.lstrip() raise NetmikoTimeoutException(msg) except paramiko.ssh_exception.AuthenticationException as auth_err: self.paramiko_cleanup() diff --git a/tests/SLOG/cisco881_slog_wr.log b/tests/SLOG/cisco881_slog_wr.log index 56ea3931b..e112cffa1 100644 --- a/tests/SLOG/cisco881_slog_wr.log +++ b/tests/SLOG/cisco881_slog_wr.log @@ -1,3 +1,4 @@ + cisco1# cisco1#terminal length 0 diff --git a/tests/test_netmiko_exceptions.py b/tests/test_netmiko_exceptions.py new file mode 100755 index 000000000..2ea63c13d --- /dev/null +++ b/tests/test_netmiko_exceptions.py @@ -0,0 +1,72 @@ +#!/usr/bin/env python +from os import path +from datetime import datetime +import pytest +from netmiko import ConnectHandler +from netmiko import NetmikoTimeoutException +from tests.test_utils import parse_yaml + +PWD = path.dirname(path.realpath(__file__)) +DEVICE_DICT = parse_yaml(PWD + "/etc/test_devices_exc.yml") + + +def test_valid_conn(): + """Verify device without modifications works.""" + device = DEVICE_DICT["cisco3_invalid"] + conn = ConnectHandler(**device) + assert conn.find_prompt() == "cisco3#" + + +def test_invalid_port(): + device = DEVICE_DICT["cisco3_invalid"] + device["port"] = 8022 + with pytest.raises(NetmikoTimeoutException): + ConnectHandler(**device) + + +def test_conn_timeout(): + device = DEVICE_DICT["cisco3_invalid"] + device["conn_timeout"] = 5 + device["port"] = 8022 + start_time = datetime.now() + with pytest.raises(NetmikoTimeoutException): + ConnectHandler(**device) + end_time = datetime.now() + time_delta = end_time - start_time + assert time_delta.total_seconds() > 5.0 + assert time_delta.total_seconds() < 5.1 + + +def test_dns_fail(): + device = DEVICE_DICT["cisco3_invalid"] + device["host"] = "invalid.lasthop.io" + with pytest.raises(NetmikoTimeoutException): + try: + ConnectHandler(**device) + except NetmikoTimeoutException as e: + assert "DNS failure" in str(e) + raise + + +def test_dns_fail_timeout(): + """Should fail very fast.""" + device = DEVICE_DICT["cisco3_invalid"] + device["host"] = "invalid.lasthop.io" + start_time = datetime.now() + with pytest.raises(NetmikoTimeoutException): + try: + ConnectHandler(**device) + except NetmikoTimeoutException as e: + assert "DNS failure" in str(e) + raise + end_time = datetime.now() + time_delta = end_time - start_time + assert time_delta.total_seconds() < 0.1 + + +def test_auth_timeout(): + assert True + + +def test_banner_timeout(): + assert True diff --git a/tests/test_suite_alt.sh b/tests/test_suite_alt.sh index 865a549d5..1bff3c6fd 100755 --- a/tests/test_suite_alt.sh +++ b/tests/test_suite_alt.sh @@ -4,6 +4,9 @@ RETURN_CODE=0 # Exit on the first test failure and set RETURN_CODE = 1 echo "Starting tests...good luck:" \ +&& echo "Exception and Timeout Tests" \ +&& py.test -x -s -v test_netmiko_exceptions.py \ +\ && echo "Cisco IOS-XE SSH (including SCP)" \ && py.test -v test_netmiko_scp.py --test_device cisco3 \ && py.test -v test_netmiko_show.py --test_device cisco3 \ diff --git a/tests/unit/test_base_connection.py b/tests/unit/test_base_connection.py index 8731e9cf9..5b279db88 100755 --- a/tests/unit/test_base_connection.py +++ b/tests/unit/test_base_connection.py @@ -58,6 +58,7 @@ def test_use_ssh_file(): passphrase=None, auth_timeout=None, banner_timeout=10, + conn_timeout=5, ssh_config_file=join(RESOURCE_FOLDER, "ssh_config"), sock=None, ) @@ -72,7 +73,7 @@ def test_use_ssh_file(): "look_for_keys": True, "allow_agent": False, "key_filename": "/home/user/.ssh/id_rsa", - "timeout": 60, + "timeout": 5, "pkey": None, "passphrase": None, "auth_timeout": None, @@ -101,6 +102,7 @@ def test_use_ssh_file_proxyjump(): pkey=None, passphrase=None, auth_timeout=None, + conn_timeout=5, banner_timeout=10, ssh_config_file=join(RESOURCE_FOLDER, "ssh_config_proxyjump"), sock=None, @@ -116,7 +118,7 @@ def test_use_ssh_file_proxyjump(): "look_for_keys": True, "allow_agent": False, "key_filename": "/home/user/.ssh/id_rsa", - "timeout": 60, + "timeout": 5, "pkey": None, "passphrase": None, "auth_timeout": None, @@ -145,6 +147,7 @@ def test_connect_params_dict(): passphrase=None, auth_timeout=None, banner_timeout=10, + conn_timeout=3, ssh_config_file=None, sock=None, ) @@ -157,7 +160,7 @@ def test_connect_params_dict(): "look_for_keys": True, "allow_agent": False, "key_filename": "/home/user/.ssh/id_rsa", - "timeout": 60, + "timeout": 3, "pkey": None, "passphrase": None, "auth_timeout": None, From 9c9ffb7e017c997ad717f093908e9b60fd4b1ca1 Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Fri, 31 Jul 2020 13:31:55 -0700 Subject: [PATCH 41/42] Minor test fixes and convert over to GitHub Actions --- .github/workflows/commit.yaml | 41 +++++++++++++++++++++++++ .travis.yml | 27 ---------------- requirements-dev.txt | 4 +-- tests/test_netmiko_config.py | 3 ++ tests/test_netmiko_show.py | 6 ++-- tests/test_suite_alt.sh | 8 +++++ tox.ini | 39 ----------------------- travis_ci_process.txt | 26 ---------------- travis_test.py | 56 ---------------------------------- travis_test.sh | 11 ------- travis_test_env.tar.enc | Bin 10256 -> 0 bytes 11 files changed, 57 insertions(+), 164 deletions(-) create mode 100644 .github/workflows/commit.yaml delete mode 100644 .travis.yml delete mode 100644 tox.ini delete mode 100644 travis_ci_process.txt delete mode 100644 travis_test.py delete mode 100755 travis_test.sh delete mode 100644 travis_test_env.tar.enc diff --git a/.github/workflows/commit.yaml b/.github/workflows/commit.yaml new file mode 100644 index 000000000..81baf6a08 --- /dev/null +++ b/.github/workflows/commit.yaml @@ -0,0 +1,41 @@ +--- +name: build +on: [push, pull_request] +jobs: + std_tests: + runs-on: ubuntu-latest + strategy: + max-parallel: 3 + matrix: + python-version: [3.6, 3.7, 3.8] + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Setup Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + pip install -r requirements-dev.txt + pip install -r requirements-genie.txt + + - name: Run black + run: | + black --check . + + - name: Run linter + run: | + pylama . + + - name: Run Tests + run: | + py.test -v -s tests/test_import_netmiko.py + py.test -v -s tests/unit/test_base_connection.py + py.test -v -s tests/unit/test_utilities.py + diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 0105755e4..000000000 --- a/.travis.yml +++ /dev/null @@ -1,27 +0,0 @@ ---- -language: python -python: - - "3.6" - - "3.7" - - "3.8-dev" - - "nightly" -stages: - - lint - - test -matrix: - include: - - stage: lint - name: Black - python: 3.6 - env: TOXENV=black - - stage: lint - name: Pylama - python: 3.6 - env: TOXENV=pylama - allow_failures: - - python: 3.8-dev - - python: nightly -install: - - pip install tox==3.14.5 tox-travis==0.12 -script: - - tox diff --git a/requirements-dev.txt b/requirements-dev.txt index 2a09c7a6f..862bdef84 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,7 +1,7 @@ -PyYAML==5.1.2 +black==18.9b0 +PyYAML==5.3.1 pytest==5.1.2 pylama==7.7.1 -tox==3.14.5 twine==1.13.0 pysnmp==4.4.12 pdoc3==0.6.3 diff --git a/tests/test_netmiko_config.py b/tests/test_netmiko_config.py index 5e9ab1525..e8d11c6ca 100755 --- a/tests/test_netmiko_config.py +++ b/tests/test_netmiko_config.py @@ -106,6 +106,9 @@ def test_config_from_file(net_connect, commands, expected_responses): else: print("Skipping test (no file specified)...") + if "nokia_sros" in net_connect.device_type: + net_connect.save_config() + def test_disconnect(net_connect, commands, expected_responses): """ diff --git a/tests/test_netmiko_show.py b/tests/test_netmiko_show.py index 24309a08e..e6f521930 100755 --- a/tests/test_netmiko_show.py +++ b/tests/test_netmiko_show.py @@ -122,11 +122,11 @@ def test_send_command_global_cmd_verify( def test_send_command_juniper(net_connect, commands, expected_responses): """Verify Juniper complete on space is disabled.""" - # If complete on space is enabled will get re-written to "show ipv6 neighbors" + # If complete on space is enabled will get re-written to "show configuration groups" if net_connect.device_type == "juniper_junos": - net_connect.write_channel("show ip neighbors\n") + net_connect.write_channel("show configuration gr \n") output = net_connect.read_until_prompt() - assert "show ip neighbors" in output + assert "show configuration groups" not in output else: assert pytest.skip() diff --git a/tests/test_suite_alt.sh b/tests/test_suite_alt.sh index 1bff3c6fd..e41635430 100755 --- a/tests/test_suite_alt.sh +++ b/tests/test_suite_alt.sh @@ -7,6 +7,14 @@ echo "Starting tests...good luck:" \ && echo "Exception and Timeout Tests" \ && py.test -x -s -v test_netmiko_exceptions.py \ \ +&& echo "Juniper vMX" \ +&& py.test -x -s -v test_netmiko_show.py --test_device juniper_vmx \ +&& py.test -x -s -v test_netmiko_config.py --test_device juniper_vmx \ +\ +&& echo "Nokia SR-OS" \ +&& py.test -x -s -v test_netmiko_show.py --test_device sros1 \ +&& py.test -x -s -v test_netmiko_config.py --test_device sros1 \ +\ && echo "Cisco IOS-XE SSH (including SCP)" \ && py.test -v test_netmiko_scp.py --test_device cisco3 \ && py.test -v test_netmiko_show.py --test_device cisco3 \ diff --git a/tox.ini b/tox.ini deleted file mode 100644 index 2b443c120..000000000 --- a/tox.ini +++ /dev/null @@ -1,39 +0,0 @@ -[tox] -envlist = py3{6,7,8},black,pylama -skip_missing_interpreters = true - -[travis] -python = - 3.6: py36,black,pylama - -[travis:env] -TRAVIS_BUILD_STAGE_NAME = - Lint: black,pylama - Test: py3{6,7,8} - -[testenv] -deps = - -rrequirements-dev.txt - -rrequirements-genie.txt -passenv = * - -commands = - py.test -v -s tests/test_import_netmiko.py - py.test -v -s tests/unit/test_base_connection.py - py.test -v -s tests/unit/test_utilities.py - -[testenv:black] -deps = black==18.9b0 - -basepython = python3.6 -commands = - black --check . - -[testenv:pylama] -deps = - -rrequirements-dev.txt - -basepython = python3.6 -commands = - pylama . - diff --git a/travis_ci_process.txt b/travis_ci_process.txt deleted file mode 100644 index 16eaafa63..000000000 --- a/travis_ci_process.txt +++ /dev/null @@ -1,26 +0,0 @@ -$ tar -cvpf travis_test_env.tar tests/etc/*.yml -tests/etc/commands.yml -tests/etc/responses.yml -tests/etc/test_devices.yml - -$ tar -tvpf travis_test_env.tar --rw-rw-r-- kbyers/kbyers 1776 2015-05-03 18:34 tests/etc/commands.yml --rw-rw-r-- kbyers/kbyers 1423 2015-05-03 18:35 tests/etc/responses.yml --rw-rw-r-- kbyers/kbyers 635 2015-05-15 11:01 tests/etc/test_devices.yml - -$ travis login -We need your GitHub login to identify you. -This information will not be sent to Travis CI, only to api.github.com. -The password will not be displayed. - -Try running with --github-token or --auto if you don't want to enter your password anyway. - -$ mv travis_test_env.tar.enc travis_test_env.tar.enc_old -$ travis encrypt-file travis_test_env.tar -encrypting travis_test_env.tar for ktbyers/netmiko -storing result as travis_test_env.tar.enc -storing secure env variables for decryption - -Please add the following to your build script (before_install stage in your .travis.yml, for instance): - - diff --git a/travis_test.py b/travis_test.py deleted file mode 100644 index a35672316..000000000 --- a/travis_test.py +++ /dev/null @@ -1,56 +0,0 @@ -""" -Delay the Travis CI testing for Python versions so that they don't interfere with each other -""" - -from __future__ import print_function - -import re -import os -import time -import sys - -TRAVIS_DELAY = 0 - - -def main(): - """ - Delay the Travis CI testing for Python versions so that they don't interfere with each other - """ - python_version = "{0}.{1}".format(sys.version_info[0], sys.version_info[1]) - - if re.search(r"^3.5", python_version): - total_delay = 0 * TRAVIS_DELAY - print("Python 3.5 found") - print("Sleeping for {0} seconds".format(total_delay)) - time.sleep(total_delay) - elif re.search(r"^3.4", python_version): - total_delay = 1 * TRAVIS_DELAY - print("Python 3.4 found") - print("Sleeping for {0} seconds".format(total_delay)) - time.sleep(total_delay) - elif re.search(r"^3.3", python_version): - total_delay = 2 * TRAVIS_DELAY - print("Python 3.3 found") - print("Sleeping for {0} seconds".format(total_delay)) - time.sleep(total_delay) - elif re.search(r"^2.7", python_version): - total_delay = 3 * TRAVIS_DELAY - print("Python 2.7 found") - print("Sleeping for {0} seconds".format(total_delay)) - time.sleep(total_delay) - elif re.search(r"^2.6", python_version): - total_delay = 4 * TRAVIS_DELAY - print("Python 2.6 found") - print("Sleeping for {0} seconds".format(total_delay)) - - # Execute the unit tests - return_code = os.system("sh travis_test.sh") - # return_code comes back as 256 on failure and sys.exit is only 8-bit - if return_code != 0: - sys.exit(1) - else: - sys.exit(0) - - -if __name__ == "__main__": - main() diff --git a/travis_test.sh b/travis_test.sh deleted file mode 100755 index 973f45e71..000000000 --- a/travis_test.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -# Execute the unit tests in Travis CI -RETURN_CODE=0 -cd tests -./test_suite.sh -if [ $? -ne 0 ]; then - RETURN_CODE=1 -fi - -exit $RETURN_CODE diff --git a/travis_test_env.tar.enc b/travis_test_env.tar.enc deleted file mode 100644 index 46272c344c1d56ececa05d6c637f7d69753876fa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10256 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%0ArC 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 WRD>71{x`*@mzwlf?uX<4{3?*Zecsgo From 29f6691fadb31cb16a6320761d24742a7a4a4044 Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Fri, 31 Jul 2020 13:38:40 -0700 Subject: [PATCH 42/42] Netmiko 3.2.0 Release (#1868) --- netmiko/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netmiko/__init__.py b/netmiko/__init__.py index 6a405879d..bfa164ce8 100644 --- a/netmiko/__init__.py +++ b/netmiko/__init__.py @@ -23,7 +23,7 @@ # Alternate naming Netmiko = ConnectHandler -__version__ = "3.1.1" +__version__ = "3.2.0" __all__ = ( "ConnectHandler", "ssh_dispatcher",