[Contents] [Prev] [Next] [Index] [Report an Error]

<jcs:emit-comment> Template

The <jcs:emit-comment> template emits a simple comment that indicates a change was made by a commit 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. 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;
}
    }
}

[Contents] [Prev] [Next] [Index] [Report an Error]