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 source-route statement is not included at the [edit chassis] hierarchy level.
To test the example in this chapter, perform the following steps:
- user@host> edit
- [edit]
- user@host# set system scripts commit file
source-route.xsl
- [edit]
- user@host# delete chassis source-route
When you issue the commit command, the following output appears:
[edit]
user@host# commit
[edit chassis]
warning: IP source-route processing is not enabled.
commit complete
To display the Extensible Markup Language (XML) 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 chassis]
</edit-path>
<message>
IP source-route processing is not enabled.
</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-14 14:40:29 PDT: reading commit script configuration
2005-06-14 14:40:29 PDT: testing commit script configuration
2005-06-14 14:40:29 PDT: opening commit script '/var/db/scripts/commit/source-route-warning.xsl'
2005-06-14 14:40:29 PDT: reading commit script 'source-route-warning.xsl'
2005-06-14 14:40:29 PDT: running commit script 'source-route-warning.xsl'
2005-06-14 14:40:29 PDT: processing commit script 'source-route-warning.xsl'
[edit chassis]
warning: IP source-route processing is not enabled.
2005-06-14 14:40:29 PDT: no errors from source-route-warning.xsl
2005-06-14 14:40:29 PDT: saving commit script changes
2005-06-14 14:40:29 PDT: summary: changes 0, transients 0 (allowed), syslog 0
2005-06-14 14:40:29 PDT: no commit script changes
2005-06-14 14:40:29 PDT: exporting juniper.conf
2005-06-14 14:40:29 PDT: expanding groups
2005-06-14 14:40:29 PDT: finished expanding groups
2005-06-14 14:40:29 PDT: setup foreign files
2005-06-14 14:40:29 PDT: propagating foreign files
2005-06-14 14:40:30 PDT: complete foreign files
2005-06-14 14:40:30 PDT: daemons checking new configuration
configuration check succeeds