5767N/A<?
xml version="1.0" encoding="UTF-8" standalone="no"?>
5767N/A ! The contents of this file are subject to the terms of the 5767N/A ! Common Development and Distribution License, Version 1.0 only 5767N/A ! (the "License"). You may not use this file except in compliance 5767N/A ! You can obtain a copy of the license at 5767N/A ! See the License for the specific language governing permissions 5767N/A ! and limitations under the License. 5767N/A ! When distributing Covered Code, include this CDDL HEADER in each 5767N/A ! file and include the License file at 5767N/A ! add the following below this CDDL HEADER, with the fields enclosed 5767N/A ! by brackets "[]" replaced with your own identifying information: 5767N/A ! Portions Copyright [yyyy] [name of copyright owner] 5767N/A ! Copyright 2008-2010 Sun Microsystems, Inc. 6211N/A ! Portions Copyright 2012-2013 ForgeRock AS 5767N/A <!--- Test Case information 5767N/A #@TestMarker SNMP traps with default configuration 5767N/A #@TestName traps_defaultconf: traps on stop-ds 5767N/A #@TestPurpose Check that a trap is sent on default trap 5767N/A community after stop-ds command. 5767N/A #@TestStep Run the trap listener, it send an event to 5767N/A #@TestStep When this event is received, stop-ds command 5767N/A is executed and a another event is sent to 5767N/A notify that the command is completed. 5767N/A #@TestStep The trap listener catches this event and send 5767N/A #@TestResult Success if SNMPTrapListener returns 0. 5767N/A <
function name="snmp_traps_default_001" scope="local">
5767N/A <
testcase name="getTestCaseName('Trap on stop-ds')">
5767N/A <
call function="'testCase_Preamble'"/>
5767N/A <
timer duration="timerDuration">
5767N/A <
call function="'testStep'">
5767N/A { 'stepMessage' : 'Run the trap listener' }
5767N/A <
call function="'SNMPTrapListener'">
5767N/A 'location' : STAF_REMOTE_HOSTNAME ,
5767N/A 'snmpHost' : DIRECTORY_INSTANCE_HOST ,
5767N/A 'snmpTrapPort' : SNMP_TRAP_PORT ,
5767N/A 'snmpTrapCommunity' : trapsCommunity ,
5767N/A 'snmpTrapNumber' : '1,0,0,0,0,0' ,
5767N/A 'outputFile' : outputFile ,
6211N/A 'knownIssue' : 'OPENDJ-870'
5767N/A <
call function="'testStep'">
5767N/A { 'stepMessage' : 'Wait event from the trap listener' }
5767N/A <
call function="'WaitEvent'">
5767N/A 'location' : STAF_REMOTE_HOSTNAME ,
5767N/A <
call function="'testStep'">
5767N/A { 'stepMessage' : 'Delete event from the trap listener' }
5767N/A <
call function="'DeleteEvent'">
5767N/A 'location' : STAF_REMOTE_HOSTNAME ,
5767N/A <
call function="'testStep'">
5767N/A { 'stepMessage' : 'Stop the server' }
5767N/A <
call function="'StopDsWithScript'">
5767N/A { 'location' : STAF_REMOTE_HOSTNAME }
5767N/A <
call function="'testStep'">
5767N/A { 'stepMessage' : 'Send event to the trap listener' }
5767N/A <
call function="'SendEvent'">
5767N/A 'location' : STAF_REMOTE_HOSTNAME ,
5767N/A <
script>timerRC = RC</
script>
5767N/A <
call function="'checkTimerResult'">
5767N/A 'location' : STAF_REMOTE_HOSTNAME ,
5767N/A 'outputFile' : outputFile ,
5767N/A 'timerDuration' : timerDuration ,
5767N/A <
catch exception="'STAXException'" typevar="eType" var="eInfo">
5767N/A <
message log="1" level="'fatal'">
5767N/A '%s: Test failed. eInfo(%s)' % (eType,eInfo)
5767N/A <
call function="'testCase_Postamble'"/>
5767N/A <!--- Test Case information 5767N/A #@TestMarker SNMP traps with default configuration 5767N/A #@TestName traps_defaultconf: trap on start-ds 5767N/A #@TestPurpose Check that a trap is sent on default trap 5767N/A community after start-ds command. 5767N/A #@TestStep Run the trap listener, it send an event to 5767N/A #@TestStep When this event is received, start-ds command 5767N/A is executed and a another event is sent to 5767N/A notify that the command is completed. 5767N/A #@TestStep The trap listener catches this event and send 5767N/A #@TestResult Success if SNMPTrapListener returns 0. 5767N/A <
function name="snmp_traps_default_002" scope="local">
5767N/A <
testcase name="getTestCaseName('Trap on start-ds')">
5767N/A <
call function="'testCase_Preamble'"/>
5767N/A <
timer duration="timerDuration">
5767N/A <
call function="'testStep'">
5767N/A { 'stepMessage' : 'Run the trap listener' }
5767N/A <
call function="'SNMPTrapListener'">
5767N/A 'snmpHost' : DIRECTORY_INSTANCE_HOST ,
5767N/A 'snmpTrapPort' : SNMP_TRAP_PORT ,
5767N/A 'snmpTrapCommunity' : trapsCommunity ,
5767N/A 'snmpTrapNumber' : '1,0,0,0,0,0' ,
5767N/A <
call function="'testStep'">
5767N/A { 'stepMessage' : 'Wait event from the trap listener' }
5767N/A <
call function="'WaitEvent'">
5767N/A 'location' : STAF_REMOTE_HOSTNAME ,
5767N/A <
call function="'testStep'">
5767N/A { 'stepMessage' : 'Delete event from the trap listener' }
5767N/A <
call function="'DeleteEvent'">
5767N/A 'location' : STAF_REMOTE_HOSTNAME ,
5767N/A <
call function="'testStep'">
5767N/A { 'stepMessage' : 'Start the server' }
5767N/A <
call function="'StartDsWithScript'">
5767N/A { 'location' : STAF_REMOTE_HOSTNAME }
5767N/A <!--- Check that DS started --> 5767N/A <
call function="'isAlive'">
5767N/A <
call function="'testStep'">
5767N/A { 'stepMessage' : 'Send event to the trap listener' }
5767N/A <
call function="'SendEvent'">
5767N/A 'location' : STAF_REMOTE_HOSTNAME ,
5767N/A <
script>timerRC = RC</
script>
5767N/A <
call function="'checkTimerResult'">
5767N/A 'location' : STAF_REMOTE_HOSTNAME ,
5767N/A 'outputFile' : outputFile ,
5767N/A 'timerDuration' : timerDuration ,
5767N/A <
catch exception="'STAXException'" typevar="eType" var="eInfo">
5767N/A <
message log="1" level="'fatal'">
5767N/A '%s: Test failed. eInfo(%s)' % (eType,eInfo)
5767N/A <
call function="'testCase_Postamble'"/>
5767N/A <!--- Test Case information 5767N/A #@TestMarker SNMP traps with default configuration 5767N/A #@TestName traps_defaultconf: trap on stop-ds -R 5767N/A #@TestPurpose Check that 2 traps are sent on default trap 5767N/A community after stop-ds -R command. 5767N/A #@TestStep Run the trap listener, it send an event to 5767N/A #@TestStep When this event is received, stop-ds -R 5767N/A command is executed and a another event is 5767N/A sent to notify that the command is completed. 5767N/A #@TestStep The trap listener catches this event and send 5767N/A #@TestResult Success if SNMPTrapListener returns 0. 5767N/A <
function name="snmp_traps_default_003" scope="local">
5767N/A <
testcase name="getTestCaseName('Trap on stop-ds -R')">
5767N/A <
call function="'testCase_Preamble'"/>
5767N/A <
timer duration="timerDuration">
5767N/A <
call function="'testStep'">
5767N/A { 'stepMessage' : 'Run the trap listener' }
5767N/A <
call function="'SNMPTrapListener'">
5767N/A 'snmpHost' : DIRECTORY_INSTANCE_HOST ,
5767N/A 'snmpTrapPort' : SNMP_TRAP_PORT ,
5767N/A 'snmpTrapCommunity' : trapsCommunity ,
5767N/A 'snmpTrapNumber' : '2,0,0,0,0,0' ,
5767N/A 'outputFile' : outputFile ,
6211N/A 'knownIssue' : 'OPENDJ-870'
5767N/A <
call function="'testStep'">
5767N/A { 'stepMessage' : 'Wait event from the trap listener' }
5767N/A <
call function="'WaitEvent'">
5767N/A 'location' : STAF_REMOTE_HOSTNAME ,
5767N/A <
call function="'testStep'">
5767N/A { 'stepMessage' : 'Delete event from the trap listener' }
5767N/A <
call function="'DeleteEvent'">
5767N/A 'location' : STAF_REMOTE_HOSTNAME ,
5767N/A <
call function="'testStep'">
5767N/A { 'stepMessage' : 'Restart the server' }
5767N/A <
call function="'StopDsWithScript'">
5767N/A { 'location' : STAF_REMOTE_HOSTNAME }
5767N/A <
call function="'StartDsWithScript'">
5767N/A { 'location' : STAF_REMOTE_HOSTNAME }
5767N/A <!--- Check that DS started --> 5767N/A <
call function="'isAlive'">
5767N/A <
call function="'testStep'">
5767N/A { 'stepMessage' : 'Send event to the trap listener' }
5767N/A <
call function="'SendEvent'">
5767N/A 'location' : STAF_REMOTE_HOSTNAME ,
5767N/A <
script>timerRC = RC</
script>
5767N/A <
call function="'checkTimerResult'">
5767N/A 'location' : STAF_REMOTE_HOSTNAME ,
5767N/A 'outputFile' : outputFile ,
5767N/A 'timerDuration' : timerDuration ,
5767N/A <
catch exception="'STAXException'" typevar="eType" var="eInfo">
5767N/A <
message log="1" level="'fatal'">
5767N/A '%s: Test failed. eInfo(%s)' % (eType,eInfo)
5767N/A <
call function="'testCase_Postamble'"/>