By adding commit scripts to the commit model, the mgd validates the candidate configuration based on the JUNOS validation rule. If this configuration file passes validation, then the file becomes the current configuration.
When commit scripts are added to the standard commit model, the process becomes more complex. The mgd first passes an XML-formatted checkout configuration to a script driver. This driver handles the verification of the checkout configuration by the commit scripts. When verification is complete, the script driver returns an action XML file to the mgd for processing. The mgd processes this action XML file, updating the candidate and checkout configurations, issuing messages to the CLI, and writing information to the Syslog as required. Once the action XML file is processed, the standard JUNOS validation is handled by the mgd. Figure 5 and the accompanying flow discussion show this process.
Figure 5: Commit Model with Commit Scripts Added

In the commit script model, the software performs the following steps:
If any <change> actions are emitted by any commit scripts, the requested changes are loaded into the candidate configuration.
If any <transient-change> actions are emitted by any commit scripts, the requested changes are loaded into the checkout configuration.
Changes generated by commit scripts are not evaluated by your custom rules the first time they are committed. However, persistent changes are carried in the candidate configuration. During a subsequent commit operation, this process will ensure that the candidate configuration, including past persistent changes, conforms to your custom rules. For more information about candidate changes by commit scripts, see Using Multiple Commit Scripts.
Transient changes are never tested by and do not need to conform to commit script rules. Commit scripts evaluate the candidate configuration, and transient changes are not copied to the candidate configuration. To remove a transient change from the configuration, remove or disable the commit script, or comment out the code that causes the transient change. These concepts are summarized in Table 11.