Extreme ERS Netmiko 4 - Pattern not detected: '[>#]' in output.
See original GitHub issueHello, I am using a simple script to configure SNMPv3 username and password. With Netmiko 3 it works perfectly but with Netmiko 4 I get an error:
Pattern not detected: ‘[>#]’ in output.
def connect_to_switch(ip, comms):
print(f"Connecting to {ip}")
switch = {
'device_type': 'extreme_ers',
'host': ip,
'username': 'USERNAME',
'password': 'PASSWORD',
"global_delay_factor": 2
}
net_connect = ConnectHandler(**switch)
net_connect.special_login_handler()
for command in comms:
v = net_connect.send_command(command, expect_string=r'#')
print(v)
net_connect.disconnect()
if __name__ == "__main__":
# Commands to sent
commands = ['configure terminal',
"snmp-server user SNMPUSERNAME sha SECURE_PASS aes SECURE_PASS read-view snmpv1Objs",
"wr mem",
]
connect_to_switch('10.10.10.10', commands)
Here is the DEBUG log file. The “host1#” is there and it should match the but somehow it does not understand the pattern.
DEBUG:netmiko:read_channel: DEBUG:netmiko:write_channel: b’\n’ DEBUG:netmiko:read_channel: [2J[0m[0;0f[1;1H[2;1H[3;1H[4;1H[5;1H[6;1H[7;1H[8;1H[9;1H[10;1H[11;1H[12;1H[13;1H[14;1H[15;1H[14;1HEnter Ctrl-Y to begin.[16;3H[17;3H Ethernet Routing Switch 4926GTS-PWR+ [17;76H[18;3H Copyright © 1996-2021 Extreme Networks. All rights reserved. [19;3H This product is protected by one or more US patents listed [20;3H at http://www.extremenetworks.com/patents along with [21;3H their foreign counterparts. [22;3H [23;3H HW:01 FW:7.5.0.4 SW:v7.8.4.013[23;76H[24;3H************[?25l DEBUG:netmiko:write_channel: b’\x19’ DEBUG:netmiko:read_channel: [2J[18;1H[2K[19;1H[2K[20;1H[2K[2J[4;14HLast login: – [5;14HFailed retries since last login: 0 [10;0HPress ENTER to continue [24;1H DEBUG:netmiko:read_channel: DEBUG:netmiko:write_channel: b’\n’ DEBUG:netmiko:read_channel: [2J[?25h[2J[23;1H host1# DEBUG:netmiko:read_channel: DEBUG:netmiko:write_channel: b’\n’ DEBUG:netmiko:read_channel: host1# DEBUG:netmiko:read_channel: DEBUG:netmiko:write_channel: b’\n’ DEBUG:netmiko:read_channel: host1# DEBUG:netmiko:read_channel: DEBUG:netmiko:write_channel: b’\n’ DEBUG:netmiko:read_channel: host1# DEBUG:netmiko:read_channel: DEBUG:netmiko:write_channel: b’\n’ DEBUG:netmiko:read_channel: host1# DEBUG:netmiko:read_channel: DEBUG:netmiko:read_channel: DEBUG:netmiko:read_channel: DEBUG:netmiko:read_channel: DEBUG:netmiko:read_channel: DEBUG:netmiko:read_channel: DEBUG:netmiko:read_channel: DEBUG:netmiko:read_channel: DEBUG:netmiko:read_channel: DEBUG:netmiko:read_channel: DEBUG:netmiko:read_channel: DEBUG:netmiko:read_channel: DEBUG:netmiko:read_channel: DEBUG:netmiko:read_channel: DEBUG:netmiko:read_channel:
DEBUG:netmiko:write_channel: b’\n’ DEBUG:netmiko:read_channel:
DEBUG:netmiko:read_channel: host1# DEBUG:netmiko:read_channel: DEBUG:netmiko:read_channel: DEBUG:netmiko:write_channel: b’exit\n’ DEBUG:paramiko.transport:EOF in transport thread
Issue Analytics
- State:
- Created a year ago
- Comments:10 (6 by maintainers)
Top GitHub Comments
@ktbyers
Hey Kirk, Tested with my device and it works now!
On all current models the behaviour over SSH is username/password first, then Ctrl+Y, then Enter. This may differ over console connections and some older, end-of-life models but I believe it is true for all ERS models that are still supported by Extreme.