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

Reminder

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

upgrade

Configuration Guide - Device Management

S7700 and S9700 V200R013C00

This document describes the configurations of Device Management, including device status query, hardware management, CSS, SVF, PoE, OPS, OIDS, 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).
Licensing Requirements and Limitations for OPS

Licensing Requirements and Limitations for OPS

Involved Network Elements

Other network elements are not required.

Licensing Requirements

OPS is a basic feature of a switch and is not under license control.

Version Requirements

Table 6-2  Products and versions supporting OPS

Series

Product

Software Version

S7700

S7703

V200R013C00SPC500

This feature is supported only when MCUD is installed.

S7706 and S7712

V200R012C00, V200R013C00

This feature is supported only when SRUH or SRUE is installed.

S7703 PoE

Not supported

S7706 PoE

V200R013C00

This feature is supported only when SRUH or SRUE is installed.

S9700

S9703, S9706, and S9712

Not supported

NOTE:
For details about software mappings, visit Hardware Query Tool and search for the desired product model.

Feature Limitations

OPS Specifications

  • A maximum of 100 Python script assistants can be configured on a switch, and a maximum of ten events subscribed in Python scripts can be matched simultaneously.

  • A maximum of 100 user-defined environment variables are supported on a switch.

  • A maximum of 100 script variables are supported on a switch.

Precautions in Writing a Python Script

When the command line event subscription API (ops.cli.subscribe) is used:

  • If an original command of the switch is subscribed, sync is set to True, and the return value of ops_execute is set to 0, the original command of the switch is skipped, that is, the original CLI of the switch is invalid.

  • If an original command of the switch is subscribed, and sync and async_skip are set to False and True respectively, the original command of the switch is skipped, that is, the original CLI of the switch is invalid.

  • You are advised to specify the regular expression matching the command as a complete keyword or command.

    • If an incomplete command or keyword is used, and both enter and sync are set to True, the subscription event will be mismatched. For example, if the regular expression is set to display, any command that contains display will match the event and trigger the action in the function.

    • If an incomplete command or keyword is used, for example, dis, and enter, sync, and async_skip are set to True, False, and True respectively, all commands that contain dis will become invalid.

    • If an incomplete command or keyword is used, for example, display, and enter and sync are set to False and True respectively, any registered command that contains display will match the event and trigger the action in the function.

    • If an incomplete command or keyword is used, for example, display, and enter, sync, and async_skip are set to False, False, and True respectively, all registered commands that contain display will become invalid.

  • Do not specify the regular expression matching the command as a single space character.

    • When the regular expression is a single space character and the user enters only a single space, the action in the execution function cannot be triggered.

    • If the regular expression is a single space character, and enter, sync, and async_skip are set to True, True, and True respectively, the subscription event will be mismatched if you enter any command containing spaces.

    • If the regular expression is a single space character, and enter, sync, and async_skip are set to True, False, and True respectively, any command that contains spaces will be invalid.

  • If the regular expression matching the command contains a question mark (?), for example, "shutdow?", the subscription event cannot be matched if shutdow? is entered.

  • If the regular expression matching the command contains other special characters except for a question mark (?), the switch should perform conversion for special characters twice during Python script execution. Foe example, if the regular expression matching the command is "shutdown \\a", the regular expression becomes "shutdown \a" after the first conversion and becomes "shutdown a" after the second conversion. Therefore, the subscription event is matched if shutdown a is entered. You need to ensure that special characters become visible characters after the conversion is performed twice. Otherwise, the subscription event may not be matched because invisible characters cannot be entered in the CLI.

  • To prevent failures to copy or delete Python script files, ensure that the command lines subscribed using ops.cli.subscribe are different from the names of Python script files.

When a timer event subscription API (ops.timer.cron, ops.timer.relative, ops.timer.absolute, or ops.timer.countdown) is used and the timer is set improperly, for example, a short cycle is set when the ops.timer.relative API is used to set the cyclic timer.

  • If the action triggered by the timer is to restart the switch by running the reboot fast command, the switch restarts repeatedly. In this case, you can press Ctrl+B to enter the BootLoad menu when the switch is started and modify the configuration file to restore the switch.

  • If the action triggered by the timer is to restart the interface by running the restart (interface view) command, or shut down or restart the interface repeatedly by running the shutdown and undo shutdown commands, the interface cannot be used and the CPU usage of the switch increases, affecting the switch performance.

  • If the action triggered by the timer is to record logs, the logs of other service modules will be deleted as the flash memory space becomes smaller, affecting fault analysis and location.

In the Python script, if the CLI channel is opened using the ops.cli.open API, use the ops.cli.close API to close the CLI channel after commands are executed.

In OPS API, the value of a character string cannot contain \0.

Other Restrictions

  • You can configure a Python script assistant only after the Python script is installed.

  • You need to be familiar with the Python language and correctly write Python scripts.

  • Switches running V200R012 support Python 2.7.3, and switches running V200R013 support Python 2.7.15. When editing a Python script, ensure that the used Python version matches the switch software version.

Translation
Download
Updated: 2019-04-20

Document ID: EDOC1100065738

Views: 40231

Downloads: 37

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