Closed NtwkEngineer closed 6 years ago
And actually, I'm seeing the same issue with IOS-XE on a 4500-X running 03.06.00.E. Same workaround as well.
@NtwkEngineer You should use send_config_set()
method to send configuration changes and not try to manually enter/exit config mode.
send_config_set()
will automatically enter/exit config mode.
For example:
config_commands=[cmd1, cmd2]
net_connect.send_config_set(config_commands)
Perfect, thanks Kirk!
Hi Kirk:
I am seeing the following when trying to send configuration commands to an NX-OS device (Nexus 3048 running 6.0(2)U3(7)):
u'config term\r\r\nEnter configuration commands, one per line. End with CNTL/Z.\r\n\rNexus3K(config)# '
Traceback (most recent call last): File "", line 1, in
File "build/bdist.linux-x86_64/egg/netmiko/base_connection.py", line 967, in send_command
IOError: Search pattern never detected in send_command_expect: Nexus3K(config)#
u''
Given that it's returning a unicode '', I was able to work around this in my script by using the 'expect_string' option in .send_command():
u''
Is this expected behavior, or should netmiko be handling this differently?
Thanks!
-Matt