updated to match opensrf changes, more move away from prefixed functions.
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 15 Jan 2008 23:26:10 +0000 (23:26 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 15 Jan 2008 23:26:10 +0000 (23:26 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@8387 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/python/oils/system.py
Open-ILS/src/python/oils/utils/utils.py

index 5124f05..e4b0a3d 100644 (file)
 # -----------------------------------------------------------------------
 
 import osrf.log
-from osrf.system import connect
+import osrf.system
 from oils.utils.idl import IDLParser
 from oils.utils.csedit import oilsLoadCSEditor
 
-def oilsConnect(config, configContext):
-       """Connects to the opensrf network,  parses the IDL file, and loads the CSEditor"""
-       osrf.log.log_info("oilsConnect(): connecting with config %s" % config)
-       connect(config, configContext)
-       IDLParser.parse()
-       oilsLoadCSEditor()
+class System(object):
+    @staticmethod
+    def connect(**kwargs):
+           """Connects to the opensrf network,  parses the IDL file, and loads the CSEditor"""
+           osrf.system.System.connect(**kwargs)
+           IDLParser.parse()
+           oilsLoadCSEditor()
index 47c939e..1941a85 100644 (file)
@@ -14,7 +14,7 @@
 # -----------------------------------------------------------------------
 
 import re, md5
-from osrf.ses import AtomicRequest
+import osrf.ses
 from osrf.log import *
 
 
@@ -61,14 +61,14 @@ def login(username, password, type=None, workstation=None):
 
     log_info("attempting login with user " + username)
 
-    seed = AtomicRequest(
+    seed = osrf.ses.ClientSession.atomic_request(
         'open-ils.auth', 
         'open-ils.auth.authenticate.init', username)
 
     # generate the hashed password
     password = md5sum(seed + md5sum(password))
 
-    return AtomicRequest(
+    return osrf.ses.ClientSession.atomic_request(
         'open-ils.auth',
         'open-ils.auth.authenticate.complete',
         {   'workstation' : workstation,