You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But I am not able to figure out how to send the enable password to Cisco IOS with NAPALM script above.
Getting below error when trying execute:
ubuntu@ubuntu:~/Sripts$ python3 ios_napalm.py
/usr/lib/python3/dist-packages/pkg_resources/init.py:116: PkgResourcesDeprecationWarning: 1.1build1 is an invalid version and will not be supported in a future release
warnings.warn(
/usr/lib/python3/dist-packages/pkg_resources/init.py:116: PkgResourcesDeprecationWarning: 0.1.43ubuntu1 is an invalid version and will not be supported in a future release
warnings.warn(
/usr/lib/python3/dist-packages/pkg_resources/init.py:116: PkgResourcesDeprecationWarning: 1.1build1 is an invalid version and will not be supported in a future release
warnings.warn(
/usr/lib/python3/dist-packages/pkg_resources/init.py:116: PkgResourcesDeprecationWarning: 0.1.43ubuntu1 is an invalid version and will not be supported in a future release
warnings.warn(
Accessing device 192.168.60.152
Traceback (most recent call last):
File "/home/ubuntu/Sripts/ios_napalm.py", line 9, in
device.open()
File "/home/ubuntu/.local/lib/python3.10/site-packages/napalm/ios/ios.py", line 172, in open
self.device = self._netmiko_open(
File "/home/ubuntu/.local/lib/python3.10/site-packages/napalm/base/base.py", line 129, in _netmiko_open
self._netmiko_device.enable()
File "/home/ubuntu/.local/lib/python3.10/site-packages/netmiko/cisco_base_connection.py", line 26, in enable
return super().enable(
File "/home/ubuntu/.local/lib/python3.10/site-packages/netmiko/base_connection.py", line 2008, in enable
output += self.read_until_prompt()
File "/home/ubuntu/.local/lib/python3.10/site-packages/netmiko/base_connection.py", line 812, in read_until_prompt
return self.read_until_pattern(
File "/home/ubuntu/.local/lib/python3.10/site-packages/netmiko/base_connection.py", line 721, in read_until_pattern
raise ReadTimeout(msg)
netmiko.exceptions.ReadTimeout:
Pattern not detected: 'router' in output.
Things you might try to fix this:
Adjust the regex pattern to better identify the terminating string. Note, in
many situations the pattern is automatically based on the network device's prompt.
Increase the read_timeout to a larger value.
You can also look at the Netmiko session_log or debug log for more information.
Using Python 3.10.6, Installed libraries as below:
paramiko 3.1.0
netmiko 4.2.0
napalm 4.1.0
Router Info:
router>en
Password:
router#show ver
Cisco IOS Software, IOSv Software (VIOS-ADVENTERPRISEK9-M), Version 15.5(3)M, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2015 by Cisco Systems, Inc.
Compiled Wed 22-Jul-15 23:04 by prod_rel_team
Thanks in advance for your support
The text was updated successfully, but these errors were encountered:
Dears,
Apologies for simple question, but I am getting confused with this:
I am trying to use the below simple NAPALM script to automate Cisco IOS devices.
from napalm import get_network_driver
import pprint
import getpass
driver = get_network_driver('ios')
device = driver('192.168.60.152', 'admin', 'cisco')
print('Accessing device 192.168.60.152')
device.open()
facts = device.get_facts()
print(facts)
device.close()
But I am not able to figure out how to send the enable password to Cisco IOS with NAPALM script above.
Getting below error when trying execute:
ubuntu@ubuntu:~/Sripts$ python3 ios_napalm.py
/usr/lib/python3/dist-packages/pkg_resources/init.py:116: PkgResourcesDeprecationWarning: 1.1build1 is an invalid version and will not be supported in a future release
warnings.warn(
/usr/lib/python3/dist-packages/pkg_resources/init.py:116: PkgResourcesDeprecationWarning: 0.1.43ubuntu1 is an invalid version and will not be supported in a future release
warnings.warn(
/usr/lib/python3/dist-packages/pkg_resources/init.py:116: PkgResourcesDeprecationWarning: 1.1build1 is an invalid version and will not be supported in a future release
warnings.warn(
/usr/lib/python3/dist-packages/pkg_resources/init.py:116: PkgResourcesDeprecationWarning: 0.1.43ubuntu1 is an invalid version and will not be supported in a future release
warnings.warn(
Accessing device 192.168.60.152
Traceback (most recent call last):
File "/home/ubuntu/Sripts/ios_napalm.py", line 9, in
device.open()
File "/home/ubuntu/.local/lib/python3.10/site-packages/napalm/ios/ios.py", line 172, in open
self.device = self._netmiko_open(
File "/home/ubuntu/.local/lib/python3.10/site-packages/napalm/base/base.py", line 129, in _netmiko_open
self._netmiko_device.enable()
File "/home/ubuntu/.local/lib/python3.10/site-packages/netmiko/cisco_base_connection.py", line 26, in enable
return super().enable(
File "/home/ubuntu/.local/lib/python3.10/site-packages/netmiko/base_connection.py", line 2008, in enable
output += self.read_until_prompt()
File "/home/ubuntu/.local/lib/python3.10/site-packages/netmiko/base_connection.py", line 812, in read_until_prompt
return self.read_until_pattern(
File "/home/ubuntu/.local/lib/python3.10/site-packages/netmiko/base_connection.py", line 721, in read_until_pattern
raise ReadTimeout(msg)
netmiko.exceptions.ReadTimeout:
Pattern not detected: 'router' in output.
Things you might try to fix this:
Adjust the regex pattern to better identify the terminating string. Note, in
many situations the pattern is automatically based on the network device's prompt.
Increase the read_timeout to a larger value.
You can also look at the Netmiko session_log or debug log for more information.
Using Python 3.10.6, Installed libraries as below:
paramiko 3.1.0
netmiko 4.2.0
napalm 4.1.0
Router Info:
router>en
Password:
router#show ver
Cisco IOS Software, IOSv Software (VIOS-ADVENTERPRISEK9-M), Version 15.5(3)M, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2015 by Cisco Systems, Inc.
Compiled Wed 22-Jul-15 23:04 by prod_rel_team
Thanks in advance for your support
The text was updated successfully, but these errors were encountered: