Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

jcs:emit-comment Template

XSLT Syntax

<junos:comment>
    <xsl:text>...</xsl:text>
</junos:comment>

Description

Emit 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.

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;
    }
}

Published: 2013-03-05