Add mikrotik_routeros_interface_lte_apn_print_terse#2287
Conversation
matt852
left a comment
There was a problem hiding this comment.
Recommendation: Changes Suggested
Breaking Change: No
Thanks @kwood92 — this is in great shape, and the earlier whitespace/error-rule fixes look good. Two suggestions before merge, both to make the template parse real-world APN tables and not just the builtin default entry:
-
FLAGSonly matches the default*and is required. As written, a user-added APN (no flag) or a disabled one (X) won't parse. The other mikrotik_tersetemplates capture flags as a multi-char, optional column — recommend matching that.In
mikrotik_routeros_interface_lte_apn_print_terse.textfsm, the Value declaration:-Value FLAGS (\*) +Value FLAGS ([X\*]+)
And the matching rule in
Start, making the flag column optional:- ^${INDEX}\s+${FLAGS}\s+name=${NAME}\s+apn=${APN}... + ^${INDEX}\s+(${FLAGS}\s+)?name=${NAME}\s+apn=${APN}...
-
IP_TYPEcan't matchipv4-ipv6. RouterOS supports a dual-stackip-type=ipv4-ipv6, which the closed(auto|ipv4|ipv6)alternation would fail on. Simplest is to broaden it (the existingipv4sample still parses unchanged):-Value IP_TYPE (auto|ipv4|ipv6) +Value IP_TYPE (\S+)
(If you'd rather keep the alternation for validation, add
ipv4-ipv6to it and include raw rows that exercise each option.)
Thanks!
Adds support for /interface lte print terse