-- ===========================================================================
-- Copyright(C) 2018 by HUAWEI TECHNOLOGIES. All rights reserved.
-- Description: HUAWEI-SR-TRAP-MIB
-- Version: V1.00
-- History:
-- 			Created by s00900894 2018-02-05
-- Reference:   Module(HUAWEI-SR-TRAP-MIB) Extracted from RFCXXXX.TXT,from XXXX to XXXXX.Obsoletes: 1850
-- =====================================================================================================

   HUAWEI-SR-TRAP-MIB DEFINITIONS ::= BEGIN

   IMPORTS
       MODULE-IDENTITY, OBJECT-TYPE, NOTIFICATION-TYPE, IpAddress, Integer32
                    FROM SNMPv2-SMI
       MODULE-COMPLIANCE, OBJECT-GROUP, NOTIFICATION-GROUP
                    FROM SNMPv2-CONF
	   hwDatacomm            
					FROM HUAWEI-MIB;
					
     hwSrTrap MODULE-IDENTITY

          LAST-UPDATED "201801210000Z" -- January 21, 2018 00:00:00 EST
		  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 MIB module to describe traps for the SR
             Version 2 Protocol.
			 
			Segment Routing (SR) as defined in [SR-ARCH] utilizes forwarding
			instructions called segments to direct packets through the network.
			Depending on the forwarding plane architecture in use, routing
			protocols advertise various identifiers which define the permissible
			values which can be used as segments, which values are assigned to
			specific prefixes, etc.  Where segments have global scope it is
			necessary to have non-conflicting assignments - but given that the
			advertisements may originate from multiple nodes the possibility
			exists that advertisements may be received which are either
			internally inconsistent or conflicting with advertisements originated
			by other nodes.  In such cases it is necessary to have consistent
			resolution of conflicts network-wide in order to avoid forwarding
			loops.
			
			This draft,draft-ietf-spring-conflict-resolution-05
			describes the Conflict detection and resolution.
			
			When conflict is detected user must be informed the same using the
			trap defined in this MIB."
			
		  REVISION"201801210000Z"
             DESCRIPTION "V1.00, 
                          1. Added the hwSrTrap MIB."
          ::= { hwDatacomm 353 }

   --  Trap Support Objects

   --  The following are support objects for the SR traps.

     hwSrTrapControl OBJECT IDENTIFIER ::= { hwSrTrap 1 }
     hwSrTraps OBJECT IDENTIFIER ::= { hwSrTrap 2 }

     hwSrSetTrap OBJECT-TYPE
          SYNTAX       OCTET STRING (SIZE(4))
          MAX-ACCESS   read-write
          STATUS       current
          DESCRIPTION
             "A 4-octet string serving as a bit map for
             the trap events defined by the HUAWEI SR traps.  This
             object is used to enable and disable specific
             SR traps where a 1 in the bit field
             represents enabled.  The right-most bit (least
             significant) represents trap 0.

             This object is persistent and when written
             the entity SHOULD save the change to non-volatile
             storage."
           ::= { hwSrTrapControl 1 }
		  
	 hwSrProcessId OBJECT-TYPE
	     SYNTAX       Integer32
         MAX-ACCESS   read-write
         STATUS       current
         DESCRIPTION
           "The process ID indicates the OSPF or ISIS process number. 
		   The value ranges from 1 to 4294967295."
         ::= { hwSrTrapControl 2 }

	 hwSrPrefixSid OBJECT-TYPE
	     SYNTAX       Integer32
         MAX-ACCESS   read-write
         STATUS       current
         DESCRIPTION
			"Conflicted Prefix sid Index. The value ranges from  0 to 65534." 
         ::= { hwSrTrapControl 3 }
		 
     hwSrPrefixAddressMask OBJECT-TYPE
          SYNTAX       IpAddress
          MAX-ACCESS   read-only
          STATUS       current
          DESCRIPTION
             "Prefix Ip Address Mask."
          ::= { hwSrTrapControl 4 }

     hwSrPrefixAddress OBJECT-TYPE
          SYNTAX       IpAddress
          MAX-ACCESS   read-only
          STATUS       current
          DESCRIPTION
             "The Prefix Address configured in the Loopback Interface."
          ::= { hwSrTrapControl 5 }		  
		  
	 hwSrProtocol OBJECT-TYPE
		 SYNTAX       INTEGER { ospf (1),
                                        isis (2),
                                        segr (3)
                            }
         MAX-ACCESS   read-only
         STATUS       current
         DESCRIPTION
          "The conflict alarm can be raised within process by OSPF or ISIS.
		  In case conflict between ISIS and OSPF or between different process, 
		  SEGR raises the alarm."
          ::= { hwSrTrapControl 6 }
		  
	 hwSrConflictType OBJECT-TYPE
         SYNTAX       INTEGER { sidConflict (1),
                                prefixConflict (2)
                            }
         MAX-ACCESS   read-only
         STATUS       current
         DESCRIPTION
          "Conflict type can be Prefix Sid conflict or Prefix conflict."
          ::= { hwSrTrapControl 8 } 
		  
	 hwSrConflictState OBJECT-TYPE
         SYNTAX       INTEGER { inConflict (1),
                                conflictResolved (2)
                            }
         MAX-ACCESS   read-only
         STATUS       current
         DESCRIPTION
          "Conflict state indicates the current conflict state."
          ::= { hwSrTrapControl 9 } 
		
   --  Traps

     hwSrPrefixSidConflict NOTIFICATION-TYPE
          OBJECTS { 
			 hwSrProtocol,
             hwSrProcessId,
             hwSrPrefixSid,
			 hwSrPrefixAddress,
			 hwSrPrefixAddressMask,
			 hwSrConflictType,
			 hwSrConflictState
             }
          STATUS       current
          DESCRIPTION
             "An hwSrPrefixSidConflict trap signifies that a prefix sid 
			 conflict is detected."
          ::= { hwSrTraps 1 }

   hwSrTrapConformance OBJECT IDENTIFIER ::= { hwSrTrap 4 }
   hwSrTrapGroups      OBJECT IDENTIFIER ::= { hwSrTrapConformance 1 }
   hwSrTrapCompliances OBJECT IDENTIFIER ::= { hwSrTrapConformance 2 }

   --  compliance statements

   hwSrTrapCompliance MODULE-COMPLIANCE
        STATUS       obsolete
        DESCRIPTION
           "The compliance statement."
        MODULE       -- this module
        MANDATORY-GROUPS { hwSrTrapControlGroup }

        GROUP       hwSrTrapControlGroup
        DESCRIPTION
           "This group is optional but recommended for all HUAWEI SR systems."
        ::= { hwSrTrapCompliances 1 }

   hwSrTrapCompliance2 MODULE-COMPLIANCE
        STATUS       current
        DESCRIPTION
           "The compliance statement."
        MODULE       -- this module
        MANDATORY-GROUPS { hwSrTrapControlGroup, hwSrTrapEventGroup }
        OBJECT       hwSrProcessId
        MIN-ACCESS   accessible-for-notify
        DESCRIPTION
           "This object is only required to be supplied within
           notifications."
        OBJECT       hwSrPrefixSid
        MIN-ACCESS   accessible-for-notify
        DESCRIPTION
           "This object is only required to be supplied within
           notifications."
        OBJECT       hwSrPrefixAddressMask
        MIN-ACCESS   accessible-for-notify
        DESCRIPTION
           "This object is only required to be supplied within
           notifications."
        OBJECT       hwSrPrefixAddress
        MIN-ACCESS   accessible-for-notify
        DESCRIPTION
           "This object is only required to be supplied within
           notifications."
        OBJECT       hwSrProtocol
        MIN-ACCESS   accessible-for-notify
        DESCRIPTION
           "This object is only required to be supplied within
           notifications."
        OBJECT       hwSrConflictType
        MIN-ACCESS   accessible-for-notify
        DESCRIPTION
           "This object is only required to be supplied within
           notifications."
        OBJECT       hwSrConflictState
        MIN-ACCESS   accessible-for-notify
        DESCRIPTION
           "This object is only required to be supplied within
           notifications."
        ::= { hwSrTrapCompliances 2 }

   --  units of conformance

     hwSrTrapControlGroup    OBJECT-GROUP
          OBJECTS { hwSrSetTrap,
					hwSrProcessId,
					hwSrPrefixSid,
					hwSrPrefixAddressMask,
					hwSrPrefixAddress,
					hwSrProtocol,
					hwSrConflictType,
					hwSrConflictState}
          STATUS       current
          DESCRIPTION
             "These objects are required to control traps from HUAWEI SR systems."
          ::= { hwSrTrapGroups 1 }

     hwSrTrapEventGroup       NOTIFICATION-GROUP
          NOTIFICATIONS {
             hwSrPrefixSidConflict
             }
          STATUS        current
          DESCRIPTION
             "A grouping of OSPF trap events, as specified
             in NOTIFICATION-TYPE constructs."
          ::= { hwSrTrapGroups 2 }

   END
