LUM-PSR-MIB DEFINITIONS ::= BEGIN

IMPORTS
    MODULE-IDENTITY, OBJECT-TYPE, Unsigned32
        FROM SNMPv2-SMI
    OBJECT-GROUP, MODULE-COMPLIANCE
        FROM SNMPv2-CONF
    TEXTUAL-CONVENTION, DisplayString, DateAndTime
        FROM SNMPv2-TC
    lumModules, lumPsrMIB
        FROM LUM-REG
    FaultStatus, MgmtNameString
        FROM LUM-TC;

lumPsrMIBModule MODULE-IDENTITY
    LAST-UPDATED
        "201706150000Z" -- June 15th 2017
    ORGANIZATION
        "Infinera Corporation"
    CONTACT-INFO
        "techsupport@infinera.se"
    DESCRIPTION
        "The MIB module for management of MPLS-TP protection switching
        and recovery(PSR).

        The tables contained in this MIB are:

        (1) The General group contains some general attributes as timestamps
            and tables sizes.

        (2) The MPLS linear protection table contains information and
            configuration about Protection State Coordination (PSC) protocol
            used in linear protection switching of MPLS LSPs and Pseudowires.

"


    REVISION
        "201706150000Z" -- June 15th 2017
    DESCRIPTION
        "Changes made for release r29.0:
         - Changed ORGANIZATION and CONTACT-INFO"
    REVISION
        "201212200000Z" -- December 20th 2012
    DESCRIPTION
        "Release R20:
        - Update description for psrMplsLinearProtName, name 'linProt' change to 'linPrt'"
    REVISION
        "201203010000Z" -- March. 1st 2012
    DESCRIPTION
        "The initial revision of this module."
    ::= { lumModules 43 }


-- ----------------------------------------------------
-- Conformance area, containing groups and compliance
-- specifications.
-- ----------------------------------------------------

lumPsrConfs OBJECT IDENTIFIER ::= { lumPsrMIB 1 }
lumPsrGroups OBJECT IDENTIFIER ::= { lumPsrConfs 1 }
lumPsrCompl OBJECT IDENTIFIER ::= { lumPsrConfs 2 }


-- ----------------------------------------------------
-- Root for objects in the MPLSPROTECTION MIB
-- ----------------------------------------------------

lumPsrMIBObjects OBJECT IDENTIFIER ::= { lumPsrMIB 2 }


-- ----------------------------------------------------
-- This MIB contains the following groups:
-- ----------------------------------------------------

psrGeneral OBJECT IDENTIFIER ::= { lumPsrMIBObjects 1 }
psrMplsLinearProtList OBJECT IDENTIFIER ::= { lumPsrMIBObjects 2 }

-- ----------------------------------------------------
-- Textual Conventions
-- ----------------------------------------------------
InputRequest ::= TEXTUAL-CONVENTION
    STATUS current
    DESCRIPTION
        "Input request supported in MPLS-TP linear protection."
    SYNTAX INTEGER {
                    unknown (1),
                    noRequest (2),
                    lockOut (3),
                    forcedSwitch (4),
                    signalFailProtecting (5),
                    signalFailWorking (6),
                    manualSwitch (7),
                    waitToRestore (8),
                    doNotRevert (9),
                    noConnection (10) }

PathState ::= TEXTUAL-CONVENTION
    STATUS current
    DESCRIPTION
        "Status of the path in protection domain."
    SYNTAX INTEGER {
                    down (1),
                    up (2),
                    unknown (3) }

SupvType ::= TEXTUAL-CONVENTION
    STATUS current
    DESCRIPTION
        "Supervision type of the working/protection path in protection domain.
         layer1(1) -- the path state depends only on layer1 faults
                      on the local port.
         bfd (2)   -- the path is monitored by BFD session."
    SYNTAX INTEGER {
                    layer1 (1),
                    bfd    (2) }

-- ----------------------------------------------------
-- General group
-- ----------------------------------------------------

psrGeneralLastChangeTime OBJECT-TYPE
    SYNTAX      DateAndTime
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The time when the configuration of the MIB was
        last changed.
"
    ::= { psrGeneral 1 }

psrGeneralStateLastChangeTime OBJECT-TYPE
    SYNTAX      DateAndTime
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The time when the state of the MIB was last
        changed.
"
    ::= { psrGeneral 2 }

psrGeneralPsrMplsLinearProtTableSize OBJECT-TYPE
    SYNTAX      Unsigned32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Size of MPLS linear protection table
"
    ::= { psrGeneral 9 }

-- ----------------------------------------------------
-- The MPLS linear protection table
-- ----------------------------------------------------

psrMplsLinearProtTable  OBJECT-TYPE
    SYNTAX      SEQUENCE OF PsrMplsLinearProtEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "The MPLS linear protection group list."
    ::= { psrMplsLinearProtList 1 }

psrMplsLinearProtEntry OBJECT-TYPE
    SYNTAX      PsrMplsLinearProtEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "An entry in the MPLS linear protection list.
"
    INDEX { psrMplsLinearProtIndex }
    ::= { psrMplsLinearProtTable 1 }

PsrMplsLinearProtEntry ::=
    SEQUENCE {
        psrMplsLinearProtIndex                    Unsigned32,
        psrMplsLinearProtInternalReference        Unsigned32,
        psrMplsLinearProtName                     MgmtNameString,
        psrMplsLinearProtTunnelId                 DisplayString,
        psrMplsLinearProtAdminStatus              INTEGER,
        psrMplsLinearProtState                    INTEGER,
        psrMplsLinearProtLocalEvent               InputRequest,
        psrMplsLinearProtRemoteEvent              InputRequest,
        psrMplsLinearProtWorkingPathId            DisplayString,
        psrMplsLinearProtWorkingPathIndex         Unsigned32,
        psrMplsLinearProtWorkingPathState         PathState,
        psrMplsLinearProtWpathSupvType            SupvType,
        psrMplsLinearProtProtectionPathId         DisplayString,
        psrMplsLinearProtProtectionPathIndex      Unsigned32,
        psrMplsLinearProtProtectionPathState      PathState,
        psrMplsLinearProtPpathSupvType            SupvType,
        psrMplsLinearProtActivePath               INTEGER,
        psrMplsLinearProtOperatorCommand          INTEGER,
        psrMplsLinearProtHoldoffTimer             Unsigned32,
        psrMplsLinearProtProtectionFailed         FaultStatus,
        psrMplsLinearProtProtectionDegraded       FaultStatus,
        psrMplsLinearProtCommunicationFailure     FaultStatus,
        psrMplsLinearProtConfigMismatch           FaultStatus }

psrMplsLinearProtIndex OBJECT-TYPE
    SYNTAX      Unsigned32 (1..2147483647)
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "An arbitrary index assigned to each entry.
"
    ::= { psrMplsLinearProtEntry 1 }

psrMplsLinearProtInternalReference OBJECT-TYPE
    SYNTAX      Unsigned32 (0..2147483647)
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "For internal use only.
"
    DEFVAL { 0 }
    ::= { psrMplsLinearProtEntry 2 }

psrMplsLinearProtName OBJECT-TYPE
    SYNTAX      MgmtNameString
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The management name of the interface, for example
        'linPrt:1:2:tunnelId', where the first number indicates
        subrack, the second slot number, and the third is
        the tunnel Id, to which the linear protection is applied.
"
    ::= { psrMplsLinearProtEntry 3 }

psrMplsLinearProtTunnelId OBJECT-TYPE
    SYNTAX      DisplayString
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "The tunnel that this protection is applied to.
"
    DEFVAL { "" }
    ::= { psrMplsLinearProtEntry 4 }

psrMplsLinearProtAdminStatus OBJECT-TYPE
    SYNTAX      INTEGER {
                    down (1),
                    up (2)}
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "The administrative state for the object.

        down - The object is de-activated.

        up   - The object will be activated when
        available.
"
    DEFVAL { up }
    ::= { psrMplsLinearProtEntry 5 }

psrMplsLinearProtState OBJECT-TYPE
    SYNTAX      INTEGER {
                    normal (1),
                    protectionPathUnavailable (2),
                    workingPathFailure (3),
                    administrative (4),
                    waitToRestore (5),
                    doNotRevert (6),
                    unknown (7) }
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The state of the protection domain.

        normal (1)
            -- both the protection and working paths are fully allocated
               and active
        protectionPathUnavailabe (2)
            -- the protection path is unavailable
        workingPathFailure (3)
            -- protection failure, the working path has reported a
               failure/degrade condition
        administrative (4)
            -- the operator has issued a command switching the user traffic
               to the protection path
        waitToRestore (5)
            -- the protection domain is recovering from a signal failure/signal
               degrade condition on the working path that is being controlled
               by the wait-to-restore(WTR) timer
        doNotRevert (6)
            -- the protection domain has recovered from a protecting state,
               but the operator has configured the protection domain to not
               automatically revert to the Nornmal state upon recovery.
        unknown (7)
            -- no board present
"
    ::= { psrMplsLinearProtEntry 6 }

psrMplsLinearProtLocalEvent OBJECT-TYPE
    SYNTAX      InputRequest
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The input request that is triggered locally.
        unknown (1)
            -- no board present
        noRequest (2)
            -- none of the input sources have generated any input locally
        lockOut (3)
            -- the operator requested to prevent switching data traffic
               to the protection path, for any purpose
        forcedSwitch (4)
            -- the operator requested that traffic be switched from working path
               to the protection path
        signalFailpPath (5)
            -- a failure condition is signaled on the protection path
        signalFailwPath (6)
            -- a failure condition is signaled on the working path
        manualSwitch (7)
            -- the operator requested that traffic be switched from the working
               path to the protection path, only relevant if there is no currently
               active fault condition or operator command
        waitToRestore (8)
            -- the remote end point has determined that the failure condition has
               recovered and has started its WTR timer in preparation for
               reverting to the normal state
        doNotRevert (9)
            -- the remote end point has determined that the failure condition has
               recovered and will continue transporting traffic on the protection
               path due to operator configuration that prevents automatic
               reversion to the normal state
"
    ::= { psrMplsLinearProtEntry 7 }

psrMplsLinearProtRemoteEvent OBJECT-TYPE
    SYNTAX      InputRequest
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The last received remote request.
        unknown (1)
            -- no board present
        noRequest (2)
            -- the remote end point has no abnormal condition to report
        lockOut (3)
            -- the remote end point is in unavailable state due to a 'lock out of
               protection' operator command
        forcedSwitch (4)
            -- the remote end point is operating under an operator command to
               switch the traffic to the protection path
        signalFailpPath (5)
            -- the remote end point has detected a signal fail condition on the
               protection path of the protection domain
        signalFailwPath (6)
            -- the remote end point has detected a signal fail condition on the
               working path of the protection domain
        manualSwitch (7)
            -- the remote end point is operating under an operator command to
               switch the traffic from the working path to the protection path
        waitToRestore (8)
            -- the remote end point has determined that the failure condition has
               recovered and has started its WTR timer in preparation for
               reverting to the normal state
        doNotRevert (9)
            -- the remote end point has determined that the failure condition has
               recovered and will continue transporting traffic on the protection
               path due to operator configuration that prevents automatic
               reversion to the normal state
        noConnection (10)
            -- the connection is not established with remote end point
"
    ::= { psrMplsLinearProtEntry 8 }

psrMplsLinearProtWorkingPathId OBJECT-TYPE
    SYNTAX      DisplayString
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "Identifier of the working path.
"
    DEFVAL { "" }
    ::= { psrMplsLinearProtEntry 9 }

psrMplsLinearProtWorkingPathIndex OBJECT-TYPE
    SYNTAX      Unsigned32 (1..2147483647)
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The index of the working path.
"
    ::= { psrMplsLinearProtEntry 10 }

psrMplsLinearProtWorkingPathState OBJECT-TYPE
    SYNTAX      PathState
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The status of the working path.
         down (1)     -- signal fail condition is reported
         up (2)       -- no abnormal condition
         unknown (3)  -- no board present
"
    ::= { psrMplsLinearProtEntry 11 }

psrMplsLinearProtWpathSupvType OBJECT-TYPE
    SYNTAX      SupvType
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Supervision type of the working/protection path in protection domain.
         layer1(1) -- the path state depends only on layer1 faults
                      on the local port.
         bfd (2)   -- the path is monitored by BFD session.
"
    ::= { psrMplsLinearProtEntry 12 }

psrMplsLinearProtProtectionPathId OBJECT-TYPE
    SYNTAX      DisplayString
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "Identifier of the protection path.
"
    DEFVAL { "" }
    ::= { psrMplsLinearProtEntry 13 }

psrMplsLinearProtProtectionPathIndex OBJECT-TYPE
    SYNTAX      Unsigned32 (1..2147483647)
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The index of the protection path.
"
    ::= { psrMplsLinearProtEntry 14 }

psrMplsLinearProtProtectionPathState OBJECT-TYPE
    SYNTAX      PathState
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The state of the protection path.
         down (1)     -- signal fail condition is reported
         up (2)       -- no abnormal condition
         unknown (3)  -- no board present
"
    ::= { psrMplsLinearProtEntry 15 }

psrMplsLinearProtPpathSupvType OBJECT-TYPE
    SYNTAX      SupvType
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Supervision type of the working/protection path in protection domain.
         layer1(1) -- the path state depends only on layer1 faults
                      on the local port.
         bfd (2)   -- the path is monitored by BFD session.
"
    ::= { psrMplsLinearProtEntry 16 }

psrMplsLinearProtActivePath OBJECT-TYPE
    SYNTAX      INTEGER {
                    workingPath (1),
                    protectionPath (2),
                    none (3),
                    unknown (4)}
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Indicates which path is transporting the traffic.
         workingPath (1)
             -- the data traffic is transported on working path
         protectionPath (2)
             -- the data traffic is transported on protection path
         none (3)
             -- the data traffic is not transported at all
         unknown (4)
             -- no board present
"
    ::= { psrMplsLinearProtEntry 17 }

psrMplsLinearProtOperatorCommand  OBJECT-TYPE
    SYNTAX      INTEGER {
                    noRequest (1),
                    lockOut (2),
                    forced (3),
                    manual (4) }
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "The operator command.
         Operator command may not be executed because an equal or higher priority
         local/remote event is in effect.
         noRequest (1)
            -- cancel an active local administrative command and send no request
         lockOut (2)
            -- lockout of protection, prevent switching data traffic
               to the protection path
         forced (3)
            -- forced switch the traffic from working path to the protection path
         manual (4)
            -- traffic be switched from the working path to the protection path,
               only relevant if there is no currently active fault condition
               or operator command
"
    DEFVAL { noRequest }
    ::= { psrMplsLinearProtEntry 18 }

psrMplsLinearProtHoldoffTimer OBJECT-TYPE
    SYNTAX      Unsigned32 (0..10000)
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "Hold-off timer coordinates timing of protection
         switches. When a signal fail event occurs, this event
         should not be reported before the hold-off timer
         has elapsed.
         Unit: milliseconds.

"
    DEFVAL { 0 }
    ::= { psrMplsLinearProtEntry 19 }

psrMplsLinearProtProtectionFailed OBJECT-TYPE
    SYNTAX      FaultStatus
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Failure detected on all available paths in tunnel.
"
    ::= { psrMplsLinearProtEntry 20 }

psrMplsLinearProtProtectionDegraded OBJECT-TYPE
    SYNTAX      FaultStatus
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Failure detected on working path or protection path, or traffic is locked
         to one path.
"
    ::= { psrMplsLinearProtEntry 21 }

psrMplsLinearProtCommunicationFailure OBJECT-TYPE
    SYNTAX      FaultStatus
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "No connection with far-end LER.
"
    ::= { psrMplsLinearProtEntry 22 }

psrMplsLinearProtConfigMismatch OBJECT-TYPE
    SYNTAX      FaultStatus
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Configuration of protection mode mismatch between local and far-end LER.
"
    ::= { psrMplsLinearProtEntry 23 }

-- ----------------------------------------------------
-- Notifications
-- ----------------------------------------------------


-- ----------------------------------------------------
-- Object and event groups
-- ----------------------------------------------------

psrGeneralGroupV1 OBJECT-GROUP
    OBJECTS {
        psrGeneralLastChangeTime,
        psrGeneralStateLastChangeTime,
        psrGeneralPsrMplsLinearProtTableSize}
    STATUS      current
    DESCRIPTION
        "The general objects."
    ::= { lumPsrGroups 1 }

psrMplsLinearProtGroupV1 OBJECT-GROUP
    OBJECTS {
        psrMplsLinearProtIndex,
        psrMplsLinearProtInternalReference,
        psrMplsLinearProtName,
        psrMplsLinearProtTunnelId,
        psrMplsLinearProtAdminStatus,
        psrMplsLinearProtState,
        psrMplsLinearProtLocalEvent,
        psrMplsLinearProtRemoteEvent,
        psrMplsLinearProtWorkingPathId,
        psrMplsLinearProtWorkingPathIndex,
        psrMplsLinearProtWorkingPathState,
        psrMplsLinearProtWpathSupvType,
        psrMplsLinearProtProtectionPathId,
        psrMplsLinearProtProtectionPathIndex,
        psrMplsLinearProtProtectionPathState,
        psrMplsLinearProtPpathSupvType,
        psrMplsLinearProtActivePath,
        psrMplsLinearProtOperatorCommand,
        psrMplsLinearProtHoldoffTimer,
        psrMplsLinearProtProtectionFailed,
        psrMplsLinearProtProtectionDegraded,
        psrMplsLinearProtCommunicationFailure,
        psrMplsLinearProtConfigMismatch }
    STATUS      current
    DESCRIPTION
        "The MPLS linear protection objects (R19.0)."
    ::= { lumPsrGroups 2 }

-- ----------------------------------------------------
-- Compliance
-- ----------------------------------------------------

lumPsrBasicComplV1 MODULE-COMPLIANCE
    STATUS      current
    DESCRIPTION
        "Basic implementation requirements for the PSR MIB. (R19.0)"
    MODULE
        MANDATORY-GROUPS {
            psrGeneralGroupV1,
            psrMplsLinearProtGroupV1 }
    ::= { lumPsrCompl 1 }

END


