<template name="cisco_nxos_inventory" results="per_template">
<doc>
Template to parse Cisco NX-OS inventory.

This template requires output of 'show inventory | json-pretty' command.
</doc>

<macro>
def transform_inventory_to_records(payload):
    from ttp_templates.utils.cisco_nxos_process_show_inventory_pipe_json_pretty import (
        transform_inventory,
    )

    return transform_inventory(payload)
</macro>

<input>
commands = [
    "show inventory | json-pretty"
]
platform = [
    "nxos", # NAPALM
    "cisco_nxos", # Netmiko and Scrapli
]
</input>

<group>
{ {{ _start_ }}
{{ data | _line_ | joinmatches }}
} {{ _end_ }}
</group>

<output macro="transform_inventory_to_records"/>

</template>
