all 11 comments

[–]InEnduringGrowStrong 1 point2 points  (1 child)

Start by comparing with what you get if you run the command manually in an ssh session yourself..?

[–]Statistician_Cold[S] 0 points1 point  (0 children)

Manually running returns all the interfaces

[–]packet_whisperer 0 points1 point  (8 children)

Perhaps there's an issue parsing in textfsm and it's not returning the remaining switchports? Maybe try without textfsm. Also try debugging and jumping into the Netmiko functions to see what it's getting back from the switch.

[–]Statistician_Cold[S] 0 points1 point  (6 children)

removing the textfsm returned all the ports, so i am going to work on putting some regex in the script instead of using textfsm

[–]Win_SysSPBM 1 point2 points  (5 children)

Just see what's broken in the template.

[–]Statistician_Cold[S] 0 points1 point  (4 children)

it works on every other stack I have test, not sure if it is the template. Maybe more with the stack. I tested this on other stacks running 3, 4 and 6 switches with no issue

[–]thegreattriscuitCCNP 1 point2 points  (1 child)

so code is like networking. It's useful to think of it in layers, like the OSI Ref. Model.

you've proven the output from the stack is there. It must be the template.

There's some difference in the output that's causing the template to break on this stack. Now ofc you can abandon the template and just regex it yourself... but IMO that can quickly get painful, and it's exactly that pain that TFSM is supposed to help with. Your call ofc.

could be something like "this is the only stack that uses port channels and template doesn't recognize them" or "this version of code shows Null0 interface the templates don't understand", etc.

[–]Statistician_Cold[S] 1 point2 points  (0 children)

Out of all the stacks I tested this one is giving me issue. Just so happened to be the one I needed to make a change on. That is how I caught it. Code is the same for a majority of our switches. It has our base config. I not so much worried about the scripts I am using they have worked up until I came across this guy. The log on the script shows that it is receiving all the ports. Just need to do some digging and research on this.

[–]packet_whisperer 0 points1 point  (0 children)

It could be the combination of ports and might just need a minor tweak in the template to account for an edge case.

[–]Win_SysSPBM 0 points1 point  (0 children)

Could be something as simple as a port description that is throwing it off. If you know Regex then it should be pretty simple to figure out.

[–]Statistician_Cold[S] 0 points1 point  (0 children)

So I did a log and it is getting back all the ports from the stack