I don't know if -XR does this, but on Junos , | display xml or display
json.

Having some structure at least makes the scraping slightly less painful.

On Wed, Mar 19, 2025 at 5:20 PM Jakob Heitz (jheitz) via NANOG <
[email protected]> wrote:

> When I write code for a feature in IOS-XR, I invent a CLI.
>
> I’d like to know what you guys who automate using the CLI think.
> What should I keep in mind?
>
> Here’s a few things I already consider:
> For a show command that has tabular output, sometimes we spill over into
> two lines for an object. Especially once IPv6 addresses were invented.
> I invented the “wide” keyword to show commands to keep all info for one
> object to a single line. But the line length can extend to infinity.
> If column widths need to change, because something gets wider, then I will
> change the width. Example, AS number going from 2 bytes to 4 bytes.
> For non-tabular output, everything I display should have some keyword that
> the automation looks for. We try to never change those keywords. We may add
> new keywords for new information or move them, but we try to minimize those
> movements.
>
> We try REALLY HARD for idempotency. We fail rarely.
>
> Kind Regards,
> Jakob
>
> ---------- Original message ----------
> Date: Tue, 18 Mar 2025 17:56:33 -0400
> From: Tom Beecher <[email protected]>
>
> I grew up on the CLI, as many did, so I am most comfortable there. There
> have always been downsides when it comes to automation, as screen scraping
> sucks.
> _______________________________________________
> NANOG mailing list
>
> https://lists.nanog.org/archives/list/[email protected]/message/YBXI5JVZDJNKSQEW64NOXTBDPWWHFSUO/
>
_______________________________________________
NANOG mailing list 
https://lists.nanog.org/archives/list/[email protected]/message/NZTVACGE3SM7IXINB6UEY2ZKPC2J4IDK/

Reply via email to