H3C SR6600-X Configuration Manual page 207

Hide thumbs Also See for SR6600-X:
Table of Contents

Advertisement

The system executes the command only after it executes the policy successfully.
Figure 60 Network diagram
Configuration procedure
# Edit a Tcl script file (rtm_tcl_test.tcl, in this example) for EAA to send the message "rtm_tcl_test is
running" when a command that contains the display this string is executed.
::comware::rtm::event_register cli sync mode execute pattern display this user-role
network-admin
::comware::rtm::action syslog priority 1 facility local4 msg rtm_tcl_test is running
# Download the Tcl script file from the TFTP server at 1.2.1.1.
<Sysname> tftp 1.2.1.1 get rtm_tcl_test.tcl
# Create Tcl-defined policy test and bind it to the Tcl script file.
<Sysname> system-view
[Sysname] rtm tcl-policy test rtm_tcl_test.tcl
[Sysname] quit
Verifying the configuration
# Display information about the policy.
<Sysname> display rtm policy registered
Total number: 1
Type
Event
TCL
TCL
# Enable the information center to output log messages to the current monitoring terminal.
<Sysname> terminal monitor
# Execute the display this command. Verify that the system displays the rtm_tcl_test is running message
and a message that the policy is being successfully executed.
<Sysname> display this
#
return
<Sysname>%Jun
running
%Jun
4 15:02:30:382 2013 Sysname RTM/6/RTM_POLICY: -MDC=1; TCL policy test is running
successfully.
TimeRegistered
Aug 29 14:54:50 2013 test
4 15:02:30:354 2013 Sysname RTM/1/RTM_ACTION: -MDC=1; rtm_tcl_test is
PolicyName
193

Advertisement

Table of Contents
loading

This manual is also suitable for:

R6600

Table of Contents