5767N/A<?xml version="1.0" encoding="UTF-8" standalone="no"?>
5767N/A<!DOCTYPE stax SYSTEM "/shared/stax.dtd">
5767N/A<!--
5767N/A ! CDDL HEADER START
5767N/A !
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 ! with the License.
5767N/A !
5767N/A ! You can obtain a copy of the license at
5767N/A ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
5767N/A ! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
5767N/A ! See the License for the specific language governing permissions
5767N/A ! and limitations under the License.
5767N/A !
5767N/A ! When distributing Covered Code, include this CDDL HEADER in each
5767N/A ! file and include the License file at
5767N/A ! trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
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 !
5767N/A ! CDDL HEADER END
5767N/A !
5767N/A ! Copyright 2008 Sun Microsystems, Inc.
5767N/A ! Portions Copyright 2012 ForgeRock AS
5767N/A ! -->
5767N/A<stax>
5767N/A
5767N/A <!--- Test Case information
5767N/A #@TestMarker SNMP v3 with default configuration
5767N/A #@TestName v3_defaultconf: get with snmpAdmin user
5767N/A and default context
5767N/A #@TestIssue none
5767N/A #@TestPurpose Check that a SNMP Get request with snmpAdmin
5767N/A user and default context fails with
5767N/A authorizationError.
5767N/A #@TestPreamble none
5767N/A #@TestStep SNMP Get request.
5767N/A #@TestPostamble none
5767N/A #@TestResult Success if SNMPGet returns 0.
5767N/A -->
5767N/A <function name="snmp_v3_default_001" scope="local">
5767N/A <testcase name="getTestCaseName('v3 get with snmpAdmin and default context')">
5767N/A <sequence>
5767N/A <try>
5767N/A <sequence>
5767N/A
5767N/A <call function="'testCase_Preamble'"/>
5767N/A
5767N/A <call function="'testStep'">
5767N/A { 'stepMessage' : 'Get with snmpAdmin and default context' }
5767N/A </call>
5767N/A
5767N/A <call function="'SNMPGet'">
5767N/A {
5767N/A 'snmpVersion' : '3',
5767N/A 'snmpHost' : DIRECTORY_INSTANCE_HOST ,
5767N/A 'snmpPort' : SNMP_PORT ,
5767N/A 'snmpUser' : 'snmpAdmin' ,
5767N/A 'snmpCommunity' : context ,
5767N/A 'snmpSecurityLevel' : securityLevel ,
5767N/A 'snmpSecurityFile' : securityFile ,
5767N/A 'snmpOIDs' : oid ,
5767N/A 'snmpStatus' : 'authorizationError'
5767N/A }
5767N/A </call>
5767N/A
5767N/A </sequence>
5767N/A
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 </message>
5767N/A </catch>
5767N/A <finally>
5767N/A <sequence>
5767N/A <call function="'testCase_Postamble'"/>
5767N/A </sequence>
5767N/A </finally>
5767N/A </try>
5767N/A </sequence>
5767N/A </testcase>
5767N/A </function>
5767N/A
5767N/A <!--- Test Case information
5767N/A #@TestMarker SNMP v3 with default configuration
5767N/A #@TestName v3_defaultconf: get with snmpAdmin user
5767N/A and null context
5767N/A #@TestIssue none
5767N/A #@TestPurpose Check that a SNMP Get request with snmpAdmin
5767N/A user and null context succeeds but the OIDs
5767N/A values are not correct.
5767N/A #@TestPreamble none
5767N/A #@TestStep SNMP Get request.
5767N/A #@TestPostamble none
5767N/A #@TestResult Success if SNMPGet returns 0.
5767N/A -->
5767N/A <function name="snmp_v3_default_002" scope="local">
5767N/A <testcase name="getTestCaseName('v3 get with snmpAdmin and null context')">
5767N/A <sequence>
5767N/A <try>
5767N/A <sequence>
5767N/A
5767N/A <call function="'testCase_Preamble'"/>
5767N/A
5767N/A <call function="'testStep'">
5767N/A { 'stepMessage' : 'Get with snmpAdmin and null context' }
5767N/A </call>
5767N/A
5767N/A <call function="'SNMPGet'">
5767N/A {
5767N/A 'snmpVersion' : '3',
5767N/A 'snmpHost' : DIRECTORY_INSTANCE_HOST ,
5767N/A 'snmpPort' : SNMP_PORT ,
5767N/A 'snmpUser' : 'snmpAdmin' ,
5767N/A 'snmpCommunity' : 'null' ,
5767N/A 'snmpSecurityLevel' : securityLevel ,
5767N/A 'snmpSecurityFile' : securityFile ,
5767N/A 'snmpOIDs' : oid ,
5767N/A 'snmpStatus' : 'noError' ,
5767N/A 'snmpValidOIDs' : 'False'
5767N/A }
5767N/A </call>
5767N/A
5767N/A </sequence>
5767N/A
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 </message>
5767N/A </catch>
5767N/A <finally>
5767N/A <sequence>
5767N/A <call function="'testCase_Postamble'"/>
5767N/A </sequence>
5767N/A </finally>
5767N/A </try>
5767N/A </sequence>
5767N/A </testcase>
5767N/A </function>
5767N/A
5767N/A <!--- Test Case information
5767N/A #@TestMarker SNMP v3 with default configuration
5767N/A #@TestName v3_defaultconf: det with snmpAdmin user
5767N/A and OpenDS context
5767N/A #@TestIssue none
5767N/A #@TestPurpose Check that a SNMP Set request with snmpAdmin
5767N/A user and default context fails with
5767N/A authorizationError.
5767N/A #@TestPreamble none
5767N/A #@TestStep SNMP Set request.
5767N/A #@TestPostamble none
5767N/A #@TestResult Success if SNMPSet returns 0.
5767N/A -->
5767N/A <function name="snmp_v3_default_003" scope="local">
5767N/A <testcase name="getTestCaseName('v3 set with snmpAdmin and default context')">
5767N/A <sequence>
5767N/A <try>
5767N/A <sequence>
5767N/A
5767N/A <call function="'testCase_Preamble'"/>
5767N/A
5767N/A <call function="'testStep'">
5767N/A { 'stepMessage' : 'Set with snmpAdmin and default context' }
5767N/A </call>
5767N/A
5767N/A <call function="'SNMPSet'">
5767N/A {
5767N/A 'snmpVersion' : '3',
5767N/A 'snmpHost' : DIRECTORY_INSTANCE_HOST ,
5767N/A 'snmpPort' : SNMP_PORT ,
5767N/A 'snmpUser' : 'snmpAdmin' ,
5767N/A 'snmpCommunity' : context ,
5767N/A 'snmpSecurityLevel' : securityLevel ,
5767N/A 'snmpSecurityFile' : securityFile ,
5767N/A 'snmpOIDs' : oid ,
5767N/A 'snmpStatus' : 'authorizationError'
5767N/A }
5767N/A </call>
5767N/A
5767N/A </sequence>
5767N/A
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 </message>
5767N/A </catch>
5767N/A <finally>
5767N/A <sequence>
5767N/A <call function="'testCase_Postamble'"/>
5767N/A </sequence>
5767N/A </finally>
5767N/A </try>
5767N/A </sequence>
5767N/A </testcase>
5767N/A </function>
5767N/A
5767N/A <!--- Test Case information
5767N/A #@TestMarker SNMP v3 with default configuration
5767N/A #@TestName v3_defaultconf: set with snmpAdmin user
5767N/A and null context
5767N/A #@TestIssue none
5767N/A #@TestPurpose Check that a SNMP Set request with snmpAdmin
5767N/A user and null context fails with noAccess.
5767N/A #@TestPreamble none
5767N/A #@TestStep SNMP Set request.
5767N/A #@TestPostamble none
5767N/A #@TestResult Success if SNMPSet returns 0.
5767N/A -->
5767N/A <function name="snmp_v3_default_004" scope="local">
5767N/A <testcase name="getTestCaseName('v3 set with snmpAdmin and null context')">
5767N/A <sequence>
5767N/A <try>
5767N/A <sequence>
5767N/A
5767N/A <call function="'testCase_Preamble'"/>
5767N/A
5767N/A <call function="'testStep'">
5767N/A { 'stepMessage' : 'Set with snmpAdmin and null context' }
5767N/A </call>
5767N/A
5767N/A <call function="'SNMPSet'">
5767N/A {
5767N/A 'snmpVersion' : '3',
5767N/A 'snmpHost' : DIRECTORY_INSTANCE_HOST ,
5767N/A 'snmpPort' : SNMP_PORT ,
5767N/A 'snmpUser' : 'snmpAdmin' ,
5767N/A 'snmpCommunity' : 'null' ,
5767N/A 'snmpSecurityLevel' : securityLevel ,
5767N/A 'snmpSecurityFile' : securityFile ,
5767N/A 'snmpOIDs' : oid ,
5767N/A 'snmpStatus' : 'noAccess'
5767N/A }
5767N/A </call>
5767N/A
5767N/A </sequence>
5767N/A
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 </message>
5767N/A </catch>
5767N/A <finally>
5767N/A <sequence>
5767N/A <call function="'testCase_Postamble'"/>
5767N/A </sequence>
5767N/A </finally>
5767N/A </try>
5767N/A </sequence>
5767N/A </testcase>
5767N/A </function>
5767N/A
5767N/A <!--- Test Case information
5767N/A #@TestMarker SNMP v3 with default configuration
5767N/A #@TestName v3_defaultconf: get with defaultUser user
5767N/A and default context
5767N/A #@TestIssue none
5767N/A #@TestPurpose Check that a SNMP Get request with defaultUser
5767N/A user and default context fails with
5767N/A authorizationError.
5767N/A #@TestPreamble none
5767N/A #@TestStep SNMP Get request.
5767N/A #@TestPostamble none
5767N/A #@TestResult Success if SNMPGet returns 0.
5767N/A -->
5767N/A <function name="snmp_v3_default_005" scope="local">
5767N/A <testcase name="getTestCaseName('v3 get with defaultUser and default context')">
5767N/A <sequence>
5767N/A <try>
5767N/A <sequence>
5767N/A
5767N/A <call function="'testCase_Preamble'"/>
5767N/A
5767N/A <call function="'testStep'">
5767N/A { 'stepMessage' : 'Get with defaultUser and default context' }
5767N/A </call>
5767N/A
5767N/A <call function="'SNMPGet'">
5767N/A {
5767N/A 'snmpVersion' : '3',
5767N/A 'snmpHost' : DIRECTORY_INSTANCE_HOST ,
5767N/A 'snmpPort' : SNMP_PORT ,
5767N/A 'snmpUser' : 'defaultUser' ,
5767N/A 'snmpCommunity' : context ,
5767N/A 'snmpSecurityLevel' : securityLevel ,
5767N/A 'snmpSecurityFile' : securityFile ,
5767N/A 'snmpOIDs' : oid ,
5767N/A 'snmpStatus' : 'authorizationError'
5767N/A }
5767N/A </call>
5767N/A
5767N/A </sequence>
5767N/A
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 </message>
5767N/A </catch>
5767N/A <finally>
5767N/A <sequence>
5767N/A <call function="'testCase_Postamble'"/>
5767N/A </sequence>
5767N/A </finally>
5767N/A </try>
5767N/A </sequence>
5767N/A </testcase>
5767N/A </function>
5767N/A
5767N/A <!--- Test Case information
5767N/A #@TestMarker SNMP v3 with default configuration
5767N/A #@TestName v3_defaultconf: get with defaultUser user
5767N/A and null context
5767N/A #@TestIssue none
5767N/A #@TestPurpose Check that a SNMP Get request with defaultUser
5767N/A user and null context succeeds but the OIDs
5767N/A values are not correct.
5767N/A #@TestPreamble none
5767N/A #@TestStep SNMP Get request.
5767N/A #@TestPostamble none
5767N/A #@TestResult Success if SNMPGet returns 0.
5767N/A -->
5767N/A <function name="snmp_v3_default_006" scope="local">
5767N/A <testcase name="getTestCaseName('v3 get with defaultUser and null context')">
5767N/A <sequence>
5767N/A <try>
5767N/A <sequence>
5767N/A
5767N/A <call function="'testCase_Preamble'"/>
5767N/A
5767N/A <call function="'testStep'">
5767N/A { 'stepMessage' : 'Get with defaultUser and null context' }
5767N/A </call>
5767N/A
5767N/A <call function="'SNMPGet'">
5767N/A {
5767N/A 'snmpVersion' : '3',
5767N/A 'snmpHost' : DIRECTORY_INSTANCE_HOST ,
5767N/A 'snmpPort' : SNMP_PORT ,
5767N/A 'snmpUser' : 'defaultUser' ,
5767N/A 'snmpCommunity' : 'null' ,
5767N/A 'snmpSecurityLevel' : securityLevel ,
5767N/A 'snmpSecurityFile' : securityFile ,
5767N/A 'snmpOIDs' : oid ,
5767N/A 'snmpStatus' : 'noError' ,
5767N/A 'snmpValidOIDs' : 'False'
5767N/A }
5767N/A </call>
5767N/A
5767N/A </sequence>
5767N/A
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 </message>
5767N/A </catch>
5767N/A <finally>
5767N/A <sequence>
5767N/A <call function="'testCase_Postamble'"/>
5767N/A </sequence>
5767N/A </finally>
5767N/A </try>
5767N/A </sequence>
5767N/A </testcase>
5767N/A </function>
5767N/A
5767N/A <!--- Test Case information
5767N/A #@TestMarker SNMP v3 with default configuration
5767N/A #@TestName v3_defaultconf: set with defaultUser user
5767N/A and default context
5767N/A #@TestIssue none
5767N/A #@TestPurpose Check that a SNMP Set request with defaultUser
5767N/A user and default context fails with
5767N/A authorizationError.
5767N/A #@TestPreamble none
5767N/A #@TestStep SNMP Set request.
5767N/A #@TestPostamble none
5767N/A #@TestResult Success if SNMPSet returns 0.
5767N/A -->
5767N/A <function name="snmp_v3_default_007" scope="local">
5767N/A <testcase name="getTestCaseName('v3 set with defaultUser and default context')">
5767N/A <sequence>
5767N/A <try>
5767N/A <sequence>
5767N/A
5767N/A <call function="'testCase_Preamble'"/>
5767N/A
5767N/A <call function="'testStep'">
5767N/A { 'stepMessage' : 'Set with defaultUser and default context' }
5767N/A </call>
5767N/A
5767N/A <call function="'SNMPSet'">
5767N/A {
5767N/A 'snmpVersion' : '3',
5767N/A 'snmpHost' : DIRECTORY_INSTANCE_HOST ,
5767N/A 'snmpPort' : SNMP_PORT ,
5767N/A 'snmpUser' : 'defaultUser' ,
5767N/A 'snmpCommunity' : context ,
5767N/A 'snmpSecurityLevel' : securityLevel ,
5767N/A 'snmpSecurityFile' : securityFile ,
5767N/A 'snmpOIDs' : oid ,
5767N/A 'snmpStatus' : 'authorizationError'
5767N/A }
5767N/A </call>
5767N/A
5767N/A </sequence>
5767N/A
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 </message>
5767N/A </catch>
5767N/A <finally>
5767N/A <sequence>
5767N/A <call function="'testCase_Postamble'"/>
5767N/A </sequence>
5767N/A </finally>
5767N/A </try>
5767N/A </sequence>
5767N/A </testcase>
5767N/A </function>
5767N/A
5767N/A <!--- Test Case information
5767N/A #@TestMarker SNMP v3 with default configuration
5767N/A #@TestName v3_defaultconf: set with defaultUser user
5767N/A and null context
5767N/A #@TestIssue none
5767N/A #@TestPurpose Check that a SNMP Set request with defaultUser
5767N/A user and null context fails with noAccess.
5767N/A #@TestPreamble none
5767N/A #@TestStep SNMP Set request.
5767N/A #@TestPostamble none
5767N/A #@TestResult Success if SNMPSet returns 0.
5767N/A -->
5767N/A <function name="snmp_v3_default_008" scope="local">
5767N/A <testcase name="getTestCaseName('v3 set with defaultUser and null context')">
5767N/A <sequence>
5767N/A <try>
5767N/A <sequence>
5767N/A
5767N/A <call function="'testCase_Preamble'"/>
5767N/A
5767N/A <call function="'testStep'">
5767N/A { 'stepMessage' : 'Set with defaultUser and null context' }
5767N/A </call>
5767N/A
5767N/A <call function="'SNMPSet'">
5767N/A {
5767N/A 'snmpVersion' : '3',
5767N/A 'snmpHost' : DIRECTORY_INSTANCE_HOST ,
5767N/A 'snmpPort' : SNMP_PORT ,
5767N/A 'snmpUser' : 'defaultUser' ,
5767N/A 'snmpCommunity' : 'null' ,
5767N/A 'snmpSecurityLevel' : securityLevel ,
5767N/A 'snmpSecurityFile' : securityFile ,
5767N/A 'snmpOIDs' : oid ,
5767N/A 'snmpStatus' : 'noAccess'
5767N/A }
5767N/A </call>
5767N/A
5767N/A </sequence>
5767N/A
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 </message>
5767N/A </catch>
5767N/A <finally>
5767N/A <sequence>
5767N/A <call function="'testCase_Postamble'"/>
5767N/A </sequence>
5767N/A </finally>
5767N/A </try>
5767N/A </sequence>
5767N/A </testcase>
5767N/A </function>
5767N/A
5767N/A <!--- Test Case information
5767N/A #@TestMarker SNMP v3 with default configuration
5767N/A #@TestName v3_defaultconf: get with unknown user
5767N/A and default context
5767N/A #@TestIssue none
5767N/A #@TestPurpose Check that a SNMP Get request with unknown
5767N/A user and default context fails with
5767N/A SnmpStatusException.
5767N/A #@TestPreamble none
5767N/A #@TestStep SNMP Get request.
5767N/A #@TestPostamble none
5767N/A #@TestResult Success if SNMPGet returns 0.
5767N/A -->
5767N/A <function name="snmp_v3_default_009" scope="local">
5767N/A <testcase name="getTestCaseName('v3 get with unknown user and default context')">
5767N/A <sequence>
5767N/A <try>
5767N/A <sequence>
5767N/A
5767N/A <call function="'testCase_Preamble'"/>
5767N/A
5767N/A <call function="'testStep'">
5767N/A { 'stepMessage' : 'Get with unknown user and default context' }
5767N/A </call>
5767N/A
5767N/A <call function="'SNMPGet'">
5767N/A {
5767N/A 'snmpVersion' : '3',
5767N/A 'snmpHost' : DIRECTORY_INSTANCE_HOST ,
5767N/A 'snmpPort' : SNMP_PORT ,
5767N/A 'snmpUser' : 'myUser' ,
5767N/A 'snmpCommunity' : context ,
5767N/A 'snmpSecurityLevel' : securityLevel ,
5767N/A 'snmpSecurityFile' : securityFile ,
5767N/A 'snmpOIDs' : oid ,
5767N/A 'snmpStatus' : 'SnmpStatusException'
5767N/A }
5767N/A </call>
5767N/A
5767N/A </sequence>
5767N/A
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 </message>
5767N/A </catch>
5767N/A <finally>
5767N/A <sequence>
5767N/A <call function="'testCase_Postamble'"/>
5767N/A </sequence>
5767N/A </finally>
5767N/A </try>
5767N/A </sequence>
5767N/A </testcase>
5767N/A </function>
5767N/A
5767N/A <!--- Test Case information
5767N/A #@TestMarker SNMP v3 with default configuration
5767N/A #@TestName v3_defaultconf: get with unknown user
5767N/A and null context
5767N/A #@TestIssue none
5767N/A #@TestPurpose Check that a SNMP Get request with unknown
5767N/A user and null context fails with
5767N/A SnmpStatusException.
5767N/A #@TestPreamble none
5767N/A #@TestStep SNMP Get request.
5767N/A #@TestPostamble none
5767N/A #@TestResult Success if SNMPGet returns 0.
5767N/A -->
5767N/A <function name="snmp_v3_default_010" scope="local">
5767N/A <testcase name="getTestCaseName('v3 get with unknown user and default context')">
5767N/A <sequence>
5767N/A <try>
5767N/A <sequence>
5767N/A
5767N/A <call function="'testCase_Preamble'"/>
5767N/A
5767N/A <call function="'testStep'">
5767N/A { 'stepMessage' : 'Get with unknown user and default context' }
5767N/A </call>
5767N/A
5767N/A <call function="'SNMPGet'">
5767N/A {
5767N/A 'snmpVersion' : '3',
5767N/A 'snmpHost' : DIRECTORY_INSTANCE_HOST ,
5767N/A 'snmpPort' : SNMP_PORT ,
5767N/A 'snmpUser' : 'myUser' ,
5767N/A 'snmpCommunity' : 'null' ,
5767N/A 'snmpSecurityLevel' : securityLevel ,
5767N/A 'snmpSecurityFile' : securityFile ,
5767N/A 'snmpOIDs' : oid ,
5767N/A 'snmpStatus' : 'SnmpStatusException'
5767N/A }
5767N/A </call>
5767N/A
5767N/A </sequence>
5767N/A
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 </message>
5767N/A </catch>
5767N/A <finally>
5767N/A <sequence>
5767N/A <call function="'testCase_Postamble'"/>
5767N/A </sequence>
5767N/A </finally>
5767N/A </try>
5767N/A </sequence>
5767N/A </testcase>
5767N/A </function>
5767N/A
5767N/A <!--- Test Case information
5767N/A #@TestMarker SNMP v3 with default configuration
5767N/A #@TestName v3_defaultconf: set with unknown user
5767N/A and default context
5767N/A #@TestIssue none
5767N/A #@TestPurpose Check that a SNMP Set request with unknown
5767N/A user and default context fails with
5767N/A SnmpStatusException.
5767N/A #@TestPreamble none
5767N/A #@TestStep SNMP Set request.
5767N/A #@TestPostamble none
5767N/A #@TestResult Success if SNMPSet returns 0.
5767N/A -->
5767N/A <function name="snmp_v3_default_011" scope="local">
5767N/A <testcase name="getTestCaseName('v3 set with unknown user and default context')">
5767N/A <sequence>
5767N/A <try>
5767N/A <sequence>
5767N/A
5767N/A <call function="'testCase_Preamble'"/>
5767N/A
5767N/A <call function="'testStep'">
5767N/A { 'stepMessage' : 'Set with unknown user and OpenDS context' }
5767N/A </call>
5767N/A
5767N/A <call function="'SNMPSet'">
5767N/A {
5767N/A 'snmpVersion' : '3',
5767N/A 'snmpHost' : DIRECTORY_INSTANCE_HOST ,
5767N/A 'snmpPort' : SNMP_PORT ,
5767N/A 'snmpUser' : 'myUser' ,
5767N/A 'snmpCommunity' : context ,
5767N/A 'snmpSecurityLevel' : securityLevel ,
5767N/A 'snmpSecurityFile' : securityFile ,
5767N/A 'snmpOIDs' : oid ,
5767N/A 'snmpStatus' : 'SnmpStatusException'
5767N/A }
5767N/A </call>
5767N/A
5767N/A </sequence>
5767N/A
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 </message>
5767N/A </catch>
5767N/A <finally>
5767N/A <sequence>
5767N/A <call function="'testCase_Postamble'"/>
5767N/A </sequence>
5767N/A </finally>
5767N/A </try>
5767N/A </sequence>
5767N/A </testcase>
5767N/A </function>
5767N/A
5767N/A <!--- Test Case information
5767N/A #@TestMarker SNMP v3 with default configuration
5767N/A #@TestName v3_defaultconf: set with unknown user
5767N/A and null context
5767N/A #@TestIssue none
5767N/A #@TestPurpose Check that a SNMP Set request with unknown
5767N/A user and default context fails with
5767N/A SnmpStatusException.
5767N/A #@TestPreamble none
5767N/A #@TestStep SNMP Set request.
5767N/A #@TestPostamble none
5767N/A #@TestResult Success if SNMPSet returns 0.
5767N/A -->
5767N/A <function name="snmp_v3_default_012" scope="local">
5767N/A <testcase name="getTestCaseName('v3 set with unknown user and null context')">
5767N/A <sequence>
5767N/A <try>
5767N/A <sequence>
5767N/A
5767N/A <call function="'testCase_Preamble'"/>
5767N/A
5767N/A <call function="'testStep'">
5767N/A { 'stepMessage' : 'Set with unknown user and null context' }
5767N/A </call>
5767N/A
5767N/A <call function="'SNMPSet'">
5767N/A {
5767N/A 'snmpVersion' : '3',
5767N/A 'snmpHost' : DIRECTORY_INSTANCE_HOST ,
5767N/A 'snmpPort' : SNMP_PORT ,
5767N/A 'snmpUser' : 'myUser' ,
5767N/A 'snmpCommunity' : 'null' ,
5767N/A 'snmpSecurityLevel' : securityLevel ,
5767N/A 'snmpSecurityFile' : securityFile ,
5767N/A 'snmpOIDs' : oid ,
5767N/A 'snmpStatus' : 'SnmpStatusException'
5767N/A }
5767N/A </call>
5767N/A
5767N/A </sequence>
5767N/A
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 </message>
5767N/A </catch>
5767N/A <finally>
5767N/A <sequence>
5767N/A <call function="'testCase_Postamble'"/>
5767N/A </sequence>
5767N/A </finally>
5767N/A </try>
5767N/A </sequence>
5767N/A </testcase>
5767N/A </function>
5767N/A
5767N/A</stax>