< Home

Obtaining Device Information Through SNMP (getnext)

Interface Name

Obtaining device information through SNMP

Application Phase

Subscription and execution phases

API Prototype

result1_string, result2_next, result3_description = ops.snmp.getnext(oid)

Description

Parameter

Description

Value

oid

Indicates the OID and index of a leaf object.

The value is a string of 1 to 1047 characters. The format is leaf object OID.leaf object index

Return Value

The result1_string, result2_next, and result3_description in the API prototype indicate return values.

If the first return value is None, device information fails to be obtained. If the first return value is not None, device information is obtained successfully.

The second return value is the OID of the next node.

The third return value is the failure cause when the first return value is None.

Usage Description

This API enables you to obtain detailed information about the next object for a leaf object with the specified OID.

Example

When a subscription event is matched, you can obtain the detailed information about the next leaf object for the leaf object whose OID is 1.3.6.1.2.1.1.5 and whose index is 0.

value, next, descri_str = ops.snmp.getnext("1.3.6.1.4.1.2011.5.25.194.1.1.1.2")
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >