-- =================================================================
-- Copyright (c) 2004-2023 New H3C Tech. Co., Ltd. All rights reserved.
--
-- Description: NETCONF mib
-- Reference:
-- Version: V1.2
-- History:
--  V1.0 Created by zhangfeng
--      Initial version 2021-07-07
--  V1.1 2022-06-14 Modified by yuantengfei
--      Added hh3cNetconfSessionLoginTime, hh3cNetconfSessionAccessType
--      and hh3cNetconfSessionUserRole to hh3cNetconfServerSessionStart.
--      Added hh3cNetconfSessionLogoutTime, hh3cNetconfSessionAccessType
--      and hh3cNetconfSessionUserRole to hh3cNetconfServerSessionEnd.
--      Added hh3cNetconfSessionLoginTime and hh3cNetconfSessionAccessType
--      to hh3cNetconfServerLoginFailure.
--      Added hh3cNetconfServerLoginFailure.
--  V1.2 2023-01-01 Modified by xiexiang
--      Added hh3cNetconfCli.
--      Added hh3cNetconfEditConfig.
--      Added hh3cNetconfEditConfigCli.
--      Added hh3cNetconfMsgDel.
--      Added hh3cNetconfThread.
--      Added hh3cNetconfAbnormalReason.
--      Added hh3cNetconfOperationResult.
-- =================================================================
HH3C-NETCONF-MIB DEFINITIONS ::= BEGIN

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

hh3cNetconf MODULE-IDENTITY
    LAST-UPDATED "202301010000Z"
    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 connection notification."
    REVISION "202301010000Z"
    DESCRIPTION
        "Added hh3cNetconfCli.
         Added hh3cNetconfEditConfig.
         Added hh3cNetconfEditConfigCli.
         Added hh3cNetconfMsgDel.
         Added hh3cNetconfThread.
         Added hh3cNetconfAbnormalReason.
         Added hh3cNetconfOperationResult"
    REVISION "202206140000Z"
    DESCRIPTION
        "Added hh3cNetconfSessionLoginTime, hh3cNetconfSessionAccessType
         and hh3cNetconfSessionUserRole to hh3cNetconfServerSessionStart.
         Added hh3cNetconfSessionLogoutTime, hh3cNetconfSessionAccessType
         and hh3cNetconfSessionUserRole to hh3cNetconfServerSessionEnd.
         Added hh3cNetconfSessionLoginTime and hh3cNetconfSessionAccessType
         to hh3cNetconfServerLoginFailure.
         Added hh3cNetconfServerLoginFailure."
    REVISION    "202107070000Z"
    DESCRIPTION    "The initial version."
    ::= { hh3cCommon 206 }

-- ==================================================================
--
-- NETCONF trap object
--
-- ==================================================================
hh3cNetconfObjects OBJECT IDENTIFIER ::= { hh3cNetconf 1 }

hh3cNetconfConnObjects OBJECT IDENTIFIER ::= { hh3cNetconfObjects 1 }

hh3cNetconfSessionId OBJECT-TYPE
    SYNTAX       Integer32(1..2147483647)
    MAX-ACCESS   accessible-for-notify
    STATUS   current
    DESCRIPTION
    "ID of a NETCONF session."
    ::= { hh3cNetconfConnObjects 1 }

hh3cNetconfSessionUserName OBJECT-TYPE
    SYNTAX       DisplayString (SIZE(1..80))
    MAX-ACCESS   accessible-for-notify
    STATUS   current
    DESCRIPTION
    "Username of the NETCONF session."
    ::= { hh3cNetconfConnObjects 2 }

hh3cNetconfSessionPeerIPAddressType OBJECT-TYPE
    SYNTAX       InetAddressType
    MAX-ACCESS   accessible-for-notify
    STATUS   current
    DESCRIPTION
    "Peer IP address type of the NETCONF session."
    ::= { hh3cNetconfConnObjects 3 }

hh3cNetconfSessionPeerIPAddress OBJECT-TYPE
    SYNTAX       InetAddress
    MAX-ACCESS   accessible-for-notify
    STATUS   current
    DESCRIPTION
    "Peer IP address of the NETCONF session."
    ::= { hh3cNetconfConnObjects 4 }

hh3cNetconfSessionTerminationReason OBJECT-TYPE
    SYNTAX              INTEGER
    {
        other               (1),
        closed              (2),
        linkDown            (3),
        idleTimeout         (4)
    }
    MAX-ACCESS   accessible-for-notify
    STATUS   current
    DESCRIPTION
    "Termination reason of the NETCONF session.
       Value other(1) represents other reason.
       Value closed(2) indicates that the session was closed.
       Value linkDown(3) indicates that the session was abnormal.
       Value idleTimeout(4) indicates that the session timed out."
    ::= { hh3cNetconfConnObjects 5 }

hh3cNetconfSessionLoginTime OBJECT-TYPE
    SYNTAX       DateAndTime
    MAX-ACCESS   accessible-for-notify
    STATUS   current
    DESCRIPTION
    "Login time of the NETCONF session.
        For example: 2021-09-14,13:30:16."
    ::= { hh3cNetconfConnObjects 6 }

hh3cNetconfSessionLogoutTime OBJECT-TYPE
    SYNTAX       DateAndTime
    MAX-ACCESS   accessible-for-notify
    STATUS   current
    DESCRIPTION
    "Logout time of the NETCONF session.
        For example: 2021-09-14,13:30:16."
    ::= { hh3cNetconfConnObjects 7 }

hh3cNetconfSessionAccessType OBJECT-TYPE
    SYNTAX       INTEGER
    {
        other           (1),
        web             (2),
        soap            (3),
        terminal        (4)
    }
    MAX-ACCESS   accessible-for-notify
    STATUS   current
    DESCRIPTION
    "Login type for the NETCONF session.
        Value other(1) represents other type.
        Value web(2) represents Web login.
        Value soap(3) represents SOAP login.
        Value terminal(4) represents terminal login."
    ::= { hh3cNetconfConnObjects 8 }

hh3cNetconfSessionUserRole OBJECT-TYPE
    SYNTAX       DisplayString (SIZE(1..80))
    MAX-ACCESS   accessible-for-notify
    STATUS   current
    DESCRIPTION
    "User role of the user established the NETCONF session.
        The user role can be single or multiple, Because the
        size of the defined user role remains unchanged, when
        there are multiple user roles, the user roles may be
        truncated."
::= { hh3cNetconfConnObjects 9 }

hh3cNetconfAbnormalReason OBJECT-TYPE
    SYNTAX       DisplayString (SIZE(1..80))
    MAX-ACCESS   accessible-for-notify
    STATUS   current
    DESCRIPTION
    "The abnormal reason of NETCONF server.
        For example: Maximum number of NETCONF threads already reached."
::= { hh3cNetconfConnObjects 10 }

hh3cNetconfOperationResult OBJECT-TYPE
    SYNTAX       DisplayString (SIZE(1..80))
    MAX-ACCESS   accessible-for-notify
    STATUS   current
    DESCRIPTION
    "The operation result of NETCONF.
        For example: Succeeded."
::= { hh3cNetconfConnObjects 11 }


hh3cNetconfTrap OBJECT IDENTIFIER ::= { hh3cNetconf 2 }

hh3cNetconfConnTrapPrefix OBJECT IDENTIFIER ::= { hh3cNetconfTrap 0 }

hh3cNetconfServerSessionStart NOTIFICATION-TYPE
    OBJECTS {
            hh3cNetconfSessionId,
            hh3cNetconfSessionUserName,
            hh3cNetconfSessionPeerIPAddressType,
            hh3cNetconfSessionPeerIPAddress,
            hh3cNetconfSessionLoginTime,
            hh3cNetconfSessionAccessType,
            hh3cNetconfSessionUserRole
        }
    STATUS  current
    DESCRIPTION
        "The NETCONF server created a session."
::= { hh3cNetconfConnTrapPrefix 1 }

hh3cNetconfServerSessionEnd NOTIFICATION-TYPE
    OBJECTS {
            hh3cNetconfSessionId,
            hh3cNetconfSessionUserName,
            hh3cNetconfSessionPeerIPAddressType,
            hh3cNetconfSessionPeerIPAddress,
            hh3cNetconfSessionTerminationReason,
            hh3cNetconfSessionLogoutTime,
            hh3cNetconfSessionAccessType,
            hh3cNetconfSessionUserRole
        }
    STATUS  current
    DESCRIPTION
        "A session created by the NETCONF server ended."
::= { hh3cNetconfConnTrapPrefix 2 }

hh3cNetconfServerLoginFailure NOTIFICATION-TYPE
    OBJECTS {
            hh3cNetconfSessionUserName,
            hh3cNetconfSessionPeerIPAddressType,
            hh3cNetconfSessionPeerIPAddress,
            hh3cNetconfSessionLoginTime,
            hh3cNetconfSessionAccessType
        }
    STATUS  current
    DESCRIPTION
        "Failure in accessing the NETCONF server through a NETCONF session."
::= { hh3cNetconfConnTrapPrefix 3 }

hh3cNetconfCli NOTIFICATION-TYPE
    OBJECTS {
            hh3cNetconfSessionId,
            hh3cNetconfSessionUserName,
            hh3cNetconfOperationResult
        }
    STATUS  current
    DESCRIPTION
        "The NETCONF operation of cli."
::= { hh3cNetconfConnTrapPrefix 4 }

hh3cNetconfEditConfig NOTIFICATION-TYPE
    OBJECTS {
            hh3cNetconfSessionId,
            hh3cNetconfSessionUserName,
            hh3cNetconfOperationResult
        }
    STATUS  current
    DESCRIPTION
        "The NETCONF operation of edit config."
::= { hh3cNetconfConnTrapPrefix 5 }

hh3cNetconfEditConfigCli NOTIFICATION-TYPE
    OBJECTS {
            hh3cNetconfSessionId,
            hh3cNetconfSessionUserName,
            hh3cNetconfOperationResult
        }
    STATUS  current
    DESCRIPTION
        "The NETCONF operation of edit config cli."
::= { hh3cNetconfConnTrapPrefix 6 }

hh3cNetconfMsgDel NOTIFICATION-TYPE
    OBJECTS {
            hh3cNetconfAbnormalReason
        }
    STATUS  current
    DESCRIPTION
        "The packet size exceeded the upper limit."
::= { hh3cNetconfConnTrapPrefix 7 }

hh3cNetconfThread NOTIFICATION-TYPE
    OBJECTS {
            hh3cNetconfAbnormalReason
        }
    STATUS  current
    DESCRIPTION
        "Maximum number of NETCONF threads already reached."
::= { hh3cNetconfConnTrapPrefix 8 }
END
