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/.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/.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/EXAMPLES.md b/EXAMPLES.md new file mode 100644 index 000000000..cf995ef87 --- /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-1) + +#### 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/PLATFORMS.md b/PLATFORMS.md index 859a327b3..f86240b8a 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) @@ -45,6 +47,8 @@ - Ruijie Networks - Ubiquiti EdgeSwitch - Vyatta VyOS +- Yamaha +- ZTE ZXROS ###### Experimental @@ -72,7 +76,9 @@ - Nokia/Alcatel SR-OS - QuantaMesh - Rad ETX +- Raisecom ROAP - Sophos SFOS - Ubiquiti Unifi Switch - Versa Networks FlexVNF - Watchguard Firebox +- 6WIND TurboRouter diff --git a/README.md b/README.md index 3fc64774c..3f8cd6203 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 ======= @@ -64,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/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 b130f3029..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.""" @@ -1050,11 +1055,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 +1078,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( @@ -1961,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.

@@ -2091,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 @@ -2139,6 +2142,7 @@

Classes

allow_auto_change=False, encoding="ascii", sock=None, + auto_connect=True, ): """ Initialize attributes for establishing connection to target device. @@ -2265,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 @@ -2385,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.""" @@ -3083,11 +3091,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 +3114,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( @@ -3998,6 +4000,7 @@

Subclasses

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

    @@ -4195,11 +4198,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 +5372,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
    @@ -5723,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.

    @@ -5853,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 new file mode 100644 index 000000000..a3bebb600 --- /dev/null +++ b/docs/netmiko/centec/centec_os.html @@ -0,0 +1,743 @@ + + + + + + +netmiko.centec.centec_os API documentation + + + + + + + + + +
    +
    +
    +

    Module netmiko.centec.centec_os

    +
    +
    +

    Centec OS Support

    +
    +Source code +
    """Centec OS Support"""
    +from netmiko.cisco_base_connection import CiscoBaseConnection
    +import time
    +
    +
    +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()
    +        # Clear the read buffer
    +        time.sleep(0.3 * self.global_delay_factor)
    +        self.clear_buffer()
    +
    +    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, 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 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()
    +        # Clear the read buffer
    +        time.sleep(0.3 * self.global_delay_factor)
    +        self.clear_buffer()
    +
    +    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()
    +    # 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, 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 CentecOSSSH(CentecOSBase):
    +
    +    pass
    +
    +

    Ancestors

    + +

    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, 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 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..c2828c430 --- /dev/null +++ b/docs/netmiko/centec/index.html @@ -0,0 +1,476 @@ + + + + + + +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 OS 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, 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 CentecOSSSH(CentecOSBase):
    +
    +    pass
    +
    +

    Ancestors

    + +

    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, 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 CentecOSTelnet(CentecOSBase):
    +
    +    pass
    +
    +

    Ancestors

    + +

    Inherited members

    + +
    +
    +
    +
    + +
    + + + + + \ No newline at end of file diff --git a/docs/netmiko/checkpoint/checkpoint_gaia_ssh.html b/docs/netmiko/checkpoint/checkpoint_gaia_ssh.html index 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 29ae6d36b..fc28bb28d 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. @@ -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 @@ -421,7 +425,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. @@ -620,6 +624,7 @@

    Ancestors

    Subclasses

    Methods

    @@ -681,14 +688,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.
     
    @@ -992,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.

    @@ -1121,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 @@ -1140,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 282d0540e..2000c6740 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 "" @@ -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 @@ -227,7 +231,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 +300,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..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 @@ -188,7 +192,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 +261,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/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 de8c05f6d..1ed740f9a 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) @@ -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 @@ -312,7 +316,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 +430,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..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 @@ -211,7 +215,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 +329,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/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 86dd935ee..a28f6fa3e 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.""" @@ -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 @@ -295,8 +299,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..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 @@ -456,8 +464,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.""" @@ -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 54220c5da..5fa28d437 100644 --- a/docs/netmiko/index.html +++ b/docs/netmiko/index.html @@ -101,10 +101,18 @@

    Sub-modules

    Base connection class for netmiko …

    +
    netmiko.broadcom
    +
    +
    +
    netmiko.calix
    +
    netmiko.centec
    +
    +
    +
    netmiko.checkpoint
    @@ -257,6 +265,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 @@ -295,6 +307,14 @@

    Sub-modules

    +
    netmiko.yamaha
    +
    +
    +
    +
    netmiko.zte
    +
    +
    +
    @@ -512,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.

    @@ -642,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 @@ -690,6 +714,7 @@

    Classes

    allow_auto_change=False, encoding="ascii", sock=None, + auto_connect=True, ): """ Initialize attributes for establishing connection to target device. @@ -816,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 @@ -936,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.""" @@ -1634,11 +1663,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 +1686,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( @@ -2549,6 +2572,7 @@

    Subclasses

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

    @@ -2746,11 +2770,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 +3944,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
    @@ -4390,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"{" @@ -4461,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()
    @@ -5002,7 +5026,9 @@

    Index

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

    Index

  • netmiko.ruijie
  • netmiko.scp_functions
  • netmiko.scp_handler
  • +
  • netmiko.sixwind
  • netmiko.snmp_autodetect
  • netmiko.sophos
  • netmiko.ssh_autodetect
  • @@ -5050,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 new file mode 100644 index 000000000..31d5ad446 --- /dev/null +++ b/docs/netmiko/sixwind/index.html @@ -0,0 +1,277 @@ + + + + + + +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, 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 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..4368a5572 --- /dev/null +++ b/docs/netmiko/sixwind/sixwind_os.html @@ -0,0 +1,840 @@ + + + + + + +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, 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 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, 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 SixwindOSSSH(SixwindOSBase):
    +
    +    pass
    +
    +

    Ancestors

    + +

    Inherited members

    + +
    +
    +
    +
    + +
    + + + + + \ No newline at end of file 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/examples/adding_delay/add_delay.py b/examples/adding_delay/add_delay.py deleted file mode 100755 index 4bf1e9252..000000000 --- a/examples/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/asa_upgrade.py b/examples/asa_upgrade.py deleted file mode 100755 index 93abf8025..000000000 --- a/examples/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/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/configuration_changes/change_file.txt b/examples/configuration_changes/change_file.txt deleted file mode 100644 index b331444e6..000000000 --- a/examples/configuration_changes/change_file.txt +++ /dev/null @@ -1,2 +0,0 @@ -logging buffered 8000 -logging console diff --git a/examples/configuration_changes/config_changes.py b/examples/configuration_changes/config_changes.py deleted file mode 100755 index 317e65503..000000000 --- a/examples/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/configuration_changes/config_changes_from_file.py b/examples/configuration_changes/config_changes_from_file.py deleted file mode 100755 index e76c2f4a8..000000000 --- a/examples/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/configuration_changes/config_changes_to_device_list.py b/examples/configuration_changes/config_changes_to_device_list.py deleted file mode 100644 index b33e5f9b8..000000000 --- a/examples/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/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/connect_multiple_devices/connect_multiple.py b/examples/connect_multiple_devices/connect_multiple.py deleted file mode 100755 index 14f53a663..000000000 --- a/examples/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/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/enable/enable.py b/examples/enable/enable.py deleted file mode 100755 index 13c44c0d2..000000000 --- a/examples/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/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/handle_prompts/handle_prompts.py b/examples/handle_prompts/handle_prompts.py deleted file mode 100755 index b9a86d4ef..000000000 --- a/examples/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/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/show_command/show_command.py b/examples/show_command/show_command.py deleted file mode 100755 index 9925b693d..000000000 --- a/examples/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/show_command/show_command_textfsm.py b/examples/show_command/show_command_textfsm.py deleted file mode 100755 index b348c21a9..000000000 --- a/examples/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/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/simple_connection/simple_conn.py b/examples/simple_connection/simple_conn.py deleted file mode 100755 index 4ab34b32b..000000000 --- a/examples/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/simple_connection/simple_conn_dict.py b/examples/simple_connection/simple_conn_dict.py deleted file mode 100755 index 870835eeb..000000000 --- a/examples/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/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/troubleshooting/enable_logging.py b/examples/troubleshooting/enable_logging.py deleted file mode 100755 index c1bbb85d5..000000000 --- a/examples/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/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/use_cases/case12_telnet/conn_telnet.py b/examples_old/case12_telnet/conn_telnet.py similarity index 100% rename from examples/use_cases/case12_telnet/conn_telnet.py rename to examples_old/case12_telnet/conn_telnet.py diff --git a/examples/use_cases/case15_netmiko_tools/.netmiko.yml_example b/examples_old/case15_netmiko_tools/.netmiko.yml_example similarity index 100% rename from examples/use_cases/case15_netmiko_tools/.netmiko.yml_example rename to examples_old/case15_netmiko_tools/.netmiko.yml_example diff --git a/examples/use_cases/case15_netmiko_tools/vlans.txt b/examples_old/case15_netmiko_tools/vlans.txt similarity index 100% rename from examples/use_cases/case15_netmiko_tools/vlans.txt rename to examples_old/case15_netmiko_tools/vlans.txt diff --git a/examples/use_cases/case16_concurrency/my_devices.py b/examples_old/case16_concurrency/my_devices.py similarity index 100% rename from examples/use_cases/case16_concurrency/my_devices.py rename to examples_old/case16_concurrency/my_devices.py diff --git a/examples/use_cases/case16_concurrency/processes_netmiko.py b/examples_old/case16_concurrency/processes_netmiko.py similarity index 100% rename from examples/use_cases/case16_concurrency/processes_netmiko.py rename to examples_old/case16_concurrency/processes_netmiko.py diff --git a/examples/use_cases/case16_concurrency/processes_netmiko_queue.py b/examples_old/case16_concurrency/processes_netmiko_queue.py similarity index 100% rename from examples/use_cases/case16_concurrency/processes_netmiko_queue.py rename to examples_old/case16_concurrency/processes_netmiko_queue.py diff --git a/examples/use_cases/case16_concurrency/threads_netmiko.py b/examples_old/case16_concurrency/threads_netmiko.py similarity index 100% rename from examples/use_cases/case16_concurrency/threads_netmiko.py rename to examples_old/case16_concurrency/threads_netmiko.py diff --git a/examples/use_cases/case17_jinja2/jinja2_crypto.py b/examples_old/case17_jinja2/jinja2_crypto.py similarity index 100% rename from examples/use_cases/case17_jinja2/jinja2_crypto.py rename to examples_old/case17_jinja2/jinja2_crypto.py diff --git a/examples/use_cases/case17_jinja2/jinja2_for_loop.py b/examples_old/case17_jinja2/jinja2_for_loop.py similarity index 100% rename from examples/use_cases/case17_jinja2/jinja2_for_loop.py rename to examples_old/case17_jinja2/jinja2_for_loop.py diff --git a/examples/use_cases/case17_jinja2/jinja2_ospf_file.py b/examples_old/case17_jinja2/jinja2_ospf_file.py similarity index 100% rename from examples/use_cases/case17_jinja2/jinja2_ospf_file.py rename to examples_old/case17_jinja2/jinja2_ospf_file.py diff --git a/examples/use_cases/case17_jinja2/jinja2_vlans.py b/examples_old/case17_jinja2/jinja2_vlans.py similarity index 100% rename from examples/use_cases/case17_jinja2/jinja2_vlans.py rename to examples_old/case17_jinja2/jinja2_vlans.py diff --git a/examples/use_cases/case17_jinja2/ospf_config.j2 b/examples_old/case17_jinja2/ospf_config.j2 similarity index 100% rename from examples/use_cases/case17_jinja2/ospf_config.j2 rename to examples_old/case17_jinja2/ospf_config.j2 diff --git a/examples/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/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/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/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/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/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/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/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/use_cases/case7_commit/config_change_jnpr.py b/examples_old/case7_commit/config_change_jnpr.py similarity index 100% rename from examples/use_cases/case7_commit/config_change_jnpr.py rename to examples_old/case7_commit/config_change_jnpr.py diff --git a/examples/use_cases/case11_logging/write_channel.py b/examples_old/write_channel.py similarity index 100% rename from examples/use_cases/case11_logging/write_channel.py rename to examples_old/write_channel.py diff --git a/images/netmiko_logo_gh.png b/images/netmiko_logo_gh.png new file mode 100644 index 000000000..7ffcf67c9 Binary files /dev/null and b/images/netmiko_logo_gh.png differ diff --git a/netmiko/__init__.py b/netmiko/__init__.py index 66b3d6cb1..bfa164ce8 100644 --- a/netmiko/__init__.py +++ b/netmiko/__init__.py @@ -18,12 +18,12 @@ ) 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 -__version__ = "3.1.1" +__version__ = "3.2.0" __all__ = ( "ConnectHandler", "ssh_dispatcher", @@ -40,6 +40,7 @@ "BaseConnection", "Netmiko", "file_transfer", + "progress_bar", ) # Cisco cntl-shift-six sequence 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/netmiko/aruba/aruba_ssh.py b/netmiko/aruba/aruba_ssh.py index 3338ccd0a..6651e7be7 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() diff --git a/netmiko/base_connection.py b/netmiko/base_connection.py index 185038cbf..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, @@ -78,6 +84,7 @@ def __init__( allow_auto_change=False, encoding="ascii", sock=None, + auto_connect=True, ): """ Initialize attributes for establishing connection to target device. @@ -204,6 +211,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 @@ -237,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 @@ -312,7 +323,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 @@ -324,7 +337,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.""" @@ -701,14 +715,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 @@ -840,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, @@ -897,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() @@ -1022,11 +1054,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 +1077,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( @@ -1106,7 +1132,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 @@ -1803,8 +1828,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" @@ -1813,19 +1836,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" @@ -1836,7 +1859,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, @@ -1850,6 +1872,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, @@ -1862,9 +1885,12 @@ def strip_ansi_escape_codes(self, string_buffer): # 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)}") + # 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 @@ -1906,9 +1932,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): 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/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..b0411ae28 --- /dev/null +++ b/netmiko/centec/centec_os.py @@ -0,0 +1,30 @@ +"""Centec OS Support""" +from netmiko.cisco_base_connection import CiscoBaseConnection +import time + + +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() + # Clear the read buffer + time.sleep(0.3 * self.global_delay_factor) + self.clear_buffer() + + 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/cisco/cisco_asa_ssh.py b/netmiko/cisco/cisco_asa_ssh.py index 5aece81ca..cdad7a3d1 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 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) @@ -106,11 +109,14 @@ def asa_login(self): 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( diff --git a/netmiko/cisco/cisco_ios.py b/netmiko/cisco/cisco_ios.py index 932f3c135..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 @@ -169,7 +180,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"{" 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/cisco_base_connection.py b/netmiko/cisco_base_connection.py index bc8031ac6..112a6764e 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. @@ -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/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/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. 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.""" 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/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.""" 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/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.""" diff --git a/netmiko/sixwind/__init__.py b/netmiko/sixwind/__init__.py new file mode 100644 index 000000000..8d36e89b7 --- /dev/null +++ b/netmiko/sixwind/__init__.py @@ -0,0 +1,3 @@ +from netmiko.sixwind.sixwind_os import SixwindOSSSH + +__all__ = ["SixwindOSSSH"] diff --git a/netmiko/sixwind/sixwind_os.py b/netmiko/sixwind/sixwind_os.py new file mode 100644 index 000000000..e6ffc6dd2 --- /dev/null +++ b/netmiko/sixwind/sixwind_os.py @@ -0,0 +1,101 @@ +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 diff --git a/netmiko/ssh_autodetect.py b/netmiko/ssh_autodetect.py index c9e65f0d7..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": [ @@ -193,6 +199,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 f45064914..b1992faf1 100755 --- a/netmiko/ssh_dispatcher.py +++ b/netmiko/ssh_dispatcher.py @@ -6,7 +6,9 @@ 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 from netmiko.ciena import CienaSaosSSH, CienaSaosTelnet, CienaSaosFileTransfer from netmiko.cisco import CiscoAsaSSH, CiscoAsaFileTransfer @@ -71,9 +73,12 @@ 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 +from netmiko.sixwind import SixwindOSSSH from netmiko.sophos import SophosSfosSSH from netmiko.terminal_server import TerminalServerSSH from netmiko.terminal_server import TerminalServerTelnet @@ -81,7 +86,13 @@ 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 +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 = { @@ -94,6 +105,7 @@ "aruba_os": ArubaSSH, "avaya_ers": ExtremeErsSSH, "avaya_vsp": ExtremeVspSSH, + "broadcom_icos": BroadcomIcosSSH, "brocade_fastiron": RuckusFastironSSH, "brocade_netiron": ExtremeNetironSSH, "brocade_nos": ExtremeNosSSH, @@ -101,6 +113,7 @@ "brocade_vyos": VyOSSSH, "checkpoint_gaia": CheckPointGaiaSSH, "calix_b6": CalixB6SSH, + "centec_os": CentecOSSSH, "ciena_saos": CienaSaosSSH, "cisco_asa": CiscoAsaSSH, "cisco_ios": CiscoIosSSH, @@ -138,6 +151,7 @@ "f5_linux": F5LinuxSSH, "flexvnf": FlexvnfSSH, "fortinet": FortinetSSH, + "generic": GenericSSH, "generic_termserver": TerminalServerSSH, "hp_comware": HPComwareSSH, "hp_procurve": HPProcurveSSH, @@ -167,8 +181,10 @@ "pluribus": PluribusSSH, "quanta_mesh": QuantaMeshSSH, "rad_etx": RadETXSSH, + "raisecom_roap": RaisecomRoapSSH, "ruckus_fastiron": RuckusFastironSSH, "ruijie_os": RuijieOSSSH, + "sixwind_os": SixwindOSSSH, "sophos_sfos": SophosSfosSSH, "ubiquiti_edge": UbiquitiEdgeSSH, "ubiquiti_edgeswitch": UbiquitiEdgeSSH, @@ -176,6 +192,8 @@ "vyatta_vyos": VyOSSSH, "vyos": VyOSSSH, "watchguard_fireware": WatchguardFirewareSSH, + "zte_zxros": ZteZxrosSSH, + "yamaha": YamahaSSH, } FILE_TRANSFER_MAP = { @@ -213,6 +231,7 @@ CLASS_MAPPER["brocade_fastiron_telnet"] = RuckusFastironTelnet CLASS_MAPPER["brocade_netiron_telnet"] = ExtremeNetironTelnet CLASS_MAPPER["calix_b6_telnet"] = CalixB6Telnet +CLASS_MAPPER["centec_os_telnet"] = CentecOSTelnet CLASS_MAPPER["ciena_saos_telnet"] = CienaSaosTelnet CLASS_MAPPER["cisco_ios_telnet"] = CiscoIosTelnet CLASS_MAPPER["cisco_xr_telnet"] = CiscoXrTelnet @@ -222,6 +241,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 @@ -232,8 +252,11 @@ 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 +CLASS_MAPPER["zte_zxros_telnet"] = ZteZxrosTelnet # Add serial drivers CLASS_MAPPER["cisco_ios_serial"] = CiscoIosSerial @@ -254,15 +277,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/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/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) diff --git a/requirements-dev.txt b/requirements-dev.txt index ac8acc0d6..862bdef84 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,8 +1,8 @@ -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.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' 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/etc/commands.yml.example b/tests/etc/commands.yml.example index bb254cab1..8d72722dc 100644 --- a/tests/etc/commands.yml.example +++ b/tests/etc/commands.yml.example @@ -415,6 +415,16 @@ 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" + config_verification: "show running-config | include ip access-list centec" + 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 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 diff --git a/tests/test_netmiko_config.py b/tests/test_netmiko_config.py index 79fe02cb9..e8d11c6ca 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 @@ -93,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_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_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 865a549d5..e41635430 100755 --- a/tests/test_suite_alt.sh +++ b/tests/test_suite_alt.sh @@ -4,6 +4,17 @@ 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 "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/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 diff --git a/tests/unit/test_base_connection.py b/tests/unit/test_base_connection.py index 81d1af3cc..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, @@ -449,7 +452,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 +466,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" 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 46272c344..000000000 Binary files a/travis_test_env.tar.enc and /dev/null differ