<?
xml version="1.0" encoding="UTF-8" standalone="no"?>
! The contents of this file are subject to the terms of the ! Common Development and Distribution License, Version 1.0 only ! (the "License"). You may not use this file except in compliance ! You can obtain a copy of the license at ! See the License for the specific language governing permissions ! and limitations under the License. ! When distributing Covered Code, include this CDDL HEADER in each ! file and include the License file at ! add the following below this CDDL HEADER, with the fields enclosed ! by brackets "[]" replaced with your own identifying information: ! Portions Copyright [yyyy] [name of copyright owner] ! Copyright 2008 Sun Microsystems, Inc. <
defaultcall function="monitoring_provider"/>
<
function name="monitoring_provider" scope="local">
<
block name="STAXCurrentFunction">
CurrentTestPath['suite']=STAXCurrentFunction
<
call function="'testSuite_Preamble'" />
<!--- Test Suite information #@TestSuiteName Monitoring Provider Tests #@TestSuitePurpose Verify the monitoring Provider #@TestSuiteID Monitoring Provider #@TestSuiteGroup Monitoring #@TestMarker Monitoring Provider Tests #@TestName Client Connections monitoring Provider #@TestPurpose Test the Client Connections monitoring Provider #@TestStep Check the entry on cn=Client Connections,cn=monitor is available #@TestStep Disable the Client Connections monitoring Provider #@TestStep Check the entry on cn=Client Connections,cn=monitor is not more available <
testcase name="getTestCaseName('Client Connections monitoring Provider')">
<
call function="'testCase_Preamble'"/>
<!-- Check the entry on cn=Client Connections,cn=monitor is available --> <
message>'###### Monitor the Client Connections ###### '</
message>
<
call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : 'cn=Client Connections,cn=monitor',
'dsFilter' : 'objectclass=*',
<
message>'-- Disable the Client Connections monitor provider --'</
message>
<
call function="'dsconfig'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'subcommand' : 'set-monitor-provider-prop' ,
'objectType' : 'provider-name',
'objectName' : 'Client Connections',
'optionsString' : '--set enabled:false',
<!-- Check the entry on cn=Client Connections,cn=monitor is not available --> <
message>'###### Monitor the Client Connections ###### '</
message>
<
call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : 'cn=Client Connections,cn=monitor',
'dsFilter' : 'objectclass=*',
<
call function="'testCase_Postamble'"/>
#@TestMarker Monitoring Provider Tests #@TestName Entry Caches monitoring Provider #@TestPurpose Test the Entry Caches monitoring Provider #@TestStep Check the entry on cn=Entry Caches,cn=monitor is available #@TestStep Disable the Entry Caches monitoring Provider #@TestStep Check the entry on cn=Entry Caches,cn=monitor is not more available <
testcase name="getTestCaseName('Entry Caches monitoring Provider')">
<
call function="'testCase_Preamble'"/>
<!-- Check the entry on cn=Entry Caches,cn=monitor is available --> <
message>'###### Monitor the Entry Caches ###### '</
message>
<
call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : 'cn=Entry Caches,cn=monitor',
'dsFilter' : 'objectclass=*',
<
message>'-- Disable the Entry Caches monitor provider --'</
message>
<
call function="'dsconfig'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'subcommand' : 'set-monitor-provider-prop' ,
'objectType' : 'provider-name',
'objectName' : 'Entry Caches',
'optionsString' : '--set enabled:false',
<!-- Check the entry on cn=Entry Caches,cn=monitor is not available --> <
message>'###### Monitor the Entry Caches ###### '</
message>
<
call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : 'cn=Entry Caches,cn=monitor',
'dsFilter' : 'objectclass=*',
<
call function="'testCase_Postamble'"/>
#@TestMarker Monitoring Provider Tests #@TestName JVM Memory Usage monitoring Provider #@TestPurpose Test the JVM Memory Usage monitoring Provider #@TestStep Check the entry on cn=JVM Memory Usage,cn=monitor is available #@TestStep Disable the JVM Memory Usage monitoring Provider #@TestStep Check the entry on cn=JVM Memory Usage,cn=monitor is not more available <
testcase name="getTestCaseName('JVM Memory Usage monitoring Provider')">
<
call function="'testCase_Preamble'"/>
<!-- Check the entry on cn=JVM Memory Usage,cn=monitor is available --> <
message>'###### Monitor the JVM Memory Usage ###### '</
message>
<
call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : 'cn=JVM Memory Usage,cn=monitor',
'dsFilter' : 'objectclass=*',
<
message>'-- Disable the JVM Memory Usage monitor provider --'</
message>
<
call function="'dsconfig'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'subcommand' : 'set-monitor-provider-prop' ,
'objectType' : 'provider-name',
'objectName' : 'JVM Memory Usage',
'optionsString' : '--set enabled:false',
<!-- Check the entry on cn=JVM Memory Usage,cn=monitor is not available --> <
message>'###### Monitor the JVM Memory Usage ###### '</
message>
<
call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : 'cn=JVM Memory Usage,cn=monitor',
'dsFilter' : 'objectclass=*',
<
call function="'testCase_Postamble'"/>
#@TestMarker Monitoring Provider Tests #@TestName JVM Stack Trace monitoring Provider #@TestPurpose Test the JVM Stack Trace monitoring Provider #@TestStep Check the entry on cn=JVM Stack Trace,cn=monitor is available #@TestStep Disable the JVM Stack Trace monitoring Provider #@TestStep Check the entry on cn=JVM Stack Trace,cn=monitor is not more available <
testcase name="getTestCaseName('JVM Stack Trace monitoring Provider')">
<
call function="'testCase_Preamble'"/>
<!-- Check the entry on cn=JVM Stack Trace,cn=monitor is available --> <
message>'###### Monitor the JVM Stack Trace ###### '</
message>
<
call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : 'cn=JVM Stack Trace,cn=monitor',
'dsFilter' : 'objectclass=*',
<
message>'-- Disable the JVM Stack Trace monitor provider --'</
message>
<
call function="'dsconfig'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'subcommand' : 'set-monitor-provider-prop' ,
'objectType' : 'provider-name',
'objectName' : 'JVM Stack Trace',
'optionsString' : '--set enabled:false',
<!-- Check the entry on cn=JVM Stack Trace,cn=monitor is not available --> <
message>'###### Monitor the JVM Stack Trace ###### '</
message>
<
call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : 'cn=JVM Stack Trace,cn=monitor',
'dsFilter' : 'objectclass=*',
<
call function="'testCase_Postamble'"/>
#@TestMarker Monitoring Provider Tests #@TestName System Info monitoring Provider #@TestPurpose Test the System Info monitoring Provider #@TestStep Check the entry on cn=System Info,cn=monitor is available #@TestStep Disable the System Info monitoring Provider #@TestStep Check the entry on cn=System Info,cn=monitor is not more available <
testcase name="getTestCaseName('System Info monitoring Provider')">
<
call function="'testCase_Preamble'"/>
<!-- Check the entry on cn=System Info,cn=monitor is available --> <
message>'###### Monitor the System Info ###### '</
message>
<
call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : 'cn=System Info,cn=monitor',
'dsFilter' : 'objectclass=*',
<
message>'-- Disable the System Info monitor provider --'</
message>
<
call function="'dsconfig'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'subcommand' : 'set-monitor-provider-prop' ,
'objectType' : 'provider-name',
'objectName' : 'System Info',
'optionsString' : '--set enabled:false',
<!-- Check the entry on cn=System Info,cn=monitor is not available --> <
message>'###### Monitor the System Info ###### '</
message>
<
call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : 'cn=System Info,cn=monitor',
'dsFilter' : 'objectclass=*',
<
call function="'testCase_Postamble'"/>
#@TestMarker Monitoring Provider Tests #@TestName Version monitoring Provider #@TestPurpose Test the Version monitoring Provider #@TestStep Check the entry on cn=Version,cn=monitor is available #@TestStep Disable the Version monitoring Provider #@TestStep Check the entry on cn=Version,cn=monitor is not more available <
testcase name="getTestCaseName('Version monitoring Provider')">
<
call function="'testCase_Preamble'"/>
<!-- Check the entry on cn=Version,cn=monitor is available --> <
message>'###### Monitor the Version ###### '</
message>
<
call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : 'cn=Version,cn=monitor',
'dsFilter' : 'objectclass=*',
<
message>'-- Disable the Version monitor provider --'</
message>
<
call function="'dsconfig'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'subcommand' : 'set-monitor-provider-prop' ,
'objectType' : 'provider-name',
'objectName' : 'Version',
'optionsString' : '--set enabled:false',
<!-- Check the entry on cn=Version,cn=monitor is not available --> <
message>'###### Monitor the Version ###### '</
message>
<
call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : 'cn=Version,cn=monitor',
'dsFilter' : 'objectclass=*',
<
call function="'testCase_Postamble'"/>
#@TestMarker Monitoring Provider Tests #@TestName new monitoring provider #@TestPurpose Test the creation of monitoring provider using dsconfig #@TestStep create a new monitoring provider to manage version using dsconfig #@TestStep Enable this monitoring Provider #@TestStep Disable the initial monitoring Provider which manages the Version #@TestStep Check the entry on cn=Version,cn=monitor is available #@TestStep Delete the new monitor Provider <
testcase name="getTestCaseName('Use a new monitoring Provider')">
<
call function="'testCase_Preamble'"/>
<
message>'-- Create a new monitor provider for Version --'</
message>
<
call function="'dsconfig'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'subcommand' : 'create-monitor-provider' ,
'objectType' : 'provider-name',
'objectName' : 'myVersion',
'optionsString' : '--type version --set enabled:false',
<
message>'-- Disable the Version monitor provider --'</
message>
<
call function="'dsconfig'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'subcommand' : 'set-monitor-provider-prop' ,
'objectType' : 'provider-name',
'objectName' : 'Version',
'optionsString' : '--set enabled:false',
<!-- Check the entry on cn=Version,cn=monitor is not available --> <
message>'###### Monitor the Version ###### '</
message>
<
call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : 'cn=Version,cn=monitor',
'dsFilter' : 'objectclass=*',
<
message>'-- Enable the new Version monitor provider --'</
message>
<
call function="'dsconfig'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'subcommand' : 'set-monitor-provider-prop' ,
'objectType' : 'provider-name',
'objectName' : 'myVersion',
'optionsString' : '--set enabled:true',
<!-- Check the entry on cn=Version,cn=monitor is available --> <
message>'###### Monitor the Version ###### '</
message>
<
call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : 'cn=Version,cn=monitor',
'dsFilter' : 'objectclass=*',
<
message>'-- Delete the new monitor provider for Version --'</
message>
<
call function="'dsconfig'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'subcommand' : 'delete-monitor-provider' ,
'objectType' : 'provider-name',
'objectName' : 'myVersion',
<
call function="'testCase_Postamble'"/>
<
call function="'testSuite_Postamble'" />