snmp_v3_customconf.xml revision d25372dc8e65a9ed019a88fdf659ca61313f1b31
<?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/OpenDS.LICENSE
! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
! 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/OpenDS.LICENSE. 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.
! -->
<stax>
<defaultcall function="snmp_v3_customconf"/>
<function name="snmp_v3_customconf">
<sequence>
<block name="'snmp_v3_customconf'">
<sequence>
<!--- Test Suite information
#@TestSuiteName SNMP v3 with custom configuration
#@TestSuitePurpose Check SNMP v3 with custom configuration.
#@TestSuiteGroup SNMP v3 with custom configuration
#@TestScript snmp_v3_customconf.xml
-->
<script>
if not CurrentTestPath.has_key('group'):
CurrentTestPath['group'] = 'snmp'
CurrentTestPath['suite'] = STAXCurrentBlock
</script>
<call function="'testSuite_Preamble'"/>
<!--- Define default values -->
<script>
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>
<!--- Test Case information
#@TestMarker SNMP v3 with custom configuration
#@TestName v3_customconf: TODO
#@TestIssue none
#@TestPurpose TODO.
#@TestPreamble none
#@TestStep TODO.
#@TestPostamble none
#@TestResult TODO.
-->
<testcase name="getTestCaseName
('v3_customconf: change the security-agent-file property')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'v3_customconf: change the security-agent-file property'
</message>
<call function="'dsconfig'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'subcommand' : 'set-connection-handler-prop' ,
'objectType' : 'handler-name' ,
'objectName' : 'SNMP Connection Handler' ,
'optionsString' : '--set security-agent-file:%s' \
% newSecurityFileProp
}
</call>
<message>
'v3_customconf: restart the SNMP Connection Handler'
</message>
<call function="'restartSNMPConnectionHandler'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker SNMP v3 with custom configuration
#@TestName v3_customconf: TODO
#@TestIssue none
#@TestPurpose TODO.
#@TestPreamble none
#@TestStep TODO.
#@TestPostamble none
#@TestResult TODO.
-->
<testcase name="getTestCaseName
('v3_customconf: check the current security level (def)')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'v3_customconf: get with the lowUser and low security level'
</message>
<call function="'SNMPGet'">
{
'snmpVersion' : '3',
'snmpHost' : DIRECTORY_INSTANCE_HOST ,
'snmpPort' : SNMP_PORT ,
'snmpUser' : lowUser ,
'snmpCommunity' : defContextProp ,
'snmpSecurityLevel' : lowSecurityLevelProp ,
'snmpSecurityFile' : mySecurityFile ,
'snmpOIDs' : oid ,
'snmpStatus' : 'authorizationError'
}
</call>
<message>
'v3_customconf: get with the defUser and def security level'
</message>
<call function="'SNMPGet'">
{
'snmpVersion' : '3',
'snmpHost' : DIRECTORY_INSTANCE_HOST ,
'snmpPort' : SNMP_PORT ,
'snmpUser' : defUser ,
'snmpCommunity' : defContextProp ,
'snmpSecurityLevel' : defSecurityLevelProp ,
'snmpSecurityFile' : mySecurityFile ,
'snmpOIDs' : oid ,
'snmpStatus' : 'noError'
}
</call>
<message>
'v3_customconf: get with the highUser and high security level'
</message>
<call function="'SNMPGet'">
{
'snmpVersion' : '3',
'snmpHost' : DIRECTORY_INSTANCE_HOST ,
'snmpPort' : SNMP_PORT ,
'snmpUser' : highUser ,
'snmpCommunity' : defContextProp ,
'snmpSecurityLevel' : highSecurityLevelProp ,
'snmpSecurityFile' : mySecurityFile ,
'snmpOIDs' : oid ,
'snmpStatus' : 'noError'
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker SNMP v3 with custom configuration
#@TestName v3_customconf: TODO
#@TestIssue none
#@TestPurpose TODO.
#@TestPreamble none
#@TestStep TODO.
#@TestPostamble none
#@TestResult TODO.
-->
<testcase name="getTestCaseName
('v3_customconf: change the context property')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'v3_customconf: change the context property'
</message>
<call function="'dsconfig'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'subcommand' : 'set-connection-handler-prop' ,
'objectType' : 'handler-name' ,
'objectName' : 'SNMP Connection Handler' ,
'optionsString' : '--set community:%s' % newContextProp
}
</call>
<message>
'v3_customconf: restart the SNMP Connection Handler'
</message>
<call function="'restartSNMPConnectionHandler'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD
}
</call>
<message>
'v3_customconf: get with the old context'
</message>
<call function="'SNMPGet'">
{
'snmpVersion' : '3',
'snmpHost' : DIRECTORY_INSTANCE_HOST ,
'snmpPort' : SNMP_PORT ,
'snmpUser' : defUser ,
'snmpCommunity' : defContextProp ,
'snmpSecurityLevel' : defSecurityLevelProp ,
'snmpSecurityFile' : mySecurityFile ,
'snmpOIDs' : oid ,
'snmpStatus' : 'reqTimeout'
}
</call>
<message>
'v3_customconf: get with the context'
</message>
<call function="'SNMPGet'">
{
'snmpVersion' : '3',
'snmpHost' : DIRECTORY_INSTANCE_HOST ,
'snmpPort' : SNMP_PORT ,
'snmpUser' : otherUser ,
'snmpCommunity' : newContextProp ,
'snmpSecurityLevel' : defSecurityLevelProp ,
'snmpSecurityFile' : mySecurityFile ,
'snmpOIDs' : oid ,
'snmpStatus' : 'noError'
}
</call>
<message>
'v3_customconf: restore the context property'
</message>
<call function="'dsconfig'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'subcommand' : 'set-connection-handler-prop' ,
'objectType' : 'handler-name' ,
'objectName' : 'SNMP Connection Handler' ,
'optionsString' : '--set community:%s' % defContextProp
}
</call>
<message>
'v3_customconf: restart the SNMP Connection Handler'
</message>
<call function="'restartSNMPConnectionHandler'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker SNMP v3 with custom configuration
#@TestName v3_customconf: TODO
#@TestIssue none
#@TestPurpose TODO.
#@TestPreamble none
#@TestStep TODO.
#@TestPostamble none
#@TestResult TODO.
-->
<testcase name="getTestCaseName
('v3_customconf: set the allowed-user property to a list')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'v3_customconf: set the allowed-user property to a list'
</message>
<call function="'dsconfig'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'subcommand' : 'set-connection-handler-prop' ,
'objectType' : 'handler-name' ,
'objectName' : 'SNMP Connection Handler' ,
'optionsString' : '--set allowed-user:%s' % defUser
}
</call>
<call function="'dsconfig'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'subcommand' : 'set-connection-handler-prop' ,
'objectType' : 'handler-name' ,
'objectName' : 'SNMP Connection Handler' ,
'optionsString' : '--add allowed-user:%s' % otherUser
}
</call>
<message>
'v3_customconf: restart the SNMP Connection Handler'
</message>
<call function="'restartSNMPConnectionHandler'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD
}
</call>
<message>
'v3_customconf: get with the myUser community'
</message>
<call function="'SNMPGet'">
{
'snmpVersion' : '3',
'snmpHost' : DIRECTORY_INSTANCE_HOST ,
'snmpPort' : SNMP_PORT ,
'snmpUser' : defUser ,
'snmpCommunity' : defContextProp ,
'snmpSecurityLevel' : defSecurityLevelProp ,
'snmpSecurityFile' : mySecurityFile ,
'snmpOIDs' : oid ,
'snmpStatus' : 'noError'
}
</call>
<message>
'v3_customconf: get with the myUser2 community'
</message>
<call function="'SNMPGet'">
{
'snmpVersion' : '3',
'snmpHost' : DIRECTORY_INSTANCE_HOST ,
'snmpPort' : SNMP_PORT ,
'snmpUser' : otherUser ,
'snmpCommunity' : defContextProp ,
'snmpSecurityLevel' : defSecurityLevelProp ,
'snmpSecurityFile' : mySecurityFile ,
'snmpOIDs' : oid ,
'snmpStatus' : 'noError'
}
</call>
<message>
'v3_customconf: restore the allowed-user property'
</message>
<call function="'dsconfig'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'subcommand' : 'set-connection-handler-prop' ,
'objectType' : 'handler-name' ,
'objectName' : 'SNMP Connection Handler' ,
'optionsString' : '--set allowed-user:%s' % defUserProp
}
</call>
<message>
'v3_customconf: restart the SNMP Connection Handler'
</message>
<call function="'restartSNMPConnectionHandler'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker SNMP v3 with custom configuration
#@TestName v3_customconf: TODO
#@TestIssue none
#@TestPurpose TODO.
#@TestPreamble none
#@TestStep TODO.
#@TestPostamble none
#@TestResult TODO.
-->
<testcase name="getTestCaseName
('v3_customconf: set the allowed-user property to otherUser')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'v3_customconf: set the allowed-user property to otherUser'
</message>
<call function="'dsconfig'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'subcommand' : 'set-connection-handler-prop' ,
'objectType' : 'handler-name' ,
'objectName' : 'SNMP Connection Handler' ,
'optionsString' : '--set allowed-user:%s' % otherUser
}
</call>
<message>
'v3_customconf: restart the SNMP Connection Handler'
</message>
<call function="'restartSNMPConnectionHandler'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD
}
</call>
<message>
'v3_customconf: get with the defUser'
</message>
<call function="'SNMPGet'">
{
'snmpVersion' : '3',
'snmpHost' : DIRECTORY_INSTANCE_HOST ,
'snmpPort' : SNMP_PORT ,
'snmpUser' : defUser ,
'snmpCommunity' : defContextProp ,
'snmpSecurityLevel' : defSecurityLevelProp ,
'snmpSecurityFile' : mySecurityFile ,
'snmpOIDs' : oid ,
'snmpStatus' : 'authorizationError'
}
</call>
<message>
'v3_customconf: get with the otherUser'
</message>
<call function="'SNMPGet'">
{
'snmpVersion' : '3',
'snmpHost' : DIRECTORY_INSTANCE_HOST ,
'snmpPort' : SNMP_PORT ,
'snmpUser' : otherUser ,
'snmpCommunity' : defContextProp ,
'snmpSecurityLevel' : defSecurityLevelProp ,
'snmpSecurityFile' : mySecurityFile ,
'snmpOIDs' : oid ,
'snmpStatus' : 'noError'
}
</call>
<message>
'v3_customconf: restore the security-agent-file property'
</message>
<call function="'dsconfig'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'subcommand' : 'set-connection-handler-prop' ,
'objectType' : 'handler-name' ,
'objectName' : 'SNMP Connection Handler' ,
'optionsString' : '--set allowed-user:%s' % defUserProp
}
</call>
<message>
'v3_customconf: restart the SNMP Connection Handler'
</message>
<call function="'restartSNMPConnectionHandler'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker SNMP v3 with custom configuration
#@TestName v3_customconf: TODO
#@TestIssue none
#@TestPurpose TODO.
#@TestPreamble none
#@TestStep TODO.
#@TestPostamble none
#@TestResult TODO.
-->
<testcase name="getTestCaseName
('v3_customconf: set the security-level property to low')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'v3_customconf: set the security-level property to low'
</message>
<call function="'dsconfig'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'subcommand' : 'set-connection-handler-prop' ,
'objectType' : 'handler-name' ,
'objectName' : 'SNMP Connection Handler' ,
'optionsString' : '--set security-level:%s' \
% lowSecurityLevelProp
}
</call>
<message>
'v3_customconf: restart the SNMP Connection Handler'
</message>
<call function="'restartSNMPConnectionHandler'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD
}
</call>
<message>
'v3_customconf: get with the myUser1 and low security level'
</message>
<call function="'SNMPGet'">
{
'snmpVersion' : '3',
'snmpHost' : DIRECTORY_INSTANCE_HOST ,
'snmpPort' : SNMP_PORT ,
'snmpUser' : lowUser ,
'snmpCommunity' : defContextProp ,
'snmpSecurityLevel' : lowSecurityLevelProp ,
'snmpSecurityFile' : mySecurityFile ,
'snmpOIDs' : oid ,
'snmpStatus' : 'noError'
}
</call>
<message>
'v3_customconf: get with the myUser2 and med security level'
</message>
<call function="'SNMPGet'">
{
'snmpVersion' : '3',
'snmpHost' : DIRECTORY_INSTANCE_HOST ,
'snmpPort' : SNMP_PORT ,
'snmpUser' : defUser ,
'snmpCommunity' : defContextProp ,
'snmpSecurityLevel' : defSecurityLevelProp ,
'snmpSecurityFile' : mySecurityFile ,
'snmpOIDs' : oid ,
'snmpStatus' : 'noError'
}
</call>
<message>
'v3_customconf: get with the myUser3 and high security level'
</message>
<call function="'SNMPGet'">
{
'snmpVersion' : '3',
'snmpHost' : DIRECTORY_INSTANCE_HOST ,
'snmpPort' : SNMP_PORT ,
'snmpUser' : highUser ,
'snmpCommunity' : defContextProp ,
'snmpSecurityLevel' : highSecurityLevelProp ,
'snmpSecurityFile' : mySecurityFile ,
'snmpOIDs' : oid ,
'snmpStatus' : 'noError'
}
</call>
<message>
'v3_customconf: restore the security-level property'
</message>
<call function="'dsconfig'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'subcommand' : 'set-connection-handler-prop' ,
'objectType' : 'handler-name' ,
'objectName' : 'SNMP Connection Handler' ,
'optionsString' : '--set security-level:%s' \
% defSecurityLevelProp
}
</call>
<message>
'v3_customconf: restart the SNMP Connection Handler'
</message>
<call function="'restartSNMPConnectionHandler'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker SNMP v3 with custom configuration
#@TestName v3_customconf: TODO
#@TestIssue none
#@TestPurpose TODO.
#@TestPreamble none
#@TestStep TODO.
#@TestPostamble none
#@TestResult TODO.
-->
<testcase name="getTestCaseName
('v3_customconf: set the security-level property to high')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'v3_customconf: set the security-level property to high'
</message>
<call function="'dsconfig'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'subcommand' : 'set-connection-handler-prop' ,
'objectType' : 'handler-name' ,
'objectName' : 'SNMP Connection Handler' ,
'optionsString' : '--set security-level:%s' \
% highSecurityLevelProp
}
</call>
<message>
'v3_customconf: restart the SNMP Connection Handler'
</message>
<call function="'restartSNMPConnectionHandler'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD
}
</call>
<message>
'v3_customconf: get with the myUser1 and low security level'
</message>
<call function="'SNMPGet'">
{
'snmpVersion' : '3',
'snmpHost' : DIRECTORY_INSTANCE_HOST ,
'snmpPort' : SNMP_PORT ,
'snmpUser' : lowUser ,
'snmpCommunity' : defContextProp ,
'snmpSecurityLevel' : lowSecurityLevelProp ,
'snmpSecurityFile' : mySecurityFile ,
'snmpOIDs' : oid ,
'snmpStatus' : 'authorizationError'
}
</call>
<message>
'v3_customconf: get with the myUser2 and med security level'
</message>
<call function="'SNMPGet'">
{
'snmpVersion' : '3',
'snmpHost' : DIRECTORY_INSTANCE_HOST ,
'snmpPort' : SNMP_PORT ,
'snmpUser' : defUser ,
'snmpCommunity' : defContextProp ,
'snmpSecurityLevel' : defSecurityLevelProp ,
'snmpSecurityFile' : mySecurityFile ,
'snmpOIDs' : oid ,
'snmpStatus' : 'authorizationError'
}
</call>
<message>
'v3_customconf: get with the myUser3 and high security level'
</message>
<call function="'SNMPGet'">
{
'snmpVersion' : '3',
'snmpHost' : DIRECTORY_INSTANCE_HOST ,
'snmpPort' : SNMP_PORT ,
'snmpUser' : highUser ,
'snmpCommunity' : defContextProp ,
'snmpSecurityLevel' : highSecurityLevelProp ,
'snmpSecurityFile' : mySecurityFile ,
'snmpOIDs' : oid ,
'snmpStatus' : 'noError'
}
</call>
<message>
'v3_customconf: restore the security-level property'
</message>
<call function="'dsconfig'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'subcommand' : 'set-connection-handler-prop' ,
'objectType' : 'handler-name' ,
'objectName' : 'SNMP Connection Handler' ,
'optionsString' : '--set security-level:%s' \
% defSecurityLevelProp
}
</call>
<message>
'v3_customconf: restart the SNMP Connection Handler'
</message>
<call function="'restartSNMPConnectionHandler'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker SNMP v3 with custom configuration
#@TestName v3_customconf: TODO
#@TestIssue none
#@TestPurpose TODO.
#@TestPreamble none
#@TestStep TODO.
#@TestPostamble none
#@TestResult TODO.
-->
<testcase name="getTestCaseName
('v3_customconf: set the security-level property to wrong')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'v3_customconf: set the security-level property to wrong'
</message>
<call function="'dsconfig'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'subcommand' : 'set-connection-handler-prop' ,
'objectType' : 'handler-name' ,
'objectName' : 'SNMP Connection Handler' ,
'optionsString' : '--set security-level:%s' \
% wrongSecurityLevelProp ,
'expectedRC' : 1
}
</call>
<script>
returnString = STAXResult[0][1]
msg1 = 'The value "%s" is not a valid value for the' \
% wrongSecurityLevelProp
msg2 = 'SNMP Connection Handler property "security-level"'
msg3 = 'which has the following syntax:'
msg4 = 'authnopriv | authpriv | noauthnopriv'
msg = '%s %s %s %s' % (msg1, msg2, msg3, msg4)
</script>
<call function="'checktestString'">
{
'returnString' : returnString ,
'expectedString' : msg
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<!--- Test Case information
#@TestMarker SNMP v3 with custom configuration
#@TestName v3_customconf: TODO
#@TestIssue none
#@TestPurpose TODO.
#@TestPreamble none
#@TestStep TODO.
#@TestPostamble none
#@TestResult TODO.
-->
<testcase name="getTestCaseName
('v3_customconf: restore the security-agent-file property')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'v3_customconf: restore the security-agent-file property'
</message>
<call function="'dsconfig'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'subcommand' : 'set-connection-handler-prop' ,
'objectType' : 'handler-name' ,
'objectName' : 'SNMP Connection Handler' ,
'optionsString' : '--set security-agent-file:%s' \
% defSecurityFileProp
}
</call>
<message>
'v3_customconf: restart the SNMP Connection Handler'
</message>
<call function="'restartSNMPConnectionHandler'">
{
'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD
}
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<call function="'testSuite_Postamble'"/>
</sequence>
</block>
</sequence>
</function>
</stax>