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.


S600-E V200R013C00 Configuration Guide - Device Management

This document describes the configurations of Device Management, including device status query, hardware management, Stack, SVF, cloud-based management, PoE, OPS, energy-saving management, information center, fault management, NTP.
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).
(Optional) Configuring the User-defined Environment Variable

(Optional) Configuring the User-defined Environment Variable


An environment variable consists of a name and a value. In a Python script, you can input an environment variable name in the location where a parameter needs to be input to indicate that an environment variable value needs to be referenced. When the system is running a Python script, it replaces an environment variable name with an environment variable value. To change the value, you can directly change it on the device without having to change and install the Python script. You can define and use user-defined environment variables to simplify the configuration and improve flexibility and feasibility of the Python script.

User-define environment variables start with letters, can contain letters, digits, and _, apply to all types of events, and can be used in subscription and execution phases. The value of a user-defined environment variable can be configured using the environment command. You can create, modify, and delete user-defined variables.

For example, a user wants to subscribe to changes of OSPF routes on the network segment in the Python script, and then needs to subscribe to changes of OSPF routes on the network segment To omit the process of uninstalling the original script and installing a new script, you can define an environment variable in the subscription phase, and specify the value of the environment variable using the environment command.

If you use a user-defined environment variable in the Python script, you need to set the value of the user-defined environment variable.


  1. Run system-view

    The system view is displayed.

  2. Run ops

    The OPS view is displayed.

  3. Run environment variable-name variable-value

    The user-defined environment variable is configured.

    By default, no user-defined environment variable is configured.

    A maximum of 100 user-defined environment variables can be supported on a device.

Updated: 2019-04-20

Document ID: EDOC1100066159

Views: 25976

Downloads: 3

Average rating:
This Document Applies to these Products
Related Version
Related Documents
Previous Next