-- =========================================================================
-- Copyright (c) 2004-2014 Hangzhou H3C Tech. Co., Ltd. All rights reserved.
--
-- Description:  RDDC MIB
-- Reference:  Enterprise MIB
-- Version: V1.0
-- History:
--     V1.0 Initial version 2014-01-03
-- =========================================================================
H3C-RDDC-MIB DEFINITIONS ::= BEGIN

IMPORTS
    Unsigned32, Integer32, OBJECT-TYPE, MODULE-IDENTITY, NOTIFICATION-TYPE
        FROM SNMPv2-SMI
    DisplayString
        FROM SNMPv2-TC
    ifIndex, ifDescr
        FROM IF-MIB
    h3cCommon
        FROM HUAWEI-3COM-OID-MIB;

h3cRddc MODULE-IDENTITY
    LAST-UPDATED "201401030000Z"        -- January 03, 2014 at 00:00 GMT
    ORGANIZATION
        "Hangzhou H3C Tech. Co., Ltd."
    CONTACT-INFO
        "Platform Team Hangzhou H3C Tech. Co., Ltd.
        Hai-Dian District Beijing P.R. China
        http://www.h3c.com
        Zip:100085
        "
    DESCRIPTION
         "Redundancy group is concerned with ensuring minimal disruption to
         data and control planes in case of a failover.  If one of the
         group-node in an IRF fails, the other group-node in the IRF takes over the
         function of the failed group-node with minimal service interruption.
         This module defines the objects pertaining to redundancy group(RDDC)."
    REVISION  "201401030000Z"        -- January 03, 2014 at 00:00 GMT
    DESCRIPTION "Creation Date."
    ::= { h3cCommon 151 }

h3cRddcNotifications  OBJECT IDENTIFIER ::= { h3cRddc 0 }
h3cRddcObjects        OBJECT IDENTIFIER ::= { h3cRddc 1 }

h3cRddcInfo           OBJECT IDENTIFIER ::= { h3cRddcObjects 1 }
h3cRddcTrapObjects    OBJECT IDENTIFIER ::= { h3cRddcObjects 2 }

-- ---------------------------------------------------------- --
-- The redundancy group status Table
-- ---------------------------------------------------------- --

h3cRddcTable OBJECT-TYPE
    SYNTAX SEQUENCE OF H3cRddcEntry
    MAX-ACCESS not-accessible
    STATUS current
    DESCRIPTION
        "This table describes the current status of redundancy groups."
    ::= { h3cRddcInfo 1 }

h3cRddcEntry OBJECT-TYPE
    SYNTAX H3cRddcEntry
    MAX-ACCESS not-accessible
    STATUS current
    DESCRIPTION
        "The entry of h3cRddcEntry."
    INDEX { h3cRddcGroupIdx }
    ::= { h3cRddcTable 1 }

H3cRddcEntry ::=
    SEQUENCE {
        h3cRddcGroupIdx          Unsigned32,
        h3cRddcGroupName         OCTET STRING,
        h3cRddcPreempTimeRemain  Unsigned32,
        h3cRddcPreempTimeConfig  Unsigned32,
        h3cRddcHoldTimeRemain    Unsigned32,
        h3cRddcHoldTimeConfig    Unsigned32
        }

h3cRddcGroupIdx OBJECT-TYPE
    SYNTAX Unsigned32
    MAX-ACCESS accessible-for-notify
    STATUS current
    DESCRIPTION
        "Unique identifier of this redundancy group.  0 is an invalid value."
    ::= { h3cRddcEntry 1 }

h3cRddcGroupName OBJECT-TYPE
    SYNTAX OCTET STRING (SIZE (1..16))
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION
        "Unique identifier of this redundancy group."
    ::= { h3cRddcEntry 2 }

h3cRddcPreempTimeRemain OBJECT-TYPE
    SYNTAX    Unsigned32
    UNITS     "minutes"
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION
        "The redundancy group should not switch back immediately
        when a failover is recovered.  The preempt delay timer is started
        for waiting the failover became believable.
        This object contains the current preempt delay time remained
        when a failover is recovered."
    ::= { h3cRddcEntry 3 }

h3cRddcPreempTimeConfig OBJECT-TYPE
    SYNTAX    Unsigned32
    UNITS     "minutes"
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION
        "The current preempt delay time."
    ::= { h3cRddcEntry 4 }

h3cRddcHoldTimeRemain OBJECT-TYPE
    SYNTAX    Unsigned32
    UNITS     "seconds"
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION
        "To prevent frequent switchovers of the redundancy group,
        the hold-down timer started to keeping in a state for
        a fixed time.
        This object contains the current remained hold-down time
        when a switchover or a failover recovery occurred."
    ::= { h3cRddcEntry 5 }

h3cRddcHoldTimeConfig OBJECT-TYPE
    SYNTAX    Unsigned32
    UNITS     "seconds"
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION
        "The current hold-down time."
    ::= { h3cRddcEntry 6 }

-- ---------------------------------------------------------- --
-- The redundancy group node Table
-- ---------------------------------------------------------- --

h3cRddcNodeTable OBJECT-TYPE
    SYNTAX SEQUENCE OF H3cRddcNodeEntry
    MAX-ACCESS not-accessible
    STATUS current
    DESCRIPTION
        "This table describes the current status of a redundancy group node."
    ::= { h3cRddcInfo 2 }

h3cRddcNodeEntry OBJECT-TYPE
    SYNTAX H3cRddcNodeEntry
    MAX-ACCESS not-accessible
    STATUS current
    DESCRIPTION
        "The entry of h3cRddcNodeEntry."
    INDEX { h3cRddcNodeGroupIdx,
            h3cRddcNodeId }
    ::= { h3cRddcNodeTable 1 }

H3cRddcNodeEntry ::=
    SEQUENCE {
        h3cRddcNodeGroupIdx          Unsigned32,
        h3cRddcNodeId                Unsigned32,
        h3cRddcNodeBindType          INTEGER,
        h3cRddcNodeBindInfo          Unsigned32,
        h3cRddcNodePriority          Unsigned32,
        h3cRddcNodeWeight            Integer32,
        h3cRddcNodeStatus            INTEGER
        }

h3cRddcNodeGroupIdx OBJECT-TYPE
    SYNTAX Unsigned32
    MAX-ACCESS not-accessible
    STATUS current
    DESCRIPTION
        "Unique identifier of this redundancy group.  0 is an invalid value."
    ::= { h3cRddcNodeEntry 1 }

h3cRddcNodeId OBJECT-TYPE
    SYNTAX Unsigned32
    MAX-ACCESS not-accessible
    STATUS current
    DESCRIPTION
        "Unique identifier of this redundancy group node.  0 is an invalid value."
    ::= { h3cRddcNodeEntry 2 }

h3cRddcNodeBindType OBJECT-TYPE
    SYNTAX INTEGER {
                      invalid(1),
                      chassis(2)
                   }
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION
        "The bind type of this redundancy group node.
         The current version only supports binding chassis of an IRF device."
    ::= { h3cRddcNodeEntry 3 }

h3cRddcNodeBindInfo OBJECT-TYPE
    SYNTAX Unsigned32
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION
        "The bind information of this redundancy group node.
         The current version only supports binding chassis of an IRF device.
         If the value of h3cRddcNodeBindType is invalid, the value of h3cRddcNodeBindInfo is 65535."
    ::= { h3cRddcNodeEntry 4 }

h3cRddcNodePriority OBJECT-TYPE
    SYNTAX    Unsigned32 (1..255)
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION
        "The priority of this redundancy group node.  The higher the value, the greater the priority."
    ::= { h3cRddcNodeEntry 5 }

h3cRddcNodeWeight OBJECT-TYPE
    SYNTAX    Integer32
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION
        "The current weight of this redundancy group node.  The max value is 255."
    ::= { h3cRddcNodeEntry 6 }

h3cRddcNodeStatus OBJECT-TYPE
    SYNTAX    INTEGER {
                         invalid(1),
                         master(2),
                         standby(3)
                      }
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION
        "The current status of this redundancy group node."
    ::= { h3cRddcNodeEntry 7 }

-- ---------------------------------------------------------- --
-- The redundancy group trap objects Table
-- ---------------------------------------------------------- --

h3cRddcNodeInfo OBJECT-TYPE
    SYNTAX DisplayString   (SIZE (0..255))
    MAX-ACCESS accessible-for-notify
    STATUS current
    DESCRIPTION
        "This object contains node identification information
        where the switchover occurred."
    ::= { h3cRddcTrapObjects 1 }

h3cRddcSwitchReason OBJECT-TYPE
    SYNTAX DisplayString    (SIZE (0..255))
    MAX-ACCESS accessible-for-notify
    STATUS current
    DESCRIPTION
        "This object contains the cause for switchover."
    ::= { h3cRddcTrapObjects 2 }

-- ==================================================================
--
-- ======================= trap definition begin ====================
--
-- ==================================================================
h3cRddcSwitchoverTrap NOTIFICATION-TYPE
    OBJECTS
        {
            h3cRddcGroupIdx,
            h3cRddcGroupName,
            h3cRddcNodeInfo,
            h3cRddcSwitchReason
        }
    STATUS      current
    DESCRIPTION
        "Notification to signal switchover/failover."
    ::= { h3cRddcNotifications 1 }

h3cRddcFailIfRecoverTrap NOTIFICATION-TYPE
    OBJECTS
        {
            h3cRddcGroupIdx,
            h3cRddcGroupName,
            ifIndex,
            ifDescr
        }
    STATUS      current
    DESCRIPTION
        "Notification to signal the failed interface recovered."
    ::= { h3cRddcNotifications 2 }

h3cRddcFailIfGenerateTrap NOTIFICATION-TYPE
    OBJECTS
        {
            h3cRddcGroupIdx,
            h3cRddcGroupName,
            ifIndex,
            ifDescr
        }
    STATUS      current
    DESCRIPTION
        "Notification to signal the failed interface generated."
    ::= { h3cRddcNotifications 3 }

END
