[j-nsp] BGP Peer formatting

Ben Dale bdale at comlinx.com.au
Mon Sep 22 18:17:26 EDT 2014

On 23 Sep 2014, at 5:57 am, Eugeniu Patrascu <eugen at imacandi.net<mailto:eugen at imacandi.net>> wrote:

On Mon, Sep 22, 2014 at 4:24 PM, Phil Shafer <phil at juniper.net<mailto:phil at juniper.net>> wrote:
Ben Dale writes:
>> https://github.com/dfex/DFEXjunoscripts/blob/master/show-bgp-neat.slax

Very cool!

>Hey Phil, when can we have git native in Junos?!  ; )

How about:

op url https://raw.githubusercontent.com/dfex/DFEXjunoscripts/master/show-bgp-neat.slax

--- JUNOS 12.1X44-D35.5 built 2014-05-19 22:11:33 UTC

> op url https://raw.githubusercontent.com/dfex/DFEXjunoscripts/master/show-bgp-neat.slax

error: ^

error: /var/tmp/tmp_opzhxmSf/...transferring.file.........DdJl9A/show-bgp-neat.slax:35: error: /var/tmp/tmp_opzhxmSf/...transferring.file.........DdJl9A/show-bgp-neat.slax:34: parse error, unexpected T_BARE before 'set':


Okay, one small caveat to this script - it looks like the use of mutable variables (mvar and set) was only introduced in SLAX 1.1 / Junos 12.2, so it's actually not going to work on older versions of Junos.

I know 11.4 is the trusted choice for most people on MX at the moment, so when I get some time I'll attempt a mind-bending re-write using the older immutable var format.

Stay tuned, and thanks again for all the direct feedback!


More information about the juniper-nsp mailing list