{%- if filetype_loop == 0 %}Hostname,Platform,Chassis,Version,Image ID,OS,Uptime,Last Reload,Last Reload Reason,Interfaces,Total Memory,Used Memeory,Serial Number,License Type
{{ to_parse_version.hostname }},{{ to_parse_version.platform }},{{ to_parse_version.chassis }},{{ to_parse_version.version }},{{ to_parse_version.image_id }},{{ to_parse_version.os }},{{ to_parse_version.uptime | replace(","," ") }},{{ to_parse_version.system_restarted_at | replace(","," ") }},{{ to_parse_version.last_reload_reason | replace(","," ") }},{{ to_parse_version.number_of_intfs | replace(","," ") | replace("{","") | replace("}","") }},{{ to_parse_version.main_mem }},{{ to_parse_version.mem_size | replace(","," ") | replace("{","") | replace("}","") }},{{ to_parse_version.chassis_sn }},{{ to_parse_version.license_type }}
{%- else %}
{%-     if filetype_loop == 1 %}
# Show Version
| Hostname | Platform | Chassis | Version | Image ID | OS | Uptime | Last Reload | Last Reload Reason | Interfaces | Total Memory | Used Memeory | Serial Number | License Type |
| -------- | -------- | ------- | ------- | -------- | -- | ------ | ----------- | ------------------ | ---------- | ------------ | ------------ | ------------- | ------------ |
| {{ to_parse_version.hostname }} | {{ to_parse_version.platform }} | {{ to_parse_version.chassis }} | {{ to_parse_version.version }} | {{ to_parse_version.image_id }} | {{ to_parse_version.os }} | {{ to_parse_version.uptime | replace(","," ") }} | {{ to_parse_version.system_restarted_at | replace(","," ") }} | {{ to_parse_version.last_reload_reason | replace(","," ") }} | {{ to_parse_version.number_of_intfs | replace(","," ") | replace("{","") | replace("}","") }} | {{ to_parse_version.main_mem }} | {{ to_parse_version.mem_size | replace(","," ") | replace("{","") | replace("}","") }} | {{ to_parse_version.chassis_sn }} | {{ to_parse_version.license_type }} |
{%-     else %}
{%-         if filetype_loop == 2 %}
<html><body>
<h1>Show Version</h1>
<table>
  <thead>
    <tr>
      <th>Hostname</th>
      <th>Platform</th>
      <th>Chassis</th>
      <th>Version</th>
      <th>Image ID</th>
      <th>OS</th>   
      <th>Uptime</th>
      <th>Last Reload</th>
      <th>Last Reload Reason</th>
      <th>Interfaces</th>
      <th>Total Memory</th>
      <th>Used Memory</th>
      <th>Serial Number</th>
      <th>License Type</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>{{ to_parse_version.hostname }}</td>
      <td>{{ to_parse_version.platform }}</td>
      <td>{{ to_parse_version.chassis }}</td>
      <td>{{ to_parse_version.version }}</td>
      <td>{{ to_parse_version.image_id }}</td>
      <td>{{ to_parse_version.os }}</td>   
      <td>{{ to_parse_version.uptime }}</td>
      <td>{{ to_parse_version.system_restarted_at }}</td>
      <td>{{ to_parse_version.last_reload_reason }}</td>
      <td>{{ to_parse_version.number_of_intfs | replace("{","") | replace("}","") }}</td>
      <td>{{ to_parse_version.main_mem }}</td>
      <td>{{ to_parse_version.mem_size | replace("{","") | replace("}","") }}</td>
      <td>{{ to_parse_version.chassis_sn }}</td>
      <td>{{ to_parse_version.license_type }}</td>
    </tr>
  </tbody>
</table>
</body></html>
{%-         else %}
# Show Version
## {{ to_parse_version.hostname }}
### Platform: {{ to_parse_version.platform }}
### Chassis: {{ to_parse_version.chassis }}
### Version: {{ to_parse_version.version }}
### Image ID: {{ to_parse_version.image_id }}
### OS: {{ to_parse_version.os }}
### Uptime: {{ to_parse_version.uptime }}
### Last Reload
#### Time: {{ to_parse_version.system_restarted_at }}
#### Reason: {{ to_parse_version.last_reload_reason }}
### Number of Interfaces: {{ to_parse_version.number_of_intfs | replace("{","") | replace("}","") }}
### Memory
#### Main: {{ to_parse_version.main_mem }}
#### Size: {{ to_parse_version.mem_size | replace("{","") | replace("}","") }}
### Chassis Serial Number: {{ to_parse_version.chassis_sn }}
### License Type: {{ to_parse_version.license_type }}
{%-         endif %}
{%-     endif %}
{%- endif %}