google / textfsm

Python module for parsing semi-structured text into python tables.
Apache License 2.0
1.11k stars 171 forks source link

wrong output from existing example #76

Closed vnitinv closed 8 months ago

vnitinv commented 4 years ago

I was trying to follow one example in wiki

https://github.com/google/textfsm/wiki/TextFSM#template-file

I did a minor change to handle my example: Value Filldown Chassis (..c.?-re.)

o/p was referred from: https://www.juniper.net/documentation/en_US/junos/topics/reference/command-summary/show-chassis-routing-engine.html#jd0e927

The o/p got is:

['Chassis', 'Slot', 'State', 'Temp', 'CPUTemp', 'DRAM', 'Model']
['sfc0-re0', '0', 'Master', '27', '42', '3327', 'RE-TXP-SFC']
['lcc0-re0', '1', 'Backup', '29', '43', '3327', 'RE-TXP-SFC']
['lcc0-re0', '0', 'Master', '30', '43', '3327', 'RE-TXP-LCC']
['lcc0-re0', '1', 'Backup', '30', '43', '3327', 'RE-TXP-LCC']

as you can see sfc0-re0 comes once but lcc0-re0 is 3 times, when both should be coming twice. How can this be fixed?

harro commented 3 years ago

Did you use FillUp rather than FillDown?

harro commented 8 months ago

Closing due to inactivity. Reopen if this is still an issue?