commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gnue/appserver src/geasRpcServer.py INSTALL


From: Jan Ischebeck
Subject: gnue/appserver src/geasRpcServer.py INSTALL
Date: Wed, 29 May 2002 09:48:21 -0400

CVSROOT:        /cvsroot/gnue
Module name:    gnue
Changes by:     Jan Ischebeck <address@hidden>  02/05/29 09:48:21

Modified files:
        appserver/src  : geasRpcServer.py 
        appserver      : INSTALL 

Log message:
        add setup information to INSTALL
        add username and password command line options to appserver

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/appserver/src/geasRpcServer.py.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/appserver/INSTALL.diff?tr1=1.8&tr2=1.9&r1=text&r2=text

Patches:
Index: gnue/appserver/INSTALL
diff -c gnue/appserver/INSTALL:1.8 gnue/appserver/INSTALL:1.9
*** gnue/appserver/INSTALL:1.8  Mon May 27 20:18:09 2002
--- gnue/appserver/INSTALL      Wed May 29 09:48:21 2002
***************
*** 6,15 ****
  
  First intall the common package.
  
! Make sure that you have a valid /usr/local/gnue/etc/gnue.conf.
! This is installed by gnue-common package as a sample.gnue.conf.
! You will have to copy sample.gnue.conf to gnue.conf and edit
! gnue.conf to suit your needs.  Then, run:
  
   $ python setup.py install  (depending on your OS, this could
                                also be python2.1 or python2.2)
--- 6,15 ----
  
  First intall the common package.
  
! Make sure that you have a valid /usr/local/gnue/etc/connections.conf.
! This is installed by gnue-common package as a sample.connections.conf.
! You will have to copy sample.connections.conf to connections.conf and edit
! connections.conf to suit your needs.  Then, run:
  
   $ python setup.py install  (depending on your OS, this could
                                also be python2.1 or python2.2)
***************
*** 40,46 ****
  This will also install other packages, such as postgresql-client, et al.
  
  
! Developer Installation Instructions
  ===================================
  
  You just have to run ./setup-cvs.py in the main gnue cvs directory to set 
--- 40,72 ----
  This will also install other packages, such as postgresql-client, et al.
  
  
! Setting GNUe Application Server up 
! ==================================
! 
! To use appserver you have to adapt you connection.conf file.
! 
! 1. add an entry for the database appserver should use.
! 
!    The default database name in appserver is "gnue".
!    You can change it with the command line option "--database".
!    If you don't use postgresql you have to set the username and
!    password for the database you want to use by command line options.
! 
! 2. for using GNUe forms with appserver you have to add an 
!    section similar to the following:
! 
! [geasv2]
! comment = Connection to the GNUe Application Server
! provider = appserver
! rpctype = xmlrpc
! host = localhost
! port = 8765
! transport = http
! 
! 
! 
! 
! Developer Installation and Testing Instructions
  ===================================
  
  You just have to run ./setup-cvs.py in the main gnue cvs directory to set 
***************
*** 73,75 ****
--- 99,103 ----
  
  The same example, just using GNURPC. (client part)
  call "gtestcvs" and press "3"
+ 
+ 
Index: gnue/appserver/src/geasRpcServer.py
diff -c gnue/appserver/src/geasRpcServer.py:1.4 
gnue/appserver/src/geasRpcServer.py:1.5
*** gnue/appserver/src/geasRpcServer.py:1.4     Wed May 29 08:35:58 2002
--- gnue/appserver/src/geasRpcServer.py Wed May 29 09:48:21 2002
***************
*** 19,25 ****
  # write to the Free Software Foundation, Inc., 59 Temple Place 
  # - Suite 330, Boston, MA 02111-1307, USA.
  #
! # $Id: geasRpcServer.py,v 1.4 2002/05/29 12:35:58 siesel Exp $
  
  from geasList import *
  from geasSession import *
--- 19,25 ----
  # write to the Free Software Foundation, Inc., 59 Temple Place 
  # - Suite 330, Boston, MA 02111-1307, USA.
  #
! # $Id: geasRpcServer.py,v 1.5 2002/05/29 13:48:21 siesel Exp $
  
  from geasList import *
  from geasSession import *
***************
*** 75,81 ****
      [ 'database',None,'database',1,"gnue", 'name',
        _('Set the Database to use for loading and storing data to ')+
        _("<name>. Appserver will search for it in ")+
!       _('connections.conf. ')]]
    
    ## set a list of transports
    def setTransports(self,transports):
--- 75,85 ----
      [ 'database',None,'database',1,"gnue", 'name',
        _('Set the Database to use for loading and storing data to ')+
        _("<name>. Appserver will search for it in ")+
!       _('connections.conf. ')],
!     [ '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.')]]
    
    ## set a list of transports
    def setTransports(self,transports):
***************
*** 130,136 ****
    def requestSessionManager(self):
      #print "SessionManager has started up."
      sm=geasSessionManager()
!     self.connections.setLoginHandler (testLoginHandler ())
      sm.setConnections(self.connections)
      sm.setDatabase(self.OPTIONS["database"])
      return sm
--- 134,145 ----
    def requestSessionManager(self):
      #print "SessionManager has started up."
      sm=geasSessionManager()
!     loginhandler=testLoginHandler ()
!     if self.OPTIONS["username"]:
!       loginhandler.setLoginData(self.OPTIONS["username"],
!                                 self.OPTIONS["password"])
!       
!     self.connections.setLoginHandler (loginhandler)
      sm.setConnections(self.connections)
      sm.setDatabase(self.OPTIONS["database"])
      return sm
***************
*** 140,147 ****
  # 
=============================================================================
  
  class testLoginHandler (GLoginHandler.LoginHandler):
    def getLogin (self, *arguments):
!     # for this test program, try to log into the database as the current user
      username = os.environ ["LOGNAME"]
      return {"_username": username, "_password": "(none)"}
  
--- 149,165 ----
  # 
=============================================================================
  
  class testLoginHandler (GLoginHandler.LoginHandler):
+   def setLoginData(self,username,password):
+     self._username=username
+     self._password=password    
+     
    def getLogin (self, *arguments):
!     if hasattr(self,"_username"):
!       return {"_username": self._username,
!               "_password": self._password}
!     
!     # try to log into the database as the current user
!     # works only on UNIX and with postgresql
      username = os.environ ["LOGNAME"]
      return {"_username": username, "_password": "(none)"}
  



reply via email to

[Prev in Thread] Current Thread [Next in Thread]