-- ==================================================================
-- Copyright (C) 2005 by H3C TECHNOLOGIES. All rights reserved.
--
-- Description: MPLSOAM PS(protection switching) MIB
-- Reference:
-- Version: V1.0
-- History:
-- V1.0 2007-03-31 Created by LiXufu ID: 05023
-- ==================================================================
H3C-MPLSOAM-PS-MIB DEFINITIONS ::= BEGIN

IMPORTS
        h3cCommon
    FROM HUAWEI-3COM-OID-MIB
        Integer32, Unsigned32, OBJECT-TYPE, MODULE-IDENTITY, NOTIFICATION-TYPE
    FROM SNMPv2-SMI
        TruthValue, RowStatus
    FROM SNMPv2-TC;


h3cMplsOamPs MODULE-IDENTITY
    LAST-UPDATED "200703310000Z"            -- March 31, 2007 at 00:00 GMT
    ORGANIZATION
        "Hangzhou H3C Tech. Co., Ltd."
    CONTACT-INFO
        "Platform Team Hangzhou H3C Tech. Co., Ltd.
        Hai-Dian District Beijing P.R. China
        http://www.h3c.com
        Zip:100085
        "
    DESCRIPTION
        "This MIB contains objects to configure mpls
        protect-switch module."
    ::= { h3cCommon 80 }


-- ==================================================================
--
-- ======================= definition begin =========================
--
-- ==================================================================
h3cMplsOamPsScalarGroup OBJECT IDENTIFIER ::= { h3cMplsOamPs 1 }

h3cMplsOamPsTrapOpen OBJECT-TYPE
    SYNTAX      TruthValue
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "Whether mpls protect-switch trap is globally enabled.
        false: disable;
        true: enable"
    DEFVAL  { false }
    ::= { h3cMplsOamPsScalarGroup 1 }

h3cMplsOamPsTable OBJECT IDENTIFIER ::= { h3cMplsOamPs 2 }

h3cMplsPsTable OBJECT-TYPE
    SYNTAX      SEQUENCE OF H3cMplsPsEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "This table specifies per-protection-group MPLS PS
        capability and associated information."
    ::= { h3cMplsOamPsTable 1 }

h3cMplsPsEntry OBJECT-TYPE
    SYNTAX      H3cMplsPsEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "An entry in this table is created by an LSR for every
        protection group capable of supporting mpls ps."
    INDEX
        {
            h3cMplsPsIndex
        }
    ::= { h3cMplsPsTable 1 }

H3cMplsPsEntry ::= SEQUENCE
    {
        h3cMplsPsIndex                 Integer32,
        h3cMplsPsGroupID               Integer32,
        h3cMplsPsWorkLspName           OCTET STRING,
        h3cMplsPsProtectLspName        OCTET STRING,
        h3cMplsPsRevertiveMode         Integer32,
        h3cMplsPsWTR                   Integer32,
        h3cMplsPsHoldOff               Integer32,
        h3cMplsPsSwitchCondition       Integer32,
        h3cMplsPsWorkLspDetectState    Integer32,
        h3cMplsPsWorkLspUpDownState    Integer32,
        h3cMplsPsProtLspDetectState    Integer32,
        h3cMplsPsProtLspUpDownState    Integer32,
        h3cMplsPsSwitchResult          Integer32,
        h3cMplsPsRowStatus             RowStatus
    }

h3cMplsPsIndex OBJECT-TYPE
    SYNTAX      Integer32
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "This is a unique index for an entry in the mplspsEntry."
    ::= { h3cMplsPsEntry 1 }

h3cMplsPsGroupID OBJECT-TYPE
    SYNTAX      Integer32
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "This is a unique group id for an entry in the mplspsEntry.
        One protect-switch group is composed of one working static-lsp
        and one protection static-lsp."
    ::= { h3cMplsPsEntry 2 }

h3cMplsPsWorkLspName OBJECT-TYPE
    SYNTAX      OCTET STRING
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "The name of the working static-lsp."
    ::= { h3cMplsPsEntry 3 }

h3cMplsPsProtectLspName OBJECT-TYPE
    SYNTAX      OCTET STRING
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "The name of the protection static-lsp."
    ::= { h3cMplsPsEntry 4 }

h3cMplsPsRevertiveMode OBJECT-TYPE
    SYNTAX      Integer32(1..2)
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "Revertive mode is a protection switching mode where revertive
        action (switch back to the working LSP) is taken after the
        working LSP is repaired. And switching does not occur in a
        non-revertive mode.
        1: revertive;
        2: non-revertive;"
    ::= { h3cMplsPsEntry 5 }

h3cMplsPsWTR OBJECT-TYPE
    SYNTAX      Integer32
    UNITS       "30s"
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "Wait to Restore timer is only applicable for the revertive mode
        and applies to a working LSP, it prevents reversion back to
        select the working LSP until the Wait to Restore timer has
        expired.
        The default value is 12 minutes. step is 30s."
    ::= { h3cMplsPsEntry 6 }

h3cMplsPsHoldOff OBJECT-TYPE
    SYNTAX      Integer32
    UNITS       "100ms"
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "The time between declaration of signal degrade or signal fail,
        and the initialization of the protection switching algorithm.
        Step is 100ms, maximum is 10s."
    ::= { h3cMplsPsEntry 7 }

h3cMplsPsSwitchCondition OBJECT-TYPE
    SYNTAX      Integer32(1..9)
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "The current switch condition of the protection group.
        1: clear, this command clears all of the externally
        initiated switch commands listed below;
        2: lockout of protection, fix the selector position on the
        working LSP, Prevents the selector from switching to the
        protection LSP when it is selecting the working LSP.
        Switches the selector from the protection to the working LSP
        when it is selecting the protection LSP;
        3: forced protection, switches the selector from the working LSP
        to the protection LSP (unless a higher priority switch
        request (i.e., LoP) is in effect);
        4: signal fail, for 1:1, Signal Fail (SF) is declared when the
        source of the protection domain enters the Defect State by
        receiving a BDI packet (from the return LSP or out of band).
        5: manual switch for working-lsp, switches the selector from the
        working LSP to the protection LSP (unless an equal or higher
        priority switch request (i.e., LoP, FS, SF or MS) is in
        effect);
        6: manual switch for protection-lsp, switches the selector from
        the protection LSP to the working LSP (unless an equal or
        higher priority switch request (i.e., LoP, FS, SF or MS) is
        in effect).
        7: WTR-timer, a configurable timer which is used to delay before
        reversion;
        8: HoldOff-timer, the time between declaration of signal degrade
        or signal fail, and the initialization of the protection
        switching algorithm;
        9: Others;
        The pripority of the commands are:
        clear > lockout of protection > force switch > manual switch for working
        lsp = manual switch for protection lsp"
    ::= { h3cMplsPsEntry 8 }

h3cMplsPsWorkLspDetectState OBJECT-TYPE
    SYNTAX      Integer32(1..2)
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The state of working static-lsp state in one protection group,
        whether it is in defect:
        1: it is out of defect;
        2: it enters defect."
    ::= { h3cMplsPsEntry 9 }

h3cMplsPsWorkLspUpDownState OBJECT-TYPE
    SYNTAX      Integer32(1..2)
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The state of working static-lsp state in one protection group,
        whether it is up or down:
        1: it is in up state;
        2: it is in down state."
    ::= { h3cMplsPsEntry 10 }

h3cMplsPsProtLspDetectState OBJECT-TYPE
    SYNTAX      Integer32(1..2)
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The state of protection static-lsp state in one protection group,
        whether it is in detection:
        1: it is out of defect;
        2: it enters defect."
    ::= { h3cMplsPsEntry 11 }

h3cMplsPsProtLspUpDownState OBJECT-TYPE
    SYNTAX      Integer32(1..2)
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The state of protection static-lsp state in one protection group,
        whether it is up or down:
        1: it is in up state;
        2: it is in down state."
    ::= { h3cMplsPsEntry 12 }

h3cMplsPsSwitchResult OBJECT-TYPE
    SYNTAX      Integer32(1..2)
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Which tunnel is used to transfer the data stream.
        1: working static-lsp;
        2: protection static-lsp."
    ::= { h3cMplsPsEntry 13 }

h3cMplsPsRowStatus OBJECT-TYPE
    SYNTAX      RowStatus
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "This object is responsible for managing the creation,
        deletion and modification of rows, which support active
        status and CreatAndGo, destroy operation.
        To create a new row, h3cMplsPsGroupID, h3cMplsPsWorkLspName,
        h3cMplsPsProtectLspName, h3cMplsPsRevertiveMode, h3cMplsPsWTR
        and h3cMplsPsHoldOff must be specified."
    ::= { h3cMplsPsEntry 14 }

h3cMplsOamPsNotifications OBJECT IDENTIFIER ::= { h3cMplsOamPs 3 }

h3cMplsPsSwitchPtoW NOTIFICATION-TYPE
    OBJECTS
        {
            h3cMplsPsWorkLspName,
            h3cMplsPsProtectLspName,
            h3cMplsPsSwitchResult
        }
    STATUS      current
    DESCRIPTION
        "This notification is generated when switching from
        protection-lsp to working-lsp occured."
    ::= { h3cMplsOamPsNotifications 1 }

h3cMplsPsSwitchWtoP NOTIFICATION-TYPE
    OBJECTS
        {
            h3cMplsPsWorkLspName,
            h3cMplsPsProtectLspName,
            h3cMplsPsSwitchResult
        }
    STATUS      current
    DESCRIPTION
        "This notification is generated when switching from woking-lsp
        to protection-lsp occured."
    ::= { h3cMplsOamPsNotifications 2 }

END
