--  =======================================================================
--  File          : oaAps.mib
--  Description   : Private MIB for APS supporting modules in Lambda Driver (DWDM/CWDM)
--                
--  By            : Maoz
--  Version       : Revision:   1.2
--  Original Date : September 15, 2011
--  Last Change   : Date:   July 30, 2012
--  =======================================================================
--
--
-- Copyright (c) 2001 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 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.
--
-- MRV retains the right to change this MIB without notification.
--
   OA-APS-MIB DEFINITIONS ::= BEGIN

	IMPORTS
            DisplayString           FROM RFC1213-MIB
            MODULE-IDENTITY, 
            OBJECT-TYPE, 
            Gauge32, enterprises,
            Integer32               FROM SNMPv2-SMI
            TEXTUAL-CONVENTION      FROM SNMPv2-TC
            MODULE-COMPLIANCE, 
            OBJECT-GROUP            FROM SNMPv2-CONF;


------------------------------------------------------------------------------
-- Object Identifier Definition
------------------------------------------------------------------------------

oaApsMIB    MODULE-IDENTITY
                  
    LAST-UPDATED "201207300000Z" -- Jul 30, 2012
    ORGANIZATION "MRV Communications, Inc."
    CONTACT-INFO
    "Maoz Yona
     MRV Communication, Inc
     http://www.mrv.com
     Email:  myona@mrv.com
    "
    DESCRIPTION
    "This management information module supports the
     configuration and management of the OTN-APS functionality."

    -- Revision history

    REVISION "201207300000Z" -- Jul 30, 2012
    DESCRIPTION
    "Revision 1.2:
        Changes: 
           1. Improved Descriptions of the MIB Objects."
   
    REVISION "201202070000Z" -- Feb 07, 2012
    DESCRIPTION
    "Revision 1.1:
        Changes:
           1. New object [oaApsModeVersion] added to the [oaApsModeConfigEntry].            
           2. New objects [oaApsConfigGroupCmdSwitchStatus] and [oaApsConfigGroupWorkingLineDefect]
              and [oaApsConfigGroupProtectLineDefect] are added to the [oaApsConfigGroupEntry].
           3. Unusable MIB's Node [oaApsMIBObjects] removed from the MIB's Tree.
           4. Few MIB Object's syntax changed from INTEGER to Integer32."

    REVISION "201109150000Z" -- Sep 15, 2011
    DESCRIPTION
    "Revision 1.0: Initial edition."
   
    ::= { oaLambdaDriver 20 }

------------------------------------------------------------------------------
-- MIB place Definition
------------------------------------------------------------------------------

oaccess                 OBJECT IDENTIFIER ::= { enterprises 6926 }
oaManagement            OBJECT IDENTIFIER ::= { oaccess 1 }
oaLambdaDriver          OBJECT IDENTIFIER ::= { oaManagement 41 }

oaApsConfig             OBJECT IDENTIFIER ::= { oaApsMIB 1 }
oaApsMIBNotifications   OBJECT IDENTIFIER ::= { oaApsMIB 2 }
oaApsMIBConformance     OBJECT IDENTIFIER ::= { oaApsMIB 3 }

------------------------------------------------------------------------------
-- Textual conventions
------------------------------------------------------------------------------

ApsSwitchCommand ::= TEXTUAL-CONVENTION
    STATUS       current
    DESCRIPTION
    "An Aps switch command allows a user to perform protection
     switch actions.

     The Switch command values are:

     noCmd

     This value should be returned by a read request when no 
     switch command has been written to the object in question
     since initialization. This value may not be used in a 
     write operation.

     clear

     Clears all of the switch commands listed below for the 
     specified group.

     lockoutOfProtection

     Prevents the working line port from switching to the
     protection line port, thus preventing any further APS switchovers for any reason,
     including manual or forced switchovers and signal failures. 

     forcedSwitchWorkToProtect

     Switches the working line to the protection line, if no lockout is
     in effect regardless of the status of the signal.

     forcedSwitchProtectToWork

     Switches the protected line to the working line, if no lockout is
     in effect regardless of the status of the signal.

     manualSwitchWorkToProtect

     Switches the working line to the protection line, if the signal is good
     and no lockout is in effect.

     manualSwitchProtectToWork

     Switches the protected line to the working line, if the signal is good
     and no lockout is in effect."

    SYNTAX   INTEGER {
             noCmd(1),
             clear(2),
             lockoutOfProtection(3),
             forcedSwitchWorkToProtect(4),
             forcedSwitchProtectToWork(5),
             manualSwitchWorkToProtect(6),
             manualSwitchProtectToWork(7)
    }

------------------------------------------------------------------------------
-- APS Mode Configuration Table
------------------------------------------------------------------------------

oaApsModeConfigTable OBJECT-TYPE
    SYNTAX  SEQUENCE OF OaApsModeConfigEntry
    MAX-ACCESS  not-accessible
    STATUS  current
    DESCRIPTION
    "The APS Mode Configuration Table."

    ::= { oaApsConfig 1 }

oaApsModeConfigEntry OBJECT-TYPE
    SYNTAX  OaApsModeConfigEntry
    MAX-ACCESS  not-accessible
    STATUS  current
    DESCRIPTION
    "An entry in the APS Configuration table."

    INDEX   { oaApsModeConfigSlotIndex }   

    ::= { oaApsModeConfigTable 1 }

OaApsModeConfigEntry ::= SEQUENCE {
     oaApsModeConfigSlotIndex          Integer32,
     oaApsModeConfigMode               INTEGER,
     oaApsModeConfigRevert             INTEGER, 
     oaApsModeConfigWaitToRestore      Integer32,
     oaApsModeConfigGroups             Gauge32,
     oaApsModeVersion                  Integer32
    }

oaApsModeConfigSlotIndex OBJECT-TYPE
    SYNTAX Integer32 (1..255)
    MAX-ACCESS  not-accessible
    STATUS  current
    DESCRIPTION
    "The slot#. An index from 1 to The number of slots."
    ::= { oaApsModeConfigEntry 1 }

oaApsModeConfigMode OBJECT-TYPE
    SYNTAX   INTEGER	{
             noAps(1),
             apsProtect(2)
    }
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
    "APS global mode. 
     noAps - APS is disabled.
     apsProtect - APS is enabled."
    ::= { oaApsModeConfigEntry 2 }

oaApsModeConfigRevert OBJECT-TYPE
    SYNTAX   INTEGER { 
             nonRevertive(1),
             revertive(2) 
    }
    MAX-ACCESS  read-write
    STATUS      current
	DESCRIPTION
    "The revertive mode of APS.

     nonRevertive

     Traffic remains on the protection line until another switch
     request is received.

     revertive

     When the condition that caused a switch to the protection
     line has been cleared the signal is switched back to the
     working line." 
    DEFVAL { nonRevertive }
    ::= { oaApsModeConfigEntry 3 }

oaApsModeConfigWaitToRestore OBJECT-TYPE
    SYNTAX      Integer32 (0..720)
    UNITS       "seconds"
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
    "The Wait To Restore period in seconds.
     This field only applies if revertive mode is enabled,
     otherwise this value is ignored. After clearing of a 
     condition that caused an automatic switch, the
     wait to restore period must elapse before reverting."
    DEFVAL { 300 }
    ::= { oaApsModeConfigEntry 4 }

oaApsModeConfigGroups OBJECT-TYPE
    SYNTAX      Gauge32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
    "The count of APS groups. This count includes all rows
     in ApsModeConfigTable."
    ::= { oaApsModeConfigEntry 5 }

oaApsModeVersion OBJECT-TYPE
    SYNTAX      Integer32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
    "APS version. Starts from value '2'. Indicates the APS version used in the Module.
     APS version should be updated upon any change of implementation."
    ::= { oaApsModeConfigEntry 6 }

------------------------------------------------------------------------------
-- APS Groups Configuration Table
------------------------------------------------------------------------------

oaApsConfigGroupTable OBJECT-TYPE
    SYNTAX  SEQUENCE OF OaApsConfigGroupEntry
    MAX-ACCESS  not-accessible
    STATUS  current
    DESCRIPTION
       "The APS Groups Configuration table.
        If OTN Module is working in the Topology Mode 'BiDirectional' 4 groups exist.
        Each group relates to one of the 4 ODU-1 entries.
        If OTN Module is working in the Topology Mode 'UniDirectional' 2 groups exist.
        First group relates to the 1-st Line Port of the OTN Module and
        second group relates to the 2-nd Line Port of this Module."
    ::= { oaApsConfig 5 }

    oaApsConfigGroupEntry OBJECT-TYPE
    SYNTAX  OaApsConfigGroupEntry
    MAX-ACCESS  not-accessible
    STATUS  current
    DESCRIPTION
    "An entry in the APS Groups Configuration table."

    INDEX   { oaApsConfigGroupSlotIndex, oaApsConfigGroupId }   

    ::= { oaApsConfigGroupTable 1 }

OaApsConfigGroupEntry ::= SEQUENCE {
     oaApsConfigGroupSlotIndex         Integer32,
     oaApsConfigGroupId                Integer32,
     oaApsConfigGroupName              DisplayString,
     oaApsConfigGroupPortMembers       OCTET STRING,
     oaApsConfigGroupWorkingLinePort   Integer32,
     oaApsConfigGroupProtectLinePort   Integer32,
     oaApsConfigGroupWorkingStatus     INTEGER,
     oaApsConfigGroupProtectStatus     INTEGER,
     oaApsConfigGroupCmdSwitchTrans    ApsSwitchCommand,
     oaApsConfigGroupCmdSwitchRec      ApsSwitchCommand,
     oaApsConfigGroupCmdSwitchStatus   ApsSwitchCommand,
     oaApsConfigGroupWorkingLineDefect BITS,
     oaApsConfigGroupProtectLineDefect BITS
    }

    oaApsConfigGroupSlotIndex OBJECT-TYPE
    SYNTAX Integer32 (1..255)
    MAX-ACCESS  not-accessible
    STATUS  current
    DESCRIPTION
    "The slot#. An index from 1 to The number of slots."
    ::= { oaApsConfigGroupEntry 1 }

oaApsConfigGroupId OBJECT-TYPE
    SYNTAX      Integer32 (1..255) 
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
    "Index of the APS group."
    ::= { oaApsConfigGroupEntry 2 }

oaApsConfigGroupName OBJECT-TYPE
    SYNTAX      DisplayString (SIZE (1..32))
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
    "A textual name for the APS group."
    ::= { oaApsConfigGroupEntry 3 }

oaApsConfigGroupPortMembers OBJECT-TYPE
    SYNTAX      OCTET STRING	(SIZE (1..32))
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
    "List of access ports belonging to that group."
    ::= { oaApsConfigGroupEntry 4 }

oaApsConfigGroupWorkingLinePort OBJECT-TYPE
    SYNTAX      Integer32 (1..255)
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
    "Index of working line-port (wdm-trunk)."
    ::= { oaApsConfigGroupEntry 5 }

oaApsConfigGroupProtectLinePort OBJECT-TYPE
    SYNTAX      Integer32 (1..255)
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
    "Index of protected line-port (wdm-trunk)."
    ::= { oaApsConfigGroupEntry 6 }

oaApsConfigGroupWorkingStatus OBJECT-TYPE
    SYNTAX   INTEGER	{
             inActive(1), 
             active(2),
             standBy(3)
    }
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
    "Status of the working line-port (wdm-trunk).
    inActive - Line port is not operational.
    active   - Line port is operational.
               For BiDirectional mode both Rx & Tx belong to the working channel,
               For UniDirectional mode only the Rx or the Tx fiber belongs to the working channel.
    standBy  - Line port is operational but in standBy mode.
               For BiDirectional mode both Rx & Tx belong to the working channel,
               For UniDirectional mode only the Rx or the Tx fiber belongs to the working channel."
    ::= { oaApsConfigGroupEntry 7 }

oaApsConfigGroupProtectStatus OBJECT-TYPE
    SYNTAX   INTEGER	{
             inActive(1), 
             active(2),
             standBy(3)
    }
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
    "Status of the working line-port (wdm-trunk).
    inActive - Line port is not operational.
    active   - Line port is operational.
               For BiDirectional mode both Rx & Tx belong to the protected channel,
               For UniDirectional mode only the Rx or the Tx fiber belongs to the protected channel.
    standBy  - Line port is operational but in standBy mode.
               For BiDirectional mode both Rx & Tx belong to protected channel,
               For UniDirectional mode only the Rx or the Tx fiber belongs to the protected channel."
    ::= { oaApsConfigGroupEntry 8 }

oaApsConfigGroupCmdSwitchTrans OBJECT-TYPE
    SYNTAX      ApsSwitchCommand 
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
    "Initiate switch command on an APS group."
    ::= { oaApsConfigGroupEntry 9 }
   
oaApsConfigGroupCmdSwitchRec OBJECT-TYPE
    SYNTAX      ApsSwitchCommand 
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
    "Current APS group switch command that was received."
    ::= { oaApsConfigGroupEntry 10 }

oaApsConfigGroupCmdSwitchStatus OBJECT-TYPE
    SYNTAX      ApsSwitchCommand 
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
    "Current APS group switch command status."
    ::= { oaApsConfigGroupEntry 11 }

oaApsConfigGroupWorkingLineDefect OBJECT-TYPE
    SYNTAX   BITS {
             noDefect  (0),
             odu1AIS   (1),
             otu2LOS   (2),
             otu2BDI   (3)
    }
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
    "This variable indicates the status of Defects occured in
     the Working Line Interface.
     Each Bit in the value represents the corresponding Defect.
     The whole value represents multiple defects simultaneously.
     The various Bit positions are:
    	0 - 'noDefect'
    	1 - 'odu1AIS' (Alarm Indication Signal)
    	2 - 'otu2LOS' (Loss Of Signal)
    	3 - 'otu2BDI' (Backward Defect Indication)
     In case of 'noDefect' - Bit# 0 will be equal to '1' and
     all other Bits will be equal to '0'."
    ::= { oaApsConfigGroupEntry 12 }

oaApsConfigGroupProtectLineDefect OBJECT-TYPE
    SYNTAX   BITS {
             noDefect  (0),
             odu1AIS   (1),
             otu2LOS   (2),
             otu2BDI   (3)
    }
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
    "This variable indicates the status of Defects occured in
     the Protected Line Interface.
     Each Bit in the value represents the corresponding Defect.
     The whole value represents multiple defects simultaneously.
     The various Bit positions are:
    	0 - 'noDefect'
    	1 - 'odu1AIS' (Alarm Indication Signal)
    	2 - 'otu2LOS' (Loss Of Signal)
    	3 - 'otu2BDI' (Backward Defect Indication)
     In case of 'noDefect' - Bit# 0 will be equal to '1' and
     all other Bits will be equal to '0'."
    ::= { oaApsConfigGroupEntry 13 }

------------------------------------------------------------------------------
--  Conformance Information 
------------------------------------------------------------------------------
 
oaApsMIBCompliances  OBJECT IDENTIFIER ::= { oaApsMIBConformance 1 }
oaApsMIBGroups       OBJECT IDENTIFIER ::= { oaApsMIBConformance 2 }

oaApsMIBCompliance   MODULE-COMPLIANCE
    STATUS current 
    DESCRIPTION 
    "The core compliance statement for all 
     'oaApsMib' MIB implementations."

    MODULE -- this module

    MANDATORY-GROUPS { 
                      oaApsMibMandatoryConfigMode,
                      oaApsMibMandatoryConfigGroupMode
                     }

    ::= { oaApsMIBCompliances 1 }

oaApsMibMandatoryConfigMode  OBJECT-GROUP
    OBJECTS { 
             oaApsModeConfigMode,
             oaApsModeConfigRevert,
             oaApsModeConfigWaitToRestore,
             oaApsModeConfigGroups,
             oaApsModeVersion
            }
    STATUS current 
    DESCRIPTION 
    "Mandatory objects for APS global parameters."

    ::= { oaApsMIBGroups 1 }

oaApsMibMandatoryConfigGroupMode  OBJECT-GROUP
    OBJECTS { 
             oaApsConfigGroupName,
             oaApsConfigGroupPortMembers,
             oaApsConfigGroupWorkingLinePort,
             oaApsConfigGroupProtectLinePort,
             oaApsConfigGroupWorkingStatus,
             oaApsConfigGroupProtectStatus,
             oaApsConfigGroupCmdSwitchTrans,
             oaApsConfigGroupCmdSwitchRec,
             oaApsConfigGroupCmdSwitchStatus,
             oaApsConfigGroupWorkingLineDefect,
             oaApsConfigGroupProtectLineDefect
            }
    STATUS current 
    DESCRIPTION 
    "Mandatory objects for APS global parameters."

    ::= { oaApsMIBGroups 2 }

END
    