common.py revision deddad608abfca143d70fb2c603aaf6dbc49a9b0
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License, Version 1.0 only
# (the "License"). You may not use this file except in compliance
# with the License.
#
# You can obtain a copy of the license at
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at
# trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
# add the following below this CDDL HEADER, with the fields enclosed
# information:
# Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright 2007-2008 Sun Microsystems, Inc.
__version__ = "$Revision$"
# $Source$
# public symbols
__all__ = [ "format_testcase",
"directory_server_information",
"test_time",
"report_generation",
"compare_file",
"is_windows_platform",
"create_property_table",
"compare_property_table",
"exception_thrown",
"directory_server",
"test_env",
"staf_service",
"get_test_name" ]
class format_testcase:
'Format the Test name objects'
class directory_server_information:
'Container for Information about Directory Servers'
self.VersionList=[]
self.SystemList=[]
self.ServerDict={}
self.SystemDict={}
class test_time:
'Simple time related manipulation objects'
class basic_utils:
'Some simple basic utilities'
class report_generation:
'Test Report Generation'
try:
finally:
class exception_thrown:
'User defined exceptions handlers'
class compare_file:
'Compare two files'
try:
ret_str = ""
return ret_str
finally:
def is_windows_platform(host):
import re
else:
table = {}
try:
except IndexError:
value = ''
return table
import re
result = ''
else:
return result
class directory_server:
'Container to hold DS instance objects'
return location
return name
return port
return adminport
return dn
return pswd
return sfx
class staf_service:
'Container to hold staf service instance objects'
try:
except STAFException, e:
pass
def get_library(self):
def get_executable(self):
return self.executable
def get_options(self):
def get_params(self):
class test_env:
'Container to hold test environment instance objects'
class staf:
'Container to hold staf objects'
__cmd = 'Version'
def get_version(self):
class stax(staf_service):
'Container to hold stax service objects'
__cmd = 'Version'
def get_version(self):
class event(staf_service):
'Container to hold event service objects'
__cmd = 'Version'
def get_version(self):
class eventmanager(staf_service):
'Container to hold event manager service objects'
__cmd = 'Version'
def get_version(self):
class email(staf_service):
'Container to hold email service objects'
__cmd = 'Version'
def get_version(self):
def get_recipients(self):
return self.recipients
def get_server(self):
class http(staf_service):
'Container to hold http service objects'
def get_version(self):
class dsml(staf_service):
'Container to hold dsml service objects'
def get_version(self):
class source:
'Container to hold source data instance objects'
def get_directory(self):
def get_common(self):
class logs:
'Container to hold test log instance objects'
def get_directory(self):
def get_reports(self):
class data:
'Container to hold local and remote test data instance objects'
def get_directory(self):
def get_testdata(self):
def get_reldatadir(self):
def get_reljavadir(self):
def get_test_name(name):
i=2
__name=''
i=i+1