21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams<?xml version="1.0" encoding="UTF-8" standalone="no"?>
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams ! CDDL HEADER START
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams ! The contents of this file are subject to the terms of the
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams ! Common Development and Distribution License, Version 1.0 only
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams ! (the "License"). You may not use this file except in compliance
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams ! with the License.
3437829f938dbb44527d91fbbc5f430a1243c5a5JnRouvignac ! You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
3437829f938dbb44527d91fbbc5f430a1243c5a5JnRouvignac ! or http://forgerock.org/license/CDDLv1.0.html.
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams ! See the License for the specific language governing permissions
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams ! and limitations under the License.
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams ! When distributing Covered Code, include this CDDL HEADER in each
3437829f938dbb44527d91fbbc5f430a1243c5a5JnRouvignac ! file and include the License file at legal-notices/CDDLv1_0.txt.
3437829f938dbb44527d91fbbc5f430a1243c5a5JnRouvignac ! If applicable, add the following below this CDDL HEADER, with the
3437829f938dbb44527d91fbbc5f430a1243c5a5JnRouvignac ! fields enclosed by brackets "[]" replaced with your own identifying
3437829f938dbb44527d91fbbc5f430a1243c5a5JnRouvignac ! information:
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams ! Portions Copyright [yyyy] [name of copyright owner]
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams ! CDDL HEADER END
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams ! Copyright 2008 Sun Microsystems, Inc.
18b2d6e66ae8b46dd006dc722de0025391ad5cbacsovant ! Portions Copyright 2012-2013 ForgeRock AS
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <!--- Test Case information
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestMarker SNMP Connection Handler default properties
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestName snmp_defaultproperties: TODO
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestIssue none
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestPurpose TODO.
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestPreamble none
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestStep TODO.
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestPostamble none
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestResult TODO.
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <function name="snmp_basic_001" scope="local">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <testcase name="getTestCaseName('SNMP Default Properties')">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'Test Name = %s' % STAXCurrentTestcase
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Check the default properties.' }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams result = compare_property_table(EXPECTED_PROPERTIES,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams DEFAULT_PROPERTIES)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams '%s' % result
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'returnString' : result ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'testString' : 'ERROR'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <catch exception="'STAXException'" typevar="eType" var="eInfo">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams '%s: Test failed. eInfo(%s)' % (eType,eInfo)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <!--- Test Case information
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestMarker SNMP MIB values
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestName snmp_mibvalues: TODO
c568409b3b2a824eb5f7e9c3f097468cf32a7cdfcsovant #@TestIssue none
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestPurpose TODO.
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestPreamble none
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestStep TODO.
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestPostamble none
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestResult TODO.
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <function name="snmp_basic_002" scope="local">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <testcase name="getTestCaseName('Check the connection handlers')">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Save the SNMP values.' }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpVersion' : '1',
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpHost' : DIRECTORY_INSTANCE_HOST ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpPort' : SNMP_PORT ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpCommunity' : community ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpOIDs' : '' ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpStatus' : 'noError' ,
c568409b3b2a824eb5f7e9c3f097468cf32a7cdfcsovant 'snmpWalk' : 'True'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams DEFAULT_VALUES = create_table_fromoutput(STAXResult[0][1])
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams DEFAULT_VALUES = global_DEFAULT_VALUES.get()
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Check the connection handlers.' }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams nbHandler = get_handler_count(DEFAULT_VALUES)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams indexSNMP = get_handler_index(DEFAULT_VALUES, '1.3.6.1.27.3.%s'\
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams indexLDAP = get_handler_index(DEFAULT_VALUES, '1.3.6.1.27.3.%s'\
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams % DIRECTORY_INSTANCE_PORT)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <if expr="nbHandler == 2 and indexSNMP != 0 and indexLDAP != 0">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams msg1 = 'The connection handlers info are correct.\n'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams msg2 = 'number of handler: %s\n' % nbHandler
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams msg3 = 'index SNMP handler: %s\n' % indexSNMP
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams msg4 = 'index LDAP handler: %s\n' % indexLDAP
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams msg = '%s%s%s%s' % (msg1, msg2, msg3, msg4)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams msg1 = 'The connection handlers info are wrong.\n'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams msg2 = 'number of handler: %s/3\n' % nbHandler
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams msg3 = 'index SNMP handler: %s\n' % indexSNMP
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams msg4 = 'index LDAP handler: %s\n' % indexLDAP
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams msg = '%s%s%s%s' % (msg1, msg2, msg3, msg4)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <catch exception="'STAXException'" typevar="eType" var="eInfo">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams '%s: Test failed. eInfo(%s)' % (eType,eInfo)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <!--- Test Case information
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestMarker SNMP MIB values
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestName snmp_mibvalues: TODO
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestIssue none
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestPurpose TODO.
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestPreamble none
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestStep TODO.
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestPostamble none
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestResult TODO.
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <function name="snmp_basic_003" scope="local">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <testcase name="getTestCaseName('Check value of dsServerType entry')">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Check value of dsServerType entry.' }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <!-- Get the information about the server -->
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'location' : STAF_REMOTE_HOSTNAME,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'type' : 'shared',
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'variable' : 'Job%s_ServerInfo' % STAXParentID
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams STAFResult='{}'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams jobInfo=eval(STAFResult)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams # In IPS mode, DIRECTORY_INSTANCE_BIN is used
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams # for installation path
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams if IPS_PKG == True:
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams instPath = DIRECTORY_INSTANCE_BIN
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams instPath = DIRECTORY_INSTANCE_DIR
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams if jobInfo.has_key('%s/%s' % (instPath,OPENDSNAME)):
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams serverInformation=jobInfo['%s/%s' % (instPath,OPENDSNAME)]
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams dsVersion=serverInformation['server version']
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams dsBuild=serverInformation['server buildid']
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams dsVersion='unknown'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams dsBuild='unknown'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams dsServer = '%s %s - %s' \
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams % (PRODUCTNAME, dsVersion.rstrip(), dsBuild)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams DEFAULT_VALUES = global_DEFAULT_VALUES.get()
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams dsServerType = DEFAULT_VALUES['dsServerType.1']
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams msg1 = 'Value for dsServerType entry is correct.\n'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams msg2 = 'Current value: %s' % dsServerType
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams msg = '%s%s' % (msg1, msg2)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams msg1 = 'Value for dsServerType entry is wrong.\n'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams msg2 = 'Expected value: %s\n' % dsServer
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams msg3 = 'Current value: %s' % dsServerType
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams msg = '%s%s%s' % (msg1, msg2, msg3)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <catch exception="'STAXException'" typevar="eType" var="eInfo">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams '%s: Test failed. eInfo(%s)' % (eType,eInfo)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <!--- Test Case information
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestMarker SNMP MIB values
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestName snmp_mibvalues: TODO
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestIssue none
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestPurpose TODO.
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestPreamble none
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestStep TODO.
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestPostamble none
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestResult TODO.
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <function name="snmp_basic_004" scope="local">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <testcase name="getTestCaseName('Check value of dsServerDescription entry')">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Check value of dsServerDescription entry.' }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams DEFAULT_VALUES = global_DEFAULT_VALUES.get()
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams dsServerDescription = DEFAULT_VALUES['dsServerDescription.1']
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams dsPath = '%s/%s' % (DIRECTORY_INSTANCE_BIN, OPENDSNAME)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams if is_windows_platform(DIRECTORY_INSTANCE_HOST):
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams dsPath = dsPath.replace('/', '\\')
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams msg1 = 'Value for dsServerDescription entry is correct.\n'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams msg2 = 'Current value: %s' % dsServerDescription
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams msg = '%s%s' % (msg1, msg2)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams msg1 = 'Value for dsServerDescription entry is wrong.\n'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams msg2 = 'Expected value: %s\n' % dsPath
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams msg3 = 'Current value: %s' % dsServerDescription
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams msg = '%s%s%s' % (msg1, msg2, msg3)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <catch exception="'STAXException'" typevar="eType" var="eInfo">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams '%s: Test failed. eInfo(%s)' % (eType,eInfo)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <!--- Test Case information
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestMarker SNMP MIB values
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestName snmp_mibvalues: TODO
a42771cc42fde617fd2d034908e9864c80b1c835csovant #@TestIssue none
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestPurpose TODO.
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestPreamble none
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestStep TODO.
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestPostamble none
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestResult TODO.
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <function name="snmp_basic_005" scope="local">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <testcase name="getTestCaseName('Check value of dsApplIfSearchOps entry')">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Perform %s search operation' % nbLoop }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams id = 700 + loop
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams userDn = 'uid=user.%s,o=snmp tests,dc=example,dc=com' % id
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'LOOP %s: %s' % (loop, userDn)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsTypesOnly' : 'True' ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsBaseDN' : 'dc=com' ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsFilter' : userDn
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Increment the SNMP values' }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams key = 'dsApplIfReadOps.%s' % indexLDAP
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams DEFAULT_VALUES = global_DEFAULT_VALUES.get()
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams DEFAULT_VALUES[key] = \
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams str(int(DEFAULT_VALUES[key]) + nbLoop)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams key = 'dsApplIfSearchOps.%s' % indexLDAP
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams DEFAULT_VALUES[key] = \
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams str(int(DEFAULT_VALUES[key]) + nbLoop)
a42771cc42fde617fd2d034908e9864c80b1c835csovant key = 'dsApplIfWholeSubtreeSearchOps.%s' % indexLDAP
a42771cc42fde617fd2d034908e9864c80b1c835csovant DEFAULT_VALUES[key] = \
a42771cc42fde617fd2d034908e9864c80b1c835csovant str(int(DEFAULT_VALUES[key]) + nbLoop)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Check value of dsApplIfSearchOps entry' }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpHost' : DIRECTORY_INSTANCE_HOST ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpPort' : SNMP_PORT ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpCommunity' : community ,
a42771cc42fde617fd2d034908e9864c80b1c835csovant 'index' : indexLDAP
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Save the snmp values' }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpVersion' : '1',
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpHost' : DIRECTORY_INSTANCE_HOST ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpPort' : SNMP_PORT ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpCommunity' : community ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpOIDs' : '' ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpStatus' : 'noError' ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpWalk' : 'True'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams DEFAULT_VALUES = {}
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams DEFAULT_VALUES = create_table_fromoutput(STAXResult[0][1])
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <catch exception="'STAXException'" typevar="eType" var="eInfo">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams '%s: Test failed. eInfo(%s)' % (eType,eInfo)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <!--- Test Case information
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestMarker SNMP MIB values
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestName snmp_mibvalues: TODO
a42771cc42fde617fd2d034908e9864c80b1c835csovant #@TestIssue none
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestPurpose TODO.
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestPreamble none
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestStep TODO.
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestPostamble none
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestResult TODO.
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <function name="snmp_basic_006" scope="local">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <testcase name="getTestCaseName('Check value of dsApplIfAddEntryOps entry')">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Perform %s add operations' % nbLoop }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams id = 1000 + loop
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams userDn = 'uid=user.%s,o=snmp tests,dc=example,dc=com' % id
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams listAttr = []
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams listAttr.append('objectclass:top')
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams listAttr.append('objectclass:organizationalperson')
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams listAttr.append('objectclass:inetorgperson')
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams listAttr.append('objectclass:person')
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams listAttr.append('givenname:Izen.0')
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams listAttr.append('cn:Izen Abizen.0')
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'LOOP %s: %s' % (loop, userDn)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'DNToAdd' : userDn,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'listAttributes' : listAttr
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Increment the SNMP values' }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams key = 'dsApplIfReadOps.%s' % indexLDAP
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams DEFAULT_VALUES = global_DEFAULT_VALUES.get()
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams DEFAULT_VALUES[key] = \
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams str(int(DEFAULT_VALUES[key]) + nbLoop)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams key = 'dsApplIfAddEntryOps.%s' % indexLDAP
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams DEFAULT_VALUES[key] = \
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams str(int(DEFAULT_VALUES[key]) + nbLoop)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams DEFAULT_VALUES['dsMasterEntries.1'] = \
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams str(int(DEFAULT_VALUES['dsMasterEntries.1']) + nbLoop)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Check value of dsApplIfAddEntryOps entry' }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpHost' : DIRECTORY_INSTANCE_HOST ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpPort' : SNMP_PORT ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpCommunity' : community ,
a42771cc42fde617fd2d034908e9864c80b1c835csovant 'index' : indexLDAP
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Save the SNMP values' }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpVersion' : '1',
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpHost' : DIRECTORY_INSTANCE_HOST ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpPort' : SNMP_PORT ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpCommunity' : community ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpOIDs' : '' ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpStatus' : 'noError' ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpWalk' : 'True'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams DEFAULT_VALUES = {}
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams DEFAULT_VALUES = create_table_fromoutput(STAXResult[0][1])
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <catch exception="'STAXException'" typevar="eType" var="eInfo">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams '%s: Test failed. eInfo(%s)' % (eType,eInfo)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <!--- Test Case information
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestMarker SNMP MIB values
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestName snmp_mibvalues: TODO
a42771cc42fde617fd2d034908e9864c80b1c835csovant #@TestIssue none
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestPurpose TODO.
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestPreamble none
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestStep TODO.
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestPostamble none
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestResult TODO.
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <function name="snmp_basic_007" scope="local">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <testcase name="getTestCaseName('Check value of dsApplIfRemoveEntryOps entry')">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Perform %s remove operations' % nbLoop }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams id = 1000 + loop
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams userDn = 'uid=user.%s,o=snmp tests,dc=example,dc=com' % id
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'LOOP %s: %s' % (loop, userDn)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsDn' : ['%s' % userDn]
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Increment the SNMP values' }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams key = 'dsApplIfReadOps.%s' % indexLDAP
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams DEFAULT_VALUES = global_DEFAULT_VALUES.get()
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams DEFAULT_VALUES[key] = \
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams str(int(DEFAULT_VALUES[key]) + nbLoop)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams key = 'dsApplIfRemoveEntryOps.%s' % indexLDAP
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams DEFAULT_VALUES[key] = \
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams str(int(DEFAULT_VALUES[key]) + nbLoop)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams DEFAULT_VALUES['dsMasterEntries.1'] = \
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams str(int(DEFAULT_VALUES['dsMasterEntries.1']) - nbLoop)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Check value of dsApplIfRemoveEntryOps entry' }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpHost' : DIRECTORY_INSTANCE_HOST ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpPort' : SNMP_PORT ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpCommunity' : community ,
a42771cc42fde617fd2d034908e9864c80b1c835csovant 'index' : indexLDAP
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Save the SNMP values' }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpVersion' : '1',
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpHost' : DIRECTORY_INSTANCE_HOST ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpPort' : SNMP_PORT ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpCommunity' : community ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpOIDs' : '' ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpStatus' : 'noError' ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpWalk' : 'True'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams DEFAULT_VALUES = {}
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams DEFAULT_VALUES = create_table_fromoutput(STAXResult[0][1])
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <catch exception="'STAXException'" typevar="eType" var="eInfo">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams '%s: Test failed. eInfo(%s)' % (eType,eInfo)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <!--- Test Case information
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestMarker SNMP MIB values
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestName snmp_mibvalues: TODO
a42771cc42fde617fd2d034908e9864c80b1c835csovant #@TestIssue none
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestPurpose TODO.
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestPreamble none
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestStep TODO.
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestPostamble none
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestResult TODO.
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <function name="snmp_basic_008" scope="local">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <testcase name="getTestCaseName('Check value of dsApplIfCompareOps entry')">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Perform %s compare operations' % nbLoop }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams id = 0 + loop
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams userDn = 'uid=user.%s,o=snmp tests,dc=example,dc=com' % id
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'LOOP %s: %s' % (loop, userDn)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsDn' : ['postalCode:64447', '%s' % userDn] ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'expectedRC' : 'noCheck'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Increment the SNMP values' }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams key = 'dsApplIfReadOps.%s' % indexLDAP
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams DEFAULT_VALUES = global_DEFAULT_VALUES.get()
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams DEFAULT_VALUES[key] = \
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams str(int(DEFAULT_VALUES[key]) + nbLoop)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams key = 'dsApplIfCompareOps.%s' % indexLDAP
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams DEFAULT_VALUES[key] = \
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams str(int(DEFAULT_VALUES[key]) + nbLoop)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Check value of dsApplIfCompareOps entry' }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpHost' : DIRECTORY_INSTANCE_HOST ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpPort' : SNMP_PORT ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpCommunity' : community ,
a42771cc42fde617fd2d034908e9864c80b1c835csovant 'index' : indexLDAP
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Save the SNMP values' }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpVersion' : '1',
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpHost' : DIRECTORY_INSTANCE_HOST ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpPort' : SNMP_PORT ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpCommunity' : community ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpOIDs' : '' ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpStatus' : 'noError' ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpWalk' : 'True'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams DEFAULT_VALUES = {}
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams DEFAULT_VALUES = create_table_fromoutput(STAXResult[0][1])
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <catch exception="'STAXException'" typevar="eType" var="eInfo">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams '%s: Test failed. eInfo(%s)' % (eType,eInfo)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <!--- Test Case information
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestMarker SNMP MIB values
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestName snmp_mibvalues: TODO
a42771cc42fde617fd2d034908e9864c80b1c835csovant #@TestIssue none
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestPurpose TODO.
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestPreamble none
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestStep TODO.
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestPostamble none
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestResult TODO.
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <function name="snmp_basic_009" scope="local">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <testcase name="getTestCaseName('Check value of dsApplIfModifyEntryOps entry')">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Perform %s modify operations' % nbLoop }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams id = 400 + loop
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams userDn = 'uid=user.%s,o=snmp tests,dc=example,dc=com' % id
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'LOOP %s: %s' % (loop, userDn)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'DNToModify' : userDn ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'attributeName' : 'postalCode' ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'newAttributeValue' : '%s' % id ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'changetype' : 'replace'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Increment the SNMP values' }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams key = 'dsApplIfReadOps.%s' % indexLDAP
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams DEFAULT_VALUES = global_DEFAULT_VALUES.get()
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams DEFAULT_VALUES[key] = \
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams str(int(DEFAULT_VALUES[key]) + nbLoop)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams key = 'dsApplIfModifyEntryOps.%s' % indexLDAP
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams DEFAULT_VALUES[key] = \
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams str(int(DEFAULT_VALUES[key]) + nbLoop)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Check value of dsApplIfModifyEntryOps entry' }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpHost' : DIRECTORY_INSTANCE_HOST ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpPort' : SNMP_PORT ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpCommunity' : community ,
a42771cc42fde617fd2d034908e9864c80b1c835csovant 'index' : indexLDAP
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Save the SNMP values' }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpVersion' : '1',
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpHost' : DIRECTORY_INSTANCE_HOST ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpPort' : SNMP_PORT ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpCommunity' : community ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpOIDs' : '' ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpStatus' : 'noError' ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpWalk' : 'True'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams DEFAULT_VALUES = {}
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams DEFAULT_VALUES = create_table_fromoutput(STAXResult[0][1])
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <catch exception="'STAXException'" typevar="eType" var="eInfo">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams '%s: Test failed. eInfo(%s)' % (eType,eInfo)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <!--- Test Case information
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestMarker SNMP MIB values
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestName snmp_mibvalues: TODO
a42771cc42fde617fd2d034908e9864c80b1c835csovant #@TestIssue none
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestPurpose TODO.
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestPreamble none
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestStep TODO.
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestPostamble none
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestResult TODO.
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <function name="snmp_basic_010" scope="local">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <testcase name="getTestCaseName('Check value of dsApplIfModifyRDNOps entry')">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Perform %s modify RDN operations' % nbLoop }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <!--- Create a ldif file for moddn -->
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams id = 800 + loop
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams userDn = 'uid=user.%s,o=snmp tests,dc=example,dc=com' % id
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams newid = 2000 + loop
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams newDn = 'uid=user.%s' % newid
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams templateFile = 'template-%s.ldif' % loop
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams templatePath = '%s/%s' % (remote.temp, templateFile)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams ldifFile = 'moddn-%s.ldif' % loop
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams ldifPath = '%s/%s' % (DIRECTORY_INSTANCE_DIR, ldifFile)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams ldifLines = []
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams ldifLines.append('dn: %s' % userDn)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams ldifLines.append('changetype: moddn')
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams ldifLines.append('newRDN: %s' % newDn)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams ldifLines.append('deleteOldRDN: 1')
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams outFile = open(templatePath, "w")
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams for line in ldifLines:
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'LOOP %s: %s => %s' % (loop, userDn, newDn)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <!--- Copy file to remote host -->
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'Copy %s to %s on %s' \
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams % (templateFile,DIRECTORY_INSTANCE_DIR,STAF_REMOTE_HOSTNAME)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'srcfile' : templatePath ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'destfile' : ldifPath ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'remotehost' : STAF_REMOTE_HOSTNAME
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsFilename' : ldifPath
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <!--- Delete the ldif file used for moddn on remote host -->
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'Delete %s on %s' % (ldifPath, STAF_REMOTE_HOSTNAME)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'location' : STAF_REMOTE_HOSTNAME ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'filename' : ldifPath
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <!--- Delete locally the ldif file used for moddn -->
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'Delete locally %s' % templatePath
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'location' : STAXServiceMachine ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'filename' : templatePath
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Increment the SNMP values' }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams key = 'dsApplIfReadOps.%s' % indexLDAP
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams DEFAULT_VALUES = global_DEFAULT_VALUES.get()
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams DEFAULT_VALUES[key] = \
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams str(int(DEFAULT_VALUES[key]) + nbLoop)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams key = 'dsApplIfModifyRDNOps.%s' % indexLDAP
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams DEFAULT_VALUES[key] = \
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams str(int(DEFAULT_VALUES[key]) + nbLoop)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Check value of dsApplIfModifyRDNOps entry' }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpHost' : DIRECTORY_INSTANCE_HOST ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpPort' : SNMP_PORT ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpCommunity' : community ,
a42771cc42fde617fd2d034908e9864c80b1c835csovant 'index' : indexLDAP
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Save the SNMP values' }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpVersion' : '1',
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpHost' : DIRECTORY_INSTANCE_HOST ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpPort' : SNMP_PORT ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpCommunity' : community ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpOIDs' : '' ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpStatus' : 'noError' ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpWalk' : 'True'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams DEFAULT_VALUES = {}
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams DEFAULT_VALUES = create_table_fromoutput(STAXResult[0][1])
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <catch exception="'STAXException'" typevar="eType" var="eInfo">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams '%s: Test failed. eInfo(%s)' % (eType,eInfo)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <!--- Test Case information
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestMarker SNMP Connection Handler register mbean
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestName registermbean: TODO
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestIssue none
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestPurpose TODO.
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestPreamble none
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestStep TODO.
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestPostamble none
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestResult TODO.
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <function name="snmp_basic_011" scope="local">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <testcase name="getTestCaseName('Check that there is no error at startup')">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Set the register-mbean property to true' }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'subcommand' : 'set-connection-handler-prop' ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'objectType' : 'handler-name' ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'objectName' : 'SNMP Connection Handler' ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'optionsString' : '--set registered-mbean:true'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'status: restart DS running on port %s' \
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams % (DIRECTORY_INSTANCE_PORT)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'location' : STAF_REMOTE_HOSTNAME ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsHost' : DIRECTORY_INSTANCE_HOST ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsBindDN' : DIRECTORY_INSTANCE_DN ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsBindPwd' : DIRECTORY_INSTANCE_PSWD
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'location' : STAF_REMOTE_HOSTNAME }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams returnString = STAXResult[0][1]
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <!--- Check that DS started -->
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'noOfLoops' : 10 ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'noOfMilliSeconds' : 2000
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'returnString' : returnString ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'testString' : 'category=PROTOCOL severity=SEVERE_ERROR'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Get to check the SNMPConnection Handler' }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpVersion' : '1',
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpHost' : DIRECTORY_INSTANCE_HOST ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpPort' : SNMP_PORT ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpCommunity' : defCommunity ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpOIDs' : oid ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpStatus' : 'noError'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Restore the register-mbean property' }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'subcommand' : 'set-connection-handler-prop' ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'objectType' : 'handler-name' ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'objectName' : 'SNMP Connection Handler' ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'optionsString' : '--set registered-mbean:%s' \
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams % refRegisteredMbeanProp
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Restart the SNMP Connection Handler' }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <call function="'restartSNMPConnectionHandler'">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <catch exception="'STAXException'" typevar="eType" var="eInfo">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams '%s: Test failed. eInfo(%s)' % (eType,eInfo)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <!--- Test Case information
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestMarker SNMP Connection Handler register mbean
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestName registermbean: TODO
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestIssue none
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestPurpose TODO.
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestPreamble none
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestStep TODO.
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestPostamble none
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestResult TODO.
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <function name="snmp_basic_012" scope="local">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <testcase name="getTestCaseName('Set the register-mbean property to a wrong value')">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Set register-mbean property to a wrong value' }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'subcommand' : 'set-connection-handler-prop' ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'objectType' : 'handler-name' ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'objectName' : 'SNMP Connection Handler' ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'optionsString' : '--set registered-mbean:myValue' ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'expectedRC' : 1
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams returnString = STAXResult[0][1]
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams msg1 = 'The value "myValue" is not a valid value for the'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams msg2 = 'SNMP Connection Handler\nproperty "registered-mbean"'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams msg3 = 'which has the following syntax: false | true'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams msg = '%s %s %s' % (msg1, msg2, msg3)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'returnString' : returnString ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'expectedString' : msg
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <catch exception="'STAXException'" typevar="eType" var="eInfo">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams '%s: Test failed. eInfo(%s)' % (eType,eInfo)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <!--- Test Case information
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestMarker SNMP Connection Handler status
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestName status: check status when the server is
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestIssue none
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestPurpose Check status when the server is
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestPreamble none
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestStep stop the server
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestStep check status using status command
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestStep start the server
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestStep check status using status command
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestStep do a SNMP get request to check that the
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams connection handler
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestPostamble none
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestResult Success if output of status is correct.
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <function name="snmp_basic_013" scope="local">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <testcase name="getTestCaseName('Status when the server is stopped/started')">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'stop DS running on port %s' % (DIRECTORY_INSTANCE_PORT) }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'location' : STAF_REMOTE_HOSTNAME ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsHost' : DIRECTORY_INSTANCE_HOST ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsBindDN' : DIRECTORY_INSTANCE_DN ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsBindPwd' : DIRECTORY_INSTANCE_PSWD
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Get status when the server is stopped' }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsBindDN' : DIRECTORY_INSTANCE_DN ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsBindPwd' : DIRECTORY_INSTANCE_PSWD
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams returnString = STAXResult[0][1]
ca5f476ebacf0684605124c0410d08604231adddcsovant 'expectedString' : '0.0.0.0:%s\\s+:\\s+SNMP\\s+:\\s+Enabled' \
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams % SNMP_PORT ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'returnString' : returnString ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'expectedRC' : 0
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Start DS to run on port %s' % (DIRECTORY_INSTANCE_PORT) }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'location' : STAF_REMOTE_HOSTNAME }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <!--- Check that DS started -->
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'noOfLoops' : 10 ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'noOfMilliSeconds' : 2000
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Get status when the server is started' }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsBindDN' : DIRECTORY_INSTANCE_DN ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsBindPwd' : DIRECTORY_INSTANCE_PSWD
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams returnString = STAXResult[0][1]
ca5f476ebacf0684605124c0410d08604231adddcsovant 'expectedString' : '0.0.0.0:%s\\s+:\\s+SNMP\\s+:\\s+Enabled' \
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams % SNMP_PORT ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'returnString' : returnString ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'expectedRC' : 0
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Send SNMP Get request' }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpVersion' : '1',
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpHost' : DIRECTORY_INSTANCE_HOST ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpPort' : SNMP_PORT ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpCommunity' : community ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpOIDs' : oid ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpStatus' : 'noError'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <catch exception="'STAXException'" typevar="eType" var="eInfo">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams '%s: Test failed. eInfo(%s)' % (eType,eInfo)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <!--- Test Case information
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestMarker SNMP Connection Handler status
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestName status: check status when the connection
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestIssue none
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestPurpose Check status when the SNMP connection handler
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestPreamble none
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestStep disable the SNMP connection handler
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestStep check status using status command
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestStep enable the SNMP connection handler
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestStep check status using status command
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestPostamble none
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestResult Success if output of status is correct.
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <function name="snmp_basic_014" scope="local">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <testcase name="getTestCaseName('Status when SNMP Connection Handler is disabled/enabled')">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Disable the SNMP Connection Handler' }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'subcommand' : 'set-connection-handler-prop' ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'objectType' : 'handler-name' ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'objectName' : 'SNMP Connection Handler' ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'optionsString' : '--set enabled:false'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Get status when the SNMP connection handler is disabled' }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsBindDN' : DIRECTORY_INSTANCE_DN ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsBindPwd' : DIRECTORY_INSTANCE_PSWD
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams returnString = STAXResult[0][1]
ca5f476ebacf0684605124c0410d08604231adddcsovant 'expectedString' : '0.0.0.0:%s\\s+:\\s+SNMP\\s+:\\s+Disabled' \
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams % SNMP_PORT ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'returnString' : returnString ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'expectedRC' : 0
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Send SNMP Get request' }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpVersion' : '1',
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpHost' : DIRECTORY_INSTANCE_HOST ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpPort' : SNMP_PORT ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpCommunity' : community ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpOIDs' : oid ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpStatus' : 'reqTimeout'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Enable the SNMP Connection Handler' }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'subcommand' : 'set-connection-handler-prop' ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'objectType' : 'handler-name' ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'objectName' : 'SNMP Connection Handler' ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'optionsString' : '--set enabled:true'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Get status when the SNMP connection handler is enabled' }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsBindDN' : DIRECTORY_INSTANCE_DN ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsBindPwd' : DIRECTORY_INSTANCE_PSWD
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams returnString = STAXResult[0][1]
ca5f476ebacf0684605124c0410d08604231adddcsovant 'expectedString' : '0.0.0.0:%s\\s+:\\s+SNMP\\s+:\\s+Enabled' \
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams % SNMP_PORT ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'returnString' : returnString ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'expectedRC' : 0
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Send SNMP Get request' }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpVersion' : '1',
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpHost' : DIRECTORY_INSTANCE_HOST ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpPort' : SNMP_PORT ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpCommunity' : community ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpOIDs' : oid ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpStatus' : 'noError'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <catch exception="'STAXException'" typevar="eType" var="eInfo">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams '%s: Test failed. eInfo(%s)' % (eType,eInfo)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <!--- Test Case information
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestMarker SNMP Connection Handler status
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestName status: check error message and status when
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams the opendmk-jarfile property is set to a
a42771cc42fde617fd2d034908e9864c80b1c835csovant #@TestIssue none
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestPurpose Check error message and status when
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams the opendmk-jarfile property is set to a
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestPreamble none
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestStep set opendmk-jarfile property to a wrong value
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestStep restart the server
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestStep check that an error message is displayed at
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestStep check status using status command
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestStep restore value for opendmk-jarfile property
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestStep disable the SNMP connection handler
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestStep enable the SNMP connection handler
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestPostamble none
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestResult Success if an error message is displayed and
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams if the output of status is correct.
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <function name="snmp_basic_015" scope="local">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <testcase name="getTestCaseName('Status with a wrong opendmk-jarfile value')">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Set opendmk-jarfile property to a wrong value' }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'subcommand' : 'set-connection-handler-prop' ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'objectType' : 'handler-name' ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'objectName' : 'SNMP Connection Handler' ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'optionsString' : '--set opendmk-jarfile:wrong_file'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Restart DS running on port %s' % (DIRECTORY_INSTANCE_PORT) }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'location' : STAF_REMOTE_HOSTNAME ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsHost' : DIRECTORY_INSTANCE_HOST ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsBindDN' : DIRECTORY_INSTANCE_DN ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsBindPwd' : DIRECTORY_INSTANCE_PSWD
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'location' : STAF_REMOTE_HOSTNAME }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <!--- Check that DS started -->
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'noOfLoops' : 10 ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'noOfMilliSeconds' : 2000
2f3086195e9aedc219323bd688832bb3686bbbabcsovant <!-- Run this check only on Unix.
2f3086195e9aedc219323bd688832bb3686bbbabcsovant Difficult to check that on Windows due to '\' characters -->
2f3086195e9aedc219323bd688832bb3686bbbabcsovant <if expr="not is_windows_platform(STAF_REMOTE_HOSTNAME)">
2f3086195e9aedc219323bd688832bb3686bbbabcsovant <!-- Unix -->
2f3086195e9aedc219323bd688832bb3686bbbabcsovant % (DIRECTORY_INSTANCE_DIR, OPENDSNAME)
2f3086195e9aedc219323bd688832bb3686bbbabcsovant if is_windows_platform(DIRECTORY_INSTANCE_HOST):
2f3086195e9aedc219323bd688832bb3686bbbabcsovant opendmkJarFile = opendmkJarFile.replace('/', '\\')
2f3086195e9aedc219323bd688832bb3686bbbabcsovant msg1 = 'The specified OpenDMK jar file'
2f3086195e9aedc219323bd688832bb3686bbbabcsovant msg2 = '\'%s\' could not be found.' % opendmkJarFile
2f3086195e9aedc219323bd688832bb3686bbbabcsovant msg = '%s %s' % (msg1, msg2)
2f3086195e9aedc219323bd688832bb3686bbbabcsovant 'location' : STAF_REMOTE_HOSTNAME ,
2f3086195e9aedc219323bd688832bb3686bbbabcsovant 'filename' : serverLogFile ,
2f3086195e9aedc219323bd688832bb3686bbbabcsovant 'testString': msg
2f3086195e9aedc219323bd688832bb3686bbbabcsovant </sequence>
5ba9a5e252f9de9c76e091f8b56dc89da992b87acsovant msg1 = 'Verify that the value set in the opendmk-jarfile'
5ba9a5e252f9de9c76e091f8b56dc89da992b87acsovant msg2 = 'configuration parameter of the SNMP connection handler'
5ba9a5e252f9de9c76e091f8b56dc89da992b87acsovant msg3 = 'is the valid path to the jdmkrt.jar file and that the'
5ba9a5e252f9de9c76e091f8b56dc89da992b87acsovant msg4 = 'file is accessible'
5ba9a5e252f9de9c76e091f8b56dc89da992b87acsovant msg = '%s %s %s %s' % (msg1, msg2, msg3, msg4)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'location' : STAF_REMOTE_HOSTNAME ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'filename' : serverLogFile ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'testString': msg
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Get status when the server is started' }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsBindDN' : DIRECTORY_INSTANCE_DN ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsBindPwd' : DIRECTORY_INSTANCE_PSWD
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams returnString = STAXResult[0][1]
ca5f476ebacf0684605124c0410d08604231adddcsovant 'expectedString' : '0.0.0.0:%s\\s+:\\s+SNMP\\s+:\\s+Enabled' \
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams % SNMP_PORT ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'returnString' : returnString ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'expectedRC' : 0
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Send SNMP Get request' }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpVersion' : '1',
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpHost' : DIRECTORY_INSTANCE_HOST ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpPort' : SNMP_PORT ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpCommunity' : community ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpOIDs' : oid ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpStatus' : 'reqTimeout'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Restore value for opendmk-jarfile property' }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'subcommand' : 'set-connection-handler-prop' ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'objectType' : 'handler-name' ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'objectName' : 'SNMP Connection Handler' ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'optionsString' : '--set opendmk-jarfile:%s' \
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams % SNMP_PROPERTIES['opendmk-jarfile']
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Restart the SNMP Connection Handler' }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <call function="'restartSNMPConnectionHandler'">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <catch exception="'STAXException'" typevar="eType" var="eInfo">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams '%s: Test failed. eInfo(%s)' % (eType,eInfo)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <!--- Test Case information
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestMarker SNMP Connection Handler status
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestName status: check error message and status when
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams the security-agent-file property is set to a
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestIssue none
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestPurpose Check error message and status when
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams the security-agent-file property is set to a
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestPreamble none
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestStep set security-agent-file property to a wrong
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestStep restart the server
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestStep check that an error message is displayed at
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestStep check status using status command
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestStep restore value for security-agent-file property
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestStep disable the SNMP connection handler
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestStep enable the SNMP connection handler
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestPostamble none
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestResult Success if an error message is displayed and
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams if the output of status is correct.
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <function name="snmp_basic_016" scope="local">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <testcase name="getTestCaseName('Status with a wrong security-agent-file value')">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Set the security-agent-file to a wrong value' }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'subcommand' : 'set-connection-handler-prop' ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'objectType' : 'handler-name' ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'objectName' : 'SNMP Connection Handler' ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'optionsString' : '--set security-agent-file:wrong_file'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Restart DS running on port %s' % (DIRECTORY_INSTANCE_PORT) }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'location' : STAF_REMOTE_HOSTNAME ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsHost' : DIRECTORY_INSTANCE_HOST ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsBindDN' : DIRECTORY_INSTANCE_DN ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsBindPwd' : DIRECTORY_INSTANCE_PSWD
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'location' : STAF_REMOTE_HOSTNAME }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <!--- Check that DS started -->
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'noOfLoops' : 10 ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'noOfMilliSeconds' : 2000
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams msg1 = 'Cannot initialize the SNMP Connection Handler.'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams msg2 = 'Please check the configuration attributes'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams msg = '%s %s' % (msg1, msg2)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'location' : STAF_REMOTE_HOSTNAME ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'filename' : serverLogFile ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'testString': msg
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams msg1 = 'You do not have the appropriated OpenDMK jar files to'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams msg2 = 'enable the SNMP Connection Handler. Please go under'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams msg3 = 'http:\/\/opendmk.dev.java.net and set the'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams msg4 = 'ds-cfg-opendmk-jarfile configuration parameter to set'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams msg5 = 'the full path of the required jdmkrt.jar file.'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams msg6 = 'The SNMP connection Handler didn\'t started'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams msg = '%s %s %s %s %s %s' % (msg1, msg2, msg3, msg4, msg5, msg6)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'location' : STAF_REMOTE_HOSTNAME ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'filename' : serverLogFile ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'testString' : msg ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'expectedRC' : 1
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Get status when the server is started' }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsBindDN' : DIRECTORY_INSTANCE_DN ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsBindPwd' : DIRECTORY_INSTANCE_PSWD
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams returnString = STAXResult[0][1]
ca5f476ebacf0684605124c0410d08604231adddcsovant 'expectedString' : '0.0.0.0:%s\\s+:\\s+SNMP\\s+:\\s+Enabled' \
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams % SNMP_PORT ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'returnString' : returnString ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'expectedRC' : 0
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Send SNMP Get request' }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpVersion' : '1',
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpHost' : DIRECTORY_INSTANCE_HOST ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpPort' : SNMP_PORT ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpCommunity' : community ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpOIDs' : oid ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpStatus' : 'reqTimeout'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Restore value for security-agent-file property' }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'subcommand' : 'set-connection-handler-prop' ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'objectType' : 'handler-name' ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'objectName' : 'SNMP Connection Handler' ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'optionsString' : '--set security-agent-file:%s' \
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams % SNMP_PROPERTIES['security-agent-file']
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Restart the SNMP Connection Handler' }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <call function="'restartSNMPConnectionHandler'">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <catch exception="'STAXException'" typevar="eType" var="eInfo">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams '%s: Test failed. eInfo(%s)' % (eType,eInfo)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <!-- Test Case information
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestMarker SNMP Connection Handler status
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestName status: check error message and status when
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams the listen-port property is set to a wrong
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestIssue none
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestPurpose Check error message and status when
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams the listen-port property is set to a wrong
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestPreamble none
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestStep set listen-port property to a wrong value
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestStep restart the server
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestStep check that an error message is displayed at
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestStep check status using status command
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestStep restore value for listen-port property
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestStep disable the SNMP connection handler
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestStep enable the SNMP connection handler
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestPostamble none
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestResult Success if an error message is displayed and
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams if the output of status is correct.
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <function name="snmp_basic_017" scope="local">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <testcase name="getTestCaseName('Status with a wrong listen-port value')">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams if is_windows_platform(STAF_REMOTE_HOSTNAME) or IPS_PKG:
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Set the listen-port to a wrong value' }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'subcommand' : 'set-connection-handler-prop' ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'objectType' : 'handler-name' ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'objectName' : 'SNMP Connection Handler' ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'optionsString' : '--set listen-port:%s' \
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams % DEFAULT_PROPERTIES['listen-port']
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Restart DS running on port %s' % (DIRECTORY_INSTANCE_PORT) }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'location' : STAF_REMOTE_HOSTNAME ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsHost' : DIRECTORY_INSTANCE_HOST ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsAdminPort' : DIRECTORY_INSTANCE_ADMIN_PORT ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsBindDN' : DIRECTORY_INSTANCE_DN ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsBindPwd' : DIRECTORY_INSTANCE_PSWD
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'location' : STAF_REMOTE_HOSTNAME }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'noOfLoops' : 10 ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'noOfMilliSeconds' : 2000
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams msg1 = 'Cannot initialize the SNMP Connection Handler.'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams msg2 = 'Please check the configuration attributes'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams msg = '%s %s' % (msg1, msg2)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'location' : STAF_REMOTE_HOSTNAME ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'filename' : serverLogFile ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'testString': msg
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Get status when the server is started' }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsBindDN' : DIRECTORY_INSTANCE_DN ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsBindPwd' : DIRECTORY_INSTANCE_PSWD
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams returnString = STAXResult[0][1]
ca5f476ebacf0684605124c0410d08604231adddcsovant 'expectedString' : '0.0.0.0:%s\\s+:\\s+SNMP\\s+:\\s+Enabled' \
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams % DEFAULT_PROPERTIES['listen-port'] ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'returnString' : returnString ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'expectedRC' : 0
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Send SNMP Get request' }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpVersion' : '1',
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpHost' : DIRECTORY_INSTANCE_HOST ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpPort' : SNMP_PORT ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpCommunity' : community ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpOIDs' : oid ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'snmpStatus' : 'reqTimeout'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Restore value for listen-port property' }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'subcommand' : 'set-connection-handler-prop' ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'objectType' : 'handler-name' ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'objectName' : 'SNMP Connection Handler' ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'optionsString' : '--set listen-port:%s' \
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams % SNMP_PROPERTIES['listen-port']
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams { 'stepMessage' : 'Restart the SNMP Connection Handler' }
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <call function="'restartSNMPConnectionHandler'">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <message>'This testcase is not relevant on Windows'</message>
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <catch exception="'STAXException'" typevar="eType" var="eInfo">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams '%s: Test failed. eInfo(%s)' % (eType,eInfo)