-- =================================================================
-- Copyright (c) 2004-2021 New H3C Tech. Co., Ltd. All rights reserved.
--
-- Description: ncm mib
-- Reference:
-- Version: V1.1
-- History:
--  V1.0 Created by lisheng
--      Initial version 2021-02-02
--  V1.1 2021-07-07 Modified by zhangfeng
--      add hh3cNcmTrapFeatureName to hh3cNcmNotificationVarBindings.
--      add hh3cNcmCUConfigFailed  to hh3cNcmCUConnTrapPrefix.
-- =================================================================
HH3C-NCM-MIB DEFINITIONS ::= BEGIN

IMPORTS
    MODULE-IDENTITY, OBJECT-TYPE, NOTIFICATION-TYPE,
    Integer32
        FROM SNMPv2-SMI
    DisplayString
        FROM SNMPv2-TC
    InetAddressType, InetAddress
        FROM INET-ADDRESS-MIB
    hh3cCommon
        FROM HH3C-OID-MIB;

hh3cNcm MODULE-IDENTITY
    LAST-UPDATED "202107070000Z"
    ORGANIZATION
        "New H3C Tech. Co., Ltd."
    CONTACT-INFO
        "Platform Team New H3C Tech. Co., Ltd.
        Hai-Dian District Beijing P.R. China
        http://www.h3c.com
        Zip:100085"
    DESCRIPTION
        "The MIB module is used for Netconf Client Management."
    REVISION    "202107070000Z"
    DESCRIPTION
        "add hh3cNcmTrapFeatureName to hh3cNcmNotificationVarBindings.
         add hh3cNcmCUConfigFailed  to hh3cNcmCUConnTrapPrefix."
    REVISION    "202102020000Z"
    DESCRIPTION    "The initial version."
    ::= { hh3cCommon 201 }

hh3cNcmTable OBJECT IDENTIFIER ::= { hh3cNcm 1 }

hh3cNcmConnectionTable OBJECT-TYPE
    SYNTAX        SEQUENCE OF Hh3cNcmConnectionEntry
    MAX-ACCESS    not-accessible
    STATUS        current
    DESCRIPTION
        "This table contains NCM session information."
    ::= { hh3cNcmTable 1 }

hh3cNcmConnectionEntry OBJECT-TYPE
    SYNTAX      Hh3cNcmConnectionEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "An entry of the hh3cNcmConnectionTable."
    INDEX    {
                 hh3cNcmUpId,
                 hh3cNcmSessionId
             }
    ::= { hh3cNcmConnectionTable 1 }

Hh3cNcmConnectionEntry ::= SEQUENCE
    {
        hh3cNcmUpId                   Integer32,
        hh3cNcmSessionId              Integer32,
        hh3cNcmConnName               DisplayString,
        hh3cNcmConnUserName           DisplayString,
        hh3cNcmConnSrcIpAddressType   InetAddressType,
        hh3cNcmConnSrcIpAddress       InetAddress,
        hh3cNcmConnDestIpAddressType  InetAddressType,
        hh3cNcmConnDestIpAddress      InetAddress,
        hh3cNcmConnVrf                DisplayString,
        hh3cNcmConnPort               Integer32,
        hh3cNcmSessionState           INTEGER
    }

hh3cNcmUpId   OBJECT-TYPE
    SYNTAX      Integer32(1..2147483647)
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "The first index of hh3cNcmConnectionTable, UP
        id of Connection."
    ::= { hh3cNcmConnectionEntry 1 }

hh3cNcmSessionId   OBJECT-TYPE
    SYNTAX      Integer32(1..32)
    MAX-ACCESS  not-accessible
    STATUS       current
    DESCRIPTION
        "The second index of hh3cNcmConnectionTable, Connect
        session id of hh3cNcmConnectionTable."
    ::= { hh3cNcmConnectionEntry 2 }

hh3cNcmConnName   OBJECT-TYPE
    SYNTAX      DisplayString (SIZE(1..63))
    MAX-ACCESS  read-only
    STATUS       current
    DESCRIPTION
        "Connection name of hh3cNcmConnectionTable."
    ::= { hh3cNcmConnectionEntry 3 }

hh3cNcmConnUserName   OBJECT-TYPE
    SYNTAX      DisplayString (SIZE(1..80))
    MAX-ACCESS  read-only
    STATUS       current
    DESCRIPTION
        "Connection user name of hh3cNcmConnectionTable."
    ::= { hh3cNcmConnectionEntry 4 }

hh3cNcmConnSrcIpAddressType    OBJECT-TYPE
    SYNTAX      InetAddressType
    MAX-ACCESS  read-only
    STATUS       current
    DESCRIPTION
        "Connection ip address of hh3cNcmConnectionTable."
    ::= { hh3cNcmConnectionEntry 5 }

hh3cNcmConnSrcIpAddress    OBJECT-TYPE
    SYNTAX      InetAddress
    MAX-ACCESS  read-only
    STATUS       current
    DESCRIPTION
        "Connection ip address of hh3cNcmConnectionTable."
    ::= { hh3cNcmConnectionEntry 6 }

hh3cNcmConnDestIpAddressType    OBJECT-TYPE
    SYNTAX      InetAddressType
    MAX-ACCESS  read-only
    STATUS       current
    DESCRIPTION
        "Connection ip address of hh3cNcmConnectionTable."
    ::= { hh3cNcmConnectionEntry 7 }

hh3cNcmConnDestIpAddress    OBJECT-TYPE
    SYNTAX      InetAddress
    MAX-ACCESS  read-only
    STATUS       current
    DESCRIPTION
        "Connection ip address of hh3cNcmConnectionTable."
    ::= { hh3cNcmConnectionEntry 8 }

hh3cNcmConnVrf      OBJECT-TYPE
    SYNTAX      DisplayString (SIZE(1..31))
    MAX-ACCESS  read-only
    STATUS       current
    DESCRIPTION
        "Connection vrf of hh3cNcmConnectionTable."
    ::= { hh3cNcmConnectionEntry 9 }

hh3cNcmConnPort      OBJECT-TYPE
    SYNTAX      Integer32 (1..65535)
    MAX-ACCESS  read-only
    STATUS       current
    DESCRIPTION
        "Connect port of hh3cNcmConnectionTable."
    ::= { hh3cNcmConnectionEntry 10 }

hh3cNcmSessionState   OBJECT-TYPE
    SYNTAX              INTEGER
    {
        initialed              (1),
        connected              (2)
    }
    MAX-ACCESS   read-only
    STATUS       current
    DESCRIPTION
        "Connect session state of hh3cNcmConnectionTable."
    ::= { hh3cNcmConnectionEntry 11 }

-- ==================================================================
--
-- NCM trap object
--
-- ==================================================================
hh3cNcmObjects OBJECT IDENTIFIER ::= { hh3cNcm 2 }

hh3cNcmNotificationVarBindings OBJECT IDENTIFIER
    ::= { hh3cNcmObjects 1 }

hh3cNcmTrapUpId OBJECT-TYPE
    SYNTAX       Integer32(1..2147483647)
    MAX-ACCESS   accessible-for-notify
    STATUS   current
    DESCRIPTION
    "UP id of Connection."
    ::= { hh3cNcmNotificationVarBindings 1 }

hh3cNcmTrapConnIpAndPort OBJECT-TYPE
    SYNTAX       DisplayString (SIZE(1..31))
    MAX-ACCESS   accessible-for-notify
    STATUS   current
    DESCRIPTION
    "The IP and Port.  For example 127.0.0.1:830."
    ::= { hh3cNcmNotificationVarBindings 2 }

hh3cNcmTrapConnUserName OBJECT-TYPE
    SYNTAX       DisplayString (SIZE(1..80))
    MAX-ACCESS   accessible-for-notify
    STATUS   current
    DESCRIPTION
    "The connection user name."
    ::= { hh3cNcmNotificationVarBindings 3 }

hh3cNcmTrapConnFailedReason OBJECT-TYPE
    SYNTAX       DisplayString (SIZE(1..63))
    MAX-ACCESS   accessible-for-notify
    STATUS   current
    DESCRIPTION
    "The Connection Fail Reason."
    ::= { hh3cNcmNotificationVarBindings 4 }

hh3cNcmTrapFeatureName OBJECT-TYPE
    SYNTAX       DisplayString (SIZE(1..63))
    MAX-ACCESS   accessible-for-notify
    STATUS   current
    DESCRIPTION
    "The name of module that sent the configuration request."
    ::= { hh3cNcmNotificationVarBindings 5 }

hh3cNcmTrap OBJECT IDENTIFIER ::= { hh3cNcm 3 }
hh3cNcmCUConnTrapPrefix OBJECT IDENTIFIER ::= { hh3cNcmTrap 0 }

hh3cNcmCUConnDisconnected NOTIFICATION-TYPE
    OBJECTS { hh3cNcmTrapUpId, hh3cNcmTrapConnIpAndPort, hh3cNcmTrapConnUserName, hh3cNcmTrapConnFailedReason }
    STATUS  current
    DESCRIPTION
        "The NETCONF connection with a peer device was torn down."
::= { hh3cNcmCUConnTrapPrefix 1 }

hh3cNcmCUConnReconnected NOTIFICATION-TYPE
    OBJECTS { hh3cNcmTrapUpId, hh3cNcmTrapConnIpAndPort, hh3cNcmTrapConnUserName }
    STATUS  current
    DESCRIPTION
        "The NETCONF connection with a peer device is resumed."
::= { hh3cNcmCUConnTrapPrefix 2 }

hh3cNcmCUConnectFailed NOTIFICATION-TYPE
    OBJECTS { hh3cNcmTrapUpId, hh3cNcmTrapConnIpAndPort, hh3cNcmTrapConnUserName, hh3cNcmTrapConnFailedReason }
    STATUS  current
    DESCRIPTION
        "Failed to establish a NETCONF connection with a peer device."
::= { hh3cNcmCUConnTrapPrefix 3}

hh3cNcmCUConnectSuccess NOTIFICATION-TYPE
    OBJECTS { hh3cNcmTrapUpId, hh3cNcmTrapConnIpAndPort, hh3cNcmTrapConnUserName }
    STATUS  current
    DESCRIPTION
        "Successed in establishing a NETCONF connection with a peer device."
::= { hh3cNcmCUConnTrapPrefix 4 }

hh3cNcmCUConfigFailed NOTIFICATION-TYPE
    OBJECTS { hh3cNcmTrapUpId, hh3cNcmTrapConnIpAndPort, hh3cNcmTrapConnUserName, hh3cNcmTrapFeatureName }
    STATUS  current
    DESCRIPTION
        "Failed to deliver configurations to a peer device."
::= { hh3cNcmCUConnTrapPrefix 5 }

END
