0N/A<?xml version="1.0" encoding="UTF-8" standalone="no"?>
157N/A<!DOCTYPE stax SYSTEM "/shared/stax.dtd">
0N/A<!--
0N/A ! CDDL HEADER START
0N/A !
0N/A ! The contents of this file are subject to the terms of the
157N/A ! Common Development and Distribution License, Version 1.0 only
0N/A ! (the "License"). You may not use this file except in compliance
157N/A ! with the License.
0N/A !
0N/A ! You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
0N/A ! or http://forgerock.org/license/CDDLv1.0.html.
0N/A ! See the License for the specific language governing permissions
0N/A ! and limitations under the License.
0N/A !
0N/A ! When distributing Covered Code, include this CDDL HEADER in each
0N/A ! file and include the License file at legal-notices/CDDLv1_0.txt.
0N/A ! If applicable, add the following below this CDDL HEADER, with the
0N/A ! fields enclosed by brackets "[]" replaced with your own identifying
0N/A ! information:
157N/A ! Portions Copyright [yyyy] [name of copyright owner]
157N/A !
157N/A ! CDDL HEADER END
0N/A !
0N/A ! Copyright 2012-2013 ForgeRock AS.
0N/A ! -->
0N/A<stax>
0N/A <defaultcall function="main_snmp_v3"/>
0N/A <function name="main_snmp_v3" scope="local">
0N/A <sequence>
0N/A <block name="'main_snmp_v3'">
0N/A <try>
0N/A <sequence>
0N/A <script>
0N/A CurrentTestPath['group']='snmp'
0N/A CurrentTestPath['suite']='v3'
0N/A
0N/A __group=CurrentTestPath['group']
0N/A __groupdir='%s/testcases/%s' % (TESTS_DIR,__group)
0N/A </script>
0N/A
0N/A <!--- Test Suite information
0N/A #@TestSuiteName SNMP v3 operations
0N/A #@TestSuitePurpose Check SNMP v3 operations
0N/A #@TestSuiteGroup SNMP v3 with default configuration
0N/A #@TestScript snmp_v3.xml
0N/A #@TestHTMLLink http://www.forgerock.org/
0N/A -->
0N/A <call function="'testSuite_Preamble'"/>
0N/A
0N/A <try>
0N/A <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/manager.security' % remote.temp
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/agent.security' % remote.temp
lowUser = 'myUser1'
defUser = 'myUser2'
highUser = 'myUser3'
otherUser = 'myUser4'
lowSecurityLevelProp = 'noauthnopriv'
highSecurityLevelProp = 'authpriv'
wrongSecurityLevelProp = 'mySecurityLevel'
mySecurityFile = '%s/manager.security' % remote.temp
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>