ON THIS PAGE
jcs:emit-comment Template
XSLT Syntax
<junos:comment> <xsl:text>...</xsl:text> </junos:comment>
Description
Generate a comment in the configuration from within
a commit, event, or op script. The template contains a <junos:comment> element. You never call the jcs:emit-comment template directly. Rather, you include
its <junos:comment> element and the
child element <xsl:text> inside a call
to the jcs:emit-change template, a <change> element, or a <transient-change> element.
Usage Examples
The following example demonstrates how to call this template in a commit script:
<xsl:call-template name="jcs:emit-change"> <xsl:with-param name="content"> <term> <name>very-last</name> <junos:comment> <xsl:text>This term was added by a commit script</xsl:text> </junos:comment> <then> <accept/> </then> </term> </xsl:with-param> </xsl:call-template>
When you issue the show firewall configuration mode
command, the following output appears:
[edit]
user@host# show firewall
family inet {
term very-last {
/* This term was added by a commit script */
then accept;
}
}