Simple Junos Commit Script

Here is a simple junos commit script that checks if a given interface is assigned to trust zone or not. It is very basic of course but can be extended using junos automation reference documents.

Once you create this script place it under /var/db/scripts/commit/test.slax

Then enable it via cli in the configuration

junos#set system scripts commit file test.slax

You will see that if the interface ge-0/0/0.0 isn’t assigned to the trust zone you will receive the error message in <message> tag.

If you want to take a look at some more examples you can take a look at junos script library

You have a feedback?