Juniper Networks J-Series manual Disabling Commit Scripts, Commit the configuration

Models: J-Series

1 332
Download 332 pages 610 b
Page 113
Image 113

Chapter 6: Automating Network Operations and Troubleshooting

Table 43: Enabling Commit Scripts

Task

J-Web Configuration Editor

Navigate to the Commit level in the

1.

In the J-Web interface, select

configuration hierarchy.

 

Configuration>View and Edit>Edit

 

 

Configuration.

 

2.

Next to System, click Configure or

 

 

Edit.

 

3.

Next to Scripts, click Configure or

 

 

Edit.

 

4.

Next to Commit, click Configure or

 

 

Edit.

Enable the commit script file—for

1.

Next to File, click Add new entry.

example, commit-script.xsl.

2.

In the File name box, type

 

 

 

commit-script.xsl.

 

3.

Click OK.

CLI Configuration Editor

From the [edit] hierarchy level, enter

edit system scripts commit

Set the script file name:

set file commit-script.xsl

Disabling Commit Scripts

If you do not want a commit script to run, you can disable it by deleting or deactivating it in the configuration. Deleting a commit script permanently removes it from the configuration. To run the script later, you must reenable the script as described in “Enabling Commit Scripts” on page 90. Deactivating a commit script disables the script until you activate it later.

To delete a commit script:

1.From configuration mode in the CLI, enter the following command:

user@host# delete system scripts commit filename.xsl

2.Commit the configuration:

user@host# commit

commit complete

To deactivate a commit script:

1.From configuration mode in the CLI, enter the following command:

user@host# deactivate system scripts commit filename.xsl

2.Commit the configuration:

user@host# commit

Defining and Enforcing Configuration Rules with Commit Scripts 91

Page 113
Image 113
Juniper Networks J-Series manual Disabling Commit Scripts, Commit the configuration, Enabling Commit Scripts