snmp_v3.xml revision 21d225782e5e4cc8e40d1fdd364430570ac2dd09
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE stax SYSTEM "/shared/stax.dtd">
<!--
! CDDL HEADER START
!
! The contents of this file are subject to the terms of the
! Common Development and Distribution License, Version 1.0 only
! (the "License"). You may not use this file except in compliance
! with the License.
!
! You can obtain a copy of the license at
! trunk/opends/resource/legal-notices/CDDLv1_0.txt
! or http://forgerock.org/license/CDDLv1.0.html.
! See the License for the specific language governing permissions
! and limitations under the License.
!
! When distributing Covered Code, include this CDDL HEADER in each
! file and include the License file at
! trunk/opends/resource/legal-notices/CDDLv1_0.txt. If applicable,
! add the following below this CDDL HEADER, with the fields enclosed
! by brackets "[]" replaced with your own identifying information:
! Portions Copyright [yyyy] [name of copyright owner]
!
! CDDL HEADER END
!
! Copyright 2012 ForgeRock AS.
! -->
<stax>
<defaultcall function="main_snmp_v3"/>
<function name="main_snmp_v3" scope="local">
<sequence>
<block name="'main_snmp_v3'">
<try>
<sequence>
<script>
CurrentTestPath['group']='snmp'
CurrentTestPath['suite']='v3'
__group=CurrentTestPath['group']
__groupdir='%s/testcases/%s' % (TESTS_DIR,__group)
</script>
<!--- Test Suite information
#@TestSuiteName SNMP v3 with default configuration
#@TestSuitePurpose Check SNMP v3 with default configuration.
#@TestSuiteGroup SNMP v3 with default configuration
#@TestScript snmp_v3.xml
#@TestHTMLLink http://www.forgerock.org/
-->
<call function="'testSuite_Preamble'"/>
<try>
<sequence>
<!-- List of Import of Test Functions -->
<script>
importList=[]
importList.append('v3/snmp_v3_defaultconf_tests')
importList.append('v3/snmp_v3_customconf_tests')
</script>
<!-- Import the files for this test suite -->
<iterate var="__import" in="importList">
<import machine="STAF_LOCAL_HOSTNAME"
file="'%s/%s.xml' % (__groupdir,__import)"/>
</iterate>
<!-- Specific to v3 SNMP tests -->
<script>
# Default
securityFile = '%s/snmp/manager.security' % remote.data
securityLevel = SNMP_PROPERTIES['security-level']
context = SNMP_PROPERTIES['community']
oid = 'dsServerType.1'
# Custom
defContextProp = SNMP_PROPERTIES['community']
defUserProp = SNMP_PROPERTIES['allowed-user']
defSecurityFileProp = SNMP_PROPERTIES['security-agent-file']
defSecurityLevelProp = SNMP_PROPERTIES['security-level']
newContextProp = 'myContext'
newSecurityFileProp = '%s/snmp/agent.security' % remote.data
lowUser = 'myUser1'
defUser = 'myUser2'
highUser = 'myUser3'
otherUser = 'myUser4'
lowSecurityLevelProp = 'noauthnopriv'
highSecurityLevelProp = 'authpriv'
wrongSecurityLevelProp = 'mySecurityLevel'
mySecurityFile = '%s/snmp/manager.security' % remote.data
oid = 'dsServerType.1'
</script>
<!-- List of Test Cases -->
<script>
testsList=[]
testsList.append('snmp_v3_default_001')
testsList.append('snmp_v3_default_002')
testsList.append('snmp_v3_default_003')
testsList.append('snmp_v3_default_004')
testsList.append('snmp_v3_default_005')
testsList.append('snmp_v3_default_006')
testsList.append('snmp_v3_default_007')
testsList.append('snmp_v3_default_008')
testsList.append('snmp_v3_default_009')
testsList.append('snmp_v3_default_010')
testsList.append('snmp_v3_default_011')
testsList.append('snmp_v3_default_012')
testsList.append('snmp_v3_custom_001')
testsList.append('snmp_v3_custom_002')
testsList.append('snmp_v3_custom_003')
testsList.append('snmp_v3_custom_004')
testsList.append('snmp_v3_custom_005')
testsList.append('snmp_v3_custom_006')
testsList.append('snmp_v3_custom_007')
testsList.append('snmp_v3_custom_008')
testsList.append('snmp_v3_custom_009')
</script>
<!-- Execute the Tests -->
<iterate var="__test" in="testsList">
<sequence>
<call function="'%s' % (__test)" />
</sequence>
</iterate>
</sequence>
<catch exception="'STAFException.TestSuite.SetupException'">
<sequence>
<message log="1" level="'fatal'">
'Setup of test suite failed.'
</message>
<rethrow/>
</sequence>
</catch>
<finally>
<message>'Test Cases Completed.'</message>
</finally>
</try>
</sequence>
<finally>
<sequence>
<!-- Test Suite Cleanup -->
<message>'Finally: Global SNMP Cleanup.'</message>
<try>
<message>'No Test Suite Cleanup'</message>
<catch exception="'STAFException'">
<sequence>
<message log="1" level="'fatal'">'Cleanup of test suite failed.'</message>
</sequence>
</catch>
<finally>
<call function="'testSuite_Postamble'"/>
</finally>
</try>
</sequence>
</finally>
</try>
</block>
</sequence>
</function>
</stax>