-- ============================================================================
-- Copyright (c) 2004-2015 Hangzhou H3C Tech. Co., Ltd. All rights reserved.
--
-- Description: Port Extender (PEX) information MIB
-- Reference:
-- Version: V1.2
-- History:
--   V1.0 2012-11-12 Initial version by Yang Fan
--   V1.1 2014-03-31 Changed MIB node name to PEX by zushuzhi
--   V1.2 2015-10-15 Added h3cPexDeviceInfoTable and h3cPexTopoTable
--                   by zushuzhi
-- ============================================================================
H3C-PEX-MIB DEFINITIONS ::= BEGIN
IMPORTS
    h3cCommon
        FROM HUAWEI-3COM-OID-MIB
    entPhysicalIndex, entPhysicalDescr
        FROM ENTITY-MIB
    Integer32, OBJECT-TYPE, MODULE-IDENTITY, NOTIFICATION-TYPE
        FROM SNMPv2-SMI
    RowStatus, DisplayString
        FROM SNMPv2-TC;

h3cPex MODULE-IDENTITY
    LAST-UPDATED "201510151129Z"        -- 15th October, 2015 at 11:29 GMT
    ORGANIZATION
        "Hangzhou H3C Technologies Co., Ltd."
    CONTACT-INFO
        "Platform Team H3C Technologies Co., Ltd.
         Haidian District Beijing P.R. China
         Http://www.h3c.com
         Zip:100085"
    DESCRIPTION
        "This MIB is used to manage Port Extender (PEX)
         information.  This MIB is applicable to products that support PEX."
    REVISION "201510151129Z"
    DESCRIPTION
        "Added h3cPexDeviceInfoTable and h3cPexTopoTable."
    REVISION "201211121129Z"
    DESCRIPTION
        "Initial version of this MIB module."
    ::= { h3cCommon 129 }

-- PEX Specification Information

h3cPexSpecInfo OBJECT IDENTIFIER ::= { h3cPex 1 }

h3cPexPortMinId OBJECT-TYPE
    SYNTAX      Integer32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Lowest PEX port ID that can be used to uniquely identify a PEX port."
    ::= { h3cPexSpecInfo 1 }

h3cPexPortMaxId OBJECT-TYPE
    SYNTAX      Integer32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Highest PEX port ID that can be used to uniquely identify a PEX port."
    ::= { h3cPexSpecInfo 2 }

h3cPexMinAssociateId OBJECT-TYPE
    SYNTAX      Integer32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Lowest ID that can be assigned to a port extender (PEX)."
    ::= { h3cPexSpecInfo 3 }

h3cPexMaxAssociateId OBJECT-TYPE
    SYNTAX      Integer32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Highest ID that can be assigned to a PEX."
    ::= { h3cPexSpecInfo 4 }

h3cPexMaxPortPerPexPort OBJECT-TYPE
    SYNTAX      Integer32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Maximum number of ports that can be bound to a PEX port."
    ::= { h3cPexSpecInfo 5 }

-- PEX Information

h3cPexTable OBJECT IDENTIFIER ::= { h3cPex 2 }

h3cPexPortTable OBJECT-TYPE
    SYNTAX      SEQUENCE OF H3cPexPortEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "This table contains objects used to configure the PEX ports."
    ::= { h3cPexTable 1 }

h3cPexPortEntry OBJECT-TYPE
    SYNTAX      H3cPexPortEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "Information about a PEX."
    INDEX
        {
            h3cPexPortId
        }
    ::= { h3cPexPortTable 1 }

H3cPexPortEntry ::= SEQUENCE
    {
        h3cPexPortId               Integer32,
        h3cPexPortAssociateId      Integer32,
        h3cPexPortEntPhysicalIndex Integer32,
        h3cPexPortDescr            DisplayString,
        h3cPexPortStatus           INTEGER,
        h3cPexPortRowStatus        RowStatus
    }

h3cPexPortId OBJECT-TYPE
    SYNTAX      Integer32(1..2147483647)
    MAX-ACCESS  accessible-for-notify
    STATUS      current
    DESCRIPTION
        "ID that can be used to uniquely identify a PEX port.  The value range
        is h3cPexPortMinId to h3cPexPortMaxId."
    ::= { h3cPexPortEntry 1 }

h3cPexPortAssociateId OBJECT-TYPE
    SYNTAX      Integer32
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "ID assigned to a PEX.  The
        value range is h3cPexMinAssociateId to h3cPexMaxAssociateId.
        The value is 0xffff if the PEX is not assigned an ID.
        For a successful configuration, the ID should not be used by any
        other PEX."
    DEFVAL { 65535 }
    ::= { h3cPexPortEntry 2 }

h3cPexPortEntPhysicalIndex OBJECT-TYPE
    SYNTAX      Integer32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Entity index of a PEX in the IRF.  A value of zero
         indicates that the PEX is not online."
    DEFVAL { 0 }
    ::= { h3cPexPortEntry 3 }

h3cPexPortDescr OBJECT-TYPE
    SYNTAX      DisplayString(SIZE(0..79))
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "Description for the PEX port.  The default value is
        'pex-port XXXX', where 'XXXX' is h3cPexPortId.
        Writing a zero-length string to this object resets the value to the
        default."
    ::= { h3cPexPortEntry 4 }

h3cPexPortStatus OBJECT-TYPE
    SYNTAX      INTEGER
        {
            offline(1),
            loading(2),
            online(3)
        }
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Status of the PEX.
        offline: The PEX is absent or its configuration is incomplete.
        loading: The PEX is loading software.
        online: The PEX is operating correctly."
    DEFVAL { offline }
    ::= { h3cPexPortEntry 5 }

h3cPexPortRowStatus OBJECT-TYPE
    SYNTAX      RowStatus
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "The control that allows creation and deletion of entries.
        Values include createAndGo, active, and destroy.
        If the row to be created or modified already exists,
        an error message is returned.  If the row to be deleted does not exist,
        a success message is returned."
    ::= { h3cPexPortEntry 6 }


-- PEX PhyPort Information

h3cPexPhyPortTable OBJECT-TYPE
    SYNTAX      SEQUENCE OF H3cPexPhyPortEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "This table contains objects used to manage physical ports
        that can be bound or are already bound to a PEX port."
    ::= { h3cPexTable 2 }

h3cPexPhyPortEntry OBJECT-TYPE
    SYNTAX      H3cPexPhyPortEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "Information about a physical port that can be bound to or
        has been bound to a PEX port."
    INDEX
        {
            entPhysicalIndex
        }
    ::= { h3cPexPhyPortTable 1 }

H3cPexPhyPortEntry ::= SEQUENCE
    {
        h3cPexPhyPortStatus           INTEGER,
        h3cPexPhyPortBelongToPexPort  Integer32,
        h3cPexPhyPortNeighborEntIndex Integer32
    }

h3cPexPhyPortStatus OBJECT-TYPE
    SYNTAX      INTEGER
        {
            unknown(1),
            down(2),
            blocked(3),
            forwarding(4)
        }
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Status of the physical port that is bound to a PEX port.
        The following are status values:
        unknown: The physical port is not bound to any PEX port.
        down: The physical port is link down.
        blocked: The physical port is blocked and cannot forward traffic.
        forwarding: The physical port can forwarding traffic."
    DEFVAL { unknown }
    ::= { h3cPexPhyPortEntry 1 }

h3cPexPhyPortBelongToPexPort OBJECT-TYPE
    SYNTAX      Integer32
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "ID of the PEX port to which the physical port belongs.  The value
        range is h3cPexPortMinId to h3cPexPortMaxId.  A value of zero
        indicates that the port doesn't belong to any PEX port."
    DEFVAL { 0 }
    ::= { h3cPexPhyPortEntry 2 }

h3cPexPhyPortNeighborEntIndex OBJECT-TYPE
    SYNTAX      Integer32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Entity index of a physical port that connects the PEX to the parent
        device.  This value is identical to entPhysicalIndex in ENTITY-MIB.
        A value of zero indicates that the physical port is not bound to any
        PEX port or is not up."
    ::= { h3cPexPhyPortEntry 3 }

-- PEX Topology Information
h3cPexDeviceInfoTable OBJECT-TYPE
    SYNTAX      SEQUENCE OF H3cPexDeviceInfoEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "This table contains online PEXs in the IRF system."
    ::= { h3cPexTable 3 }

h3cPexDeviceInfoEntry OBJECT-TYPE
    SYNTAX      H3cPexDeviceInfoEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "Information about a PEX in the IRF system.  The index is the PEX
        entity index."
    INDEX
        {
            entPhysicalIndex
        }
    ::= { h3cPexDeviceInfoTable 1 }

H3cPexDeviceInfoEntry ::= SEQUENCE
    {
        h3cPexDeviceStatus           INTEGER,
        h3cPexDeviceAssociateId      Integer32
    }

h3cPexDeviceStatus OBJECT-TYPE
    SYNTAX      INTEGER
        {
            normal(1),
            faulty(2)
        }
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Status of the PEX.
        normal: The PEX is operating correctly.
        faulty: The PEX is faulty."
    ::= { h3cPexDeviceInfoEntry 1 }

h3cPexDeviceAssociateId OBJECT-TYPE
    SYNTAX      Integer32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "ID assigned to the PEX."
    ::= { h3cPexDeviceInfoEntry 2 }

h3cPexTopoTable OBJECT-TYPE
    SYNTAX      SEQUENCE OF H3cPexTopoEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "This table contains information about the PEX physical ports and
        neighbor ports on PEXs."
    ::= { h3cPexTable 4 }

h3cPexTopoEntry OBJECT-TYPE
    SYNTAX      H3cPexTopoEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "Information about a PEX link."
    INDEX
        {
            entPhysicalIndex
        }
    ::= { h3cPexTopoTable 1 }

H3cPexTopoEntry ::= SEQUENCE
    {
        h3cPexNeighborEntIndex Integer32
    }

h3cPexNeighborEntIndex OBJECT-TYPE
    SYNTAX      Integer32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Entity index of a PEX in the IRF system."
    ::= { h3cPexTopoEntry 1 }

-- PEX Traps

h3cPexTraps OBJECT IDENTIFIER ::= { h3cPex 3 }

h3cPexTrapPrefix OBJECT IDENTIFIER ::= { h3cPexTraps 0 }

h3cPexPortOnline  NOTIFICATION-TYPE
    OBJECTS
        {
            h3cPexPortId,
            h3cPexPortDescr
        }
    STATUS      current
    DESCRIPTION
        "An h3cPexPortOnline trap is sent when the PEX transitions to
        online state."
    ::= { h3cPexTrapPrefix 1 }

h3cPexPortOffline  NOTIFICATION-TYPE
    OBJECTS
        {
            h3cPexPortId,
            h3cPexPortDescr
        }
    STATUS      current
    DESCRIPTION
        "An h3cPexPortOnline trap is sent when the PEX transitions to
        offline state."
    ::= { h3cPexTrapPrefix 2 }

h3cPexPhyPortForwarding  NOTIFICATION-TYPE
    OBJECTS
        {
            h3cPexEntPhysicalIndexBind,
            entPhysicalDescr
        }
    STATUS      current
    DESCRIPTION
        "An h3cPexPhyPortForwarding trap is sent when the PEX physical port
        transitions to forwarding state."
    ::= { h3cPexTrapPrefix 3 }

h3cPexPhyPortBlocked  NOTIFICATION-TYPE
    OBJECTS
        {
            h3cPexEntPhysicalIndexBind,
            entPhysicalDescr
        }
    STATUS      current
    DESCRIPTION
        "An h3cPexPhyPortBlocked trap is sent when the PEX physical port
        transitions from forwarding state to blocked state."
    ::= { h3cPexTrapPrefix 4 }

h3cPexTrapObjects OBJECT IDENTIFIER ::= { h3cPex 4 }

h3cPexEntPhysicalIndexBind OBJECT-TYPE
    SYNTAX     Integer32
    MAX-ACCESS accessible-for-notify
    STATUS     current
    DESCRIPTION
        "This index is identical to entPhysicalIndex in ENTITY-MIB."
    ::= { h3cPexTrapObjects 1 }
END
