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).
Saving Script Variable

Saving Script Variable

Interface Name

Saving script variable

Application Phase

Subscription and execution phases

API Prototype

result1_value, result2_description =, value)






Indicates a variable name.

The value is a string of 1 to 16 case-sensitive characters, consists of letters, digits, and underscores (_), and starts with a letter.


Indicates a variable value.

The value is an integer or a string of characters.

  • The value is a string of 1 to 1024 characters.

  • The value is an integer that ranges from -2147483648 to 2147483647.

Return Value

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.

Usage Description

A maximum of 100 script variables can be saved to the device. If two same variable names are configured, only the latter variable value will take effect.

The saving script variable API and restoring script variable API are used together to transmit script variables between contexts.


Read user input from a terminal, and use the script variable input1 to save the user input.

value1, descri_str1 =, timeout=30, vty=None)
value2, descri_str2 ="input1", value1)
Updated: 2019-04-20

Document ID: EDOC1100065674

Views: 76245

Downloads: 513

Average rating:
This Document Applies to these Products

Related Version

Related Documents

Previous Next