Closed netopsengineer closed 1 year ago
Could you try this template:
line {{ line | re(".+") | record(line) }}
access-class {{ acl_in }} in
access-class {{ acl_in }} in {{ vrf_mgmt }}
access-class {{ acl_out }} out
transport input {{ input }}
transport output {{ output }}
password {{ password }}
start of the group line is always the same, which is line vty 0 4
, no need to mark other template lines with _start_
indicator.
This worked out well, thank you!
@dmulyalin I have looked for examples and just can't seem to find what I'm looking for, but this is a common situation for me, where the router output may or may not contain a value, and it seems that
ttp
won't record the line if avar
is in the template and doesn't show up. It seemed that perhaps you put both possible match statements in the template from examples I saw, but when I do thatOne possible output:
Second possible output:
ttp
template(s) I have tried:This partially works, but splits the data structure up into something that is not ideal.