232
When you define an action, you may choose to specify a value or specify a variable name for an
argument. For more information about using EAA environment variables, see "
."
Examples
# (In standalone mode.) Configure an action for the CLI-defined policy
test
to reboot the device.
<Sysname> system-view
[Sysname] rtm cli-policy test
[Sysname-rtm-test] action 3 reboot
# (In IRF mode.) Configure an action for the CLI-defined policy
test
to reboot IRF member device 1.
<Sysname> system-view
[Sysname] rtm cli-policy test
[Sysname-rtm-test] action 3 reboot chassis 1
action switchover
Use
action switchover
to add an active/standby switchover action to a monitor policy.
Use
undo action
to remove an action.
Syntax
action
number
switchover
undo action
number
Default
Monitor policies do not contain any actions.
Views
CLI-defined policy view
Predefined user roles
network-admin
mdc-admin
Parameters
number
: Specifies an action ID in the range of 0 to 231.
Usage guidelines
This command does not trigger an active/standby switchover in the following situations:
•
The device has only one MPU.
•
The standby MPU is not in up state.
You can configure a series of actions to be executed in response to the event specified in a monitor
policy.
If two actions have the same ID, the most recent one takes effect.
EAA executes the actions in ascending order of action IDs. You must make sure the execution order
is correct when you add actions to a policy.
Examples
# Configure an action for the CLI-defined policy
test
to perform an active/standby switchover.
<Sysname> system-view
[Sysname] rtm cli-policy test
[Sysname-rtm-test] action 3 switchover