juniper_junos_show_chassis_hardware_pipe_json
Reference path:
ttp://platform/juniper_junos_show_chassis_hardware_pipe_json.txt
Template to parse Juniper inventory.
This template requires output of 'show inventory' command.
Template Content
<template name="juniper_junos_inventory" results="per_template">
<doc>
Template to parse Juniper inventory.
This template requires output of 'show inventory' command.
</doc>
<macro>
def transform_inventory_to_records(payload):
from ttp_templates.utils.juniper_junos_process_show_chassis_hardware_pipe_json import (
transform_inventory,
)
return transform_inventory(payload)
</macro>
<input>
commands = [
"show chassis hardware | display json"
]
platform = [
"juniper_junos", # netmiko sand scrapli
"junos", # napalm
]
</input>
<group>
{ {{ _start_ }}
{{ data | _line_ | joinmatches }}
} {{ _end_ }}
</group>
<output macro="transform_inventory_to_records"/>
</template>