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
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams ! 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 2012 ForgeRock AS.
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <function name="main_snmp_basic" scope="local">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams CurrentTestPath['group']='snmp'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams CurrentTestPath['suite']='basic'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams __group=CurrentTestPath['group']
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams __groupdir='%s/testcases/%s' % (TESTS_DIR,__group)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <!--- Test Suite information
43bf76bf2b91e118020827965994382f0f3f4b90gary.williams #@TestSuiteName SNMP basic test suite
43bf76bf2b91e118020827965994382f0f3f4b90gary.williams #@TestSuitePurpose Verify basic SNMP operations
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestSuiteID basic
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestSuiteGroup snmp
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams #@TestGroup snmp
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <!-- List of Import of Test Functions -->
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams importList=[]
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <!-- Import the files for this test suite -->
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams file="'%s/%s.xml' % (__groupdir,__import)"/>
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <!-- Specific to basic SNMP tests -->
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams global_DEFAULT_VALUES = STAXGlobal([])
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams global_indexLDAP = STAXGlobal([])
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams # Default Properties
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams EXPECTED_PROPERTIES = {}
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams EXPECTED_PROPERTIES['allowed-client'] = ''
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams EXPECTED_PROPERTIES['allowed-manager'] = '*'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams EXPECTED_PROPERTIES['allowed-user'] = '*'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams EXPECTED_PROPERTIES['community'] = 'OpenDJ'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams EXPECTED_PROPERTIES['denied-client'] = ''
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams EXPECTED_PROPERTIES['enabled'] = 'false'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams EXPECTED_PROPERTIES['listen-address'] = '0.0.0.0'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams EXPECTED_PROPERTIES['listen-port'] = '161'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams EXPECTED_PROPERTIES['opendmk-jarfile'] = ''
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams EXPECTED_PROPERTIES['registered-mbean'] = 'false'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams file = 'config/snmp/security/opendj-snmp.security'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams EXPECTED_PROPERTIES['security-agent-file'] = '%s' % file
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams EXPECTED_PROPERTIES['security-level'] = 'authnopriv'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams EXPECTED_PROPERTIES['trap-port'] = '162'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams EXPECTED_PROPERTIES['traps-community'] = 'OpenDJ'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams EXPECTED_PROPERTIES['traps-destination'] = ''
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams community = '%s@%s' \
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams % (SNMP_PROPERTIES['community'], SNMP_PROPERTIES['community'])
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams # Register Mbeans
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams refRegisteredMbeanProp = SNMP_PROPERTIES['registered-mbean']
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams defCommunityProp = SNMP_PROPERTIES['community']
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams defCommunity = '%s@%s' %(defCommunityProp, defCommunityProp)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams oid = 'dsServerType.1'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams community = '%s@%s' \
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams % (SNMP_PROPERTIES['community'], SNMP_PROPERTIES['community'])
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams oid = 'dsServerType.1'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams % (DIRECTORY_INSTANCE_DIR, OPENDSNAME)
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <!-- List of Test Cases -->
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams testsList.append('snmp_basic_001')
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams testsList.append('snmp_basic_002')
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams testsList.append('snmp_basic_003')
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams testsList.append('snmp_basic_004')
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams testsList.append('snmp_basic_005')
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams testsList.append('snmp_basic_006')
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams testsList.append('snmp_basic_007')
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams testsList.append('snmp_basic_008')
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams testsList.append('snmp_basic_009')
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams testsList.append('snmp_basic_010')
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams testsList.append('snmp_basic_011')
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams testsList.append('snmp_basic_012')
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams testsList.append('snmp_basic_013')
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams testsList.append('snmp_basic_014')
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams testsList.append('snmp_basic_015')
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams testsList.append('snmp_basic_016')
8b3e8d85ef83085331ece165c9e41680ba8f6a9dgary.williams if get_system_uid() != "root":
35a911a8e0759b1604c49c16924a10761423781dgary.williams testsList.append('snmp_basic_017')
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <!-- Execute the Tests -->
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <catch exception="'STAFException.TestSuite.SetupException'">
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams 'Setup of test suite failed.'
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <!-- Test Suite Cleanup -->
21d225782e5e4cc8e40d1fdd364430570ac2dd09gary.williams <message log="1" level="'fatal'">'Cleanup of test suite failed.'</message>