Junos Space Developer
Junos Space Developer

commit script changes failed error

11.15.11   |  
‎11-15-2011 09:33 PM


I am trying to configure simple full-mesh L3 VPN. For this, I am writing XSLT to upload the configuration. Here I am facing problem to add routing-instance and community through XSLT. I am able to do other configurations such as adding protocols, policies etc. I need to generate below configuration for PE router



routing-instance {

VPN-A-Paris-Munich {

vrf-import VPN-A-import;

vrf-export VPN-A-export;


VPN-B-Madrid {

vrf-import VPN-B-import;

vrf-export VPN-B-export;




policy-statement VPN-A-export {

term a {

from protocol static;

then {

community add VPN-A;




term b {

then reject;




I am attaching the XSLT for above configuration. Please check and let me know why I am getting "commit script changes failed error" while trying to add routing-instance and community.


Junos Space Developer

Re: commit script changes failed error

11.16.11   |  
‎11-16-2011 10:15 PM

Hi Satish,


      We are on some discussion internally on this regarding the design of application assigned to TechM. I will update you on this ASAP.  







Junos Space Developer

Re: commit script changes failed error

11.16.11   |  
‎11-16-2011 11:20 PM

Hi Satish,


    You havent configured the AS target id's.  Please go through the below link which provides a sample configuration to configure full mesh L3VPN the PE.









Junos Space Developer

Re: commit script changes failed error

11.17.11   |  
‎11-17-2011 12:49 AM

Hi Vimala,


Yes the target ids are there in our main script. I had copied only the settings in previous post that do not work. Please find attached full script.  In this script, last two configuration are having problem that are below. We are testing these configuration on Juniper router having  JunosOS 10.0R3.10 version. Is there any problem with JunosOS version.?


                                    <xsl:variable name="comName" select="'VPN-A'"/>
                                    <xsl:value-of select="$comName"/>


                    <xsl:variable name="vpnName" select="'VPN-A-Paris'"/>
                    <xsl:value-of select="$vpnName"/>
                        <xsl:variable name="impName" select="'VPN-A-import'"/>
                        <xsl:value-of select="$impName"/>


Junos Space Developer

Re: commit script changes failed error

11.17.11   |  
‎11-17-2011 02:46 AM

Hi Satish,


    Below are the detailed steps.


1)      Create a XLST script and save *.xls script

2)      Do a SFTP to the router and copy the file the /var/db/scripts/commit

3)      And go enable prompt of router #set system scripts file <filename.slax>

4)      Load merge terminal

5)      Copy, paste your configuration of XLST, press enter and then ctrl+d

6)      It will load the configuration and will throws errors if you have any configuration errors.  


   Before doing this I recommend you understand the below


Commit scripts Simplify and enforce business rules to avert human errors and optimize network availability. They are not operated manually.

They are executed automatically when any configuration is committed on the device (that is when commit command is executed on the device)

        Commit Scripts are:

  • Run at commit time
  • Inspect the incoming configuration
  • Perform actions including
    • Failing the commit (self-defense)
    • Modifying the configuration (self-correcting)


They may be used to change the configuration but it is not a necessity. You can just emit a syslog on config change or just report an error etc. It depends on the use case.


Op scripts are used to Customize and streamline manual tasks . JUNOS op scripts automate network and router management and troubleshooting.. These are executed manually.

Op scripts are generally not used to make configuration changes.(  You can make the config changes if use case demands). All XML RPCs can be used in op script , so it doesn’t restrict anything.


Event scripts are for Automate reactive and proactive actions in response to network events. Event scripts initiate operational commands when triggered by an event policy. When an event policy is triggered, this policy forwards event details to the event script.



You may want to look at http://www.juniper.net/us/en/community/junos/script-automation/  (It has use cases , real examples , white papers , sample scripts as well) .