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.


Configuration Guide - Device Management

S2720, S5700, and S6720 V200R013C00

This document describes the configurations of Device Management, including device status query, hardware management, Stack, SVF, cloud-based management, PoE, monitoring interface, OPS, 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).
Multi-Condition Combination

Multi-Condition Combination

Interface Name

Multi-condition combination

Application Phase

Subscription phase

API Prototype

result1_value, result2_description = ops.correlate("expression")






Indicates a combined condition expression.

The value is a string of 1 to 128 characters. It consists of the tag name, brackets, and operators (and, or, andnot). A maximum of eight tag names can be combined. Priorities of operators and and andnot are the same and are greater than that of or.

Return Value

The result1_value and result2_description in the API prototype indicate return values.

The result1_value is the first return value, 0 indicates success, and 1 indicates failure.

The result2_description is the second return value, indicating the failure cause. It is returned only when the first return value is 1.

Usage Description

Typically, only one simple event can be subscribed to and one trigger condition can be registered in the subscription phase in a Python script. Using the multi-condition combination API, you can combine multiple simple events into a complex event to describe relationships between multiple simple events. The tags of the simple events must be different.

For example, ops.correlate("((tag1 or tag2) andnot (tag3 or tag4))") indicates that the corresponding action is triggered when event tag1 or tag2 occurs but event tag3 or tag4 does not occur.

In a Python script, a maximum of eight simple events can be subscribed to and then be combined through the multi-condition combination API.


When you run the arp learning multicast disable or arp broadcast disable command, the corresponding action is triggered.

value1, descri_str1 = ops.cli.subscribe("cli1", "arp learning multicast disable", enter=True, sync=True, sync_wait=60)
value2, descri_str2 = ops.cli.subscribe("cli2", "arp broadcast disable", enter=True, sync=True, sync_wait=60)
value3, descri_str3 = ops.correlate("cli1 or cli2")
Updated: 2019-04-20

Document ID: EDOC1100065674

Views: 85308

Downloads: 523

Average rating:
This Document Applies to these Products

Related Version

Related Documents

Previous Next