-- *****************************************************************
-- RBN-LAG-MIB
--
-- Copyright (c) 2012 RedBack Networks, Inc.
-- All rights reserved.
--
-- Copyright (c) 2012 Ericsson AB.
-- All rights reserved.
--
-- *****************************************************************

RBN-LAG-MIB DEFINITIONS ::= BEGIN

IMPORTS
  MODULE-IDENTITY, OBJECT-TYPE, NOTIFICATION-TYPE, Integer32
      FROM SNMPv2-SMI
  MODULE-COMPLIANCE
         FROM SNMPv2-CONF                                    -- [RFC2580]
  MacAddress,
  TruthValue,
  DateAndTime
      FROM SNMPv2-TC
  SnmpAdminString
      FROM SNMP-FRAMEWORK-MIB
  rbnMgmt
      FROM RBN-SMI
  RbnSlot, RbnPort
      FROM RBN-TC
  InterfaceIndexOrZero
      FROM IF-MIB
  OBJECT-GROUP, NOTIFICATION-GROUP
      FROM SNMPv2-CONF;

rbnMcLagMIB MODULE-IDENTITY
     LAST-UPDATED    "201206011800Z" -- June 1, 2012
     ORGANIZATION    "Ericsson AB."
     CONTACT-INFO
             "       Ericsson AB.

                     100 Headquarters Dr
                     San Jose, CA  95134
                     USA

             Phone:  +1 408 750-5000
             Fax:    +1 408 750-5599

             "
  DESCRIPTION
      " This MIB contains managed object defintions for the MC-LAG."
  -- Revision History.
  REVISION "201206011800Z" -- June 1, 2012
  DESCRIPTION
      "Initial version."
  ::= { rbnMgmt 102 }

-- Top level components of this MIB.
rbnMcLagNotifications OBJECT IDENTIFIER ::= { rbnMcLagMIB 0 }
rbnMcLagObjects OBJECT IDENTIFIER ::= { rbnMcLagMIB 1 }
rbnMcLagConformance   OBJECT IDENTIFIER ::= { rbnMcLagMIB 2 }

--
-- Scalars and Tables
--
rbnMcLagTable OBJECT-TYPE
  SYNTAX  SEQUENCE OF RbnMcLagEntry
  MAX-ACCESS not-accessible
  STATUS  current
  DESCRIPTION
      "This table consists of MC-LAG management objects."
  ::= { rbnMcLagObjects 1 }


rbnMcLagEntry OBJECT-TYPE
  SYNTAX  RbnMcLagEntry
  MAX-ACCESS not-accessible
  STATUS  current
  DESCRIPTION
      "Each entry contains management objects of an MC-LAG node."
  INDEX {
      rbnMcLagName }
  ::= { rbnMcLagTable 1 }


RbnMcLagEntry ::= SEQUENCE {
  rbnMcLagName                 SnmpAdminString,
  rbnMcLagId                   Integer32,
  rbnMcLagSystemPriority       Integer32,
  rbnMcLagSystemMacAddress     MacAddress,
  rbnMcLagRevertiveMode        TruthValue,
  rbnMcLagRevertiveHoldTimer   Integer32,
  rbnMcLagOperState            INTEGER,
  rbnMcLagOperErrorCode        INTEGER,
  rbnMcLagSwitchOverTime       DateAndTime,
  rbnMcLagSwitchOverReason     SnmpAdminString 
  }


rbnMcLagName OBJECT-TYPE
  SYNTAX  SnmpAdminString (SIZE(1..80))
  MAX-ACCESS not-accessible
  STATUS  current
  DESCRIPTION
      "This object contains the name of the MC-LAG."
  ::= { rbnMcLagEntry 1 }

rbnMcLagId OBJECT-TYPE
  SYNTAX  Integer32
  MAX-ACCESS read-only 
  STATUS  current
  DESCRIPTION
      "The LINK-GROUP ID."
  ::= { rbnMcLagEntry 2 }

rbnMcLagSystemPriority OBJECT-TYPE
  SYNTAX  Integer32
  MAX-ACCESS read-only
  STATUS  current
  DESCRIPTION
      "Configured system priority for the MC-LAG."
  ::= { rbnMcLagEntry 3 }


rbnMcLagSystemMacAddress OBJECT-TYPE
  SYNTAX  MacAddress
  MAX-ACCESS read-only
  STATUS  current
  DESCRIPTION
      "The system MAC address for the MC-LAG."
  ::= { rbnMcLagEntry 4 }


rbnMcLagRevertiveMode OBJECT-TYPE
  SYNTAX  TruthValue 
  MAX-ACCESS read-only
  STATUS  current
  DESCRIPTION
      "Indicates whether the port is in revertive mode."
  ::= { rbnMcLagEntry 5 }


rbnMcLagRevertiveHoldTimer OBJECT-TYPE
  SYNTAX  Integer32
  UNITS
      "seconds"
  MAX-ACCESS read-only
  STATUS  current
  DESCRIPTION
      "This object indicates the time delayed before the MC-LAG is
      reverted back to the former active."
  ::= { rbnMcLagEntry 6 }

rbnMcLagOperState OBJECT-TYPE
  SYNTAX  INTEGER {
          up(1),
          down(2),
          standby(3) }
  MAX-ACCESS read-only
  STATUS  current
  DESCRIPTION
      "The current MC-LAG state:
      Up      -  When the MC-LAG is active on one of the two chassis.
      Down    -  When the MC-LAG is down.
      Standby -  When the MC-LAG is standby"
  ::= { rbnMcLagEntry 7 }

rbnMcLagOperErrorCode OBJECT-TYPE
  SYNTAX  INTEGER {
          noError(0),
          configMismatch(1),
          priorityError(2),
          downMinLink(3)
          }
  MAX-ACCESS read-only
  STATUS  current
  DESCRIPTION
      " The reason that MC-LAG is Down.
        configMismatch - MC-LAG is down because of config mismatch
        priorityError - MC-LAG is down because of config mismatch
        downMinLink - MC-LAG is down because of min-link error"
  ::= { rbnMcLagEntry 8 }

rbnMcLagSwitchOverTime OBJECT-TYPE
  SYNTAX DateAndTime
  MAX-ACCESS read-only
  STATUS  current
  DESCRIPTION "This indicated the last time MC-LAG was switched-over."
  ::= { rbnMcLagEntry 9 }

rbnMcLagSwitchOverReason OBJECT-TYPE
  SYNTAX  SnmpAdminString
  MAX-ACCESS read-only
  STATUS  current
  DESCRIPTION " This indicate in text the reason for MC-LAG switchover. "
  ::= { rbnMcLagEntry 10 }

-- Multi-chassis Link-group constituent Table

rbnMcLagConstituentTable OBJECT-TYPE
  SYNTAX  SEQUENCE OF RbnMcLagConstituentEntry
  MAX-ACCESS not-accessible
  STATUS  current
  DESCRIPTION " This is a table of constituent ports for a LAG"
  ::= { rbnMcLagObjects 2 }

rbnMcLagConstituentEntry OBJECT-TYPE
  SYNTAX  RbnMcLagConstituentEntry
  MAX-ACCESS not-accessible
  STATUS  current
  DESCRIPTION "A constituent port of an MCLAG."
  INDEX {
      rbnMcLagName, rbnMcLagConstituentSlot, rbnMcLagConstituentPort
  }
  ::= { rbnMcLagConstituentTable 1 }

RbnMcLagConstituentEntry ::= SEQUENCE {
  rbnMcLagConstituentSlot           RbnSlot,
  rbnMcLagConstituentPort           RbnPort,
  rbnMcLagConstituentPortPriority   INTEGER,
  rbnMcLagConstituentPortIfIndex    InterfaceIndexOrZero
}

rbnMcLagConstituentSlot  OBJECT-TYPE
  SYNTAX  RbnSlot
  MAX-ACCESS not-accessible
  STATUS  current
  DESCRIPTION
      " This indicates the slot number of the constituent port."
  ::= { rbnMcLagConstituentEntry 1 }

rbnMcLagConstituentPort OBJECT-TYPE
  SYNTAX  RbnPort
  MAX-ACCESS not-accessible
  STATUS  current
  DESCRIPTION
      " This indicates the port number of the constituent port"
  ::= { rbnMcLagConstituentEntry 2 }

rbnMcLagConstituentPortPriority OBJECT-TYPE
  SYNTAX  Integer32
  MAX-ACCESS read-only
  STATUS  current
  DESCRIPTION " This indicates the configured priority of the constituent
                port."
  ::= { rbnMcLagConstituentEntry 3 }

rbnMcLagConstituentPortIfIndex OBJECT-TYPE
  SYNTAX  InterfaceIndexOrZero
  MAX-ACCESS read-only
  STATUS  current
  DESCRIPTION " The interface index associated with the constituent port."
  ::= { rbnMcLagConstituentEntry 4 }

--
-- Notification Types
--

-- MC-LAG level 

rbnMcLagSwitchOverEvent NOTIFICATION-TYPE
  OBJECTS {
      rbnMcLagOperState,
      rbnMcLagSwitchOverReason
      }
  STATUS  current
  DESCRIPTION
      "An MC-LAG switch-over trap indicates a switch-over has happened
      and also identifying which chassis will become active and chassis."
  ::= { rbnMcLagNotifications 1 }

rbnMcLagOperFailed NOTIFICATION-TYPE
  OBJECTS {
      rbnMcLagOperState,
      rbnMcLagOperErrorCode
      }
  STATUS  current
  DESCRIPTION
      "his trap indicates MC-LAG has failed and why."
  ::= { rbnMcLagNotifications 2 }

rbnMcLagOperFailureCleared NOTIFICATION-TYPE
  OBJECTS {
      rbnMcLagOperState
      }
  STATUS  current
  DESCRIPTION
      "his trap indicates MC-LAG has failed and why."
  ::= { rbnMcLagNotifications 3 }

-- MC-LAG constituent port level

rbnMcLagConstituentPortUp NOTIFICATION-TYPE
  OBJECTS {
          rbnMcLagConstituentPortPriority,
          rbnMcLagConstituentPortIfIndex
       }
  STATUS  current
  DESCRIPTION
      "This trap indicates which constituent ports has failed in the
      MC-LAG."
  ::= { rbnMcLagNotifications 4 }

rbnMcLagConstituentPortDown NOTIFICATION-TYPE
  OBJECTS {
          rbnMcLagConstituentPortPriority,
          rbnMcLagConstituentPortIfIndex
       }
  STATUS  current
  DESCRIPTION
      "This trap indicates which constituent ports has failed in the
      MC-LAG."
  ::= { rbnMcLagNotifications 5 }


-- Conformance Statement
rbnMcLagGroups
      OBJECT IDENTIFIER ::= { rbnMcLagConformance 1 }

rbnMcLagCompliances
      OBJECT IDENTIFIER ::= { rbnMcLagConformance 2 }

-- Module Compliance

rbnMcLagModuleCompliance MODULE-COMPLIANCE
      STATUS current
      DESCRIPTION
          "Compliance statement for agents that provide support
           for the RBN-LAG-MIB"
      MODULE -- this module
         MANDATORY-GROUPS    { 
                               rbnMcLagObjectGroup,
                               rbnMcLagNotificationGroup
                             }
   ::= { rbnMcLagCompliances 1 }

-- Units of conformance.

rbnMcLagObjectGroup OBJECT-GROUP
      OBJECTS {
         rbnMcLagId,
         rbnMcLagSystemPriority,
         rbnMcLagSystemMacAddress,
         rbnMcLagRevertiveMode, 
         rbnMcLagRevertiveHoldTimer,
         rbnMcLagOperState,
         rbnMcLagOperErrorCode,
         rbnMcLagSwitchOverTime,
         rbnMcLagSwitchOverReason,
         rbnMcLagConstituentPortPriority,
         rbnMcLagConstituentPortIfIndex
        }
      STATUS  current
      DESCRIPTION
             "Collection of scalar objects required for Multi-chassis
             Link-group management."
      ::= { rbnMcLagGroups 1 }

rbnMcLagNotificationGroup NOTIFICATION-GROUP
       NOTIFICATIONS {
       rbnMcLagSwitchOverEvent,
       rbnMcLagOperFailed,
       rbnMcLagOperFailureCleared,
       rbnMcLagConstituentPortUp,
       rbnMcLagConstituentPortDown
                     }
      STATUS  current
      DESCRIPTION
             "Objects required for Multi-chassis Link-group notifications."
   ::= { rbnMcLagGroups 2 }
END

