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

Common Operation Guide

CloudEngine 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).
Configuring the OPS

Configuring the 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 13-1, uplink of SwitchA needs to be monitored so that the SwitchA can automatically set the downlink to Down when the uplink is Down.
Figure 13-1  Networking diagram
Perform the following steps to replace the faulty switch:
  1. Create a Python script named shutdown.py. 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 shutdown.py
    
  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 shutdown.py
    [*SwitchA-ops-assistant-shutdownint] commit
    
Translation
Download
Updated: 2018-10-08

Document ID: EDOC1000102369

Views: 122240

Downloads: 3136

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