BAY-STACK-LINK-STATE-TRACKING-MIB DEFINITIONS ::= BEGIN

IMPORTS
    OBJECT-TYPE, MODULE-IDENTITY, Unsigned32, NOTIFICATION-TYPE
        FROM SNMPv2-SMI
    TruthValue
        FROM SNMPv2-TC
--    PortList
--        FROM Q-BRIDGE-MIB
--    IdList
--        FROM RAPID-CITY
    bayStackMibs
        FROM SYNOPTICS-ROOT-MIB
    ifIndex
        FROM IF-MIB;

bayStackLinkStateTrackingMib MODULE-IDENTITY
      LAST-UPDATED "201809280000Z"
      ORGANIZATION "Avaya"
      CONTACT-INFO "avaya.com"
      DESCRIPTION
              "This MIB module is used for Link State Tracking configuration. 
               The purpose of Link-state tracking feature is to bind the link state of multiple
               interfaces, by creating link-state groups with upstream and downstream interfaces."

      REVISION     "201809280000Z"  -- September 28, 2018
      DESCRIPTION
              "Ver 7:  Removed PortList and IdList from IMPORTS declaration, since they are
                       defined below - this was causing compilation errors (azmeu)"
      REVISION     "201708310000Z"  -- August 31, 2017
      DESCRIPTION
              "Ver 6:  Added textual conventions: PortList, IdList.
	      	       Requested by Caludiu Gabriel Mitroi and Marian Adrian Cepoi (prempa)."

      REVISION     "201310110000Z"  -- October 11, 2013
      DESCRIPTION
              "Ver 5:  Changed the MAX-ACCESS of bsLstGroupIndex to read-only."

      REVISION     "201302130000Z"  -- February 13, 2013
      DESCRIPTION
              "Ver 4:  Added a new line at the end of the file"

      REVISION     "201211150000Z"  -- November 15, 2012
      DESCRIPTION
              "Ver 3:  Changed bsLstGroupUpstreamMltList and
                       bsLstGroupDownstreamMltList objects description."

      REVISION     "201210170000Z"  -- October 17, 2012
      DESCRIPTION
              "Ver 2:  Added bsLstInterfaceStatusChanged,
                             bsLstGroupOperStateChanged."

      REVISION     "201209030000Z"  -- September 3, 2012
      DESCRIPTION
              "Ver 1:  Initial version."
      ::= { bayStackMibs 43 }

bsLstNotifications
    OBJECT IDENTIFIER ::= { bayStackLinkStateTrackingMib 0 }
bsLstObjects
    OBJECT IDENTIFIER ::= { bayStackLinkStateTrackingMib 1 }
bsLstScalars
    OBJECT IDENTIFIER ::= { bsLstObjects 1 }
bsLstNotifObjects
    OBJECT IDENTIFIER ::= { bsLstObjects 3 }

-- Textual Conventions

PortList ::= TEXTUAL-CONVENTION
    STATUS        current
    DESCRIPTION
        "Each octet within this value specifies a set of eight
	 ports, with the first octet specifying ports 1 through
	 8, the second octet specifying ports 9 through 16, etc.
	 Within each octet, the most significant bit represents
	 the lowest numbered port, and the least significant bit
	 represents the highest numbered port. Thus, each port
	 of the bridge is represented by a single bit within the
	 values of this object. If that bit has a value of '1',
	 then that port is included in the set of ports; the port
	 is not included if its bit has a value of '0'."
    SYNTAX        OCTET STRING

IdList ::= TEXTUAL-CONVENTION
    STATUS        current
    DESCRIPTION
        "An identifier for a list of Ids."
    SYNTAX        OCTET STRING

--
-- Link-state tracking global objects
--

--
-- Link-state tracking notifications objects
--

bsLstInterfaceStatus OBJECT-TYPE
    SYNTAX INTEGER {
                     up(1),
                     down(2)
                   }
    MAX-ACCESS accessible-for-notify
    STATUS      current
    DESCRIPTION
        "This object specifies the status of a physical or logical interface."
    ::= { bsLstNotifObjects 1 }

--
-- Link-state tracking group configuration
--


bsLstGroupTable   OBJECT-TYPE
    SYNTAX SEQUENCE OF BsLstGroupEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "This table is used to configure link-state tracking group settings."
    ::= { bsLstObjects 2 }

bsLstGroupEntry OBJECT-TYPE
    SYNTAX       BsLstGroupEntry
    MAX-ACCESS   not-accessible
    STATUS       current
    DESCRIPTION
        "An entry for this instance of bsLstGroupTable."
    INDEX { bsLstGroupIndex }
    ::= { bsLstGroupTable 1 }

BsLstGroupEntry ::=
    SEQUENCE {
        bsLstGroupIndex               Unsigned32,
        bsLstGroupEnabled             TruthValue,
        bsLstGroupUpstreamPortList    PortList,
        bsLstGroupDownstreamPortList  PortList,
        bsLstGroupUpstreamMltList     IdList,
        bsLstGroupDownstreamMltList   IdList,
        bsLstGroupOperState           INTEGER
    }

bsLstGroupIndex OBJECT-TYPE
    SYNTAX      Unsigned32 (1..2)    
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The link-state tracking group id."    
    ::= { bsLstGroupEntry 1 }

bsLstGroupEnabled OBJECT-TYPE
    SYNTAX      TruthValue    
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "This object controls whether this link-state tracking group is enabled."
    DEFVAL { false }    
    ::= { bsLstGroupEntry 2 }

bsLstGroupUpstreamPortList OBJECT-TYPE
    SYNTAX      PortList    
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "This object specifies the upstream port list for this group instance."
    DEFVAL { ''H }    
    ::= { bsLstGroupEntry 3 }

bsLstGroupDownstreamPortList OBJECT-TYPE
    SYNTAX      PortList    
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "This object specifies the downstream port list for this group instance."
    DEFVAL { ''H }    
    ::= { bsLstGroupEntry 4 }

bsLstGroupUpstreamMltList OBJECT-TYPE
    SYNTAX      IdList    
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "This object specifies the upstream mlt list for this group instance.
         Each MLT ID is stored as a two bytes value. The first byte in the pair 
         holds bits 15-8 of the MLT ID, while the second byte holds bits 7-0 of the
         MLT ID."
    DEFVAL { ''H }    
    ::= { bsLstGroupEntry 5 }

bsLstGroupDownstreamMltList OBJECT-TYPE
    SYNTAX      IdList    
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "This object specifies the downstream mlt list for this group instance.
         Each MLT ID is stored as a two bytes value. The first byte in the pair 
         holds bits 15-8 of the MLT ID, while the second byte holds bits 7-0 of the
         MLT ID."
    DEFVAL { ''H }    
    ::= { bsLstGroupEntry 6 }

bsLstGroupOperState OBJECT-TYPE
    SYNTAX     INTEGER {
                   up(1),
                   down(2),
                   notConfigured(3)
               }
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "This object specifies the operational status of this group instance.
         When this link-state tracking group is disabled, the value of this object
         must be 'notConfigured(3)'."   
    ::= { bsLstGroupEntry 7 }


--
--  Link-state tracking notifications
--

bsLstInterfaceStatusChanged NOTIFICATION-TYPE
    OBJECTS {
        ifIndex,
        bsLstInterfaceStatus,
        bsLstGroupIndex
    }
    STATUS current
    DESCRIPTION
        "This notification is generated when a physical or logical interface changes its status
         in a particular link-state tracking group."
    ::= { bsLstNotifications 1 }

bsLstGroupOperStateChanged NOTIFICATION-TYPE
    OBJECTS {
        ifIndex,
        bsLstInterfaceStatus,
        bsLstGroupOperState
    }
    STATUS current
    DESCRIPTION
        "This notification is generated when the operational status of a link-state tracking group
         changes due to an interface status change. For example, when the last interface of an 
         link-state tracking group becomes down, the operational status of the group changes to down."
    ::= { bsLstNotifications 2 }

END

