{%- if command == "acl" %}
{%- for list in data_to_template['acls'] %}{%- if data_to_template['acls'][list].aces is defined %}{%- for ace in data_to_template['acls'][list].aces %}{%- if data_to_template['acls'][list].aces[ace].matches.l3 is defined %}{%- if data_to_template['acls'][list].aces[ace].matches.l3.ipv4 is defined %}{%- if data_to_template['acls'][list].aces[ace].matches.l3.ipv4.source_network is defined %}{%- for source_network in data_to_template['acls'][list].aces[ace].matches.l3.ipv4.source_network %}
```mermaid
classDiagram
class {{ list | replace("-","_") }}{
ACE: {{ ace }}
Forwarding: {{ data_to_template['acls'][list].aces[ace].actions.forwarding }}
Logging: {{ data_to_template['acls'][list].aces[ace].actions.logging | default ("No Logging") }}
Source: {{ data_to_template['acls'][list].aces[ace].matches.l3.ipv4.source_network[source_network] | replace("{'source_network': ","") | replace("}","") | replace("'","") }}
Destination: {{ data_to_template['acls'][list].aces[ace].matches.l3.ipv4.destination_network | replace(" {'destination_network':","") | replace("}","") | replace("{","") | replace("'","") | replace(":","") | default("N/A") }}
Protocol: {{ data_to_template['acls'][list].aces[ace].matches.l3.ipv4.protocol | default("N/A") }}
}
```
{%- endfor %}{%- else %}{%- for destination_network in data_to_template['acls'][list].aces[ace].matches.l3.ipv4.destination_network %}
```mermaid
classDiagram
class {{ list | replace("-","_") }}{
ACE: {{ ace }}
Forwarding: {{ data_to_template['acls'][list].aces[ace].actions.forwarding }}
Logging: {{ data_to_template['acls'][list].aces[ace].actions.logging | default ("No Logging") }}
Destination: {{ data_to_template['acls'][list].aces[ace].matches.l3.ipv4.destination_network | replace(" {'destination_network':","") | replace("}","") | replace("{","") | replace("'","") | replace(":","") | default("N/A") }}
Protocol: {{ data_to_template['acls'][list].aces[ace].matches.l3.ipv4.protocol | default("N/A") }}
}
```
{%- endfor %}{%- endif %}{%- endif %}{%- endif %}{%- endfor %}{%- else %}
```mermaid
classDiagram
class {{ list | replace("-","_") }}{
ACE: No ACEs
}
```
{%- endif %}{%- endfor %}{%- for list in data_to_template['acls'] %}{%- if data_to_template['acls'][list].aces is defined %}{%- for ace in data_to_template['acls'][list].aces %}{%- if data_to_template['acls'][list].aces[ace].matches.l4 is defined %}{%- if data_to_template['acls'][list].aces[ace].matches.l4.udp is defined %}{%- if data_to_template['acls'][list].aces[ace].matches.l4.udp.source_port is defined %}
```mermaid
classDiagram
class {{ list | replace("-","_") }}{
ACE: {{ ace }}
Forwarding: {{ data_to_template['acls'][list].aces[ace].actions.forwarding }}
Logging: {{ data_to_template['acls'][list].aces[ace].actions.logging | default ("No Logging") }}
Source: Source Protocol
Protocol: UDP
{%- if data_to_template['acls'][list].aces[ace].matches.l4.udp.source_port.operator is defined %}
Operator: {{ data_to_template['acls'][list].aces[ace].matches.l4.udp.source_port.operator.operator }}
Port: {{ data_to_template['acls'][list].aces[ace].matches.l4.udp.source_port.operator.port }}
{%- endif %}
}
```
{%- else %}{%- if data_to_template['acls'][list].aces[ace].matches.l4.udp.destination_port is defined%}
```mermaid
classDiagram
class {{ list | replace("-","_") }}{
ACE: {{ ace }}
Forwarding: {{ data_to_template['acls'][list].aces[ace].actions.forwarding }}
Logging: {{ data_to_template['acls'][list].aces[ace].actions.logging | default ("No Logging") }}
Destination: Destination Protocol
Protocol: UDP
{%- if data_to_template['acls'][list].aces[ace].matches.l4.udp.destination_port.operator is defined %}
Operator: {{ data_to_template['acls'][list].aces[ace].matches.l4.udp.destination_port.operator.operator }}
Port: {{ data_to_template['acls'][list].aces[ace].matches.l4.udp.destination_port.operator.port }}
{%- endif %}
}
```
{%- endif %}{%- endif %}{%- else %}{%- if data_to_template['acls'][list].aces[ace].matches.l4.tcp is defined %}{%- if data_to_template['acls'][list].aces[ace].matches.l4.tcp.source_port is defined %}
```mermaid
classDiagram
class {{ list | replace("-","_") }}{
ACE: {{ ace }}
Forwarding: {{ data_to_template['acls'][list].aces[ace].actions.forwarding }}
Logging: {{ data_to_template['acls'][list].aces[ace].actions.logging | default ("No Logging") }}
Source: Source Protocol
Protcol: TCP
{%- if data_to_template['acls'][list].aces[ace].matches.l4.tcp.source_port.operator is defined %}
Operator: {{ data_to_template['acls'][list].aces[ace].matches.l4.tcp.source_port.operator.operator }}
Port: {{ data_to_template['acls'][list].aces[ace].matches.l4.tcp.source_port.operator.port }}
{% else %}
{%- endif %}
}
```
{%- else %}
{%- if data_to_template['acls'][list].aces[ace].matches.l4.tcp.destination_port is defined%}
```mermaid
classDiagram
class {{ list | replace("-","_") }}{
ACE: {{ ace }}
Forwarding: {{ data_to_template['acls'][list].aces[ace].actions.forwarding }}
Logging: {{ data_to_template['acls'][list].aces[ace].actions.logging | default ("No Logging") }}
Destination: Destination Protocol 
Protocol: TCP
{%- if data_to_template['acls'][list].aces[ace].matches.l4.tcp.destination_port.operator is defined %}
Operator: {{ data_to_template['acls'][list].aces[ace].matches.l4.tcp.destination_port.operator.operator }}
Port: {{ data_to_template['acls'][list].aces[ace].matches.l4.tcp.destination_port.operator.port }}
{%- endif %}
}
```
{%- endif %}{%- endif %}{%- endif %}{%- endif %}{%- endif %}{%- endfor %}{%- else %}
```mermaid
classDiagram
class {{ list | replace("-","_") }}{
ACE: No ACEs
}
```
{%- endif %}{%- endfor %}
{%- else %}
{%- if command == "arp" %}
{%- for interface in data_to_template['interfaces'] %}
{%-     if data_to_template['interfaces'][interface].ipv4 is defined %}
{%-         for neighbor in data_to_template['interfaces'][interface].ipv4.neighbors %}
```mermaid
classDiagram
class {{ interface | replace("/","_") }}{
IP: {{ neighbor }}
MAC: {{ data_to_template['interfaces'][interface].ipv4.neighbors[neighbor].link_layer_address }}
Origin: {{ data_to_template['interfaces'][interface].ipv4.neighbors[neighbor].origin }}
ARP Dynamic Learning Local Proxy Enabled: {{ data_to_template['interfaces'][interface].arp_dynamic_learning.local_proxy_enable }}
ARP Dynamic Learning Proxy Enable: {{ data_to_template['interfaces'][interface].arp_dynamic_learning.proxy_enable }}
}
```
{%-        endfor %}
{%-     else %}
```mermaid
classDiagram
class {{ interface | replace("/","_")}}{
ARP Dynamic Learning Local Proxy Enabled: {{ data_to_template['interfaces'][interface].arp_dynamic_learning.local_proxy_enable }}
ARP Dynamic Learning Proxy Enable: {{ data_to_template['interfaces'][interface].arp_dynamic_learning.proxy_enable }}
}
```
{%-     endif %}
{%- endfor %}
```mermaid
classDiagram
class {{ hostname | replace("-","_") }} ARP Statistics{
Total Entries : {{ data_to_template['statistics'].entries_total }}
{{ data_to_template['statistics'].in_drops }}
{{ data_to_template['statistics'].in_replies_pkts }}
{{ data_to_template['statistics'].in_requests_pkts }}
{{ data_to_template['statistics'].in_total | default("N/A") }}
{{ data_to_template['statistics'].incomplete_total }}
{{ data_to_template['statistics'].out_drops | default("N/A") }}
{{ data_to_template['statistics'].out_gratuitous_pkts | default("N/A") }}
{{ data_to_template['statistics'].out_replies_pkts }}
{{ data_to_template['statistics'].out_requests_pkts }}
{{ data_to_template['statistics'].out_total| default("N/A") }}
}
```
{%- else %}
{%- if command == "bgp" %}
{%-             for instance in data_to_template['instance'] %}
{%-                 for vrf in data_to_template['instance'][instance].vrf %}
{%-                     for neighbor in data_to_template['instance'][instance].vrf[vrf].neighbor %}
```mermaid
classDiagram
class {{ instance }} {
ID: {{ data_to_template['instance'][instance].bgp_id }}
State: {{ data_to_template['instance'][instance].protocol_state }}
VRF: {{ vrf }}
Router ID: {{ data_to_template['instance'][instance].vrf[vrf].router_id }}
Cluster ID: {{ data_to_template['instance'][instance].vrf[vrf].cluster_id }}
Confederation ID: {{ data_to_template['instance'][instance].vrf[vrf].confederation_identifier }}
Neighbor: {{ neighbor }}
BGP Version: {{ data_to_template['instance'][instance].vrf[vrf].neighbor[neighbor].bgp_version }}
Holdtime: {{ data_to_template['instance'][instance].vrf[vrf].neighbor[neighbor].holdtime }}
Keepalive Interval: {{ data_to_template['instance'][instance].vrf[vrf].neighbor[neighbor].keepalive_interval }}
Local AS Number: {{ data_to_template['instance'][instance].vrf[vrf].neighbor[neighbor].local_as_as_no }}
Remote AS Number: {{ data_to_template['instance'][instance].vrf[vrf].neighbor[neighbor].remote_as }}
{%-                 if data_to_template['instance'][instance].vrf[vrf].neighbor[neighbor].bgp_neighbor_counters is defined %}    
Received Messages: {{ data_to_template['instance'][instance].vrf[vrf].neighbor[neighbor].bgp_neighbor_counters.messages.received.total }}
Sent Messages: {{ data_to_template['instance'][instance].vrf[vrf].neighbor[neighbor].bgp_neighbor_counters.messages.sent.total }}
{%                  endif %}
Last Reset: {{ data_to_template['instance'][instance].vrf[vrf].neighbor[neighbor].bgp_session_transport.connection.last_reset }}
Reset Reason: {{ data_to_template['instance'][instance].vrf[vrf].neighbor[neighbor].bgp_session_transport.connection.reset_reason }}
}
```
{%-                     endfor %}
{%-                 endfor %}
{%-             endfor %}
{%- else %}
{%- if command == "hsrp" %}
{%-             for vlan in data_to_template %}
{%-                 for address_family in data_to_template[vlan].address_family %}
{%-                     for version in data_to_template[vlan].address_family[address_family].version %}
{%-                         for group in data_to_template[vlan].address_family[address_family].version[version].groups %}
```mermaid
classDiagram
class {{ vlan }} {
Address Family : {{ address_family }}
Version : {{ version }}
Group : {{ group }}
Active Router : {{ data_to_template[vlan].address_family[address_family].version[version].groups[group].active_router }}
HSRP Router State : {{ data_to_template[vlan].address_family[address_family].version[version].groups[group].hsrp_router_state }}
Preempt : {{ data_to_template[vlan].address_family[address_family].version[version].groups[group].preempt }}
Primary IPv4 Address : {{ data_to_template[vlan].address_family[address_family].version[version].groups[group].primary_ipv4_address.address }}
Virtual IP Learn : {{ data_to_template[vlan].address_family[address_family].version[version].groups[group].primary_ipv4_address.virtual_ip_learn }}
Priority : {{ data_to_template[vlan].address_family[address_family].version[version].groups[group].priority }}
Session Name : {{ data_to_template[vlan].address_family[address_family].version[version].groups[group].session_name }}
Standby IP Address : {{ data_to_template[vlan].address_family[address_family].version[version].groups[group].standby_ip_address }}
Standby Router : {{ data_to_template[vlan].address_family[address_family].version[version].groups[group].standby_router }}
Hello Timer : {{ data_to_template[vlan].address_family[address_family].version[version].groups[group].timers.hello_sec }}
Hold Timer : {{ data_to_template[vlan].address_family[address_family].version[version].groups[group].timers.hold_sec }}
Virtual MAC Address : {{ data_to_template[vlan].address_family[address_family].version[version].groups[group].virtual_mac_address }}
Use BIA : {{ data_to_template[vlan].use_bia }}
}
```
{%-                         endfor %}
{%-                     endfor %}
{%-                 endfor %}
{%-             endfor %}
{%- else %}
{%- if command == 'interface' %}
{%- for interface in data_to_template %}
```mermaid
classDiagram
class {{ interface | replace("/","_")}}{
Description: {{ data_to_template[interface].description | default("N/A") }}
Enabled: {{ data_to_template[interface].enabled | default("N/A") }}
Operational Status: {{ data_to_template[interface].oper_status | default("N/A") }}
{%-                  if data_to_template[interface].access_vlan is defined %}
Access VLAN: {{ data_to_template[interface].access_vlan }}
{%-                  endif %}
{%-                  if data_to_template[interface].native_vlan is defined %}
Native VLAN: {{ data_to_template[interface].native_vlan }}
{%-                  endif %}
{%-                  if data_to_template[interface].switchport_enable is defined %}
Switchport Enable: {{ data_to_template[interface].switchport_enable }}
{%-                  endif %}
{%-                  if data_to_template[interface].switchport_mode is defined %}
Switchport Mode: {{ data_to_template[interface].switchport_mode }}
{%-                  endif %}
{%-                  if data_to_template[interface].type is defined %}
Type: {{ data_to_template[interface].type }}
{%-                  endif %}
{%-                  if data_to_template[interface].bandwidth is defined %}
Bandwidth: {{ data_to_template[interface].bandwidth }}
{%-                  endif %}
{%-                  if data_to_template[interface].auto_negotiate is defined %}
Auto Negotiate: {{ data_to_template[interface].auto_negotiate }}
{%-                  endif %}
{%-                  if data_to_template[interface].port_speed is defined %}
Port Speed: {{ data_to_template[interface].port_speed }}
{%-                  endif %}
{%-                  if data_to_template[interface].duplex_mode is defined %}
Duplex Mode: {{ data_to_template[interface].duplex_mode }}
{%-                  endif %}
{%-                  if data_to_template[interface].mtu is defined %}
MTU: {{ data_to_template[interface].mtu }}
{%-                  endif %}
{%-                  if data_to_template[interface].mac_address is defined %}
MAC Address: {{ data_to_template[interface].mac_address }}
{%-                  endif %}
{%-                  if data_to_template[interface].phys_address is defined %}
Physical Address: {{ data_to_template[interface].phys_address }}
{%-                  endif %}
{%-                  if data_to_template[interface].ipv4 is defined %}
{%-                      for ip_address in data_to_template[interface].ipv4 %}
IP Address: {{ ip_address }}
{%-                      endfor %}
{%-                  endif %}
{%-                  if data_to_template[interface].medium is defined %}
Medium: {{ data_to_template[interface].medium }}
{%-                  endif %}
{%-                  if data_to_template[interface].delay is defined %}
Delay: {{ data_to_template[interface].delay }}
{%-                  endif %}
{%-                  if data_to_template[interface].encapsulation is defined %}
Encapsulation: {{ data_to_template[interface].encapsulation.encapsulation }}
{%-                  endif %}
{%-                  if data_to_template[interface].flow_control is defined %}
Flow Control Receive: {{ data_to_template[interface].flow_control.receive }}
Flow Control Send: {{ data_to_template[interface].flow_control.send }}
{%-                  endif %}
{%-                  if data_to_template[interface].port_channel is defined %}
{%                       if data_to_template[interface].port_channel.port_channel_int is defined %}
Port Channel Interface: {{ data_to_template[interface].port_channel.port_channel_int }}
{%                       endif %}
{%                       if data_to_template[interface].port_channel.port_channel_member_intfs is defined %}
{%-                          for member in data_to_template[interface].port_channel.port_channel_member_intfs %}
Member: {{ member }}
{%-                          endfor %}
{%                       else %}
{%-                          if data_to_template[interface].port_channel.port_channel_member is defined %}
Port Channel Member: {{ data_to_template[interface].port_channel.port_channel_member }}
{%-                          endif %}
{%-                      endif %}
{%-                  endif %}
{%-                  if data_to_template[interface].last_change is defined %}
Last Change: {{ data_to_template[interface].last_change }}
{%-                  endif %}
{%-                  if data_to_template[interface].counters is defined %}
{%-                      if data_to_template[interface].counters.in_broadcast_pkts is defined %}
Input Broadcast: {{ data_to_template[interface].counters.in_broadcast_pkts }}
{%-                      endif %}
{%-                      if data_to_template[interface].counters.in_crc_errors is defined %}
Input CRC Errors: {{ data_to_template[interface].counters.in_crc_errors }}
{%-                      endif %}
{%-                      if data_to_template[interface].counters.in_errors is defined %}
Input Errors: {{ data_to_template[interface].counters.in_errors }}
{%-                      endif %}
{%-                      if data_to_template[interface].counters.in_mac_pause_frames is defined %}
Input MAC Pause Frames: {{ data_to_template[interface].counters.in_mac_pause_frames }}
{%-                      endif %}
{%-                      if data_to_template[interface].counters.in_multicast_pkts is defined %}
Input Multicast: {{ data_to_template[interface].counters.in_multicast_pkts }}
{%-                      endif %}
{%-                      if data_to_template[interface].counters.in_octets is defined %}
Input Octects: {{ data_to_template[interface].counters.in_octets }}
{%-                      endif %}
{%-                      if data_to_template[interface].counters.in_unicast_pkts is defined %}
Input Unicast: {{ data_to_template[interface].counters.in_unicast_pkts }}
{%-                      endif %}
{%-                      if data_to_template[interface].counters.in_unknown_protos is defined %}
Input Unknown: {{ data_to_template[interface].counters.in_unknown_protos }}
{%-                      endif %}
{%-                      if data_to_template[interface].counters.in_pkts is defined %}
Input Packets: {{ data_to_template[interface].counters.in_pkts }}
{%-                      endif %}
{%-                      if data_to_template[interface].counters.out_broadcast_pkts is defined %}
Output Broadcast: {{ data_to_template[interface].counters.out_broadcast_pkts }}
{%-                      endif %}
{%-                      if data_to_template[interface].counters.out_discard is defined %}
Output Discards: {{ data_to_template[interface].counters.out_discard }}
{%-                      endif %}
{%-                      if data_to_template[interface].counters.out_errors is defined %}
Output Errors: {{ data_to_template[interface].counters.out_errors }}
{%-                      endif %}
{%-                      if data_to_template[interface].counters.out_mac_pause_frames is defined %}
Output MAC Pause Frames: {{ data_to_template[interface].counters.out_mac_pause_frames }}
{%-                      endif %}
{%-                      if data_to_template[interface].counters.out_multicast_pkts is defined %}
Output Multicast: {{ data_to_template[interface].counters.out_multicast_pkts }}
{%-                      endif %}
{%-                      if data_to_template[interface].counters.out_unicast_pkts is defined %}
Output Unicast: {{ data_to_template[interface].counters.out_unicast_pkts }}
{%-                      endif %}
{%-                      if data_to_template[interface].counters.out_pkts is defined %}
Output Packets: {{ data_to_template[interface].counters.out_pkts }}
{%-                      endif %}
{%-                      if data_to_template[interface].counters.last_clear is defined %}
Last Clear: {{ data_to_template[interface].counters.last_clear }}
{%-                      endif %}
{%-                      if data_to_template[interface].counters.rate is defined %}
Input Rate: {{ data_to_template[interface].counters.rate.in_rate }}
Load Interval: {{ data_to_template[interface].counters.rate.load_interval }}
Output Rate: {{ data_to_template[interface].counters.rate.out_rate }}
{%-                      endif %}
{%-                  endif %}
}
```
{%- endfor %}
{%- else %}
{%- if command == 'lldp' %}
{%- for interface in data_to_template['interfaces'] %}{%- if data_to_template['interfaces'][interface].port_id is defined %}{%- for port in data_to_template['interfaces'][interface].port_id %}{%- for neighbor in data_to_template['interfaces'][interface].port_id[port].neighbors %}{%- for capability in data_to_template['interfaces'][interface].port_id[port].neighbors[neighbor].capabilities %}
```mermaid
classDiagram
class {{ interface | replace("/","_") }}{
Enabled : {{ data_to_template['interfaces'][interface].enabled }}
Neighbor : {{ neighbor }}
Port : {{ port }}
Description : {{ data_to_template['interfaces'][interface].port_id[port].neighbors[neighbor].port_description }}
Capability : {{ capability }}
Chassis ID : {{ data_to_template['interfaces'][interface].port_id[port].neighbors[neighbor].chassis_id }}
Management Address : {{ data_to_template['interfaces'][interface].port_id[port].neighbors[neighbor].management_address }}
System Description : {{ data_to_template['interfaces'][interface].port_id[port].neighbors[neighbor].system_description | replace("\n"," ") }}
}
```
{%- endfor %}{%- endfor %}{%- endfor %}{%- else %}
```mermaid
classDiagram
class {{ interface | replace("/","_") }}{
Enabled : {{ data_to_template['interfaces'][interface].enabled }}
Neighbor: No Neighbor
}
```
{%- endif %}{%- endfor %}
```mermaid
classDiagram
class {{ hostname | replace("-","_") }} LLDP Details{
Enabled : {{ data_to_template.enabled }}
Hello Timer : {{ data_to_template.hello_timer }}
Hold Timer : {{ data_to_template.hold_timer }}
Entries Aged Out : {{ data_to_template.counters.entries_aged_out }}
Frame Discard : {{ data_to_template.counters.frame_discard }}
Frame Input Errors : {{ data_to_template.counters.frame_error_in }}
Frame Input : {{ data_to_template.counters.frame_in }}
Frame Output : {{ data_to_template.counters.frame_out }}
TLV Discard : {{ data_to_template.counters.tlv_discard }}
TLV Unknown : {{ data_to_template.counters.tlv_unknown }}
}
```
{%- else %}
{%- if command == "ntp" %}
{%- for vrf in data_to_template['vrf'] %}{%- for address in data_to_template['vrf'][vrf].associations.address %}{%- for is_conf,value in data_to_template['vrf'][vrf].associations.address[address].local_mode.client.isconfigured.items() %}
```mermaid
classDiagram
class {{ vrf | replace("-","_") }}{
Address: {{ address }}
Delay : {{ value.delay }}
Is Configured : {{ value.isconfigured }}
Local Mode : {{ value.local_mode }}
Offset : {{ value.offset }}
Poll : {{ value.poll }}
Reach : {{ value.reach }}
Receive Time : {{ value.receive_time }}
Reference ID : {{ value.refid }}
Statum : {{ value.stratum }}
}
``` 
{%- endfor %}{%- endfor %}{%- endfor %}
{%- for vrf in data_to_template['vrf'] %}{%- for address in data_to_template['vrf'][vrf].unicast_configuration.address %}
```mermaid
classDiagram
class {{ vrf | replace("-","_") }}{
Address : {{ address }}
Preferred Server : {{ data_to_template['vrf'][vrf].unicast_configuration.address[address].type.server.preferred }}
Server Type : {{ data_to_template['vrf'][vrf].unicast_configuration.address[address].type.server.type }}
}
```
{%- endfor %}{%- endfor %}
```mermaid
classDiagram
class {{ hostname | replace("-","_") }}_NTP_Status{
Associations Address : {{ data_to_template['clock_state'].system_status.associations_address }}
Associations Local Mode : {{ data_to_template['clock_state'].system_status.associations_local_mode }}
Clock Offset : {{ data_to_template['clock_state'].system_status.clock_offset }}
Clock Precision : {{ data_to_template['clock_state'].system_status.clock_precision }}
Clock Reference ID : {{ data_to_template['clock_state'].system_status.clock_refid }}
Clock State : {{ data_to_template['clock_state'].system_status.clock_state }}
Clock Statum : {{ data_to_template['clock_state'].system_status.clock_stratum }}
Reference Time : {{ data_to_template['clock_state'].system_status.reference_time }}
Root Delay : {{ data_to_template['clock_state'].system_status.root_delay }}
Root Dispersion : {{ data_to_template['clock_state'].system_status.root_dispersion }}
}
```
{%- else %}
{%- if command == 'ospf' %}
{%-             for vrf in data_to_template.vrf %}
{%-                 for address_family in data_to_template.vrf[vrf].address_family %}
{%-                     for instance in data_to_template.vrf[vrf].address_family[address_family].instance %}
{%-                         for graceful_restart_type in data_to_template.vrf[vrf].address_family[address_family].instance[instance].graceful_restart %}
{%-                             if data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas is defined %}
{%-                                 for area in data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas %}
{%-                                     if data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].database is defined %}
{%-                                         for lsa_type in data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types %}
{%-                                             for lsa in data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas %}
{%-                                                 if data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsa_type == 1 %}
{%-                                                     for link in data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.body.router.links %}
{%-                                                         for topology in data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.body.router.links[link].topologies %}
```mermaid
classDiagram
class VRF_{{ vrf }} {
Address Family : {{ address_family }}
Instance : {{ instance }}
Auto Cost Enable : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].auto_cost.enable }}
Auto Cost Reference Bandwidth : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].auto_cost.reference_bandwidth }}
Enable : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].enable }}
Graceful Restart Type : {{ graceful_restart_type }}
Graceful Restart Enable : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart_type].enable }}
Graceful Restart Interval : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart_type].restart_interval }}
NSR Enable : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].nsr.enable }}
Preference Single Value : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].preference.single_value.all }}
Router ID : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].router_id }}
SPF Control Paths : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].spf_control.paths }}
SPF Throttle LSA Hold : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.lsa.hold }}
SPF Throttle LSA Maximum : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.lsa.maximum }}
SPF LSA Start : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.lsa.start }}
SPF Hold : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.spf.hold }}
SPF Maxmimum : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.spf.maximum }}
SPF Start : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.spf.start }}
Area : {{ area }}
Area Type : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].area_type }}
LSA Type : {{ lsa_type }}
LSA : {{ lsa }}
Advertising Router : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].adv_router }}
Header Age : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.header.age }}
Checksum : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.header.checksum }}
Length : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.header.length }}
Option : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.header.option }}
Sequence Number : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.header.seq_num }}
Number of Links : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.body.router.num_of_links }}
Link : {{ link }}
Link Data : {{ data_to_template.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 : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.body.router.links[link].type }}
Topology : {{ topology }}
Metric : {{ data_to_template.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 }}
LDP Auto Config : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].mpls.ldp.auto_config }}
MPLS LDP Sync : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].mpls.ldp.sync }}
LSA Checksum : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].statistics.area_scope_lsa_cksum_sum }}
LSA Count : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].statistics.area_scope_lsa_count }}
SPF Total Runs : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].statistics.spf_runs_count }}
}
```
{%-                                                         endfor %}
{%-                                                     endfor %}
{%-                                                 endif %}
{%- if data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsa_type == 3 %}
{%-                                                 for topology in data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.body.summary.topologies %}
```mermaid
classDiagram
class VRF_{{ vrf }} {
Address Family : {{ address_family }}
Instance : {{ instance }}
Auto Cost Enable : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].auto_cost.enable }}
Auto Cost Reference Bandwidth : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].auto_cost.reference_bandwidth }}
Enable : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].enable }}
Graceful Restart Type : {{ graceful_restart_type }}
Graceful Restart Enable : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart_type].enable }}
Graceful Restart Interval : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart_type].restart_interval }}
NSR Enable : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].nsr.enable }}
Preference Single Value : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].preference.single_value.all }}
Router ID : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].router_id }}
SPF Control Paths : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].spf_control.paths }}
SPF Throttle LSA Hold : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.lsa.hold }}
SPF Throttle LSA Maximum : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.lsa.maximum }}
SPF LSA Start : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.lsa.start }}
SPF Hold : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.spf.hold }}
SPF Maxmimum : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.spf.maximum }}
SPF Start : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.spf.start }}
Area : {{ area }}
Area Type : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].area_type }}
LSA Type : {{ lsa_type }}
LSA : {{ lsa }}
Advertising Router : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].adv_router }}
Header Age : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.header.age }}
Checksum : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.header.checksum }}
Length : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.header.length }}
Option : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.header.option }}
Sequence Number : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.header.seq_num }}
Network Mask : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.body.summary.network_mask }}
Topology : {{ topology }}
Metric : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].database.lsa_types[lsa_type].lsas[lsa].ospfv2.body.summary.topologies[topology].metric }}
MPLS LDP Auto Config : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].mpls.ldp.auto_config }}
MPLS LDP Sync : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].mpls.ldp.sync }}
LSA Checksum : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].statistics.area_scope_lsa_cksum_sum }}
LSA Count : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].statistics.area_scope_lsa_count }}
SPF Total Runs{{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].statistics.spf_runs_count }}
}
```
{%-                                                 endfor %}
{%-                                             endif %}
{%-                                         endfor %}
{%-                                     endfor %}
{%-                                 endif %}
{%-                                 for interface in data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces %}
{%-                                     for neighbor in data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].neighbors %}
```mermaid
classDiagram
class VRF_{{ vrf }} {
Address Family : {{ address_family }}
Instance : {{ instance }}
Auto Cost Enable : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].auto_cost.enable }}
Auto Cost Reference Bandwidth : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].auto_cost.reference_bandwidth }}
Enable : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].enable }}
Graceful Restart Type : {{ graceful_restart_type }}
Graceful Restart Enable : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart_type].enable }}
Graceful Restart Interval : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart_type].restart_interval }}
NSR Enable : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].nsr.enable }}
Preference Single Value : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].preference.single_value.all }}
Router ID : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].router_id }}
SPF Control Paths : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].spf_control.paths }}
SPF Throttle LSA Hold : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.lsa.hold }}
SPF Throttle LSA Maximum : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.lsa.maximum }}
SPF LSA Start : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.lsa.start }}
SPF Hold : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.spf.hold }}
SPF Maxmimum : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.spf.maximum }}
SPF Start : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.spf.start }}
Area : {{ area }}
Interface : {{ interface }}
Interface Enable : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].enable }}
Interface BFD Enable : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].bfd.enable }}
Interface Cost : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].cost }}
Interface Dead Interval : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].dead_interval }}
Interface Hello Interval : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].hello_interval }}
Interface Hello Timer : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].hello_timer }}
Interface Interface Type : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].interface_type }}
Interface Passive : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].passive }}
Interface Retransmit Interval : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].retransmit_interval }}
Interface LSA Checksum : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].statistics.link_scope_lsa_cksum_sum }}
Interface LSA Count : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].statistics.link_scope_lsa_count }}
Interface Transmit Delay : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].transmit_delay }}
Neighbor : {{ neighbor }}
Neighbor Address : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].neighbors[neighbor].address }}
Neighbor Dead Timer : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].neighbors[neighbor].dead_timer }}
Neighbor Last State Change : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].neighbors[neighbor].last_state_change }}
Neighbor State : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].neighbors[neighbor].state }}
Neighbor Event Count : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].neighbors[neighbor].statistics.nbr_event_count }}
}
```
{%-                                     endfor %}
{%-                                 endfor %}
{%-                             endfor %}
{%-                         else %}
```mermaid
classDiagram
class VRF_{{ vrf }} {
Address Family : {{ address_family }}
Instance : {{ instance }}
Auto Cost Enable : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].auto_cost.enable }}
Auto Cost Reference Bandwidth : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].auto_cost.reference_bandwidth }}
Enable : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].enable }}
Graceful Restart Type : {{ graceful_restart_type }}
Graceful Restart Enable : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart_type].enable }}
Graceful Restart Interval : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart_type].restart_interval }}
NSR Enable : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].nsr.enable }}
Preference Single Value : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].preference.single_value.all }}
Router ID : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].router_id }}
SPF Control Paths : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].spf_control.paths }}
SPF Throttle LSA Hold : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.lsa.hold }}
SPF Throttle LSA Maximum : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.lsa.maximum }}
SPF LSA Start : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.lsa.start }}
SPF Hold : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.spf.hold }}
SPF Maxmimum : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.spf.maximum }}
SPF Start : {{ data_to_template.vrf[vrf].address_family[address_family].instance[instance].spf_control.throttle.spf.start }}
}
```
{%-                             endif %}
{%-                         endfor %}
{%-                     endfor %}
{%-                 endfor %}
{%-             endfor %}
{%- else %}
{%- if command == "platform" %}
```mermaid
classDiagram
class {{ hostname | replace("-","_") }}_Platform {
Router Type : {{ data_to_template.rtr_type | default("N/A") }}
Chassis : {{ data_to_template.chassis | default("N/A") }}
Chassis Serial Number : {{ data_to_template.chassis_sn | default("N/A") }}
RP Uptime : {{ data_to_template.rp_uptime | default("N/A") }}
Directory : {{ data_to_template.dir | default("N/A") }}
Total Disk Space : {{ data_to_template.disk_total_space | default("N/A") }}
Used Disk Space : {{ data_to_template.disk_used_space | default("N/A") }}
Free Disk Space : {{ data_to_template.disk_free_space | default("N/A") }}
Image : {{ data_to_template.image | default("N/A") }}
Main Memory : {{ data_to_template.main_mem | default("N/A") }}
OS : {{ data_to_template.os | default("N/A") }}
Version : {{ data_to_template.version | default("N/A") }}
}
```
{%-         for slot in data_to_template.slot %}
{%-             for sub_slot in data_to_template.slot[slot] %}
```mermaid
classDiagram
class {{ hostname | replace("-","_") }}_Platform_Slots {
Name : {{ data_to_template.slot[slot][sub_slot].name | default("N/A") }}
Serial Number : {{ data_to_template.slot[slot][sub_slot].sn | default("N/A") }}
State : {{ data_to_template.slot[slot][sub_slot].state | default("N/A") }}
{%- if slot == "rp" %}
Redundancy State : {{ data_to_template.slot[slot][sub_slot].redundancy_state | default("N/A") }}
Boot Image : {{ data_to_template.slot[slot][sub_slot].rp_boot_image | default("N/A") }}
Uptime : {{ data_to_template.slot[slot][sub_slot].rp_uptime | default("N/A") }}
{%- endif %}
}
```
{%-             endfor %}
{%-         endfor %}
{%-         for virtual_device in data_to_template.virtual_device %}
{%-             for interface in data_to_template.virtual_device[virtual_device].membership %}
```mermaid
classDiagram
class {{ hostname | replace("-","_") }}_Platform_Virtual_Devices {
Name : {{ data_to_template.virtual_device[virtual_device].vd_name | default("N/A") }}
Status : {{ data_to_template.virtual_device[virtual_device].vd_status | default("N/A") }}
Interface : {{ interface }}
Type : {{ data_to_template.virtual_device[virtual_device].membership[interface].type | default("N/A") }}
Status : {{ data_to_template.virtual_device[virtual_device].membership[interface].status | default("N/A") }}
}
```
{%-             endfor %}
{%-         endfor %}
{%- else %}
{%- if command == "routing" %}
{%- for vrf in data_to_template['vrf'] %}
{%-     for address_family in data_to_template['vrf'][vrf].address_family %}
{%-         for route in data_to_template['vrf'][vrf].address_family[address_family].routes %}
{%-             if data_to_template['vrf'][vrf].address_family[address_family].routes[route].next_hop.next_hop_list is defined %}
{%-                 for next_hop in data_to_template['vrf'][vrf].address_family[address_family].routes[route].next_hop.next_hop_list %}
```mermaid
classDiagram
class {{ vrf | replace("-","_") }}_Routing {
Address Family : {{ address_family }}
Route : {{ route }}
Active : {{ data_to_template['vrf'][vrf].address_family[address_family].routes[route].active }}
Metric : {{ data_to_template['vrf'][vrf].address_family[address_family].routes[route].metric }}
Next Hop Number : {{ next_hop }}
Next Hop : {{ data_to_template['vrf'][vrf].address_family[address_family].routes[route].next_hop.next_hop_list[next_hop].next_hop }}
Route Prference : {{ data_to_template['vrf'][vrf].address_family[address_family].routes[route].route_preference }}
Source Protocol : {{ data_to_template['vrf'][vrf].address_family[address_family].routes[route].source_protocol }}
Source Protocol Codes : {{ data_to_template['vrf'][vrf].address_family[address_family].routes[route].source_protocol_codes }}
}
```
{%-                 endfor %}
{%-             else %}
{%-                 for outgoing_interface in data_to_template['vrf'][vrf].address_family[address_family].routes[route].next_hop.outgoing_interface %}
```mermaid
classDiagram
class {{ vrf | replace("-","_") }}_Routing {
Address Family : {{ address_family }}
Route : {{ route }}
Active : {{ data_to_template['vrf'][vrf].address_family[address_family].routes[route].active }}
Outgoing Interface : {{ outgoing_interface }}
Source Protocol : {{ data_to_template['vrf'][vrf].address_family[address_family].routes[route].source_protocol }}
Source Protocol Codes : {{ data_to_template['vrf'][vrf].address_family[address_family].routes[route].source_protocol_codes }}
}
```
{%-                 endfor %}
{%-             endif %}
{%-         endfor %}
{%-     endfor %}
{%- endfor %}
{%- else %}
{%- if command == "vlan" %}
{%- for vlan in data_to_template['vlans'] if (vlan != "configuration") or (vlan != "interface_vlan_enabled") or (vlan != "vn_segment_vlan_based_enabled")  %}{%- if data_to_template['vlans'][vlan].interfaces is defined %}{%- for interface in data_to_template['vlans'][vlan].interfaces %}
```mermaid
classDiagram
class VLAN_{{ vlan }} {
Name : {{ data_to_template['vlans'][vlan].name }}
State : {{ data_to_template['vlans'][vlan].state }}
Shutdown : {{ data_to_template['vlans'][vlan].shutdown }}
Interface : {{ interface }}
}
```
{%- endfor %}{%- else %}
```mermaid
classDiagram
class VLAN_{{ vlan }} {
Name : {{ data_to_template['vlans'][vlan].name }}
State : {{ data_to_template['vlans'][vlan].state }}
Shutdown : {{ data_to_template['vlans'][vlan].shutdown }}
```
{%- endif %}{%- endfor %}
{%- else %}
{%- if command == 'vrf' %}
{%- for vrf in data_to_template['vrfs'] %}
{%-     for address_family in data_to_template['vrfs'][vrf].address_family %}
{%-         if data_to_template['vrfs'][vrf].address_family[address_family].route_targets is defined %}
{%-             for target in data_to_template['vrfs'][vrf].address_family[address_family].route_targets %}
```mermaid
classDiagram
class VRF_{{ vrf | replace("-","_") }} {
Description : {{ data_to_template['vrfs'][vrf].description }}
Address Family : {{ address_family }}
Target : {{ target }}
Router Type : {{ data_to_template['vrfs'][vrf].address_family[address_family].route_targets[target].rt_type }}
Route Distinguisher : {{ data_to_template['vrfs'][vrf].route_distinguisher }}
}
```
{%-             endfor %}
{%-         else %}
```mermaid
classDiagram
class VRF_{{ vrf | replace("-","_") }} {
Description : {{ data_to_template['vrfs'][vrf].description }}
Address Family : {{ address_family }}
Route Distinguisher : {{ data_to_template['vrfs'][vrf].route_distinguisher }}
}
```
{%-         endif %}
{%-     endfor %}
{%- endfor %}
{%- else %}
{%- if command == "show access-lists" %}
{%- for list in data_to_template['acls'] %}{%- if data_to_template['acls'][list].aces is defined %}{%- for ace in data_to_template['acls'][list].aces %}{%- if data_to_template['acls'][list].aces[ace].matches.l3 is defined %}{%- if data_to_template['acls'][list].aces[ace].matches.l3.ipv4 is defined %}{%- if data_to_template['acls'][list].aces[ace].matches.l3.ipv4.source_network is defined %}{%- for source_network in data_to_template['acls'][list].aces[ace].matches.l3.ipv4.source_network %}
```mermaid
classDiagram
class ACL_{{ list | replace("-","_") }}{
ACE: {{ ace }}
Forwarding: {{ data_to_template['acls'][list].aces[ace].actions.forwarding }}
Logging: {{ data_to_template['acls'][list].aces[ace].actions.logging | default ("No Logging") }}
Source: {{ data_to_template['acls'][list].aces[ace].matches.l3.ipv4.source_network[source_network] | replace("{'source_network': ","") | replace("}","") | replace("'","") }}
Destination: {{ data_to_template['acls'][list].aces[ace].matches.l3.ipv4.destination_network | replace(" {'destination_network':","") | replace("}","") | replace("{","") | replace("'","") | replace(":","") | default("N/A") }}
Protocol: {{ data_to_template['acls'][list].aces[ace].matches.l3.ipv4.protocol | default("N/A") }}
}
```
{%- endfor %}{%- else %}{%- for destination_network in data_to_template['acls'][list].aces[ace].matches.l3.ipv4.destination_network %}
```mermaid
classDiagram
class ACL_{{ list | replace("-","_") }}{
ACE: {{ ace }}
Forwarding: {{ data_to_template['acls'][list].aces[ace].actions.forwarding }}
Logging: {{ data_to_template['acls'][list].aces[ace].actions.logging | default ("No Logging") }}
Destination: {{ data_to_template['acls'][list].aces[ace].matches.l3.ipv4.destination_network | replace(" {'destination_network':","") | replace("}","") | replace("{","") | replace("'","") | replace(":","") | default("N/A") }}
Protocol: {{ data_to_template['acls'][list].aces[ace].matches.l3.ipv4.protocol | default("N/A") }}
}
```
{%- endfor %}{%- endif %}{%- endif %}{%- endif %}{%- endfor %}{%- else %}
```mermaid
classDiagram
class ACL_{{ list | replace("-","_") }}{
ACE: No ACEs
}
```
{%- endif %}{%- endfor %}{%- for list in data_to_template['acls'] %}{%- if data_to_template['acls'][list].aces is defined %}{%- for ace in data_to_template['acls'][list].aces %}{%- if data_to_template['acls'][list].aces[ace].matches.l4 is defined %}{%- if data_to_template['acls'][list].aces[ace].matches.l4.udp is defined %}{%- if data_to_template['acls'][list].aces[ace].matches.l4.udp.source_port is defined %}
```mermaid
classDiagram
class ACL_{{ list | replace("-","_") }}{
ACE: {{ ace }}
Forwarding: {{ data_to_template['acls'][list].aces[ace].actions.forwarding }}
Logging: {{ data_to_template['acls'][list].aces[ace].actions.logging | default ("No Logging") }}
Source: Source Protocol
Protocol: UDP
{%- if data_to_template['acls'][list].aces[ace].matches.l4.udp.source_port.operator is defined %}
Operator: {{ data_to_template['acls'][list].aces[ace].matches.l4.udp.source_port.operator.operator }}
Port: {{ data_to_template['acls'][list].aces[ace].matches.l4.udp.source_port.operator.port }}
{%- endif %}
}
```
{%- else %}{%- if data_to_template['acls'][list].aces[ace].matches.l4.udp.destination_port is defined%}
```mermaid
classDiagram
class ACL_{{ list | replace("-","_") }}{
ACE: {{ ace }}
Forwarding: {{ data_to_template['acls'][list].aces[ace].actions.forwarding }}
Logging: {{ data_to_template['acls'][list].aces[ace].actions.logging | default ("No Logging") }}
Destination: Destination Protocol
Protocol: UDP
{%- if data_to_template['acls'][list].aces[ace].matches.l4.udp.destination_port.operator is defined %}
Operator: {{ data_to_template['acls'][list].aces[ace].matches.l4.udp.destination_port.operator.operator }}
Port: {{ data_to_template['acls'][list].aces[ace].matches.l4.udp.destination_port.operator.port }}
{%- endif %}
}
```
{%- endif %}{%- endif %}{%- else %}{%- if data_to_template['acls'][list].aces[ace].matches.l4.tcp is defined %}{%- if data_to_template['acls'][list].aces[ace].matches.l4.tcp.source_port is defined %}
```mermaid
classDiagram
class ACL_{{ list | replace("-","_") }}{
ACE: {{ ace }}
Forwarding: {{ data_to_template['acls'][list].aces[ace].actions.forwarding }}
Logging: {{ data_to_template['acls'][list].aces[ace].actions.logging | default ("No Logging") }}
Source: Source Protocol
Protcol: TCP
{%- if data_to_template['acls'][list].aces[ace].matches.l4.tcp.source_port.operator is defined %}
Operator: {{ data_to_template['acls'][list].aces[ace].matches.l4.tcp.source_port.operator.operator }}
Port: {{ data_to_template['acls'][list].aces[ace].matches.l4.tcp.source_port.operator.port }}
{% else %}
{%- endif %}
}
```
{%- else %}
{%- if data_to_template['acls'][list].aces[ace].matches.l4.tcp.destination_port is defined%}
```mermaid
classDiagram
class ACL_{{ list | replace("-","_") }}{
ACE: {{ ace }}
Forwarding: {{ data_to_template['acls'][list].aces[ace].actions.forwarding }}
Logging: {{ data_to_template['acls'][list].aces[ace].actions.logging | default ("No Logging") }}
Destination: Destination Protocol 
Protocol: TCP
{%- if data_to_template['acls'][list].aces[ace].matches.l4.tcp.destination_port.operator is defined %}
Operator: {{ data_to_template['acls'][list].aces[ace].matches.l4.tcp.destination_port.operator.operator }}
Port: {{ data_to_template['acls'][list].aces[ace].matches.l4.tcp.destination_port.operator.port }}
{%- endif %}
}
```
{%- endif %}{%- endif %}{%- endif %}{%- endif %}{%- endif %}{%- endfor %}{%- else %}
```mermaid
classDiagram
class ACL_{{ list | replace("-","_") }}{
ACE: No ACEs
}
```
{%- endif %}{%- endfor %}
{%- else %}
{%- if command == "show bgp process vrf all" %}
{%-     for vrf in data_to_template.vrf %}
{%-         for address_family in data_to_template.vrf[vrf].address_family %}
{%-             for peer in data_to_template.vrf[vrf].address_family[address_family].peers %}
```mermaid
classDiagram
class {{ hostname | replace("-","_") }}_BGP_Process {
BGP Tag : {{ data_to_template.bgp_tag }}
Router ID : {{ data_to_template.vrf[vrf].router_id }}
PID : {{ data_to_template.bgp_pid }}
State : {{ data_to_template.bgp_protocol_state }}
Started Reason : {{ data_to_template.bgp_protocol_started_reason }}
AS Path Entries : {{ data_to_template.bgp_as_path_entries }}
AS Format : {{ data_to_template.bgp_asformat }}
Memory State : {{ data_to_template.bgp_memory_state }}
M Mode : {{ data_to_template.bgp_mmode }}
Paths Per HWM Attribute : {{ data_to_template.bgp_paths_per_hwm_attr }}
Bytes Used : {{ data_to_template.bytes_used }}
Entries Pending Delete : {{ data_to_template.entries_pending_delete }}
VRF : {{ vrf }}
Cluster ID : {{ data_to_template.vrf[vrf].cluster_id }}
Confederation Router ID : {{ data_to_template.vrf[vrf].conf_router_id }}
Number of Configured Peers : {{ data_to_template.vrf[vrf].num_conf_peers }}
Number of Established Peers : {{ data_to_template.vrf[vrf].num_established_peers }}
Number of Pending Configured Peers : {{ data_to_template.vrf[vrf].num_pending_conf_peers }}
VRF ID : {{ data_to_template.vrf[vrf].vrf_id }}
VRF RD : {{ data_to_template.vrf[vrf].vrf_rd }}
VRF State : {{ data_to_template.vrf[vrf].vrf_state }}
Address Family : {{ address_family }}
Peer : {{ peer }}
Active Peers : {{ data_to_template.vrf[vrf].address_family[address_family].peers[peer].active_peers }}
Aggregates : {{ data_to_template.vrf[vrf].address_family[address_family].peers[peer].aggregates }}
Networks : {{ data_to_template.vrf[vrf].address_family[address_family].peers[peer].networks }}
Paths : {{ data_to_template.vrf[vrf].address_family[address_family].peers[peer].paths }}
Routes : {{ data_to_template.vrf[vrf].address_family[address_family].peers[peer].routes }}
Table ID : {{ data_to_template.vrf[vrf].address_family[address_family].table_id }}
Table State : {{ data_to_template.vrf[vrf].address_family[address_family].table_state }}
```
{%-             endfor %}
{%-         endfor %}
{%-     endfor %}
{%- else %}
{%- if command == "show bgp sessions" %}
{%-     for vrf in data_to_template.vrf %}
```mermaid
classDiagram
class {{ data_to_template.local_as }}_Local_AS {
Total Established Peers : {{ data_to_template.total_established_peers }}
Total Peers : {{ data_to_template.total_peers }}
VRF : {{ vrf }}
Router ID : {{ data_to_template.vrf[vrf].router_id }}
VRF Established Peers : {{ data_to_template.vrf[vrf].vrf_established_peers }}
VRF Peers : {{ data_to_template.vrf[vrf].vrf_peers }}
}
```
{%-     endfor %}
{% else %}
{%- if command == "show cdp neighbors" %}
{%- for neighbor in data_to_template['cdp'].index %}
```mermaid
classDiagram
class {{ hostname | replace("-","_") }} {
Device ID : {{ data_to_template['cdp'].index[neighbor].device_id }}
Platform: {{ data_to_template['cdp'].index[neighbor].platform }}
Local Interface: {{ data_to_template['cdp'].index[neighbor].local_interface }}
Port ID: {{ data_to_template['cdp'].index[neighbor].port_id }}
Capability: {{ data_to_template['cdp'].index[neighbor].capability }}
Hold Time: {{ data_to_template['cdp'].index[neighbor].hold_time }}
}
```
{%- endfor %}
{%- else %}
{%- if command == "show cdp neighbors detail" %}
{%- for neighbor in data_to_template['index'] %}
```mermaid
classDiagram
class {{ hostname | replace("-","_") }}_CDP_Neighbors_Detail {
Local Interface : {{ data_to_template['index'][neighbor].local_interface }}
Device ID : {{ data_to_template['index'][neighbor].device_id }}
Platform : {{ data_to_template['index'][neighbor].platform }}
Port ID : {{ data_to_template['index'][neighbor].port_id }}
Interface Addresses : {{ data_to_template['index'][neighbor].interface_addresses | replace("{'","") | replace("'","") | replace(":","") | replace("{}}","") | replace(",","") }}
Management Addresses : {{ data_to_template['index'][neighbor].management_addresses | replace("{'","") | replace("'","") | replace(":","") | replace("}","") | replace("{}","") | replace("{","") }}
Capabilities : {{ data_to_template['index'][neighbor].capabilities }}
Duplex Mode : {{ data_to_template['index'][neighbor].duplex_mode }}
Hold Time : {{ data_to_template['index'][neighbor].hold_time }}
Native VLAN : {{ data_to_template['index'][neighbor].native_vlan }}
Software Version : {{ data_to_template['index'][neighbor].software_version | replace(","," ") | replace("\n"," ") }}
System Name : {{ data_to_template['index'][neighbor].system_name | default("N/A") }}
VTP Management Domain : {{ data_to_template['index'][neighbor].vtp_management_domain | default("N/A") }}
Physical Location : {{ data_to_template['index'][neighbor].physical_location | default("N/A") }}
Advertisement Version : {{ data_to_template['index'][neighbor].advertisement_ver }}
}
```
{% endfor %}
{%- else %}
{%- if command == "show environment" %}
{%- for fan in data_to_template.fans %}
```mermaid
classDiagram
class {{ hostname | replace("-","_") }}_Environment_Fans {
{%-     if (fan != "fan_air_filter") and (fan != "fan_zone_speed") %}
Fan : {{ fan }}
Direction : {{ data_to_template.fans[fan].direction }}
{%- if data_to_template.fans[fan].model is defined %}
Model : {{ data_to_template.fans[fan].model }}
{%- endif %}
Status : {{ data_to_template.fans[fan].status }}
Air Filter : {{ data_to_template.fans.fan_air_filter }}
Zone Speed : {{ data_to_template.fans.fan_zone_speed }}
}
```
{%-     endif %}
{%- endfor %}
{%- for power_supply in data_to_template.power.power_supply %}
```mermaid
classDiagram
class {{ hostname | replace("-","_") }}_Environment_Power_Supply {
Power Supply : {{ power_supply }}
Actual Input Watts : {{ data_to_template.power.power_supply[power_supply].actual_input_watts }}
Actual Output Watts : {{ data_to_template.power.power_supply[power_supply].actual_output_watts }}
Model : {{ data_to_template.power.power_supply[power_supply].model }}
Status : {{ data_to_template.power.power_supply[power_supply].status }}
Total Capacity Watts : {{ data_to_template.power.power_supply[power_supply].total_capacity_watts }}
Voltage : {{ data_to_template.power.voltage }}
Config Mode : {{ data_to_template.power.power_supply_mode.config_mode }}
Oper Mode : {{ data_to_template.power.power_supply_mode.oper_mode }}
Total Grid A Power Watts : {{ data_to_template.power.power_usage_summary.total_grid_a_power_watts }}
Total Grid B Power Watts : {{ data_to_template.power.power_usage_summary.total_grid_b_power_watts }}
Total Power Capacity Watts : {{ data_to_template.power.power_usage_summary.total_power_capacity_watts }}
Total Power Cumulative Watts : {{ data_to_template.power.power_usage_summary.total_power_cumulative_watts }}
Total Power Input Watts : {{ data_to_template.power.power_usage_summary.total_power_input_watts }}
Total Power Output Watts : {{ data_to_template.power.power_usage_summary.total_power_output_watts }}
}
```
{%- endfor %}
{%- for temp_number in data_to_template.temperature %}
{%-     for area in data_to_template.temperature[temp_number] %}
```mermaid
classDiagram
class {{ hostname | replace("-","_") }}_Environment_Temperature_Area {
Area : {{ area }}
Current Temp Celsius : {{ data_to_template.temperature[temp_number][area].current_temp_celsius }}
Major Threshold Celsius : {{ data_to_template.temperature[temp_number][area].major_threshold_celsius }}
Minor Threshold Celsius : {{ data_to_template.temperature[temp_number][area].minor_threshold_celsius }}
Status : {{ data_to_template.temperature[temp_number][area].status }}
}
```
{%-     endfor %}
{%- endfor %}
{%- else %}
{%- if command == "show port-channel summary" %}
{%- for interface in data_to_template['interfaces'] %}{% for member in data_to_template['interfaces'][interface].members %}  
```mermaid
classDiagram
class {{ interface | replace("-","_") }} {
Bundle ID : {{ data_to_template['interfaces'][interface].bundle_id }}
Layer : {{ data_to_template['interfaces'][interface].layer }}
Type : {{ data_to_template['interfaces'][interface].type }}
Oper Status : {{ data_to_template['interfaces'][interface].oper_status }}
Protocol : {{ data_to_template['interfaces'][interface].protocol }}
Member : {{ member }}
Flags : {{ data_to_template['interfaces'][interface].members[member].flags }}
}
```
{%- endfor %}{% endfor %}
{%- else %}
{%- if command == "show interface" %}
{%- for interface in data_to_template %}   
```mermaid
classDiagram
class {{ interface | replace("-","_") | replace("/","_") }} {{ interface }} {
{%- if data_to_template[interface].description is defined %}
Description : {{ data_to_template[interface].description }}
{%- endif %}
{%- if data_to_template[interface].admin_state is defined %}
Admin State : {{ data_to_template[interface].admin_state }}
{%- endif %}
{%- if data_to_template[interface].enabled is defined %}
Enabled : {{ data_to_template[interface].enabled }}
{% endif %}
{% if data_to_template[interface].oper_status is defined %}
Oper Status : {{ data_to_template[interface].oper_status }}
{% endif %}
{%- if data_to_template[interface].line_protocol is defined %}
Line Protocol : {{ data_to_template[interface].line_protocol }}
{%- endif %}
{%- if data_to_template[interface].link_state is defined %}
Link State : {{ data_to_template[interface].link_state }}
{%- endif %}
{%- if data_to_template[interface].mac_address is defined %}
MAC Address : {{ data_to_template[interface].mac_address }}
{%- endif %}
{%- if data_to_template[interface].phys_address is defined %}
Physical Address : {{ data_to_template[interface].phys_address }}
{%- endif %}
{%- if data_to_template[interface].ipv4 is defined %}{%- for ip in data_to_template[interface].ipv4 %}
IP Address : {{ ip }}
{%- endfor%}{%- endif %}
{%- if data_to_template[interface].port_speed is defined %}
Port Speed : {{ data_to_template[interface].port_speed }}
{%- endif %}
{%- if data_to_template[interface].duplex_mode is defined %}
Duplex Mode : {{ data_to_template[interface].duplex_mode }}
{%- endif %}
{%- if data_to_template[interface].bandwidth is defined %}
Bandwidth : {{ data_to_template[interface].bandwidth }}
{%- endif %}
{%- if data_to_template[interface].delay is defined %}
Delay : {{ data_to_template[interface].delay }}
{%- endif %}
{%- if data_to_template[interface].media_type is defined %}
Media Type : {{ data_to_template[interface].media_type }}
{%- endif %}
{%- if data_to_template[interface].ethertype is defined %}
Ethertype : {{ data_to_template[interface].ethertype }}
{%- endif %}
{%- if data_to_template[interface].medium is defined %}
Medium : {{ data_to_template[interface].medium }}
{%- endif %}
{%- if data_to_template[interface].mtu is defined %}
MTU : {{ data_to_template[interface].mtu }}
{%- endif %}
{%- if data_to_template[interface].port_mode is defined %}
Port Mode : {{ data_to_template[interface].port_mode }}
{%- endif %}
{%- if data_to_template[interface].types is defined %}
Types : {{ data_to_template[interface].types }}
{%- endif %}
{%- if (data_to_template[interface].port_channel) and (data_to_template[interface].port_channel.port_channel_int) is defined %}
Port Channel Interface : {{ data_to_template[interface].port_channel.port_channel_int }}
{%- else %}
{%- if (data_to_template[interface].port_channel) and (data_to_template[interface].port_channel.port_channel_member_intfs) is defined %}
Port Channel Interface : {{ interface }}
{%- endif %}{%- endif %}
{%- if (data_to_template[interface].port_channel) and (data_to_template[interface].port_channel.port_channel_member) is defined %}
Port Channel Member : {{ data_to_template[interface].port_channel.port_channel_member }}
{%- else %}
{%- if (data_to_template[interface].port_channel) and (data_to_template[interface].port_channel.port_channel_member_intfs) is defined %}{%- for member in data_to_template[interface].port_channel.port_channel_member_intfs %}
Member Interface : {{ member }}
{%- endfor %}{%- endif %}{%- endif %}
{%- if data_to_template[interface].last_link_flapped is defined %}
Last Link Flap : {{ data_to_template[interface].last_link_flapped }}
{%- endif %}
{%- if data_to_template[interface].interface_reset is defined %}
Interface Reset : {{ data_to_template[interface].interface_reset }}
{%- endif %}
{%- if data_to_template[interface].dedicated_interface is defined %}
Dedicated Interface : {{ data_to_template[interface].dedicated_interface }}
{%- endif %}
{%- if data_to_template[interface].efficient_ethernet is defined %}
Efficient Ethernet : {{ data_to_template[interface].efficient_ethernet }}
{%- endif %}
{%- if data_to_template[interface].encapsulations is defined %}
Encapsulation : {{ data_to_template[interface].encapsulations.encapsulation }}
{%- endif %}
{%- if data_to_template[interface].flow_control is defined %}
Flow Control Send : {{ data_to_template[interface].flow_control.send }}
Flow Control Receive : {{ data_to_template[interface].flow_control.receive }}
{%- endif %}
{%- if data_to_template[interface].auto_mdix is defined %}
Auto MDIX : {{ data_to_template[interface].auto_mdix }}
{%- endif %}
{%- if data_to_template[interface].reliability is defined %}
Reliability : {{ data_to_template[interface].reliability }}
{%- endif %}
{%- if data_to_template[interface].switchport_monitor is defined %}
Switchport Monitor : {{ data_to_template[interface].switchport_monitor }}
{%- endif %}
{%- if data_to_template[interface].beacon is defined %}
Beacon : {{ data_to_template[interface].beacon }}
{%- endif %}
{%- if data_to_template[interface].autostate is defined %}
Autostate : {{ data_to_template[interface].autostate }}
{%- endif %}
{%- if data_to_template[interface].rxload is defined %}
RX Load : {{ data_to_template[interface].rxload }}
{%- endif %}
{%- if data_to_template[interface].txload is defined %}
TX Load : {{ data_to_template[interface].txload }}
{%- endif %}
{%- if data_to_template[interface].counters is defined %}{%- if data_to_template[interface].counters.in_bad_etype_drop is defined %}
Input Bad EType Drop : {{ data_to_template[interface].counters.in_bad_etype_drop }}
{%- endif %}
{%- if data_to_template[interface].counters.in_broadcast_pkts is defined %}
Input Broadcast : {{ data_to_template[interface].counters.in_broadcast_pkts }}
{%- endif %}
{%- if data_to_template[interface].counters.in_crc_errors is defined %}
Input CRC Errors : {{ data_to_template[interface].counters.in_crc_errors }}
{%- endif %}
{%- if data_to_template[interface].counters.in_discard is defined %}
Input Discard : {{ data_to_template[interface].counters.in_discard }}
{%- endif %}
{%- if data_to_template[interface].counters.in_errors is defined %}
Input Errors : {{ data_to_template[interface].counters.in_errors }}
{%- endif %}
{%- if data_to_template[interface].counters.in_if_down_drop is defined %}
Input Interface Down Drop : {{ data_to_template[interface].counters.in_if_down_drop }}
{%- endif %}
{%- if data_to_template[interface].counters.in_ignored is defined %}
Input Ignored : {{ data_to_template[interface].counters.in_ignored }}
{%- endif %}
{%- if data_to_template[interface].counters.in_mac_pause_frames is defined %}
Input MAC Pause Frames : {{ data_to_template[interface].counters.in_mac_pause_frames }}
{%- endif %}
{%- if data_to_template[interface].counters.in_multicast_pkts is defined %}
Input Multicast Packets : {{ data_to_template[interface].counters.in_multicast_pkts }}
{%- endif %}
{%- if data_to_template[interface].counters.in_no_buffer is defined %}
Input No Buffer : {{ data_to_template[interface].counters.in_no_buffer }}
{%- endif %}
{%- if data_to_template[interface].counters.in_octets is defined %}
Input Octects : {{ data_to_template[interface].counters.in_octets }}
{%- endif %}
{%- if data_to_template[interface].counters.in_overrun is defined %}
Input Overrun : {{ data_to_template[interface].counters.in_overrun }}
{%- endif %}
{%- if data_to_template[interface].counters.in_oversize_frame is defined %}
Input Oversize Frame : {{ data_to_template[interface].counters.in_oversize_frame }}
{%- endif %}
{%- if data_to_template[interface].counters.in_pkts is defined %}
Input: {{ data_to_template[interface].counters.in_pkts }}
{%- endif %}
{%- if data_to_template[interface].counters.in_runts is defined %}
Input Runts : {{ data_to_template[interface].counters.in_runts }}
{%- endif %}
{%- if data_to_template[interface].counters.in_short_frame is defined %}
Input Short Frame : {{ data_to_template[interface].counters.in_short_frame }}
{%- endif %}
{%- if data_to_template[interface].counters.in_underrun is defined %}
Input Underrun : {{ data_to_template[interface].counters.in_underrun }}
{%- endif %}
{%- if data_to_template[interface].counters.in_unicast_pkts is defined %}
Input Unicast : {{ data_to_template[interface].counters.in_unicast_pkts }}
{%- endif %}
{%- if data_to_template[interface].counters.in_unknown_protos is defined %}
Input Unknown Protocols : {{ data_to_template[interface].counters.in_unknown_protos }}
{%- endif %}
{%- if data_to_template[interface].counters.in_watchdog is defined %}
Input Watchdog : {{ data_to_template[interface].counters.in_watchdog }}
{%- endif %}
{%- if data_to_template[interface].counters.in_with_dribble is defined %}
Input With Dribble : {{ data_to_template[interface].counters.in_with_dribble }}
{%- endif %}
{%- if data_to_template[interface].counters.out_babble is defined %}
Output Babble : {{ data_to_template[interface].counters.out_babble }}
{%- endif %}
{%- if data_to_template[interface].counters.out_broadcast_pkts is defined %}
Output Broadcast : {{ data_to_template[interface].counters.out_broadcast_pkts }}
{%- endif %}
{%- if data_to_template[interface].counters.out_collision is defined %}
Output Collision : {{ data_to_template[interface].counters.out_collision }}
{%- endif %}
{%- if data_to_template[interface].counters.out_deferred is defined %}
Output Deferred : {{ data_to_template[interface].counters.out_deferred }}
{%- endif %}
{%- if data_to_template[interface].counters.out_discard is defined %}
Output Discard : {{ data_to_template[interface].counters.out_discard }}
{%- endif %}
{%- if data_to_template[interface].counters.out_errors is defined %}
Output Errors : {{ data_to_template[interface].counters.out_errors }}
{%- endif %}
{%- if data_to_template[interface].counters.out_jumbo_packets is defined %}
Output Jumbo : {{ data_to_template[interface].counters.out_jumbo_packets }}
{%- endif %}
{%- if data_to_template[interface].counters.out_late_collision is defined %}
Output Late Collision : {{ data_to_template[interface].counters.out_late_collision }}
{%- endif %}
{%- if data_to_template[interface].counters.out_lost_carrier is defined %}
Output Lost Carrier : {{ data_to_template[interface].counters.out_lost_carrier }}
{%- endif %}
{%- if data_to_template[interface].counters.out_mac_pause_frames is defined %}
Output MAC Pause Frames : {{ data_to_template[interface].counters.out_mac_pause_frames }}
{%- endif %}
{%- if data_to_template[interface].counters.out_multicast_pkts is defined %}
Output Multicast : {{ data_to_template[interface].counters.out_multicast_pkts }}
{%- endif %}
{%- if data_to_template[interface].counters.out_no_carrier is defined %}
Output No Carrier : {{ data_to_template[interface].counters.out_no_carrier }}
{%- endif %}
{%- if data_to_template[interface].counters.out_octets is defined %}
Output Octects : {{ data_to_template[interface].counters.out_octets }}
{%- endif %}
{%- if data_to_template[interface].counters.out_pkts is defined %}
Output : {{ data_to_template[interface].counters.out_pkts }}
{%- endif %}
{%- if data_to_template[interface].counters.out_unicast_pkts is defined %}
Output Unicast : {{ data_to_template[interface].counters.out_unicast_pkts }}
{%- endif %}
{%- if data_to_template[interface].counters.last_clear is defined %}
Counters Last Clear : {{ data_to_template[interface].counters.last_clear }}
{%- endif %}
{%- if data_to_template[interface].counters.rate is defined %}{%- if data_to_template[interface].counters.rate.in_rate is defined %}
Input Rate : {{ data_to_template[interface].counters.rate.in_rate }}
{%- endif %}
{%- if data_to_template[interface].counters.rate.in_rate_pkts is defined %}
Input Rate Packets : {{ data_to_template[interface].counters.rate.in_rate_pkts }}
{%- endif %}
{%- if data_to_template[interface].counters.rate.out_rate is defined %}
Output Rate : {{ data_to_template[interface].counters.rate.out_rate }}
{%- endif %}
{%- if data_to_template[interface].counters.rate.out_rate_pkts is defined %}
Output Rate Packets : {{ data_to_template[interface].counters.rate.out_rate_pkts }}
{%- endif %}
{%- if data_to_template[interface].counters.rate.load_interval is defined %}
Load Interval : {{ data_to_template[interface].counters.rate.load_interval }}
{%- endif %}
{%- endif %}
{%- if data_to_template[interface].counters.rx is defined %}
RX : {{ data_to_template[interface].counters.rx }}
{%- endif %}
{%- if data_to_template[interface].counters.tx is defined %}
TX : {{ data_to_template[interface].counters.tx }}
{%- endif %}
{%- endif %}
}
```
{%- endfor %}
{%- else %}
{%- if command == "show interface status" %}
{%- for interface in data_to_template.interfaces %}
```mermaid
classDiagram
class {{ interface | replace("-","_") | replace("/","_") }} {
Status : {{ data_to_template.interfaces[interface].status }}
Type : {{ data_to_template.interfaces[interface].type }}
VLAN : {{ data_to_template.interfaces[interface].vlan }}
Port Speed : {{ data_to_template.interfaces[interface].port_speed }}
Duplex Code : {{ data_to_template.interfaces[interface].duplex_code }}
}
```
{%- endfor %}
{%- else %}
{%- if command == "show interface transceiver" %}
{%- for interface in data_to_template %}
{%-     if data_to_template[interface].transceiver_present %}
```mermaid
classDiagram
class {{ interface | replace("-","_") | replace("/","_") }} {
Transceiver Present : {{ data_to_template[interface].transceiver_present }}
Transceiver Type : {{ data_to_template[interface].transceiver_type }}
Name : {{ data_to_template[interface].name }}
Nominal Bitrate : {{ data_to_template[interface].nominal_bitrate }}
Part Number : {{ data_to_template[interface].part_number }}
Revision : {{ data_to_template[interface].revision }}
Serial Number : {{ data_to_template[interface].serial_number }}
}
```
{%-     endif %}
{%- endfor %}
{%- else %}
{%- if command == "show inventory" %}
{%- for part in data_to_template['name'] %}
```mermaid
classDiagram
class {{ hostname | replace("-","_") }}_Inventory {
Part : {{ part }}
Description : {{ data_to_template['name'][part].description }}
PID : {{ data_to_template['name'][part].pid }}
Serial Number : {{ data_to_template['name'][part].serial_number }}
}
```
{%- endfor %}
{%- else %}
{% if command == "show ip arp vrf all" %}
{%- for interface in data_to_template['interfaces'] %}{% for neighbor in data_to_template['interfaces'][interface].ipv4.neighbors %}
```mermaid
classDiagram
class {{ interface | replace("-","_") | replace("/","_") }} {
Neighbor : {{ neighbor }}
Link Layer Address : {{ data_to_template['interfaces'][interface].ipv4.neighbors[neighbor].link_layer_address }}
Origin : {{ data_to_template['interfaces'][interface].ipv4.neighbors[neighbor].origin }}
Age : {{ data_to_template['interfaces'][interface].ipv4.neighbors[neighbor].age }}
}
```
{%- endfor %}{% endfor %}
{%- else %}
{%- if command == "show ip interface brief" %}
{%- for interface in data_to_template['interface'] %}
{%-     if data_to_template['interface'][interface].vlan_id is defined %}
{%-         for vlan_id in data_to_template['interface'][interface].vlan_id %}
```mermaid
classDiagram
class {{ interface | replace("-","_") | replace("/","_") }} {
IP Address : {{ data_to_template['interface'][interface].vlan_id[vlan_id].ip_address }}
Interface Status : {{ data_to_template['interface'][interface].vlan_id[vlan_id].interface_status }}
}
```
{%- endfor %}{% else %}
```mermaid
classDiagram
class {{ interface | replace("-","_") | replace("/","_") }} {
IP Address : {{ data_to_template['interface'][interface].ip_address }}
Interface Status : {{ data_to_template['interface'][interface].interface_status }}
}
```
{%- endif %}{%- endfor %}
{%- else %}
{%- if command == "show ip ospf" %}
{%- for vrf in data_to_template['vrf'] %}{%- for address_family in data_to_template['vrf'][vrf].address_family %}{%- for instance in data_to_template['vrf'][vrf].address_family[address_family].instance %}{%- for graceful_restart in data_to_template['vrf'][vrf].address_family[address_family].instance[instance].graceful_restart %}{%- if data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas is defined %}{%- for area in data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas %}
```mermaid
classDiagram
class {{ vrf | replace("-","_") }} {
Address Family : {{ address_family }}
Instance : {{ instance }}
Router ID : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].router_id}}
Area : {{ area }}
Area Type : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].area_type }}
Authentication : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].authentication }}
Existed : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].existed }}
Enable : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].enable }}
Active Interfaces : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].numbers.active_interfaces }}
Passive Interfaces : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].numbers.passive_interfaces }}
Loopback Interfaces : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].numbers.loopback_interfaces }}
Interfaces : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].numbers.interfaces }}
SPF Runs : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].statistics.spf_runs_count }}
Last SPF Run Time : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].statistics.spf_last_run_time }}
Auto Cost Bandwidth Unit : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].auto_cost.bandwidth_unit }}
Auto Cost Enable : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].auto_cost.enable }}
Auto Cost Reference Bandwidth : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].auto_cost.reference_bandwidth }}
Discard External Routes : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].discard_route_external }}
Discard Internal Routes : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].discard_route_internal }}
Graceful Restart : {{ graceful_restart }}
Enable : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart].enable }}
Restart Interval : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart].restart_interval }}
State : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart].state }}
NSR Enable : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].nsr.enable }}
Normal Areas : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].numbers.active_areas.normal }}
NSSA Areas : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].numbers.active_areas.nssa }}
Stub Areas : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].numbers.active_areas.stub }}
Total Areas : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].numbers.active_areas.total }}
SPF Control Paths : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].spf_control.paths }}
}
```
{%- endfor %}{%- else %}
```mermaid
classDiagram
class {{ vrf | replace("-","_") }} {
Address Family : {{ address_family }}
Instance : {{ instance }}
Router ID : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].router_id}}
Area : No Areas
Auto Cost Bandwidth Unit : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].auto_cost.bandwidth_unit }}
Auto Cost Enable : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].auto_cost.enable }}
Auto Cost Reference Bandwidth : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].auto_cost.reference_bandwidth }}
Discard External Routes : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].discard_route_external }}
Discard Internal Routes : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].discard_route_internal }}
Graceful Restart : {{ graceful_restart }}
Enable : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart].enable }}
Restart Interval : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart].restart_interval }}
State : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].graceful_restart[graceful_restart].state }}
NSR Enable : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].nsr.enable }}
Normal Areas : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].numbers.active_areas.normal }}
NSSA Areas : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].numbers.active_areas.nssa }}
Stub Areas : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].numbers.active_areas.stub }}
Total Areas : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].numbers.active_areas.total }}
SPF Control Paths : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].spf_control.paths }}
}
```
{%- endif %}{%- endfor %}{%- endfor %}{%- endfor %}{%- endfor %}
{%- else %}
{%- if command == "show ip ospf interface" %}
{%- for vrf in data_to_template['vrf'] %}{%- for address_family in data_to_template['vrf'][vrf].address_family %}{%- for instance in data_to_template['vrf'][vrf].address_family[address_family].instance %}{%- for area in data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas %}{%- for interface in data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces %}
```mermaid
classDiagram
class {{ vrf | replace("-","_") }} {
Address Family : {{ address_family }}
Instance : {{ instance }}
Area : {{ area }}
Interface : {{ interface }}
Name : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].name }}
BFD Enable : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].bfd.enable }}
Cost : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].cost }}
{%- if data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].dead_interval is defined %}
Dead Interval : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].dead_interval }}
{%- endif %}
Enable : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].enable }}
{%- if data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].hello_interval is defined %}
Hello Interval : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].hello_interval }}
{%- endif %}
{%- if data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].hello_timer is defined %}
Hello Timer : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].hello_timer }}
{%- endif %}
Index : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].index }}
Interface Type : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].interface_type }}
{%- if data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].ip_address is defined %}
IP Address : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].ip_address }}
{%- endif %}
Line Protocol : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].line_protocol }}
Passive : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].passive }}
{%- if data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].retransmit_interval is defined %}
Retransmit Interval : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].retransmit_interval }}
{%- endif %}
State : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].state }}
{%- if data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].statistics is defined %}
LSA Checksum : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].statistics.link_scope_lsa_cksum_sum }}
LSA Count : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].statistics.link_scope_lsa_count }}
Adjacent Neighbors : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].statistics.num_nbrs_adjacent }}
Flooding Neighbors : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].statistics.num_nbrs_flooding }}
Total Neighbors : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].statistics.total_neighbors }}
{%- endif %}    
{%- if data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].transmit_delay is defined %}
Transmit Delay : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].transmit_delay }}
{%- endif %}
{%- if data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].wait_interval is defined %}
Wait Interval : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].wait_interval }}
{%- endif %}
}
```
{%- endfor %}{%- endfor %}{%- endfor %}{%- endfor %}{%- endfor %}
{%- else %}
{%- if command == "show ip ospf interface vrf all" %}
{%- for vrf in data_to_template['vrf'] %}{%- for address_family in data_to_template['vrf'][vrf].address_family %}{%- for instance in data_to_template['vrf'][vrf].address_family[address_family].instance %}{%- for area in data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas %}{%- for interface in data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces %}
```mermaid
classDiagram
class {{ vrf | replace("-","_") }} {
Address Family : {{ address_family }}
Instance : {{ instance }}
Area : {{ area }}
Interface : {{ interface }}
Name : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].name }}
BFD Enable : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].bfd.enable }}
Cost : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].cost }}
{%- if data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].dead_interval is defined %}
Dead Interval : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].dead_interval }}
{%- endif %}
Enable : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].enable }}
{%- if data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].hello_interval is defined %}
Hello Interval : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].hello_interval }}
{%- endif %}
{%- if data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].hello_timer is defined %}
Hello Timer : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].hello_timer }}
{%- endif %}
Index : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].index }}
Interface Type : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].interface_type }}
{%- if data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].ip_address is defined %}
IP Address : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].ip_address }}
{%- endif %}
Line Protocol : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].line_protocol }}
Passive : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].passive }}
{%- if data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].retransmit_interval is defined %}
Retransmit Interval : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].retransmit_interval }}
{%- endif %}
State : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].state }}
{%- if data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].statistics is defined %}
LSA Checksum : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].statistics.link_scope_lsa_cksum_sum }}
LSA Count : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].statistics.link_scope_lsa_count }}
Adjacent Neighbors : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].statistics.num_nbrs_adjacent }}
Flooding Neighbors : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].statistics.num_nbrs_flooding }}
Total Neighbors : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].statistics.total_neighbors }}
{%- endif %}    
{%- if data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].transmit_delay is defined %}
Transmit Delay : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].transmit_delay }}
{%- endif %}
{%- if data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].wait_interval is defined %}
Wait Interval : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].wait_interval }}
{%- endif %}
}
```
{%- endfor %}{%- endfor %}{%- endfor %}{%- endfor %}{%- endfor %}
{%- else %}
{%- if command == "show ip ospf neighbors detail" %}
{%- for vrf in data_to_template['vrf'] %}{% for address_family in data_to_template['vrf'][vrf].address_family %}{% for instance in data_to_template['vrf'][vrf].address_family[address_family].instance %}{% for area in data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas %}{% for interface in data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces %}{% for neighbor in data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].neighbors %}
```mermaid
classDiagram
class {{ vrf | replace("-","_") }} {
Address Family : {{ address_family }}
Instance : {{ instance }}
Area : {{ area }}
Interface : {{ interface }}
Neighbor : {{ neighbor }}
Address : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].neighbors[neighbor].address }}
Event Count : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].neighbors[neighbor].statistics.nbr_event_count }}
DBD Options : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].neighbors[neighbor].dbd_options }}
Dead Timer : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].neighbors[neighbor].dead_timer }}
Hello Options : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].neighbors[neighbor].hello_options }}
Last Non-Hello Received : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].neighbors[neighbor].last_non_hello_packet_received }}
Last State Change : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].neighbors[neighbor].last_state_change }}
Neighbor Router ID : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].neighbors[neighbor].neighbor_router_id }}
Neighbor State : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].neighbors[neighbor].state }}
}
```
{%- endfor %}{%- endfor %}{%- endfor %}{%- endfor %}{%- endfor %}{%- endfor %}
{%- else %}
{%- if command == "show ip ospf neighbors detail vrf all" %}
{%- for vrf in data_to_template['vrf'] %}{% for address_family in data_to_template['vrf'][vrf].address_family %}{% for instance in data_to_template['vrf'][vrf].address_family[address_family].instance %}{% for area in data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas %}{% for interface in data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces %}{% for neighbor in data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].neighbors %}
```mermaid
classDiagram
class {{ vrf | replace("-","_") }} {
Address Family : {{ address_family }}
Instance : {{ instance }}
Area : {{ area }}
Interface : {{ interface }}
Neighbor : {{ neighbor }}
Address : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].neighbors[neighbor].address }}
Event Count : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].neighbors[neighbor].statistics.nbr_event_count }}
DBD Options : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].neighbors[neighbor].dbd_options }}
Dead Timer : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].neighbors[neighbor].dead_timer }}
Hello Options : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].neighbors[neighbor].hello_options }}
Last Non-Hello Received : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].neighbors[neighbor].last_non_hello_packet_received }}
Last State Change : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].neighbors[neighbor].last_state_change }}
Neighbor Router ID : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].neighbors[neighbor].neighbor_router_id }}
Neighbor State : {{ data_to_template['vrf'][vrf].address_family[address_family].instance[instance].areas[area].interfaces[interface].neighbors[neighbor].state }}
}
```
{%- endfor %}{%- endfor %}{%- endfor %}{%- endfor %}{%- endfor %}{%- endfor %}
{%- else %}
{%- if command == "show ip route" %}
{%- for vrf in data_to_template['vrf'] %}{% for address_family in data_to_template['vrf'][vrf].address_family %}{% for route in data_to_template['vrf'][vrf].address_family[address_family].routes %}{% for next_hop in data_to_template['vrf'][vrf].address_family[address_family].routes[route].next_hop.next_hop_list %}
```mermaid
classDiagram
class {{ vrf | replace("-","_") }} {
Address Family : {{ address_family }}
Route : {{ route }}
Active : {{ data_to_template['vrf'][vrf].address_family[address_family].routes[route].active }}
Metric : {{ data_to_template['vrf'][vrf].address_family[address_family].routes[route].metric }}
Route Preference : {{ data_to_template['vrf'][vrf].address_family[address_family].routes[route].route_preference }}
Source Protocol : {{ data_to_template['vrf'][vrf].address_family[address_family].routes[route].source_protocol }}
M Best : {{ data_to_template['vrf'][vrf].address_family[address_family].routes[route].mbest }}
U Best : {{ data_to_template['vrf'][vrf].address_family[address_family].routes[route].ubest }}
Next Hop Number : {{ next_hop }}
Next Hop : {{ data_to_template['vrf'][vrf].address_family[address_family].routes[route].next_hop.next_hop_list[next_hop].next_hop }}
Best U Cast Next Hop : {{ data_to_template['vrf'][vrf].address_family[address_family].routes[route].next_hop.next_hop_list[next_hop].best_ucast_nexthop }}
Metric : {{ data_to_template['vrf'][vrf].address_family[address_family].routes[route].next_hop.next_hop_list[next_hop].metric }}
Route Preference : {{ data_to_template['vrf'][vrf].address_family[address_family].routes[route].next_hop.next_hop_list[next_hop].route_preference }}
Source Protocol : {{ data_to_template['vrf'][vrf].address_family[address_family].routes[route].next_hop.next_hop_list[next_hop].source_protocol }}
Updated : {{ data_to_template['vrf'][vrf].address_family[address_family].routes[route].next_hop.next_hop_list[next_hop].updated }}
}
```
{%- endfor %}{% endfor %}{% endfor %}{% endfor %}
{%- else %}
{%- if command == "show ip route vrf all" %}
{%- for vrf in data_to_template['vrf'] %}{% for address_family in data_to_template['vrf'][vrf].address_family %}{% for route in data_to_template['vrf'][vrf].address_family[address_family].routes %}{% for next_hop in data_to_template['vrf'][vrf].address_family[address_family].routes[route].next_hop.next_hop_list %}
```mermaid
classDiagram
class {{ vrf | replace("-","_") }} {
Address Family : {{ address_family }}
Route : {{ route }}
Active : {{ data_to_template['vrf'][vrf].address_family[address_family].routes[route].active }}
Metric : {{ data_to_template['vrf'][vrf].address_family[address_family].routes[route].metric }}
Route Preference : {{ data_to_template['vrf'][vrf].address_family[address_family].routes[route].route_preference }}
Source Protocol : {{ data_to_template['vrf'][vrf].address_family[address_family].routes[route].source_protocol }}
M Best : {{ data_to_template['vrf'][vrf].address_family[address_family].routes[route].mbest }}
U Best : {{ data_to_template['vrf'][vrf].address_family[address_family].routes[route].ubest }}
Next Hop Number : {{ next_hop }}
Next Hop : {{ data_to_template['vrf'][vrf].address_family[address_family].routes[route].next_hop.next_hop_list[next_hop].next_hop }}
Best U Cast Next Hop : {{ data_to_template['vrf'][vrf].address_family[address_family].routes[route].next_hop.next_hop_list[next_hop].best_ucast_nexthop }}
Metric : {{ data_to_template['vrf'][vrf].address_family[address_family].routes[route].next_hop.next_hop_list[next_hop].metric }}
Route Preference : {{ data_to_template['vrf'][vrf].address_family[address_family].routes[route].next_hop.next_hop_list[next_hop].route_preference }}
Source Protocol : {{ data_to_template['vrf'][vrf].address_family[address_family].routes[route].next_hop.next_hop_list[next_hop].source_protocol }}
Updated : {{ data_to_template['vrf'][vrf].address_family[address_family].routes[route].next_hop.next_hop_list[next_hop].updated }}
}
```
{%- endfor %}{% endfor %}{% endfor %}{% endfor %}
{%- else %}
{%- if command == "show mac address-table" %}
{%- for vlan in data_to_template['mac_table'].vlans %}{% for mac in data_to_template['mac_table'].vlans[vlan].mac_addresses %}{% for interface in data_to_template['mac_table'].vlans[vlan].mac_addresses[mac].interfaces %}
```mermaid
classDiagram
class {{ vlan | replace ("-","Null")}} {
MAC Address : {{ mac }}
Interface : {{ interface }}
Type : {{ data_to_template['mac_table'].vlans[vlan].mac_addresses[mac].interfaces[interface].mac_type }}
Age : {{ data_to_template['mac_table'].vlans[vlan].mac_addresses[mac].interfaces[interface].age }}
}
```
{%- endfor %}{% endfor %}{% endfor %}
{%- else %}
{%- if command == "show version" %}
```mermaid
classDiagram
class {{ hostname | replace("-","_") }}_Version {
Bootflash : {{ data_to_template['platform'].hardware.bootflash }}
Chassis : {{ data_to_template['platform'].hardware.chassis }}
CPU : {{ data_to_template['platform'].hardware.cpu }}
Device Name : {{ data_to_template['platform'].hardware.device_name }}
Memory : {{ data_to_template['platform'].hardware.memory }}
Model : {{ data_to_template['platform'].hardware.model }}
Processor Board ID : {{ data_to_template['platform'].hardware.processor_board_id }}
RP : {{ data_to_template['platform'].hardware.rp }}
Slots : {{ data_to_template['platform'].hardware.slots }}
Kernal Uptime : {{ data_to_template['platform'].kernel_uptime.days }} {{ data_to_template['platform'].kernel_uptime.hours }} {{ data_to_template['platform'].kernel_uptime.minutes }} {{ data_to_template['platform'].kernel_uptime.seconds }}
Name : {{ data_to_template['platform'].name }}
OS : {{ data_to_template['platform'].os }}
Reason : {{ data_to_template['platform'].reason }}
BIOS Compile Time : {{ data_to_template['platform'].software.bios_compile_time }}
BIOS Version : {{ data_to_template['platform'].software.bios_version }}
Kickstart Compile Time : {{ data_to_template['platform'].software.kickstart_compile_time }}
Kickstart Image : {{ data_to_template['platform'].software.kickstart_image_file }}
Kickstart Version : {{ data_to_template['platform'].software.kickstart_version }}
System Compile Time : {{ data_to_template['platform'].software.system_compile_time }}
Image : {{ data_to_template['platform'].software.system_image_file }}
Version : {{ data_to_template['platform'].software.system_version }}
}
```
{%- else %}
{%- if command == "show vlan" %}
{%- for vlan in data_to_template['vlans'] %}{% for interface in data_to_template['vlans'][vlan].interfaces %}
```mermaid
classDiagram
class {{ vlan }} { 
Interface : {{ interface }}
Name : {{ data_to_template['vlans'][vlan].name }}
State : {{ data_to_template['vlans'][vlan].state }}
Shutdown : {{ data_to_template['vlans'][vlan].shutdown }}
Type : {{ data_to_template['vlans'][vlan].type }}
Mode : {{ data_to_template['vlans'][vlan].mode }}
}
```
{%- endfor %}{% endfor %}
{%- endif %}{%- endif %}{%- endif %}{%- endif %}{%- endif %}{%- endif %}{%- endif %}{%- endif %}{%- endif %}{%- endif %}{%- endif %}{%- endif %}{%- endif %}{%- endif %}{%- endif %}{%- endif %}{%- endif %}{%- endif %}{%- endif %}{%- endif %}{%- endif %}{%- endif %}{%- endif %}{%- endif %}{%- endif %}{%- endif %}{%- endif %}{%- endif %}{%- endif %}{%- endif %}{%- endif %}{%- endif %}{%- endif %}{%- endif %}{%- endif %}