<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
! 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 legal-notices/CDDLv1_0.txt
! 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 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 2008 Sun Microsystems, Inc.
! Portions Copyright 2012 ForgeRock AS
! -->
<stax>
<!--- Test Case information
#@TestMarker SNMP v3 with default configuration
#@TestName v3_defaultconf: get with snmpAdmin user
and default context
#@TestIssue none
#@TestPurpose Check that a SNMP Get request with snmpAdmin
user and default context fails with
authorizationError.
#@TestPreamble none
#@TestStep SNMP Get request.
#@TestPostamble none
#@TestResult Success if SNMPGet returns 0.
-->
<function name="snmp_v3_default_001" scope="local">
<testcase name="getTestCaseName('v3 get with snmpAdmin and default context')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<call function="'testStep'">
{ 'stepMessage' : 'Get with snmpAdmin and default context' }
</call>
<call function="'SNMPGet'">
{
'snmpVersion' : '3',
'snmpHost' : DIRECTORY_INSTANCE_HOST ,
'snmpPort' : SNMP_PORT ,
'snmpUser' : 'snmpAdmin' ,
'snmpCommunity' : context ,
'snmpSecurityLevel' : securityLevel ,
'snmpSecurityFile' : securityFile ,
'snmpOIDs' : oid ,
'snmpStatus' : 'authorizationError'
}
</call>
</sequence>
<catch exception="'STAXException'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<sequence>
<call function="'testCase_Postamble'"/>
</sequence>
</finally>
</try>
</sequence>
</testcase>
</function>
<!--- Test Case information
#@TestMarker SNMP v3 with default configuration
#@TestName v3_defaultconf: get with snmpAdmin user
and null context
#@TestIssue none
#@TestPurpose Check that a SNMP Get request with snmpAdmin
user and null context succeeds but the OIDs
values are not correct.
#@TestPreamble none
#@TestStep SNMP Get request.
#@TestPostamble none
#@TestResult Success if SNMPGet returns 0.
-->
<function name="snmp_v3_default_002" scope="local">
<testcase name="getTestCaseName('v3 get with snmpAdmin and null context')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<call function="'testStep'">
{ 'stepMessage' : 'Get with snmpAdmin and null context' }
</call>
<call function="'SNMPGet'">
{
'snmpVersion' : '3',
'snmpHost' : DIRECTORY_INSTANCE_HOST ,
'snmpPort' : SNMP_PORT ,
'snmpUser' : 'snmpAdmin' ,
'snmpCommunity' : 'null' ,
'snmpSecurityLevel' : securityLevel ,
'snmpSecurityFile' : securityFile ,
'snmpOIDs' : oid ,
'snmpStatus' : 'noError' ,
'snmpValidOIDs' : 'False'
}
</call>
</sequence>
<catch exception="'STAXException'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<sequence>
<call function="'testCase_Postamble'"/>
</sequence>
</finally>
</try>
</sequence>
</testcase>
</function>
<!--- Test Case information
#@TestMarker SNMP v3 with default configuration
#@TestName v3_defaultconf: det with snmpAdmin user
and OpenDS context
#@TestIssue none
#@TestPurpose Check that a SNMP Set request with snmpAdmin
user and default context fails with
authorizationError.
#@TestPreamble none
#@TestStep SNMP Set request.
#@TestPostamble none
#@TestResult Success if SNMPSet returns 0.
-->
<function name="snmp_v3_default_003" scope="local">
<testcase name="getTestCaseName('v3 set with snmpAdmin and default context')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<call function="'testStep'">
{ 'stepMessage' : 'Set with snmpAdmin and default context' }
</call>
<call function="'SNMPSet'">
{
'snmpVersion' : '3',
'snmpHost' : DIRECTORY_INSTANCE_HOST ,
'snmpPort' : SNMP_PORT ,
'snmpUser' : 'snmpAdmin' ,
'snmpCommunity' : context ,
'snmpSecurityLevel' : securityLevel ,
'snmpSecurityFile' : securityFile ,
'snmpOIDs' : oid ,
'snmpStatus' : 'authorizationError'
}
</call>
</sequence>
<catch exception="'STAXException'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<sequence>
<call function="'testCase_Postamble'"/>
</sequence>
</finally>
</try>
</sequence>
</testcase>
</function>
<!--- Test Case information
#@TestMarker SNMP v3 with default configuration
#@TestName v3_defaultconf: set with snmpAdmin user
and null context
#@TestIssue none
#@TestPurpose Check that a SNMP Set request with snmpAdmin
user and null context fails with noAccess.
#@TestPreamble none
#@TestStep SNMP Set request.
#@TestPostamble none
#@TestResult Success if SNMPSet returns 0.
-->
<function name="snmp_v3_default_004" scope="local">
<testcase name="getTestCaseName('v3 set with snmpAdmin and null context')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<call function="'testStep'">
{ 'stepMessage' : 'Set with snmpAdmin and null context' }
</call>
<call function="'SNMPSet'">
{
'snmpVersion' : '3',
'snmpHost' : DIRECTORY_INSTANCE_HOST ,
'snmpPort' : SNMP_PORT ,
'snmpUser' : 'snmpAdmin' ,
'snmpCommunity' : 'null' ,
'snmpSecurityLevel' : securityLevel ,
'snmpSecurityFile' : securityFile ,
'snmpOIDs' : oid ,
'snmpStatus' : 'noAccess'
}
</call>
</sequence>
<catch exception="'STAXException'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<sequence>
<call function="'testCase_Postamble'"/>
</sequence>
</finally>
</try>
</sequence>
</testcase>
</function>
<!--- Test Case information
#@TestMarker SNMP v3 with default configuration
#@TestName v3_defaultconf: get with defaultUser user
and default context
#@TestIssue none
#@TestPurpose Check that a SNMP Get request with defaultUser
user and default context fails with
authorizationError.
#@TestPreamble none
#@TestStep SNMP Get request.
#@TestPostamble none
#@TestResult Success if SNMPGet returns 0.
-->
<function name="snmp_v3_default_005" scope="local">
<testcase name="getTestCaseName('v3 get with defaultUser and default context')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<call function="'testStep'">
{ 'stepMessage' : 'Get with defaultUser and default context' }
</call>
<call function="'SNMPGet'">
{
'snmpVersion' : '3',
'snmpHost' : DIRECTORY_INSTANCE_HOST ,
'snmpPort' : SNMP_PORT ,
'snmpUser' : 'defaultUser' ,
'snmpCommunity' : context ,
'snmpSecurityLevel' : securityLevel ,
'snmpSecurityFile' : securityFile ,
'snmpOIDs' : oid ,
'snmpStatus' : 'authorizationError'
}
</call>
</sequence>
<catch exception="'STAXException'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<sequence>
<call function="'testCase_Postamble'"/>
</sequence>
</finally>
</try>
</sequence>
</testcase>
</function>
<!--- Test Case information
#@TestMarker SNMP v3 with default configuration
#@TestName v3_defaultconf: get with defaultUser user
and null context
#@TestIssue none
#@TestPurpose Check that a SNMP Get request with defaultUser
user and null context succeeds but the OIDs
values are not correct.
#@TestPreamble none
#@TestStep SNMP Get request.
#@TestPostamble none
#@TestResult Success if SNMPGet returns 0.
-->
<function name="snmp_v3_default_006" scope="local">
<testcase name="getTestCaseName('v3 get with defaultUser and null context')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<call function="'testStep'">
{ 'stepMessage' : 'Get with defaultUser and null context' }
</call>
<call function="'SNMPGet'">
{
'snmpVersion' : '3',
'snmpHost' : DIRECTORY_INSTANCE_HOST ,
'snmpPort' : SNMP_PORT ,
'snmpUser' : 'defaultUser' ,
'snmpCommunity' : 'null' ,
'snmpSecurityLevel' : securityLevel ,
'snmpSecurityFile' : securityFile ,
'snmpOIDs' : oid ,
'snmpStatus' : 'noError' ,
'snmpValidOIDs' : 'False'
}
</call>
</sequence>
<catch exception="'STAXException'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<sequence>
<call function="'testCase_Postamble'"/>
</sequence>
</finally>
</try>
</sequence>
</testcase>
</function>
<!--- Test Case information
#@TestMarker SNMP v3 with default configuration
#@TestName v3_defaultconf: set with defaultUser user
and default context
#@TestIssue none
#@TestPurpose Check that a SNMP Set request with defaultUser
user and default context fails with
authorizationError.
#@TestPreamble none
#@TestStep SNMP Set request.
#@TestPostamble none
#@TestResult Success if SNMPSet returns 0.
-->
<function name="snmp_v3_default_007" scope="local">
<testcase name="getTestCaseName('v3 set with defaultUser and default context')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<call function="'testStep'">
{ 'stepMessage' : 'Set with defaultUser and default context' }
</call>
<call function="'SNMPSet'">
{
'snmpVersion' : '3',
'snmpHost' : DIRECTORY_INSTANCE_HOST ,
'snmpPort' : SNMP_PORT ,
'snmpUser' : 'defaultUser' ,
'snmpCommunity' : context ,
'snmpSecurityLevel' : securityLevel ,
'snmpSecurityFile' : securityFile ,
'snmpOIDs' : oid ,
'snmpStatus' : 'authorizationError'
}
</call>
</sequence>
<catch exception="'STAXException'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<sequence>
<call function="'testCase_Postamble'"/>
</sequence>
</finally>
</try>
</sequence>
</testcase>
</function>
<!--- Test Case information
#@TestMarker SNMP v3 with default configuration
#@TestName v3_defaultconf: set with defaultUser user
and null context
#@TestIssue none
#@TestPurpose Check that a SNMP Set request with defaultUser
user and null context fails with noAccess.
#@TestPreamble none
#@TestStep SNMP Set request.
#@TestPostamble none
#@TestResult Success if SNMPSet returns 0.
-->
<function name="snmp_v3_default_008" scope="local">
<testcase name="getTestCaseName('v3 set with defaultUser and null context')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<call function="'testStep'">
{ 'stepMessage' : 'Set with defaultUser and null context' }
</call>
<call function="'SNMPSet'">
{
'snmpVersion' : '3',
'snmpHost' : DIRECTORY_INSTANCE_HOST ,
'snmpPort' : SNMP_PORT ,
'snmpUser' : 'defaultUser' ,
'snmpCommunity' : 'null' ,
'snmpSecurityLevel' : securityLevel ,
'snmpSecurityFile' : securityFile ,
'snmpOIDs' : oid ,
'snmpStatus' : 'noAccess'
}
</call>
</sequence>
<catch exception="'STAXException'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<sequence>
<call function="'testCase_Postamble'"/>
</sequence>
</finally>
</try>
</sequence>
</testcase>
</function>
<!--- Test Case information
#@TestMarker SNMP v3 with default configuration
#@TestName v3_defaultconf: get with unknown user
and default context
#@TestIssue none
#@TestPurpose Check that a SNMP Get request with unknown
user and default context fails with
SnmpStatusException.
#@TestPreamble none
#@TestStep SNMP Get request.
#@TestPostamble none
#@TestResult Success if SNMPGet returns 0.
-->
<function name="snmp_v3_default_009" scope="local">
<testcase name="getTestCaseName('v3 get with unknown user and default context')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<call function="'testStep'">
{ 'stepMessage' : 'Get with unknown user and default context' }
</call>
<call function="'SNMPGet'">
{
'snmpVersion' : '3',
'snmpHost' : DIRECTORY_INSTANCE_HOST ,
'snmpPort' : SNMP_PORT ,
'snmpUser' : 'myUser' ,
'snmpCommunity' : context ,
'snmpSecurityLevel' : securityLevel ,
'snmpSecurityFile' : securityFile ,
'snmpOIDs' : oid ,
'snmpStatus' : 'SnmpStatusException'
}
</call>
</sequence>
<catch exception="'STAXException'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<sequence>
<call function="'testCase_Postamble'"/>
</sequence>
</finally>
</try>
</sequence>
</testcase>
</function>
<!--- Test Case information
#@TestMarker SNMP v3 with default configuration
#@TestName v3_defaultconf: get with unknown user
and null context
#@TestIssue none
#@TestPurpose Check that a SNMP Get request with unknown
user and null context fails with
SnmpStatusException.
#@TestPreamble none
#@TestStep SNMP Get request.
#@TestPostamble none
#@TestResult Success if SNMPGet returns 0.
-->
<function name="snmp_v3_default_010" scope="local">
<testcase name="getTestCaseName('v3 get with unknown user and default context')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<call function="'testStep'">
{ 'stepMessage' : 'Get with unknown user and default context' }
</call>
<call function="'SNMPGet'">
{
'snmpVersion' : '3',
'snmpHost' : DIRECTORY_INSTANCE_HOST ,
'snmpPort' : SNMP_PORT ,
'snmpUser' : 'myUser' ,
'snmpCommunity' : 'null' ,
'snmpSecurityLevel' : securityLevel ,
'snmpSecurityFile' : securityFile ,
'snmpOIDs' : oid ,
'snmpStatus' : 'SnmpStatusException'
}
</call>
</sequence>
<catch exception="'STAXException'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<sequence>
<call function="'testCase_Postamble'"/>
</sequence>
</finally>
</try>
</sequence>
</testcase>
</function>
<!--- Test Case information
#@TestMarker SNMP v3 with default configuration
#@TestName v3_defaultconf: set with unknown user
and default context
#@TestIssue none
#@TestPurpose Check that a SNMP Set request with unknown
user and default context fails with
SnmpStatusException.
#@TestPreamble none
#@TestStep SNMP Set request.
#@TestPostamble none
#@TestResult Success if SNMPSet returns 0.
-->
<function name="snmp_v3_default_011" scope="local">
<testcase name="getTestCaseName('v3 set with unknown user and default context')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<call function="'testStep'">
{ 'stepMessage' : 'Set with unknown user and OpenDS context' }
</call>
<call function="'SNMPSet'">
{
'snmpVersion' : '3',
'snmpHost' : DIRECTORY_INSTANCE_HOST ,
'snmpPort' : SNMP_PORT ,
'snmpUser' : 'myUser' ,
'snmpCommunity' : context ,
'snmpSecurityLevel' : securityLevel ,
'snmpSecurityFile' : securityFile ,
'snmpOIDs' : oid ,
'snmpStatus' : 'SnmpStatusException'
}
</call>
</sequence>
<catch exception="'STAXException'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<sequence>
<call function="'testCase_Postamble'"/>
</sequence>
</finally>
</try>
</sequence>
</testcase>
</function>
<!--- Test Case information
#@TestMarker SNMP v3 with default configuration
#@TestName v3_defaultconf: set with unknown user
and null context
#@TestIssue none
#@TestPurpose Check that a SNMP Set request with unknown
user and default context fails with
SnmpStatusException.
#@TestPreamble none
#@TestStep SNMP Set request.
#@TestPostamble none
#@TestResult Success if SNMPSet returns 0.
-->
<function name="snmp_v3_default_012" scope="local">
<testcase name="getTestCaseName('v3 set with unknown user and null context')">
<sequence>
<try>
<sequence>
<call function="'testCase_Preamble'"/>
<call function="'testStep'">
{ 'stepMessage' : 'Set with unknown user and null context' }
</call>
<call function="'SNMPSet'">
{
'snmpVersion' : '3',
'snmpHost' : DIRECTORY_INSTANCE_HOST ,
'snmpPort' : SNMP_PORT ,
'snmpUser' : 'myUser' ,
'snmpCommunity' : 'null' ,
'snmpSecurityLevel' : securityLevel ,
'snmpSecurityFile' : securityFile ,
'snmpOIDs' : oid ,
'snmpStatus' : 'SnmpStatusException'
}
</call>
</sequence>
<catch exception="'STAXException'" typevar="eType" var="eInfo">
<message log="1" level="'fatal'">
'%s: Test failed. eInfo(%s)' % (eType,eInfo)
</message>
</catch>
<finally>
<sequence>
<call function="'testCase_Postamble'"/>
</sequence>
</finally>
</try>
</sequence>
</testcase>
</function>
</stax>