SerctlAdapter Class Reference

Inheritance diagram for SerctlAdapter:

TestUserDbAdapter

List of all members.


Detailed Description

TestEnv - Db Adapter for Serctl 0.1.

This database adapter provides database provisioning over Serctl.

Requirements:
  • TestEnv 0.4
  • libiptel
  • Serctl >= 0.3.16 (for SOP 2.3: Serctl 0.3.6)
Definition:
Example for defining adapter in test suite XML file::
        <dbadapter>
                <type>SerctlAdapter</type>
                <arg name="serctlPath">/var/serctl/</arg>
                <arg name="dbUrl">mysql://ser:heslo@localhost/ser</arg>
        </dbadapter>
Notes
  • Serctl is using the username as auth username
Database adapter for Serctl.

Author:
Enrico Hartung <enrico@iptel.org>
License:
GPL

Definition at line 58 of file SerctlAdapter.py.


Public Member Functions

def __init__
 Constructor.
def addTestUserToDb
 Add a test user account to the database.
def removeTestUserFromDb
 Remove test user from database using the UDI interface.
def initUsersAdapter
 Initialize the connection to database.
def removeUsersAdapter
 Remove the connection to database.

Private Member Functions

def __runSerctl
 Run serctl with provided parameters.

Private Attributes

 __serctl
 __serctlBaseArguments

Static Private Attributes

string __serctl = ""
string __serctlBaseArguments = ""
dictionary __tmp = {}

Member Function Documentation

def __init__ (   self,
  args 
)

Constructor.

Needed arguments (args) are:

  • serctlPath
  • dbUrl (e.g. 'mysql://ser:heslo/ser')

Parameters:
args arguments (dict)

Definition at line 77 of file SerctlAdapter.py.

def __runSerctl (   self,
  argumentsString 
) [private]

Run serctl with provided parameters.

Parameters:
argumentsString serctl parameters (string)
Returns:
serctl result code (int)

Definition at line 94 of file SerctlAdapter.py.

def addTestUserToDb (   self,
  user 
)

Add a test user account to the database.

Parameters:
user a test user (testenv.core.TestUser)

Reimplemented from TestUserDbAdapter.

Definition at line 113 of file SerctlAdapter.py.

def removeTestUserFromDb (   self,
  user 
)

Remove test user from database using the UDI interface.

Parameters:
user test user to be removed (testenv.core.TestUser)

Reimplemented from TestUserDbAdapter.

Definition at line 207 of file SerctlAdapter.py.

def initUsersAdapter (   self  ) 

Initialize the connection to database.

Reimplemented from TestUserDbAdapter.

Definition at line 225 of file SerctlAdapter.py.

def removeUsersAdapter (   self  ) 

Remove the connection to database.

Reimplemented from TestUserDbAdapter.

Definition at line 233 of file SerctlAdapter.py.


Member Data Documentation

string __serctl = "" [static, private]

Definition at line 60 of file SerctlAdapter.py.

string __serctlBaseArguments = "" [static, private]

Definition at line 62 of file SerctlAdapter.py.

dictionary __tmp = {} [static, private]

Definition at line 65 of file SerctlAdapter.py.

__serctl [private]

Definition at line 79 of file SerctlAdapter.py.

Definition at line 80 of file SerctlAdapter.py.


The documentation for this class was generated from the following file:

Generated on Mon Aug 11 17:28:33 2008 for TestEnv by  doxygen 1.5.5