{% if filetype_loop == 0 %}VRF,Address Family,Instance,Router ID,Area,Area Type,Authentication,Existed,Enabled,Active Interfaces,Passive Interfaces,Loopback Interfaces,Total Interfaces,Total SPF,Last SPF,Auto Cost Unit,Auto Cost Enabled,Reference Bandwidth,Discard External Route,Discard Interal Route,Graceful Restart Type,Graceful Restart Enabled,Restart Interval,State,NSR Enabled,Active Normal Areas,Active NSSA Areas,Active Stub Areas,Total Active Areas,Number of Paths{% for vrf in to_parse_ip_ospf %}{% for address_family in to_parse_ip_ospf[vrf].address_family %}{% for instance in to_parse_ip_ospf[vrf].address_family[address_family].instance %}{% for graceful_restart in to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].graceful_restart %}{% if to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].areas is defined %}{% for area in to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].areas %}                        
{{ vrf }},{{ address_family }},{{ instance }},{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].router_id}},{{ area }},{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].areas[area].area_type }},{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].areas[area].authentication }},{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].areas[area].existed }},{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].enable }},{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].areas[area].numbers.active_interfaces }},{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].areas[area].numbers.passive_interfaces }},{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].areas[area].numbers.loopback_interfaces }},{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].areas[area].numbers.interfaces }},{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].areas[area].statistics.spf_runs_count }},{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].areas[area].statistics.spf_last_run_time }},{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].auto_cost.bandwidth_unit }},{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].auto_cost.enable }},{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].auto_cost.reference_bandwidth }},{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].discard_route_external }},{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].discard_route_internal }},{{ graceful_restart }},{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart].enable }},{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart].restart_interval }},{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart].state }},{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].nsr.enable }},{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].numbers.active_areas.normal }},{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].numbers.active_areas.nssa }},{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].numbers.active_areas.stub }},{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].numbers.active_areas.total }},{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].spf_control.paths }}{% endfor %}{% else %}             
{{ vrf }},{{ address_family }},{{ instance }},{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].router_id}},No Areas,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].auto_cost.bandwidth_unit }},{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].auto_cost.enable }},{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].auto_cost.reference_bandwidth }},{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].discard_route_external }},{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].discard_route_internal }},{{ graceful_restart }},{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart].enable }},{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart].restart_interval }},{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart].state }},{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].nsr.enable }},{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].numbers.active_areas.normal }},{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].numbers.active_areas.nssa }},{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].numbers.active_areas.stub }},{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].numbers.active_areas.total }},{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].spf_control.paths }}{% endif %}{% endfor %}{% endfor %}{% endfor %}{% endfor %}
{% else %}{% if filetype_loop == 1 %}
# Show IP OPSF 
| VRF | Address Family | Instance | Router ID | Area | Area Type | Authentication | Existed | Enabled | Active Interfaces | Passive Interfaces | Loopback Interfaces | Total Interfaces | Total SPF | Last SPF | Auto Cost Unit | Auto Cost Enabled | Reference Bandwidth | Discard External Route | Discard Interal Route | Graceful Restart Type | Graceful Restart Enabled | Restart Interval | State | NSR Enabled | Active Normal Areas | Active NSSA Areas | Active Stub Areas | Total Active Areas | Number of Paths |
| --- | -------------- | -------- | --------- | ---- | --------- | -------------- | ------- | ------- | ----------------- | ------------------ | ------------------- | ---------------- | --------- | -------- | -------------- | ----------------- | ------------------- | ---------------------- | --------------------- | --------------------- | ------------------------ | ---------------- | ----- | ----------- | ------------------- | ----------------- | ----------------- | ------------------ | --------------- |{% for vrf in to_parse_ip_ospf %}{% for address_family in to_parse_ip_ospf[vrf].address_family %}{% for instance in to_parse_ip_ospf[vrf].address_family[address_family].instance %}{% for graceful_restart in to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].graceful_restart %}{% if to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].areas is defined %}        {% for area in to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].areas %}
| {{ vrf }} | {{ address_family }} | {{ instance }} | {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].router_id}} | {{ area }} | {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].areas[area].area_type }} | {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].areas[area].authentication }} | {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].areas[area].existed }} | {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].enable }} | {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].areas[area].numbers.active_interfaces }} | {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].areas[area].numbers.passive_interfaces }} | {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].areas[area].numbers.loopback_interfaces }} | {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].areas[area].numbers.interfaces }} | {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].areas[area].statistics.spf_runs_count }} | {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].areas[area].statistics.spf_last_run_time }} | {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].auto_cost.bandwidth_unit }} | {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].auto_cost.enable }} | {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].auto_cost.reference_bandwidth }} | {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].discard_route_external }} | {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].discard_route_internal }} | {{ graceful_restart }} | {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart].enable }} | {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart].restart_interval }} | {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart].state }} | {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].nsr.enable }} | {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].numbers.active_areas.normal }} | {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].numbers.active_areas.nssa }} | {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].numbers.active_areas.stub }} | {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].numbers.active_areas.total }} | {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].spf_control.paths }} |{% endfor %}
| {{ vrf }} | {{ address_family }} | {{ instance }} | {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].router_id}} | No Areas | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].auto_cost.bandwidth_unit }} | {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].auto_cost.enable }} | {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].auto_cost.reference_bandwidth }} | {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].discard_route_external }} | {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].discard_route_internal }} | {{ graceful_restart }} | {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart].enable }} | {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart].restart_interval }} | {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart].state }} | {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].nsr.enable }} | {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].numbers.active_areas.normal }} | {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].numbers.active_areas.nssa }} | {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].numbers.active_areas.stub }} | {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].numbers.active_areas.total }} | {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].spf_control.paths }} |{% else %}{% 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>Show </h1>
<table id = "ospf">
  <tr>
    <th>VRF</th>
    <th>Address Family</th>
    <th>Instance</th>
    <th>Router ID</th>
    <th>Area</th>
    <th>Area Type</th>
    <th>Authentication</th>
    <th>Existed</th>
    <th>Enabled</th>
    <th>Active Interfaces</th>
    <th>Passive Interfaces</th>
    <th>Loopback Interfaces</th>
    <th>Total Interfaces</th>
    <th>Total SPF</th>
    <th>Last SPF</th>
    <th>Auto Cost Unit</th>
    <th>Auto Cost Enabled</th>
    <th>Reference Bandwidth</th>
    <th>Discard External Route</th>
    <th>Discard Interal Route</th>
    <th>Graceful Restart Type</th>
    <th>Graceful Restart Enabled</th>
    <th>Restart Interval</th>
    <th>State</th>
    <th>NSR Enabled</th>
    <th>Active Normal Areas</th>
    <th>Active NSSA Areas</th>
    <th>Active Stub Areas</th>
    <th>Total Active Areas</th>
    <th>Number of Paths</th>
  </tr>
  <tr>
{% for vrf in to_parse_ip_ospf %}{% for address_family in to_parse_ip_ospf[vrf].address_family %}{% for instance in to_parse_ip_ospf[vrf].address_family[address_family].instance %}{% for graceful_restart in to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].graceful_restart %}{% if to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].areas is defined %}{% for area in to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].areas %}                  
  <tr>
    <td>{{ vrf }}</td>
    <td>{{ address_family }}</td>
    <td>{{ instance }}</td>
    <td>{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].router_id}}</td>
    <td>{{ area }}</td>
    <td>{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].areas[area].area_type }}</td>
    <td>{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].areas[area].authentication }}</td>
    <td>{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].areas[area].existed }}</td>
    <td>{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].enable }}</td>
    <td>{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].areas[area].numbers.active_interfaces }}</td>
    <td>{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].areas[area].numbers.passive_interfaces }}</td>
    <td>{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].areas[area].numbers.loopback_interfaces }}</td>
    <td>{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].areas[area].numbers.interfaces }}</td>
    <td>{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].areas[area].statistics.spf_runs_count }}</td>
    <td>{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].areas[area].statistics.spf_last_run_time }}</td>
    <td>{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].auto_cost.bandwidth_unit }}</td>
    <td>{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].auto_cost.enable }}</td>
    <td>{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].auto_cost.reference_bandwidth }}</td>
    <td>{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].discard_route_external }}</td>
    <td>{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].discard_route_internal }}</td>
    <td>{{ graceful_restart }}</td>
    <td>{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart].enable }}</td>
    <td>{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart].restart_interval }}</td>
    <td>{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart].state }}</td>
    <td>{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].nsr.enable }}</td>
    <td>{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].numbers.active_areas.normal }}</td>
    <td>{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].numbers.active_areas.nssa }}</td>
    <td>{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].numbers.active_areas.stub }}</td>
    <td>{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].numbers.active_areas.total }}</td>
    <td>{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].spf_control.paths }}</td>
  </tr>{% endfor %}{% else %}
  <tr>
    <td>{{ vrf }}</td>
    <td>{{ address_family }}</td>
    <td>{{ instance }}</td>
    <td>{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].router_id}}</td>
    <td>No Areas</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_ip_ospf[vrf].address_family[address_family].instance[instance].auto_cost.bandwidth_unit }}</td>
    <td>{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].auto_cost.enable }}</td>
    <td>{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].auto_cost.reference_bandwidth }}</td>
    <td>{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].discard_route_external }}</td>
    <td>{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].discard_route_internal }}</td>
    <td>{{ graceful_restart }}</td>
    <td>{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart].enable }}</td>
    <td>{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart].restart_interval }}</td>
    <td>{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart].state }}</td>
    <td>{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].nsr.enable }}</td>
    <td>{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].numbers.active_areas.normal }}</td>
    <td>{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].numbers.active_areas.nssa }}</td>
    <td>{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].numbers.active_areas.stub }}</td>
    <td>{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].numbers.active_areas.total }}</td>
    <td>{{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].spf_control.paths }}</td>
  </tr>{% endif %}{% endfor %}{% endfor %}{% endfor %}{% endfor %}
</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 %}
# Show IP OSPF
{%- for vrf in to_parse_ip_ospf %}
{%-     for address_family in to_parse_ip_ospf[vrf].address_family %}
## {{ vrf }} Address Family {{ address_family }}
{%-         for instance in to_parse_ip_ospf[vrf].address_family[address_family].instance %}
### Instance: {{ instance }}
#### Router ID: {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].router_id}}
#### Enabled: {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].enable }}
#### Auto Cost
##### Bandwidth Unit: {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].auto_cost.bandwidth_unit }}
##### Enabled: {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].auto_cost.enable }}
##### Reference Bandwidth: {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].auto_cost.reference_bandwidth }}
#### Discard Route
##### External: {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].discard_route_external }}
##### Internal: {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].discard_route_internal }}
### {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].nsr.enable }}
### {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].numbers.active_areas.normal }}
### {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].numbers.active_areas.nssa }}
### {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].numbers.active_areas.stub }}
### {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].numbers.active_areas.total }}
### {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].spf_control.paths }}
### Graceful Restart
{%-             for graceful_restart in to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].graceful_restart %}
#### {{ graceful_restart }}
##### Enabled: {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart].enable }}
##### Restart Interval: {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart].restart_interval }}
##### State: {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart].state }}
{%-             endfor %}
{%-             if to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].areas is defined %}
### Areas
{%-                 for area in to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].areas %}                  
#### {{ area }}
##### Type: {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].areas[area].area_type }}
##### Authentication: {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].areas[area].authentication }}
##### Existed: {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].areas[area].existed }}
##### Interfaces
###### Active: {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].areas[area].numbers.active_interfaces }}
###### Passive: {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].areas[area].numbers.passive_interfaces }}
###### Loopback: {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].areas[area].numbers.loopback_interfaces }}
###### Total: {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].areas[area].numbers.interfaces }}
##### SPF 
###### Total Runs: {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].areas[area].statistics.spf_runs_count }}
###### Last Run Time: {{ to_parse_ip_ospf[vrf].address_family[address_family].instance[instance].areas[area].statistics.spf_last_run_time }}
{%-                 endfor %}
{%-             endfor %}
{%-         endfor %}
{%-     endfor %}
{%- endfor %}
{%- endif %}{% endif %}{% endif %}