[j-nsp] CLI/OP Script Interaction

Judah Scott judah.scott.iam at gmail.com
Fri Oct 23 13:51:20 EDT 2009

Thanks Phil.  Both responses are very helpful.  Just a quick clarification

"Long answer: Commit scripts can emit both normal changes and
"transient" changes, and an op script can make data (say by defining
an apply-macro) that will trigger an op script to make transient
changes, but an op script cannot do these itself."

What is a transient change?  Is this one that goes straight into the
"running config" (almost like running a partial commit or bypassing commit
stage entirely).  Also do you mean an op script can trigger a commit-script
to make transient changes? (It looks like the second "op script" was meant
to say "commit-script."

-J Scott

On Thu, Oct 22, 2009 at 6:57 PM, Phil Shafer <phil at juniper.net> wrote:

> Nilesh Khambal writes:
> >It is generally not a good practice to perform configuration
> >changes/commits using OP scripts.
> Op scripts can build config from command line arguments, user
> answers to interactive questions, operational state, or any
> combination of the above.  This means you can get scripts like:
> user at cli> op tunnel
> Enter remote endpoint address [ipaddr]:
> [opening connection to ... ]
> [connected]
> remote endpoint rdu is a m7i running 9.5R1 (S/N A6789)
>   Choose Style of tunnel [gre,ipsec]: gre
>      Enter Local Endpoint Address:
>      Enter Remote Endpoint Address:
>      Configure Numbered link? (default: no) [yes/no]: yes
>         Enter Link Prefix:
>      Entering data for Local Interface:
>         Available tunnel interfaces:
>            gr-1/2/0  (3 tunnel(s) configured)
>               gr-1/2/0.0: (Link from dent to rdu)
>               gr-1/2/0.1: (Link from dent to rdu)
>               gr-1/2/0.2: (Link from dent to rdu)
>         Enter Tunnel interface (default: gr-1/2/0.3):
>      Entering data for Remote Interface:
>         Available tunnel interfaces:
>            gr-1/2/0  (3 tunnel(s) configured)
>               gr-1/2/0.0:   ()
>               gr-1/2/0.1: (Link from rdu to dent)
>               gr-1/2/0.2: (Link from rdu to dent)
>         Enter Tunnel interface (default: gr-1/2/0.3):
> Configuration:
>   Style of tunnel:                     GRE tunnel
>      Local Endpoint Address: 
>      Remote Endpoint Address:
>      Numbered link:
>         Link Prefix:         
>      Local Interface:
>         Tunnel interface:              gr-1/2/0.3
>      Remote Interface:
>         Tunnel interface:              gr-1/2/0.3
> Is this configuration accurate? (default: no) [yes/no]: yes
> [loading local configuration ...]
> [loading remote configuration ...]
> [finished]
> user at cli>
> Thanks,
>  Phil

More information about the juniper-nsp mailing list