Re: Load merge terminal

From: JUN (yulingnan@yahoo.com)
Date: Tue May 14 2002 - 15:14:05 EDT


Avram,

I think this is one of the ways to replace something
with another, not quite easy if I just want to paste
something from somewhere else to the current
configuration. Even with this method, it is not easy
if the policy is very long, as I will have to copy the
whole thing just to change on term. I hope we could
just cut and paste under any level, it should not be
difficult to implement, I assume.

Thanks
JUN

--- Avram Dorfman <avram@juniper.net> wrote:
> Note that there's an easy way to get the fully
> spec'd (i.e. Paste-able)
> config snip at just about any level, with just the
> content you want.
>
> Edit your way all the way down to the component you
> want (term in this
> case), and then say
>
> save terminal
>
> Like this:
>
> [edit policy-options]
> ps@r9# edit policy-statement vpn1-export term
> apply-target
>
> [edit policy-options policy-statement vpn1-export
> term apply-target]
> ps@r9# save terminal
> policy-options {
> policy-statement vpn1-export {
> replace:
> term apply-target {
> then {
> community add vpn1-target;
> accept;
> }
> }
> }
> }
> Wrote 11 lines of configuration to 'terminal'
>
> [edit policy-options policy-statement vpn1-export
> term apply-target]
> ps@r9#
>
> --------------------
>
> You can now copy from policy-options to the last },
> and paste it into a
> "load merge terminal". Note that you can also paste
> it into a "load replace
> terminal" and because of the location of the
> "replace:" tag, it will
> overwrite a term of the same name if it exists,
> rather than merge with it.
>
> Note that this policy has multiple terms, you just
> don't see them with this
> method, which is the whole point.
>
> -Avram
>
>
> On 5/8/02 1:32 PM, "JUN" <yulingnan@yahoo.com>
> wrote:
>
> > I got the error when trying to copy a term from
> one
> > policy to another:
> >
> > root@test# edit policy-statement test
> >
> > [edit policy-options policy-statement test]
> > root@test# load merge terminal
> > [Type ^D to end input]
> > term 20 {
> > thenterminal:1:(134742784) syntax error:
> term
> > reject;
> > }
> >
> >
> > I know this works if I copy the whole policy from
> the
> > top, but why can I just copy one term ??
> >
> > Thanks
> > JUN
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Health - your guide to health and wellness
> > http://health.yahoo.com
> >
> >
>

__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com



This archive was generated by hypermail 2b29 : Mon Aug 05 2002 - 10:42:35 EDT