<template name="cisco_xr_inventory" results="per_template">
<doc>
Template to parse Cisco IOS XR inventory.

This template requires output of 'show inventory' command.
</doc>

<input>
commands = [
    "show inventory"
]
platform = [
    "cisco_xr", # netmiko
    "iosxr", # napalm
    "cisco_iosxr", # scrapli
]
</input>

<group>
 Name: {{ slot | ORPHRASE }}  Descr: {{ description | ORPHRASE }}
 PID: {{ module | strip(",") }}{{ ignore(".+") }}SN: {{ serial }}
</group>

<group>
Name: {{ slot | ORPHRASE }}  Descr: {{ description | ORPHRASE }}
PID: {{ module | strip(",") }}{{ ignore(".+") }}SN: {{ serial }}
</group>

<group>
NAME: "{{ slot | ORPHRASE }}", DESCR: "{{ description | ORPHRASE }}"
PID: {{ module | strip(",") }}{{ ignore(".+") }}SN: {{ serial }}
PID: {{ module | strip(",") | let("serial", "") }}{{ ignore(".+") }}SN:
</group>

</template>