-- This file is corresponding to Release 9.1.10.101 from 2014/08/11 00:00:00


-- (C)opyright 1991-2014 bintec elmeg GmbH, All Rights Reserved
-- $RCSfile: mibadmin2,v $
-- $Revision: 1.11 $ 

--    MIB definition for general administration objects
--      - scheduleTable, scheduleEventTable


BIANCA-BRICK-ADMIN-2-MIB DEFINITIONS ::= BEGIN

	IMPORTS
	    NetworkAddress, IpAddress, Counter, Gauge, TimeTicks, enterprises
		FROM RFC1155-SMI

            DisplayString
                FROM RFC1158-MIB

            Date, HexValue
                FROM BINTEC-MIB

	    OBJECT-TYPE
		FROM RFC-1212;

	--  This MIB module uses the extended OBJECT-TYPE macro as
	--  defined in [14];


	--  MIB-II (same prefix as MIB-I)
	bintec 		OBJECT IDENTIFIER ::= { enterprises 272 }
	bibo		OBJECT IDENTIFIER ::= { bintec 4 }
	admin-2		OBJECT IDENTIFIER ::= { bibo 22 }
    -- Admin-2 Group

    -- scheduler tables
	sched		OBJECT IDENTIFIER
            ::= { admin-2 2 }

    -- scheduler tables
    -- scheduler command table
    -- 
 	scheduleTable OBJECT-TYPE
 	    SYNTAX  SEQUENCE OF ScheduleEntry
 	    ACCESS  not-accessible
 	    STATUS  mandatory
 	    DESCRIPTION
 		"The scheduleTable lists the commands for the scheduler.
		 The scheduler watches the events (scheduleEventTable),
		 and sets the appropriate SNMP variable(s) in this table
		 schedVarTable/schedVarName in the row schedVarIndexName/
		 schedVarIndexVal to the specified value (ActiveValue/
		 InActiveValue).
		 Instead of setting an SNMP variable, also an application can
		 be executed (this must terminate without interaction).

		 Additional a notification can be send (syslog, trigger a 
		 SNMP trap).
		 To send a SNMP trap additional the SNMP must be configured
		 to create a trap on a change of this variable (add 
		 this variable in biboAdmUsrTrapTable).
                "
 	::= { sched 1 }
 
        scheduleEntry OBJECT-TYPE
	    SYNTAX  ScheduleEntry
 	    ACCESS  not-accessible
 	    STATUS  mandatory
 	    DESCRIPTION
 		  ""
 	    INDEX   { schedIndex }
 	::= { scheduleTable 1 }

 	ScheduleEntry ::= SEQUENCE {
 	    schedIndex 			INTEGER,
	    schedDescr			DisplayString,
	    schedMode			INTEGER,
	    schedEventIndex		INTEGER,
	    schedEventCondition		INTEGER,
	    schedVarTable		DisplayString,
	    schedVarName		DisplayString,
	    schedVarIndexName		DisplayString,
	    schedVarIndexVal		DisplayString,
	    schedActiveValue		DisplayString,
	    schedInActiveValue		DisplayString,
	    schedNotify			INTEGER,
	    schedStatus			INTEGER,
	    schedLastChange		Date
 	}

	schedIndex OBJECT-TYPE
	    SYNTAX  INTEGER (1 .. 65535)
	    ACCESS  read-write
	    STATUS  mandatory
	    DESCRIPTION
		"This object specifies the index number of this entry.
		 Should be unique."
	::= { scheduleEntry 1 }
 
	schedDescr OBJECT-TYPE
	    SYNTAX  DisplayString
	    ACCESS  read-write
	    STATUS  mandatory
	    DESCRIPTION
		"This object specifies the description (name) of this entry. 
		 Only for information."
	::= { scheduleEntry 2 }

 	schedMode OBJECT-TYPE
 	    SYNTAX  INTEGER { enable(1), disable(2), delete(3) }
 	    ACCESS  read-write
 	    STATUS  mandatory
 	    DESCRIPTION
 		"This object enables, disables or deletes the entry."
	    DEFVAL { enable }
 	::= { scheduleEntry 3 }

	schedEventIndex OBJECT-TYPE
	    SYNTAX  INTEGER (1 .. 65535)
	    ACCESS  read-write
	    STATUS  mandatory
	    DESCRIPTION
		"This object specifies the first index into the event table
		 (Index in scheduleEventTable).
		 This can be a single event or the first of multiple chained 
		 events that are monitored for this command.
		 "
	::= { scheduleEntry 4 }

 	schedEventCondition OBJECT-TYPE
 	    SYNTAX  INTEGER { all(1), one(2), none(3), one-not(4) }
 	    ACCESS  read-write
 	    STATUS  mandatory
 	    DESCRIPTION
 		"This object defines the condition(s) for the event (or chain) 
		 to change this command to active (variable is set 
		 to schedActiveValue).
		   all    : all events in the chain must be active (and)
		   one    : at least one event must be active (or)
		   none   : all events must be inactiv (not)
		   one_not: at least one event must be inactiv (nor)
		"
	    DEFVAL { all }
 	::= { scheduleEntry 5 }

	schedVarTable OBJECT-TYPE
	    SYNTAX  DisplayString
	    ACCESS  read-write
	    STATUS  mandatory
	    DESCRIPTION
		"This object specifies the name of the SNMP table in that the
		 variable(s) 'schedVarName' should be changed.
		 e.g. ifTable

		 If a new row in the MIB should be inserted (or overwritten 
		 if a row with given IndexVars already exists!) a '+' can be 
		 prefixed. The new row is inserted with the values from 
		 In/ActiveValue and VarIndexVal.
		 Be careful with the used VarIndexVal and the events, not to 
		 insert an infinite number of rows. 
		 e.g. +biboAdmConfigTable

		 If this is empty, an application command is executed.
		 The application name is in schedVarName, the argument list
		 in schedActiveValue / schedInActiveValue.
		 "
	::= { scheduleEntry 6 }

	schedVarName OBJECT-TYPE
	    SYNTAX  DisplayString
	    ACCESS  read-write
	    STATUS  mandatory
	    DESCRIPTION
		"This object specifies the name(s) of the SNMP variable to be 
	 	 changed, if the event is active/inactive.
		 The names should be written like in the header line of the
		 table view (no prefix necessary).
		 The var(s) are set to the values in schedActiveValue /
		 schedInActiveValue.
		 If multiple variables should be set, then separate the names 
		 by ';'.
		 e.g. AdminStatus or IntAddr;IntPort

		 If schedVarTable is empty this object contains the name of the 
		 application command to be executed.
		 Be careful: the application must terminate without interaction
		 otherwise the scheduler will block until it terminates.
		 e.g. update
		 "
	::= { scheduleEntry 7 }

	schedVarIndexName OBJECT-TYPE
	    SYNTAX  DisplayString
	    ACCESS  read-write
	    STATUS  mandatory
	    DESCRIPTION
		"This object specifies the SNMP variable name(s) in the 
		 schedVarTable table, that should specify the approprate 
		 row (with schedVarIndexVal).
		 If a row cannot be identified by a single var (not unique)
		 then multiple variables can be given (separated by ';').
		 e.g. IfIndex or IfIndex;ExtPort
		 "
	::= { scheduleEntry 8 }

	schedVarIndexVal OBJECT-TYPE
	    SYNTAX  DisplayString
	    ACCESS  read-write
	    STATUS  mandatory
	    DESCRIPTION
		"This object specifies the value(s) of the schedVarIndexName,
		 that specifies the approprate row.
		 The number and type of the values must correspond to the 
		 given VarIndexName.
		 e.g. 10001 or 10001;123
		 "
	::= { scheduleEntry 9 }

	schedActiveValue OBJECT-TYPE
	    SYNTAX  DisplayString
	    ACCESS  read-write
	    STATUS  mandatory
	    DESCRIPTION
		"This object specifies the value(s) that is written to the SNMP 
		 variable(s) in schedVarName, when the event is active.
		 If this is empty no change is done, only a notification is
		 sent (SNMPtrap of schedVarName is possible if monitored
		 with an event).
		 The number and type of the values must correspond to the 
		 given VarName.
		 e.g. down or 10.1.1.1;123

		 On application execution this is the argument list:
		 e.g. -a 1.2.3.4 filename
		 "
	::= { scheduleEntry 10 }

	schedInActiveValue OBJECT-TYPE
	    SYNTAX  DisplayString
	    ACCESS  read-write
	    STATUS  mandatory
	    DESCRIPTION
		"This object specifies the value(s) that is written to the SNMP 
		 variable(s) in schedVarName, when the event is inactive.
		 This is also the default value after a restart of the router
		 or if the system time is not set correct.
		 The number and type of the values must correspond to the 
		 given VarName.
		 e.g. up or 10.1.1.2;123

		 On application execution this is the argument list:
		 e.g. -a 1.2.3.4 filename
		 "
	::= { scheduleEntry 11 }

 	schedNotify OBJECT-TYPE
 	    SYNTAX  INTEGER { none(1), all(2), snmptrap(3), syslog(4) }
 	    ACCESS  read-write
 	    STATUS  mandatory
 	    DESCRIPTION
 		"This object defines the notification method, if a variable is
		 changed.
		  none    : no notification
		  all     : all below notification methods
		  snmptrap: only a SNMP trap is triggered 
		            (also create an entry in biboAdmUsrTrapTable
			     and biboAdmTrapHostTable)
		  syslog  : only a syslog is generated
		"
	    DEFVAL { all }
 	::= { scheduleEntry 12 }

 	schedStatus OBJECT-TYPE
 	    SYNTAX  INTEGER { active(1), inactive(2), notavail(3), error(4) }
 	    ACCESS  read-only
 	    STATUS  mandatory
 	    DESCRIPTION
 		"This object shows the current status of the event (list).
		 error indicates a invalid field (e.g. VarNameVarIndex,
		 value range ...)
		"
	    DEFVAL { notavail }
 	::= { scheduleEntry 13 }

 	schedLastChange OBJECT-TYPE
 	    SYNTAX  Date
 	    ACCESS  read-only
 	    STATUS  mandatory
 	    DESCRIPTION
 		"This object shows the time of the last change."
 	::= { scheduleEntry 14 }

    -- scheduler event table
    -- 
 	scheduleEventTable OBJECT-TYPE
 	    SYNTAX  SEQUENCE OF ScheduleEventEntry
 	    ACCESS  not-accessible
 	    STATUS  mandatory
 	    DESCRIPTION
 		"This table lists the events for the scheduler (scheduleTable).
		 The events are chained with the field NextIndex, to
		 define a list of events, that are valid depending on
		 a specified condition.
		 The event gets active on a time point or depending
		 on the content of a SNMP variable specified in this table
		 schedEvtVarTable/schedEvtVarName in the row
		 schedEvtVarIndexName/schedEvtVarIndexVal.
		"
 	::= { sched 2 }
 
        scheduleEventEntry OBJECT-TYPE
	    SYNTAX  ScheduleEventEntry
 	    ACCESS  not-accessible
 	    STATUS  mandatory
 	    DESCRIPTION
 		  ""
 	    INDEX   { schedEvtIndex }
 	::= { scheduleEventTable 1 }

 	ScheduleEventEntry ::= SEQUENCE {
	    schedEvtIndex 		INTEGER,
	    schedEvtNextIndex		INTEGER,
	    schedEvtDescr		DisplayString,
	    schedEvtType		INTEGER,
	    schedEvtVarTable		DisplayString,
	    schedEvtVarName		DisplayString,
	    schedEvtVarIndexName	DisplayString,
	    schedEvtVarIndexVal		DisplayString,
	    schedEvtCondition		INTEGER,
	    schedEvtStart		DisplayString,
	    schedEvtEnd			DisplayString,
	    schedEvtStatus		INTEGER,
	    schedEvtLastChange		Date
	}

	schedEvtIndex OBJECT-TYPE
	    SYNTAX  INTEGER (1 .. 65535)
	    ACCESS  read-write
	    STATUS  mandatory
	    DESCRIPTION
		"This object specifies the index number of this entry.
		 Must be unique and the corresponding variable in scheduleTable
		 (EventIndex) refers to this index."
	::= { scheduleEventEntry 1 }
 
 	schedEvtNextIndex OBJECT-TYPE
 	    SYNTAX  INTEGER (0 .. 65535)
 	    ACCESS  read-write
 	    STATUS  mandatory
 	    DESCRIPTION
 		"This object defines the next entry in the event chain.
		 0 means the end the chain."
 	::= { scheduleEventEntry 2 }

	schedEvtDescr OBJECT-TYPE
	    SYNTAX  DisplayString
	    ACCESS  read-write
	    STATUS  mandatory
	    DESCRIPTION
		"This object specifies the description (name) of this entry. 
		 Only for information."
	::= { scheduleEventEntry 3 }

 	schedEvtType OBJECT-TYPE
 	    SYNTAX  INTEGER { delete(1), time(2), value(3) }
 	    ACCESS  read-write
 	    STATUS  mandatory
 	    DESCRIPTION
 		"This object defines the type of the event or deletes the entry
		  time   : the event is time triggered
		           The events gets active on a specified time range.
		           'Condition' must contain daily .. day31, and
			   'Start+End' contain a time range, e.g. 12:00 + 13:00
		  value  : the event is value triggered
		           'Condition' must contain greater .. range
		           The event gets active if a SNMP variable gets a 
			   specified value (or range).
			   'VarTable/VarName' specifies the watched SNMP 
			   variable.
			   'Start+End' contain a value range, e.g. 1000 + 2000
		"
	    DEFVAL { time }
 	::= { scheduleEventEntry 4 }

	schedEvtVarTable OBJECT-TYPE
	    SYNTAX  DisplayString
	    ACCESS  read-write
	    STATUS  mandatory
	    DESCRIPTION
		"This object specifies the name of the SNMP table in which the
		 variable should be monitored (only Type = value).
		 e.g. biboPPPStatTable
		 "
	::= { scheduleEventEntry 5 }

	schedEvtVarName OBJECT-TYPE
	    SYNTAX  DisplayString
	    ACCESS  read-write
	    STATUS  mandatory
	    DESCRIPTION
		"This object specifies the name of the SNMP variable that 
		 is monitored  (only Type = value).
		 e.g. ifOperStatus"
	::= { scheduleEventEntry 6 }

	schedEvtVarIndexName OBJECT-TYPE
	    SYNTAX  DisplayString
	    ACCESS  read-write
	    STATUS  mandatory
	    DESCRIPTION
		"This object specifies the SNMP variable name(s) in the
		 table, that should specify the approprate row (with
		 schedVarIndexVal).
		 If a row cannot be identified by a single var (not unique)
		 then multiple variables can be given (separated by ';').
		 e.g. IfIndex or IfIndex;ExtPort
		 "
	::= { scheduleEventEntry 7 }

	schedEvtVarIndexVal OBJECT-TYPE
	    SYNTAX  DisplayString
	    ACCESS  read-write
	    STATUS  mandatory
	    DESCRIPTION
		"This object specifies the value of the schedEvtVarIndexName,
		 that specifies the approprate row.
		 If not given, the index is the same as the appropriate
		 entry in the scheduleTable (schedVarIndexVal).
		 This allows to have the same event, for many commands, 
		 that refer to different rows.
		 The number and type of the values must correspond to the
		 given schedEvtVarIndexName.
		 e.g. 10001 or 10001;123
		 "
	::= { scheduleEventEntry 8 }

	schedEvtCondition OBJECT-TYPE
	    SYNTAX  INTEGER { 
		    greater(1), equal(2), less(3), notequal(4), range(5),
	            daily(6), sunday(7), monday(8), tuesday(9), wednesday(10),
	            thursday(11),friday(12), saturday(13),
		    mon-fri(14), mon-sat(15), sat-sun(16),
		    day1(17),day2(18),day3(19),day4(20),day5(21),day6(22),
		    day7(23),day8(24),day9(25),day10(26),day11(27),day12(28),
		    day13(29),day14(30),day15(31),day16(32),day17(33),day18(34),
		    day19(35),day20(36),day21(37),day22(38),day23(39),day24(40),
		    day25(41),day26(42),day27(43),day28(44),day29(45),day30(46),
		    day31(47)
		    }
	    ACCESS  read-write
	    STATUS  mandatory
	    DESCRIPTION
		"This object specifies the condition when the event is active
		  Time events (active at the time 'Start' until 'End'): 
		    daily         : the time event is daily active at given time
		    monday..sunday: the time event is weekly active
		    day1..day31   : the time event is monthly active
		    mon_fri       : from monday to friday
		    mon_sat       : from monday to saturday
		    sat_sun       : weekend (saturday and sunday)
		  Value events:
		    greater       : value of 'Var' must be greater than 'Start'
		    equal         : value of 'Var' must be equal to 'Start'
		    less          : value of 'Var' must be less than 'Start'
		    notequal      : value of 'Var' must be not equal to 'Start'
		    range         : value of 'Var' must be between 'Start-End'
		 "
	    DEFVAL { daily }
	::= { scheduleEventEntry 9 }

	schedEvtStart OBJECT-TYPE
	    SYNTAX  DisplayString
	    ACCESS  read-write
	    STATUS  mandatory
	    DESCRIPTION
		"This object specifies the start value.

		 In case of a time event it must be a time in format 'hh:mm'
		 In case of a value event it must be a valid value for the 
		 specified 'VarName', to specify the compare value or the
		 lower value of the range.
		 for time entries e.g. 12:00
		 for value entries e.g. 20000
		 "
	::= { scheduleEventEntry 10 }

	schedEvtEnd OBJECT-TYPE
	    SYNTAX  DisplayString
	    ACCESS  read-write
	    STATUS  mandatory
	    DESCRIPTION
		"This object specifies the end value (time or value range).

		 In case of a time event it must be a time in format 'hh:mm'
		 If this is not given, the event is active only at the
		 time 'Start', and set back to inactive at once (one-time 
		 event).
		 In case of a value event it must be a valid value for the 
		 specified 'VarName', to specify the upper value of the range.
		 "
	::= { scheduleEventEntry 11 }

	schedEvtStatus OBJECT-TYPE
 	    SYNTAX  INTEGER { active(1), inactive(2), notavail(3), error(4) }
	    ACCESS  read-only
	    STATUS  mandatory
	    DESCRIPTION
		"This object indicates the status of the event.
		 For value events the status is only available in the
		 scheduleTable, because more than one entry can refer to 
		 the same event entry.
		 'error' indicates an invalid field (e.g. VarTable, VarName,
		 time range,..)
		"
	    DEFVAL { notavail }
	::= { scheduleEventEntry 12 }

 	schedEvtLastChange OBJECT-TYPE
 	    SYNTAX  Date
 	    ACCESS  read-only
 	    STATUS  mandatory
 	    DESCRIPTION
 		"This object shows the time of the last change."
 	::= { scheduleEventEntry 13 }

END
