{%- if command == "dir" %}
Filename,File Size,Timestamp,Bytes Free,Bytes Total,Bytes Used,Usage
{%-     for item in data_to_template.TABLE_dir.ROW_dir %}
{{ item.fname }},{{ item.fsize }},{{ item.timestring }},N/A,N/A,N/A,N/A
{%-     endfor %}
N/A,N/A,N/A,{{ data_to_template.bytesfree }},{{ data_to_template.bytestotal }},{{ data_to_template.bytesused }},{{ data_to_template.usage }}
{%- else %}
{%- if command == "show interface"%}
Admin State,Description,Encapsulation,Ethernet Admin FEC State,Ethernet Auto Negotiate,Ethernet Babbles,Ethernet Bad Ethernet,Ethernet Bad Protocol,Ethernet Beacon,Ethernet BIA Address,Ethernet Bandwidth,Ethernet Clear Counters,Ethernet Collisions,Ethernet CRC,Ethernet Deferred,Ethernet Delay,Ethernet Dribble,Ethernet Duplex,Ethernet EEE State,Ethernet Ethertype,Ethernet Frame,Ethernet Giants,Ethernet MAC Address,Ethernet Hardware Description,Ethernet Ignored,Ethernet Input Flow Control,Ethernet Input Interface Down Drops,Ethernet Input Broadcast,Ethernet Input Bytes,Ethernet Input Discard,Ethernet Input Error,Ethernet Input Multicast,Ethernet Input Pause,Ethernet Input Packets,Ethernet Input Rate 1 Bits,Ethernet Input Rate 1 Packets,Ethernet Input Rate 1 Summary Bits,Ethernet Input Rate 1 Summary Packets,Ethernet Input Rate 2 Bits,Ethernet Input Rate 2 Packets,Ethernet Input Rate 2 Summary Bits,Ethernet Input Rate 2 Summary Packets,Ethernet Input Unicast,Ethernet IP Address,Ethernet IP Mask,Ethernet IP Prefix,Ethernet Jumbo Input Packets,Ethernet Jumbo Outpkts,Ethernet Late Collision,Ethernet Link Flapped,Ethernet Load Interval 1 RX,Ethernet Load Interval 1 TX,Ethernet Load Interval 2_RX,Ethernet Load Interval 2 TX,Ethernet Lost Carrier,Ethernet MDIX,Ethernet MTU,Ethernet No Buffer,Ethernet No Carrier,Ethernet Opereration FEC State,Ethernet Output Flow Control,Ethernet Output Broadcast,Ethernet Output Bytes,Ethernet Output Discard,Ethernet Output Error,Ethernet Output Multicast,Ethernet Output Pause,Ethernet Output Packets,Ethernet Output Rate 1 Bits,Ethernet Output Rate 1 Packets,Ethernet Output Rate 1 Summary Bits,Ethernet Output Rate 1 Summary Packets,Ethernet Output Rate 2 Bits,Ethernet Output Rate 2 Packets,Ethernet Output Rate 2 Summary Bits,Ethernet Output Rate 2 Summary Packets,Ethernet Output Unicast,Ethernet Overrun,Ethernet Reliability,Ethernet Reset Control,Ethernet Runts,Ethernet RX Load,Ethernet TX Load,Ethernet Speed,Ethernet Storm Support,Ethernet SWT Monitor,Ethernet Underrun,Ethernet Watchdog,Interface,Medium,Share State,State,Loopback Input Bytes,Loopback Input Compressed,Loopback Input Errors,Loopback Input FIFO,Loopback Input Frame,Loopback Input Multicast,Loopback Input Overrun,Loopback Input Packets,Loopback Output Bytes,Loopback Output Carriers,Loopback Output Collisions,Loopback Output Errors,Loopback Output FIFO,Loopback Output Packets,Loopback Output Underruns,VDC Level Input Average Bits,VDC Level Input Average Packets,VDC Level Input Broadcast,VDC Level Input Bytes,VDC Level Input Multicast,VDC Level Input Packets,VDC Level Input Unicast,VDC Level Output Average Bits,VDC Level Output Average Packets,VDC Level Output Broadcast,VDC Level Output Bytes,VDC Level Output Multicast,VDC Level Output Packets,VDC Level Output Unicast
{%-     for item in data_to_template.TABLE_interface.ROW_interface %}
{{ item.admin_state | default("N/A") }},{{ item.desc | default("N/A") }},{{ item.encapsulation | default("N/A") }},{{ item.eth_admin_fec_state | default("N/A") }},{{ item.eth_autoneg | default("N/A") }},{{ item.eth_babbles | default("N/A") }},{{ item.eth_bad_eth | default("N/A") }},{{ item.eth_bad_proto | default("N/A") }},{{ item.eth_beacon | default("N/A") }},{{ item.eth_bia_addr | default("N/A") }},{{ item.eth_bw | default("N/A") }},{{ item.eth_clear_counters | default("N/A") }},{{ item.eth_coll | default("N/A") }},{{ item.eth_crc | default("N/A") }},{{ item.eth_deferred | default("N/A") }},{{ item.eth_dly | default("N/A") }},{{ item.eth_dribble | default("N/A") }},{{ item.eth_duplex | default("N/A") }},{{ item.eth_eee_state | default("N/A") }},{{ item.eth_ethertype | default("N/A") }},{{ item.eth_frame | default("N/A") }},{{ item.eth_giants | default("N/A") }},{{ item.eth_hw_addr | default("N/A") }},{{ item.eth_hw_desc | default("N/A") }},{{ item.eth_ignored | default("N/A") }},{{ item.eth_in_flowctrl | default("N/A") }},{{ item.eth_in_ifdown_drops | default("N/A") }},{{ item.eth_inbcast | default("N/A") }},{{ item.eth_inbytes | default("N/A") }},{{ item.eth_indiscard | default("N/A") }},{{ item.eth_inerr | default("N/A") }},{{ item.eth_inmcast | default("N/A") }},{{ item.eth_inpause | default("N/A") }},{{ item.eth_inpkts | default("N/A") }},{{ item.eth_inrate1_bits | default("N/A") }},{{ item.eth_inrate1_pkts | default("N/A") }},{{ item.eth_inrate1_summary_bits | default("N/A") }},{{ item.eth_inrate1_summary_pkts | default("N/A") }},{{ item.eth_inrate2_bits | default("N/A") }},{{ item.eth_inrate2_pkts | default("N/A") }},{{ item.eth_inrate2_summary_bits | default("N/A") }},{{ item.eth_inrate2_summary_pkts | default("N/A") }},{{ item.eth_inucast | default("N/A") }},{{ item.eth_ip_addr | default("N/A") }},{{ item.eth_ip_mask | default("N/A") }},{{ item.eth_ip_prefix | default("N/A") }},{{ item.eth_jumbo_inpkts | default("N/A") }},{{ item.eth_jumbo_outpkts | default("N/A") }},{{ item.eth_latecoll | default("N/A") }},{{ item.eth_link_flapped | default("N/A") }},{{ item.eth_load_interval1_rx | default("N/A") }},{{ item.eth_load_interval1_tx | default("N/A") }},{{ item.eth_load_interval2_rx | default("N/A") }},{{ item.eth_load_interval2_tx | default("N/A") }},{{ item.eth_lostcarrier | default("N/A") }},{{ item.eth_mdix | default("N/A") }},{{ item.eth_mtu | default("N/A") }},{{ item.eth_nobuf | default("N/A") }},{{ item.eth_nocarrier | default("N/A") }},{{ item.eth_oper_fec_state | default("N/A") }},{{ item.eth_out_flowctrl | default("N/A") }},{{ item.eth_outbcast | default("N/A") }},{{ item.eth_outbytes | default("N/A") }},{{ item.eth_outdiscard | default("N/A") }},{{ item.eth_outerr | default("N/A") }},{{ item.eth_outmcast | default("N/A") }},{{ item.eth_outpause | default("N/A") }},{{ item.eth_outpkts | default("N/A") }},{{ item.eth_outrate1_bits | default("N/A") }},{{ item.eth_outrate1_pkts | default("N/A") }},{{ item.eth_outrate1_summary_bits | default("N/A") }},{{ item.eth_outrate1_summary_pkts | default("N/A") }},{{ item.eth_outrate2_bits | default("N/A") }},{{ item.eth_outrate2_pkts | default("N/A") }},{{ item.eth_outrate2_summary_bits | default("N/A") }},{{ item.eth_outrate2_summary_pkts | default("N/A") }},{{ item.eth_outucast | default("N/A") }},{{ item.eth_overrun | default("N/A") }},{{ item.eth_reliability | default("N/A") }},{{ item.eth_reset_cntr | default("N/A") }},{{ item.eth_runts | default("N/A") }},{{ item.eth_rxload | default("N/A") }},{{ item.eth_txload | default("N/A") }},{{ item.eth_speed | default("N/A") }},{{ item.eth_storm_supp | default("N/A") }},{{ item.eth_swt_monitor | default("N/A") }},{{ item.eth_underrun | default("N/A") }},{{ item.eth_watchdog | default("N/A") }},{{ item.interface | default("N/A") }},{{ item.medium | default("N/A") }},{{ item.share_state | default("N/A") }},{{ item.state | default("N/A") }},{{ item.loop_in_bytes | default("N/A") }},{{ item.loop_in_compressed | default("N/A") }},{{ item.loop_in_errors | default("N/A") }},{{ item.loop_in_fifo | default("N/A") }},{{ item.loop_in_frame | default("N/A") }},{{ item.loop_in_mcast | default("N/A") }},{{ item.loop_in_overrun | default("N/A") }},{{ item.loop_in_pkts | default("N/A") }},{{ item.loop_out_bytes | default("N/A") }},{{ item.loop_out_carriers | default("N/A") }},{{ item.loop_out_collisions | default("N/A") }},{{ item.loop_out_errors | default("N/A") }},{{ item.loop_out_fifo | default("N/A") }},{{ item.loop_out_pkts | default("N/A") }},{{ item.loop_out_underruns | default("N/A") }},{{ item.vdc_lvl_in_avg_bits | default("N/A") }},{{ item.vdc_lvl_in_avg_pkts | default("N/A") }},{{ item.vdc_lvl_in_bcast | default("N/A") }},{{ item.vdc_lvl_in_bytes | default("N/A") }},{{ item.vdc_lvl_in_mcast | default("N/A") }},{{ item.vdc_lvl_in_pkts | default("N/A") }},{{ item.vdc_lvl_in_ucast | default("N/A") }},{{ item.vdc_lvl_out_avg_bits | default("N/A") }},{{ item.vdc_lvl_out_avg_pkts | default("N/A") }},{{ item.vdc_lvl_out_bcast | default("N/A") }},{{ item.vdc_lvl_out_bytes | default("N/A") }},{{ item.vdc_lvl_out_mcast | default("N/A") }},{{ item.vdc_lvl_out_pkts | default("N/A") }},{{ item.vdc_lvl_out_ucast | default("N/A") }}
{%-     endfor %}
{%- else %}
{%- if command == "show inventory" %}
Name,Description,Product ID,Vendor ID,Serial Number
{%-     for item in data_to_template.TABLE_inv.ROW_inv %}
{{ item.name }},{{ item.desc }},{{ item.productid }},{{ item.vendorid }},{{ item.serialnum }}
{%-     endfor %}
{%- else %}
{%- if command == "show ip interface brief" %}
Interface Name,Administrative State,Link State,Protocol State,IOD,IP Disabled,Prefix,VRF Name Out
{%-     for item in data_to_template.TABLE_intf.ROW_intf %}
{{ item["intf-name"] }},{{ item["admin-state"] }},{{ item["link-state"] }},{{ item["proto-state"] }},{{ item["iod"] }},{{ item["ip-disabled"] }},{{ item["prefix"] }},{{ item["vrf-name-out"] }}
{%-     endfor %}
{%- else %}
{%- if command == "show system resources" %}
CPU State Idle,CPU State Kernel,CPU State User,Current Memory Status,Load Average 15 Minutes,Load Average 1 Minute,Load Average 5 Minutes,Memory Buffers,Memory Cached,Memory Usage Free,Memory Usage Total,Memory Usage Used,Processes Running,Processes Total,VM Free,VM Total
{{ data_to_template.cpu_state_idle }},{{ data_to_template.cpu_state_kernel }},{{ data_to_template.cpu_state_user }},{{ data_to_template.current_memory_status }},{{ data_to_template.load_avg_15min }},{{ data_to_template.load_avg_1min }},{{ data_to_template.load_avg_5min }},{{ data_to_template.mem_buffers }},{{ data_to_template.mem_cached }},{{ data_to_template.memory_usage_free }},{{ data_to_template.memory_usage_total }},{{ data_to_template.memory_usage_used }},{{ data_to_template.processes_running }},{{ data_to_template.processes_total }},{{ data_to_template.vm_free }},{{ data_to_template.vm_total }}
{%- else %}
{%- if command == "show version" %}
BIOS Compile Time,BIOS Version,Bootflash Size,Chassis ID,CPU Name,Hostname,Kernel Uptime,Kickstart Compile Time,Kickstart Filename,Kickstart Timestamp,Kickstart Version,Manufacturer,Memory Type,Memory,NXOS Compile Time,NXOS Filename,NXOS Timestamp,NXOS Version,Plugins,Processor Board ID,RR Reason,RR Service,RR System Version,Header
{{ data_to_template.bios_cmpl_time }},{{ data_to_template.bios_ver_str }},{{ data_to_template.bootflash_size }},{{ data_to_template.chassis_id }},{{ data_to_template.cpu_name }},{{ data_to_template.host_name }},{{ data_to_template.kern_uptm_days }} {{ data_to_template.kern_uptm_hrs }} {{ data_to_template.kern_uptm_mins }} {{ data_to_template.kern_uptm_secs }},{{ data_to_template.kick_cmpl_time }},{{ data_to_template.kick_file_name }},{{ data_to_template.kick_tmstmp }},{{ data_to_template.kickstart_ver_str }},{{ data_to_template.manufacturer | replace(","," ") }},{{ data_to_template.mem_type }},{{ data_to_template.memory }},{{ data_to_template.nxos_cmpl_time }},{{ data_to_template.nxos_file_name }},{{ data_to_template.nxos_tmstmp }},{{ data_to_template.nxos_ver_str }},{{ data_to_template.plugins | replace(","," ") }},{{ data_to_template.proc_board_id }},{{ data_to_template.rr_reason }},{{ data_to_template.rr_service }},{{ data_to_template.rr_sys_ver }},{{ data_to_template.header_str | replace("\n"," ") | replace(","," ") }}
{%- endif %}{%- endif %}{%- endif %}{%- endif %}{%- endif %}{%- endif %}