313
To execute a command in a view other than user view, you must define actions required for
accessing the target view before defining the command execution action. In addition, you must
number the actions in the order they should be executed, starting with entering system view.
For example, to shut down an interface, you must create the following actions in order:
1. Action to enter system view.
2. Action to enter interface view.
3. Action to shut down the interface.
When you define an action, you can specify a value or specify a variable name for an argument. For
more information about using EAA environment variables, see "rtm environment."
Examples
# Configure the CLI-defined policy test to shut down GigabitEthernet 1/0/1 when the policy is
triggered.
<Sysname> system-view
[Sysname] rtm cli-policy test
[Sysname-rtm-test] action 1 cli system-view
[Sysname-rtm-test] action 2 cli interface gigabitethernet 1/0/1
[Sysname-rtm-test] action 3 cli shutdown
action reboot
Use action reboot to add a reboot action to a monitor policy.
Use undo action to remove an action.
Syntax
Centralized devices in standalone mode:
action number reboot
undo action number
Distributed devices in standalone mode/centralized devices in IRF mode:
action number reboot [ slot slot-number [ subslot subslot-number ] ]
undo action number
Distributed devices in IRF mode:
action number reboot [ chassis chassis-number [ slot slot-number [ subslot subslot-number ] ] ]
undo action number
Default
Monitor policies do not contain any actions.
Views
CLI-defined policy view