-- *****************************************************************************
-- draft-ietf-atommib-sonetaps-mib-05.txt
--
-- Copyright (c) 2001 The Internet Society.
-- Copyright (c) 2001, 2002 Unisphere Networks, Inc.
-- Copyright (c) 2002 Juniper Networks, Inc.
--   All Rights Reserved.
--
-- Juniper Networks edits to this MIB:                              *** JUNI ***
--   06/20/01  kwc  Assigned an enterprise experimental OID.
--   03/14/02  kwc  Changed the identifier names by appending a prefix in order
--                  to avoid naming conflicts with the IETF version.
--   09/18/02  kwc  Replaced Unisphere names with Juniper names.
-- *****************************************************************************

APS-MIB-JUNI DEFINITIONS ::= BEGIN                               -- *** JUNI ***


   IMPORTS
        juniSonetApsExperiment                                   -- *** JUNI ***
          FROM Juniper-Experiment                                -- *** JUNI ***
                                                                 -- *** JUNI ***
        MODULE-IDENTITY, NOTIFICATION-TYPE,
        OBJECT-TYPE,
        Gauge32, Counter32, Integer32 -- ,                          *** JUNI ***
--      transmission                                                *** JUNI ***
          FROM SNMPv2-SMI

        TEXTUAL-CONVENTION, RowStatus,
             TimeStamp
          FROM SNMPv2-TC

        SnmpAdminString
          FROM SNMP-FRAMEWORK-MIB

        InterfaceIndex
          FROM IF-MIB

        MODULE-COMPLIANCE, OBJECT-GROUP, NOTIFICATION-GROUP
          FROM SNMPv2-CONF;

   junidApsMIB MODULE-IDENTITY
       LAST-UPDATED    "200105242300Z"
       ORGANIZATION        "IETF AToMMIB Working Group"
       CONTACT-INFO
           "       Jeff Johnson
                   Postal: RedBack Networks. Inc.
                   350 Holger Way
                   San Jose, CA 95134-1362
                   Tel: +1 408 571 5460
                   Email: jeff@redback.com

                   Michael Thatcher
                   Postal: RedBack Networks. Inc.
                   350 Holger Way
                   San Jose, CA 95134-1362
                   Tel: +1 408 571 5449
                   Email: thatcher@redback.com

                   Jim Kuhfeld
                   Postal: RedBack Networks. Inc.
                   350 Holger Way
                   San Jose, CA 95134-1362
                   Tel: +1 408 571 5465
                   Email: jkuhfeld@redback.com"
       DESCRIPTION
           "This management information module supports the configuration and
            management of SONET linear APS groups.  The definitions and
            descriptions used in this mib have been derived from
            Synchronous Optical Network (SONET) Transport Systems:
            Common Generic Criteria, GR-253-CORE Revision 2, January 1999,
            section 5.3. The MIB is also consistent with the Multiplex
            Section Protection (MSP) protocol as specified in ITU-T
            Recommendation G.783, Characteristics of synchronous digital
            hierarchy (SDH) equipment function blocks, Annex A and B.
            "
       REVISION      "200105242300Z"
       DESCRIPTION
       "Initial version of this MIB, published as RFC xxxx."
       -- xxxx to be assigned by RFC-Editor
--         ::= { transmission  XX }                                 *** JUNI ***
   -- assign XX
   -- remove this notice from the MIB
           ::= { juniSonetApsExperiment 1 }                      -- *** JUNI ***
   -- Juniper experimental MIB;                                     *** JUNI ***
   -- will be retired when a transmission value is assigned.        *** JUNI ***

   junidApsMIBObjects OBJECT IDENTIFIER
        ::= { junidApsMIB 1 }

   junidApsMIBNotifications OBJECT IDENTIFIER
        ::= { junidApsMIB 2 }

   junidApsMIBConformance OBJECT IDENTIFIER
        ::= { junidApsMIB 3 }

   JunidApsK1K2 ::= TEXTUAL-CONVENTION
       STATUS current
       DESCRIPTION
       "This Textual Convention describes an object that stores
        a SONET K1 and K2 byte APS protocol field.

       K1 is located in the first octet, K2 is located in
       the second octet. Bits are numbered from left to right.

       Bits 1-4 of the K1 byte indicate a request.

       1111  Lockout of Protection
       1110  Forced Switch
       1101  SF - High Priority
       1100  SF - Low Priority
       1011  SD - High Priority
       1010  SD - Low Priority
       1001  not used
       1000  Manual Switch
       0111  not used
       0110  Wait-to-Restore
       0101  not used
       0100  Exercise
       0011  not used
       0010  Reverse Request
       0001  Do Not Revert
       0000  No Request

       Bits 5-8 of the K1 byte indicate the channel associated with the
       request defined in bits 1-4.

       0000 is the Null channel.

       1-14 are working channels.
       15   is the extra traffic channel

       Bits 1-4 of the K2 byte indicate a channel. The channel is
       defined with the same syntax as K1 Bits 5-8.

       Bit 5 of the K2 byte indicates the
       architecture.

       0 if the architecture is 1+1
       1 if the architecture is 1:n

       Bits 6-8 of the K2 byte indicates the
       mode.

       000 - 011 are reserved for future use

       100  indicates the mode is unidirectional
       101  indicates the mode is bidirectional

       110  RDI-L

       111  AIS-L
       "
       REFERENCE
           "Bellcore (Telcordia Technologies) GR-253-CORE, Issue 2,
           Revision 2 (January 1999), 5.3.5."
       SYNTAX      OCTET STRING (SIZE (2))

   JunidApsSwitchCommand ::= 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
        channel.

        lockoutOfProtection

        Prevents any of the working channels from switching to the protection
        line. The specified channel should be the protection channel.

        forcedSwitchWorkToProtect

        Switches the specified working channel to the protection line.

        forcedSwitchProtectToWork

        Switches the working channel back from the protection
        line to the working line. The specified channel should be
        the protection channel.

        manualSwitchWorkToProtect

        Switches the specified working channel to the protection line.

        manualSwitchProtectToWork

        Switches the working channel back from the protection
        line to the working line. The specified channel should be
        the protection channel.

        exercise

        Exercises the protocol for a protection switch of the specified
        channel by issuing an Exercise request for that channel and
        checking the response on the APS channel.
                "
       SYNTAX       INTEGER {
                        noCmd(1),
                        clear(2),
                        lockoutOfProtection(3),
                        forcedSwitchWorkToProtect(4),
                        forcedSwitchProtectToWork(5),
                        manualSwitchWorkToProtect(6),
                        manualSwitchProtectToWork(7),
                        exercise(8)
                    }

   JunidApsControlCommand ::= TEXTUAL-CONVENTION
       STATUS       current
       DESCRIPTION
       "An APS control command applies only to LTE that support the
        1:n architecture and performs the following actions.

        The Control command values are:

        noCmd

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

        lockoutWorkingChannel

        Prevents the specified working channel from switching to the protection
        line.

        clearLockoutWorkingChannel

        Clears the lockout a working channel command for the channel specified.
                "
       SYNTAX       INTEGER {
                        noCmd(1),
                        lockoutWorkingChannel(2),
                        clearLockoutWorkingChannel(3)
                    }

   --
   -- APS Configuration Table
   --
   -- This table supports the addition, configuration and deletion of APS
   -- groups.
   --
   junidApsConfig     OBJECT IDENTIFIER ::= { junidApsMIBObjects 1 }

   junidApsConfigGroups OBJECT-TYPE
       SYNTAX      Gauge32
       MAX-ACCESS  read-only
       STATUS      current
       DESCRIPTION
           "The count of APS groups. This count includes all rows in
            junidApsConfigTable."
       ::= { junidApsConfig 1 }

   junidApsConfigTable OBJECT-TYPE
       SYNTAX      SEQUENCE OF JunidApsConfigEntry
       MAX-ACCESS  not-accessible
       STATUS      current
       DESCRIPTION
           "This table lists the APS groups that have been configured
            on the system."
       ::= { junidApsConfig 2 }

   junidApsConfigEntry OBJECT-TYPE
       SYNTAX      JunidApsConfigEntry
       MAX-ACCESS  not-accessible
       STATUS      current
       DESCRIPTION
           "A conceptual row in the junidApsConfigTable."
       INDEX { IMPLIED junidApsConfigName }
       ::= { junidApsConfigTable  1 }

   JunidApsConfigEntry ::= SEQUENCE {
       junidApsConfigName                  SnmpAdminString,
       junidApsConfigRowStatus             RowStatus,
       junidApsConfigMode                  INTEGER,
       junidApsConfigRevert                INTEGER,
       junidApsConfigDirection             INTEGER,
       junidApsConfigExtraTraffic          INTEGER,
       junidApsConfigSdBerThreshold        Integer32,
       junidApsConfigSfBerThreshold        Integer32,
       junidApsConfigWaitToRestore         Integer32,
       junidApsConfigCreationTime          TimeStamp
   }

   junidApsConfigName OBJECT-TYPE
       SYNTAX      SnmpAdminString (SIZE (1..32))
       MAX-ACCESS  not-accessible
       STATUS      current
       DESCRIPTION
           "A textual name for the APS group.
           "
       ::= { junidApsConfigEntry 1 }

   junidApsConfigRowStatus OBJECT-TYPE
       SYNTAX      RowStatus
       MAX-ACCESS  read-create
       STATUS      current
       DESCRIPTION
           "The status of this APS group entry.

           An entry may not exist in the active state unless all
           objects in the entry have an appropriate value. Also,
           all associated junidApsChanConfigEntry rows must represent
           a set of consecutive channel numbers beginning with
           0 or 1, depending on the selected architecture.

           When set to notInService changes may be made to junidApsConfigMode,
           junidApsConfigRevert, junidApsConfigDirection, junidApsConfigExtraTraffic,
           junidApsConfigSdBerThreshold, junidApsConfigSfBerThreshold,
           and junidApsConfigWaitToRestore. Also, associated junidApsChanConfigTable
           objects may be added, deleted and modified.
           "
       ::= { junidApsConfigEntry 2 }

   junidApsConfigMode OBJECT-TYPE
       SYNTAX      INTEGER {
                           onePlusOne(1),
                           oneToN(2),
                           onePlusOneCompatible(3),
                           onePlusOneOptimized(4)
                           }
       MAX-ACCESS  read-create
       STATUS      current
       DESCRIPTION
          "The architecture of the APS group.

           onePlusOne

           The 1+1 architecture permanently bridges the working
           line to the protection line.

           oneToN

           The 1:n architecture allows one protection channel to
           protect up to n working channels. When a fault is detected
           on one of the n working channels that channel is bridged
           over the protection channel.

           onePlusOneCompatible

           This refers to 1 + 1 bidirectional switching compatible with
           1:n bidirectional switching as specified in ITU-T
           Recommendation G.783 (04/97) section A.3.4.1. Since this
           mode necessitates bidirectional switching, junidApsConfigDirection
           must be set to bidirectional whenever onePlusOneCompatible is set.

           onePlusOneOptimized

           This refers to 1 + 1 bidirectional switching optimized
           for a network using predominantly 1 + 1 bidirectional
           switching as specified in ITU-T Recommendation G.783 (04/97)
           section B.1. Since this mode necessitates bidirectional
           switching, junidApsConfigDirection must be set to bidirectional
           whenever onePlusOneOptimized is set.

           This object may not be modified if the associated
           junidApsConfigRowStatus object is equal to active(1)."
       DEFVAL {onePlusOne}
       ::= { junidApsConfigEntry 3 }

   junidApsConfigRevert OBJECT-TYPE
       SYNTAX      INTEGER { nonrevertive(1), revertive(2) }
       MAX-ACCESS  read-create
       STATUS      current
       DESCRIPTION
          "The revertive mode of the APS group.

           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. Since switching is revertive with the 1:n
           architecture, junidApsConfigRevert must be set to revertive if
           junidApsConfigMode is set to oneToN.

           Switching may optionally be revertive with the 1+1 architecture.

           This object may not be modified if the associated
           junidApsConfigRowStatus object is equal to active(1).
           "
       DEFVAL { nonrevertive }
       ::= { junidApsConfigEntry 4 }

   junidApsConfigDirection OBJECT-TYPE
       SYNTAX      INTEGER { unidirectional(1), bidirectional(2) }
       MAX-ACCESS  read-create
       STATUS      current
       DESCRIPTION
          "The directional mode of the APS group.

           unidirectional

           The unidirectional mode provides protection in one direction.

           bidirectional

           The bidirectional mode provides protection in both
           directions.

           This object may not be modified if the associated
           junidApsConfigRowStatus object is equal to active(1).
           "
       DEFVAL {unidirectional}
       ::= { junidApsConfigEntry 5 }

   junidApsConfigExtraTraffic OBJECT-TYPE
       SYNTAX      INTEGER { enabled(1), disabled(2) }
       MAX-ACCESS  read-create
       STATUS      current
       DESCRIPTION
          "This object enables or disables the transfer of extra traffic
           on the protection channel in a 1:n architecture. This object
           must be set to disabled if the architecture is 1+1. It may be
           necessary to disable this in order to interwork with other SONET
           network elements that don't support extra traffic.

           This object may not be modified if the associated
           junidApsConfigRowStatus object is equal to active(1).
           "
       DEFVAL { disabled }
       ::= { junidApsConfigEntry 6 }

   junidApsConfigSdBerThreshold OBJECT-TYPE
       SYNTAX      Integer32 (5..9)
       MAX-ACCESS  read-create
       STATUS      current
       DESCRIPTION
           "The Signal Degrade Bit Error Rate.

            The negated value of this number is used as the exponent of
            10 for computing the threshold value for the Bit Error Rate
            (BER). For example, a value of 5 indicates a BER threshold of
            10^-5.

           This object may be modified if the associated
           junidApsConfigRowStatus object is equal to active(1)."
       DEFVAL { 5 }
       ::= { junidApsConfigEntry 7 }

   junidApsConfigSfBerThreshold OBJECT-TYPE
       SYNTAX      Integer32 (3..5)
       MAX-ACCESS  read-create
       STATUS      current
       DESCRIPTION
           "The Signal Failure Bit Error Rate.

            The negated value of this number is used as the exponent of
            10 for computing the threshold value for the Bit Error Rate
            (BER). For example, a value of 5 indicates a BER threshold of
            10^-5.

           This object may be modified if the associated
           junidApsConfigRowStatus object is equal to active(1)."
       DEFVAL { 3 }
       ::= { junidApsConfigEntry 8 }

   junidApsConfigWaitToRestore OBJECT-TYPE
       SYNTAX      Integer32 (0..720)
       UNITS       "seconds"
       MAX-ACCESS  read-create
       STATUS      current
       DESCRIPTION
           "The Wait To Restore period in seconds.

            After clearing of a condition that necessitated an
            automatic switch, the wait to restore period must elapse
            before reverting. This is intended to avoid rapid switch
            oscillations.

            GR-253-CORE specifies a Wait To Restore range of 5 to 12
            minutes. G.783 defines a 5 to 12 minute Wait To Restore
            range in section 5.4.1.1.3, but also allows for a shorter
            WTR period in  Table 2-1,
            WaitToRestore value (MI_WTRtime: 0..(5)..12 minutes).

            This object may not be modified if the associated
            junidApsConfigRowStatus object is equal to active(1)."
       DEFVAL { 300 }
       ::= { junidApsConfigEntry 9 }

   junidApsConfigCreationTime OBJECT-TYPE
       SYNTAX      TimeStamp
       MAX-ACCESS  read-only
       STATUS      current
       DESCRIPTION
           "The value of sysUpTime at the time the row was
            created"
       ::= { junidApsConfigEntry 10 }

   --
   -- APS Status Table
   --
   -- This table provides APS group statistics.
   --

   junidApsStatusTable OBJECT-TYPE
       SYNTAX      SEQUENCE OF JunidApsStatusEntry
       MAX-ACCESS  not-accessible
       STATUS      current
       DESCRIPTION
           "This table provides status information about APS groups that have
            been configured on the system."
       ::= { junidApsMIBObjects 2 }

   junidApsStatusEntry OBJECT-TYPE
       SYNTAX      JunidApsStatusEntry
       MAX-ACCESS  not-accessible
       STATUS      current
       DESCRIPTION
           "A conceptual row in the junidApsStatusTable. Entries in this
            table are created as a side effect of row addition in
            junidApsConfigTable."
       INDEX { IMPLIED junidApsConfigName}
       ::= { junidApsStatusTable  1 }

   JunidApsStatusEntry ::= SEQUENCE {
       junidApsStatusK1K2Rcv               JunidApsK1K2,
       junidApsStatusK1K2Trans             JunidApsK1K2,
       junidApsStatusCurrent               BITS,
       junidApsStatusModeMismatches        Counter32,
       junidApsStatusChannelMismatches     Counter32,
       junidApsStatusPSBFs                 Counter32,
       junidApsStatusFEPLFs                Counter32,
       junidApsStatusSwitchedChannel       Integer32
   }

   junidApsStatusK1K2Rcv OBJECT-TYPE
       SYNTAX      JunidApsK1K2
       MAX-ACCESS  read-only
       STATUS      current
       DESCRIPTION
       "The current value of the K1 and K2 bytes received on the
        protection channel."
       ::= { junidApsStatusEntry 1 }

   junidApsStatusK1K2Trans OBJECT-TYPE
       SYNTAX        JunidApsK1K2
       MAX-ACCESS    read-only
       STATUS        current
       DESCRIPTION
       "The current value of the K1 and K2 bytes transmitted on the
        protection channel."
       ::= { junidApsStatusEntry 2 }

   junidApsStatusCurrent OBJECT-TYPE
       SYNTAX      BITS {
                     modeMismatch(0),
                     channelMismatch(1),
                     psbf(2),
                     feplf(3),
                     extraTraffic(4)
                    }
       MAX-ACCESS  read-only
       STATUS      current
       DESCRIPTION
       "The current status of the APS group.

        modeMismatch

        Modes other than 1+1 unidirectional monitor protection line
        K2 bit 5, which indicates the architecture and K2 bits
        6-8, which indicate if the mode is unidirectional or
        bidirectional. A conflict between the current local mode
        and the received K2 mode information constitutes a
        mode mismatch.

        channelMismatch

        This bit indicates a  mismatch between the transmitted K1 channel
        and the received K2 channel has been detected.

        psbf

        This bit indicates a Protection Switch Byte Failure (PSBF) is
        in effect. This condition occurs when either an inconsistent
        APS byte or an invalid code is detected. An inconsistent APS
        byte occurs when no three consecutive K1 bytes of the last 12
        successive frames are identical, starting with the last frame
        containing a previously consistent byte. An invalid code occurs
        when the incoming K1 byte contains an unused code or a code
        irrelevant for the specific switching operation (e.g., Reverse
        Request while no switching request is outstanding) in three
        consecutive frames. An invalid code also occurs when the incoming
        K1 byte contains an invalid channel number in three consecutive
        frames.

        feplf

        Modes other than 1+1 unidirectional monitor the K1 byte
        for Far-End Protection-Line failures. A Far-End
        Protection-Line defect is declared based on receiving
        SF on the protection line.

        extraTraffic

        This bit indicates whether extra traffic is currently being
        accepted on the protection line.
       "
       ::= { junidApsStatusEntry 3 }

   junidApsStatusModeMismatches OBJECT-TYPE
       SYNTAX     Counter32
       MAX-ACCESS read-only
       STATUS     current
       DESCRIPTION
           "A count of Mode Mismatch conditions."
       ::= { junidApsStatusEntry 4 }

   junidApsStatusChannelMismatches OBJECT-TYPE
       SYNTAX     Counter32
       MAX-ACCESS read-only
       STATUS     current
       DESCRIPTION
           "A count of Channel Mismatch conditions."
       ::= { junidApsStatusEntry 5 }

   junidApsStatusPSBFs OBJECT-TYPE
       SYNTAX     Counter32
       MAX-ACCESS read-only
       STATUS     current
       DESCRIPTION
           "A count of Protection Switch Byte Failure conditions.
            This condition occurs when either an inconsistent APS
            byte or an invalid code is detected. An inconsistent APS
            byte occurs when no three consecutive K1 bytes of the last
            12 successive frames are identical, starting with the last
            frame containing a previously consistent byte. An invalid
            code occurs when the incoming K1 byte contains an unused
            code or a code irrelevant for the specific switching operation
            (e.g., Reverse Request while no switching request is outstanding)
            in three consecutive frames. An invalid code also occurs
            when the incoming K1 byte contains an invalid channel number
            in three consecutive frames."
       ::= { junidApsStatusEntry 6 }

   junidApsStatusFEPLFs OBJECT-TYPE
       SYNTAX     Counter32
       MAX-ACCESS read-only
       STATUS     current
       DESCRIPTION
           "A count of Far-End Protection-Line Failure conditions.
            This condition is declared based on receiving SF on
            the protection line in the K1 byte."
       ::= { junidApsStatusEntry 7 }

   junidApsStatusSwitchedChannel OBJECT-TYPE
       SYNTAX     Integer32
       MAX-ACCESS read-only
       STATUS     current
       DESCRIPTION
           "This field is set to the number of the channel that is currently
            switched to protection. The value 0 indicates no channel is
            switched to protection. The values 1-14 indicate that working
            channel is switched to protection."
       ::= { junidApsStatusEntry 8 }


   --
   -- APS Map Group
   --
   -- Lists the SONET LTE interfaces that may be used to create APS groups.
   --
   junidApsMap      OBJECT IDENTIFIER ::= { junidApsMIBObjects 3 }

   junidApsChanLTEs OBJECT-TYPE
       SYNTAX      Gauge32
       MAX-ACCESS  read-only
       STATUS      current
       DESCRIPTION
           "The count of SONET LTE interfaces on the system.
            Each interface that is included has an ifType value of sonet(39)."
       ::= { junidApsMap 1 }

   junidApsMapTable OBJECT-TYPE
       SYNTAX      SEQUENCE OF JunidApsMapEntry
       MAX-ACCESS  not-accessible
       STATUS      current
       DESCRIPTION
           "This table lists the SONET LTE interfaces on the system.
            Each interface that is listed has an ifType value of sonet(39)."
       ::= { junidApsMap 2 }

   junidApsMapEntry OBJECT-TYPE
       SYNTAX      JunidApsMapEntry
       MAX-ACCESS  not-accessible
       STATUS      current
       DESCRIPTION
           "A conceptual row in the junidApsMapTable."
       INDEX { junidApsMapIfIndex }
       ::= { junidApsMapTable  1 }

   JunidApsMapEntry ::= SEQUENCE {
       junidApsMapIfIndex               InterfaceIndex,
       junidApsMapGroupName             SnmpAdminString,
       junidApsMapChanNumber            Integer32
   }

   junidApsMapIfIndex OBJECT-TYPE
       SYNTAX     InterfaceIndex
       MAX-ACCESS not-accessible
       STATUS     current
       DESCRIPTION
       "The Interface Index assigned to a SONET LTE. This is an interface
        with ifType sonet(39)."
       ::= { junidApsMapEntry 1 }

   junidApsMapGroupName OBJECT-TYPE
       SYNTAX      SnmpAdminString (SIZE (0..32))
       MAX-ACCESS  read-only
       STATUS      current
       DESCRIPTION
           "A textual name for the APS group which this channel is
            included in. If the channel is not part of an APS group
            this value is set to a string of size 0.

            When an instance of junidApsChanConfigIfIndex is set equal to an
            instance of junidApsMapIfIndex, junidApsMapGroupName is set equal
            to the corresponding value of junidApsChanConfigGroupName.

            If the junidApsMapIfIndex ceases to be equal to an instance of
            junidApsChanConfigIfIndex, either because of a change in the value of
            junidApsChanConfigIfIndex, or because of row deletion in the
            junidApsChanConfigTable, junidApsMapGroupName is set to a string of
            size 0.
           "
       ::= { junidApsMapEntry 2 }

   junidApsMapChanNumber OBJECT-TYPE
       SYNTAX     Integer32 (-1..14)
       MAX-ACCESS read-only
       STATUS     current
       DESCRIPTION
       "This field is set to a unique channel number within an APS group.
        The value 0 indicates the null channel. The values 1-14 define a
        working channel. If the SONET LTE is not part of an APS group this
        value is set to -1.

        When an instance of junidApsChanConfigIfIndex is set equal to an instance
        of junidApsMapIfIndex, junidApsMapChanNumber is set equal to the
        corresponding value of junidApsChanConfigNumber.

        If the junidApsMapIfIndex ceases to be equal to an instance of
        junidApsChanConfigIfIndex, either because of a change in the value of
        junidApsChanConfigIfIndex, or because of row deletion in the
        junidApsChanConfigTable, junidApsMapChanNumber is set to -1.
       "
       ::= { junidApsMapEntry 3 }


   --
   -- APS Channel Configuration Table
   --
   -- This table supports the addition, configuration and deletion of channels
   -- in APS groups.
   --
   junidApsChanConfigTable OBJECT-TYPE
       SYNTAX      SEQUENCE OF JunidApsChanConfigEntry
       MAX-ACCESS  not-accessible
       STATUS      current
       DESCRIPTION
           "This table lists the APS channels that have been configured
            in APS groups."
       ::= { junidApsMIBObjects 4 }

   junidApsChanConfigEntry OBJECT-TYPE
       SYNTAX      JunidApsChanConfigEntry
       MAX-ACCESS  not-accessible
       STATUS      current
       DESCRIPTION
           "A conceptual row in the junidApsChanConfigTable."
       INDEX { junidApsChanConfigGroupName, junidApsChanConfigNumber}
       ::= { junidApsChanConfigTable  1 }

   JunidApsChanConfigEntry ::= SEQUENCE {
       junidApsChanConfigGroupName             SnmpAdminString,
       junidApsChanConfigNumber                Integer32,
       junidApsChanConfigRowStatus             RowStatus,
       junidApsChanConfigIfIndex               InterfaceIndex,
       junidApsChanConfigPriority              INTEGER
   }

   junidApsChanConfigGroupName OBJECT-TYPE
       SYNTAX      SnmpAdminString (SIZE (1..32))
       MAX-ACCESS  not-accessible
       STATUS      current
       DESCRIPTION
           "A textual name for the APS group which this channel is
            included in."
       ::= { junidApsChanConfigEntry 1 }

   junidApsChanConfigNumber OBJECT-TYPE
       SYNTAX     Integer32 (0..14)
       MAX-ACCESS not-accessible
       STATUS     current
       DESCRIPTION
       "This field is set to a unique channel number within an APS group.
        The value 0 indicates the null channel. The values 1-14 define a
        working channel.

        This field must be assigned a unique number within the group."
       ::= { junidApsChanConfigEntry 2 }

   junidApsChanConfigRowStatus OBJECT-TYPE
       SYNTAX      RowStatus
       MAX-ACCESS  read-create
       STATUS      current
       DESCRIPTION
           "The status of this APS channel entry.

           An entry may not exist in the active state unless all
           objects in the entry have an appropriate value.

           A row in the junidApsChanConfigTable may not be created,
           deleted, set to notInService or otherwise modified
           if the junidApsChanConfigGroupName value is equal to an
           junidApsConfigName value and the associated junidApsConfigRowStatus
           object is equal to active. However, if the junidApsConfigRowStatus
           object is equal to notInService, a row may be created, deleted
           or modified. In other words, a channel may not be added, deleted
           or modified if the group is active.

           A row may be created with an junidApsChanConfigGroupName value
           that is not equal to any existing instance of junidApsConfigName.
           This action is the initial step in adding a SONET LTE to a
           new APS group.

           If this object is set to destroy, the associated instance
           of junidApsMapGroupName will be set to a string of size 0 and
           the junidApsMapChanNumber will be set to -1. The channel status
           entry will also be deleted by this action.

           junidApsChanConfigNumber must be set to a unique channel number within
           the APS group. The value 0 indicates the null channel.
           The values 1-14 define a working channel. When an attempt is
           made to set the  corresponding junidApsConfigRowStatus field to
           active the junidApsChanConfigNumber values of all entries with equal
           junidApsChanConfigGroupName fields must represent a set of consecutive
           integer values beginning with 0 or 1, depending on the architecture
           of the group, and ending with n, where n is  greater than or
           equal to 1 and less than or equal to 14. Otherwise, the error
           inconsistentValue is returned to the junidApsConfigRowStatus
           set attempt.
           "
       ::= { junidApsChanConfigEntry 3 }

   junidApsChanConfigIfIndex OBJECT-TYPE
       SYNTAX     InterfaceIndex
       MAX-ACCESS read-create
       STATUS     current
       DESCRIPTION
       "The Interface Index assigned to a SONET LTE. This is an
        interface with ifType sonet(39). The value of this object
        must be unique among all instances of junidApsChanConfigIfIndex.
        In other words, a particular SONET LTE can only be configured in
        one APS group.

        This object cannot be set if the junidApsChanConfigGroupName instance
        associated with this row is equal to an instance of junidApsConfigName and
        the corresponding junidApsConfigRowStatus object is set to active.  In
        other words this value cannot be changed if the APS group is active.
        However, This value may be changed if the junidApsConfigRowStatus value is
        equal to notInService.  "
       ::= { junidApsChanConfigEntry 4 }

   junidApsChanConfigPriority OBJECT-TYPE
       SYNTAX     INTEGER {low(1), high(2)}
       MAX-ACCESS read-create
       STATUS     current
       DESCRIPTION
           "The priority of the channel.

            This field deterimines whether high or low priority
            SD and SF codes are used in K1 requests.

           This field is only applicable if the channel is to be included in
           a group using the 1:n architecture. It is not applicable if the
           channel is to be included in a group using the 1+1 architecture,
           and is ignored in that case.

           This object cannot be set if the junidApsChanConfigGroupName instance
           associated with this row is equal to an instance of junidApsConfigName
           and the corresponding junidApsConfigRowStatus object is set to active.
           In other words this value cannot be changed if the APS group is
           active. However, This value may be changed if the
           junidApsConfigRowStatus value is equal to notInService.
           "
       DEFVAL { low }
       ::= { junidApsChanConfigEntry 5 }


   --
   -- APS Command Table
   --
   -- This table provides the ability to initiate APS commands.
   --
   junidApsCommandTable OBJECT-TYPE
       SYNTAX      SEQUENCE OF JunidApsCommandEntry
       MAX-ACCESS  not-accessible
       STATUS      current
       DESCRIPTION
           "This table allows commands to be sent to configured APS groups."
       ::= { junidApsMIBObjects 5 }

   junidApsCommandEntry OBJECT-TYPE
       SYNTAX      JunidApsCommandEntry
       MAX-ACCESS  not-accessible
       STATUS      current
       DESCRIPTION
           "A conceptual row in the junidApsCommandTable. This row exists only if
            the associated junidApsConfigEntry is active."
       INDEX { junidApsChanConfigGroupName, junidApsChanConfigNumber}
       ::= { junidApsCommandTable  1 }

   JunidApsCommandEntry ::= SEQUENCE {
       junidApsCommandSwitch         JunidApsSwitchCommand,
       junidApsCommandControl        JunidApsControlCommand
   }

   junidApsCommandSwitch OBJECT-TYPE
       SYNTAX      JunidApsSwitchCommand
       MAX-ACCESS  read-write
       STATUS      current
       DESCRIPTION
       "Allows the initiation of an APS switch command on the
        APS group and channel specified by the index values.

        If the APS switch command cannot be executed because an
        equal or higer priority request is in effect, an error
        is returned.

        When read this object returns the last command written
        or noCmd if no command has been written to this
        channel since initialization. The return of the last command
        written does not imply that this command is currently in effect.
        This request may have been preempted by a higher priority
        local or remote request. In order to determine the
        current state of the APS group it is necessary to read
        the objects junidApsStatusK1K2Rcv and junidApsStatusK1K2Trans.

        The value lockoutOfProtection should only be applied
        to the protection line channel since that switch command
        prevents any of the working channels from switching to the protection
        line. Following the same logic, forcedSwitchProtectToWork and
        manualSwitchProtectToWork should only be applied to the protection
        line channel.

        forcedSwitchWorkToProtect and manualSwitchWorkToProtect
        should only be applied to a working channel.
        "
       ::= { junidApsCommandEntry 1 }

   junidApsCommandControl OBJECT-TYPE
       SYNTAX      JunidApsControlCommand
       MAX-ACCESS  read-write
       STATUS      current
       DESCRIPTION
       "Allows the initiation of an APS control command on the
        APS group and channel specified by the index values.

        When read this object returns the last command written
        or noCmd if no command has been
        written to this channel since initialization.

        This object does not apply to the protection line.
        "
       ::= { junidApsCommandEntry 2 }

   --
   -- APS Channel Status Table
   --
   -- This table provides APS channel statistics.
   --
   junidApsChanStatusTable OBJECT-TYPE
       SYNTAX      SEQUENCE OF JunidApsChanStatusEntry
       MAX-ACCESS  not-accessible
       STATUS      current
       DESCRIPTION
           "This table contains status information for all SONET LTE
            interfaces that are included in APS groups."
       ::= { junidApsMIBObjects 6 }

   junidApsChanStatusEntry OBJECT-TYPE
       SYNTAX      JunidApsChanStatusEntry
       MAX-ACCESS  not-accessible
       STATUS      current
       DESCRIPTION
           "A conceptual row in the junidApsChanStatusTable. A row in this
            table is created as a side effect of row addition in the
            junidApsChanConfigTable. The junidApsChanStatusTable row exists
            as long as the junidApsChanConfigTable entry exists, regardless
            of whether the associated junidApsChanConfigRowStatus is active.
            "
       INDEX { junidApsChanConfigGroupName, junidApsChanConfigNumber}
       ::= { junidApsChanStatusTable  1 }

   JunidApsChanStatusEntry ::= SEQUENCE {
       junidApsChanStatusCurrent                BITS,
       junidApsChanStatusSignalDegrades        Counter32,
       junidApsChanStatusSignalFailures        Counter32,
       junidApsChanStatusSwitchovers           Counter32,
       junidApsChanStatusLastSwitchover        TimeStamp,
       junidApsChanStatusSwitchoverSeconds     Counter32
   }

   junidApsChanStatusCurrent OBJECT-TYPE
       SYNTAX     BITS {
                  lockedOut(0),
                  sd(1),
                  sf(2),
                  switched(3)
               }
       MAX-ACCESS read-only
       STATUS     current
       DESCRIPTION
           "Indicates the current state of the port.

            lockedOut

            This bit, when applied to a working channel, indicates that
            the channel is prevented from switching to the protection line.
            When applied to the null channel, this bit indicates that no
            working channel may switch to the protection line.

            sd

            A signal degrade condition is in effect.

            sf

            A signal failure condition is in effect.

            switched

            The switched bit is applied to a working channel if that
            channel is currently switched to the protection line.
            "
       ::= { junidApsChanStatusEntry 1 }

   junidApsChanStatusSignalDegrades OBJECT-TYPE
       SYNTAX     Counter32
       MAX-ACCESS read-only
       STATUS     current
       DESCRIPTION
           "A count of Signal Degrade conditions. This
            condition occurs when the line Bit Error Rate
            exceeds the currently configured threshold."
       ::= { junidApsChanStatusEntry 2 }

   junidApsChanStatusSignalFailures OBJECT-TYPE
       SYNTAX     Counter32
       MAX-ACCESS read-only
       STATUS     current
       DESCRIPTION
           "A count of Signal Failure conditions that have been
            detected on the incoming signal. This condition occurs
            when a loss of signal, loss of frame, AIS-L or a Line
            bit error rate exceeding 10^-3 is detected on an
            incoming line."
       ::= { junidApsChanStatusEntry 3 }

   junidApsChanStatusSwitchovers OBJECT-TYPE
       SYNTAX     Counter32
       MAX-ACCESS read-only
       STATUS     current
       DESCRIPTION
           "The number of times this channel has switched to the protection
            line. When queried with index value junidApsChanConfigNumber set to 0,
            which is the protection line, this object will return 0."
       ::= { junidApsChanStatusEntry 4 }

   junidApsChanStatusLastSwitchover OBJECT-TYPE
       SYNTAX     TimeStamp
       MAX-ACCESS read-only
       STATUS     current
       DESCRIPTION
           "The value of sysUpTime when this channel last completed a switch
            to the protection line. If this channel has never switched to the
            protection line, or this channel is the protection line, the value
            0  will be returned."
       ::= { junidApsChanStatusEntry 5 }

   junidApsChanStatusSwitchoverSeconds OBJECT-TYPE
       SYNTAX     Counter32
       MAX-ACCESS read-only
       STATUS     current
       DESCRIPTION
           "The cumulative Protection Switching Duration (PSD) time in
            seconds. For a working channel, this is the cumulative number
            of seconds that service was carried on the protection line.
            For the protection line, this is the cumulative number of
            seconds that the protection line has been used to carry any
            working channel traffic. This information is only valid if
            revertive switching is enabled. The value 0 will be returned
            otherwise."
       ::= { junidApsChanStatusEntry 6 }

   --
   -- APS EVENTS
   --
   junidApsNotificationsPrefix OBJECT IDENTIFIER
        ::= { junidApsMIBNotifications 0 }

   junidApsEventSwitchover NOTIFICATION-TYPE
       OBJECTS { junidApsChanStatusSwitchovers, junidApsChanStatusCurrent }
       STATUS  current
       DESCRIPTION
               "An junidApsEventSwitchover notification is sent when the
               value of an instance of junidApsChanStatusSwitchovers increments."
                  ::= { junidApsNotificationsPrefix 1 }

   junidApsEventModeMismatch NOTIFICATION-TYPE
       OBJECTS { junidApsStatusModeMismatches, junidApsStatusCurrent }
       STATUS  current
       DESCRIPTION
               "An junidApsEventModeMismatch notification is sent when the
               value of an instance of junidApsStatusModeMismatches increments."
                  ::= { junidApsNotificationsPrefix 2 }

   junidApsEventChannelMismatch NOTIFICATION-TYPE
       OBJECTS { junidApsStatusChannelMismatches, junidApsStatusCurrent }
       STATUS  current
       DESCRIPTION
           "An junidApsEventChannelMismatch notification is sent when the
           value of an instance of junidApsStatusChannelMismatches increments."
                  ::= { junidApsNotificationsPrefix 3 }

   junidApsEventPSBF NOTIFICATION-TYPE
       OBJECTS { junidApsStatusPSBFs, junidApsStatusCurrent }
       STATUS  current
       DESCRIPTION
               "An junidApsEventPSBF notification is sent when the
                value of an instance of junidApsStatusPSBFs increments."
                  ::= { junidApsNotificationsPrefix 4 }

   junidApsEventFEPLF NOTIFICATION-TYPE
       OBJECTS { junidApsStatusFEPLFs, junidApsStatusCurrent }
       STATUS  current
       DESCRIPTION
               "An junidApsEventFEPLFs notification is sent when the
                value of an instance of junidApsStatusFEPLFs increments."
                  ::= { junidApsNotificationsPrefix 5 }

   -- conformance information

   junidApsGroups      OBJECT IDENTIFIER ::= { junidApsMIBConformance 1 }
   junidApsCompliances OBJECT IDENTIFIER ::= { junidApsMIBConformance 2 }

   junidApsCompliance MODULE-COMPLIANCE
       STATUS  current
       DESCRIPTION
       "The compliance statement for linear APS groups."

       MODULE
       MANDATORY-GROUPS { junidApsConfigGeneral, junidApsStatusGeneral,
                          junidApsChanGeneral }

           OBJECT  junidApsConfigMode
           MIN-ACCESS  read-only
           DESCRIPTION
               "Write access is not required."

           OBJECT  junidApsConfigRevert
           MIN-ACCESS  read-only
           DESCRIPTION
               "Write access is not required."

           OBJECT  junidApsConfigDirection
           MIN-ACCESS  read-only
           DESCRIPTION
               "Write access is not required."

           OBJECT  junidApsConfigExtraTraffic
           MIN-ACCESS  read-only
           DESCRIPTION
               "Write access is not required."

           OBJECT  junidApsConfigSdBerThreshold
           MIN-ACCESS  read-only
           DESCRIPTION
               "Write access is not required."

           OBJECT  junidApsConfigSfBerThreshold
           MIN-ACCESS  read-only
           DESCRIPTION
               "Write access is not required."

           OBJECT  junidApsConfigWaitToRestore
           MIN-ACCESS  read-only
           DESCRIPTION
               "Write access is not required."

           OBJECT  junidApsConfigRowStatus
           MIN-ACCESS  read-only
           DESCRIPTION
               "Write access is not required."

           OBJECT  junidApsChanConfigIfIndex
           MIN-ACCESS  read-only
           DESCRIPTION
               "Write access is not required."

           OBJECT  junidApsChanConfigPriority
           MIN-ACCESS  read-only
           DESCRIPTION
               "Write access is not required."

           OBJECT  junidApsChanConfigRowStatus
           MIN-ACCESS  read-only
           DESCRIPTION
               "Write access is not required."

           GROUP       junidApsConfigWtr
           DESCRIPTION
               "Implementation of this group is optional for all
                linear APS implementations. The information is
                applicable to groups supporting a configurable
                WTR period."

           GROUP       junidApsCommandOnePlusOne
           DESCRIPTION
               "Implementation of this group is optional for all
                linear APS implementations. The information is
                applicable to groups implementing the linear
                APS 1+1 architecture and supporting set operations."

          GROUP       junidApsCommandOneToN
           DESCRIPTION
               "Implementation of this group is optional for all
                linear APS implementations. The information is
                applicable to groups implementing the linear
                APS 1:n architecture and supporting set operations."

          GROUP       junidApsChanOneToN
           DESCRIPTION
               "Implementation of this group is optional for all
                linear APS implementations. The information is
                applicable to groups implementing the linear
                APS 1:n architecture."

          GROUP       junidApsTotalsGroup
           DESCRIPTION
               "Implementation of this group is optional for all
                linear APS implementations."

          GROUP       junidApsMapGroup
           DESCRIPTION
               "Implementation of this group is optional for all
                linear APS implementations."

       ::= { junidApsCompliances 1 }

   -- units of conformance

   junidApsConfigGeneral    OBJECT-GROUP
       OBJECTS
       {
           junidApsConfigMode,
           junidApsConfigRevert,
           junidApsConfigDirection,
           junidApsConfigExtraTraffic,
           junidApsConfigSdBerThreshold,
           junidApsConfigSfBerThreshold,
           junidApsConfigCreationTime,
           junidApsConfigRowStatus
       }
       STATUS  current
       DESCRIPTION
       "A collection of junidApsConfigTable objects providing configuration
        information applicable to all linear APS groups."
       ::= { junidApsGroups 1 }

   junidApsConfigWtr    OBJECT-GROUP
       OBJECTS
       {
           junidApsConfigWaitToRestore
       }
       STATUS  current
       DESCRIPTION
       "The junidApsConfigTable object that provides information which is
        applicable to groups supporting a configurable WTR period."
       ::= { junidApsGroups 2 }

   --  If set operations are not supported neither of the following two groups
   --  are implemented. If sets are supported only one of these groups is
   --  implemented for a linear APS group instance.

   junidApsCommandOnePlusOne    OBJECT-GROUP
       OBJECTS
       {
           junidApsCommandSwitch
       }
       STATUS  current
       DESCRIPTION
       "The  junidApsCommandTable object which is applicable to groups
        implementing the linear APS 1+1 architecture. Also, set operations
        must be supported."
       ::= { junidApsGroups 3 }

   junidApsCommandOneToN    OBJECT-GROUP
       OBJECTS
       {
           junidApsCommandSwitch,
           junidApsCommandControl
       }
       STATUS  current
       DESCRIPTION
       "A collection of junidApsCommandTable objects which are applicable to
        groups implementing the linear APS 1:n architecture. Also, set
        operations must be supported."
       ::= { junidApsGroups 4 }

   junidApsStatusGeneral    OBJECT-GROUP
       OBJECTS
       {
           junidApsStatusK1K2Rcv,
           junidApsStatusK1K2Trans,
           junidApsStatusCurrent,
           junidApsStatusModeMismatches,
           junidApsStatusChannelMismatches,
           junidApsStatusPSBFs,
           junidApsStatusFEPLFs,
           junidApsStatusSwitchedChannel
       }
       STATUS  current
       DESCRIPTION
       "A collection of junidApsStatusTable objects providing status information
        applicable to all linear APS groups."
       ::= { junidApsGroups 5 }

   junidApsChanGeneral    OBJECT-GROUP
       OBJECTS
       {
           junidApsChanConfigIfIndex,
           junidApsChanConfigRowStatus,
           junidApsChanStatusCurrent,
           junidApsChanStatusSignalDegrades,
           junidApsChanStatusSignalFailures,
           junidApsChanStatusSwitchovers,
           junidApsChanStatusLastSwitchover,
           junidApsChanStatusSwitchoverSeconds
      }
       STATUS  current
       DESCRIPTION
       "A collection of channel objects providing information applicable to
        all linear APS channels."
       ::= { junidApsGroups 6 }

   junidApsChanOneToN    OBJECT-GROUP
       OBJECTS
       {
           junidApsChanConfigPriority
       }
       STATUS  current
       DESCRIPTION
       "The junidApsChanConfigTable object that provides information which is only
        applicable to groups implementing the linear APS 1:n architecture."
       ::= { junidApsGroups 7 }

   junidApsTotalsGroup OBJECT-GROUP
       OBJECTS
       {
           junidApsConfigGroups,
           junidApsChanLTEs
       }
       STATUS  current
       DESCRIPTION
       "A collection of objects providing optional counts of configured APS
        groups and SONET LTE interfaces."
       ::= { junidApsGroups 8 }

   junidApsMapGroup OBJECT-GROUP
       OBJECTS
       {
           junidApsMapGroupName,
           junidApsMapChanNumber
       }
       STATUS  current
       DESCRIPTION
       "A collection of junidApsMapTable objects providing a mapping
        from sonet(39) InterfaceIndex to group name and channel
        number for assigned APS channels and a list of unassigned
        sonet(39) interfaces."
       ::= { junidApsGroups 9 }

   junidApsEventOptional NOTIFICATION-GROUP
       NOTIFICATIONS {junidApsEventSwitchover, junidApsEventModeMismatch,
                      junidApsEventChannelMismatch, junidApsEventPSBF,
                      junidApsEventFEPLF }
       STATUS    current
       DESCRIPTION
       "A collection of SONET linear APS notifications that may optionally be
        implemented."
       ::= { junidApsGroups 10 }

END
