# -----------------------------------------------------------------------
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()
# -----------------------------------------------------------------------
import re, md5
-from osrf.ses import AtomicRequest
+import osrf.ses
from osrf.log import *
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,