{% if filetype_loop == 0 %}Interface,Description,IP Address,IP Origin,Type,Enabled,Operational Status,Physical Address,MAC Address,Switchport Enabled,Switchport Mode,Access VLAN,Trunk VLAN,Native VLAN,VRF,Bandwidth,MTU,Delay,Encapsulation,Medium,Flow Control Receive,Flow Control Send,Last Change,Port Channel,Port Channel Member,Input Broadcast,Input CRC Errors,Input Errors,Input Unicast,Input Multicast,Input Total,Output Broadcast,Output Discards,Output Errors,Output Unicast,Output Multicast,Output Total,Input Rate,Output Rate{% for interface in to_parse_interface %}{% if (to_parse_interface[interface].ipv4 is defined) and (to_parse_interface[interface].port_channel is defined) %}{% for ip_address in to_parse_interface[interface].ipv4 %}{% if to_parse_interface[interface].port_channel.port_channel_member_intfs %}{% for member in to_parse_interface[interface].port_channel.port_channel_member_intfs %}
{{ interface }},{% if to_parse_interface[interface].description is defined %}{{ to_parse_interface[interface].description }},{% else %}No Description,{% endif %}{% if to_parse_interface[interface].ipv4 is defined %}{{ ip_address }},{{ to_parse_interface[interface].ipv4[ip_address].origin | default("No Origin") }},{% else %}N/A,N/A,{% endif %}{% if to_parse_interface[interface].type is defined %}{{ to_parse_interface[interface].type }},{% else %}N/A,{% endif %}{{ to_parse_interface[interface].enabled }},{{ to_parse_interface[interface].oper_status }},{% if to_parse_interface[interface].phys_address is defined %}{{ to_parse_interface[interface].phys_address }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].mac_address is defined %}{{ to_parse_interface[interface].mac_address }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].switchport_enable is defined %}{{ to_parse_interface[interface].switchport_enable }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].switchport_mode is defined %}{{ to_parse_interface[interface].switchport_mode }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].access_vlan is defined %}{{ to_parse_interface[interface].access_vlan }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].trunk_vlans is defined %}{{ to_parse_interface[interface].trunk_vlans | replace(","," ") }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].native_vlan is defined %}{{ to_parse_interface[interface].native_vlan }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].vrf is defined %}{{ to_parse_interface[interface].vrf }},{% else %}N/A,{% endif %}{{ to_parse_interface[interface].bandwidth }},{{ to_parse_interface[interface].mtu }},{{ to_parse_interface[interface].delay }},{{ to_parse_interface[interface].encapsulation.encapsulation }},{% if to_parse_interface[interface].medium is defined %}{{ to_parse_interface[interface].medium }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].flow_control is defined %}{{ to_parse_interface[interface].flow_control.receive }},{{ to_parse_interface[interface].flow_control.send }},{% else %}N/A,N/A,{% endif %}{% if to_parse_interface[interface].last_change is defined %}{{ to_parse_interface[interface].last_change }},{% else %}N/A,{% endif %}{{ interface }},{{ member }}{% if to_parse_interface[interface].counters is defined %}{{ to_parse_interface[interface].counters.in_broadcast_pkts | default("N/A") }},{{ to_parse_interface[interface].counters.in_crc_errors | default("N/A") }},{{ to_parse_interface[interface].counters.in_errors }},{{ to_parse_interface[interface].counters.in_unicast_pkts | default("N/A") }},{{ to_parse_interface[interface].counters.in_multicast_pkts | default("N/A") }},{{ to_parse_interface[interface].counters.in_pkts  | default("N/A") }},{{ to_parse_interface[interface].counters.out_broadcast_pkts| default("N/A") }},{{ to_parse_interface[interface].counters.out_discard | default("N/A") }},{{ to_parse_interface[interface].counters.out_errors | default("N/A") }},{{ to_parse_interface[interface].counters.out_unicast_pkts | default("N/A") }},{{ to_parse_interface[interface].counters.out_multicast_pkts | default("N/A") }},{{ to_parse_interface[interface].counters.out_pkts | default("N/A") }},{{ to_parse_interface[interface].counters.rate.in_rate | default("N/A") }},{{ to_parse_interface[interface].counters.rate.out_rate | default("N/A") }}{% else %}N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A{% endif %}{% endfor %}{% else %}{% if to_parse_interface[interface].port_channel.port_channel_member == "True" %}
{{ interface }},{% if to_parse_interface[interface].description is defined %}{{ to_parse_interface[interface].description }},{% else %}No Description,{% endif %}{% if to_parse_interface[interface].ipv4 is defined %}{{ ip_address }},{{ to_parse_interface[interface].ipv4[ip_address].origin | default("No Origin") }},{% else %}N/A,N/A,{% endif %}{% if to_parse_interface[interface].type is defined %}{{ to_parse_interface[interface].type }},{% else %}N/A,{% endif %}{{ to_parse_interface[interface].enabled }},{{ to_parse_interface[interface].oper_status }},{% if to_parse_interface[interface].phys_address is defined %}{{ to_parse_interface[interface].phys_address }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].mac_address is defined %}{{ to_parse_interface[interface].mac_address }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].switchport_enable is defined %}{{ to_parse_interface[interface].switchport_enable }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].switchport_mode is defined %}{{ to_parse_interface[interface].switchport_mode }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].access_vlan is defined %}{{ to_parse_interface[interface].access_vlan }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].trunk_vlans is defined %}{{ to_parse_interface[interface].trunk_vlans | replace(","," ") }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].native_vlan is defined %}{{ to_parse_interface[interface].native_vlan }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].vrf is defined %}{{ to_parse_interface[interface].vrf }},{% else %}N/A,{% endif %}{{ to_parse_interface[interface].bandwidth }},{{ to_parse_interface[interface].mtu }},{{ to_parse_interface[interface].delay }},{{ to_parse_interface[interface].encapsulation.encapsulation }},{% if to_parse_interface[interface].medium is defined %}{{ to_parse_interface[interface].medium }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].flow_control is defined %}{{ to_parse_interface[interface].flow_control.receive }},{{ to_parse_interface[interface].flow_control.send }},{% else %}N/A,N/A,{% endif %}{% if to_parse_interface[interface].last_change is defined %}{{ to_parse_interface[interface].last_change }},{% else %}N/A,{% endif %}{{ to_parse_interface[interface].port_channel.port_channel_int }},{{ to_parse_interface[interface].port_channel.port_channel_member }},{% if to_parse_interface[interface].counters is defined %}{{ to_parse_interface[interface].counters.in_broadcast_pkts | default("N/A") }},{{ to_parse_interface[interface].counters.in_crc_errors | default("N/A") }},{{ to_parse_interface[interface].counters.in_errors }},{{ to_parse_interface[interface].counters.in_unicast_pkts | default("N/A") }},{{ to_parse_interface[interface].counters.in_multicast_pkts | default("N/A") }},{{ to_parse_interface[interface].counters.in_pkts  | default("N/A") }},{{ to_parse_interface[interface].counters.out_broadcast_pkts| default("N/A") }},{{ to_parse_interface[interface].counters.out_discard | default("N/A") }},{{ to_parse_interface[interface].counters.out_errors | default("N/A") }},{{ to_parse_interface[interface].counters.out_unicast_pkts | default("N/A") }},{{ to_parse_interface[interface].counters.out_multicast_pkts | default("N/A") }},{{ to_parse_interface[interface].counters.out_pkts | default("N/A") }},{{ to_parse_interface[interface].counters.rate.in_rate | default("N/A") }},{{ to_parse_interface[interface].counters.rate.out_rate | default("N/A") }}{% else %}N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A{% endif %}{% else %}
{{ interface }},{% if to_parse_interface[interface].description is defined %}{{ to_parse_interface[interface].description }},{% else %}No Description,{% endif %}{% if to_parse_interface[interface].ipv4 is defined %}{{ ip_address }},{{ to_parse_interface[interface].ipv4[ip_address].origin | default("No Origin") }},{% else %}N/A,N/A,{% endif %}{% if to_parse_interface[interface].type is defined %}{{ to_parse_interface[interface].type }},{% else %}N/A,{% endif %}{{ to_parse_interface[interface].enabled }},{{ to_parse_interface[interface].oper_status }},{% if to_parse_interface[interface].phys_address is defined %}{{ to_parse_interface[interface].phys_address }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].mac_address is defined %}{{ to_parse_interface[interface].mac_address }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].switchport_enable is defined %}{{ to_parse_interface[interface].switchport_enable }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].switchport_mode is defined %}{{ to_parse_interface[interface].switchport_mode }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].access_vlan is defined %}{{ to_parse_interface[interface].access_vlan }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].trunk_vlans is defined %}{{ to_parse_interface[interface].trunk_vlans | replace(","," ") }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].native_vlan is defined %}{{ to_parse_interface[interface].native_vlan }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].vrf is defined %}{{ to_parse_interface[interface].vrf }},{% else %}N/A,{% endif %}{{ to_parse_interface[interface].bandwidth }},{{ to_parse_interface[interface].mtu }},{{ to_parse_interface[interface].delay }},{{ to_parse_interface[interface].encapsulation.encapsulation }},{% if to_parse_interface[interface].medium is defined %}{{ to_parse_interface[interface].medium }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].flow_control is defined %}{{ to_parse_interface[interface].flow_control.receive }},{{ to_parse_interface[interface].flow_control.send }},{% else %}N/A,N/A,{% endif %}{% if to_parse_interface[interface].last_change is defined %}{{ to_parse_interface[interface].last_change }},{% else %}N/A,{% endif %}N/A,{{ to_parse_interface[interface].port_channel.port_channel_member }},{% if to_parse_interface[interface].counters is defined %}{{ to_parse_interface[interface].counters.in_broadcast_pkts | default("N/A") }},{{ to_parse_interface[interface].counters.in_crc_errors | default("N/A") }},{{ to_parse_interface[interface].counters.in_errors | default("N/A") }},{{ to_parse_interface[interface].counters.in_unicast_pkts | default("N/A") }},{{ to_parse_interface[interface].counters.in_multicast_pkts | default("N/A") }},{{ to_parse_interface[interface].counters.in_pkts  | default("N/A") }},{{ to_parse_interface[interface].counters.out_broadcast_pkts | default("N/A") }},{{ to_parse_interface[interface].counters.out_discard | default("N/A") }},{{ to_parse_interface[interface].counters.out_errors | default("N/A") }},{{ to_parse_interface[interface].counters.out_unicast_pkts | default("N/A") }},{{ to_parse_interface[interface].counters.out_multicast_pkts | default("N/A") }},{{ to_parse_interface[interface].counters.out_pkts | default("N/A") }},{{ to_parse_interface[interface].counters.rate.in_rate | default("N/A") }},{{ to_parse_interface[interface].counters.rate.out_rate | default("N/A") }}{% else %}N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A{% endif %}{% endif %}{% endif %}{% endfor %}{% else %}{% if to_parse_interface[interface].ipv4 is defined %}
{{ interface }},{% if to_parse_interface[interface].description is defined %}{{ to_parse_interface[interface].description }},{% else %}No Description,{% endif %}{% if to_parse_interface[interface].ipv4 is defined %}{{ ip_address }},{{ to_parse_interface[interface].ipv4[ip_address].origin | default("No Origin") }},{% else %}N/A,N/A,{% endif %}{% if to_parse_interface[interface].type is defined %}{{ to_parse_interface[interface].type }},{% else %}N/A,{% endif %}{{ to_parse_interface[interface].enabled }},{{ to_parse_interface[interface].oper_status }},{% if to_parse_interface[interface].phys_address is defined %}{{ to_parse_interface[interface].phys_address }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].mac_address is defined %}{{ to_parse_interface[interface].mac_address }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].switchport_enable is defined %}{{ to_parse_interface[interface].switchport_enable }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].switchport_mode is defined %}{{ to_parse_interface[interface].switchport_mode }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].access_vlan is defined %}{{ to_parse_interface[interface].access_vlan }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].trunk_vlans is defined %}{{ to_parse_interface[interface].trunk_vlans | replace(","," ") }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].native_vlan is defined %}{{ to_parse_interface[interface].native_vlan }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].vrf is defined %}{{ to_parse_interface[interface].vrf }},{% else %}N/A,{% endif %}{{ to_parse_interface[interface].bandwidth }},{{ to_parse_interface[interface].mtu }},{{ to_parse_interface[interface].delay }},{{ to_parse_interface[interface].encapsulation.encapsulation }},{% if to_parse_interface[interface].medium is defined %}{{ to_parse_interface[interface].medium }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].flow_control is defined %}{{ to_parse_interface[interface].flow_control.receive }},{{ to_parse_interface[interface].flow_control.send }},{% else %}N/A,N/A,{% endif %}{% if to_parse_interface[interface].last_change is defined %}{{ to_parse_interface[interface].last_change }},{% else %}N/A,{% endif %}N/A,N/A,{% if to_parse_interface[interface].counters is defined %}{{ to_parse_interface[interface].counters.in_broadcast_pkts | default("N/A") }},{{ to_parse_interface[interface].counters.in_crc_errors | default("N/A") }},{{ to_parse_interface[interface].counters.in_errors }},{{ to_parse_interface[interface].counters.in_unicast_pkts | default("N/A") }},{{ to_parse_interface[interface].counters.in_multicast_pkts | default("N/A") }},{{ to_parse_interface[interface].counters.in_pkts  | default("N/A") }},{{ to_parse_interface[interface].counters.out_broadcast_pkts| default("N/A") }},{{ to_parse_interface[interface].counters.out_discard | default("N/A") }},{{ to_parse_interface[interface].counters.out_errors | default("N/A") }},{{ to_parse_interface[interface].counters.out_unicast_pkts | default("N/A") }},{{ to_parse_interface[interface].counters.out_multicast_pkts | default("N/A") }},{{ to_parse_interface[interface].counters.out_pkts | default("N/A") }},{{ to_parse_interface[interface].counters.rate.in_rate | default("N/A") }},{{ to_parse_interface[interface].counters.rate.out_rate | default("N/A") }}{% else %}N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A{% endif %}{% else %}{% if to_parse_interface[interface].port_channel is defined %}{% if to_parse_interface[interface].port_channel.port_channel_member_intfs %}{% for member in to_parse_interface[interface].port_channel.port_channel_member_intfs %}
{{ interface }},{% if to_parse_interface[interface].description is defined %}{{ to_parse_interface[interface].description }},{% else %}No Description,{% endif %}N/A,N/A,{% if to_parse_interface[interface].type is defined %}{{ to_parse_interface[interface].type }},{% else %}N/A,{% endif %}{{ to_parse_interface[interface].enabled }},{{ to_parse_interface[interface].oper_status }},{% if to_parse_interface[interface].phys_address is defined %}{{ to_parse_interface[interface].phys_address }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].mac_address is defined %}{{ to_parse_interface[interface].mac_address }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].switchport_enable is defined %}{{ to_parse_interface[interface].switchport_enable }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].switchport_mode is defined %}{{ to_parse_interface[interface].switchport_mode }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].access_vlan is defined %}{{ to_parse_interface[interface].access_vlan }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].trunk_vlans is defined %}{{ to_parse_interface[interface].trunk_vlans | replace(","," ") }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].native_vlan is defined %}{{ to_parse_interface[interface].native_vlan }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].vrf is defined %}{{ to_parse_interface[interface].vrf }},{% else %}N/A,{% endif %}{{ to_parse_interface[interface].bandwidth }},{{ to_parse_interface[interface].mtu }},{{ to_parse_interface[interface].delay }},{{ to_parse_interface[interface].encapsulation.encapsulation }},{% if to_parse_interface[interface].medium is defined %}{{ to_parse_interface[interface].medium }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].flow_control is defined %}{{ to_parse_interface[interface].flow_control.receive }},{{ to_parse_interface[interface].flow_control.send }},{% else %}N/A,N/A,{% endif %}{% if to_parse_interface[interface].last_change is defined %}{{ to_parse_interface[interface].last_change }},{% else %}N/A,{% endif %}{{ interface }},{{ member }}{% if to_parse_interface[interface].counters is defined %}{{ to_parse_interface[interface].counters.in_broadcast_pkts | default("N/A") }},{{ to_parse_interface[interface].counters.in_crc_errors | default("N/A") }},{{ to_parse_interface[interface].counters.in_errors }},{{ to_parse_interface[interface].counters.in_unicast_pkts | default("N/A") }},{{ to_parse_interface[interface].counters.in_multicast_pkts | default("N/A") }},{{ to_parse_interface[interface].counters.in_pkts  | default("N/A") }},{{ to_parse_interface[interface].counters.out_broadcast_pkts| default("N/A") }},{{ to_parse_interface[interface].counters.out_discard | default("N/A") }},{{ to_parse_interface[interface].counters.out_errors | default("N/A") }},{{ to_parse_interface[interface].counters.out_unicast_pkts | default("N/A") }},{{ to_parse_interface[interface].counters.out_multicast_pkts | default("N/A") }},{{ to_parse_interface[interface].counters.out_pkts | default("N/A") }},{{ to_parse_interface[interface].counters.rate.in_rate | default("N/A") }},{{ to_parse_interface[interface].counters.rate.out_rate | default("N/A") }}{% else %}N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A{% endif %}{% endfor %}{% else %}{% if to_parse_interface[interface].port_channel.port_channel_member == "True" %}
{{ interface }},{% if to_parse_interface[interface].description is defined %}{{ to_parse_interface[interface].description }},{% else %}No Description,{% endif %}N/A,N/A,{% if to_parse_interface[interface].type is defined %}{{ to_parse_interface[interface].type }}{% else %}N/A,{% endif %}{{ to_parse_interface[interface].enabled }},{{ to_parse_interface[interface].oper_status }},{% if to_parse_interface[interface].phys_address is defined %}{{ to_parse_interface[interface].phys_address }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].mac_address is defined %}{{ to_parse_interface[interface].mac_address }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].switchport_enable is defined %}{{ to_parse_interface[interface].switchport_enable }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].switchport_mode is defined %}{{ to_parse_interface[interface].switchport_mode }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].access_vlan is defined %}{{ to_parse_interface[interface].access_vlan }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].trunk_vlans is defined %}{{ to_parse_interface[interface].trunk_vlans | replace(","," ") }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].native_vlan is defined %}{{ to_parse_interface[interface].native_vlan }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].vrf is defined %}{{ to_parse_interface[interface].vrf }},{% else %}N/A,{% endif %}{{ to_parse_interface[interface].bandwidth }},{{ to_parse_interface[interface].mtu }},{{ to_parse_interface[interface].delay }},{{ to_parse_interface[interface].encapsulation.encapsulation }},{% if to_parse_interface[interface].medium is defined %}{{ to_parse_interface[interface].medium }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].flow_control is defined %}{{ to_parse_interface[interface].flow_control.receive }},{{ to_parse_interface[interface].flow_control.send }},{% else %}N/A,N/A,{% endif %}{% if to_parse_interface[interface].last_change is defined %}{{ to_parse_interface[interface].last_change }},{% else %}N/A,{% endif %}{{ to_parse_interface[interface].port_channel.port_channel_int }},{{ to_parse_interface[interface].port_channel.port_channel_member }},{% if to_parse_interface[interface].counters is defined %}{{ to_parse_interface[interface].counters.in_broadcast_pkts | default("N/A") }},{{ to_parse_interface[interface].counters.in_crc_errors | default("N/A") }},{{ to_parse_interface[interface].counters.in_errors }},{{ to_parse_interface[interface].counters.in_unicast_pkts | default("N/A") }},{{ to_parse_interface[interface].counters.in_multicast_pkts | default("N/A") }},{{ to_parse_interface[interface].counters.in_pkts  | default("N/A") }},{{ to_parse_interface[interface].counters.out_broadcast_pkts| default("N/A") }},{{ to_parse_interface[interface].counters.out_discard | default("N/A") }},{{ to_parse_interface[interface].counters.out_errors | default("N/A") }},{{ to_parse_interface[interface].counters.out_unicast_pkts | default("N/A") }},{{ to_parse_interface[interface].counters.out_multicast_pkts | default("N/A") }},{{ to_parse_interface[interface].counters.out_pkts | default("N/A") }},{{ to_parse_interface[interface].counters.rate.in_rate | default("N/A") }},{{ to_parse_interface[interface].counters.rate.out_rate | default("N/A") }}{% else %}N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A{% endif %}{% else %}
{{ interface }},{% if to_parse_interface[interface].description is defined %}{{ to_parse_interface[interface].description }},{% else %}No Description,{% endif %}N/A,N/A,{% if to_parse_interface[interface].type is defined %}{{ to_parse_interface[interface].type }},{% else %}N/A,{% endif %}{{ to_parse_interface[interface].enabled }},{{ to_parse_interface[interface].oper_status }},{% if to_parse_interface[interface].phys_address is defined %}{{ to_parse_interface[interface].phys_address }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].mac_address is defined %}{{ to_parse_interface[interface].mac_address }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].switchport_enable is defined %}{{ to_parse_interface[interface].switchport_enable }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].switchport_mode is defined %}{{ to_parse_interface[interface].switchport_mode }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].access_vlan is defined %}{{ to_parse_interface[interface].access_vlan }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].trunk_vlans is defined %}{{ to_parse_interface[interface].trunk_vlans | replace(","," ") }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].native_vlan is defined %}{{ to_parse_interface[interface].native_vlan }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].vrf is defined %}{{ to_parse_interface[interface].vrf }},{% else %}N/A,{% endif %}{{ to_parse_interface[interface].bandwidth }},{{ to_parse_interface[interface].mtu }},{{ to_parse_interface[interface].delay }},{{ to_parse_interface[interface].encapsulation.encapsulation }},{% if to_parse_interface[interface].medium is defined %}{{ to_parse_interface[interface].medium }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].flow_control is defined %}{{ to_parse_interface[interface].flow_control.receive }},{{ to_parse_interface[interface].flow_control.send }},{% else %}N/A,N/A,{% endif %}{% if to_parse_interface[interface].last_change is defined %}{{ to_parse_interface[interface].last_change }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].port_channel.port_channel_member == "True" %}{{ interface }},{% else %}N/A,{% endif %}{{ to_parse_interface[interface].port_channel.port_channel_member }},{% if to_parse_interface[interface].counters is defined %}{{ to_parse_interface[interface].counters.in_broadcast_pkts | default("N/A") }},{{ to_parse_interface[interface].counters.in_crc_errors | default("N/A") }},{{ to_parse_interface[interface].counters.in_errors }},{{ to_parse_interface[interface].counters.in_unicast_pkts | default("N/A") }},{{ to_parse_interface[interface].counters.in_multicast_pkts | default("N/A") }},{{ to_parse_interface[interface].counters.in_pkts  | default("N/A") }},{{ to_parse_interface[interface].counters.out_broadcast_pkts| default("N/A") }},{{ to_parse_interface[interface].counters.out_discard | default("N/A") }},{{ to_parse_interface[interface].counters.out_errors | default("N/A") }},{{ to_parse_interface[interface].counters.out_unicast_pkts | default("N/A") }},{{ to_parse_interface[interface].counters.out_multicast_pkts | default("N/A") }},{{ to_parse_interface[interface].counters.out_pkts | default("N/A") }},{{ to_parse_interface[interface].counters.rate.in_rate | default("N/A") }},{{ to_parse_interface[interface].counters.rate.out_rate | default("N/A") }}{% else %}N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A{% endif %}{% endif %}{% endif %}{% else %}
{{ interface }},{% if to_parse_interface[interface].description is defined %}{{ to_parse_interface[interface].description }},{% else %}No Description,{% endif %}N/A,N/A,{% if to_parse_interface[interface].type is defined %}{{ to_parse_interface[interface].type }},{% else %}N/A,{% endif %}{{ to_parse_interface[interface].enabled }},{{ to_parse_interface[interface].oper_status }},{% if to_parse_interface[interface].phys_address is defined %}{{ to_parse_interface[interface].phys_address }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].mac_address is defined %}{{ to_parse_interface[interface].mac_address }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].switchport_enable is defined %}{{ to_parse_interface[interface].switchport_enable }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].switchport_mode is defined %}{{ to_parse_interface[interface].switchport_mode }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].access_vlan is defined %}{{ to_parse_interface[interface].access_vlan }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].trunk_vlans is defined %}{{ to_parse_interface[interface].trunk_vlans | replace(","," ") }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].native_vlan is defined %}{{ to_parse_interface[interface].native_vlan }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].vrf is defined %}{{ to_parse_interface[interface].vrf }},{% else %}N/A,{% endif %}{{ to_parse_interface[interface].bandwidth }},{{ to_parse_interface[interface].mtu }},{{ to_parse_interface[interface].delay }},{{ to_parse_interface[interface].encapsulation.encapsulation }},{% if to_parse_interface[interface].medium is defined %}{{ to_parse_interface[interface].medium }},{% else %}N/A,{% endif %}{% if to_parse_interface[interface].flow_control is defined %}{{ to_parse_interface[interface].flow_control.receive }},{{ to_parse_interface[interface].flow_control.send }},{% else %}N/A,N/A,{% endif %}N/A,N/A,{% if to_parse_interface[interface].last_change is defined %}{{ to_parse_interface[interface].last_change }},{% else %}N/A,{% endif %}{{ to_parse_interface[interface].port_channel.port_channel_int }},{{ to_parse_interface[interface].port_channel.port_channel_member }},{% if to_parse_interface[interface].counters is defined %}{{ to_parse_interface[interface].counters.in_broadcast_pkts | default("N/A") }},{{ to_parse_interface[interface].counters.in_crc_errors | default("N/A") }},{{ to_parse_interface[interface].counters.in_errors }},{{ to_parse_interface[interface].counters.in_unicast_pkts | default("N/A") }},{{ to_parse_interface[interface].counters.in_multicast_pkts | default("N/A") }},{{ to_parse_interface[interface].counters.in_pkts  | default("N/A") }},{{ to_parse_interface[interface].counters.out_broadcast_pkts| default("N/A") }},{{ to_parse_interface[interface].counters.out_discard | default("N/A") }},{{ to_parse_interface[interface].counters.out_errors | default("N/A") }},{{ to_parse_interface[interface].counters.out_unicast_pkts | default("N/A") }},{{ to_parse_interface[interface].counters.out_multicast_pkts | default("N/A") }},{{ to_parse_interface[interface].counters.out_pkts | default("N/A") }},{{ to_parse_interface[interface].counters.rate.in_rate | default("N/A") }},{{ to_parse_interface[interface].counters.rate.out_rate | default("N/A") }}{% else %}N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A{% endif %}{% endif %}{% endif %}{% endif %}{% endfor %}{% else %}{% if filetype_loop == 1 %}
# Learn Interface
| Interface | Description | IP Address | IP Origin | Type | Enabled | Operational Status | Physical Address | MAC Address | Switchport Enabled | Switchport Mode | Access VLAN | Trunk VLAN | Native VLAN | VRF | Bandwidth | MTU | Delay | Encapsulation | Medium | Flow Control Receive | Flow Control Send | Last Change | Port Channel | Port Channel Member | Input Broadcast | Input CRC Errors | Input Errors | Input Unicast | Input Multicast | Input Total | Output Broadcast | Output Discards | Output Errors | Output Unicast | Output Multicast | Output Total | Input Rate | Output Rate |
| --------- | ----------- | ---------- | --------- | ---- | ------- | ------------------ | ---------------- | ----------- | ------------------ | --------------- | ----------- | ---------- | ----------- | --- | --------- | --- | ----- | ------------- | ------ | -------------------- | ----------------- | ----------- | ------------ | ------------------- | --------------- | ---------------- | ------------ | ------------- | --------------- | ----------- | ---------------- | --------------- | ------------- | -------------- | ---------------- | ------------ | ---------- | ----------- |{% for interface in to_parse_interface %}{% if (to_parse_interface[interface].ipv4 is defined) and (to_parse_interface[interface].port_channel is defined) %}{% for ip_address in to_parse_interface[interface].ipv4 %}{% if to_parse_interface[interface].port_channel.port_channel_member_intfs %}{% for member in to_parse_interface[interface].port_channel.port_channel_member_intfs %}
| {{ interface }} | {% if to_parse_interface[interface].description is defined %}{{ to_parse_interface[interface].description }} | {% else %}No Description | {% endif %}{% if to_parse_interface[interface].ipv4 is defined %}{{ ip_address }} | {{ to_parse_interface[interface].ipv4[ip_address].origin | default("No Origin") }} | {% else %}N/A | N/A | {% endif %}{% if to_parse_interface[interface].type is defined %}{{ to_parse_interface[interface].type }} | {% else %}N/A | {% endif %}{{ to_parse_interface[interface].enabled }} | {{ to_parse_interface[interface].oper_status }} | {% if to_parse_interface[interface].phys_address is defined %}{{ to_parse_interface[interface].phys_address }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].mac_address is defined %}{{ to_parse_interface[interface].mac_address }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].switchport_enable is defined %}{{ to_parse_interface[interface].switchport_enable }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].switchport_mode is defined %}{{ to_parse_interface[interface].switchport_mode }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].access_vlan is defined %}{{ to_parse_interface[interface].access_vlan }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].trunk_vlans is defined %}{{ to_parse_interface[interface].trunk_vlans | replace(","," ") }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].native_vlan is defined %}{{ to_parse_interface[interface].native_vlan }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].vrf is defined %}{{ to_parse_interface[interface].vrf }} | {% else %}N/A | {% endif %}{{ to_parse_interface[interface].bandwidth }} | {{ to_parse_interface[interface].mtu }} | {{ to_parse_interface[interface].delay }} | {{ to_parse_interface[interface].encapsulation.encapsulation }} | {% if to_parse_interface[interface].medium is defined %}{{ to_parse_interface[interface].medium }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].flow_control is defined %}{{ to_parse_interface[interface].flow_control.receive }} | {{ to_parse_interface[interface].flow_control.send }} | {% else %}N/A | N/A | {% endif %}{% if to_parse_interface[interface].last_change is defined %}{{ to_parse_interface[interface].last_change }} | {% else %}N/A | {% endif %}{{ interface }} | {{ member }}{% if to_parse_interface[interface].counters is defined %}{{ to_parse_interface[interface].counters.in_broadcast_pkts | default("N/A") }} | {{ to_parse_interface[interface].counters.in_crc_errors | default("N/A") }} | {{ to_parse_interface[interface].counters.in_errors }} | {{ to_parse_interface[interface].counters.in_unicast_pkts | default("N/A") }} | {{ to_parse_interface[interface].counters.in_multicast_pkts | default("N/A") }} | {{ to_parse_interface[interface].counters.in_pkts  | default("N/A") }} | {{ to_parse_interface[interface].counters.out_broadcast_pkts| default("N/A") }} | {{ to_parse_interface[interface].counters.out_discard | default("N/A") }} | {{ to_parse_interface[interface].counters.out_errors | default("N/A") }} | {{ to_parse_interface[interface].counters.out_unicast_pkts | default("N/A") }} | {{ to_parse_interface[interface].counters.out_multicast_pkts | default("N/A") }} | {{ to_parse_interface[interface].counters.out_pkts | default("N/A") }} | {{ to_parse_interface[interface].counters.rate.in_rate | default("N/A") }} | {{ to_parse_interface[interface].counters.rate.out_rate | default("N/A") }}{% else %}N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A |{% endif %}{% endfor %}{% else %}{% if to_parse_interface[interface].port_channel.port_channel_member == "True" %}
| {{ interface }} | {% if to_parse_interface[interface].description is defined %}{{ to_parse_interface[interface].description }} | {% else %}No Description | {% endif %}{% if to_parse_interface[interface].ipv4 is defined %}{{ ip_address }} | {{ to_parse_interface[interface].ipv4[ip_address].origin | default("No Origin") }} | {% else %}N/A | N/A | {% endif %}{% if to_parse_interface[interface].type is defined %}{{ to_parse_interface[interface].type }} | {% else %}N/A | {% endif %}{{ to_parse_interface[interface].enabled }} | {{ to_parse_interface[interface].oper_status }} | {% if to_parse_interface[interface].phys_address is defined %}{{ to_parse_interface[interface].phys_address }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].mac_address is defined %}{{ to_parse_interface[interface].mac_address }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].switchport_enable is defined %}{{ to_parse_interface[interface].switchport_enable }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].switchport_mode is defined %}{{ to_parse_interface[interface].switchport_mode }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].access_vlan is defined %}{{ to_parse_interface[interface].access_vlan }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].trunk_vlans is defined %}{{ to_parse_interface[interface].trunk_vlans | replace(","," ") }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].native_vlan is defined %}{{ to_parse_interface[interface].native_vlan }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].vrf is defined %}{{ to_parse_interface[interface].vrf }} | {% else %}N/A | {% endif %}{{ to_parse_interface[interface].bandwidth }} | {{ to_parse_interface[interface].mtu }} | {{ to_parse_interface[interface].delay }} | {{ to_parse_interface[interface].encapsulation.encapsulation }} | {% if to_parse_interface[interface].medium is defined %}{{ to_parse_interface[interface].medium }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].flow_control is defined %}{{ to_parse_interface[interface].flow_control.receive }} | {{ to_parse_interface[interface].flow_control.send }} | {% else %}N/A | N/A | {% endif %}{% if to_parse_interface[interface].last_change is defined %}{{ to_parse_interface[interface].last_change }} | {% else %}N/A | {% endif %}{{ to_parse_interface[interface].port_channel.port_channel_int }} | {{ to_parse_interface[interface].port_channel.port_channel_member }} | {% if to_parse_interface[interface].counters is defined %}{{ to_parse_interface[interface].counters.in_broadcast_pkts | default("N/A") }} | {{ to_parse_interface[interface].counters.in_crc_errors | default("N/A") }} | {{ to_parse_interface[interface].counters.in_errors }} | {{ to_parse_interface[interface].counters.in_unicast_pkts | default("N/A") }} | {{ to_parse_interface[interface].counters.in_multicast_pkts | default("N/A") }} | {{ to_parse_interface[interface].counters.in_pkts  | default("N/A") }} | {{ to_parse_interface[interface].counters.out_broadcast_pkts| default("N/A") }} | {{ to_parse_interface[interface].counters.out_discard | default("N/A") }} | {{ to_parse_interface[interface].counters.out_errors | default("N/A") }} | {{ to_parse_interface[interface].counters.out_unicast_pkts | default("N/A") }} | {{ to_parse_interface[interface].counters.out_multicast_pkts | default("N/A") }} | {{ to_parse_interface[interface].counters.out_pkts | default("N/A") }} | {{ to_parse_interface[interface].counters.rate.in_rate | default("N/A") }} | {{ to_parse_interface[interface].counters.rate.out_rate | default("N/A") }}{% else %}N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A |{% endif %}{% else %}
| {{ interface }} | {% if to_parse_interface[interface].description is defined %}{{ to_parse_interface[interface].description }} | {% else %}No Description | {% endif %}{% if to_parse_interface[interface].ipv4 is defined %}{{ ip_address }} | {{ to_parse_interface[interface].ipv4[ip_address].origin | default("No Origin") }} | {% else %}N/A | N/A | {% endif %}{% if to_parse_interface[interface].type is defined %}{{ to_parse_interface[interface].type }} | {% else %}N/A | {% endif %}{{ to_parse_interface[interface].enabled }} | {{ to_parse_interface[interface].oper_status }} | {% if to_parse_interface[interface].phys_address is defined %}{{ to_parse_interface[interface].phys_address }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].mac_address is defined %}{{ to_parse_interface[interface].mac_address }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].switchport_enable is defined %}{{ to_parse_interface[interface].switchport_enable }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].switchport_mode is defined %}{{ to_parse_interface[interface].switchport_mode }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].access_vlan is defined %}{{ to_parse_interface[interface].access_vlan }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].trunk_vlans is defined %}{{ to_parse_interface[interface].trunk_vlans | replace(","," ") }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].native_vlan is defined %}{{ to_parse_interface[interface].native_vlan }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].vrf is defined %}{{ to_parse_interface[interface].vrf }} | {% else %}N/A | {% endif %}{{ to_parse_interface[interface].bandwidth }} | {{ to_parse_interface[interface].mtu }} | {{ to_parse_interface[interface].delay }} | {{ to_parse_interface[interface].encapsulation.encapsulation }} | {% if to_parse_interface[interface].medium is defined %}{{ to_parse_interface[interface].medium }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].flow_control is defined %}{{ to_parse_interface[interface].flow_control.receive }} | {{ to_parse_interface[interface].flow_control.send }} | {% else %}N/A | N/A | {% endif %}{% if to_parse_interface[interface].last_change is defined %}{{ to_parse_interface[interface].last_change }} | {% else %}N/A | {% endif %}N/A | {{ to_parse_interface[interface].port_channel.port_channel_member }} | {% if to_parse_interface[interface].counters is defined %}{{ to_parse_interface[interface].counters.in_broadcast_pkts | default("N/A") }} | {{ to_parse_interface[interface].counters.in_crc_errors | default("N/A") }} | {{ to_parse_interface[interface].counters.in_errors | default("N/A") }} | {{ to_parse_interface[interface].counters.in_unicast_pkts | default("N/A") }} | {{ to_parse_interface[interface].counters.in_multicast_pkts | default("N/A") }} | {{ to_parse_interface[interface].counters.in_pkts  | default("N/A") }} | {{ to_parse_interface[interface].counters.out_broadcast_pkts | default("N/A") }} | {{ to_parse_interface[interface].counters.out_discard | default("N/A") }} | {{ to_parse_interface[interface].counters.out_errors | default("N/A") }} | {{ to_parse_interface[interface].counters.out_unicast_pkts | default("N/A") }} | {{ to_parse_interface[interface].counters.out_multicast_pkts | default("N/A") }} | {{ to_parse_interface[interface].counters.out_pkts | default("N/A") }} | {{ to_parse_interface[interface].counters.rate.in_rate | default("N/A") }} | {{ to_parse_interface[interface].counters.rate.out_rate | default("N/A") }}{% else %}N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A |{% endif %}{% endif %}{% endif %}{% endfor %}{% else %}{% if to_parse_interface[interface].ipv4 is defined %}
| {{ interface }} | {% if to_parse_interface[interface].description is defined %}{{ to_parse_interface[interface].description }} | {% else %}No Description | {% endif %}{% if to_parse_interface[interface].ipv4 is defined %}{{ ip_address }} | {{ to_parse_interface[interface].ipv4[ip_address].origin | default("No Origin") }} | {% else %}N/A | N/A | {% endif %}{% if to_parse_interface[interface].type is defined %}{{ to_parse_interface[interface].type }} | {% else %}N/A | {% endif %}{{ to_parse_interface[interface].enabled }} | {{ to_parse_interface[interface].oper_status }} | {% if to_parse_interface[interface].phys_address is defined %}{{ to_parse_interface[interface].phys_address }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].mac_address is defined %}{{ to_parse_interface[interface].mac_address }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].switchport_enable is defined %}{{ to_parse_interface[interface].switchport_enable }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].switchport_mode is defined %}{{ to_parse_interface[interface].switchport_mode }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].access_vlan is defined %}{{ to_parse_interface[interface].access_vlan }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].trunk_vlans is defined %}{{ to_parse_interface[interface].trunk_vlans | replace(","," ") }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].native_vlan is defined %}{{ to_parse_interface[interface].native_vlan }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].vrf is defined %}{{ to_parse_interface[interface].vrf }} | {% else %}N/A | {% endif %}{{ to_parse_interface[interface].bandwidth }} | {{ to_parse_interface[interface].mtu }} | {{ to_parse_interface[interface].delay }} | {{ to_parse_interface[interface].encapsulation.encapsulation }} | {% if to_parse_interface[interface].medium is defined %}{{ to_parse_interface[interface].medium }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].flow_control is defined %}{{ to_parse_interface[interface].flow_control.receive }} | {{ to_parse_interface[interface].flow_control.send }} | {% else %}N/A | N/A | {% endif %}{% if to_parse_interface[interface].last_change is defined %}{{ to_parse_interface[interface].last_change }} | {% else %}N/A | {% endif %}N/A | N/A | {% if to_parse_interface[interface].counters is defined %}{{ to_parse_interface[interface].counters.in_broadcast_pkts | default("N/A") }} | {{ to_parse_interface[interface].counters.in_crc_errors | default("N/A") }} | {{ to_parse_interface[interface].counters.in_errors }} | {{ to_parse_interface[interface].counters.in_unicast_pkts | default("N/A") }} | {{ to_parse_interface[interface].counters.in_multicast_pkts | default("N/A") }} | {{ to_parse_interface[interface].counters.in_pkts  | default("N/A") }} | {{ to_parse_interface[interface].counters.out_broadcast_pkts| default("N/A") }} | {{ to_parse_interface[interface].counters.out_discard | default("N/A") }} | {{ to_parse_interface[interface].counters.out_errors | default("N/A") }} | {{ to_parse_interface[interface].counters.out_unicast_pkts | default("N/A") }} | {{ to_parse_interface[interface].counters.out_multicast_pkts | default("N/A") }} | {{ to_parse_interface[interface].counters.out_pkts | default("N/A") }} | {{ to_parse_interface[interface].counters.rate.in_rate | default("N/A") }} | {{ to_parse_interface[interface].counters.rate.out_rate | default("N/A") }}{% else %}N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A |{% endif %}{% else %}{% if to_parse_interface[interface].port_channel is defined %}{% if to_parse_interface[interface].port_channel.port_channel_member_intfs %}{% for member in to_parse_interface[interface].port_channel.port_channel_member_intfs %}
| {{ interface }} | {% if to_parse_interface[interface].description is defined %}{{ to_parse_interface[interface].description }} | {% else %}No Description | {% endif %}N/A | N/A | {% if to_parse_interface[interface].type is defined %}{{ to_parse_interface[interface].type }} | {% else %}N/A | {% endif %}{{ to_parse_interface[interface].enabled }} | {{ to_parse_interface[interface].oper_status }} | {% if to_parse_interface[interface].phys_address is defined %}{{ to_parse_interface[interface].phys_address }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].mac_address is defined %}{{ to_parse_interface[interface].mac_address }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].switchport_enable is defined %}{{ to_parse_interface[interface].switchport_enable }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].switchport_mode is defined %}{{ to_parse_interface[interface].switchport_mode }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].access_vlan is defined %}{{ to_parse_interface[interface].access_vlan }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].trunk_vlans is defined %}{{ to_parse_interface[interface].trunk_vlans | replace(","," ") }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].native_vlan is defined %}{{ to_parse_interface[interface].native_vlan }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].vrf is defined %}{{ to_parse_interface[interface].vrf }} | {% else %}N/A | {% endif %}{{ to_parse_interface[interface].bandwidth }} | {{ to_parse_interface[interface].mtu }} | {{ to_parse_interface[interface].delay }} | {{ to_parse_interface[interface].encapsulation.encapsulation }} | {% if to_parse_interface[interface].medium is defined %}{{ to_parse_interface[interface].medium }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].flow_control is defined %}{{ to_parse_interface[interface].flow_control.receive }} | {{ to_parse_interface[interface].flow_control.send }} | {% else %}N/A | N/A | {% endif %}{% if to_parse_interface[interface].last_change is defined %}{{ to_parse_interface[interface].last_change }} | {% else %}N/A | {% endif %}{{ interface }} | {{ member }}{% if to_parse_interface[interface].counters is defined %}{{ to_parse_interface[interface].counters.in_broadcast_pkts | default("N/A") }} | {{ to_parse_interface[interface].counters.in_crc_errors | default("N/A") }} | {{ to_parse_interface[interface].counters.in_errors }} | {{ to_parse_interface[interface].counters.in_unicast_pkts | default("N/A") }} | {{ to_parse_interface[interface].counters.in_multicast_pkts | default("N/A") }} | {{ to_parse_interface[interface].counters.in_pkts  | default("N/A") }} | {{ to_parse_interface[interface].counters.out_broadcast_pkts| default("N/A") }} | {{ to_parse_interface[interface].counters.out_discard | default("N/A") }} | {{ to_parse_interface[interface].counters.out_errors | default("N/A") }} | {{ to_parse_interface[interface].counters.out_unicast_pkts | default("N/A") }} | {{ to_parse_interface[interface].counters.out_multicast_pkts | default("N/A") }} | {{ to_parse_interface[interface].counters.out_pkts | default("N/A") }} | {{ to_parse_interface[interface].counters.rate.in_rate | default("N/A") }} | {{ to_parse_interface[interface].counters.rate.out_rate | default("N/A") }}{% else %}N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A |{% endif %}{% endfor %}{% else %}{% if to_parse_interface[interface].port_channel.port_channel_member == "True" %}
| {{ interface }} | {% if to_parse_interface[interface].description is defined %}{{ to_parse_interface[interface].description }} | {% else %}No Description | {% endif %}N/A | N/A | {% if to_parse_interface[interface].type is defined %}{{ to_parse_interface[interface].type }}{% else %}N/A | {% endif %}{{ to_parse_interface[interface].enabled }} | {{ to_parse_interface[interface].oper_status }} | {% if to_parse_interface[interface].phys_address is defined %}{{ to_parse_interface[interface].phys_address }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].mac_address is defined %}{{ to_parse_interface[interface].mac_address }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].switchport_enable is defined %}{{ to_parse_interface[interface].switchport_enable }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].switchport_mode is defined %}{{ to_parse_interface[interface].switchport_mode }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].access_vlan is defined %}{{ to_parse_interface[interface].access_vlan }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].trunk_vlans is defined %}{{ to_parse_interface[interface].trunk_vlans | replace(","," ") }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].native_vlan is defined %}{{ to_parse_interface[interface].native_vlan }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].vrf is defined %}{{ to_parse_interface[interface].vrf }} | {% else %}N/A | {% endif %}{{ to_parse_interface[interface].bandwidth }} | {{ to_parse_interface[interface].mtu }} | {{ to_parse_interface[interface].delay }} | {{ to_parse_interface[interface].encapsulation.encapsulation }} | {% if to_parse_interface[interface].medium is defined %}{{ to_parse_interface[interface].medium }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].flow_control is defined %}{{ to_parse_interface[interface].flow_control.receive }} | {{ to_parse_interface[interface].flow_control.send }} | {% else %}N/A | N/A | {% endif %}{% if to_parse_interface[interface].last_change is defined %}{{ to_parse_interface[interface].last_change }} | {% else %}N/A | {% endif %}{{ to_parse_interface[interface].port_channel.port_channel_int }} | {{ to_parse_interface[interface].port_channel.port_channel_member }} | {% if to_parse_interface[interface].counters is defined %}{{ to_parse_interface[interface].counters.in_broadcast_pkts | default("N/A") }} | {{ to_parse_interface[interface].counters.in_crc_errors | default("N/A") }} | {{ to_parse_interface[interface].counters.in_errors }} | {{ to_parse_interface[interface].counters.in_unicast_pkts | default("N/A") }} | {{ to_parse_interface[interface].counters.in_multicast_pkts | default("N/A") }} | {{ to_parse_interface[interface].counters.in_pkts  | default("N/A") }} | {{ to_parse_interface[interface].counters.out_broadcast_pkts| default("N/A") }} | {{ to_parse_interface[interface].counters.out_discard | default("N/A") }} | {{ to_parse_interface[interface].counters.out_errors | default("N/A") }} | {{ to_parse_interface[interface].counters.out_unicast_pkts | default("N/A") }} | {{ to_parse_interface[interface].counters.out_multicast_pkts | default("N/A") }} | {{ to_parse_interface[interface].counters.out_pkts | default("N/A") }} | {{ to_parse_interface[interface].counters.rate.in_rate | default("N/A") }} | {{ to_parse_interface[interface].counters.rate.out_rate | default("N/A") }}{% else %}N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A |{% endif %}{% else %}
| {{ interface }} | {% if to_parse_interface[interface].description is defined %}{{ to_parse_interface[interface].description }} | {% else %}No Description | {% endif %}N/A | N/A | {% if to_parse_interface[interface].type is defined %}{{ to_parse_interface[interface].type }} | {% else %}N/A | {% endif %}{{ to_parse_interface[interface].enabled }} | {{ to_parse_interface[interface].oper_status }} | {% if to_parse_interface[interface].phys_address is defined %}{{ to_parse_interface[interface].phys_address }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].mac_address is defined %}{{ to_parse_interface[interface].mac_address }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].switchport_enable is defined %}{{ to_parse_interface[interface].switchport_enable }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].switchport_mode is defined %}{{ to_parse_interface[interface].switchport_mode }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].access_vlan is defined %}{{ to_parse_interface[interface].access_vlan }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].trunk_vlans is defined %}{{ to_parse_interface[interface].trunk_vlans | replace(","," ") }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].native_vlan is defined %}{{ to_parse_interface[interface].native_vlan }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].vrf is defined %}{{ to_parse_interface[interface].vrf }} | {% else %}N/A | {% endif %}{{ to_parse_interface[interface].bandwidth }} | {{ to_parse_interface[interface].mtu }} | {{ to_parse_interface[interface].delay }} | {{ to_parse_interface[interface].encapsulation.encapsulation }} | {% if to_parse_interface[interface].medium is defined %}{{ to_parse_interface[interface].medium }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].flow_control is defined %}{{ to_parse_interface[interface].flow_control.receive }} | {{ to_parse_interface[interface].flow_control.send }} | {% else %}N/A | N/A | {% endif %}{% if to_parse_interface[interface].last_change is defined %}{{ to_parse_interface[interface].last_change }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].port_channel.port_channel_member == "True" %} {{ interface }} | {% else %} N/A | {% endif %}{{ to_parse_interface[interface].port_channel.port_channel_member }} | {% if to_parse_interface[interface].counters is defined %}{{ to_parse_interface[interface].counters.in_broadcast_pkts | default("N/A") }} | {{ to_parse_interface[interface].counters.in_crc_errors | default("N/A") }} | {{ to_parse_interface[interface].counters.in_errors }} | {{ to_parse_interface[interface].counters.in_unicast_pkts | default("N/A") }} | {{ to_parse_interface[interface].counters.in_multicast_pkts | default("N/A") }} | {{ to_parse_interface[interface].counters.in_pkts  | default("N/A") }} | {{ to_parse_interface[interface].counters.out_broadcast_pkts| default("N/A") }} | {{ to_parse_interface[interface].counters.out_discard | default("N/A") }} | {{ to_parse_interface[interface].counters.out_errors | default("N/A") }} | {{ to_parse_interface[interface].counters.out_unicast_pkts | default("N/A") }} | {{ to_parse_interface[interface].counters.out_multicast_pkts | default("N/A") }} | {{ to_parse_interface[interface].counters.out_pkts | default("N/A") }} | {{ to_parse_interface[interface].counters.rate.in_rate | default("N/A") }} | {{ to_parse_interface[interface].counters.rate.out_rate | default("N/A") }}{% else %}N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A |{% endif %}{% endif %}{% endif %}{% else %}
| {{ interface }} | {% if to_parse_interface[interface].description is defined %}{{ to_parse_interface[interface].description }} | {% else %}No Description | {% endif %}N/A | N/A | {% if to_parse_interface[interface].type is defined %}{{ to_parse_interface[interface].type }} | {% else %}N/A | {% endif %}{{ to_parse_interface[interface].enabled }} | {{ to_parse_interface[interface].oper_status }} | {% if to_parse_interface[interface].phys_address is defined %}{{ to_parse_interface[interface].phys_address }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].mac_address is defined %}{{ to_parse_interface[interface].mac_address }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].switchport_enable is defined %}{{ to_parse_interface[interface].switchport_enable }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].switchport_mode is defined %}{{ to_parse_interface[interface].switchport_mode }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].access_vlan is defined %}{{ to_parse_interface[interface].access_vlan }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].trunk_vlans is defined %}{{ to_parse_interface[interface].trunk_vlans | replace(","," ") }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].native_vlan is defined %}{{ to_parse_interface[interface].native_vlan }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].vrf is defined %}{{ to_parse_interface[interface].vrf }} | {% else %}N/A | {% endif %}{{ to_parse_interface[interface].bandwidth }} | {{ to_parse_interface[interface].mtu }} | {{ to_parse_interface[interface].delay }} | {{ to_parse_interface[interface].encapsulation.encapsulation }} | {% if to_parse_interface[interface].medium is defined %}{{ to_parse_interface[interface].medium }} | {% else %}N/A | {% endif %}{% if to_parse_interface[interface].flow_control is defined %}{{ to_parse_interface[interface].flow_control.receive }} | {{ to_parse_interface[interface].flow_control.send }} | {% else %}N/A | N/A | {% endif %}N/A | N/A | {% if to_parse_interface[interface].last_change is defined %}{{ to_parse_interface[interface].last_change }} | {% else %}N/A | {% endif %}{{ to_parse_interface[interface].port_channel.port_channel_int }} | {{ to_parse_interface[interface].port_channel.port_channel_member }} | {% if to_parse_interface[interface].counters is defined %}{{ to_parse_interface[interface].counters.in_broadcast_pkts | default("N/A") }} | {{ to_parse_interface[interface].counters.in_crc_errors | default("N/A") }} | {{ to_parse_interface[interface].counters.in_errors }} | {{ to_parse_interface[interface].counters.in_unicast_pkts | default("N/A") }} | {{ to_parse_interface[interface].counters.in_multicast_pkts | default("N/A") }} | {{ to_parse_interface[interface].counters.in_pkts  | default("N/A") }} | {{ to_parse_interface[interface].counters.out_broadcast_pkts| default("N/A") }} | {{ to_parse_interface[interface].counters.out_discard | default("N/A") }} | {{ to_parse_interface[interface].counters.out_errors | default("N/A") }} | {{ to_parse_interface[interface].counters.out_unicast_pkts | default("N/A") }} | {{ to_parse_interface[interface].counters.out_multicast_pkts | default("N/A") }} | {{ to_parse_interface[interface].counters.out_pkts | default("N/A") }} | {{ to_parse_interface[interface].counters.rate.in_rate | default("N/A") }} | {{ to_parse_interface[interface].counters.rate.out_rate | default("N/A") }}{% else %}N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A |{% endif %}{% endif %}{% endif %}{% endif %}{% endfor %}{% else %}{% if filetype_loop == 2 %}
<html>
<head>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
    <script src="https://cdn.datatables.net/1.11.4/js/jquery.dataTables.min.js"></script>
    <script src="https://cdn.datatables.net/buttons/2.0.0/js/dataTables.buttons.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/pdfmake.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/vfs_fonts.js"></script>
    <script src="https://cdn.datatables.net/buttons/2.0.0/js/buttons.html5.min.js"></script>
    <script src="https://cdn.datatables.net/buttons/2.0.0/js/buttons.print.min.js"></script>
    <script src="https://cdn.datatables.net/colreorder/1.5.4/js/dataTables.colReorder.min.js"></script>
    <script src="https://cdn.datatables.net/buttons/2.0.0/js/buttons.colVis.min.js"></script>
    <script src="https://cdn.datatables.net/keytable/2.6.4/js/dataTables.keyTable.min.js"></script>
    <script src="https://cdn.datatables.net/select/1.3.3/js/dataTables.select.min.js"></script>
    <script src="https://cdn.datatables.net/fixedheader/3.1.9/js/dataTables.fixedHeader.min.js"></script>
    <link rel="stylesheet" href="https://cdn.datatables.net/fixedheader/3.1.9/css/fixedHeader.dataTables.min.css">
    <link rel="stylesheet" href="https://cdn.datatables.net/select/1.3.3/css/select.dataTables.min.css">
    <link rel="stylesheet" href="https://cdn.datatables.net/keytable/2.6.4/css/keyTable.dataTables.min.css">
    <link rel="stylesheet" href="https://cdn.datatables.net/1.11.4/css/jquery.dataTables.min.css">
</head>
<body>
<h1>Learn Interface</h1>
<table id = "interface">
  <thead>
  <tr>
    <th>Interface</th>
    <th>Description</th>
    <th>IP Address</th>
    <th>IP Origin</th>
    <th>Type</th>
    <th>Enabled</th>
    <th>Operational Status</th>
    <th>Physical Address</th>
    <th>MAC Address</th>
    <th>Switchport Enabled</th>
    <th>Switchport Mode</th>
    <th>Access VLAN</th>
    <th>Trunk VLAN</th>
    <th>Native VLAN</th>
    <th>VRF</th>
    <th>Bandwidth</th>
    <th>MTU</th>
    <th>Delay</th>
    <th>Encapsulation</th>
    <th>Medium</th>
    <th>Flow Control Receive</th>
    <th>Flow Control Send</th>
    <th>Last Change</th>
    <th>Port Channel</th>
    <th>Port Channel Member</th>
    <th>Input Broadcast</th>
    <th>Input CRC Errors</th>
    <th>Input Errors</th>
    <th>Input Unicast</th>
    <th>Input Multicast</th>
    <th>Input Total</th>
    <th>Output Broadcast</th>
    <th>Output Discards</th>
    <th>Output Errors</th>
    <th>Output Unicast</th>
    <th>Output Multicast</th>
    <th>Output Total</th>
    <th>Input Rate</th>
    <th>Output Rate</th>
  </tr>
  </thead>
  <tbody>{% for interface in to_parse_interface %}{% if (to_parse_interface[interface].ipv4 is defined) and (to_parse_interface[interface].port_channel is defined) %}{% for ip_address in to_parse_interface[interface].ipv4 %}{% if to_parse_interface[interface].port_channel.port_channel_member_intfs %}{% for member in to_parse_interface[interface].port_channel.port_channel_member_intfs %}
<tr>
    <td>{{ interface }}</td>{% if to_parse_interface[interface].description is defined %}
    <td>{{ to_parse_interface[interface].description }}</td>{% else %}
    <td>No Description</td>{% endif %}{% if to_parse_interface[interface].ipv4 is defined %}
    <td>{{ ip_address }}</td>
    <td>{{ to_parse_interface[interface].ipv4[ip_address].origin | default("No Origin") }}</td>{% else %}
    <td>N/A</td>
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].type is defined %}
    <td>{{ to_parse_interface[interface].type }}</td>{% else %}
    <td>N/A</td>{% endif %}
    <td>{{ to_parse_interface[interface].enabled }}</td>
    <td>{{ to_parse_interface[interface].oper_status }}</td>{% if to_parse_interface[interface].phys_address is defined %}
    <td>{{ to_parse_interface[interface].phys_address }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].mac_address is defined %}
    <td>{{ to_parse_interface[interface].mac_address }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].switchport_enable is defined %}
    <td>{{ to_parse_interface[interface].switchport_enable }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].switchport_mode is defined %}
    <td>{{ to_parse_interface[interface].switchport_mode }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].access_vlan is defined %}
    <td>{{ to_parse_interface[interface].access_vlan }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].trunk_vlans is defined %}
    <td>{{ to_parse_interface[interface].trunk_vlans | replace(","," ") }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].native_vlan is defined %}
    <td>{{ to_parse_interface[interface].native_vlan }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].vrf is defined %}
    <td>{{ to_parse_interface[interface].vrf }}</td>{% else %}
    <td>N/A</td>{% endif %}
    <td>{{ to_parse_interface[interface].bandwidth }}</td>
    <td>{{ to_parse_interface[interface].mtu }}</td>
    <td>{{ to_parse_interface[interface].delay }}</td>
    <td>{{ to_parse_interface[interface].encapsulation.encapsulation }}</td>{% if to_parse_interface[interface].medium is defined %}
    <td>{{ to_parse_interface[interface].medium }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].flow_control is defined %}
    <td>{{ to_parse_interface[interface].flow_control.receive }}</td>
    <td>{{ to_parse_interface[interface].flow_control.send }}</td>{% else %}
    <td>N/A</td>
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].last_change is defined %}
    <td>{{ to_parse_interface[interface].last_change }}</td>{% else %}
    <td>N/A</td>{% endif %}
    <td>{{ interface }}</td>
    <td>{{ member }}{% if to_parse_interface[interface].counters is defined %}
    <td>{{ to_parse_interface[interface].counters.in_broadcast_pkts | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.in_crc_errors | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.in_errors }}</td>
    <td>{{ to_parse_interface[interface].counters.in_unicast_pkts | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.in_multicast_pkts | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.in_pkts | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.out_broadcast_pkts | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.out_discard | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.out_errors | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.out_unicast_pkts | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.out_multicast_pkts | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.out_pkts | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.rate.in_rate | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.rate.out_rate | default("N/A") }}</td>{% else %}
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
  </tr>{% endif %}{% endfor %}{% else %}{% if to_parse_interface[interface].port_channel.port_channel_member == "True" %}
<tr>
    <td>{{ interface }}</td>{% if to_parse_interface[interface].description is defined %}
    <td>{{ to_parse_interface[interface].description }}</td>{% else %}
    <td>No Description</td>{% endif %}{% if to_parse_interface[interface].ipv4 is defined %}
    <td>{{ ip_address }}</td>
    <td>{{ to_parse_interface[interface].ipv4[ip_address].origin | default("No Origin") }}</td>{% else %}
    <td>N/A</td>
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].type is defined %}
    <td>{{ to_parse_interface[interface].type }}</td>{% else %}
    <td>N/A</td>{% endif %}
    <td>{{ to_parse_interface[interface].enabled }}</td>
    <td>{{ to_parse_interface[interface].oper_status }}</td>{% if to_parse_interface[interface].phys_address is defined %}
    <td>{{ to_parse_interface[interface].phys_address }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].mac_address is defined %}
    <td>{{ to_parse_interface[interface].mac_address }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].switchport_enable is defined %}
    <td>{{ to_parse_interface[interface].switchport_enable }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].switchport_mode is defined %}
    <td>{{ to_parse_interface[interface].switchport_mode }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].access_vlan is defined %}
    <td>{{ to_parse_interface[interface].access_vlan }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].trunk_vlans is defined %}
    <td>{{ to_parse_interface[interface].trunk_vlans | replace(","," ") }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].native_vlan is defined %}
    <td>{{ to_parse_interface[interface].native_vlan }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].vrf is defined %}
    <td>{{ to_parse_interface[interface].vrf }}</td>{% else %}
    <td>N/A</td>{% endif %}
    <td>{{ to_parse_interface[interface].bandwidth }}</td>
    <td>{{ to_parse_interface[interface].mtu }}</td>
    <td>{{ to_parse_interface[interface].delay }}</td>
    <td>{{ to_parse_interface[interface].encapsulation.encapsulation }}</td>{% if to_parse_interface[interface].medium is defined %}
    <td>{{ to_parse_interface[interface].medium }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].flow_control is defined %}
    <td>{{ to_parse_interface[interface].flow_control.receive }}</td>
    <td>{{ to_parse_interface[interface].flow_control.send }}</td>{% else %}
    <td>N/A</td>
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].last_change is defined %}
    <td>{{ to_parse_interface[interface].last_change }}</td>{% else %}
    <td>N/A</td>{% endif %}
    <td>{{ to_parse_interface[interface].port_channel.port_channel_int }}</td>
    <td>{{ to_parse_interface[interface].port_channel.port_channel_member }}</td>{% if to_parse_interface[interface].counters is defined %}
    <td>{{ to_parse_interface[interface].counters.in_broadcast_pkts | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.in_crc_errors | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.in_errors }}</td>
    <td>{{ to_parse_interface[interface].counters.in_unicast_pkts | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.in_multicast_pkts | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.in_pkts  | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.out_broadcast_pkts| default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.out_discard | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.out_errors | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.out_unicast_pkts | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.out_multicast_pkts | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.out_pkts | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.rate.in_rate | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.rate.out_rate | default("N/A") }}</td>{% else %}
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
  </tr>{% endif %}{% else %}
<tr>
    <td>{{ interface }}</td>{% if to_parse_interface[interface].description is defined %}
    <td>{{ to_parse_interface[interface].description }}</td>{% else %}
    <td>No Description</td>{% endif %}{% if to_parse_interface[interface].ipv4 is defined %}
    <td>{{ ip_address }}</td>
    <td>{{ to_parse_interface[interface].ipv4[ip_address].origin | default("No Origin") }}</td>{% else %}
    <td>N/A</td>
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].type is defined %}
    <td>{{ to_parse_interface[interface].type }}</td>{% else %}
    <td>N/A</td>{% endif %}
    <td>{{ to_parse_interface[interface].enabled }}</td>
    <td>{{ to_parse_interface[interface].oper_status }}</td>{% if to_parse_interface[interface].phys_address is defined %}
    <td>{{ to_parse_interface[interface].phys_address }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].mac_address is defined %}
    <td>{{ to_parse_interface[interface].mac_address }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].switchport_enable is defined %}
    <td>{{ to_parse_interface[interface].switchport_enable }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].switchport_mode is defined %}
    <td>{{ to_parse_interface[interface].switchport_mode }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].access_vlan is defined %}
    <td>{{ to_parse_interface[interface].access_vlan }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].trunk_vlans is defined %}
    <td>{{ to_parse_interface[interface].trunk_vlans | replace(","," ") }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].native_vlan is defined %}
    <td>{{ to_parse_interface[interface].native_vlan }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].vrf is defined %}
    <td>{{ to_parse_interface[interface].vrf }}</td>{% else %}
    <td>N/A</td>{% endif %}
    <td>{{ to_parse_interface[interface].bandwidth }}</td>
    <td>{{ to_parse_interface[interface].mtu }}</td>
    <td>{{ to_parse_interface[interface].delay }}</td>
    <td>{{ to_parse_interface[interface].encapsulation.encapsulation }}</td>{% if to_parse_interface[interface].medium is defined %}
    <td>{{ to_parse_interface[interface].medium }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].flow_control is defined %}
    <td>{{ to_parse_interface[interface].flow_control.receive }}</td>
    <td>{{ to_parse_interface[interface].flow_control.send }}</td>{% else %}
    <td>N/A</td>
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].last_change is defined %}
    <td>{{ to_parse_interface[interface].last_change }}</td>{% else %}
    <td>N/A</td>{% endif %}
    <td>N/A</td>
    <td>{{ to_parse_interface[interface].port_channel.port_channel_member }}</td>{% if to_parse_interface[interface].counters is defined %}
    <td>{{ to_parse_interface[interface].counters.in_broadcast_pkts | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.in_crc_errors | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.in_errors | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.in_unicast_pkts | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.in_multicast_pkts | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.in_pkts  | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.out_broadcast_pkts | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.out_discard | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.out_errors | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.out_unicast_pkts | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.out_multicast_pkts | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.out_pkts | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.rate.in_rate | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.rate.out_rate | default("N/A") }}</td>{% else %}
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
  <tr>{% endif %}{% endif %}{% endif %}{% endfor %}{% else %}{% if to_parse_interface[interface].ipv4 is defined %}
<tr>
    <td>{{ interface }}</td>{% if to_parse_interface[interface].description is defined %}
    <td>{{ to_parse_interface[interface].description }}</td>{% else %}
    <td>No Description</td>{% endif %}{% if to_parse_interface[interface].ipv4 is defined %}
    <td>{{ ip_address }}</td>
    <td>{{ to_parse_interface[interface].ipv4[ip_address].origin | default("No Origin") }}</td>{% else %}
    <td>N/A</td>
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].type is defined %}
    <td>{{ to_parse_interface[interface].type }}</td>{% else %}
    <td>N/A</td>{% endif %}
    <td>{{ to_parse_interface[interface].enabled }}</td>
    <td>{{ to_parse_interface[interface].oper_status }}</td>{% if to_parse_interface[interface].phys_address is defined %}
    <td>{{ to_parse_interface[interface].phys_address }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].mac_address is defined %}
    <td>{{ to_parse_interface[interface].mac_address }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].switchport_enable is defined %}
    <td>{{ to_parse_interface[interface].switchport_enable }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].switchport_mode is defined %}
    <td>{{ to_parse_interface[interface].switchport_mode }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].access_vlan is defined %}
    <td>{{ to_parse_interface[interface].access_vlan }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].trunk_vlans is defined %}
    <td>{{ to_parse_interface[interface].trunk_vlans | replace(","," ") }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].native_vlan is defined %}
    <td>{{ to_parse_interface[interface].native_vlan }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].vrf is defined %}
    <td>{{ to_parse_interface[interface].vrf }}</td>{% else %}
    <td>N/A</td>{% endif %}
    <td>{{ to_parse_interface[interface].bandwidth }}</td>
    <td>{{ to_parse_interface[interface].mtu }}</td>
    <td>{{ to_parse_interface[interface].delay }}</td>
    <td>{{ to_parse_interface[interface].encapsulation.encapsulation }}</td>{% if to_parse_interface[interface].medium is defined %}
    <td>{{ to_parse_interface[interface].medium }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].flow_control is defined %}
    <td>{{ to_parse_interface[interface].flow_control.receive }}</td>
    <td>{{ to_parse_interface[interface].flow_control.send }}</td>{% else %}
    <td>N/A</td>
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].last_change is defined %}
    <td>{{ to_parse_interface[interface].last_change }}</td>{% else %}
    <td>N/A</td>{% endif %}
    <td>N/A</td>
    <td>N/A</td>{% if to_parse_interface[interface].counters is defined %}
    <td>{{ to_parse_interface[interface].counters.in_broadcast_pkts | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.in_crc_errors | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.in_errors }}</td>
    <td>{{ to_parse_interface[interface].counters.in_unicast_pkts | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.in_multicast_pkts | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.in_pkts  | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.out_broadcast_pkts| default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.out_discard | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.out_errors | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.out_unicast_pkts | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.out_multicast_pkts | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.out_pkts | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.rate.in_rate | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.rate.out_rate | default("N/A") }}</td>{% else %}
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
  </tr>{% endif %}{% else %}{% if to_parse_interface[interface].port_channel is defined %}{% if to_parse_interface[interface].port_channel.port_channel_member_intfs %}{% for member in to_parse_interface[interface].port_channel.port_channel_member_intfs %}
<tr>
    <td>{{ interface }}</td>{% if to_parse_interface[interface].description is defined %}
    <td>{{ to_parse_interface[interface].description }}</td>{% else %}
    <td>No Description</td>{% endif %}
    <td>N/A</td>
    <td>N/A</td>{% if to_parse_interface[interface].type is defined %}
    <td>{{ to_parse_interface[interface].type }}</td>{% else %}
    <td>N/A</td>{% endif %}
    <td>{{ to_parse_interface[interface].enabled }}</td>
    <td>{{ to_parse_interface[interface].oper_status }}</td>{% if to_parse_interface[interface].phys_address is defined %}
    <td>{{ to_parse_interface[interface].phys_address }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].mac_address is defined %}
    <td>{{ to_parse_interface[interface].mac_address }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].switchport_enable is defined %}
    <td>{{ to_parse_interface[interface].switchport_enable }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].switchport_mode is defined %}
    <td>{{ to_parse_interface[interface].switchport_mode }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].access_vlan is defined %}
    <td>{{ to_parse_interface[interface].access_vlan }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].trunk_vlans is defined %}
    <td>{{ to_parse_interface[interface].trunk_vlans | replace(","," ") }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].native_vlan is defined %}
    <td>{{ to_parse_interface[interface].native_vlan }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].vrf is defined %}
    <td>{{ to_parse_interface[interface].vrf }}</td>{% else %}
    <td>N/A</td>{% endif %}
    <td>{{ to_parse_interface[interface].bandwidth }}</td>
    <td>{{ to_parse_interface[interface].mtu }}</td>
    <td>{{ to_parse_interface[interface].delay }}</td>
    <td>{{ to_parse_interface[interface].encapsulation.encapsulation }}</td>{% if to_parse_interface[interface].medium is defined %}
    <td>{{ to_parse_interface[interface].medium }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].flow_control is defined %}
    <td>{{ to_parse_interface[interface].flow_control.receive }}</td>
    <td>{{ to_parse_interface[interface].flow_control.send }}</td>{% else %}
    <td>N/A</td>
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].last_change is defined %}
    <td>{{ to_parse_interface[interface].last_change }}</td>{% else %}
    <td>N/A</td>{% endif %}
    <td>{{ interface }}</td>
    <td>{{ member }}{% if to_parse_interface[interface].counters is defined %}
    <td>{{ to_parse_interface[interface].counters.in_broadcast_pkts | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.in_crc_errors | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.in_errors }}</td>
    <td>{{ to_parse_interface[interface].counters.in_unicast_pkts | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.in_multicast_pkts | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.in_pkts  | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.out_broadcast_pkts| default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.out_discard | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.out_errors | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.out_unicast_pkts | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.out_multicast_pkts | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.out_pkts | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.rate.in_rate | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.rate.out_rate | default("N/A") }}</td>{% else %}
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
  </tr>{% endif %}{% endfor %}{% else %}{% if to_parse_interface[interface].port_channel.port_channel_member == "True" %}
<tr>
    <td>{{ interface }}</td>{% if to_parse_interface[interface].description is defined %}
    <td>{{ to_parse_interface[interface].description }}</td>{% else %}
    <td>No Description</td>{% endif %}
    <td>N/A</td>
    <td>N/A</td>{% if to_parse_interface[interface].type is defined %}
    <td>{{ to_parse_interface[interface].type }}{% else %}
    <td>N/A</td>{% endif %}
    <td>{{ to_parse_interface[interface].enabled }}</td>
    <td>{{ to_parse_interface[interface].oper_status }}</td>{% if to_parse_interface[interface].phys_address is defined %}
    <td>{{ to_parse_interface[interface].phys_address }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].mac_address is defined %}
    <td>{{ to_parse_interface[interface].mac_address }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].switchport_enable is defined %}
    <td>{{ to_parse_interface[interface].switchport_enable }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].switchport_mode is defined %}
    <td>{{ to_parse_interface[interface].switchport_mode }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].access_vlan is defined %}
    <td>{{ to_parse_interface[interface].access_vlan }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].trunk_vlans is defined %}
    <td>{{ to_parse_interface[interface].trunk_vlans | replace(","," ") }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].native_vlan is defined %}
    <td>{{ to_parse_interface[interface].native_vlan }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].vrf is defined %}
    <td>{{ to_parse_interface[interface].vrf }}</td>{% else %}
    <td>N/A</td>{% endif %}
    <td>{{ to_parse_interface[interface].bandwidth }}</td>
    <td>{{ to_parse_interface[interface].mtu }}</td>
    <td>{{ to_parse_interface[interface].delay }}</td>
    <td>{{ to_parse_interface[interface].encapsulation.encapsulation }}</td>{% if to_parse_interface[interface].medium is defined %}
    <td>{{ to_parse_interface[interface].medium }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].flow_control is defined %}
    <td>{{ to_parse_interface[interface].flow_control.receive }}</td>
    <td>{{ to_parse_interface[interface].flow_control.send }}</td>{% else %}
    <td>N/A</td>
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].last_change is defined %}
    <td>{{ to_parse_interface[interface].last_change }}</td>{% else %}
    <td>N/A</td>{% endif %}
    <td>{{ to_parse_interface[interface].port_channel.port_channel_int }}</td>
    <td>{{ to_parse_interface[interface].port_channel.port_channel_member }}</td>{% if to_parse_interface[interface].counters is defined %}
    <td>{{ to_parse_interface[interface].counters.in_broadcast_pkts | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.in_crc_errors | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.in_errors }}</td>
    <td>{{ to_parse_interface[interface].counters.in_unicast_pkts | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.in_multicast_pkts | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.in_pkts  | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.out_broadcast_pkts| default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.out_discard | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.out_errors | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.out_unicast_pkts | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.out_multicast_pkts | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.out_pkts | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.rate.in_rate | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.rate.out_rate | default("N/A") }}</td>{% else %}
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
  </tr>{% endif %}{% else %}
<tr>
    <td>{{ interface }}</td>{% if to_parse_interface[interface].description is defined %}
    <td>{{ to_parse_interface[interface].description }}</td>{% else %}
    <td>No Description</td>{% endif %}
    <td>N/A</td>
    <td>N/A</td>{% if to_parse_interface[interface].type is defined %}
    <td>{{ to_parse_interface[interface].type }}</td>{% else %}
    <td>N/A</td>{% endif %}
    <td>{{ to_parse_interface[interface].enabled }}</td>
    <td>{{ to_parse_interface[interface].oper_status }}</td>{% if to_parse_interface[interface].phys_address is defined %}
    <td>{{ to_parse_interface[interface].phys_address }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].mac_address is defined %}
    <td>{{ to_parse_interface[interface].mac_address }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].switchport_enable is defined %}
    <td>{{ to_parse_interface[interface].switchport_enable }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].switchport_mode is defined %}
    <td>{{ to_parse_interface[interface].switchport_mode }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].access_vlan is defined %}
    <td>{{ to_parse_interface[interface].access_vlan }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].trunk_vlans is defined %}
    <td>{{ to_parse_interface[interface].trunk_vlans | replace(","," ") }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].native_vlan is defined %}
    <td>{{ to_parse_interface[interface].native_vlan }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].vrf is defined %}
    <td>{{ to_parse_interface[interface].vrf }}</td>{% else %}
    <td>N/A</td>{% endif %}
    <td>{{ to_parse_interface[interface].bandwidth }}</td>
    <td>{{ to_parse_interface[interface].mtu }}</td>
    <td>{{ to_parse_interface[interface].delay }}</td>
    <td>{{ to_parse_interface[interface].encapsulation.encapsulation }}</td>{% if to_parse_interface[interface].medium is defined %}
    <td>{{ to_parse_interface[interface].medium }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].flow_control is defined %}
    <td>{{ to_parse_interface[interface].flow_control.receive }}</td>
    <td>{{ to_parse_interface[interface].flow_control.send }}</td>{% else %}
    <td>N/A</td>
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].last_change is defined %}
    <td>{{ to_parse_interface[interface].last_change }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].port_channel.port_channel_member == "True" %}
    <td>{{ interface }}</td>{% else %}
    <td>N/A</td>{% endif %}
    <td>{{ to_parse_interface[interface].port_channel.port_channel_member }}</td>{% if to_parse_interface[interface].counters is defined %}
    <td>{{ to_parse_interface[interface].counters.in_broadcast_pkts | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.in_crc_errors | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.in_errors }}</td>
    <td>{{ to_parse_interface[interface].counters.in_unicast_pkts | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.in_multicast_pkts | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.in_pkts  | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.out_broadcast_pkts| default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.out_discard | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.out_errors | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.out_unicast_pkts | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.out_multicast_pkts | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.out_pkts | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.rate.in_rate | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.rate.out_rate | default("N/A") }}</td>{% else %}
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
  </tr>{% endif %}{% endif %}{% endif %}{% else %}
<tr>
    <td>{{ interface }}</td>{% if to_parse_interface[interface].description is defined %}
    <td>{{ to_parse_interface[interface].description }}</td>{% else %}
    <td>No Description</td>{% endif %}
    <td>N/A</td>
    <td>N/A</td>{% if to_parse_interface[interface].type is defined %}
    <td>{{ to_parse_interface[interface].type }}</td>{% else %}
    <td>N/A</td>{% endif %}
    <td>{{ to_parse_interface[interface].enabled }}</td>
    <td>{{ to_parse_interface[interface].oper_status }}</td>{% if to_parse_interface[interface].phys_address is defined %}
    <td>{{ to_parse_interface[interface].phys_address }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].mac_address is defined %}
    <td>{{ to_parse_interface[interface].mac_address }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].switchport_enable is defined %}
    <td>{{ to_parse_interface[interface].switchport_enable }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].switchport_mode is defined %}
    <td>{{ to_parse_interface[interface].switchport_mode }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].access_vlan is defined %}
    <td>{{ to_parse_interface[interface].access_vlan }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].trunk_vlans is defined %}
    <td>{{ to_parse_interface[interface].trunk_vlans | replace(","," ") }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].native_vlan is defined %}
    <td>{{ to_parse_interface[interface].native_vlan }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].vrf is defined %}
    <td>{{ to_parse_interface[interface].vrf }}</td>{% else %}
    <td>N/A</td>{% endif %}
    <td>{{ to_parse_interface[interface].bandwidth }}</td>
    <td>{{ to_parse_interface[interface].mtu }}</td>
    <td>{{ to_parse_interface[interface].delay }}</td>
    <td>{{ to_parse_interface[interface].encapsulation.encapsulation }}</td>{% if to_parse_interface[interface].medium is defined %}
    <td>{{ to_parse_interface[interface].medium }}</td>{% else %}
    <td>N/A</td>{% endif %}{% if to_parse_interface[interface].flow_control is defined %}
    <td>{{ to_parse_interface[interface].flow_control.receive }}</td>
    <td>{{ to_parse_interface[interface].flow_control.send }}</td>{% else %}
    <td>N/A</td>
    <td>N/A</td>{% endif %}
    <td>N/A</td>
    <td>N/A</td>{% if to_parse_interface[interface].last_change is defined %}
    <td>{{ to_parse_interface[interface].last_change }}</td>{% else %}
    <td>N/A</td>{% endif %}
    <td>{{ to_parse_interface[interface].port_channel.port_channel_int }}</td>
    <td>{{ to_parse_interface[interface].port_channel.port_channel_member }}</td>{% if to_parse_interface[interface].counters is defined %}
    <td>{{ to_parse_interface[interface].counters.in_broadcast_pkts | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.in_crc_errors | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.in_errors }}</td>
    <td>{{ to_parse_interface[interface].counters.in_unicast_pkts | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.in_multicast_pkts | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.in_pkts  | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.out_broadcast_pkts| default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.out_discard | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.out_errors | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.out_unicast_pkts | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.out_multicast_pkts | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.out_pkts | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.rate.in_rate | default("N/A") }}</td>
    <td>{{ to_parse_interface[interface].counters.rate.out_rate | default("N/A") }}</td>{% else %}
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
    <td>N/A</td>
  </tr>{% endif %}{% endif %}{% endif %}{% endif %}{% endfor %}
  </tbody>
</table>
<script type = "text/javascript">
  $(document).ready(function(){
    $('#interface thead tr')
    .clone(true)
    .addClass('filters')
    .appendTo('#interface thead');

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

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

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

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

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

                        $(this)
                            .focus()[0]
                            .setSelectionRange(cursorPosition, cursorPosition);
                    });
            });
    },
});
});        
</script>
</body></html>{% else %}
# Learn Interface
{%- for interface in to_parse_interface %}
## Interface: {{ interface }}
### Description: {{ to_parse_interface[interface].description | default("No Description")}}
{%-     if (to_parse_interface[interface].ipv4 is defined) %}
{%-         for ip_address in to_parse_interface[interface].ipv4 %}
### IP
#### Address: {{ ip_address}}
#### Origin: {{ to_parse_interface[interface].ipv4[ip_address].origin | default("No Origin") }}
{%-         endfor %}
{%-     endif %}
### Type: {{ to_parse_interface[interface].type | default("No Type")}}
### Enabled: {{ to_parse_interface[interface].enabled }}
### Operational Status: {{ to_parse_interface[interface].oper_status }}
### Addresses 
#### Physical: {{ to_parse_interface[interface].phys_address }}
#### MAC: {{ to_parse_interface[interface].mac_address }}
### Switchport 
#### Enabled: {{ to_parse_interface[interface].switchport_enable }}
#### Mode: {{ to_parse_interface[interface].switchport_mode }}
### VLANs
#### Access: {{ to_parse_interface[interface].access_vlan }}
#### Trunk: {{ to_parse_interface[interface].trunk_vlans }}
#### Native: {{ to_parse_interface[interface].native_vlan }}
### VRF: {{ to_parse_interface[interface].vrf }}
### Bandwidth: {{ to_parse_interface[interface].bandwidth }}
### MTU: {{ to_parse_interface[interface].mtu }}
### Delay: {{ to_parse_interface[interface].delay }}
### Encapsulation: {{ to_parse_interface[interface].encapsulation.encapsulation }}
### Medium: {{ to_parse_interface[interface].medium }}
{%- if to_parse_interface[interface].flow_control is defined %}
### Flow Control
#### Control Receive: {{ to_parse_interface[interface].flow_control.receive }}
#### Control Send: {{ to_parse_interface[interface].flow_control.send }}
{%- endif %}
### Last Change: {{ to_parse_interface[interface].last_change }}
{%- if to_parse_interface[interface].port_channel is defined %}
### Port Channel
#### Port Channel: {{ interface }}
{%-     if to_parse_interface[interface].port_channel.port_channel_member_intfs %}
{%-         for member in to_parse_interface[interface].port_channel.port_channel_member_intfs %}
#### Port Channel Member: {{ member }}
{%-         endfor %}
{%-     endif %}
{%- endif %}
### Input
#### Broadcast: {{ to_parse_interface[interface].counters.in_broadcast_pkts | default("N/A") }}
#### CRC Errors: {{ to_parse_interface[interface].counters.in_crc_errors | default("N/A") }}
#### Errors: {{ to_parse_interface[interface].counters.in_errors }}
#### Unicast: {{ to_parse_interface[interface].counters.in_unicast_pkts | default("N/A") }}
#### Multicast: {{ to_parse_interface[interface].counters.in_multicast_pkts | default("N/A") }}
#### Total: {{ to_parse_interface[interface].counters.in_pkts | default("N/A") }}
### Output
#### Broadcast: {{ to_parse_interface[interface].counters.out_broadcast_pkts | default("N/A") }}
#### Discards: {{ to_parse_interface[interface].counters.out_discard | default("N/A") }}
#### Errors: {{ to_parse_interface[interface].counters.out_errors | default("N/A") }}
#### Unicast: {{ to_parse_interface[interface].counters.out_unicast_pkts | default("N/A") }}
#### Multicast: {{ to_parse_interface[interface].counters.out_multicast_pkts | default("N/A") }}
#### Total: {{ to_parse_interface[interface].counters.out_pkts | default("N/A") }}
### Rates
#### Input: {{ to_parse_interface[interface].counters.rate.in_rate | default("N/A") }}
#### Output: {{ to_parse_interface[interface].counters.rate.out_rate | default("N/A") }}
{%- endfor %}
{% endif %}{% endif %}{% endif %}