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.


Troubleshooting Guide

CloudEngine 16800, 12800, 12800E, 8800, 7800, 6800, and 5800 Series Switches

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).
How Can I Use OPS?

How Can I Use OPS?

CE series switches support Open Programmability System (OPS) from V100R003C00. OPS allows users to develop and deploy network management policies using open RESTful APIs. With the programmability, OPS implements rapid service expansion, automatic function deployment, intelligent device management, helping reduce network operation and maintenance costs and facilitate network operations.

To implement OPS, perform the following operations:
  1. Make a Python script. You can use a Python script to manage system resources through open RESTful APIs, for example, configure IP addresses for interfaces, enable, and disable interfaces.
  2. Upload the Python script to a device and install the script.
  3. Configure an assistant, and bind a trigger condition as well as the Python script to the assistant. When the trigger condition is met, the device executes the Python script.

    If the Python script is not bound to an assistant, the script can also be manually executed.

The following example describes how to implement OPS.

In Figure 22-131, the uplink of SwitchA needs to be monitored so that the SwitchA can automatically set the downlink to Down when the uplink is Down.
Figure 22-131 Networking diagram
Perform the following steps to replace the faulty switch:
  1. Create a Python script named The script enables a device to automatically set a downlink interface to Down when it detects that an uplink interface is Down.
  2. Upload the Python script to SwitchA and install the script.
    <HUAWEI> system-view
    [~HUAWEI] sysname SwitchA
    [*HUAWEI] commit
    [~SwitchA] quit
    <SwitchA> ops install file
  3. Configure an assistant on SwitchA, bind the trigger condition as an interface Down event, and configure the device to execute the Python script when the trigger condition is met.
    <SwitchA> system-view
    [~SwitchA] ops
    [~SwitchA-ops] assistant shutdownint
    [*SwitchA-ops-assistant-shutdownint] condition alarm feature ifnet name linkDown
    [*SwitchA-ops-assistant-shutdownint] execute 1 python
    [*SwitchA-ops-assistant-shutdownint] commit
Updated: 2020-01-07

Document ID: EDOC1000060766

Views: 607244

Downloads: 2948

Average rating:
This Document Applies to these Products

Related Version

Related Documents

Previous Next