Nornir textFSM example

do we have support for textFSM with Nornir? or I will have to rely on netmiko module? is netmiko integrated with Nornir for textFSM usage, any example to achieve similar?

if yes, how can I do that? can you point me to the documentation link?

I guess I found a way, here is how its working:
result = nr.run(
task=netmiko_send_command,
command_string=“show ospf neighbor”,
use_textfsm=True
)

print_result(result)

Output:
{ ‘address’: ‘1.1.13.2’,
‘dead_time’: ‘32’,
‘interface’: ‘xe-0/1/0.0’,
‘neighbor_id’: ‘192.168.1.3’,
‘priority’: ‘128’,
‘state’: ‘Full’}

1 Like

Here are more details on Netmiko and TextFSM. This is essentially what is being used above in the Nornir context:

https://pynet.twb-tech.com/blog/automation/netmiko-textfsm.html

This doc provides details on how to integrate Netmiko to ntc-templates.