admin_execute/7—perform an action through remote execution on the Administration Server, providing Administration server credentials
The admin_execute/7 primitive performs an action through remote execution on the Administration Server, providing Administration server credentials.
admin_execute/7 syntax arguments
Argument | Mode | Type | Description |
---|---|---|---|
$NAME | input | STRING | Specifies the name of the remote execution agent (Administration Server or other external framework such as a cell or gateway) |
$USER | input | STRING | Specifies the user name of the account for the Administration server or other external framework |
$PASSWD | input | STRING | Specifies the password of the account for the Administration server or other external framework |
$OBJECT | input | STRING | Specifies the object handle for the event or data on which the action is to be performed |
$ACTION | input | STRING | Specifies the name of the remote action to be performed |
$ARGS | input | LIST_OF ANY | Specifies a list of action arguments. |
$ACTEVENT | input | BOOLEAN | YES|NO—Specifies whether or not to generate an action result event |
Use admin_execute/7 to perform an action on the Administration server or other external framework by using remote execution, specifying the user name and password for the account for the remote action agent (Administration server or other external framework).
An action is executed through the remote action agent named NAME. The USER and PASSWD credentials are used to log on to the remote action agent.
If ACTEVENT=YES, an MC_CELL_ACTION_RESULT event is generated for the action. When the action is terminated, its output is stored in the action result event.
admin_execute/7 example
{
action_requestor($USER,$PASSWD);
admin_execute(ias1,$USER,$PASSWD,$E,GetMetrics,[],YES);
}
END
In this example, the action is designed to be used from a console. When the console user triggers the action, the action code first retrieves the user's identification in the $USER variable and the user's password in the $PASSWD variable.
This information is passed on to the Administration server named ias1 to request a remote execution of the remote Administration server task GetMetrics on the selected event.
No specific arguments are required for this remote task, so the penultimate argument of admin_execute is an empty list ([]). The YES value for the last argument indicates that an MC_CELL_ACTION_RESULT event must be generated for this remote action.
perform/3 - perform a specified action
The perform/3 primitive performs a specified action.
perform/3 arguments
Argument | Mode | Type | Description |
---|---|---|---|
$OBJECT | Input | OBJECT | Specifies the object handle for the event or data on which the action is to be performed |
$ACTION | Input | STRING | Specifies the name of the action to be performed |
$ARGS | Input | LIST_OF ANY | Specifies a list of action arguments. |
Use perform/3 to perform the action defined with name specified by the $ACTION argument on the event or data with the object handle specified in the $OBJECT argument. Required arguments for the action must be provided in the $ARGS list. The success of the perform/3 call depends on whether the action succeeds or fails.
perform/3 example