[j-nsp] Multi Core on JUNOS?

Phil Shafer phil at juniper.net
Thu Oct 22 15:37:41 EDT 2015

Stepan Kucherenko writes:
>What else...oh, annotate ! It's clunky and not very easy to use.

Yes, annotate is a sore spot.  I made the grammar production:

    K_ANNOTATE annotate_target T_STRING

with the expectation that I'd be able to coerce a path into the
target, but it didn't happen.  I should have done it as:

    K_ANNOTATE T_STRING annotate_target

and then allow anything as a target, like:

    cli# annotate "Client X" interfaces ge-0/0/0.0 family inet address

but can't make that work without making a new command ("comment"?).

>I wish we could just add a comment in the end of a line instead, like 
>"set interface ge-0/0/0.0 family inet address x.x.x.x/y //client X" and 
>then see "x.x.x.x/y //client X" and the same line when asking for 
>|display set.

We generate line comments in JUNOS, so we need to discard them (and
comments before close braces) to prevent out-of-date comments from
getting loaded as real annotations.

Hmm....  I should make a M-, keybinding to copy all arguments from the
previous command so you can:

    [edit interfaces ge-0/0/0 unit 0]
    cli# set family inet address

    [edit interfaces ge-0/0/0 unit 0]
    cli# comment "Client X" [ESC-,]

and it will insert the "family inet address" from
the previous "set" command.

This is similar to the existing M-. and M-/ bindings.


More information about the juniper-nsp mailing list