Displaying prompt information to a terminal
Execution phase
result1_value, result2_description = ops.terminal.write(msg, vty=None)
Parameter |
Description |
Value |
---|---|---|
msg |
Indicates information displayed on a user screen. |
The value is a string of 1 to 512 case-sensitive characters. |
vty |
Indicates a user terminal. |
The value is of the enumerated type:
|
The result1_value and result2_description in the API prototype indicate return values.
The result1_value is the first return value, 0 indicates success, and 1 indicates failure.
The result2_description is the second return value, indicating the failure cause. It is returned only when the first return value is 1.
This API displays user-defined information to a device to generate prompt information.
When a subscription event is matched, alarm generated is displayed on all the terminals.
value, descri_str = ops.terminal.write("alarm generated", vty="all")