You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Wed Apr 4 19:27:36.016 UTC
Codes: C - connected, S - static, R - RIP, B - BGP, (>) - Diversion path
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - ISIS, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, su - IS-IS summary null, * - candidate default
U - per-user static route, o - ODR, L - local, G - DAGR, l - LISP
A - access/subscriber, a - Application route
M - mobile route, r - RPL, (!) - FRR Backup path
Gateway of last resort is 10.0.0.1 to network 0.0.0.0
D EX 10.0.10.4/30 [170/76800] via 10.0.20.2, 14:56:35, TenGigE0/0/0/5.1
B 192.168.70.4/30 [200/0] via 10.0.20.2, 1y03w
SUMMARY
cisco_xr_show_ip_route.template currently does not account for non-hh:mm:ss uptime formats, such as '1y03w'
cisco_xr_show_ip_route.template currently does not account for protocol sub-type support, such as 'D EX'
I have a working template if you prefer I submit a pull request for this.
STEPS TO REPRODUCE
Use the above show ip route output as 'sh_ip_route.txt'.
Use the following script as 'check.py':
import textfsm
with open('sh_ip_route.txt', 'r') as input_file:
iproute_raw = input_file.read()
with open('./templates/cisco_xr_show_ip_route.template', 'r') as template_file:
re_table = textfsm.TextFSM(template_file)
fsm_results = re_table.ParseText(iproute_raw)
print(fsm_results)
Run python check.py
EXPECTED RESULTS
Receive a list of 2 lists corresponding to the 2 routes in the show ip route output.
ACTUAL RESULTS
Traceback (most recent call last):
File "check.py", line 8, in <module>
fsm_results = re_table.ParseText(iproute_raw)
File "/home/user/Projects/registrar/lib64/python3.4/site-packages/textfsm.py", line 855, in ParseText
self._CheckLine(line)
File "/home/user/Projects/registrar/lib64/python3.4/site-packages/textfsm.py", line 878, in _CheckLine
if self._Operations(rule):
File "/home/user/Projects/registrar/lib64/python3.4/site-packages/textfsm.py", line 954, in _Operations
% (rule.new_state, rule.line_num))
textfsm.TextFSMError: Error: "LINE NOT FOUND". Line: 29.
The text was updated successfully, but these errors were encountered:
mekisiel
added a commit
to mekisiel/ntc-templates
that referenced
this issue
Apr 6, 2018
ISSUE TYPE
TEMPLATE USING
cisco_xr_show_ip_route.template
SAMPLE COMMAND OUTPUT
SUMMARY
cisco_xr_show_ip_route.template currently does not account for non-hh:mm:ss uptime formats, such as '1y03w'
cisco_xr_show_ip_route.template currently does not account for protocol sub-type support, such as 'D EX'
I have a working template if you prefer I submit a pull request for this.
STEPS TO REPRODUCE
Use the above show ip route output as 'sh_ip_route.txt'.
Use the following script as 'check.py':
Run
python check.py
EXPECTED RESULTS
Receive a list of 2 lists corresponding to the 2 routes in the show ip route output.
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: