napalm-automation / napalm-ansible

Apache License 2.0
246 stars 103 forks source link

Issue with IOS module after upgrading to napalm-ansible 0.9.0 #122

Closed Joevilla closed 5 years ago

Joevilla commented 6 years ago

After upgrading to the new napalm-ansible 0.9.0. Any play I run for ios fails with the below. EOS and NXOS are fine. It was installed via the setup command sudo python ./setup.py install

FAILED! => {"changed": false, "failed": true, "msg": "cannot connect to device: Cannot import "napalm_ios". Is the library installed?"}

sudo pip freeze | grep napalm napalm==2.3.0 napalm-ansible==0.9.0 napalm-base==0.25.0 napalm-eos==0.5.2 napalm-fortios==0.3.1 napalm-ibm==0.1.6 napalm-ios==0.8.1 napalm-iosxr==0.4.6 napalm-junos==0.6.2 napalm-nxos==0.7.0 napalm-panos==0.3.0 napalm-pluribus==0.5.0 napalm-ros==0.2.0 napalm-vyos==0.1.2 napalm-yang==0.0.7

jvill@mgt1:~/ansible> python -c "from napalm.ios import IOSDriver" Traceback (most recent call last): File "", line 1, in File "/opt/ixea/lib/python2.7/site-packages/napalm/ios/init.py", line 16, in from napalm.ios.ios import IOSDriver File "/opt/ixea/lib/python2.7/site-packages/napalm/ios/ios.py", line 28, in from netmiko import ConnectHandler, FileTransfer, InLineTransfer File "/opt/ixea/lib/python2.7/site-packages/netmiko/init.py", line 8, in from netmiko.ssh_dispatcher import ConnectHandler File "/opt/ixea/lib/python2.7/site-packages/netmiko/ssh_dispatcher.py", line 4, in from netmiko.a10 import A10SSH File "/opt/ixea/lib/python2.7/site-packages/netmiko/a10/init.py", line 2, in from netmiko.a10.a10_ssh import A10SSH File "/opt/ixea/lib/python2.7/site-packages/netmiko/a10/a10_ssh.py", line 4, in from netmiko.cisco_base_connection import CiscoSSHConnection File "/opt/ixea/lib/python2.7/site-packages/netmiko/cisco_base_connection.py", line 3, in from netmiko.base_connection import BaseConnection File "/opt/ixea/lib/python2.7/site-packages/netmiko/base_connection.py", line 24, in from netmiko.utilities import write_bytes, check_serial_port, get_structured_data File "/opt/ixea/lib/python2.7/site-packages/netmiko/utilities.py", line 8, in import serial.tools.list_ports

        napalm.get_network_driver('ios')
        Traceback (most recent call last):
        File "", line 1, in
        File "/opt/jons/lib/python2.7/site-packages/napalm/base/init.py", line 95, in get_network_driver
        install_name=module_install_name
        napalm.base.exceptions.ModuleImportError: Cannot import "napalm.ios". Is the library installed?
itdependsnetworks commented 6 years ago

I believe you need to upgrade to napalm 2.X as well.

Joevilla commented 6 years ago

Thanks Ken which version? I have napalm==2.3.0 installed

itdependsnetworks commented 6 years ago

That should work. I suspect you need to set ansible_python_interpreter: "python". If that doesn't work, if may be easier to help on slack: http://slack.networktocode.com

Joevilla commented 6 years ago

Yes I have that in there. I will post it on slack. I will be traveling for the rest of the week. I’ll post it when I get back

That should work. I suspect you need to set ansible_python_interpreter: "python". If that doesn't work, if may be easier to help on slack: slack.networktocode.com

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_napalm-2Dautomation_napalm-2Dansible_issues_122-23issuecomment-2D373366973&d=DwMFaQ&c=tTiMdUxnKixVqCffo2dMgkIGzo_iXe6yRau1m1zqLnQ&r=krcBWOAxN9z0J1UjsiNVGeiZb1vy2sLqfHRurooUhTw&m=6nTGLXmPVIDhLaxGDeKUNSjcC-Cn2DEbcZrVy0u-KD8&s=cx2nqq8yEvq7aQ9OHfa-06aguLGiojfYByQykSGx8f4&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AXZBViMzFsYeRSt80EHDgLdGgjYd8qloks5temVzgaJpZM4SsFe6&d=DwMFaQ&c=tTiMdUxnKixVqCffo2dMgkIGzo_iXe6yRau1m1zqLnQ&r=krcBWOAxN9z0J1UjsiNVGeiZb1vy2sLqfHRurooUhTw&m=6nTGLXmPVIDhLaxGDeKUNSjcC-Cn2DEbcZrVy0u-KD8&s=o_bMrQhDfxlLQeItNZDcaYicepIHma8gHZBDkVurNBQ&e=.

Confidentiality Notice: This email, including attachments, may include non-public, proprietary, confidential or legally privileged information. If you are not an intended recipient or an authorized agent of an intended recipient, you are hereby notified that any dissemination, distribution or copying of the information contained in or transmitted with this email is unauthorized and strictly prohibited. If you have received this email in error, please notify the sender by replying to this message and permanently delete this email, its attachments, and any copies of it immediately. You should not retain, copy or use this email or any attachment for any purpose, or disclose all or any part of the contents to any other person.