No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search


To have a better experience, please upgrade your IE browser.


Configuration Guide - Device Management

S2720, S5700, and S6720 V200R013C00

This document describes the configurations of Device Management, including device status query, hardware management, Stack, SVF, cloud-based management, PoE, monitoring interface, OPS, energy-saving management, information center, fault management, NTP, synchronous ethernet, PTP.

Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Returning Event Execution Results

Returning Event Execution Results

Interface Name

Returning event execution results

Application Phase

Execution phase of resident scripts

API Prototype

result1_value, result2_description = ops.result(status)






Indicates the user script execution result.

The value 0 indicates that the user script is executed successfully, and the value 1 indicates that the user script fails to be executed.

Return Value

The result1_value and result2_description in the API prototype indicate return values.

The first return value 0 indicates that an event is executed successfully, and the first return value 1 indicates that an event fails to be executed.

The second return value is a string of characters indicating the results.

Usage Description

This API indicates the event execution result. The value 0 indicates that an event is executed successfully, and the value 1 indicates that an event fails to be executed. If the result function is invoked for multiple times, the value returned by the first result function takes effect.


When a subscription event is matched, the device reads the content entered on a user terminal, and returns the execution result based on the content.

value, err_str = ,30, vty=None) # Read the user input from the current user terminal.
print("\r\", value)
print("\r\", err_str)
#If the user enters yes, 1 is returned. If the user enters no or other information, 0 is returned.
if value == "yes":
if value == "no":
Updated: 2019-04-20

Document ID: EDOC1100065674

Views: 85481

Downloads: 523

Average rating:
This Document Applies to these Products

Related Version

Related Documents

Previous Next