mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Christophe Sovant
01.26.2008 1c91e7852529eda5aa25217f727edf58fe9eb9dd
Enable snmp/snmp_mibvalues testsuite
4 files modified
490 ■■■■ changed files
opendj-sdk/opends/tests/functional-tests/testcases/snmp/snmp.xml 2 ●●● patch | view | raw | blame | history
opendj-sdk/opends/tests/functional-tests/testcases/snmp/snmp_mibvalues.xml 470 ●●●● patch | view | raw | blame | history
opendj-sdk/opends/tests/shared/functions/snmp.xml 8 ●●●● patch | view | raw | blame | history
opendj-sdk/opends/tests/shared/python/snmp.py 10 ●●●● patch | view | raw | blame | history
opendj-sdk/opends/tests/functional-tests/testcases/snmp/snmp.xml
@@ -63,7 +63,7 @@
            testList.append(['.','snmp_v2c_defaultconf'])
            testList.append(['.','snmp_v3_defaultconf'])
            testList.append(['.','snmp_trap_defaultconf'])
            #testList.append(['.','snmp_mibvalues'])
            testList.append(['.','snmp_mibvalues'])
            testList.append(['.','snmp_v1_customconf'])
            testList.append(['.','snmp_v2c_customconf'])
            testList.append(['.','snmp_v3_customconf'])
opendj-sdk/opends/tests/functional-tests/testcases/snmp/snmp_mibvalues.xml
@@ -60,6 +60,7 @@
          <script>
            community = '%s@%s' \
            % (SNMP_PROPERTIES['community'], SNMP_PROPERTIES['community'])
            nbLoop = 10
          </script>
          
          <!--- Test Case information
@@ -73,14 +74,14 @@
            #@TestResult          TODO.
          -->
          <testcase name="getTestCaseName
          ('snmp_mibvalues: check the number of connection handler')">
          ('snmp_mibvalues: check the connection handlers')">
            <sequence>
              <call function="'testCase_Preamble'"/>
              <message>
                'snmp_mibvalues: check the number of connection handler'
                'snmp_mibvalues: save the snmp values'
              </message>
              <call function="'SNMPGet'">
@@ -97,17 +98,30 @@
              <script>
                DEFAULT_VALUES = create_table_fromoutput(STAXResult[0][1])
                nbHandler = get_handler_count(DEFAULT_VALUES)
                indexLDAP = get_handler_index(DEFAULT_VALUES, '1.3.6.1.27.3.%s'\
                                         % DIRECTORY_INSTANCE_PORT)
              </script>
              
              <if expr="nbHandler == 3">
              <message>
                'snmp_mibvalues: check the connection handlers'
              </message>
              <script>
                nbHandler = get_handler_count(DEFAULT_VALUES)
                indexSNMP = get_handler_index(DEFAULT_VALUES, '1.3.6.1.27.3.%s'\
                                         % SNMP_PORT)
                indexLDAP = get_handler_index(DEFAULT_VALUES, '1.3.6.1.27.3.%s'\
                                         % DIRECTORY_INSTANCE_PORT)
                indexLDIF = get_handler_index(DEFAULT_VALUES, '1.3.6.1.4.1.42')
              </script>
              <if expr="nbHandler == 3 and indexSNMP != 0 and indexLDAP != 0 and indexLDIF != 0">
                <sequence>
                  <script>
                    msg1 = 'The number of connection handler is correct.\n'
                    msg2 = 'Current value: %s' % nbHandler
                    msg = '%s%s' % (msg1, msg2)
                    msg1 = 'The connection handlers info are correct.\n'
                    msg2 = 'number of hanlder: %s\n' % nbHandler
                    msg3 = 'index SNMP hanlder: %s\n' % indexSNMP
                    msg4 = 'index LDAP hanlder: %s\n' % indexLDAP
                    msg5 = 'index LDIF hanlder: %s\n' % indexLDIF
                    msg = '%s%s%s%s%s' % (msg1, msg2, msg3, msg4, msg5)
                  </script>
                  <message>
                    '%s' % msg
@@ -117,10 +131,12 @@
                <else>
                  <sequence>
                    <script>
                      msg1 = 'The number of connection handler is wrong.\n'
                      msg2 = 'Expected value: 3\n'
                      msg3 = 'Current value: %s' % nbHandler
                      msg = '%s%s%s' % (msg1, msg2, msg3)
                      msg1 = 'The connection handlers info are wrong.\n'
                      msg2 = 'number of hanlder: %s/3\n' % nbHandler
                      msg3 = 'index SNMP hanlder: %s\n' % indexSNMP
                      msg4 = 'index LDAP hanlder: %s\n' % indexLDAP
                      msg5 = 'index LDIF hanlder: %s' % indexLDIF
                      msg = '%s%s%s%s%s' % (msg1, msg2, msg3, msg4, msg5)
                    </script>
                    <message>
                      '%s' % msg
@@ -159,8 +175,10 @@
              <script>
                dsServerType = DEFAULT_VALUES['dsServerType.1']
                dsVersion = DSInfo.getServerVersion(DSInfo.ServerDict['server version'])
                dsBuild = DSInfo.getServerBuildId(DSInfo.ServerDict['server buildid'])
                version = DSInfo.ServerDict['server version']
                dsVersion = DSInfo.getServerVersion(version)
                build = DSInfo.ServerDict['server buildid']
                dsBuild = DSInfo.getServerBuildId(build)
                dsServer = 'OpenDS Directory Server %s - %s' \
                           % (dsVersion, dsBuild)
              </script>
@@ -277,42 +295,83 @@
              <call function="'testCase_Preamble'"/>
              <message>
                'snmp_mibvalues: check value of dsApplIfSearchOps entry'
                'snmp_mibvalues: do %s search operation' % nbLoop
              </message>
              <loop var="loop" from="1" to="nbLoop">
                <sequence>
              <script>
                dn = 'uid=user.2,o=snmp tests,dc=example,dc=com'
                    id = 700 + loop
                    userDn = 'uid=user.%s,o=snmp tests,dc=example,dc=com' % id
              </script>
              <call function="'ldapCompareWithScript'">
                  <message>
                    'LOOP %s: %s' % (loop, userDn)
                  </message>
                  <call function="'ldapSearchWithScript'">
                {
                'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                'dsDn'             : ['postalCode:64447' ,
                                      '%s' % dn] ,
                'expectedRC'       : 'noCheck'
                    'dsTypesOnly'      : 'True' ,
                    'dsBaseDN'         : 'dc=com' ,
                    'dsFilter'         : userDn
                }
              </call>
              <!--- Increment default values -->
                </sequence>
              </loop>
              <message>
                'snmp_mibvalues: increment the snmp values'
              </message>
              <script>
                key = 'dsApplIfReadOps.%s' % indexLDAP
                DEFAULT_VALUES[key] = \
                  str(int(DEFAULT_VALUES[key]) + 1)
                  str(int(DEFAULT_VALUES[key]) + nbLoop)
                key = 'dsApplIfSearchOps.%s' % indexLDAP
                DEFAULT_VALUES[key] = \
                  str(int(DEFAULT_VALUES[key]) + 1)
                  str(int(DEFAULT_VALUES[key]) + nbLoop)
              </script>
              
              <message>
                'snmp_mibvalues: check value of dsApplIfSearchOps entry'
              </message>
              <call function="'compareSNMPValues'">
                {
                'snmpHost'      : DIRECTORY_INSTANCE_HOST ,
                'snmpPort'      : SNMP_PORT ,
                'snmpCommunity' : community
                'snmpCommunity' : community ,
                'index'         : indexLDAP
                }
              </call>
              <message>
                'snmp_mibvalues: save the snmp values'
              </message>
              <call function="'SNMPGet'">
                {
                'snmpVersion'   : '1',
                'snmpHost'      : DIRECTORY_INSTANCE_HOST ,
                'snmpPort'      : SNMP_PORT ,
                'snmpCommunity' : community ,
                'snmpOIDs'      : '' ,
                'snmpStatus'    : 'noError' ,
                'snmpWalk'      : 'True'
                }
              </call>
              <script>
                DEFAULT_VALUES = {}
                DEFAULT_VALUES = create_table_fromoutput(STAXResult[0][1])
              </script>
              <call function="'testCase_Postamble'"/>
            </sequence>
@@ -337,42 +396,94 @@
              <call function="'testCase_Preamble'"/>
              <message>
                'snmp_mibvalues: check value of dsApplIfAddEntryOps entry'
                'snmp_mibvalues: do %s add operations' % nbLoop
              </message>
              <loop var="loop" from="1" to="nbLoop">
                <sequence>
              <script>
                dn = 'uid=user.2,o=snmp tests,dc=example,dc=com'
                    id = 1000 + loop
                    userDn = 'uid=user.%s,o=snmp tests,dc=example,dc=com' % id
                    listAttr = []
                    listAttr.append('objectclass:top')
                    listAttr.append('objectclass:organizationalperson')
                    listAttr.append('objectclass:inetorgperson')
                    listAttr.append('objectclass:person')
                    listAttr.append('givenname:Izen.0')
                    listAttr.append('sn:Abizen.0')
                    listAttr.append('cn:Izen Abizen.0')
                    listAttr.append('l:ICNC')
              </script>
              <call function="'ldapCompareWithScript'">
                  <message>
                    'LOOP %s: %s' % (loop, userDn)
                  </message>
                  <call function="'addAnEntry'">
                {
                'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                'dsDn'             : ['postalCode:64447' ,
                                      '%s' % dn] ,
                'expectedRC'       : 'noCheck'
                    'DNToAdd'          : userDn,
                    'listAttributes'   : listAttr
                }
              </call>
              <!--- Increment default values -->
                </sequence>
              </loop>
              <message>
                'snmp_mibvalues: increment the snmp values'
              </message>
              <script>
                key = 'dsApplIfReadOps.%s' % indexLDAP
                DEFAULT_VALUES[key] = \
                  str(int(DEFAULT_VALUES[key]) + 1)
                  str(int(DEFAULT_VALUES[key]) + nbLoop)
                key = 'dsApplIfAddEntryOps.%s' % indexLDAP
                DEFAULT_VALUES[key] = \
                  str(int(DEFAULT_VALUES[key]) + 1)
                  str(int(DEFAULT_VALUES[key]) + nbLoop)
                DEFAULT_VALUES['dsMasterEntries.1'] = \
                  str(int(DEFAULT_VALUES['dsMasterEntries.1']) + nbLoop)
              </script>
              
              <message>
                'snmp_mibvalues: check value of dsApplIfAddEntryOps entry'
              </message>
              <call function="'compareSNMPValues'">
                {
                'snmpHost'      : DIRECTORY_INSTANCE_HOST ,
                'snmpPort'      : SNMP_PORT ,
                'snmpCommunity' : community
                'snmpCommunity' : community ,
                'index'         : indexLDAP
                }
              </call>
              <message>
                'snmp_mibvalues: save the snmp values'
              </message>
              <call function="'SNMPGet'">
                {
                'snmpVersion'   : '1',
                'snmpHost'      : DIRECTORY_INSTANCE_HOST ,
                'snmpPort'      : SNMP_PORT ,
                'snmpCommunity' : community ,
                'snmpOIDs'      : '' ,
                'snmpStatus'    : 'noError' ,
                'snmpWalk'      : 'True'
                }
              </call>
              <script>
                DEFAULT_VALUES = {}
                DEFAULT_VALUES = create_table_fromoutput(STAXResult[0][1])
              </script>
              <call function="'testCase_Postamble'"/>
            </sequence>
@@ -397,42 +508,83 @@
              <call function="'testCase_Preamble'"/>
              <message>
                'snmp_mibvalues: check value of dsApplIfRemoveEntryOps entry'
                'snmp_mibvalues: do %s remove operations' % nbLoop
              </message>
              <loop var="loop" from="1" to="nbLoop">
                <sequence>
              <script>
                dn = 'uid=user.2,o=snmp tests,dc=example,dc=com'
                    id = 1000 + loop
                    userDn = 'uid=user.%s,o=snmp tests,dc=example,dc=com' % id
              </script>
              <call function="'ldapCompareWithScript'">
                  <message>
                    'LOOP %s: %s' % (loop, userDn)
                  </message>
                  <call function="'ldapDeleteWithScript'">
                {
                'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                'dsDn'             : ['postalCode:64447' ,
                                      '%s' % dn] ,
                'expectedRC'       : 'noCheck'
                    'dsDn'             : ['%s' % userDn]
                }
              </call>
              <!--- Increment default values -->
                </sequence>
              </loop>
              <message>
                'snmp_mibvalues: increment the snmp values'
              </message>
              <script>
                key = 'dsApplIfReadOps.%s' % indexLDAP
                DEFAULT_VALUES[key] = \
                  str(int(DEFAULT_VALUES[key]) + 1)
                  str(int(DEFAULT_VALUES[key]) + nbLoop)
                key = 'dsApplIfRemoveEntryOps.%s' % indexLDAP
                DEFAULT_VALUES[key] = \
                  str(int(DEFAULT_VALUES[key]) + 1)
                  str(int(DEFAULT_VALUES[key]) + nbLoop)
                DEFAULT_VALUES['dsMasterEntries.1'] = \
                  str(int(DEFAULT_VALUES['dsMasterEntries.1']) - nbLoop)
              </script>
              
              <message>
                'snmp_mibvalues: check value of dsApplIfRemoveEntryOps entry'
              </message>
              <call function="'compareSNMPValues'">
                {
                'snmpHost'      : DIRECTORY_INSTANCE_HOST ,
                'snmpPort'      : SNMP_PORT ,
                'snmpCommunity' : community
                'snmpCommunity' : community ,
                'index'         : indexLDAP
                }
              </call>
              <message>
                'snmp_mibvalues: save the snmp values'
              </message>
              <call function="'SNMPGet'">
                {
                'snmpVersion'   : '1',
                'snmpHost'      : DIRECTORY_INSTANCE_HOST ,
                'snmpPort'      : SNMP_PORT ,
                'snmpCommunity' : community ,
                'snmpOIDs'      : '' ,
                'snmpStatus'    : 'noError' ,
                'snmpWalk'      : 'True'
                }
              </call>
              <script>
                DEFAULT_VALUES = {}
                DEFAULT_VALUES = create_table_fromoutput(STAXResult[0][1])
              </script>
              <call function="'testCase_Postamble'"/>
            </sequence>
@@ -457,42 +609,82 @@
              <call function="'testCase_Preamble'"/>
              <message>
                'snmp_mibvalues: check value of dsApplIfCompareOps entry'
                'snmp_mibvalues: do %s compare operations' % nbLoop
              </message>
              <loop var="loop" from="1" to="nbLoop">
                <sequence>
              <script>
                dn = 'uid=user.2,o=snmp tests,dc=example,dc=com'
                    id = 0 + loop
                    userDn = 'uid=user.%s,o=snmp tests,dc=example,dc=com' % id
              </script>
                  <message>
                    'LOOP %s: %s' % (loop, userDn)
                  </message>
              <call function="'ldapCompareWithScript'">
                {
                'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                'dsDn'             : ['postalCode:64447' ,
                                      '%s' % dn] ,
                    'dsDn'             : ['postalCode:64447', '%s' % userDn] ,
                'expectedRC'       : 'noCheck'
                }
              </call>
              <!--- Increment default values -->
                </sequence>
              </loop>
              <message>
                'snmp_mibvalues: increment the snmp values'
              </message>
              <script>
                key = 'dsApplIfReadOps.%s' % indexLDAP
                DEFAULT_VALUES[key] = \
                  str(int(DEFAULT_VALUES[key]) + 1)
                  str(int(DEFAULT_VALUES[key]) + nbLoop)
                key = 'dsApplIfCompareOps.%s' % indexLDAP
                DEFAULT_VALUES[key] = \
                  str(int(DEFAULT_VALUES[key]) + 1)
                  str(int(DEFAULT_VALUES[key]) + nbLoop)
              </script>
              
              <message>
                'snmp_mibvalues: check value of dsApplIfCompareOps entry'
              </message>
              <call function="'compareSNMPValues'">
                {
                'snmpHost'      : DIRECTORY_INSTANCE_HOST ,
                'snmpPort'      : SNMP_PORT ,
                'snmpCommunity' : community
                'snmpCommunity' : community ,
                'index'         : indexLDAP
                }
              </call>
              <message>
                'snmp_mibvalues: save the snmp values'
              </message>
              <call function="'SNMPGet'">
                {
                'snmpVersion'   : '1',
                'snmpHost'      : DIRECTORY_INSTANCE_HOST ,
                'snmpPort'      : SNMP_PORT ,
                'snmpCommunity' : community ,
                'snmpOIDs'      : '' ,
                'snmpStatus'    : 'noError' ,
                'snmpWalk'      : 'True'
                }
              </call>
              <script>
                DEFAULT_VALUES = {}
                DEFAULT_VALUES = create_table_fromoutput(STAXResult[0][1])
              </script>
              <call function="'testCase_Postamble'"/>
            </sequence>
@@ -517,42 +709,84 @@
              <call function="'testCase_Preamble'"/>
              <message>
                'snmp_mibvalues: check value of dsApplIfModifyEntryOps entry'
                'snmp_mibvalues: do %s modify operations' % nbLoop
              </message>
              <loop var="loop" from="1" to="nbLoop">
                <sequence>
              <script>
                dn = 'uid=user.2,o=snmp tests,dc=example,dc=com'
                    id = 400 + loop
                    userDn = 'uid=user.%s,o=snmp tests,dc=example,dc=com' % id
              </script>
              <call function="'ldapCompareWithScript'">
                  <message>
                    'LOOP %s: %s' % (loop, userDn)
                  </message>
                  <call function="'modifyAnAttribute'">
                {
                'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                'dsDn'             : ['postalCode:64447' ,
                                      '%s' % dn] ,
                'expectedRC'       : 'noCheck'
                    'DNToModify'         : userDn ,
                    'attributeName'      : 'postalCode' ,
                    'newAttributeValue'  : '%s' % id ,
                    'changetype'         : 'replace'
                }
              </call>
              <!--- Increment default values -->
                </sequence>
              </loop>
              <message>
                'snmp_mibvalues: increment the snmp values'
              </message>
              <script>
                key = 'dsApplIfReadOps.%s' % indexLDAP
                DEFAULT_VALUES[key] = \
                  str(int(DEFAULT_VALUES[key]) + 1)
                  str(int(DEFAULT_VALUES[key]) + nbLoop)
                key = 'dsApplIfModifyEntryOps.%s' % indexLDAP
                DEFAULT_VALUES[key] = \
                  str(int(DEFAULT_VALUES[key]) + 1)
                  str(int(DEFAULT_VALUES[key]) + nbLoop)
              </script>
              
              <message>
                'snmp_mibvalues: check value of dsApplIfModifyEntryOps entry'
              </message>
              <call function="'compareSNMPValues'">
                {
                'snmpHost'      : DIRECTORY_INSTANCE_HOST ,
                'snmpPort'      : SNMP_PORT ,
                'snmpCommunity' : community
                'snmpCommunity' : community ,
                'index'         : indexLDAP
                }
              </call>
              <message>
                'snmp_mibvalues: save the snmp values'
              </message>
              <call function="'SNMPGet'">
                {
                'snmpVersion'   : '1',
                'snmpHost'      : DIRECTORY_INSTANCE_HOST ,
                'snmpPort'      : SNMP_PORT ,
                'snmpCommunity' : community ,
                'snmpOIDs'      : '' ,
                'snmpStatus'    : 'noError' ,
                'snmpWalk'      : 'True'
                }
              </call>
              <script>
                DEFAULT_VALUES = {}
                DEFAULT_VALUES = create_table_fromoutput(STAXResult[0][1])
              </script>
              <call function="'testCase_Postamble'"/>
            </sequence>
@@ -577,42 +811,132 @@
              <call function="'testCase_Preamble'"/>
              <message>
                'snmp_mibvalues: check value of dsApplIfModifyRDNOps entry'
                'snmp_mibvalues: do %s modify RDN operations' % nbLoop
              </message>
              <loop var="loop" from="1" to="nbLoop">
                <sequence>
                  <!--- Create a ldif file for moddn -->
              <script>
                dn = 'uid=user.2,o=snmp tests,dc=example,dc=com'
                    id = 800 + loop
                    userDn = 'uid=user.%s,o=snmp tests,dc=example,dc=com' % id
                    newid = 2000 + loop
                    newDn = 'uid=user.%s' % newid
                    templateFile = 'template.ldif'
                    templatePath = '%s/%s' % (TMPDIR, templateFile)
                    ldifFile = 'moddn.ldif'
                    ldifPath = '%s/%s' % (DIRECTORY_INSTANCE_DIR, ldifFile)
                    ldifLines = []
                    ldifLines.append('dn: %s' % userDn)
                    ldifLines.append('changetype: moddn')
                    ldifLines.append('newRDN: %s' % newDn)
                    ldifLines.append('deleteOldRDN: 1')
                    outFile = open(templatePath, "w")
                    for line in ldifLines:
                      outFile.write("%s\n" % line)
                    outFile.close()
              </script>
              <call function="'ldapCompareWithScript'">
                  <message>
                    'LOOP %s: %s => %s' % (loop, userDn, newDn)
                  </message>
                  <!--- Copy file to remote host -->
                  <message>
                    'Copy %s to %s on %s' \
                    % (templateFile,DIRECTORY_INSTANCE_DIR,STAF_REMOTE_HOSTNAME)
                  </message>
                  <call function="'copyFile'">
                    {
                    'srcfile'    : templatePath ,
                    'destfile'   : ldifPath ,
                    'remotehost' : STAF_REMOTE_HOSTNAME
                    }
                  </call>
                  <call function="'ldapModifyWithScript'">
                {
                'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                'dsDn'             : ['postalCode:64447' ,
                                      '%s' % dn] ,
                'expectedRC'       : 'noCheck'
                    'dsFilename'       : ldifPath
                }
              </call>
              <!--- Increment default values -->
                  <!--- Delete the ldif file used for moddn on remote host -->
                  <message>
                    'Delete %s on %s' % (ldifPath, STAF_REMOTE_HOSTNAME)
                  </message>
                  <call function="'deleteFile'">
                    {
                    'location' : STAF_REMOTE_HOSTNAME ,
                    'filename' : ldifPath
                    }
                  </call>
                </sequence>
              </loop>
              <!--- Delete locally the ldif file used for moddn -->
              <message>
                'Delete locally %s' % templatePath
              </message>
              <call function="'deleteFile'">
                {
                'location' : STAXServiceMachine ,
                'filename' : templatePath
                }
              </call>
              <message>
                'snmp_mibvalues: increment the snmp values'
              </message>
              <script>
                key = 'dsApplIfReadOps.%s' % indexLDAP
                DEFAULT_VALUES[key] = \
                  str(int(DEFAULT_VALUES[key]) + 1)
                  str(int(DEFAULT_VALUES[key]) + nbLoop)
                key = 'dsApplIfModifyRDNOps.%s' % indexLDAP
                DEFAULT_VALUES[key] = \
                  str(int(DEFAULT_VALUES[key]) + 1)
                  str(int(DEFAULT_VALUES[key]) + nbLoop)
              </script>
              
              <message>
                'snmp_mibvalues: check value of dsApplIfModifyRDNOps entry'
              </message>
              <call function="'compareSNMPValues'">
                {
                'snmpHost'      : DIRECTORY_INSTANCE_HOST ,
                'snmpPort'      : SNMP_PORT ,
                'snmpCommunity' : community
                'snmpCommunity' : community ,
                'index'         : indexLDAP
                }
              </call>
              <message>
                'snmp_mibvalues: save the snmp values'
              </message>
              <call function="'SNMPGet'">
                {
                'snmpVersion'   : '1',
                'snmpHost'      : DIRECTORY_INSTANCE_HOST ,
                'snmpPort'      : SNMP_PORT ,
                'snmpCommunity' : community ,
                'snmpOIDs'      : '' ,
                'snmpStatus'    : 'noError' ,
                'snmpWalk'      : 'True'
                }
              </call>
              <script>
                DEFAULT_VALUES = {}
                DEFAULT_VALUES = create_table_fromoutput(STAXResult[0][1])
              </script>
              <call function="'testCase_Postamble'"/>
            </sequence>
opendj-sdk/opends/tests/shared/functions/snmp.xml
@@ -645,6 +645,12 @@
        </function-arg-description>
        <function-arg-property name="type" value="string"/>
      </function-arg-def>
      <function-arg-def name="index" type="required">
        <function-arg-description>
          Index for the out/in bytes check
        </function-arg-description>
        <function-arg-property name="type" value="string"/>
      </function-arg-def>
      <function-arg-def name="expectedRC" type="optional" default="0">
        <function-arg-description>
          Expected return code value. Default value is 0
@@ -677,7 +683,7 @@
        CURRENT_VALUES = {}
        CURRENT_VALUES = create_table_fromoutput(STAXResult[0][1])
        result = compare_snmp_values(DEFAULT_VALUES, CURRENT_VALUES)
        result = compare_snmp_values(DEFAULT_VALUES, CURRENT_VALUES, index)
      </script>
      <message>
opendj-sdk/opends/tests/shared/python/snmp.py
@@ -50,7 +50,7 @@
    return table
def compare_snmp_values(refTable, newTable):
def compare_snmp_values(refTable, newTable, index):
    import re
    result = ''
@@ -70,10 +70,10 @@
        result = result + refKey + '=> expected: ' + refTable[refKey] 
        result = result + ' , result: ' + newTable[refKey] + '\n'
      pattern1 = re.compile('dsApplIfOutBytes.*')
      pattern2 = re.compile('dsApplIfInBytes.*')
      if pattern1.search(refKey) != None or pattern2.search(refKey) != None:
        if refTable[refKey] > newTable[refKey]:
      pattern1 = 'dsApplIfOutBytes.%s' % index
      pattern2 = 'dsApplIfInBytes.%s' % index
      if refKey == pattern1 or refKey == pattern2:
        if int(newTable[refKey]) <= int(refTable[refKey]):
          result = result + 'ERROR: Value for ' + refKey 
          result = result + ' should be greater.\n'
      else: