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

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).
Trap Event Subscription

Trap Event Subscription

Interface Name

Trap event subscription

Application Phase

Subscription phase

API Prototype

result1_value, result2_description = ops.trap.subscribe(tag, moduName, trapLevel, infoAlias, trapInfo, trapOID)

Description

Parameter

Description

Value

tag

Indicates conditions.

The value is a string of 1 to 12 case-insensitive characters, consists of letters, digits, and underscores (_), and starts with a letter. The value cannot be one of the following: "", None, and, or, andnot. The value cannot contain \0.

moduName

Indicates a trap module name.

The value is a string of 0 to 31 case-sensitive characters and cannot contain \0.

trapLevel

Indicates the trap severity.

The value is an integer that ranges from 1 to 6. The default value is None, indicating that the trap severity is not matched.

infoAlias

Indicates a trap alias.

The value is a string of 0 to 31 case-sensitive characters and cannot contain \0.

trapInfo

Indicates trap information.

The value is a string of 0 to 255 case-sensitive characters and cannot contain \0.

trapOID

Indicates a trap OID.

The value is a string of 0 to 255 characters and cannot contain \0.

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

If multiple simple events are defined using the ops.trap.subscribe API in the subscription phase, but the simple events are not combined through the Multi-Condition Combination API, the Python script assistant cannot be configured.

The trap event subscription matches a specified trap.

Example

When the trap EOAM_Y1731/4/AISEXCEEDPKTNUMCLEARED:OID [1.3.6.1.4.1.2011.5.25.136.1.6.49] The number of AIS packets transmitted in one second under the maximum. is generated, the corresponding action is triggered.

value, descri_str = ops.trap.subscribe("trap", "EOAM_Y1731", 4, "AISEXCEEDPKTNUMCLEARED", "The number of AIS packets transmitted in one second under the maximum.", "1.3.6.1.4.1.2011.5.25.136.1.6.49")
Translation
Download
Updated: 2019-04-20

Document ID: EDOC1100065674

Views: 43121

Downloads: 366

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