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).
Opening CLI Channel

Opening CLI Channel

Interface Name

Opening CLI channel

Application Phase

Execution phase

API Prototype

result1_handle, result2_description =



Return Value

The first return value is a command line handle. The value None indicates an error, while other values indicate command line handles.

The second return value is the failure cause when the first return value is None.

Usage Description

The user level of the CLI channel opened in the script is 15.

Commands can be delivered to a device only after the CLI channel is opened in a script.

Only one CLI channel can be created in a script. If you try to create the second CLI channel, the system will display a failure message.

A VTY resource is consumed each time a CLI channel is opened. To check which VTY resources have been occupied by Assistant: Name, run the display users command. When only three or less VTY resources are available, no more CLI channels can be opened. Therefore, after the CLI channel is created and commands are executed in the script, you need to close the CLI channel in time using Closing CLI Channel API (ops.cli.close (fd)) to save VTY resources.

The first return value of the opening CLI channel API is used as the input parameter of the Executing CLI Command and Closing CLI Channel APIs. So the return value must be specified when the opening CLI channel API is used.


When a subscription event is matched, you can open the CLI channel and run related commands.

handle, descri_str =          # Open the CLI channel.
result, n11, n21 = ops.cli.execute(handle,"system-view")         # Run the system-view command to enter the system view.
result, n11, n21 = ops.cli.execute(handle,"ops")         # Run the ops command to enter the OPS view.
Updated: 2019-04-20

Document ID: EDOC1100066159

Views: 32117

Downloads: 3

Average rating:
This Document Applies to these Products

Related Version

Related Documents

Previous Next