To test the output of a warning message, make sure that the candidate configuration contains the condition that elicits the warning. For this example, ensure that the family mpls statement is not included at the [edit interfaces so-fpc/pic/port unit logical-unit-number] hierarchy level.
To display the output of a warning message, issue the commit check | display xml command:
[edit]
user@host# commit check | display xml
<rpc-reply xmlns:junos="http://xml.juniper.net/junos/7.4R1/junos">
<commit-results>
<routing-engine junos:style="normal">
<name>re0</name>
<xnm:warning>
<edit-path>
[edit interfaces interface so-2/3/4 unit 0]
</edit-path>
<message>
Adding 'family mpls' to SONET interface.
</message>
</xnm:warning>
<commit-check-success/>
</routing-engine>
</commit-results>
</rpc-reply>
To display a detailed trace of commit script processing, issue the commit check | display detail command:
[edit]
user@host# commit check | display detail
2005-06-17 14:17:35 PDT: reading commit script configuration
2005-06-17 14:17:35 PDT: testing commit script configuration
2005-06-17 14:17:35 PDT: opening commit script '/var/db/scripts/commit/mpls.xsl'
2005-06-17 14:17:35 PDT: reading commit script 'mpls.xsl'
2005-06-17 14:17:35 PDT: running commit script 'mpls.xsl'
2005-06-17 14:17:35 PDT: processing commit script 'mpls.xsl'
2005-06-17 14:17:35 PDT: no errors from mpls.xsl
2005-06-17 14:17:35 PDT: saving commit script changes
2005-06-17 14:17:35 PDT: summary: changes 0, transients 0 (allowed), syslog 0
2005-06-17 14:17:35 PDT: no commit script changes
2005-06-17 14:17:35 PDT: finished loading commit script changes
2005-06-17 14:17:35 PDT: exporting juniper.conf
2005-06-17 14:17:35 PDT: expanding groups
2005-06-17 14:17:35 PDT: finished expanding groups
2005-06-17 14:17:35 PDT: setup foreign files
2005-06-17 14:17:35 PDT: propagating foreign files
2005-06-17 14:17:35 PDT: complete foreign files
2005-06-17 14:17:36 PDT: daemons checking new configuration
configuration check succeeds
To view the configuration with the persistent change, issue the show interfaces configuration mode command. If the MPLS protocol family is not enabled on one or more SONET/SDH interfaces before the script runs, something similar to the following appears after the commit script runs:
[edit]
user@host# show interfaces
... # Other configured interface types ...
so-2/3/4 {
unit 0 {
family mpls; # Added by persistent change
}
}
... # Other configured interface types ...