{%- if command == "acl" %}
Hello! pie A T S has learned the following access control list information.
{%- 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 %}
The access control list {{ list }} has an access control entry {{ ace }} that is forwarding {{ data_to_template['acls'][list].aces[ace].actions.forwarding }}. 
Logging is set to {{ data_to_template['acls'][list].aces[ace].actions.logging | default ("No Logging") }}.
The source network is {{ data_to_template['acls'][list].aces[ace].matches.l3.ipv4.source_network[source_network] | replace("{'source_network': ","") | replace("}","") | replace("'","") }} and the destination network is {{ data_to_template['acls'][list].aces[ace].matches.l3.ipv4.destination_network | replace(" {'destination_network':","") | replace("}","") | replace("{","") | replace("'","") | replace(":","") | default("N/A") }} using 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 %}
The access control list {{ list }} has an access control entry {{ ace }} that is forwarding {{ data_to_template['acls'][list].aces[ace].actions.forwarding }}. 
Logging is set to {{ data_to_template['acls'][list].aces[ace].actions.logging | default ("No Logging") }}.
The destination network is {{ data_to_template['acls'][list].aces[ace].matches.l3.ipv4.destination_network | replace(" {'destination_network':","") | replace("}","") | replace("{","") | replace("'","") | replace(":","") | default("N/A") }} using protocol: {{ data_to_template['acls'][list].aces[ace].matches.l3.ipv4.protocol | default("N/A") }}.
{%- endfor %}{%- endif %}{%- endif %}{%- endif %}{%- endfor %}{%- else %}
The access control list {{ list }} has no access control entries.
{%- 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 %}
The access control list {{ list }} has an access control entry {{ ace }} that is forwarding {{ data_to_template['acls'][list].aces[ace].actions.forwarding }}. 
Logging is set to {{ data_to_template['acls'][list].aces[ace].actions.logging | default ("No Logging") }}.
The source protocol is U D P {%- if data_to_template['acls'][list].aces[ace].matches.l4.udp.source_port.operator is defined %}using operator {{ data_to_template['acls'][list].aces[ace].matches.l4.udp.source_port.operator.operator }} for 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%}
The access control list {{ list }} has an access control entry {{ ace }} that is forwarding {{ data_to_template['acls'][list].aces[ace].actions.forwarding }}. 
Logging is set to {{ data_to_template['acls'][list].aces[ace].actions.logging | default ("No Logging") }}.
The destination protocol is U D P {%- if data_to_template['acls'][list].aces[ace].matches.l4.udp.destination_port.operator is defined %}using operator {{ data_to_template['acls'][list].aces[ace].matches.l4.udp.destination_port.operator.operator }} for 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 %}
The access control list {{ list }} has an access control entry {{ ace }} that is forwarding {{ data_to_template['acls'][list].aces[ace].actions.forwarding }}. 
Logging is set to {{ data_to_template['acls'][list].aces[ace].actions.logging | default ("No Logging") }}.
The source protocol is T C P {%- if data_to_template['acls'][list].aces[ace].matches.l4.tcp.source_port.operator is defined %} using operator {{ data_to_template['acls'][list].aces[ace].matches.l4.tcp.source_port.operator.operator }} for 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%}
The access control list {{ list }} has an access control entry {{ ace }} that is forwarding {{ data_to_template['acls'][list].aces[ace].actions.forwarding }}. 
Logging is set to {{ data_to_template['acls'][list].aces[ace].actions.logging | default ("No Logging") }}.
The destination protocol is T C P {%- if data_to_template['acls'][list].aces[ace].matches.l4.tcp.destination_port.operator is defined %} using operator {{ data_to_template['acls'][list].aces[ace].matches.l4.tcp.destination_port.operator.operator }} for port {{ data_to_template['acls'][list].aces[ace].matches.l4.tcp.destination_port.operator.port }}.{%- endif %}
{%- endif %}{%- endif %}{%- endif %}{%- endif %}{%- endif %}{%- endfor %}{%- else %}
The access control list {{ list }} has no access control entries.
{%- endif %}{%- endfor %}
{%- else %}
{%- if command == "arp" %}
Hello! pie A T S has learned the following address resolution protocol information.
The device {{ hostname }} has the following address resolution protocol statistics:
Total Entries: {{ data_to_template['statistics'].entries_total }}.
Input drops: {{ data_to_template['statistics'].in_drops }}.
Input reply packets: {{ data_to_template['statistics'].in_replies_pkts }}.
Input request packets: {{ data_to_template['statistics'].in_requests_pkts }}.
Total input: {{ data_to_template['statistics'].in_total | default("N/A") }}.
Incomplete total: {{ data_to_template['statistics'].incomplete_total }}.
Output drops: {{ data_to_template['statistics'].out_drops | default("N/A") }}.
Output gratuitious packets: {{ data_to_template['statistics'].out_gratuitous_pkts | default("N/A") }}.
Output reply packets: {{ data_to_template['statistics'].out_replies_pkts }}.
Output request packets: {{ data_to_template['statistics'].out_requests_pkts }}.
Total output packets: {{ data_to_template['statistics'].out_total| default("N/A") }}.
Per interface information:
{%- 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 %}
The interface {{ interface }} has the neighboring IP address {{ neighbor }} with a MAC address of {{ data_to_template['interfaces'][interface].ipv4.neighbors[neighbor].link_layer_address }} originating from {{ data_to_template['interfaces'][interface].ipv4.neighbors[neighbor].origin }}.
Address resolution protocol dynamic learning local proxy is enabled? {{ data_to_template['interfaces'][interface].arp_dynamic_learning.local_proxy_enable }}.
Address resolution protocol dynamic learning proxy is enabled? {{ data_to_template['interfaces'][interface].arp_dynamic_learning.proxy_enable }}.
{%-        endfor %}
{%-     endif %}
{%- endfor %}
{%- else %}
{%- if command == "bgp" %}
Hello! pie A T S has learned the following border gateway protocol information.
{%-             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 %}
Instance {{ instance }} has an ID of {{ data_to_template['instance'][instance].bgp_id }} and is in the {{ data_to_template['instance'][instance].protocol_state }} state.
The virtual route forwarder {{ vrf }} has a router ID of {{ data_to_template['instance'][instance].vrf[vrf].router_id }}, a cluster ID of {{ data_to_template['instance'][instance].vrf[vrf].cluster_id }} and a confederation ID of {{ data_to_template['instance'][instance].vrf[vrf].confederation_identifier }}.
The following neighbor {{ neighbor }} was detected using version {{ data_to_template['instance'][instance].vrf[vrf].neighbor[neighbor].bgp_version }}. 
The holdtime is {{ data_to_template['instance'][instance].vrf[vrf].neighbor[neighbor].holdtime }} with a keep alive interval of {{ data_to_template['instance'][instance].vrf[vrf].neighbor[neighbor].keepalive_interval }}.
The local autonomous system number is {{ data_to_template['instance'][instance].vrf[vrf].neighbor[neighbor].local_as_as_no }} and the remote autonomous system number is {{ 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 %}    
We have received {{ data_to_template['instance'][instance].vrf[vrf].neighbor[neighbor].bgp_neighbor_counters.messages.received.total }} messages and sent {{ data_to_template['instance'][instance].vrf[vrf].neighbor[neighbor].bgp_neighbor_counters.messages.sent.total }} messages.
{%                  endif %}
The last reset was at {{ data_to_template['instance'][instance].vrf[vrf].neighbor[neighbor].bgp_session_transport.connection.last_reset }} with the following reason {{ data_to_template['instance'][instance].vrf[vrf].neighbor[neighbor].bgp_session_transport.connection.reset_reason }}.
{%-                     endfor %}
{%-                 endfor %}
{%-             endfor %}
{%- else %}
{%- if command == "hsrp" %}
Hello! pie A T S has learned the following hot standby redundancy protocol information.
{%-             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 %}
The vee LAN {{ vlan }} using address family {{ address_family }} and version {{ version }} is part of group {{ group }}.
The active router is {{ data_to_template[vlan].address_family[address_family].version[version].groups[group].active_router }}.
The H S R P router state is {{ data_to_template[vlan].address_family[address_family].version[version].groups[group].hsrp_router_state }}.
The primary I P v 4 address is {{ data_to_template[vlan].address_family[address_family].version[version].groups[group].primary_ipv4_address.address }}.
Virtual I P learn is set to {{ data_to_template[vlan].address_family[address_family].version[version].groups[group].primary_ipv4_address.virtual_ip_learn }}.
The priority is {{ data_to_template[vlan].address_family[address_family].version[version].groups[group].priority }}.
The current session name is {{ data_to_template[vlan].address_family[address_family].version[version].groups[group].session_name }}.
The standby I P address is {{ data_to_template[vlan].address_family[address_family].version[version].groups[group].standby_ip_address }} and the standby router is {{ data_to_template[vlan].address_family[address_family].version[version].groups[group].standby_router }}.
The hello timer is {{ data_to_template[vlan].address_family[address_family].version[version].groups[group].timers.hello_sec }} and the hold timer is {{ data_to_template[vlan].address_family[address_family].version[version].groups[group].timers.hold_sec }}.
The virtual MAC address is {{ data_to_template[vlan].address_family[address_family].version[version].groups[group].virtual_mac_address }} and sse burned in address is set to {{ data_to_template[vlan].use_bia }}.
{%-                         endfor %}
{%-                     endfor %}
{%-                 endfor %}
{%-             endfor %}
{%- else %}
{%- if command == 'interface' %}
Hello! pie A T S has learned the following interface information.
{%- for interface in data_to_template %}
The interface {{ interface }}, with the description {{ data_to_template[interface].description }}, has the following settings and status:
The interface is enabled? {{ data_to_template[interface].enabled }}. 
The operational status is {{ data_to_template[interface].oper_status }}.
{%-                  if data_to_template[interface].access_vlan is defined %}
The access vee LAN is {{ data_to_template[interface].access_vlan }}.
{%-                  endif %}
{%-                  if data_to_template[interface].native_vlan is defined %}
The native vee LAN is {{ data_to_template[interface].native_vlan }}.
{%-                  endif %}
{%-                  if data_to_template[interface].switchport_enable is defined %}
Switchport enable is {{ data_to_template[interface].switchport_enable }}.
{%-                  endif %}
{%-                  if data_to_template[interface].switchport_mode is defined %}
The switchport mode is {{ data_to_template[interface].switchport_mode }}.
{%-                  endif %}
{%-                  if data_to_template[interface].type is defined %}
The type is {{ data_to_template[interface].type }}.
{%-                  endif %}
{%-                  if data_to_template[interface].bandwidth is defined %}
The bandwidth is {{ data_to_template[interface].bandwidth }}.
{%-                  endif %}
{%-                  if data_to_template[interface].auto_negotiate is defined %}
Auto negotiate is set to {{ data_to_template[interface].auto_negotiate }}.
{%-                  endif %}
{%-                  if data_to_template[interface].port_speed is defined %}
The port speed is {{ data_to_template[interface].port_speed }}.
{%-                  endif %}
{%-                  if data_to_template[interface].duplex_mode is defined %}
The duplex mode is {{ data_to_template[interface].duplex_mode }}.
{%-                  endif %}
{%-                  if data_to_template[interface].mtu is defined %}
The M T U is {{ data_to_template[interface].mtu }}.
{%-                  endif %}
{%-                  if data_to_template[interface].mac_address is defined %}
The MAC address is {{ data_to_template[interface].mac_address }}{%- endif %}{%- if data_to_template[interface].phys_address is defined %} with a physical address of {{ data_to_template[interface].phys_address }}{%- endif %}
{%-                  if data_to_template[interface].ipv4 is defined %}
{%-                      for ip_address in data_to_template[interface].ipv4 %}
The I P address is {{ ip_address }}.
{%-                      endfor %}
{%-                  endif %}
{%-                  if data_to_template[interface].medium is defined %}
The medium is {{ data_to_template[interface].medium }}.
{%-                  endif %}
{%-                  if data_to_template[interface].delay is defined %}
The delay is {{ data_to_template[interface].delay }}.
{%-                  endif %}
{%-                  if data_to_template[interface].encapsulation is defined %}
The encapsulation is {{ data_to_template[interface].encapsulation.encapsulation }}.
{%-                  endif %}
{%-                  if data_to_template[interface].flow_control is defined %}
Flow control receive is {{ data_to_template[interface].flow_control.receive }} and flow control send is {{ 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 %}
The port channel interface is {{ 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 %}
The port channel has the following members {{ member }}.
{%-                          endfor %}
{%                       else %}
{%-                          if data_to_template[interface].port_channel.port_channel_member is defined %}
This interface is a port channel member {{ data_to_template[interface].port_channel.port_channel_member }}.
{%-                          endif %}
{%-                      endif %}
{%-                  endif %}
{%-                  if data_to_template[interface].last_change is defined %}
The interface changed last at {{ data_to_template[interface].last_change }}.
{%-                  endif %}
{%-                  if data_to_template[interface].counters is defined %}
Here are the interface input counters:
{%-                      if data_to_template[interface].counters.in_broadcast_pkts is defined %}
Input broadcast packets {{ data_to_template[interface].counters.in_broadcast_pkts }}.
{%-                      endif %}
{%-                      if data_to_template[interface].counters.in_crc_errors is defined %}
Input C R C 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 packets {{ 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 packets {{ 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_pkts is defined %}
Total input packets {{ data_to_template[interface].counters.in_pkts }}.
{%-                      endif %}
Here are the interface output counters:
{%-                      if data_to_template[interface].counters.out_broadcast_pkts is defined %}
Output broadcast packets {{ 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 packets {{ data_to_template[interface].counters.out_multicast_pkts }}.
{%-                      endif %}
{%-                      if data_to_template[interface].counters.out_unicast_pkts is defined %}
Output unicast packets {{ data_to_template[interface].counters.out_unicast_pkts }}.
{%-                      endif %}
{%-                      if data_to_template[interface].counters.out_pkts is defined %}
Total output packets {{ data_to_template[interface].counters.out_pkts }}.
{%-                      endif %}
{%-                      if data_to_template[interface].counters.last_clear is defined %}
The counters were last cleared at {{ data_to_template[interface].counters.last_clear }}.
{%-                      endif %}
{%-                      if data_to_template[interface].counters.rate is defined %}
The input rate is {{ data_to_template[interface].counters.rate.in_rate }} packets.
The output rate is {{ data_to_template[interface].counters.rate.out_rate }} packets.
The load interval is {{ data_to_template[interface].counters.rate.load_interval }}
{%-                      endif %}
{%-                  endif %}
{%- endfor %}
{%- else %}
{%- if command == 'lldp' %}
Hello! pie A T S has learned the following link layer discovery protocol information.
The device {{ hostname }} has the following L L D P details:
LLDP is enabled? {{ data_to_template.enabled }}.
The hello timer is {{ data_to_template.hello_timer }} and the hold timer is {{ data_to_template.hold_timer }}.
The following number of entries have aged out {{ data_to_template.counters.entries_aged_out }}.
{{ data_to_template.counters.frame_discard }} frames have been discarded with {{ data_to_template.counters.frame_error_in }} frame input errors.
There have been {{ data_to_template.counters.frame_in }} frames input and {{ data_to_template.counters.frame_out }} frames output.
There have been {{ data_to_template.counters.tlv_discard }} T L Vee discards and {{ data_to_template.counters.tlv_unknown }} unknown T L Vees.
Per interface LLDP information: 
{%- 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 %}
The interface {{ interface }} is enabled? {{ data_to_template['interfaces'][interface].enabled }} with a neighbor of {{ neighbor }} on port {{ port }} with a description of {{ data_to_template['interfaces'][interface].port_id[port].neighbors[neighbor].port_description }}.
The neighbor capabilities are {{ capability }} with a chassis ID of {{ data_to_template['interfaces'][interface].port_id[port].neighbors[neighbor].chassis_id }}, management address of {{ data_to_template['interfaces'][interface].port_id[port].neighbors[neighbor].management_address }} and system description of {{ data_to_template['interfaces'][interface].port_id[port].neighbors[neighbor].system_description | replace("\n"," ") }}.
{%- endfor %}{%- endfor %}{%- endfor %}{%- else %}
Interface {{ interface }} is enabled? {{ data_to_template['interfaces'][interface].enabled }} but has no neighbors.
{%- endif %}{%- endfor %}
{%- else %}
{%- if command == "ntp" %}
Hello! pie A T S has learned the following network time protocol information.
The device {{ hostname }} has the following NTP information
The associations address is {{ data_to_template['clock_state'].system_status.associations_address }} with an associations local mode of {{ data_to_template['clock_state'].system_status.associations_local_mode }}.
The clock offset is {{ data_to_template['clock_state'].system_status.clock_offset }}, precision is {{ data_to_template['clock_state'].system_status.clock_precision }}, reference ID is {{ data_to_template['clock_state'].system_status.clock_refid }}, state is {{ data_to_template['clock_state'].system_status.clock_state }} and stratum  of {{ data_to_template['clock_state'].system_status.clock_stratum }}.
The reference time is {{ data_to_template['clock_state'].system_status.reference_time }} with a root delay of {{ data_to_template['clock_state'].system_status.root_delay }} and root dispersion of {{ data_to_template['clock_state'].system_status.root_dispersion }}.
{%- 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() %}
Is N T P configured? {{ value.isconfigured }}.
The V R F is {{ vrf }} with an address of {{ address }}.
The delay is {{ value.delay }} with a local mode of {{ value.local_mode }}, offset of {{ value.offset }}, poll of {{ value.poll }}, and reach of {{ value.reach }}.
The received time is {{ value.receive_time }} with a reference ID of {{ value.refid }} and stratum of {{ value.stratum }}.
{%- endfor %}{%- endfor %}{%- endfor %}
{%- for vrf in data_to_template['vrf'] %}{%- for address in data_to_template['vrf'][vrf].unicast_configuration.address %}
The V R F is {{ vrf }} with an address of {{ address }} with a preferred server : {{ data_to_template['vrf'][vrf].unicast_configuration.address[address].type.server.preferred }} and server type of {{ data_to_template['vrf'][vrf].unicast_configuration.address[address].type.server.type }}.
{%- endfor %}{%- endfor %}
{%- else %}
{%- if command == 'ospf' %}

{%- else %}
{%- if command == "platform" %}

{%- else %}
{%- if command == "routing" %}
Hello! pie A T S has learned the following routing information.
{%- 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 %}
The virtual route forwarder {{ vrf }} using address family {{ address_family }} has the following route {{ route }} that is active {{ data_to_template['vrf'][vrf].address_family[address_family].routes[route].active }} with a metric of {{ data_to_template['vrf'][vrf].address_family[address_family].routes[route].metric }}.
The next hop number {{ next_hop }} has a next hop of {{ data_to_template['vrf'][vrf].address_family[address_family].routes[route].next_hop.next_hop_list[next_hop].next_hop }} with a route preference of {{ data_to_template['vrf'][vrf].address_family[address_family].routes[route].route_preference }}. 
The source protocol is {{ data_to_template['vrf'][vrf].address_family[address_family].routes[route].source_protocol }} with the 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 %}
The virtual route forwarder {{ vrf }} using address family {{ address_family }} has the following route {{ route }} using the outgoing interface : {{ outgoing_interface }}.
The source protocol is {{ data_to_template['vrf'][vrf].address_family[address_family].routes[route].source_protocol }} with the 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")  %}
Hello! pie A T S has learned the following virtual local area network information.
The Vee LAN {{ vlan }} named {{ data_to_template['vlans'][vlan].name }} is {{ data_to_template['vlans'][vlan].state }}. 
Is the Vee LAN shutdown? {{ data_to_template['vlans'][vlan].shutdown }}.
{%- if data_to_template['vlans'][vlan].interfaces is defined %}
The following interfaces are on this VLAN
{%- for interface in data_to_template['vlans'][vlan].interfaces %}
 {{ interface }}
{%- endfor %}{%- else %}
The Vee LAN {{ vlan }} named {{ data_to_template['vlans'][vlan].name }} is {{ data_to_template['vlans'][vlan].state }}. 
Is the Vee LAN shutdown? {{ data_to_template['vlans'][vlan].shutdown }}.
{%- endif %}{%- endfor %}
{%- else %}
{%- if command == 'vrf' %}
Hello! pie A T S has learned the following virtual route forwarder information.
{%- 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 %}
The virtual route forwarder {{ vrf }} with a description of {{ data_to_template['vrfs'][vrf].description | default("No Description") }} and address family {{ address_family }} has the following target {{ target | default("No Target") }}.
The router type is {{ data_to_template['vrfs'][vrf].address_family[address_family].route_targets[target].rt_type }} and route distinguisher is {{ data_to_template['vrfs'][vrf].route_distinguisher }}
{%-             endfor %}
{%-         else %}
The virtual route forwarder {{ vrf }} with a description of {{ data_to_template['vrfs'][vrf].description | default("No Description") }} and address family {{ address_family }} has a route distinguisher of {{ data_to_template['vrfs'][vrf].route_distinguisher }}
{%-         endif %}
{%-     endfor %}
{%- endfor %}
{%- else %}
{%- if command == "show access-lists" %}
Hello! pie A T S has parsed the following show access-lists information.
{%- 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 %}
The access control list {{ list }} has an access control entry {{ ace }} that is forwarding {{ data_to_template['acls'][list].aces[ace].actions.forwarding }}. 
Logging is set to {{ data_to_template['acls'][list].aces[ace].actions.logging | default ("No Logging") }}.
The source network is {{ data_to_template['acls'][list].aces[ace].matches.l3.ipv4.source_network[source_network] | replace("{'source_network': ","") | replace("}","") | replace("'","") }} and the destination network is {{ data_to_template['acls'][list].aces[ace].matches.l3.ipv4.destination_network | replace(" {'destination_network':","") | replace("}","") | replace("{","") | replace("'","") | replace(":","") | default("N/A") }} using 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 %}
The access control list {{ list }} has an access control entry {{ ace }} that is forwarding {{ data_to_template['acls'][list].aces[ace].actions.forwarding }}. 
Logging is set to {{ data_to_template['acls'][list].aces[ace].actions.logging | default ("No Logging") }}.
The destination network is {{ data_to_template['acls'][list].aces[ace].matches.l3.ipv4.destination_network | replace(" {'destination_network':","") | replace("}","") | replace("{","") | replace("'","") | replace(":","") | default("N/A") }} using protocol: {{ data_to_template['acls'][list].aces[ace].matches.l3.ipv4.protocol | default("N/A") }}.
{%- endfor %}{%- endif %}{%- endif %}{%- endif %}{%- endfor %}{%- else %}
The access control list {{ list }} has no access control entries.
{%- 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 %}
The access control list {{ list }} has an access control entry {{ ace }} that is forwarding {{ data_to_template['acls'][list].aces[ace].actions.forwarding }}. 
Logging is set to {{ data_to_template['acls'][list].aces[ace].actions.logging | default ("No Logging") }}.
The source protocol is U D P {%- if data_to_template['acls'][list].aces[ace].matches.l4.udp.source_port.operator is defined %}using operator {{ data_to_template['acls'][list].aces[ace].matches.l4.udp.source_port.operator.operator }} for 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%}
The access control list {{ list }} has an access control entry {{ ace }} that is forwarding {{ data_to_template['acls'][list].aces[ace].actions.forwarding }}. 
Logging is set to {{ data_to_template['acls'][list].aces[ace].actions.logging | default ("No Logging") }}.
The destination protocol is U D P {%- if data_to_template['acls'][list].aces[ace].matches.l4.udp.destination_port.operator is defined %}using operator {{ data_to_template['acls'][list].aces[ace].matches.l4.udp.destination_port.operator.operator }} for 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 %}
The access control list {{ list }} has an access control entry {{ ace }} that is forwarding {{ data_to_template['acls'][list].aces[ace].actions.forwarding }}. 
Logging is set to {{ data_to_template['acls'][list].aces[ace].actions.logging | default ("No Logging") }}.
The source protocol is T C P {%- if data_to_template['acls'][list].aces[ace].matches.l4.tcp.source_port.operator is defined %} using operator {{ data_to_template['acls'][list].aces[ace].matches.l4.tcp.source_port.operator.operator }} for 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%}
The access control list {{ list }} has an access control entry {{ ace }} that is forwarding {{ data_to_template['acls'][list].aces[ace].actions.forwarding }}. 
Logging is set to {{ data_to_template['acls'][list].aces[ace].actions.logging | default ("No Logging") }}.
The destination protocol is T C P {%- if data_to_template['acls'][list].aces[ace].matches.l4.tcp.destination_port.operator is defined %} using operator {{ data_to_template['acls'][list].aces[ace].matches.l4.tcp.destination_port.operator.operator }} for port {{ data_to_template['acls'][list].aces[ace].matches.l4.tcp.destination_port.operator.port }}.{%- endif %}
{%- endif %}{%- endif %}{%- endif %}{%- endif %}{%- endif %}{%- endfor %}{%- else %}
The access control list {{ list }} has no access control entries.
{%- endif %}{%- endfor %}
{%- else %}
{%- if command == "show bgp process vrf all" %}

{%- else %}
{%- if command == "show bgp sessions" %}

{% else %}
{% if command == "show cdp neighbors" %}

{%- else %}
{%- if command == "show cdp neighbors detail" %}

{%- else %}
{%- if command == "show environment" %}

{%- else %}
{%- if command == "show port-channel summary" %}

{%- else %}
{%- if command == "show interface" %}

{%- else %}
{%- if command == "show interface status" %}

{%- else %}
{%- if command == "show interface transceiver" %}

{%- else %}
{%- if command == "show inventory" %}

{%- else %}
{% if command == "show ip arp vrf all" %}

{%- else %}
{%- if command == "show ip interface brief" %}
Hello! pie A T S has parsed the following information from the show IP interface brief command.
{%- 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 %}
The interface {{ interface }} has the following IP Address {{ data_to_template['interface'][interface].vlan_id[vlan_id].ip_address }}.
The status of the interface is {{ data_to_template['interface'][interface].vlan_id[vlan_id].interface_status }}
{%- endfor %}{% else %}
The interface {{ interface }} has the following IP Address {{ data_to_template['interface'][interface].ip_address }}.
The status of the interface is {{ data_to_template['interface'][interface].interface_status }}.
{%- endif %}{%- endfor %}
{%- else %}
{%- if command == "show ip ospf" %}

{%- else %}
{%- if command == "show ip ospf interface" %}

{%- else %}
{%- if command == "show ip ospf interface vrf all" %}

{%- else %}
{%- if command == "show ip ospf neighbors detail" %}

{%- else %}
{%- if command == "show ip ospf neighbors detail vrf all" %}

{%- else %}
{%- if command == "show ip route" %}

{%- else %}
{%- if command == "show ip route vrf all" %}

{%- else %}
{%- if command == "show mac address-table" %}

{%- else %}
{%- if command == "show version" %}
Hello! pie A T S has parsed the following information from the {{ command }} command.
The hostname of the device is {{ hostname }}.
The boot flash is located at {{ data_to_template['platform'].hardware.bootflash }}.
The chassis is a {{ data_to_template['platform'].hardware.chassis }}.
The C P U is a {{ data_to_template['platform'].hardware.cpu }}.
The device name is {{ data_to_template['platform'].hardware.device_name }}.
The device has {{ data_to_template['platform'].hardware.memory | int // 1024 }} memory.
The device model is a {{ data_to_template['platform'].hardware.model }}.
The processor board I D is {{ data_to_template['platform'].hardware.processor_board_id }}.
The R P is {{ data_to_template['platform'].hardware.rp }}.
The device has {{ data_to_template['platform'].hardware.slots }} slots. 
The kernal has been up for {{ 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 }}.
The platform is a {{ data_to_template['platform'].name }}.
The operating system is {{ data_to_template['platform'].os }}.
The system was reloaded last because {{ data_to_template['platform'].reason }}.
The BIOS compile time was {{ data_to_template['platform'].software.bios_compile_time }}.
The BIOS version is {{ data_to_template['platform'].software.bios_version }}.
The kick start compile time was {{ data_to_template['platform'].software.kickstart_compile_time }}.
The kick start image is {{ data_to_template['platform'].software.kickstart_image_file }}.
The kick start version is {{ data_to_template['platform'].software.kickstart_version }}.
The system compile time was {{ data_to_template['platform'].software.system_compile_time }}.
The software image is {{ data_to_template['platform'].software.system_image_file }}.
The software version is {{ data_to_template['platform'].software.system_version }}.
{%- else %}
{%- if command == "show vlan" %}

{%- 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 %}