[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/appserver/src geasRpcServer.py
From: |
Jan Ischebeck |
Subject: |
gnue/appserver/src geasRpcServer.py |
Date: |
Thu, 03 Apr 2003 17:53:22 -0500 |
CVSROOT: /cvsroot/gnue
Module name: gnue
Changes by: Jan Ischebeck <address@hidden> 03/04/03 17:53:22
Modified files:
appserver/src : geasRpcServer.py
Log message:
add command line option "--selftest" for easy testing of appserver
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/appserver/src/geasRpcServer.py.diff?tr1=1.20&tr2=1.21&r1=text&r2=text
Patches:
Index: gnue/appserver/src/geasRpcServer.py
diff -c gnue/appserver/src/geasRpcServer.py:1.20
gnue/appserver/src/geasRpcServer.py:1.21
*** gnue/appserver/src/geasRpcServer.py:1.20 Mon Mar 31 08:39:50 2003
--- gnue/appserver/src/geasRpcServer.py Thu Apr 3 17:53:22 2003
***************
*** 19,25 ****
#
# Copyright 2001-2003 Free Software Foundation
#
! # $Id: geasRpcServer.py,v 1.20 2003/03/31 13:39:50 siesel Exp $
####
#
--- 19,25 ----
#
# Copyright 2001-2003 Free Software Foundation
#
! # $Id: geasRpcServer.py,v 1.21 2003/04/03 22:53:22 siesel Exp $
####
#
***************
*** 109,115 ****
[ 'username',"u",'username',1,None, 'user',
_('Set the username for the used database.')],
[ 'password',"p",'password',1,None, 'password',
! _('Set the password for the used database.')]]
def __init__(self, connections=None):
GServerApp.__init__(self, connections,'appserver',ConfigOptions)
--- 109,118 ----
[ 'username',"u",'username',1,None, 'user',
_('Set the username for the used database.')],
[ 'password',"p",'password',1,None, 'password',
! _('Set the password for the used database.')],
! [ 'selftest',None,'selftest',0,None, None,
! _('Test appservers connection to the backend database, check ')+
! _('correctness of global settings, etc..')]]
def __init__(self, connections=None):
GServerApp.__init__(self, connections,'appserver',ConfigOptions)
***************
*** 165,171 ****
def run(self):
!
# Create the various servers
servers=GComm.bind (GConfig.getInstalledBase('install_prefix')+\
'/shared/grpc/GEAS.grpc',
--- 168,174 ----
def run(self):
!
# Create the various servers
servers=GComm.bind (GConfig.getInstalledBase('install_prefix')+\
'/shared/grpc/GEAS.grpc',
***************
*** 237,245 ****
if __name__ == '__main__':
geas1 = geasRpcServer();
!
geas1.phaseInit()
! print "\n... GNUe Application Server up and running ...\n"
! geas1.run();
!
--- 240,282 ----
if __name__ == '__main__':
geas1 = geasRpcServer();
!
geas1.phaseInit()
! if not geas1.OPTIONS["selftest"]:
!
! print _("\n... GNUe Application Server up and running ...\n")
! geas1.run()
!
! else:
!
! ## Starting Appserver selftest
! print _("\nGNUe Application Server is running a simple self test\n")
! print _("=====================================================\n")
!
! print _("PREREQUISE: You have to populate the backend db with ")
! print _('the "address_person" example.\n')
!
! print _("Step 1: Startup Session Manager\n")
! sm = geas1.requestSessionManager()
!
! print _("Step 2: Logging into the session (as user 'hacker'")+\
! _("with password 'secret')...\n")
! session=sm.open({'user':"hacker", 'password':"secret"})
!
! print _("\nStep 3: Creating and populating list object ...\n")
! list = sm.request(session, "address_person", [], ["address_zip"],
! ["address_name", "address_street", "address_city"])
!
! print _("Step 4: Retrieving first instance ...\n")
! rset = sm.fetch(session,list,0,1)
!
! print _("These are the values of the first instance:")
! print _(" Name : %s") % rset[0][1]
! print _(" Street: %s") % rset[0][2]
! print _(" City : %s") % rset[0][3]
!
! print _('\n\nSelftest passed!\n')
!
!
!
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue/appserver/src geasRpcServer.py,
Jan Ischebeck <=