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

eSight V300R010C00SPC200, 300, and 500 Self-Service Integration Guide 10

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).
Network Resource Change Notification

Network Resource Change Notification

Subscribing to the Network Resource Change Notification

Function

This interface is used to subscribe to the network resource change notification.

URI

/rest/openapi/notification/network/nedevice

Access Method

PUT

Parameter Description

Parameter

Mandatory/Optional

Location

Value Type

Description

openid

Mandatory

Request header parameter list

String

Indicates a session ID, used for open API authorization.

NOTE:

A third-party system invokes the login interface of the security management module to obtain the value of this parameter.

systemID

Mandatory

Request entity parameter list

String

Indicates the third-party system ID.

NOTE:

The value can be an IP address of 1 to 64 characters, including digits (0-9), lowercase letters (a-z), uppercase letters (A-Z), and the following special characters: @ _ - ( ) , . ^ $ ~ ` !

openID

Mandatory

Request entity parameter list

String

Indicates the credential used by eSight to proactively connect to a third-party system. Third-party systems assign credentials and use credentials for authentication.

NOTE:

The value consists of 1 to 1024 characters, including digits (0-9), lowercase letters (a-z), uppercase letters (A-Z), and the following special characters: @ _ - ( ) , . ^ $ ~ ` !

url

Mandatory

Request entity parameter list

String

Indicates the URL to which eSight sends notification messages in POST mode.

NOTE:

For example, http://10.10.10.10:8080/device. The URL correctness must be ensured by the notification message subscriber. The IP address is specified in the Open API whitelist. The value consists of 1 to 1024 characters complying with the HTTP URL encoding specification.

dataType

Optional

Request entity parameter list

String

Indicates the value type of the data field in the notification message.

NOTE:

Currently, only the JSON value type is supported. The default value is JSON.

desc

Optional

Request entity parameter list

String

Indicates the third-party system description.

NOTE:

The default value is null, indicating that no description is provided. The value is a string of 0 to 1024 characters without any restriction.

Result

Field

Value Type

Description

code

int

Indicates the return code. The options are as follows:

  • 0: succeeded
  • Non-0: failed

data

List

The field is displayed as null.

description

String

Indicates the description of the interface invoking result.

Precautions

None.

Unsubscribing from the Network Resource Change Notification

Function

This interface is used to unsubscribe from the network resource change notification.

URI

/rest/openapi/notification/network/nedevice

Access Method

DELETE

Parameter Description

Parameter

Mandatory/Optional

Location

Value Type

Description

openid

Mandatory

Request header parameter list

String

Indicates a session ID, used for open API authorization.

NOTE:

A third-party system invokes the login interface of the security management module to obtain the value of this parameter.

systemID

Mandatory

Parameter list

string

Indicates the third-party system identifier (the value can be an IP address).

desc

Optional

Parameter list

string

Indicates the third-party system description.

Result

Field

Value Type

Description

code

int

Indicates the return code. The options are as follows:

  • 0: succeeded
  • Non-0: failed

data

List

The field is displayed as null.

description

string

Indicates the description of the interface invoking result.

Precautions

None.

Data Structure of Network Resource Change Notifications

Message Data

Field

Value Type

Description

resourceURI

String

Indicates the resource URI, which is the same as the URI of the subscribed message. It is fixed as /rest/openapi/notification/network/nedevice.

msgType

int

Indicates the message type. The options are as follows:

  • 1: created message
  • 2: deleted message
  • 3: modified message

data

List<NeDe

tailInfoExt>

Indicates the service data. A notification message contains change information of only one resource instance.

description

String

Indicates the message description.

timestamp

String

Indicates the event occurrence time, which is the Coordinated Universal Time (UTC) of the time zone of the eSight server.

The value must be in the yyyy-mm-dd hh:MM:ss format.

The following table lists the fields contained in the NeDetailInfoExt object.

Field

Value Type

Description

resChangedType

String

Indicates the network resource change type.

  • network.nedevice.add: A network device is added.
  • network.nedevice.del: A network device is deleted.
  • network.nedevice.change: A device is changed.
    NOTE:

    Device change includes the change of basic information including the device name, alias, IP address, and location.

nedn

String

Indicates the device DN.

neid

String

Indicates the device ID.

aliasname

String

Indicates the device alias.

nename

String

Indicates the device name.

necategory

String

Indicates the device category (for example, router or switch).

netypeinfo

String

Indicates the device type.

nevendorname

String

Indicates the device vendor name (device vendor ID).

neip

String

Indicates the device's IP address. Multiple IP addresses are separated by commas (,).

nemac

String

Indicates the device's MAC address.

version

String

Indicates the software version.

nepatchversion

String

Indicates the patch version.

nesysoid

String

Indicates the system object ID of the device.

nestate

String

Indicates the device status. The options are as follows:

  • 0: not detected
  • 1: online
  • 2: offline
  • 3: unknown

lastpolltime

String

Indicates the last synchronization time.

Indicates the local time of the eSight server.

The value must be in the YYYY-MM-DD hh:mm:ss format.

createtime

String

Indicates the time when the device is created.

Indicates the local time of the eSight server.

The value must be in the YYYY-MM-DD hh:mm:ss format.

timezoneid

String

Indicates the time zone of the device.

neiptypeinfo

String

Indicates the IP address type.

neIP2number

String

Indicates the number converted from the IP address.

subnet

String

Indicates the name of the subnet where devices locate. Multiple subnet names are separated by a slash (/) by default.

neGroupName

String

Indicates the group name.

neosversion

String

Indicates the software version.

necontact

String

Indicates the contact person.

neposition

String

Indicates the device location.

memo

String

Indicates remarks about the device.

maintainunit

String

Indicates the maintenance unit.

putintoactiontime

String

Indicates the put-into-use time.

Indicates the local time of the eSight server.

The value must be in the YYYY-MM-DD format.

usefullife

String

Indicates the expiry date of maintenance.

Indicates the local time of the eSight server.

The value must be in the YYYY-MM-DD format.

neruntime

String

Indicates the device startup time.

Indicates the local time of the eSight server.

The value must be in the YYYY-MM-DD hh:mm:ss format.

nedescribe

String

Indicates device description.

assetManager

String

Indicates the asset manager.

assetNumber

String

Indicates the asset number.

assetDate

String

Indicates the date at which the asset is purchased.

Indicates the local time of the eSight server.

The value must be in the YYYY-MM-DD format.

encryption

String

Indicates the encryption algorithm used to encrypt the entire data. Only AES128 is supported.

snmpVersion

int

Indicates the SNMP version. The options are as follows:

  • 0: SNMPv1
  • 1: SNMPv2c
  • 2: SNMPv3

snmpPort

int

Indicates the SNMP port number.

snmpTimeout

int

Indicates the timeout period.

The unit is second.

snmpRetries

int

Indicates the retry count.

snmpV1V2Param

SnmpV1V2Param

Indicates the SNMPv1/v2 parameters.

snmpV3Param

SnmpV3Param

Indicates the SNMPv3 parameters.

The following table lists the fields contained in the snmpV1V2Param object.

Field

Value Type

Description

readCommunity

String

Indicates the read community name.

writeCommunity

String

Indicates the write community name.

The following table lists the fields contained in the snmpV3Param object.

Field

Value Type

Description

userName

String

Indicates the user name (security name).

authenticateMode

String

Indicates the authentication protocol. The options are as follows:

  • none
  • sha
  • md5

authKey

String

Indicates the authentication key.

privacyMode

String

Indicates the encryption protocol. The options are as follows:

  • none: No encryption.
  • des: Data Encryption Standard (DES), which is a globally accepted encryption algorithm and supports a 56-bit key.
  • aes128: Advanced Encryption Standard (AES), which supports a 64-bit key.
    NOTE:

    AES is recommended for encryption because it has higher security than DES.

privacyKey

String

Indicates the encryption key.

Example

The message is sent in POST mode, and all notification data is saved in the body of the HTTP packet. Assume that the third-party system WebService provides the implementation request instance of javax.servlet.http.HttpServletRequest, the following message data can be obtained. (If other languages are used, the implementation request instance is similar.)

Invoking Method

Obtained Value

request.getParameter("resourceURI")

"/rest/openapi/notification/network/nedevice"

request.getParameter("msgType")

3

request.getParameter("data")

"[{

\"putintoactiontime\": \"null\",

\"netypeinfo": \"S5700-28C-EI\",

\"snmpPort\": 161,

\"timezoneid\": \"PRC\",

\"memo\": \"null\",

\"assetNumber\": \"null\",

\"nestate\": \"2\",

\"resChangedType\": \"network.nedevice.change\",

\"necontact\": \"null\",

\"nename\": \"auto_resource_205\",

\"version\": \"S5700-28C-EIV100R006C00\",

\"snmpV1V2Param\": {

\"readCommunity\": \"public\",

\"writeCommunity\": \"private\"

},

\"createtime\": \"1433224048349\",

\"neip\": \"10.137.61.205\",

\"subnet\": \"/\",

\"usefullife\": \"null\",

\"nevendorname\": \"Huawei\",

\"encryption\": \"AES128\",

\"nedn\": \"NE=34603119\",

\"necategory\": \"ne.category.switch\",

\"maintainunit\": \"null\",

\"nesysoid\": \"1.3.6.1.4.1.2011.2.23.140\",

\"neosversion\": \"VRP5.70 V100R006C00SPC300\",

\"neruntime\": \"1427536914073\",

\"snmpVersion\": 1,

\"nedescribe\": \"S5700-28C-EI

Huawei Versatile Routing Platform Software

VRP (R) software,Version 5.70 (S5700 V100R006C00SPC300)

Copyright (C) 2003-2011 Huawei Technologies Co., Ltd.\",

\"snmpV3Param\": \"null\",

\"neid\": \"null\",

\"lastpolltime\": \"1433224065552\",

\"snmpTimeout\": 4,

\"assetManager\": \"null\",

\"assetDate\": \"null\",

\"nemac\": \"28-6E-D4-EE-F8-74\",

\"neposition\": \"Shenzhen China11\",

\"nepatchversion\": \"null\",

\"neiptypeinfo\": \"0\",

\"neGroupName\": \"switch\",

\"aliasname\": \"auto_resource_205!\",

\"neIP2number\": \"176766413\",

\"snmpRetries\": 3

}]"

request.getParameter("description")

"modify device"

request.getParameter("timestamp")

"2015-06-03 16:29:31"

If the return value is null or -1, the actual attribute value is empty.

Translation
Download
Updated: 2019-10-30

Document ID: EDOC1100044386

Views: 15717

Downloads: 83

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