Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Having trouble with textfsm #858

Closed
r1chardnoggin opened this issue Jan 13, 2021 · 4 comments
Closed

Having trouble with textfsm #858

r1chardnoggin opened this issue Jan 13, 2021 · 4 comments

Comments

@r1chardnoggin
Copy link

Hello,
I'm new here. I'm a network engineer by trade and I'm trying to get into network automation but I'm a noob on that front, so I'm trying to develop my skillset. I have installed netmiko and textfsm. However when I call on textfsm (net_connect.send_command (show ip interface brief', use_textfsm=True) in my code it fails to use it to parse the output and I just get back unstructured data. I'm not entirely sure what I'm missing. I believe I have installed everything correctly but like I said I'm knew to this arena.

I have the ntc-templates/templates directory as well as my export NET_TEXTFSM pointed to that location.
pip3 install ntc-templates shows requirements already satisfied.
pip3 list | grep netmiko shows 3.3.2

Any help would be greatly appreciated.

ISSUE TYPE
  • Bug Report
  • Feature Idea
  • Documentation Report
TEMPLATE USING

SAMPLE COMMAND OUTPUT

SUMMARY
STEPS TO REPRODUCE
EXPECTED RESULTS
ACTUAL RESULTS

@jmcgill298
Copy link
Contributor

jmcgill298 commented Jan 14, 2021

@r1chardnoggin are you able to follow this example and it work? https://github.com/networktocode/ntc-templates#usage

output = net_connect.send_command("show ip interface brief")
from ntc_templates.parse import parse_output
output_parsed = parse_output(platform="cisco_ios", command="show ip interface brief", data=output)
print(output_parsed)

@r1chardnoggin
Copy link
Author

@jmcgill298 that seems to work. Is this the desired format in order for things to work properly?

@jmcgill298
Copy link
Contributor

That is not the method that you are trying to use, but that demonstrates that this project is installed and working as expected. You can get help with netmiko at https://github.com/ktbyers/netmiko/issues/new or on the #netmiko channel on networktocode.slack.com. I would make sure that your environment variables specifies the absolute path, and if that does not work, then follow up with the netmiko project.

@FragmentedPacket
Copy link
Contributor

@r1chardnoggin Hopefully everything is sorted and working for you. If not, join our Slack that @jmcgill298 posted and join the #netmiko or #networktocode channel for help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants