Commit Script Output
To specify the desired commit script output—including warning, error, and system log messages, persistent changes, and transient changes—the script can contain tags that appear in any order, in any number. The tags for specifying output are as follows:
<xnm:warning>—Generates a warning message.<xnm:error>—Generates an error message.<syslog><message>—Generates a system log message.<change>—Generates a persistent change to the configuration.<transient-change>—Generates a transient change to the configuration.<xsl:call-template name="jcs:emit-change">
<xsl:with-param name="content">Generates a persistent change relative to the current context node as defined by an XPath expression.
<xsl:call-template name="jcs:emit-change">
<xsl:with-param name="tag" select="'transient-change'"/>
<xsl:with-param name="content">Generates a transient change relative to the current context node as defined by an XPath expression.
Generates a warning message in conjunction with a configuration change. You can use this set of tags to generate a notification that the configuration has been changed.
For more information about the
<jcs:emit-change>template, see <jcs:emit-change> Template.The JUNOS software processes this output and performs the appropriate actions. Errors and warnings are passed back to the JUNOS command-line interface (CLI) or to a JUNOScript client application. The presence of an error automatically causes the commit operation to fail. Persistent and transient changes are loaded into the appropriate configuration database.
To test the output of error, warning, and system log messages from commit scripts, issue the
commit check | display xmlcommand:[edit]user@host#commit check | display xmlTo display a detailed trace of commit script processing, issue the
commit check | display detailcommand:[edit]user@host#commit check | display detail