networktocode / ntc-templates

TextFSM templates for parsing show commands of network devices
https://ntc-templates.readthedocs.io/
Other
1.12k stars 730 forks source link

Create cisco_xr_show_run_hostname #1825

Closed jonathondamidco closed 3 months ago

jonathondamidco commented 3 months ago

This template is required due to the inconsistency of availability of the commands show version, show version brief and show version detail or the hostnames therein with different XR versions. show run hostname is pretty straight-forward and should always return just the hostname.

jonathondamidco commented 3 months ago

You might also be asking why a textfsm template is even needed for this, since it's such a trivial thing to grab out of the CLI output. The answer is Nautobot Device Onboarding 4.0 needs textfsm to parse it out, since you can't display Cisco configs as JSON as you can with platforms like JunOS.

jmcgill298 commented 3 months ago

@jonathondamidco does XR support show hostname or admin show hostname?

jonathondamidco commented 3 months ago

@jmcgill298 Neither of those commands are available. Without it being in the output of show version, I've been looking for any other show command that displays it.

jmcgill298 commented 3 months ago

thanks @jonathondamidco