--  =======================================================================
--  File        : oaProtec.mib
--  Description : Private MIB for Device Link Protection (LOS) parameters
--  By          : Edna & Yakov
--  Version     : 0.2
--  Date        : 
--  =======================================================================
--
--
-- Copyright (c) 2006 MRV.  All Rights Reserved.
--
--
-- Reproduction of this document is authorized on condition that this
-- copyright notice is included.  This MRV SNMP MIB Specification
-- embodies MRV's proprietary intellectual property.  MRV
-- retains all title and ownership in the specification, including any
-- revisions.
--
-- It is MRV's intent to encourage the widespread use of this
-- specification in connection with the management of MRV's
-- products. MRV grants vendor, end-users, and other interested
-- parties a non-exclusive license to use this specification in
-- connection with the management of MRV's products.
--
-- This specification is supplied "AS IS," and MRV makes no
-- warranty, either express or implied, as to the use, operation,
-- condition, or performance of the specification.
--
-- Copyright text courtesy of MRV
--
-- If you have any questions about this MIB, please call MRV
-- Technical Support Center at 1-800-858-7815 from inside USA or
-- 1-818-773-0900 from outside USA.
--
--
-- MRV retains the right to change this MIB without notification.
--

OA-DEV-LINK-PROTECTION-MIB DEFINITIONS ::= BEGIN

  IMPORTS
    MODULE-IDENTITY, OBJECT-TYPE,
    NOTIFICATION-TYPE,
    Integer32, Unsigned32                FROM SNMPv2-SMI    -- RFC2578
    TruthValue, DisplayString            FROM SNMPv2-TC
    nbSwitchG1Il                         FROM OS-COMMON-TC-MIB
    NOTIFICATION-GROUP, OBJECT-GROUP,
    MODULE-COMPLIANCE                    FROM SNMPv2-CONF;  -- RFC2580

oaDeviceLinkProtection  MODULE-IDENTITY
    LAST-UPDATED "202006160000Z"  -- Jun. 16, 2020
    ORGANIZATION "MRV Communications, Inc."
    CONTACT-INFO
        "Edna Ganon
         MRV Communication, Inc
         http://www.mrv.com
         Email:  eganon@mrv.com

         Inna Levin
         MRV Communication, Inc
         http://www.mrv.com
         Email:  ilevin@mrv.com

         Yakov Vaisman
         MRV Communication, Inc
         http://www.mrv.com
         Email:  yvaisman@mrv.com
        "

    DESCRIPTION
        "Supports information about Link Protection (LOS)."

    -- Revision history

    REVISION     "202006160000Z"  -- Jun. 16, 2020
         DESCRIPTION
             "New objects oaDevLosGrHoldOffTimer, oaDevLosGrPollDelayTimer, oaDevLosGrToBackupTrapTimer, oaDevLosGrToPrimaryTrapTimer."

    REVISION     "201812240000Z"  -- Dec. 24, 2018
         DESCRIPTION
             "New objects oaDevLosGrWtrTimer, oaDevLosGrConnectionId, oaDevLosGrAgVid."

    REVISION     "201607130000Z"  -- July 13, 2016
         DESCRIPTION
             "New object oaDevLosGrMmuEnabled."

    REVISION "200712110000Z"  -- Dec 11, 2007
    DESCRIPTION
        "Revision 0.2: MIB Objects [oaDevLosGrAgTable],
         [oaDevLosAgSupport], [oaDevLosGrActionCause],
         [oaDevLosGrActivePortNumber] added.
         Protection Mode Trap [oaDevLosActivePortChanged]
         declarations added."

    REVISION "200708020000Z"  -- Aug 2, 2007
    DESCRIPTION
        "Initial edition."
    ::= { nbDevGen 24 }

-- ************************************************************
-- MRV Object Identifier Definition
-- ************************************************************

-- GROUPS for General Device Configuration
nbDeviceConfig     OBJECT IDENTIFIER ::= { nbSwitchG1Il 11}
nbDevGen           OBJECT IDENTIFIER ::= { nbDeviceConfig 1 }

oaDevLosNotifications  OBJECT IDENTIFIER ::= { oaDeviceLinkProtection 0 }
oaDevLosGen        OBJECT IDENTIFIER ::= { oaDeviceLinkProtection 1 }
oaDevLosGrp        OBJECT IDENTIFIER ::= { oaDeviceLinkProtection 2 }

oaDevLosConformance   OBJECT IDENTIFIER  ::= { oaDeviceLinkProtection 101 }

-- ************************************************************************
-- Objects for Device Link Protection (LOS) General group
-- ************************************************************************

oaDevLosGenSupport OBJECT-TYPE
    SYNTAX  INTEGER {
       notSupported (1),
       supported    (2)
    }       
    MAX-ACCESS  read-only
    STATUS  current
    DESCRIPTION
    "Device Link Protection [LOS] feature support."

    ::= { oaDevLosGen 1 }

oaDevLosAgSupport OBJECT-TYPE
    SYNTAX  INTEGER {
       notSupported (1),
       supported    (2)
    }       
    MAX-ACCESS  read-only
    STATUS  current
    DESCRIPTION
    "LOS may use the IEEE 802.1ag."

    ::= { oaDevLosGen 2 }

-- ************************************************************
-- Objects in the Device Link Protection (LOS) Group
-- ************************************************************

oaDevLosGrTable    OBJECT-TYPE
    SYNTAX  SEQUENCE OF OaDevLosGrEntry
    MAX-ACCESS   not-accessible
    STATUS       current
    DESCRIPTION
    "This table configures Device Link Protection (LOS)."

    ::= { oaDevLosGrp 5 }

oaDevLosGrEntry OBJECT-TYPE
    SYNTAX       OaDevLosGrEntry
    MAX-ACCESS   not-accessible
    STATUS       current
    DESCRIPTION
    "Device Link Protection (LOS) table entry."

    INDEX { oaDevLosGrId }

    ::= { oaDevLosGrTable 1 }

OaDevLosGrEntry ::= SEQUENCE {
    oaDevLosGrId                Integer32,
    oaDevLosGrPrimaryPort       Integer32,
    oaDevLosGrSecondaryPort     Integer32,
    oaDevLosGrProtectionMode    INTEGER,
    oaDevLosGrEnableMode        INTEGER,
    oaDevLosGrActivePortNumber  Integer32,
    oaDevLosGrActionCause       INTEGER,
    oaDevLosGrWtrTimer          Integer32,
    oaDevLosGrConnectionId      DisplayString,
    oaDevLosGrHoldOffTimer      Integer32,
    oaDevLosGrPollDelayTimer    Integer32,
    oaDevLosGrToBackupTrapTimer Integer32,
    oaDevLosGrToPrimaryTrapTimer Integer32
    }

oaDevLosGrId    OBJECT-TYPE
    SYNTAX Integer32 (1..255)
    MAX-ACCESS   not-accessible
--    MAX-ACCESS   accessible-for-notify
    STATUS  current
    DESCRIPTION
    "The index of the Device Link Protection (LOS) Table.
     It can be equal to the corresponding Trunk Id  value
     [oaDevTrunkGrId]."

    ::= { oaDevLosGrEntry 1 }

oaDevLosGrPrimaryPort    OBJECT-TYPE
    SYNTAX Integer32 (0..256)
    MAX-ACCESS   read-write
    STATUS  current
    DESCRIPTION
    "The number of the Primary Port from the Ports Group Members list."

    ::= { oaDevLosGrEntry 2 }

oaDevLosGrSecondaryPort    OBJECT-TYPE
    SYNTAX Integer32 (0..256)
    MAX-ACCESS   read-only
    STATUS  current
    DESCRIPTION
    "The number of the Secondary Port from the Ports Group Members list."

    ::= { oaDevLosGrEntry 3 }

oaDevLosGrProtectionMode    OBJECT-TYPE
    SYNTAX       INTEGER {
                          other         (1),
                          preemption    (2),
                          notPreemption (3)
                         }
    MAX-ACCESS   read-write
    STATUS       current
    DESCRIPTION
    "The Protection Mode of the Ports Group."

    ::= { oaDevLosGrEntry 4 }

oaDevLosGrEnableMode    OBJECT-TYPE
    SYNTAX       INTEGER {
       other     (1),
       enable    (2),
       disable   (3)
    }
    MAX-ACCESS   read-write
    STATUS       current
    DESCRIPTION
    "Enable/Disable the Link Protection (LOS) feature for the Ports Group .
     Can be used to remove the LOS entry."

    ::= { oaDevLosGrEntry 5 }

oaDevLosGrActivePortNumber OBJECT-TYPE
    SYNTAX  Integer32
    MAX-ACCESS read-write
    STATUS  current
    DESCRIPTION
    "The number of Active port in the corresponding Group."

    ::= { oaDevLosGrEntry 6 }

oaDevLosGrActionCause  OBJECT-TYPE
    SYNTAX  INTEGER {
       noAction           (1),
       portLinkUp         (2),
       portLinkDown       (3),
       agRMepDiscardEvent (4),
       agRMepNoConnEvent  (5),
       agRMepAliveEvent   (6),
       activePortAdminSet (7)
    }
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION
    "The causes of last LOS action are:
     [portLinkDown] - port [oaDevLosGrActivePortNumber] is active because
                    other Group member port became Link Down now.
     [portLinkUp]   - port [oaDevLosGrActivePortNumber] is active because
                    it became Link Up now.
     [agRMepDiscardEvent] - port [oaDevLosGrActivePortNumber] is active because
                    other Group member port received 'Remote Mep Discard Event'.
     [agRMepNoConnEvent] - port [oaDevLosGrActivePortNumber] is active because
                    other Group member port received 'No connection to Remote Mep Event'.
     [agRMepAliveEvent] - port [oaDevLosGrActivePortNumber] is active because
                    it received 'Remote Mep Alive Event'.
     [activePortAdminSet] - port [oaDevLosGrActivePortNumber] is active because
                    of administrative setting."

    ::= { oaDevLosGrEntry 7 }

oaDevLosGrWtrTimer OBJECT-TYPE
    SYNTAX  Integer32 (1..300)
    UNITS       "seconds"
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
      "Value of WTR timer used in module link protection."
    DEFVAL { 1 }

    ::= { oaDevLosGrEntry 8 }

oaDevLosGrConnectionId  OBJECT-TYPE
    SYNTAX      DisplayString (SIZE (0..30))
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
      "... For LTE it is a connection id, else - empty string with lenght 0."
    ::= { oaDevLosGrEntry 9 }


oaDevLosGrHoldOffTimer OBJECT-TYPE
    SYNTAX  Integer32 (1..300)
    UNITS       "seconds"
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
      "Value of HoldOff timer used in module link protection."
    DEFVAL { 1 }

    ::= { oaDevLosGrEntry 10 }

oaDevLosGrPollDelayTimer OBJECT-TYPE
    SYNTAX  Integer32 (1..300)
    UNITS       "seconds"
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
      "Value of Polling delay timer used in module link protection."
    DEFVAL { 1 }

    ::= { oaDevLosGrEntry 11 }

oaDevLosGrToBackupTrapTimer OBJECT-TYPE
    SYNTAX  Integer32 (1..300)
    UNITS       "seconds"
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
      "Value of Backup delay timer used in module link protection."
    DEFVAL { 1 }

    ::= { oaDevLosGrEntry 12 }

oaDevLosGrToPrimaryTrapTimer OBJECT-TYPE
    SYNTAX  Integer32 (1..300)
    UNITS       "seconds"
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
      "Value of Primary delay timer used in module link protection."
    DEFVAL { 1 }

    ::= { oaDevLosGrEntry 13 }

-- *******************************************************************
-- Objects in the Table describing the association of the Remote Meps
-- with the corresponding LOS Entry.
-- *******************************************************************

oaDevLosGrAgTable    OBJECT-TYPE
    SYNTAX  SEQUENCE OF OaDevLosGrAgEntry
    MAX-ACCESS   not-accessible
    STATUS       current
    DESCRIPTION
    "This table describes the association of the
     corresponding LOS with the Remote Meps.
    "
    ::= { oaDevLosGrp 7 }

oaDevLosGrAgEntry OBJECT-TYPE
    SYNTAX       OaDevLosGrAgEntry
    MAX-ACCESS   not-accessible
    STATUS       current
    DESCRIPTION
    "Device Link Protection (LOS) AG table entry."

    INDEX { oaDevLosGrId,
            oaDevLosGrAgDomainId,
            oaDevLosGrAgAssociationId,
            oaDevLosGrAgRemoteMep}

    ::= { oaDevLosGrAgTable 1 }

OaDevLosGrAgEntry ::= SEQUENCE {
    oaDevLosGrAgDomainId        Unsigned32,
    oaDevLosGrAgAssociationId   Unsigned32,
    oaDevLosGrAgRemoteMep       Unsigned32,
    oaDevLosGrAgRMepStatus      INTEGER,
    oaDevLosGrAgAdminStatus     INTEGER,
    oaDevLosGrAgVid             Unsigned32
    }

oaDevLosGrAgDomainId    OBJECT-TYPE
    SYNTAX Unsigned32 (0..4294967295)
    MAX-ACCESS   not-accessible
    STATUS  current
    DESCRIPTION
    "The Maintainance Domain Id of the Remote Mep."

    ::= { oaDevLosGrAgEntry 2 }

oaDevLosGrAgAssociationId    OBJECT-TYPE
    SYNTAX Unsigned32 (1..4294967295)
    MAX-ACCESS   not-accessible
    STATUS  current
    DESCRIPTION
    "The Maintainance Association Id of the Remote Mep."

    ::= { oaDevLosGrAgEntry 3 }

oaDevLosGrAgRemoteMep    OBJECT-TYPE
    SYNTAX Unsigned32 (1..8192)
    MAX-ACCESS   not-accessible
    STATUS  current
    DESCRIPTION
    "The Remote Mep Id associated with the LOS Entry.
     8192 - means all existing Meps."

    ::= { oaDevLosGrAgEntry 4 }

oaDevLosGrAgRMepStatus    OBJECT-TYPE
    SYNTAX       INTEGER {
       normal       (1),
       discard      (2),
       noConnection (3)
    }
    MAX-ACCESS   read-only
    STATUS  current
    DESCRIPTION
    "The Remote Mep connectivity Status."

    ::= { oaDevLosGrAgEntry 8 }

oaDevLosGrAgAdminStatus    OBJECT-TYPE
    SYNTAX       INTEGER {
       valid    (1),
       invalid  (2)
    }
    MAX-ACCESS   read-write
    STATUS  current
    DESCRIPTION
    "Device Link Protection (LOS) Admin Status.
     Value 'valid' used for entry creation.
     Value 'invalid' - used for LOS entry deletion."

    ::= { oaDevLosGrAgEntry 10 }

oaDevLosGrAgVid    OBJECT-TYPE
    SYNTAX Unsigned32 (1..8192)
    MAX-ACCESS   read-write
    STATUS       current
    DESCRIPTION
    "The Remote Mep VLAN Id.
     VLAN Id of the RMEP."

    ::= { oaDevLosGrAgEntry 11 }

-- *******************************************************************
-- Objects in the Table constrols the MMU mode of 
-- the corresponding LOS Entry.
-- *******************************************************************

oaDevLosGrMmuTable    OBJECT-TYPE
    SYNTAX  SEQUENCE OF OaDevLosGrMmuEntry
    MAX-ACCESS   not-accessible
    STATUS       current
    DESCRIPTION
    "This table constrols the MMU mode of 
     the corresponding LOS Entry."
    ::= { oaDevLosGrp 8 }

oaDevLosGrMmuEntry OBJECT-TYPE
    SYNTAX       OaDevLosGrMmuEntry
    MAX-ACCESS   not-accessible
    STATUS       current
    DESCRIPTION
    "Device Link Protection (LOS) MMU table entry."

    INDEX { oaDevLosGrId }

    ::= { oaDevLosGrMmuTable 1 }

OaDevLosGrMmuEntry ::= SEQUENCE {
    oaDevLosGrMmuEnabled          TruthValue
    }

oaDevLosGrMmuEnabled OBJECT-TYPE
    SYNTAX        TruthValue
    MAX-ACCESS    read-write
    STATUS        current
    DESCRIPTION
       "This object controls 'MAC address-table move update transmit' option of the group."
    DEFVAL { false }
    ::= { oaDevLosGrMmuEntry 2 }

-- *******************************************************************
--  Conformance Information 
-- ******************************************************************* 
 
oaDevLosMIBCompliances  OBJECT IDENTIFIER ::= { oaDevLosConformance 1 }
oaDevLosMIBGroups       OBJECT IDENTIFIER ::= { oaDevLosConformance 2 }

-- *******************************************************************
--  Compliance Information
-- ******************************************************************* 
 
oaDevLosMIBCompliance   MODULE-COMPLIANCE
    STATUS current 
    DESCRIPTION 
    "The core compliance statement for all
     'oaDeviceLinkProtection' MIB implementations."

    MODULE -- this module

    MANDATORY-GROUPS { 
                      oaDevLosMandatoryGroup,
                      oaDevLosNotificationsGroup
                     }

    GROUP             oaPortLosTrapParamsGroup
    DESCRIPTION
            "This group includes MIB Objects coming with SNMP Traps."


    GROUP             oaPortLosGroup
    DESCRIPTION
            "This group includes not mandatory MIB Objects."

    ::= { oaDevLosMIBCompliances 1 }

-- ...................................................................
-- Conformance Groups 
-- ................................................................... 
 
oaDevLosMandatoryGroup  OBJECT-GROUP
    OBJECTS { 
             oaDevLosGenSupport,
             oaDevLosAgSupport,

--             oaDevLosGrId,
             oaDevLosGrPrimaryPort,
             oaDevLosGrSecondaryPort,
             oaDevLosGrProtectionMode,
             oaDevLosGrEnableMode,
             oaDevLosGrActivePortNumber,
             oaDevLosGrMmuEnabled
            }
    STATUS current
    DESCRIPTION 
    "Mandatory objects for grouping of Device Link Protection (LOS) parameters."

    ::= { oaDevLosMIBGroups 1 }
 
oaPortLosTrapParamsGroup  OBJECT-GROUP
    OBJECTS { 
             oaDevLosGrActionCause,
             oaDevLosGrWtrTimer,
             oaDevLosGrHoldOffTimer,
             oaDevLosGrPollDelayTimer,
             oaDevLosGrToBackupTrapTimer,
             oaDevLosGrToPrimaryTrapTimer,
             oaDevLosGrConnectionId
            }
    STATUS current 
    DESCRIPTION 
    "Mandatory group of the Link Protection (LOS) SNMP Trap parameters."

    ::= { oaDevLosMIBGroups 2 }

oaPortLosGroup  OBJECT-GROUP
    OBJECTS { 
--             oaDevLosGrAgDomainId,
--             oaDevLosGrAgAssociationId,
--             oaDevLosGrAgRemoteMep,

             oaDevLosGrAgRMepStatus,
             oaDevLosGrAgAdminStatus, 
             oaDevLosGrAgVid
            }
    STATUS current
    DESCRIPTION 
    "Not Mandatory objects for grouping of Link Protection (LOS) parameters."

    ::= { oaDevLosMIBGroups 3 }

oaDevLosNotificationsGroup   NOTIFICATION-GROUP
    NOTIFICATIONS {
             oaDevLosActivePortChanged
            }
    STATUS  current
    DESCRIPTION
    "The Notifications which are required to be supported by
    implementations of this MIB."

    ::= { oaDevLosMIBGroups 4 }

-- *******************************************************************
--  Notification Definition section
-- ******************************************************************* 

oaDevLosActivePortChanged  NOTIFICATION-TYPE
    OBJECTS { oaDevLosGrActivePortNumber,
              oaDevLosGrPrimaryPort,
              oaDevLosGrSecondaryPort,
              oaDevLosGrActionCause,
              oaDevLosGrConnectionId
            }
    STATUS  current
    DESCRIPTION
    "The SNMP trap that is generated when one of the Ports in the LOS Group
     became Active.
     For example: port A and port B are the members of the LOS Group while
     port A is a primary port and port B is the secondary port.
    "

    ::= { oaDevLosNotifications 37 }

END
