get_l3_facts icon indicating copy to clipboard operation
get_l3_facts copied to clipboard

drivers other than IOS?

Open dlasher opened this issue 6 years ago • 2 comments

What else needs to be installed to support drivers other than IOS? like EOS?

python get_l3_facts.py -H switch1.lab --driver eos

No handlers could be found for logger "pyeapi.eapilib" Traceback (most recent call last): File "get_l3_facts.py", line 174, in main() File "get_l3_facts.py", line 154, in main args.ssh_config, File "get_l3_facts.py", line 22, in open_device device.open() File "/usr/local/lib/python2.7/dist-packages/napalm/eos/eos.py", line 169, in open raise ConnectionException(py23_compat.text_type(ce)) napalm.base.exceptions.ConnectionException: Socket error during eAPI connection: [Errno 111] Connection refused

if I switch the driver to IOS, it mostly works, except that it's an arista switch, so it's not quite happy either.

get_l3_facts - [1 / 1]: Opening connection to sw1.lab get_l3_facts - [1 / 1]: Getting interface facts get_l3_facts - [1 / 1]: Found 0 addresses get_l3_facts - [1 / 1]: Closing connection to sw1.lab get_l3_facts - Found 0 addresses total get_l3_facts - Saving results to l3_facts.csv Traceback (most recent call last): File "get_l3_facts.py", line 174, in main() File "get_l3_facts.py", line 169, in main save_csv(args.csv_path, results) File "get_l3_facts.py", line 73, in save_csv with open(csv_path, "w", newline="") as f: TypeError: 'newline' is an invalid keyword argument for this function

Ideas?

dlasher avatar Oct 25 '19 18:10 dlasher

Looks like we need to retool the args passed to napalm in open_device() based on --driver. We need to specify port and we don't need to pass ssh_config. See this example. I may be able to look into it, or you can submit a PR.

Also, use python3.

austind avatar Oct 29 '19 21:10 austind

Using --driver eos works for me just fine. From the looks of the last pyeapi error, do you have the management api enabled?

management api http-commands no shutdown

markh0338 avatar Nov 01 '19 14:11 markh0338