Tuesday, May 4, 2021

Question with my netmiko + textfsm script

Here is my current script....

https://github.com/Alston518/Netmiko/blob/main/Textfsm

This is working good to get me the structured output that lists all interfaces, their status, vlan assignment, and many other things.

With textfsm working, how do I take this output and have commands pushed out to specific interfaces that are down and in certain vlans?

For instance, the first switch i ran this on has interface gi1/0/1 in a down state and is also assigned to vlan 500. I want to issue a shutdown command to this interfaces and all other interfaces that are also down AND in vlan 500. Then do this same thing to all switches on my initial list.

Does anyone have any ideas?



No comments:

Post a Comment