-- *******************************************************************
-- FS-EGHA-MIB.mib: FS EGHA MIB file
-- June 2015, lishengcao
--
-- Copyright (c) 2015 by FS.COM Inc..
-- All rights reserved.
-- *******************************************************************
--
FS-EGHA-MIB DEFINITIONS ::= BEGIN

IMPORTS
        OBJECT-TYPE,
        MODULE-IDENTITY,
        IpAddress,
        NOTIFICATION-TYPE
                FROM SNMPv2-SMI
        Gauge
                FROM RFC1155-SMI
        MacAddress,
        DisplayString
                FROM SNMPv2-TC
        MODULE-COMPLIANCE,
        NOTIFICATION-GROUP,
        OBJECT-GROUP
                FROM SNMPv2-CONF
        fsMgmt
                FROM FS-SMI;

fsEghaMIB MODULE-IDENTITY
        LAST-UPDATED "201506010000Z"
        ORGANIZATION "$Company$"
        CONTACT-INFO
            " 
        Tel: $Telephone$

        E-mail: $E-mail$"
        DESCRIPTION
            "This module defines EGHA management mibs."
        REVISION "201506010000Z"
        DESCRIPTION
            "Initial version of this MIB module."
    ::= { fsMgmt 139}

--********************************************************************
--                                                                  **
--                         EGHA objects root                         **
--                                                                  **
--********************************************************************
fsEghaMIBObjects OBJECT IDENTIFIER ::= { fsEghaMIB 1 }


--***************** the EGHA Topology nodes ********************
fsEghaTopo OBJECT IDENTIFIER ::= { fsEghaMIBObjects 1 }

fsEghaTopoShape OBJECT-TYPE
        SYNTAX      INTEGER {
                        chain(1),
                        ring(2)
                    }
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The EGHA system topology shape"
    ::= { fsEghaTopo 1 }

fsEghaTopoConn OBJECT-TYPE
        SYNTAX      DisplayString
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The switch topology connection layout of the EGHA system"
    ::= { fsEghaTopo 2 }


--***************** the EGHA device nodes *********************
fsEghaDeviceInfo OBJECT IDENTIFIER ::= { fsEghaMIBObjects 2 }

fsEghaDomainID OBJECT-TYPE
        SYNTAX      INTEGER
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The EGHA system domain ID"
    ::= { fsEghaDeviceInfo 1 }

fsEghaDeviceTable OBJECT-TYPE
        SYNTAX SEQUENCE OF  FSEghaDeviceEntry
        MAX-ACCESS          not-accessible 
        STATUS              current         
        DESCRIPTION     
            "The whole device information in EGHA system"
    ::= { fsEghaDeviceInfo 2 }

fsEghaDeviceEntry OBJECT-TYPE
        SYNTAX      FSEghaDeviceEntry 
        MAX-ACCESS  not-accessible
        STATUS      current
        DESCRIPTION
            "The device information entry"
        INDEX       { fsEghaDeviceID }
    ::= { fsEghaDeviceTable 1 }

FSEghaDeviceEntry ::=
        SEQUENCE {
            fsEghaDeviceID           INTEGER,   
            fsEghaDeviceMac          MacAddress,
            fsEghaDevicePri          INTEGER,
            fsEghaDeviceDescr        DisplayString,
            fsEghaDeviceStatus       INTEGER,
            fsEghaDeviceRole         INTEGER
        }

fsEghaDeviceID OBJECT-TYPE
        SYNTAX      INTEGER 
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The EGHA system member device identifier"
    ::= { fsEghaDeviceEntry 1 }

fsEghaDeviceMac OBJECT-TYPE
        SYNTAX      MacAddress 
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The EGHA system member device mac address"
    ::= { fsEghaDeviceEntry 2 }

fsEghaDevicePri OBJECT-TYPE
        SYNTAX      INTEGER 
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The EGHA system member device priority"
    ::= { fsEghaDeviceEntry 3 }

fsEghaDeviceDescr OBJECT-TYPE
        SYNTAX      DisplayString 
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The EGHA system member device description information"
    ::= { fsEghaDeviceEntry 4 }

fsEghaDeviceStatus OBJECT-TYPE
        SYNTAX      INTEGER {
                        ok(1),
                        recovery(2)
                    }
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The EGHA system member device status information"
    ::= { fsEghaDeviceEntry 5 }

fsEghaDeviceRole OBJECT-TYPE
        SYNTAX      INTEGER {
                        active(1),
                        standby(2),
                        candidate(3)
                    }
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The EGHA system member device role information"
    ::= { fsEghaDeviceEntry 6 }


--***************** the EGHA link nodes *********************
fsEghaLink OBJECT IDENTIFIER ::= { fsEghaMIBObjects 3 }

fsEghaPortTable OBJECT-TYPE 
        SYNTAX SEQUENCE OF  FSEghaPortEntry
        MAX-ACCESS          not-accessible 
        STATUS              current
        DESCRIPTION
            "The EGHA keeplive port members table"
    ::= { fsEghaLink 1 }

fsEghaPortEntry OBJECT-TYPE
        SYNTAX      FSEghaPortEntry
        MAX-ACCESS  not-accessible
        STATUS      current
        DESCRIPTION
            "The EGHA port members entry"
        INDEX       { fsEghaPortIfIndex } 
    ::= { fsEghaPortTable 1 }

FSEghaPortEntry ::=
        SEQUENCE {
            fsEghaPortIfIndex     INTEGER,       
            fsEghaApIf            DisplayString,
            fsEghaPortState       INTEGER,
            fsEghaPortPeerIfIndex INTEGER
        }

fsEghaPortIfIndex OBJECT-TYPE    
        SYNTAX      INTEGER
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The EGHA keeplive port index"
    ::= { fsEghaPortEntry 1 }
    
fsEghaApIf OBJECT-TYPE    
        SYNTAX      DisplayString
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The EGHA AP interface name"
    ::= { fsEghaPortEntry 2 }

fsEghaPortState OBJECT-TYPE
        SYNTAX      INTEGER {
                        down(1),        
                        up(2),
                        ok(3),
                        disable(4),
                        aged(5)
                    }
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The EGHA keeplive port's state"
    ::= { fsEghaPortEntry 3 }

fsEghaPortPeerIfIndex OBJECT-TYPE
        SYNTAX      INTEGER
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The EGHA keeplive port's peer port index"
    ::= { fsEghaPortEntry 4 }
    
fsEghaApTable OBJECT-TYPE 
        SYNTAX SEQUENCE OF  FSEghaApEntry
        MAX-ACCESS          not-accessible 
        STATUS              current
        DESCRIPTION
            "The EGHA AP table"
    ::= { fsEghaLink 2 }

fsEghaApEntry OBJECT-TYPE
        SYNTAX      FSEghaApEntry
        MAX-ACCESS  not-accessible
        STATUS      current
        DESCRIPTION
            "The EGHA AP entry"
        INDEX       { fsEghaApIndex } 
    ::= { fsEghaApTable 1 }

FSEghaApEntry ::=
        SEQUENCE {   
            fsEghaApIndex         INTEGER,
            fsEghaApUptime        DisplayString
        }
    
fsEghaApIndex OBJECT-TYPE    
        SYNTAX      INTEGER
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The EGHA AP index"
    ::= { fsEghaApEntry 1 }

fsEghaApUptime OBJECT-TYPE    
        SYNTAX      DisplayString
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The EGHA AP UP time"
    ::= { fsEghaApEntry 2 }


--***************** the EGHA DAD nodes *********************
fsEghaDad OBJECT IDENTIFIER ::= { fsEghaMIBObjects 4 }

fsEghaDadExIntfTable OBJECT-TYPE
        SYNTAX SEQUENCE OF  FSEghaDadExIntfEntry
        MAX-ACCESS          not-accessible
        STATUS              current
        DESCRIPTION
            "The EGHA dual-active excluded interface table"
    ::= { fsEghaDad 1 }

fsEghaDadExIntfEntry OBJECT-TYPE
        SYNTAX      FSEghaDadExIntfEntry
        MAX-ACCESS  not-accessible
        STATUS      current
        DESCRIPTION
            "The EGHA dual-active excluded interface entry"
        INDEX       { fsEghaDadExIfIndex }
    ::= { fsEghaDadExIntfTable 1 }

FSEghaDadExIntfEntry ::=
        SEQUENCE {
            fsEghaDadExIfIndex   INTEGER
        }

fsEghaDadExIfIndex OBJECT-TYPE
        SYNTAX      INTEGER
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The EGHA dual-active excluded interface index"
    ::= { fsEghaDadExIntfEntry 1 }
    
fsEghaDadAP OBJECT IDENTIFIER ::= { fsEghaDad 2 }

fsEghaDadAPEnable OBJECT-TYPE
        SYNTAX      INTEGER {
                        yes(1),
                        no(2)
                    }
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "Indicate wheather DAD AP detection is enable"
    ::= { fsEghaDadAP 1}
    
fsEghaDadAPIfIndex OBJECT-TYPE
        SYNTAX      INTEGER
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The EGHA DAD AP interface index"
    ::= { fsEghaDadAP 2}
    
fsEghaDadAPIfStatus OBJECT-TYPE    
        SYNTAX      INTEGER {
                        down(1),
                        up(2)
                    }
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The EGHA DAD AP interface status"
    ::= { fsEghaDadAP 3 }

fsEghaDadAPMemberIfTable  OBJECT-TYPE
        SYNTAX SEQUENCE OF  FSEghaDadAPMemberIfEntry
        MAX-ACCESS          not-accessible
        STATUS              current
        DESCRIPTION
            "The EGHA DAD AP member interface table"
    ::= { fsEghaDadAP 4 }

fsEghaDadAPMemberIfEntry OBJECT-TYPE
        SYNTAX      FSEghaDadAPMemberIfEntry
        MAX-ACCESS  not-accessible
        STATUS      current
        DESCRIPTION
            "The EGHA DAD AP member interface entry"
        INDEX {fsEghaDadAPMemberIfindex}
    ::= { fsEghaDadAPMemberIfTable 1 }

FSEghaDadAPMemberIfEntry ::=
        SEQUENCE {
            fsEghaDadAPMemberIfindex INTEGER,
            fsEghaDadAPMemberIfStatus INTEGER
        }

fsEghaDadAPMemberIfindex OBJECT-TYPE
        SYNTAX      INTEGER
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The EGHA DAD AP member interface index"
    ::= { fsEghaDadAPMemberIfEntry 1 }
    
fsEghaDadAPMemberIfStatus OBJECT-TYPE
        SYNTAX      INTEGER {
                        down(1),
                        up(2)
                    }
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The EGHA DAD AP member interface status"
    ::= { fsEghaDadAPMemberIfEntry 2 }

fsEghaDadAPRelayIfTable OBJECT-TYPE
        SYNTAX SEQUENCE OF  FSEghaDadAPRelayIfEntry
        MAX-ACCESS          not-accessible
        STATUS              current
        DESCRIPTION
            "The EGHA DAD AP relay interface table"
    ::= { fsEghaDadAP 5 }

fsEghaDadAPRelayIfEntry OBJECT-TYPE
        SYNTAX      FSEghaDadAPRelayIfEntry
        MAX-ACCESS  not-accessible
        STATUS      current
        DESCRIPTION
            "The EGHA DAD AP relay interface entry"
        INDEX       { fsEghaDadAPRelayIfIndex }
    ::= { fsEghaDadAPRelayIfTable 1 }

FSEghaDadAPRelayIfEntry ::=
        SEQUENCE {
            fsEghaDadAPRelayIfIndex   INTEGER
        }

fsEghaDadAPRelayIfIndex OBJECT-TYPE
        SYNTAX      INTEGER
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The EGHA DAD AP relay interface index"
    ::= { fsEghaDadAPRelayIfEntry 1 }
    
fsEghaDadBFD OBJECT IDENTIFIER ::= { fsEghaDad 3 }

fsEghaDadBFDEnable OBJECT-TYPE
        SYNTAX      INTEGER {
                        yes(1),
                        no(2)
                    }
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "Indicate wheather BFD detection is enable"
    ::= { fsEghaDadBFD 1 }

fsEghaDadBFDIfTable OBJECT-TYPE
        SYNTAX SEQUENCE OF  FSEghaDadBFDIfEntry
        MAX-ACCESS          not-accessible
        STATUS              current
        DESCRIPTION
            "The EGHA BFD interface table"
    ::= { fsEghaDadBFD 2 }

fsEghaDadBFDIfEntry OBJECT-TYPE
        SYNTAX      FSEghaDadBFDIfEntry
        MAX-ACCESS  not-accessible
        STATUS      current
        DESCRIPTION
            "The EGHA BFD interface entry"
        INDEX { 
            fsEghaDadBFDIfIndex1,
            fsEghaDadBFDIfIndex2
        }
    ::= { fsEghaDadBFDIfTable 1 }

FSEghaDadBFDIfEntry ::=
        SEQUENCE {
            fsEghaDadBFDIfIndex1   INTEGER,
            fsEghaDadBFDIfIndex2   INTEGER,
            fsEghaDadBFDIfStatus   INTEGER
        }

fsEghaDadBFDIfIndex1 OBJECT-TYPE    
        SYNTAX      INTEGER
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The EGHA BFD interface index"
    ::= { fsEghaDadBFDIfEntry 1 }
    
fsEghaDadBFDIfIndex2 OBJECT-TYPE    
        SYNTAX      INTEGER
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The EGHA BFD interface index"
    ::= { fsEghaDadBFDIfEntry 2 }
    
fsEghaDadBFDIfStatus OBJECT-TYPE    
        SYNTAX      INTEGER {
                        down(1),
                        up(2)
                    }
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The EGHA BFD interface status"
    ::= { fsEghaDadBFDIfEntry 3 }
        
    
--***************** the EGHA forward nodes *********************
fsEghaForward OBJECT IDENTIFIER ::= { fsEghaMIBObjects 5 }

fsEghaForwardApllf OBJECT-TYPE
        SYNTAX      INTEGER {
                        on(1),
                        off(2)
                    }
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "Indicate wheather AP local forward first is on"
    ::= { fsEghaForward 1 }

fsEghaForwardEcmpllf OBJECT-TYPE
        SYNTAX      INTEGER {
                        on(1),
                        off(2)
                    }
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "Indicate wheather ECMP local forward first is on"
    ::= { fsEghaForward 2 }


--******************* the EGHA Version nodes *********************
fsEghaVersion OBJECT-TYPE
        SYNTAX      DisplayString
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The EGHA system version"
    ::= { fsEghaMIBObjects 6 }


--********************************************************************
--                                                                  **
--                          traps nodes                             **
--                                                                  **
--********************************************************************
fsEghaMIBTraps OBJECT IDENTIFIER ::= { fsEghaMIB 2 }
fsEghaTrapsNtfObjects OBJECT IDENTIFIER ::= { fsEghaMIBTraps 1 } 

fsEghaDeviceState OBJECT-TYPE    
        SYNTAX      INTEGER {
                        plugin(1),
                        remove(2)
                    }
        MAX-ACCESS  accessible-for-notify
        STATUS      current
        DESCRIPTION
            "The description of device change state"
    ::= { fsEghaTrapsNtfObjects 1 }

fsEghaSlotID OBJECT-TYPE    
        SYNTAX      INTEGER 
        MAX-ACCESS  accessible-for-notify
        STATUS      current
        DESCRIPTION
            "The description of slot id"
    ::= { fsEghaTrapsNtfObjects 2 }

fsEghaDadResult OBJECT-TYPE
        SYNTAX      INTEGER {
                        good(1),
                        bad(2)
                    }
        MAX-ACCESS  accessible-for-notify
        STATUS      current
        DESCRIPTION
            "The description of dual-active detection results"
    ::= { fsEghaTrapsNtfObjects 3 }

fsEghaTrapsNotifications OBJECT IDENTIFIER ::= { fsEghaMIBTraps 2 }

fsEghaNotifyTopoChange NOTIFICATION-TYPE
        OBJECTS     {
                        fsEghaTopoShape
                    }
        STATUS      current
        DESCRIPTION
            "This notification is send by EGHA master when topology shape change"
    ::= { fsEghaTrapsNotifications 1 }
    
fsEghaNotifyDeviceChange NOTIFICATION-TYPE
        OBJECTS     {
                        fsEghaDeviceID,
                        fsEghaDeviceState
                    }
        STATUS      current
        DESCRIPTION
            "This notification is send by EGHA master when device plugin or remove"
    ::= { fsEghaTrapsNotifications 2 }

fsEghaNotifyDeviceRoleChange NOTIFICATION-TYPE
        OBJECTS     {
                        fsEghaDeviceID,
                        fsEghaSlotID,
                        fsEghaDeviceRole
                    }
        STATUS      current
        DESCRIPTION
            "This notification is send by EGHA master when device role change"
    ::= { fsEghaTrapsNotifications 3 }

fsEghaNotifyDad NOTIFICATION-TYPE
        OBJECTS     {
                        fsEghaDadResult
                    }
        STATUS      current
        DESCRIPTION
            "This notification is send by EGHA master when dual-active device detected"
    ::= { fsEghaTrapsNotifications 4 }

--********************************************************************
--                                                                  **
--                conformance information                           **
--                                                                  **
--********************************************************************
fsEghaMIBConformance OBJECT IDENTIFIER ::= { fsEghaMIB 3}
fsEghaMIBCompliances OBJECT IDENTIFIER ::= { fsEghaMIBConformance 1}
fsEghaMIBGroups OBJECT IDENTIFIER ::= { fsEghaMIBConformance 2}

--***************** compliance information ********************
fsEghaMIBCompliance MODULE-COMPLIANCE
        STATUS current
        DESCRIPTION
            "The compliance statement for entities which implement the FS EGHA"
        MODULE 
            MANDATORY-GROUPS { fsEghaMIBObjectsGroup, fsEghaMIBTrapsGroup }  
    ::= { fsEghaMIBCompliances 1 }

--***************** units of conformance ********************
fsEghaMIBObjectsGroup OBJECT-GROUP
        OBJECTS {
            fsEghaTopoShape,
            fsEghaTopoConn,
            fsEghaDomainID,
            fsEghaDeviceID,
            fsEghaDeviceMac,
            fsEghaDevicePri,
            fsEghaDeviceDescr,
            fsEghaDeviceStatus,
            fsEghaDeviceRole,
            fsEghaPortIfIndex,
            fsEghaApIf,
            fsEghaPortState,
            fsEghaPortPeerIfIndex,
            fsEghaApUptime,
            fsEghaDadExIfIndex,
            fsEghaDadAPEnable,
            fsEghaDadAPIfIndex,
            fsEghaDadAPIfStatus,
            fsEghaDadAPMemberIfindex,
            fsEghaDadAPMemberIfStatus,
            fsEghaDadAPRelayIfIndex,
            fsEghaDadBFDEnable,
            fsEghaDadBFDIfIndex1,
            fsEghaDadBFDIfIndex2,
            fsEghaDadBFDIfStatus,
            fsEghaForwardApllf,
            fsEghaForwardEcmpllf,
            fsEghaVersion,
            fsEghaDeviceState,
            fsEghaSlotID,
            fsEghaDadResult
        }
        STATUS  current
        DESCRIPTION
            "A collection of objects providing EGHA running status to a FS agent"
    ::= { fsEghaMIBGroups 1 }

fsEghaMIBTrapsGroup NOTIFICATION-GROUP
        NOTIFICATIONS {
            fsEghaNotifyTopoChange,
            fsEghaNotifyDeviceChange,
            fsEghaNotifyDeviceRoleChange,
            fsEghaNotifyDad
        }
        STATUS current
        DESCRIPTION 
            "A collection of traps providing EGHA running status to a FS agent"
    ::= { fsEghaMIBGroups 2 }

END

