[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue-appserver/src frontend.py geasAuthenticati...
From: |
Reinhard Mueller |
Subject: |
gnue-appserver/src frontend.py geasAuthenticati... |
Date: |
Mon, 01 Sep 2003 14:01:45 -0400 |
CVSROOT: /cvsroot/gnue
Module name: gnue-appserver
Branch:
Changes by: Reinhard Mueller <address@hidden> 03/09/01 14:01:45
Modified files:
src : frontend.py geasAuthentication.py
geasConfiguration.py geasInstance.py
geasList.py geasRpcServer.py geasSession.py
geasSessionManager.py geasTrigger.py test.py
testRPC.py
Log message:
Code beautifying.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-appserver/src/frontend.py.diff?tr1=1.14&tr2=1.15&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-appserver/src/geasAuthentication.py.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-appserver/src/geasConfiguration.py.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-appserver/src/geasInstance.py.diff?tr1=1.14&tr2=1.15&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-appserver/src/geasList.py.diff?tr1=1.26&tr2=1.27&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-appserver/src/geasRpcServer.py.diff?tr1=1.25&tr2=1.26&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-appserver/src/geasSession.py.diff?tr1=1.33&tr2=1.34&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-appserver/src/geasSessionManager.py.diff?tr1=1.13&tr2=1.14&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-appserver/src/geasTrigger.py.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-appserver/src/test.py.diff?tr1=1.17&tr2=1.18&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-appserver/src/testRPC.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
Patches:
Index: gnue-appserver/src/frontend.py
diff -c gnue-appserver/src/frontend.py:1.14 gnue-appserver/src/frontend.py:1.15
*** gnue-appserver/src/frontend.py:1.14 Tue Aug 12 13:04:52 2003
--- gnue-appserver/src/frontend.py Mon Sep 1 14:01:45 2003
***************
*** 4,25 ****
#
# This file is part of GNU Enterprise.
#
! # GNU Enterprise is free software; you can redistribute it
! # and/or modify it under the terms of the GNU General Public
! # License as published by the Free Software Foundation; either
# version 2, or (at your option) any later version.
#
! # GNU Enterprise is distributed in the hope that it will be
! # useful, but WITHOUT ANY WARRANTY; without even the implied
! # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
! # You should have received a copy of the GNU General Public
! # License along with program; see the file COPYING. If not,
! # write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # $Id: frontend.py,v 1.14 2003/08/12 17:04:52 reinhard Exp $
import os, getpass
from gnue.common.apps import GClientApp
--- 4,25 ----
#
# This file is part of GNU Enterprise.
#
! # GNU Enterprise is free software; you can redistribute it
! # and/or modify it under the terms of the GNU General Public
! # License as published by the Free Software Foundation; either
# version 2, or (at your option) any later version.
#
! # GNU Enterprise is distributed in the hope that it will be
! # useful, but WITHOUT ANY WARRANTY; without even the implied
! # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
! # You should have received a copy of the GNU General Public
! # License along with program; see the file COPYING. If not,
! # write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # $Id: frontend.py,v 1.15 2003/09/01 18:01:45 reinhard Exp $
import os, getpass
from gnue.common.apps import GClientApp
***************
*** 55,61 ****
#
=============================================================================
class application (GClientApp.GClientApp):
!
def __init__ (self):
GClientApp.GClientApp.__init__ (self)
--- 55,61 ----
#
=============================================================================
class application (GClientApp.GClientApp):
!
def __init__ (self):
GClientApp.GClientApp.__init__ (self)
Index: gnue-appserver/src/geasAuthentication.py
diff -c gnue-appserver/src/geasAuthentication.py:1.3
gnue-appserver/src/geasAuthentication.py:1.4
*** gnue-appserver/src/geasAuthentication.py:1.3 Mon Sep 1 12:54:43 2003
--- gnue-appserver/src/geasAuthentication.py Mon Sep 1 14:01:45 2003
***************
*** 4,28 ****
#
# This file is part of GNU Enterprise.
#
! # GNU Enterprise is free software; you can redistribute it
! # and/or modify it under the terms of the GNU General Public
! # License as published by the Free Software Foundation; either
# version 2, or (at your option) any later version.
#
! # GNU Enterprise is distributed in the hope that it will be
! # useful, but WITHOUT ANY WARRANTY; without even the implied
! # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
! # You should have received a copy of the GNU General Public
! # License along with program; see the file COPYING. If not,
! # write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # $Id: geasAuthentication.py,v 1.3 2003/09/01 16:54:43 reinhard Exp $
import string
! from gnue.common.apps import GDebug
#
=============================================================================
# Basic Authentication Class ( abstract )
--- 4,28 ----
#
# This file is part of GNU Enterprise.
#
! # GNU Enterprise is free software; you can redistribute it
! # and/or modify it under the terms of the GNU General Public
! # License as published by the Free Software Foundation; either
# version 2, or (at your option) any later version.
#
! # GNU Enterprise is distributed in the hope that it will be
! # useful, but WITHOUT ANY WARRANTY; without even the implied
! # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
! # You should have received a copy of the GNU General Public
! # License along with program; see the file COPYING. If not,
! # write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # $Id: geasAuthentication.py,v 1.4 2003/09/01 18:01:45 reinhard Exp $
import string
! from gnue.common.apps import GDebug
#
=============================================================================
# Basic Authentication Class ( abstract )
***************
*** 45,70 ****
#
---------------------------------------------------------------------------
def authenticate(self, session, user, auth):
! GDebug.printMesg(1,"Fake authentication for user %s" % user)
return 1
!
#
---------------------------------------------------------------------------
- #
# check if user x has access for class/table y
# return 1 on access ok (0=access denied)
#
---------------------------------------------------------------------------
! def hasAccess (self, session, user, classname):
! GDebug.printMesg(1,"Fake access check for class %s and user %s" %
(classname,user))
return 1
-
#
=============================================================================
! # Database Authentication Agent
#
=============================================================================
! class geasDBAuthAgent(geasAuthAgent):
#
---------------------------------------------------------------------------
# Initalize
--- 45,69 ----
#
---------------------------------------------------------------------------
def authenticate(self, session, user, auth):
! GDebug.printMesg (1,"Fake authentication for user %s" % user)
return 1
!
#
---------------------------------------------------------------------------
# check if user x has access for class/table y
# return 1 on access ok (0=access denied)
#
---------------------------------------------------------------------------
! def hasAccess (self, session, user, classname):
! GDebug.printMesg (1, "Fake access check for class %s and user %s" % \
! (classname,user))
return 1
#
=============================================================================
! # Database Authentication Agent
#
=============================================================================
! class geasDBAuthAgent (geasAuthAgent):
#
---------------------------------------------------------------------------
# Initalize
***************
*** 74,80 ****
# creation and populating the user/password/tablelist list should be
# moved here, when the management interface is implemented and an easy
# way to update permissions is working
! self._intSess=internalSession
#
---------------------------------------------------------------------------
# authenticate an user
--- 73,79 ----
# creation and populating the user/password/tablelist list should be
# moved here, when the management interface is implemented and an easy
# way to update permissions is working
! self._intSess = internalSession
#
---------------------------------------------------------------------------
# authenticate an user
***************
*** 83,113 ****
# return 1 on access ok (0=access denied)
#
---------------------------------------------------------------------------
! def authenticate(self, session, user, auth):
authList = self._intSess.request ("gnue_useraccess",
[['eq', ''],['field',
'gnue_username'],['const', user ]],
[],["gnue_username", "gnue_password",
"gnue_accesslist"])
! authData = self._intSess.fetch(authList,0,10)
! if len(authData)==0:
# log something
! GDebug.printMesg(1, _("User '%s' does not exist.") % user)
!
return 0 # = no access
! if len(authData)>1:
# log something
! GDebug.printMesg(1,_("Internal Error: More than one (%s) record for
user '%s'.") % (len(authData),user))
!
! if authData[0][2]!=auth['password']:
# log something
! GDebug.printMesg(1, _("User '%s' didn't provide correct authentication
information"+
" (password).") % user)
!
return 0 # = no access
! GDebug.printMesg(1, _("User '%s' logged in.") % user)
# possibly not the best solution
session.tablelist = string.split (authData[0][3],',')
--- 82,111 ----
# return 1 on access ok (0=access denied)
#
---------------------------------------------------------------------------
! def authenticate (self, session, user, auth):
authList = self._intSess.request ("gnue_useraccess",
[['eq', ''],['field',
'gnue_username'],['const', user ]],
[],["gnue_username", "gnue_password",
"gnue_accesslist"])
! authData = self._intSess.fetch (authList,0,10)
! if len (authData) == 0:
# log something
! GDebug.printMesg (1, _("User '%s' does not exist.") % user)
return 0 # = no access
! if len (authData) > 1:
# log something
! GDebug.printMesg (1, _("Internal Error: More than one (%s) record for
user '%s'.") % (len (authData), user))
!
! if authData[0][2] != auth['password']:
# log something
! GDebug.printMesg (1, _("User '%s' didn't provide correct authentication
information"+
" (password).") % user)
!
return 0 # = no access
! GDebug.printMesg (1, _("User '%s' logged in.") % user)
# possibly not the best solution
session.tablelist = string.split (authData[0][3],',')
***************
*** 124,137 ****
if hasattr (session, "tablelist") and (classname in session.tablelist):
return 1
else:
! GDebug.printMesg(1, _("User '%s' has no access to class %s.") %
(user,classname))
return 0
#
=============================================================================
! # PAM Authentication Agent
#
=============================================================================
! class geasPAMAuthAgent(geasAuthAgent):
#
---------------------------------------------------------------------------
# Initalize
--- 122,135 ----
if hasattr (session, "tablelist") and (classname in session.tablelist):
return 1
else:
! GDebug.printMesg (1, _("User '%s' has no access to class %s.") % (user,
classname))
return 0
#
=============================================================================
! # PAM Authentication Agent
#
=============================================================================
! class geasPAMAuthAgent (geasAuthAgent):
#
---------------------------------------------------------------------------
# Initalize
***************
*** 147,155 ****
# return 1 on access ok (0=access denied)
#
---------------------------------------------------------------------------
! def authenticate(self, session, user, auth):
! auth = PAM.pam()
! auth.start(service)
# TODO: add pam challenge invocation + parsing
--- 145,153 ----
# return 1 on access ok (0=access denied)
#
---------------------------------------------------------------------------
! def authenticate (self, session, user, auth):
! auth = PAM.pam ()
! auth.start (service)
# TODO: add pam challenge invocation + parsing
Index: gnue-appserver/src/geasConfiguration.py
diff -c gnue-appserver/src/geasConfiguration.py:1.3
gnue-appserver/src/geasConfiguration.py:1.4
*** gnue-appserver/src/geasConfiguration.py:1.3 Mon May 26 16:51:05 2003
--- gnue-appserver/src/geasConfiguration.py Mon Sep 1 14:01:45 2003
***************
*** 4,25 ****
#
# This file is part of GNU Enterprise.
#
! # GNU Enterprise is free software; you can redistribute it
! # and/or modify it under the terms of the GNU General Public
! # License as published by the Free Software Foundation; either
# version 2, or (at your option) any later version.
#
! # GNU Enterprise is distributed in the hope that it will be
! # useful, but WITHOUT ANY WARRANTY; without even the implied
! # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
! # You should have received a copy of the GNU General Public
! # License along with program; see the file COPYING. If not,
! # write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # $Id: geasConfiguration.py,v 1.3 2003/05/26 20:51:05 reinhard Exp $
from gnue.common.formatting import GTypecast
--- 4,25 ----
#
# This file is part of GNU Enterprise.
#
! # GNU Enterprise is free software; you can redistribute it
! # and/or modify it under the terms of the GNU General Public
! # License as published by the Free Software Foundation; either
# version 2, or (at your option) any later version.
#
! # GNU Enterprise is distributed in the hope that it will be
! # useful, but WITHOUT ANY WARRANTY; without even the implied
! # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
! # You should have received a copy of the GNU General Public
! # License along with program; see the file COPYING. If not,
! # write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # $Id: geasConfiguration.py,v 1.4 2003/09/01 18:01:45 reinhard Exp $
from gnue.common.formatting import GTypecast
Index: gnue-appserver/src/geasInstance.py
diff -c gnue-appserver/src/geasInstance.py:1.14
gnue-appserver/src/geasInstance.py:1.15
*** gnue-appserver/src/geasInstance.py:1.14 Wed Aug 13 11:06:16 2003
--- gnue-appserver/src/geasInstance.py Mon Sep 1 14:01:45 2003
***************
*** 4,25 ****
#
# This file is part of GNU Enterprise.
#
! # GNU Enterprise is free software; you can redistribute it
! # and/or modify it under the terms of the GNU General Public
! # License as published by the Free Software Foundation; either
# version 2, or (at your option) any later version.
#
! # GNU Enterprise is distributed in the hope that it will be
! # useful, but WITHOUT ANY WARRANTY; without even the implied
! # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
! # You should have received a copy of the GNU General Public
! # License along with program; see the file COPYING. If not,
! # write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # $Id: geasInstance.py,v 1.14 2003/08/13 15:06:16 reinhard Exp $
#
=============================================================================
# Instance class
--- 4,25 ----
#
# This file is part of GNU Enterprise.
#
! # GNU Enterprise is free software; you can redistribute it
! # and/or modify it under the terms of the GNU General Public
! # License as published by the Free Software Foundation; either
# version 2, or (at your option) any later version.
#
! # GNU Enterprise is distributed in the hope that it will be
! # useful, but WITHOUT ANY WARRANTY; without even the implied
! # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
! # You should have received a copy of the GNU General Public
! # License along with program; see the file COPYING. If not,
! # write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # $Id: geasInstance.py,v 1.15 2003/09/01 18:01:45 reinhard Exp $
#
=============================================================================
# Instance class
***************
*** 59,65 ****
raise Exception, "Field type '%s' not defined." % propertydef.gnue_type
#
---------------------------------------------------------------------------
! # Set the value of a propertyname
#
---------------------------------------------------------------------------
def put (self, propertyname, value):
--- 59,65 ----
raise Exception, "Field type '%s' not defined." % propertydef.gnue_type
#
---------------------------------------------------------------------------
! # Set the value of a property
#
---------------------------------------------------------------------------
def put (self, propertyname, value):
***************
*** 68,95 ****
self._record.setField (propertydef.column, value)
#
---------------------------------------------------------------------------
! # Delete this instance
#
---------------------------------------------------------------------------
def delete (self):
self._record.delete ()
#
---------------------------------------------------------------------------
! # Call a method
#
---------------------------------------------------------------------------
! def call (self, methodname, params):
# TODO: use class repository to fetch method definitions
!
# for now: just implement a basic test method
! if methodname=="show":
! print "Function 'show' was called. This record contains the following
"+\
" values:"
for i in self._record._fields.keys():
print "%s : %s " % (i,self._record._fields[i])
print
else:
! print "The method %s is not implemented." % methodname
# return value of '1' to make XMLRPC happy
return 1
--- 68,95 ----
self._record.setField (propertydef.column, value)
#
---------------------------------------------------------------------------
! # Delete this instance
#
---------------------------------------------------------------------------
def delete (self):
self._record.delete ()
#
---------------------------------------------------------------------------
! # Call a procedure
#
---------------------------------------------------------------------------
! def call (self, procedurename, params):
# TODO: use class repository to fetch method definitions
!
# for now: just implement a basic test method
! if procedurename=="show":
! print "Procedure 'show' was called. This record contains the following
"+\
" values:"
for i in self._record._fields.keys():
print "%s : %s " % (i,self._record._fields[i])
print
else:
! print "The procedure %s is not implemented." % procedurename
# return value of '1' to make XMLRPC happy
return 1
Index: gnue-appserver/src/geasList.py
diff -c gnue-appserver/src/geasList.py:1.26 gnue-appserver/src/geasList.py:1.27
*** gnue-appserver/src/geasList.py:1.26 Mon Sep 1 12:54:43 2003
--- gnue-appserver/src/geasList.py Mon Sep 1 14:01:45 2003
***************
*** 4,27 ****
#
# This file is part of GNU Enterprise.
#
! # GNU Enterprise is free software; you can redistribute it
! # and/or modify it under the terms of the GNU General Public
! # License as published by the Free Software Foundation; either
# version 2, or (at your option) any later version.
#
! # GNU Enterprise is distributed in the hope that it will be
! # useful, but WITHOUT ANY WARRANTY; without even the implied
! # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
! # You should have received a copy of the GNU General Public
! # License along with program; see the file COPYING. If not,
! # write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # $Id: geasList.py,v 1.26 2003/09/01 16:54:43 reinhard Exp $
! from gnue.common.datasources import GDataSource,GConditions
import geasInstance
import string
--- 4,27 ----
#
# This file is part of GNU Enterprise.
#
! # GNU Enterprise is free software; you can redistribute it
! # and/or modify it under the terms of the GNU General Public
! # License as published by the Free Software Foundation; either
# version 2, or (at your option) any later version.
#
! # GNU Enterprise is distributed in the hope that it will be
! # useful, but WITHOUT ANY WARRANTY; without even the implied
! # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
! # You should have received a copy of the GNU General Public
! # License along with program; see the file COPYING. If not,
! # write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # $Id: geasList.py,v 1.27 2003/09/01 18:01:45 reinhard Exp $
! from gnue.common.datasources import GDataSource, GConditions
import geasInstance
import string
***************
*** 56,71 ****
propertydef = self._classdef.properties [propertyname]
self._prefColumns.append (propertydef.column)
! # conditions = an list consisting of condition elements written down in
! # prefix notation i.e. (a=12) AND (c=121) -> AND = a 12 = c 121
# every element of the list is a tuple containing the following parts:
# type (eq,and,const...) value i.e. ('eq','') or ('const',12)
! def setConditions (self, conditions):
self._conditions = conditions
# TODO: translate property names to column names
# now building GCondition tree
! self._conditionTree = GConditions.buildTreeFromPrefix(conditions)
def setSort (self, sort):
self._sort = sort
--- 56,71 ----
propertydef = self._classdef.properties [propertyname]
self._prefColumns.append (propertydef.column)
! # conditions = a list consisting of condition elements written down in
! # prefix notation i.e. (a=12) AND (c=121) -> AND = a 12 = c 121
# every element of the list is a tuple containing the following parts:
# type (eq,and,const...) value i.e. ('eq','') or ('const',12)
! def setConditions (self, conditions):
self._conditions = conditions
# TODO: translate property names to column names
# now building GCondition tree
! self._conditionTree = GConditions.buildTreeFromPrefix (conditions)
def setSort (self, sort):
self._sort = sort
***************
*** 98,110 ****
#
---------------------------------------------------------------------------
def firstInstance (self):
- # if self._classdef.fullName != "appserver_pytrigger" \
- # and self._classdef.fullName != "gnue_module":
- # trigger=self._session._triggerMg.getTriggerByEvent \
- # ('%s:pre_first_inst' % self._classdef.fullName)
- # if trigger!=None:
- # trigger()
-
if self._resultset.firstRecord () != None:
return geasInstance.geasInstance (self, self._resultset.current,
self._classdef)
--- 98,103 ----
***************
*** 146,162 ****
# add values in prefetch order (gnue_id, propertylist1, ...)
for property in self._prefetch:
value = object.get (property)
! ## TRANSFER None as ""
if value == None:
value = ""
! row.append(value)
result.append (row)
c += 1
object = self.nextInstance ()
return result
#
---------------------------------------------------------------------------
! # insert a new empty instance in the list and return it
#
---------------------------------------------------------------------------
def insertNewInstance (self):
--- 139,155 ----
# add values in prefetch order (gnue_id, propertylist1, ...)
for property in self._prefetch:
value = object.get (property)
! # transfer None as ""
if value == None:
value = ""
! row.append (value)
result.append (row)
c += 1
object = self.nextInstance ()
return result
#
---------------------------------------------------------------------------
! # insert a new empty instance in the list and return it
#
---------------------------------------------------------------------------
def insertNewInstance (self):
Index: gnue-appserver/src/geasRpcServer.py
diff -c gnue-appserver/src/geasRpcServer.py:1.25
gnue-appserver/src/geasRpcServer.py:1.26
*** gnue-appserver/src/geasRpcServer.py:1.25 Tue Aug 12 16:13:03 2003
--- gnue-appserver/src/geasRpcServer.py Mon Sep 1 14:01:45 2003
***************
*** 19,25 ****
#
# Copyright 2001-2003 Free Software Foundation
#
! # $Id: geasRpcServer.py,v 1.25 2003/08/12 20:13:03 reinhard Exp $
from gnue.appserver import VERSION
from gnue.appserver import geasSessionManager
--- 19,25 ----
#
# Copyright 2001-2003 Free Software Foundation
#
! # $Id: geasRpcServer.py,v 1.26 2003/09/01 18:01:45 reinhard Exp $
from gnue.appserver import VERSION
from gnue.appserver import geasSessionManager
***************
*** 69,75 ****
[ 'web-frontend',None,'web-frontend',0,None, None,
_('Enable appservers web frontend. Just works for the rpc-type XMLRPC.
')+
_('The webfrontend is at the same port as XMLRPC. ')]]
!
#
---------------------------------------------------------------------------
# Initialize the object
#
---------------------------------------------------------------------------
--- 69,75 ----
[ 'web-frontend',None,'web-frontend',0,None, None,
_('Enable appservers web frontend. Just works for the rpc-type XMLRPC.
')+
_('The webfrontend is at the same port as XMLRPC. ')]]
!
#
---------------------------------------------------------------------------
# Initialize the object
#
---------------------------------------------------------------------------
***************
*** 81,87 ****
# overwrite configuration settings by command line parameters
cparser = self.configurationManager._loadedConfigs ['gnue.conf']
!
if self.OPTIONS ["rpctype"] != None:
cparser.set ('appserver', 'rpctype', self.OPTIONS ["rpctype"])
--- 81,87 ----
# overwrite configuration settings by command line parameters
cparser = self.configurationManager._loadedConfigs ['gnue.conf']
!
if self.OPTIONS ["rpctype"] != None:
cparser.set ('appserver', 'rpctype', self.OPTIONS ["rpctype"])
***************
*** 153,163 ****
if self.OPTIONS ["selftest"]:
self.selftest ()
return
!
# Create the various servers
servers = GComm.bind (GConfig.getInstalledBase ('install_prefix') + \
'/shared/grpc/appserver.grpc',
! self._transports,
{'SessionManager': self.requestSessionManager})
# be verbose
--- 153,163 ----
if self.OPTIONS ["selftest"]:
self.selftest ()
return
!
# Create the various servers
servers = GComm.bind (GConfig.getInstalledBase ('install_prefix') + \
'/shared/grpc/appserver.grpc',
! self._transports,
{'SessionManager': self.requestSessionManager})
# be verbose
***************
*** 168,174 ****
# Start the server for the different protocolls
for key in servers.keys ():
! servers [key].serveAsNewThread ()
# wait for the servers shut down
try:
--- 168,174 ----
# Start the server for the different protocolls
for key in servers.keys ():
! servers [key].serveAsNewThread ()
# wait for the servers shut down
try:
***************
*** 184,190 ****
def requestSessionManager (self):
if hasattr (self, "sm"):
return self.sm
!
loginhandler = geasLoginHandler ()
if self.OPTIONS ["username"]:
loginhandler.setLoginData (self.OPTIONS ["username"],
--- 184,190 ----
def requestSessionManager (self):
if hasattr (self, "sm"):
return self.sm
!
loginhandler = geasLoginHandler ()
if self.OPTIONS ["username"]:
loginhandler.setLoginData (self.OPTIONS ["username"],
***************
*** 201,211 ****
## 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 = self.requestSessionManager ()
print _("Step 2: Logging into the session (as user 'hacker'")+\
--- 201,211 ----
## 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 = self.requestSessionManager ()
print _("Step 2: Logging into the session (as user 'hacker'")+\
Index: gnue-appserver/src/geasSession.py
diff -c gnue-appserver/src/geasSession.py:1.33
gnue-appserver/src/geasSession.py:1.34
*** gnue-appserver/src/geasSession.py:1.33 Mon Sep 1 12:54:43 2003
--- gnue-appserver/src/geasSession.py Mon Sep 1 14:01:45 2003
***************
*** 4,29 ****
#
# This file is part of GNU Enterprise.
#
! # GNU Enterprise is free software; you can redistribute it
! # and/or modify it under the terms of the GNU General Public
! # License as published by the Free Software Foundation; either
# version 2, or (at your option) any later version.
#
! # GNU Enterprise is distributed in the hope that it will be
! # useful, but WITHOUT ANY WARRANTY; without even the implied
! # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
! # You should have received a copy of the GNU General Public
! # License along with program; see the file COPYING. If not,
! # write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # $Id: geasSession.py,v 1.33 2003/09/01 16:54:43 reinhard Exp $
import geasList
- import geasTrigger
- import geasAuthentication
import classrep
import whrandom
--- 4,27 ----
#
# This file is part of GNU Enterprise.
#
! # GNU Enterprise is free software; you can redistribute it
! # and/or modify it under the terms of the GNU General Public
! # License as published by the Free Software Foundation; either
# version 2, or (at your option) any later version.
#
! # GNU Enterprise is distributed in the hope that it will be
! # useful, but WITHOUT ANY WARRANTY; without even the implied
! # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
! # You should have received a copy of the GNU General Public
! # License along with program; see the file COPYING. If not,
! # write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # $Id: geasSession.py,v 1.34 2003/09/01 18:01:45 reinhard Exp $
import geasList
import classrep
import whrandom
***************
*** 52,58 ****
# Initalize
#
---------------------------------------------------------------------------
! def __init__ (self, connections, authAdapter, triggerMg):
self.loggedIn = 0
self.connections = connections
try:
--- 50,56 ----
# Initalize
#
---------------------------------------------------------------------------
! def __init__ (self, connections, authAdapter):
self.loggedIn = 0
self.connections = connections
try:
***************
*** 61,69 ****
self.database = "gnue"
self._user = ""
self._lists = {}
! self._listcount=0
! self._authAdapter=authAdapter
! self._triggerMg=triggerMg
#
---------------------------------------------------------------------------
# Get class definition from class name
--- 59,66 ----
self.database = "gnue"
self._user = ""
self._lists = {}
! self._listcount = 0
! self._authAdapter = authAdapter
#
---------------------------------------------------------------------------
# Get class definition from class name
***************
*** 78,84 ****
def login (self, user, password):
# This username/password is for the Application Server, not for the
! # database.
self._user = user
self.loggedIn = self._authAdapter.authenticate(self, user,
{'password':password} )
--- 75,81 ----
def login (self, user, password):
# This username/password is for the Application Server, not for the
! # database.
self._user = user
self.loggedIn = self._authAdapter.authenticate(self, user,
{'password':password} )
***************
*** 97,116 ****
#
---------------------------------------------------------------------------
def createList (self, classname):
!
classdef = self._getClassdef (classname)
# check if user has access rights for this list
if not self._authAdapter.hasAccess (self, self._user, classname):
return None
!
! # pre_new_list trigger
! # if classname != "appserver_pytrigger" \
! # and classname != "gnue_module":
! # tr=self._triggerMg.getTriggerByEvent('%s:pre_new_list' % classname)
! # if tr!=None:
! # tr()
!
# create new List
newlist = geasList.geasList (self, classdef)
# every new list will be added to the _lists list
--- 94,106 ----
#
---------------------------------------------------------------------------
def createList (self, classname):
!
classdef = self._getClassdef (classname)
# check if user has access rights for this list
if not self._authAdapter.hasAccess (self, self._user, classname):
return None
!
# create new List
newlist = geasList.geasList (self, classdef)
# every new list will be added to the _lists list
***************
*** 118,124 ****
self._listcount += 1
self._lists [self._listcount] = newlist
return newlist;
!
#
---------------------------------------------------------------------------
# Commit the active transaction
#
---------------------------------------------------------------------------
--- 108,114 ----
self._listcount += 1
self._lists [self._listcount] = newlist
return newlist;
!
#
---------------------------------------------------------------------------
# Commit the active transaction
#
---------------------------------------------------------------------------
***************
*** 126,135 ****
def commit (self):
# FIXME: gnue-common should support the concept of a session and commits
# on session level
! for l in self._lists.keys():
! if hasattr(self._lists[l],"_datasource"):
! self._lists[l]._resultset.post()
! self._lists[l]._datasource.commit()
#
---------------------------------------------------------------------------
# Rollback the active transaction
--- 116,125 ----
def commit (self):
# FIXME: gnue-common should support the concept of a session and commits
# on session level
! for l in self._lists.keys ():
! if hasattr (self._lists[l], "_datasource"):
! self._lists[l]._resultset.post ()
! self._lists[l]._datasource.commit ()
#
---------------------------------------------------------------------------
# Rollback the active transaction
***************
*** 138,146 ****
def rollback (self):
# FIXME: gnue-common should support the concept of a session and rollbacks
# on session level
! for l in self._lists.keys():
! if hasattr(self._lists[l],"_datasource"):
! self._lists[l]._datasource.rollback()
#
---------------------------------------------------------------------------
# Create a new list of business objects of a given class
--- 128,136 ----
def rollback (self):
# FIXME: gnue-common should support the concept of a session and rollbacks
# on session level
! for l in self._lists.keys ():
! if hasattr (self._lists[l], "_datasource"):
! self._lists[l]._datasource.rollback ()
#
---------------------------------------------------------------------------
# Create a new list of business objects of a given class
***************
*** 149,163 ****
def request (self, classname, conditions, sortorder, propertylist):
# FIXME: this list needn't be considered by commit and rollback
list = self.createList (classname)
! if list==None:
return 0
!
list_id = self._listcount
list.setPrefetch (["gnue_id"] + propertylist)
list.setConditions (conditions)
list.setSort (sortorder)
list.populate ()
!
return list_id;
#
---------------------------------------------------------------------------
--- 139,153 ----
def request (self, classname, conditions, sortorder, propertylist):
# FIXME: this list needn't be considered by commit and rollback
list = self.createList (classname)
! if list == None:
return 0
!
list_id = self._listcount
list.setPrefetch (["gnue_id"] + propertylist)
list.setConditions (conditions)
list.setSort (sortorder)
list.populate ()
!
return list_id;
#
---------------------------------------------------------------------------
***************
*** 168,174 ****
try:
list = self._lists [list_id]
except:
! raise Error,'The list you are truing to access does not exist.'
return list.count ();
#
---------------------------------------------------------------------------
--- 158,164 ----
try:
list = self._lists [list_id]
except:
! raise Error, 'The list you are trying to access does not exist.'
return list.count ();
#
---------------------------------------------------------------------------
***************
*** 179,185 ****
try:
list = self._lists [list_id]
except:
! raise Error,'The list you are truing to access does not exist.'
return list.fetch (start, count)
#
---------------------------------------------------------------------------
--- 169,175 ----
try:
list = self._lists [list_id]
except:
! raise Error, 'The list you are trying to access does not exist.'
return list.fetch (start, count)
#
---------------------------------------------------------------------------
***************
*** 203,209 ****
row = []
for property in propertylist:
value = object.get (property)
! ## TRANSFER None as ""
if value == None:
value = ""
row.append (value)
--- 193,199 ----
row = []
for property in propertylist:
value = object.get (property)
! # transfer None as ""
if value == None:
value = ""
row.append (value)
***************
*** 218,231 ****
result = []
i = 0
for object_id in obj_id_list:
- # FIXME: if we already have (in this session) a geasInstance that holds
- # exactly this object, then we _must_ reuse it, or the existing
- # geasInstance won't reflect our change!
-
- # FIXME: when new geasInstance is inserted, and we have (in this
session)
- # a geasList that this geasInstance would belong into, then insert it
- # into that geasList.
-
# We have to create a geasList for each object, because commit only
# operates on lists. We should change that. -- Reinhard
list = self.createList (classname)
--- 208,213 ----
***************
*** 267,280 ****
list.populate ()
object = list.firstInstance ()
object.delete ()
- # FIXME: remove this instance from all lists of this session it was
- # a member of.
#
---------------------------------------------------------------------------
# Call a procedure of business objects
#
---------------------------------------------------------------------------
! def call(self,classname,obj_id_list,methodname,parameters):
# create a temporary geasList
classdef = self._getClassdef (classname)
list = geasList.geasList (self, classdef)
--- 249,260 ----
list.populate ()
object = list.firstInstance ()
object.delete ()
#
---------------------------------------------------------------------------
# Call a procedure of business objects
#
---------------------------------------------------------------------------
! def call (self, classname, obj_id_list, procedurename, parameters):
# create a temporary geasList
classdef = self._getClassdef (classname)
list = geasList.geasList (self, classdef)
***************
*** 288,298 ****
['const', object_id]])
list.populate ()
object = list.firstInstance ()
! result.append (object.call(methodname,parameters))
! # FIXME: at the moment the method itself has to care for data which has
to
! # be stored back into the database -- Siesel
!
return result
- # FIXME: This function should be moved to the geasBClass object, once
- # it is working -- Siesel
- # return self._getClass(classname).call(obj_id_list,methodname,parameters)
--- 268,272 ----
['const', object_id]])
list.populate ()
object = list.firstInstance ()
! result.append (object.call (methodname, parameters))
return result
Index: gnue-appserver/src/geasSessionManager.py
diff -c gnue-appserver/src/geasSessionManager.py:1.13
gnue-appserver/src/geasSessionManager.py:1.14
*** gnue-appserver/src/geasSessionManager.py:1.13 Sat Aug 16 13:07:16 2003
--- gnue-appserver/src/geasSessionManager.py Mon Sep 1 14:01:45 2003
***************
*** 19,29 ****
#
# Copyright 2001-2003 Free Software Foundation
#
! # $Id: geasSessionManager.py,v 1.13 2003/08/16 17:07:16 siesel Exp $
import geasSession
import geasAuthentication
- import geasTrigger
import classrep
#
=============================================================================
--- 19,28 ----
#
# Copyright 2001-2003 Free Software Foundation
#
! # $Id: geasSessionManager.py,v 1.14 2003/09/01 18:01:45 reinhard Exp $
import geasSession
import geasAuthentication
import classrep
#
=============================================================================
***************
*** 47,71 ****
self._connections = connections
self._sessNo = 0
self._sessions = {}
! self._buildInternalSess()
! self._classRep = classrep.init (self)
# TODO: load default authagent depending on config setting
! self._authAdapter =
geasAuthentication.geasDBAuthAgent(self._internalSession)
!
! self._triggerMg = geasTrigger.geasPythonDBTriggerMg(self)
!
#
---------------------------------------------------------------------------
# Build an internal session
#
---------------------------------------------------------------------------
! def _buildInternalSess(self):
self._internalSession = geasSession.geasSession (self._connections,
geasAuthentication.geasAuthAgent(),
None)
! self._internalSession.login(None,None) # fake login
! self._sessions[self._internalSession]=self._internalSession
#
---------------------------------------------------------------------------
# Find a session from session ID
--- 46,67 ----
self._connections = connections
self._sessNo = 0
self._sessions = {}
! self._buildInternalSession ()
! classrep.init (self)
# TODO: load default authagent depending on config setting
! self._authAdapter = geasAuthentication.geasDBAuthAgent
(self._internalSession)
#
---------------------------------------------------------------------------
# Build an internal session
#
---------------------------------------------------------------------------
! def _buildInternalSession (self):
self._internalSession = geasSession.geasSession (self._connections,
geasAuthentication.geasAuthAgent(),
None)
! self._internalSession.login (None,None) # fake login
! self._sessions [self._internalSession] = self._internalSession
#
---------------------------------------------------------------------------
# Find a session from session ID
***************
*** 82,90 ****
#
---------------------------------------------------------------------------
def open (self, authentication):
! sess = geasSession.geasSession (self._connections,
! self._authAdapter,
! self._triggerMg)
if not sess.login (authentication ['user'],
authentication ['password']):
--- 78,84 ----
#
---------------------------------------------------------------------------
def open (self, authentication):
! sess = geasSession.geasSession (self._connections, self._authAdapter)
if not sess.login (authentication ['user'],
authentication ['password']):
***************
*** 128,134 ****
def store (self, session_id, classname, obj_id_list, propertylist, data):
s = self._getSession (session_id)
! return s.store (classname, obj_id_list, propertylist, data)
def call (self, session_id, classname, obj_id_list, methodname, parameters):
s = self._getSession (session_id)
--- 122,128 ----
def store (self, session_id, classname, obj_id_list, propertylist, data):
s = self._getSession (session_id)
! return s.store (classname, obj_id_list, propertylist, data)
def call (self, session_id, classname, obj_id_list, methodname, parameters):
s = self._getSession (session_id)
Index: gnue-appserver/src/geasTrigger.py
diff -c gnue-appserver/src/geasTrigger.py:1.5
gnue-appserver/src/geasTrigger.py:1.6
*** gnue-appserver/src/geasTrigger.py:1.5 Fri Aug 8 16:06:49 2003
--- gnue-appserver/src/geasTrigger.py Mon Sep 1 14:01:45 2003
***************
*** 4,25 ****
#
# This file is part of GNU Enterprise.
#
! # GNU Enterprise is free software; you can redistribute it
! # and/or modify it under the terms of the GNU General Public
! # License as published by the Free Software Foundation; either
# version 2, or (at your option) any later version.
#
! # GNU Enterprise is distributed in the hope that it will be
! # useful, but WITHOUT ANY WARRANTY; without even the implied
! # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
! # You should have received a copy of the GNU General Public
! # License along with program; see the file COPYING. If not,
! # write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # $Id: geasTrigger.py,v 1.5 2003/08/08 20:06:49 reinhard Exp $
import string,new
--- 4,25 ----
#
# This file is part of GNU Enterprise.
#
! # GNU Enterprise is free software; you can redistribute it
! # and/or modify it under the terms of the GNU General Public
! # License as published by the Free Software Foundation; either
# version 2, or (at your option) any later version.
#
! # GNU Enterprise is distributed in the hope that it will be
! # useful, but WITHOUT ANY WARRANTY; without even the implied
! # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
! # You should have received a copy of the GNU General Public
! # License along with program; see the file COPYING. If not,
! # write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # $Id: geasTrigger.py,v 1.6 2003/09/01 18:01:45 reinhard Exp $
import string,new
***************
*** 54,60 ****
#
=============================================================================
! # Database Authentification Agent
#
=============================================================================
class geasPythonDBTriggerMg(geasTriggerManager):
--- 54,60 ----
#
=============================================================================
! # Database Authentification Agent
#
=============================================================================
class geasPythonDBTriggerMg(geasTriggerManager):
***************
*** 83,102 ****
triggerList.populate ()
instance = triggerList.firstInstance ()
!
# no such trigger
if instance==None:
# log something
print _("Trigger '%s' does not exist.") % triggername
!
return None
code=instance.get('code')
# format code
!
ccode=compile (code,'<string>','exec')
myfunc=new.function(ccode, {'session':self._session}, triggername)
!
return myfunc
#
---------------------------------------------------------------------------
--- 83,102 ----
triggerList.populate ()
instance = triggerList.firstInstance ()
!
# no such trigger
if instance==None:
# log something
print _("Trigger '%s' does not exist.") % triggername
!
return None
code=instance.get('code')
# format code
!
ccode=compile (code,'<string>','exec')
myfunc=new.function(ccode, {'session':self._session}, triggername)
!
return myfunc
#
---------------------------------------------------------------------------
***************
*** 114,132 ****
triggerList.populate ()
instance = triggerList.firstInstance ()
!
# no such trigger
if instance==None:
# log something
# print _("Trigger for event '%s' does not exist.") % eventname
!
return None
code=instance.get('code')
# format code
!
ccode=compile (code,'<string>','exec')
myfunc=new.function(ccode, {'session':self._session},
instance.get('name'))
!
return myfunc
--- 114,132 ----
triggerList.populate ()
instance = triggerList.firstInstance ()
!
# no such trigger
if instance==None:
# log something
# print _("Trigger for event '%s' does not exist.") % eventname
!
return None
code=instance.get('code')
# format code
!
ccode=compile (code,'<string>','exec')
myfunc=new.function(ccode, {'session':self._session},
instance.get('name'))
!
return myfunc
Index: gnue-appserver/src/test.py
diff -c gnue-appserver/src/test.py:1.17 gnue-appserver/src/test.py:1.18
*** gnue-appserver/src/test.py:1.17 Tue Aug 12 13:58:20 2003
--- gnue-appserver/src/test.py Mon Sep 1 14:01:45 2003
***************
*** 4,25 ****
#
# This file is part of GNU Enterprise.
#
! # GNU Enterprise is free software; you can redistribute it
! # and/or modify it under the terms of the GNU General Public
! # License as published by the Free Software Foundation; either
# version 2, or (at your option) any later version.
#
! # GNU Enterprise is distributed in the hope that it will be
! # useful, but WITHOUT ANY WARRANTY; without even the implied
! # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
! # You should have received a copy of the GNU General Public
! # License along with program; see the file COPYING. If not,
! # write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # $Id: test.py,v 1.17 2003/08/12 17:58:20 reinhard Exp $
import os
from gnue.common.apps import GClientApp
--- 4,25 ----
#
# This file is part of GNU Enterprise.
#
! # GNU Enterprise is free software; you can redistribute it
! # and/or modify it under the terms of the GNU General Public
! # License as published by the Free Software Foundation; either
# version 2, or (at your option) any later version.
#
! # GNU Enterprise is distributed in the hope that it will be
! # useful, but WITHOUT ANY WARRANTY; without even the implied
! # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
! # You should have received a copy of the GNU General Public
! # License along with program; see the file COPYING. If not,
! # write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # $Id: test.py,v 1.18 2003/09/01 18:01:45 reinhard Exp $
import os
from gnue.common.apps import GClientApp
***************
*** 35,57 ****
#
---------------------------------------------------------------------------
# Create a session manager object
#
---------------------------------------------------------------------------
!
def getSessionManager (self):
# set up login handler
self.connections.setLoginHandler (testLoginHandler ())
!
print "Creating session manager ..."
sm = geasSessionManager.geasSessionManager (self.connections)
return sm
!
#
---------------------------------------------------------------------------
# Main program
#
---------------------------------------------------------------------------
!
def run (self):
sm = self.getSessionManager ()
!
print "Opening session ..."
session = sm.open ({"user":"hacker", "password":"secret"})
--- 35,57 ----
#
---------------------------------------------------------------------------
# Create a session manager object
#
---------------------------------------------------------------------------
!
def getSessionManager (self):
# set up login handler
self.connections.setLoginHandler (testLoginHandler ())
!
print "Creating session manager ..."
sm = geasSessionManager.geasSessionManager (self.connections)
return sm
!
#
---------------------------------------------------------------------------
# Main program
#
---------------------------------------------------------------------------
!
def run (self):
sm = self.getSessionManager ()
!
print "Opening session ..."
session = sm.open ({"user":"hacker", "password":"secret"})
Index: gnue-appserver/src/testRPC.py
diff -c gnue-appserver/src/testRPC.py:1.1 gnue-appserver/src/testRPC.py:1.2
*** gnue-appserver/src/testRPC.py:1.1 Mon Jul 28 17:48:22 2003
--- gnue-appserver/src/testRPC.py Mon Sep 1 14:01:45 2003
***************
*** 1,25 ****
! # GNU Enterprise Application Server - RPC client
#
# Copyright 2001-2003 Free Software Foundation
#
# This file is part of GNU Enterprise.
#
! # GNU Enterprise is free software; you can redistribute it
! # and/or modify it under the terms of the GNU General Public
! # License as published by the Free Software Foundation; either
# version 2, or (at your option) any later version.
#
! # GNU Enterprise is distributed in the hope that it will be
! # useful, but WITHOUT ANY WARRANTY; without even the implied
! # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
! # You should have received a copy of the GNU General Public
! # License along with program; see the file COPYING. If not,
! # write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # $Id: testRPC.py,v 1.1 2003/07/28 21:48:22 reinhard Exp $
from gnue.common.rpc import GComm
import test
--- 1,25 ----
! # GNU Enterprise Application Server - RPC client
#
# Copyright 2001-2003 Free Software Foundation
#
# This file is part of GNU Enterprise.
#
! # GNU Enterprise is free software; you can redistribute it
! # and/or modify it under the terms of the GNU General Public
! # License as published by the Free Software Foundation; either
# version 2, or (at your option) any later version.
#
! # GNU Enterprise is distributed in the hope that it will be
! # useful, but WITHOUT ANY WARRANTY; without even the implied
! # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
! # You should have received a copy of the GNU General Public
! # License along with program; see the file COPYING. If not,
! # write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # $Id: testRPC.py,v 1.2 2003/09/01 18:01:45 reinhard Exp $
from gnue.common.rpc import GComm
import test
***************
*** 39,48 ****
params = {"host": "localhost",
"port": 8765,
"transport": "http" }
! server = GComm.attach ("xmlrpc", params)
print "Setup an link to the session manager"
! sm = server.request ("Session")
return sm
--- 39,48 ----
params = {"host": "localhost",
"port": 8765,
"transport": "http" }
! server = GComm.attach ("xmlrpc", params)
print "Setup an link to the session manager"
! sm = server.request ("Session")
return sm
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue-appserver/src frontend.py geasAuthenticati...,
Reinhard Mueller <=