{%- if filetype_loop == 0 %}VRF,Address Family,Instance,Auto Cost Enabled,Reference Bandwidth,Instance Enable,Graceful Restart Type,Graceful Restart Enable,Restart Timer,NSR Enable,Preference,Router ID,SPF Paths,LSA Hold,LSA Max,LSA Start,SPF Hold,SPF Max,SPF Start,Area,Area Type,LSA Type,LSA,Advertising Router,Age,Checksum,Length,Option,Sequence Number,Subnet Mask,Number of Links,Link,Link Data,Link Type,Topology,Metric,Interface,Enabled,BFD,Cost,Dead Interval,Hello Interval,Hello Timer,Interface Type,Neighbor,Neighbor Address,Dead Timer,Last State Change,State,NBR Events,Passive,Retransmit Interval,Link LSA Checksum,Link LSA Count,Transmit Delay,MPLS LDP Auto Config,MPLS LDP Sync,Area LSA Checksum,Area LSA Count,SPF Count
{%-     for vrf in to_parse_ospf.vrf %}
{%-         for address_family in to_parse_ospf.vrf[vrf].address_family %}
{%-             for instance in to_parse_ospf.vrf[vrf].address_family[address_family].instance %}
{%-                 for graceful_restart_type in to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].graceful_restart %}
{%-                     if to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas is defined %}
{%-                         for area in to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas %}
{%-                             if to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database is defined %}
{%-                                 for lsa_type in to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types %}
{%-                                     for lsa in to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas %}
{%-                                         if to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsa_type == 1 %}
{%-                                             for link in to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.body.router.links %}
{%-                                                 for topology in to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.body.router.links[link].topologies %}
{{ vrf }},{{ address_family }},{{ instance }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].auto_cost.enable }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].auto_cost.reference_bandwidth }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].enable }},{{ graceful_restart_type }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart_type].enable }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart_type].restart_interval }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].nsr.enable }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].preference.single_value.all }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].router_id }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.paths }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.lsa.hold }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.lsa.maximum }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.lsa.start }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.spf.hold }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.spf.maximum }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.spf.start }},{{ area }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].area_type }},{{ lsa_type }},{{ lsa }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].adv_router }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.header.age }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.header.checksum }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.header.length }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.header.option }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.header.seq_num }},N/A,{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.body.router.num_of_links }},{{ link }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.body.router.links[link].link_data }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.body.router.links[link].type }},{{ topology }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.body.router.links[link].topologies[topology].metric }},N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].mpls.ldp.auto_config }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].mpls.ldp.sync }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].statistics.area_scope_lsa_cksum_sum }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].statistics.area_scope_lsa_count }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].statistics.spf_runs_count }}
{%-                                                 endfor %}
{%-                                             endfor %}
{%-                                         endif %}
{%-                                         if to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsa_type == 3 %}
{%-                                             for topology in to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.body.summary.topologies %}
{{ vrf }},{{ address_family }},{{ instance }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].auto_cost.enable }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].auto_cost.reference_bandwidth }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].enable }},{{ graceful_restart_type }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart_type].enable }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart_type].restart_interval }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].nsr.enable }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].preference.single_value.all }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].router_id }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.paths }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.lsa.hold }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.lsa.maximum }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.lsa.start }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.spf.hold }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.spf.maximum }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.spf.start }},{{ area }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].area_type }},{{ lsa_type }},{{ lsa }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].adv_router }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.header.age }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.header.checksum }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.header.length }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.header.option }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.header.seq_num }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.body.summary.network_mask }},N/A,N/A,N/A,N/A,{{ topology }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.body.summary.topologies[topology].metric }},N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].mpls.ldp.auto_config }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].mpls.ldp.sync }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].statistics.area_scope_lsa_cksum_sum }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].statistics.area_scope_lsa_count }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].statistics.spf_runs_count }}
{%-                                             endfor %}
{%-                                         endif %}
{%-                                     endfor %}
{%-                                 endfor %}
{%-                             endif %}
{%-                             for interface in to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces %}
{%-                                 for neighbor in to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].neighbors %}
{{ vrf }},{{ address_family }},{{ instance }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].auto_cost.enable }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].auto_cost.reference_bandwidth }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].enable }},{{ graceful_restart_type }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart_type].enable }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart_type].restart_interval }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].nsr.enable }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].preference.single_value.all }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].router_id }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.paths }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.lsa.hold }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.lsa.maximum }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.lsa.start }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.spf.hold }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.spf.maximum }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.spf.start }},{{ area }},N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,{{ interface }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].enable }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].bfd.enable }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].cost }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].dead_interval }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].hello_interval }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].hello_timer }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].interface_type }},{{ neighbor }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].neighbors[neighbor].address }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].neighbors[neighbor].dead_timer }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].neighbors[neighbor].last_state_change }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].neighbors[neighbor].state }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].neighbors[neighbor].statistics.nbr_event_count }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].passive }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].retransmit_interval }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].statistics.link_scope_lsa_cksum_sum }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].statistics.link_scope_lsa_count }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].transmit_delay }},N/A,N/A,N/A,N/A,N/A
{%-                                 endfor %}
{%-                             endfor %}
{%-                         endfor %}
{%-                     else %}
{{ vrf }},{{ address_family }},{{ instance }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].auto_cost.enable }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].auto_cost.reference_bandwidth }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].enable }},{{ graceful_restart_type }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart_type].enable }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart_type].restart_interval }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].nsr.enable }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].preference.single_value.all }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].router_id }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.paths }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.lsa.hold }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.lsa.maximum }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.lsa.start }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.spf.hold }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.spf.maximum }},{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.spf.start }},N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A
{%-                     endif %}
{%-                 endfor %}
{%-             endfor %}
{%-         endfor %}
{%-     endfor %}
{%- else %}
{%-     if filetype_loop == 1 %}
# Learn OSPF
| VRF | Address Family | Instance | Auto Cost Enabled | Reference Bandwidth | Instance Enable | Graceful Restart Type | Graceful Restart Enable | Restart Timer | NSR Enable | Preference | Router ID | SPF Paths | LSA Hold | LSA Max | LSA Start | SPF Hold | SPF Max | SPF Start | Area | Area Type | LSA Type | LSA | Advertising Router | Age | Checksum | Length | Option | Sequence Number | Subnet Mask | Number of Links | Link | Link Data | Link Type | Topology | Metric | Interface | Enabled | BFD | Cost | Dead Interval | Hello Interval | Hello Timer | Interface Type | Neighbor | Neighbor Address | Dead Timer | Last State Change | State | NBR Events | Passive | Retransmit Interval | Link LSA Checksum | Link LSA Count | Transmit Delay | MPLS LDP Auto Config | MPLS LDP Sync | Area LSA Checksum | Area LSA Count | SPF Count |
| --- | -------------- | -------- | ----------------- | ------------------- | --------------- | --------------------- | ----------------------- | ------------- | ---------- | ---------- | --------- | --------- | -------- | ------- | --------- | -------- | ------- | --------- | ---- | --------- | -------- | --- | ------------------ | --- | -------- | ------ | ------ | --------------- | ----------- | --------------- | ---- | --------- | --------- | -------- | ------ | --------- | ------- | --- | ---- | ------------- | -------------- | ----------- | -------------- | -------- | ---------------- | ---------- | ----------------- | ----- | ---------- | ------- | ------------------- | ----------------- | -------------- | -------------- | -------------------- | ------------- | ----------------- | -------------- | --------- |
{%-         for vrf in to_parse_ospf.vrf %}
{%-             for address_family in to_parse_ospf.vrf[vrf].address_family %}
{%-                 for instance in to_parse_ospf.vrf[vrf].address_family[address_family].instance %}
{%-                     for graceful_restart_type in to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].graceful_restart %}
{%-                         if to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas is defined %}
{%-                             for area in to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas %}
{%-                                 if to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database is defined %}
{%-                                     for lsa_type in to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types %}
{%-                                         for lsa in to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas %}
{%-                                             if to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsa_type == 1 %}
{%-                                                 for link in to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.body.router.links %}
{%-                                                     for topology in to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.body.router.links[link].topologies %}
| {{ vrf }} | {{ address_family }} | {{ instance }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].auto_cost.enable }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].auto_cost.reference_bandwidth }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].enable }} | {{ graceful_restart_type }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart_type].enable }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart_type].restart_interval }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].nsr.enable }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].preference.single_value.all }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].router_id }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.paths }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.lsa.hold }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.lsa.maximum }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.lsa.start }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.spf.hold }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.spf.maximum }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.spf.start }} | {{ area }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].area_type }} | {{ lsa_type }} | {{ lsa }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].adv_router }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.header.age }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.header.checksum }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.header.length }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.header.option }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.header.seq_num }} | N/A | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.body.router.num_of_links }} | {{ link }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.body.router.links[link].link_data }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.body.router.links[link].type }} | {{ topology }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.body.router.links[link].topologies[topology].metric }} | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].mpls.ldp.auto_config }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].mpls.ldp.sync }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].statistics.area_scope_lsa_cksum_sum }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].statistics.area_scope_lsa_count }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].statistics.spf_runs_count }} |
{%-                                                     endfor %}
{%-                                                 endfor %}
{%-                                             endif %}
{%-                                             if to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsa_type == 3 %}
{%-                                                 for topology in to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.body.summary.topologies %}
| {{ vrf }} | {{ address_family }} | {{ instance }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].auto_cost.enable }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].auto_cost.reference_bandwidth }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].enable }} | {{ graceful_restart_type }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart_type].enable }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart_type].restart_interval }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].nsr.enable }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].preference.single_value.all }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].router_id }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.paths }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.lsa.hold }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.lsa.maximum }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.lsa.start }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.spf.hold }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.spf.maximum }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.spf.start }} | {{ area }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].area_type }} | {{ lsa_type }} | {{ lsa }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].adv_router }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.header.age }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.header.checksum }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.header.length }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.header.option }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.header.seq_num }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.body.summary.network_mask }} | N/A | N/A | N/A | N/A | {{ topology }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.body.summary.topologies[topology].metric }} | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].mpls.ldp.auto_config }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].mpls.ldp.sync }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].statistics.area_scope_lsa_cksum_sum }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].statistics.area_scope_lsa_count }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].statistics.spf_runs_count }} |
{%-                                                 endfor %}
{%-                                             endif %}
{%-                                         endfor %}
{%-                                     endfor %}
{%-                                 endif %}
{%-                                 for interface in to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces %}
{%-                                     for neighbor in to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].neighbors %}
| {{ vrf }} | {{ address_family }} | {{ instance }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].auto_cost.enable }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].auto_cost.reference_bandwidth }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].enable }} | {{ graceful_restart_type }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart_type].enable }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart_type].restart_interval }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].nsr.enable }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].preference.single_value.all }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].router_id }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.paths }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.lsa.hold }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.lsa.maximum }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.lsa.start }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.spf.hold }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.spf.maximum }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.spf.start }} | {{ area }} | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | {{ interface }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].enable }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].bfd.enable }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].cost }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].dead_interval }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].hello_interval }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].hello_timer }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].interface_type }} | {{ neighbor }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].neighbors[neighbor].address }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].neighbors[neighbor].dead_timer }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].neighbors[neighbor].last_state_change }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].neighbors[neighbor].state }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].neighbors[neighbor].statistics.nbr_event_count }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].passive }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].retransmit_interval }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].statistics.link_scope_lsa_cksum_sum }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].statistics.link_scope_lsa_count }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].transmit_delay }} | N/A | N/A | N/A | N/A | N/A |
{%-                                     endfor %}
{%-                                 endfor %}
{%-                             endfor %}
{%-                         else %}
| {{ vrf }} | {{ address_family }} | {{ instance }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].auto_cost.enable }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].auto_cost.reference_bandwidth }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].enable }} | {{ graceful_restart_type }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart_type].enable }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart_type].restart_interval }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].nsr.enable }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].preference.single_value.all }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].router_id }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.paths }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.lsa.hold }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.lsa.maximum }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.lsa.start }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.spf.hold }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.spf.maximum }} | {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.spf.start }} | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A |
{%-                         endif %}
{%-                     endfor %}
{%-                 endfor %}
{%-             endfor %}
{%-         endfor %}
{%-     else %}
{%-         if filetype_loop == 2 %}
<html>
<head>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
    <script src="https://cdn.datatables.net/1.11.4/js/jquery.dataTables.min.js"></script>
    <script src="https://cdn.datatables.net/buttons/2.0.0/js/dataTables.buttons.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/pdfmake.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/vfs_fonts.js"></script>
    <script src="https://cdn.datatables.net/buttons/2.0.0/js/buttons.html5.min.js"></script>
    <script src="https://cdn.datatables.net/buttons/2.0.0/js/buttons.print.min.js"></script>
    <script src="https://cdn.datatables.net/colreorder/1.5.4/js/dataTables.colReorder.min.js"></script>
    <script src="https://cdn.datatables.net/buttons/2.0.0/js/buttons.colVis.min.js"></script>
    <script src="https://cdn.datatables.net/keytable/2.6.4/js/dataTables.keyTable.min.js"></script>
    <script src="https://cdn.datatables.net/select/1.3.3/js/dataTables.select.min.js"></script>
    <script src="https://cdn.datatables.net/fixedheader/3.1.9/js/dataTables.fixedHeader.min.js"></script>
    <link rel="stylesheet" href="https://cdn.datatables.net/fixedheader/3.1.9/css/fixedHeader.dataTables.min.css">
    <link rel="stylesheet" href="https://cdn.datatables.net/select/1.3.3/css/select.dataTables.min.css">
    <link rel="stylesheet" href="https://cdn.datatables.net/keytable/2.6.4/css/keyTable.dataTables.min.css">
    <link rel="stylesheet" href="https://cdn.datatables.net/1.11.4/css/jquery.dataTables.min.css">
</head>
<body>
<h1>Learn OSPF</h1>
<table id = "ospf">
  <thead>
  <tr>
    <th>VRF</th>
    <th>Address Family</th>
    <th>Instance</th>
    <th>Auto Cost Enabled</th>
    <th>Reference Bandwidth</th>
    <th>Instance Enable</th>
    <th>Graceful Restart Type</th>
    <th>Graceful Restart Enable</th>
    <th>Restart Timer</th>
    <th>NSR Enable</th>
    <th>Preference</th>
    <th>Router ID</th>
    <th>SPF Paths</th>
    <th>LSA Hold</th>
    <th>LSA Max</th>
    <th>LSA Start</th>
    <th>SPF Hold</th>
    <th>SPF Max</th>
    <th>SPF Start</th>
    <th>Area</th>
    <th>Area Type</th>
    <th>LSA Type</th>
    <th>LSA</th>
    <th>Advertising Router</th>
    <th>Age</th>
    <th>Checksum</th>
    <th>Length</th>
    <th>Option</th>
    <th>Sequence Number</th>
    <th>Subnet Mask</th>
    <th>Number of Links</th>
    <th>Link</th>
    <th>Link Data</th>
    <th>Link Type</th>
    <th>Topology</th>
    <th>Metric</th>
    <th>Interface</th>
    <th>Enabled</th>
    <th>BFD</th>
    <th>Cost</th>
    <th>Dead Interval</th>
    <th>Hello Interval</th>
    <th>Hello Timer</th>
    <th>Interface Type</th>
    <th>Neighbor</th>
    <th>Neighbor Address</th>
    <th>Dead Timer</th>
    <th>Last State Change</th>
    <th>State</th>
    <th>NBR Events</th>
    <th>Passive</th>
    <th>Retransmit Interval</th>
    <th>Link LSA Checksum</th>
    <th>Link LSA Count</th>
    <th>Transmit Delay</th>
    <th>MPLS LDP Auto Config</th>
    <th>MPLS LDP Sync</th>
    <th>Area LSA Checksum</th>
    <th>Area LSA Count</th>
    <th>SPF Count</th>
  </tr>
  </thead>
  <tbody>
{%-             for vrf in to_parse_ospf.vrf %}
{%-                 for address_family in to_parse_ospf.vrf[vrf].address_family %}
{%-                     for instance in to_parse_ospf.vrf[vrf].address_family[address_family].instance %}
{%-                         for graceful_restart_type in to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].graceful_restart %}
{%-                             if to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas is defined %}
{%-                                 for area in to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas %}
{%-                                     if to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database is defined %}
{%-                                         for lsa_type in to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types %}
{%-                                             for lsa in to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas %}
{%-                                                 if to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsa_type == 1 %}
{%-                                                     for link in to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.body.router.links %}
{%-                                                         for topology in to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.body.router.links[link].topologies %}
<tr>
    <td>{{ vrf }}</td>
    <td>{{ address_family }}</td>
    <td>{{ instance }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].auto_cost.enable }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].auto_cost.reference_bandwidth }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].enable }}</td>
    <td>{{ graceful_restart_type }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart_type].enable }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart_type].restart_interval }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].nsr.enable }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].preference.single_value.all }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].router_id }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.paths }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.lsa.hold }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.lsa.maximum }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.lsa.start }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.spf.hold }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.spf.maximum }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.spf.start }}</td>
    <td>{{ area }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].area_type }}</td>
    <td>{{ lsa_type }}</td>
    <td>{{ lsa }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].adv_router }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.header.age }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.header.checksum }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.header.length }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.header.option }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.header.seq_num }}</td>
    <td>N/A</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.body.router.num_of_links }}</td>
    <td>{{ link }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.body.router.links[link].link_data }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.body.router.links[link].type }}</td>
    <td>{{ topology }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.body.router.links[link].topologies[topology].metric }}</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].mpls.ldp.auto_config }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].mpls.ldp.sync }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].statistics.area_scope_lsa_cksum_sum }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].statistics.area_scope_lsa_count }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].statistics.spf_runs_count }}</td>
  </tr>
{%-                                                         endfor %}
{%-                                                     endfor %}
{%-                                                 endif %}
{% if to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsa_type == 3 %}
{%-                                                 for topology in to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.body.summary.topologies %}
<tr>
    <td>{{ vrf }}</td>
    <td>{{ address_family }}</td>
    <td>{{ instance }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].auto_cost.enable }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].auto_cost.reference_bandwidth }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].enable }}</td>
    <td>{{ graceful_restart_type }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart_type].enable }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart_type].restart_interval }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].nsr.enable }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].preference.single_value.all }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].router_id }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.paths }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.lsa.hold }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.lsa.maximum }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.lsa.start }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.spf.hold }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.spf.maximum }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.spf.start }}</td>
    <td>{{ area }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].area_type }}</td>
    <td>{{ lsa_type }}</td>
    <td>{{ lsa }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].adv_router }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.header.age }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.header.checksum }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.header.length }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.header.option }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.header.seq_num }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.body.summary.network_mask }}</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>{{ topology }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.body.summary.topologies[topology].metric }}</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].mpls.ldp.auto_config }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].mpls.ldp.sync }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].statistics.area_scope_lsa_cksum_sum }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].statistics.area_scope_lsa_count }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].statistics.spf_runs_count }}</td>
  </tr>
{%-                                                 endfor %}
{%-                                             endif %}
{%-                                         endfor %}
{%-                                     endfor %}
{%-                                 endif %}
{%-                                 for interface in to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces %}
{%-                                     for neighbor in to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].neighbors %}
<tr>
    <td>{{ vrf }}</td>
    <td>{{ address_family }}</td>
    <td>{{ instance }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].auto_cost.enable }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].auto_cost.reference_bandwidth }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].enable }}</td>
    <td>{{ graceful_restart_type }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart_type].enable }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart_type].restart_interval }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].nsr.enable }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].preference.single_value.all }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].router_id }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.paths }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.lsa.hold }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.lsa.maximum }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.lsa.start }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.spf.hold }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.spf.maximum }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.spf.start }}</td>
    <td>{{ area }}</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>{{ interface }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].enable }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].bfd.enable }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].cost }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].dead_interval }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].hello_interval }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].hello_timer }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].interface_type }}</td>
    <td>{{ neighbor }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].neighbors[neighbor].address }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].neighbors[neighbor].dead_timer }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].neighbors[neighbor].last_state_change }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].neighbors[neighbor].state }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].neighbors[neighbor].statistics.nbr_event_count }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].passive }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].retransmit_interval }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].statistics.link_scope_lsa_cksum_sum }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].statistics.link_scope_lsa_count }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].transmit_delay }}</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
  </tr>
{%-                                     endfor %}
{%-                                 endfor %}
{%-                             endfor %}
{%-                         else %}
<tr>
    <td>{{ vrf }}</td>
    <td>{{ address_family }}</td>
    <td>{{ instance }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].auto_cost.enable }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].auto_cost.reference_bandwidth }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].enable }}</td>
    <td>{{ graceful_restart_type }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart_type].enable }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart_type].restart_interval }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].nsr.enable }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].preference.single_value.all }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].router_id }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.paths }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.lsa.hold }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.lsa.maximum }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.lsa.start }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.spf.hold }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.spf.maximum }}</td>
    <td>{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.spf.start }}</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
  </tr>
{%-                             endif %}
{%-                         endfor %}
{%-                     endfor %}
{%-                 endfor %}
{%-             endfor %}
  </tbody>  
</table>
<script type = "text/javascript">
  $(document).ready(function(){
    $('#ospf thead tr')
    .clone(true)
    .addClass('filters')
    .appendTo('#ospf thead');

    var table = $('#ospf').DataTable({
        keys: true,
        dom: 'Bfrtip',
        lengthMenu: [
            [ 10, 25, 50, -1 ],
            [ '10 rows', '25 rows', '50 rows', 'Show all' ]
        ],
        buttons: [
        'pageLength','colvis','copy', 'csv', 'excel', 'pdf', 'print'
        ],
        colReorder: true,
        select: true,            
        orderCellsTop: true,
        fixedHeader: true,
        initComplete: function () {
        var api = this.api();

        // For each column
        api
            .columns()
            .eq(0)
            .each(function (colIdx) {
                // Set the header cell to contain the input element
                var cell = $('.filters th').eq(
                    $(api.column(colIdx).header()).index()
                );
                var title = $(cell).text();
                $(cell).html('<input type="text" placeholder="' + title + '" />');

                // On every keypress in this input
                $(
                    'input',
                    $('.filters th').eq($(api.column(colIdx).header()).index())
                )
                    .off('keyup change')
                    .on('keyup change', function (e) {
                        e.stopPropagation();

                        // Get the search value
                        $(this).attr('title', $(this).val());
                        var regexr = '({search})'; //$(this).parents('th').find('select').val();

                        var cursorPosition = this.selectionStart;
                        // Search the column for that value
                        api
                            .column(colIdx)
                            .search(
                                this.value != ''
                                    ? regexr.replace('{search}', '(((' + this.value + ')))')
                                    : '',
                                this.value != '',
                                this.value == ''
                            )
                            .draw();

                        $(this)
                            .focus()[0]
                            .setSelectionRange(cursorPosition, cursorPosition);
                    });
            });
    },
});
});        
</script>
</body></html>
{%-         else %}
# Learn OSPF
{%-             for vrf in to_parse_ospf.vrf %}
{%-                 for address_family in to_parse_ospf.vrf[vrf].address_family %}
{%-                     for instance in to_parse_ospf.vrf[vrf].address_family[address_family].instance %}
## VRF: {{ vrf }} - {{ address_family }} - Instance: {{ instance }}
### Auto Cost
#### Enable: {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].auto_cost.enable }}
#### Reference Bandwidth: {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].auto_cost.reference_bandwidth }}
### Enabled: {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].enable }}
### NSR Enable: {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].nsr.enable }}
### Preference: {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].preference.single_value.all }}
### Router ID: {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].router_id }}
### SPF Control
#### Paths: {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.paths }}
### SPF Control Throttle LSA
#### Hold: {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.lsa.hold }}
#### Maximum: {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.lsa.maximum }}
#### Start: {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.lsa.start }}
### SPF Control Throttle SPF
#### Hold: {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.spf.hold }}
#### Maximum: {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.spf.maximum }}
#### Start: {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.spf.start }}
### Graceful Restart
{%-                         for graceful_restart_type in to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].graceful_restart %}
#### Type: {{ graceful_restart_type }}
##### Enable: {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart_type].enable }}
##### Interval: {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart_type].restart_interval }}
{%-                         endfor %}
{%-                         if to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas is defined %}
{%-                             for area in to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas %}
### Area: {{ area }}
#### Type: {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].area_type }}
#### MPLS LDP
##### Auto Config: {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].mpls.ldp.auto_config }}
##### Sync: {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].mpls.ldp.sync }}
#### LSA 
##### Checksum: {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].statistics.area_scope_lsa_cksum_sum }}
##### Count: {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].statistics.area_scope_lsa_count }}
#### SPF Runs: {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].statistics.spf_runs_count }}
{%-                                 if to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database is defined %}
{%-                                     for lsa_type in to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types %}
{%-                                         for lsa in to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas %}
#### LSA Type: {{ lsa_type }} LSA: {{ lsa }}
##### Advertising Router: {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].adv_router }}
##### Header
###### Age: {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.header.age }}
###### Checksum: {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.header.checksum }}
###### Length: {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.header.length }}
###### Option: {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.header.option }}
###### Sequence Number: {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.header.seq_num }}
{%-                                             if to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsa_type == 1 %}
{%-                                                 for link in to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.body.router.links %}
#### Link: {{ link }}
##### Data: {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.body.router.links[link].link_data }}
##### Type:{{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.body.router.links[link].type }}
##### Total: {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.body.router.num_of_links }}
{%-                                                     for topology in to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.body.router.links[link].topologies %}
##### Topology: {{ topology }}
###### Topology Mertic: {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.body.router.links[link].topologies[topology].metric }}
{%-                                                     endfor %}
{%-                                                 endfor %}
{%-                                             endif %}
{%-                                             if to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsa_type == 3 %}
{%-                                                 for topology in to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.body.summary.topologies %}
##### Topology: {{ topology }}
{%-                                                 endfor %}
{%-                                             endif %}
{%-                                         endfor %}
{%-                                     endfor %}
{%-                                 endif %}
{%-                                 for interface in to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces %}
##### {{ interface }}
###### Enabled: {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].enable }}
###### BFD Enabled: {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].bfd.enable }}
###### Cost: {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].cost }}
###### Dead Interval: {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].dead_interval }}
###### Hello Interval: {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].hello_interval }}
###### Hello Timer: {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].hello_timer }}
###### Interface Type: {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].interface_type }}
{%-                                     for neighbor in to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].neighbors %}
###### {{ neighbor }}
###### Address: {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].neighbors[neighbor].address }}
###### Dead Timer: {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].neighbors[neighbor].dead_timer }}
###### Last State Change: {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].neighbors[neighbor].last_state_change }}
###### State: {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].neighbors[neighbor].state }}
###### Neighbor Events: {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].neighbors[neighbor].statistics.nbr_event_count }}
###### Passive: {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].passive }}
###### Rertransmit Interval: {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].retransmit_interval }}
###### LSA Checksum: {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].statistics.link_scope_lsa_cksum_sum }}
###### LSA Count: {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].statistics.link_scope_lsa_count }}
###### Transmit Delay: {{ to_parse_ospf.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].transmit_delay }}
{%-                                     endfor %}
{%-                                 endfor %}
{%-                             endfor %}
{%-                         endif %}
{%-                     endfor %}
{%-                 endfor %}
{%-             endfor %}
{%-         endif %}
{%-     endif %}
{%- endif %}