--==================================================================
-- Copyright (C) 2012 by  HUAWEI TECHNOLOGIES. All rights reserved.
-- 
-- Description: HUAWEI MonitorGroup MIB
-- Reference:
-- Version: V1.0
-- History:
-- <author>,  <date>,  <contents>
-- qinchuan   2012-9-27
-- ==================================================================

-- ==================================================================
-- 
-- Variables and types be imported
--
-- ==================================================================

    HUAWEI-MG-MIB DEFINITIONS ::= BEGIN
    
        IMPORTS
        
        MODULE-IDENTITY, OBJECT-TYPE, Integer32, Counter32, OBJECT-IDENTITY, Unsigned32
            FROM SNMPv2-SMI  
      
        OBJECT-GROUP, MODULE-COMPLIANCE            
            FROM SNMPv2-CONF
      
        hwDatacomm
            FROM HUAWEI-MIB
            
        InterfaceIndex
            FROM IF-MIB ;

        hwMG MODULE-IDENTITY
            LAST-UPDATED "201210081600Z"      
            ORGANIZATION 
               "Huawei Technologies Co.,Ltd."
            CONTACT-INFO 
               "Huawei Industrial Base
                 Bantian, Longgang
                  Shenzhen 518129
                  People's Republic of China
                  Website: http://www.huawei.com
                  Email: support@huawei.com
                "
            DESCRIPTION
               "The MG MIB module is defined to manage the
               configuration about Monitor-group.
               "
            ::= { hwDatacomm 312 }


    
-- ==================================================================
--
-- ======================= Definitions begin =========================
--
-- ==================================================================
    
    hwMGMonitorGroupObjects OBJECT IDENTIFIER ::= { hwMG 1 }
    

-- ======================= monitor-group table =========================

        hwMGMonitorGroupTable  OBJECT-TYPE
            SYNTAX SEQUENCE OF HwMGMonitorGroupEntry
            MAX-ACCESS not-accessible
            STATUS current
            DESCRIPTION "This table describes attributes of the interface monitoring group. The information includes the index and name of the interface monitoring group, the down-weight of each faulty binding interface, whether the association between the track interface and the interface monitoring group is enabled, and the delay before the track interface goes Up."
            ::= { hwMGMonitorGroupObjects  1 }


        hwMGMonitorGroupEntry  OBJECT-TYPE
            SYNTAX HwMGMonitorGroupEntry
            MAX-ACCESS not-accessible
            STATUS current
            DESCRIPTION "Entry of the monitoring group."
            INDEX   { hwMGMonitorGroupIndex }
            ::= { hwMGMonitorGroupTable 1}


        HwMGMonitorGroupEntry  ::=
            SEQUENCE 
            {
                hwMGMonitorGroupIndex
                    Integer32,
                hwMGMonitorGroupName
                    OCTET STRING,
                hwMGMonitorGroupDownWeight
                    Integer32,
                hwMGMonitorGroupStatus
                    INTEGER,
                hwMGMonitorGroupDelayTime
                    Unsigned32
            }

        hwMGMonitorGroupIndex  OBJECT-TYPE
            SYNTAX Integer32   (1..32)
            MAX-ACCESS not-accessible
            STATUS current
            DESCRIPTION "This object indicates the index of the interface monitoring group. The index identifies a unique interface monitoring group."
            ::= { hwMGMonitorGroupEntry 1 }
            
        hwMGMonitorGroupName  OBJECT-TYPE
            SYNTAX OCTET STRING   (SIZE (1..32))
            MAX-ACCESS read-only
            STATUS current
            DESCRIPTION "This object indicates the name of the interface monitoring group."
            ::= { hwMGMonitorGroupEntry 2 }


        hwMGMonitorGroupDownWeight  OBJECT-TYPE
            SYNTAX  Integer32 
            MAX-ACCESS read-only
            STATUS current
            DESCRIPTION "This object indicates the sum of down-weights of the faulty binding interfaces in the interface monitoring group."
            ::= { hwMGMonitorGroupEntry 3 }
        

        hwMGMonitorGroupStatus  OBJECT-TYPE
            SYNTAX INTEGER
            {
                disable(1),
                enable(2)
            }
            MAX-ACCESS read-write
            STATUS current
            DESCRIPTION "This object indicates whether the association between the track interface and the interface monitoring group is enabled."
            ::= { hwMGMonitorGroupEntry 4 }
        
    
        hwMGMonitorGroupDelayTime  OBJECT-TYPE
            SYNTAX  Unsigned32
            MAX-ACCESS read-write
            STATUS current
            DESCRIPTION 
               "This object indicates the delay before the track interface goes Up, in seconds. The value is an integer ranging from 0 to 4294967295."
            ::= { hwMGMonitorGroupEntry 5 }
        
             

  
-- ======================= binding-interface table =========================

        hwMGBindingInterfaceTable  OBJECT-TYPE
            SYNTAX SEQUENCE OF HwMGBindingInterfaceEntry
            MAX-ACCESS not-accessible
            STATUS current
            DESCRIPTION "This table describes attributes of the binding interface in the interface monitoring group. The information includes the index and down-weight of the binding interface."
            ::= { hwMGMonitorGroupObjects  2 }


        hwMGBindingInterfaceEntry OBJECT-TYPE
            SYNTAX HwMGBindingInterfaceEntry
            MAX-ACCESS not-accessible
            STATUS current
            DESCRIPTION "Entry of the binding interface."
            INDEX { hwMGMonitorGroupIndex, hwMGBindingInterfaceIndex }
            ::= { hwMGBindingInterfaceTable 1}


        HwMGBindingInterfaceEntry  ::=
            SEQUENCE 
            {
                hwMGBindingInterfaceIndex
                    InterfaceIndex,
                hwMGBindingInterfaceWeight
                    Integer32
            }


        hwMGBindingInterfaceIndex  OBJECT-TYPE
            SYNTAX InterfaceIndex
            MAX-ACCESS not-accessible
            STATUS current
            DESCRIPTION "This object indicates the index of the binding interface in the interface monitoring group. The index identifies a unique binding interface."
            ::= { hwMGBindingInterfaceEntry 1 }
    
        hwMGBindingInterfaceWeight  OBJECT-TYPE
            SYNTAX Integer32 (1..1000)
            MAX-ACCESS read-write
            STATUS current
            DESCRIPTION "This object indicates the down-weight of the binding interface in the interface monitoring group."
            ::= { hwMGBindingInterfaceEntry 2 }
            
        
        
-- ======================= track-interface table =========================

        hwMGTrackInterfaceTable  OBJECT-TYPE
            SYNTAX SEQUENCE OF HwMGTrackInterfaceEntry
            MAX-ACCESS not-accessible
            STATUS current
            DESCRIPTION "This table describes attributes of the track interface. The information includes the index and down-weight of the track interface and the status of the association between the track interface and the interface monitoring group."
            ::= { hwMGMonitorGroupObjects  3 }


        hwMGTrackInterfaceEntry OBJECT-TYPE
            SYNTAX HwMGTrackInterfaceEntry
            MAX-ACCESS not-accessible
            STATUS current
            DESCRIPTION "Entry of the track interface."
            INDEX { hwMGMonitorGroupIndex, hwMGTrackInterfaceIndex }
            ::= { hwMGTrackInterfaceTable 1}


        HwMGTrackInterfaceEntry  ::=
            SEQUENCE 
            {
                hwMGTrackInterfaceIndex
                    InterfaceIndex,
                hwMGTrackInterfaceWeight
                    Integer32,
                hwMGTrackInterfaceTriggerStatus
                    INTEGER
            }


        hwMGTrackInterfaceIndex  OBJECT-TYPE
            SYNTAX InterfaceIndex
	            MAX-ACCESS not-accessible
                STATUS current
                DESCRIPTION "This object indicates the index of the track interface. The index identifies a unique track interface."
            ::= { hwMGTrackInterfaceEntry 1 }
    
        hwMGTrackInterfaceWeight  OBJECT-TYPE
            SYNTAX Integer32 (0..1000)
                MAX-ACCESS read-write
                STATUS current
                DESCRIPTION "This object indicates the down-weight of the track interface."

                ::= { hwMGTrackInterfaceEntry 2 }          

        hwMGTrackInterfaceTriggerStatus  OBJECT-TYPE
            SYNTAX  INTEGER
                {
                   triggerup(1),
                   triggerdown(2),
                   normal(3)
                }
            MAX-ACCESS read-only
            STATUS current
            DESCRIPTION 
               "This object indicates the status of the association between the track interface and the interface monitoring group. By default, the status is normal. triggerdown(2): If the sum of down-weights of the faulty binding interfaces in the interface monitoring group is greater than or equal to the down-weight of the track interface, the track interface is triggered to go Down.
                triggerup(1):If the track interface is triggered to go Down, and the sum of down-weights of the faulty binding interfaces in the interface monitoring group becomes less than the down-weight of the track interface, the track interface is triggered to go Up."
            ::= { hwMGTrackInterfaceEntry 3 }
        
        
-- -------------------------------------------------------------
-- HUAWEI-MG-MIB MIB - Conformance Information
-- -------------------------------------------------------------        
        
    hwMonitorGroupConformance OBJECT IDENTIFIER ::= { hwMG 4 }

    hwMonitorGroupGroups OBJECT IDENTIFIER ::= { hwMonitorGroupConformance 1 }

-- -------------------------------------------------------------
-- Units of conformance
-- -------------------------------------------------------------
        hwMGMonitorGroupGroup OBJECT-GROUP
            OBJECTS 
            { 
                hwMGMonitorGroupName, 
                hwMGMonitorGroupDownWeight, 
                hwMGMonitorGroupStatus, 
                hwMGMonitorGroupDelayTime 
            }
            STATUS current
            DESCRIPTION "Description of nodes in the interface monitoring group. The information includes the index and name of the interface monitoring group, the down-weight of the faulty binding interface, whether the association between the track interface and the interface monitoring group is enabled, and the delay before the track interface goes Up."
            ::= { hwMonitorGroupGroups 1 }
        
        -- 2.2.1.2
        hwMGBindingInterfaceGroup OBJECT-GROUP
            OBJECTS 
            { 
                hwMGBindingInterfaceWeight 
            }
        STATUS current
            DESCRIPTION "Description of nodes on the binding interface in the interface monitoring group. The information includes the index of the down-weight of the binding interface."
            ::= { hwMonitorGroupGroups 2 }
        
        -- 2.2.1.3
        hwMGTrackInterfaceGroup OBJECT-GROUP
            OBJECTS 
            { 
                hwMGTrackInterfaceWeight, 
                hwMGTrackInterfaceTriggerStatus 
            }
            STATUS current
            DESCRIPTION "Description of nodes on the track interface. The information includes the index and down-weight of the track interface and the status of the association between the track interface and the interface monitoring group."
            ::= { hwMonitorGroupGroups 3 }
        
    
    hwMonitorGroupCompliances OBJECT IDENTIFIER ::= { hwMonitorGroupConformance 2 }
        hwMonitorGroupCompliance MODULE-COMPLIANCE
            STATUS current
            DESCRIPTION "The compliance statement."
            MODULE  -- this module
            MANDATORY-GROUPS {
                    hwMGMonitorGroupGroup,
                    hwMGBindingInterfaceGroup,
                    hwMGTrackInterfaceGroup
               }
               ::= { hwMonitorGroupCompliances 1 }
    END
