-- =========================================================================
-- Copyright (c) 2010-2014 Hewlett-Packard Development Company, L.P.
--
-- Description:  RDDC MIB
-- Reference:  Enterprise MIB
-- Version: V1.0
-- History:
--     V1.0 Initial version 2014-01-03
-- =========================================================================
HPN-ICF-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
    hpnicfCommon
        FROM HPN-ICF-OID-MIB;

hpnicfRddc MODULE-IDENTITY
    LAST-UPDATED "201401030000Z"        -- January 03, 2014 at 00:00 GMT
    ORGANIZATION
        ""
    CONTACT-INFO
        ""
    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."
    ::= { hpnicfCommon 151 }

hpnicfRddcNotifications  OBJECT IDENTIFIER ::= { hpnicfRddc 0 }
hpnicfRddcObjects        OBJECT IDENTIFIER ::= { hpnicfRddc 1 }

hpnicfRddcInfo           OBJECT IDENTIFIER ::= { hpnicfRddcObjects 1 }
hpnicfRddcTrapObjects    OBJECT IDENTIFIER ::= { hpnicfRddcObjects 2 }

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

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

hpnicfRddcEntry OBJECT-TYPE
    SYNTAX HpnicfRddcEntry
    MAX-ACCESS not-accessible
    STATUS current
    DESCRIPTION
        "The entry of hpnicfRddcEntry."
    INDEX { hpnicfRddcGroupIdx }
    ::= { hpnicfRddcTable 1 }

HpnicfRddcEntry ::=
    SEQUENCE {
        hpnicfRddcGroupIdx          Unsigned32,
        hpnicfRddcGroupName         OCTET STRING,
        hpnicfRddcPreempTimeRemain  Unsigned32,
        hpnicfRddcPreempTimeConfig  Unsigned32,
        hpnicfRddcHoldTimeRemain    Unsigned32,
        hpnicfRddcHoldTimeConfig    Unsigned32
        }

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

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

hpnicfRddcPreempTimeRemain 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."
    ::= { hpnicfRddcEntry 3 }

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

hpnicfRddcHoldTimeRemain 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."
    ::= { hpnicfRddcEntry 5 }

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

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

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

hpnicfRddcNodeEntry OBJECT-TYPE
    SYNTAX HpnicfRddcNodeEntry
    MAX-ACCESS not-accessible
    STATUS current
    DESCRIPTION
        "The entry of hpnicfRddcNodeEntry."
    INDEX { hpnicfRddcNodeGroupIdx,
            hpnicfRddcNodeId }
    ::= { hpnicfRddcNodeTable 1 }

HpnicfRddcNodeEntry ::=
    SEQUENCE {
        hpnicfRddcNodeGroupIdx          Unsigned32,
        hpnicfRddcNodeId                Unsigned32,
        hpnicfRddcNodeBindType          INTEGER,
        hpnicfRddcNodeBindInfo          Unsigned32,
        hpnicfRddcNodePriority          Unsigned32,
        hpnicfRddcNodeWeight            Integer32,
        hpnicfRddcNodeStatus            INTEGER
        }

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

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

hpnicfRddcNodeBindType 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."
    ::= { hpnicfRddcNodeEntry 3 }

hpnicfRddcNodeBindInfo 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 hpnicfRddcNodeBindType is invalid, the value of hpnicfRddcNodeBindInfo is 65535."
    ::= { hpnicfRddcNodeEntry 4 }

hpnicfRddcNodePriority 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."
    ::= { hpnicfRddcNodeEntry 5 }

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

hpnicfRddcNodeStatus 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."
    ::= { hpnicfRddcNodeEntry 7 }

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

hpnicfRddcNodeInfo 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."
    ::= { hpnicfRddcTrapObjects 1 }

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

-- ==================================================================
--
-- ======================= trap definition begin ====================
--
-- ==================================================================
hpnicfRddcSwitchoverTrap NOTIFICATION-TYPE
    OBJECTS
        {
            hpnicfRddcGroupIdx,
            hpnicfRddcGroupName,
            hpnicfRddcNodeInfo,
            hpnicfRddcSwitchReason
        }
    STATUS      current
    DESCRIPTION
        "Notification to signal switchover/failover."
    ::= { hpnicfRddcNotifications 1 }

hpnicfRddcFailIfRecoverTrap NOTIFICATION-TYPE
    OBJECTS
        {
            hpnicfRddcGroupIdx,
            hpnicfRddcGroupName,
            ifIndex,
            ifDescr
        }
    STATUS      current
    DESCRIPTION
        "Notification to signal the failed interface recovered."
    ::= { hpnicfRddcNotifications 2 }

hpnicfRddcFailIfGenerateTrap NOTIFICATION-TYPE
    OBJECTS
        {
            hpnicfRddcGroupIdx,
            hpnicfRddcGroupName,
            ifIndex,
            ifDescr
        }
    STATUS      current
    DESCRIPTION
        "Notification to signal the failed interface generated."
    ::= { hpnicfRddcNotifications 3 }

END
