From bf4320f49e8f417ec4ec88b01955c6c35e97db91 Mon Sep 17 00:00:00 2001 From: erickson Date: Thu, 6 Mar 2008 16:31:19 +0000 Subject: [PATCH] fetching IDL from new open-ils idl method. added a remote_connect option for clients who are not on the private network git-svn-id: svn://svn.open-ils.org/ILS/trunk@8884 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/python/oils/system.py | 11 +++++++++++ Open-ILS/src/python/oils/utils/idl.py | 9 ++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/python/oils/system.py b/Open-ILS/src/python/oils/system.py index e4b0a3dfc2..17ae11d7f7 100644 --- a/Open-ILS/src/python/oils/system.py +++ b/Open-ILS/src/python/oils/system.py @@ -25,3 +25,14 @@ class System(object): osrf.system.System.connect(**kwargs) IDLParser.parse() oilsLoadCSEditor() + + @staticmethod + def remote_connect(**kwargs): + """ + Connects to the opensrf network, parses the IDL file, and loads the CSEditor. + This version of connect does not talk to opensrf.settings, which means it + also does not connect to the opensrf cache. + """ + osrf.system.System.net_connect(**kwargs) + IDLParser.parse() + oilsLoadCSEditor() diff --git a/Open-ILS/src/python/oils/utils/idl.py b/Open-ILS/src/python/oils/utils/idl.py index def3b2452e..5a2eae7359 100644 --- a/Open-ILS/src/python/oils/utils/idl.py +++ b/Open-ILS/src/python/oils/utils/idl.py @@ -13,8 +13,9 @@ Typical usage: biblio.record_entry """ import sys, string, xml.dom.minidom -import osrf.net_obj, osrf.log, osrf.set, osrf.ex -from oils.const import OILS_NS_OBJ, OILS_NS_PERSIST, OILS_NS_REPORTER +#import osrf.net_obj, osrf.log, osrf.set, osrf.ex, osrf.ses +import osrf.net_obj, osrf.log, osrf.ex, osrf.ses +from oils.const import OILS_NS_OBJ, OILS_NS_PERSIST, OILS_NS_REPORTER, OILS_APP_ACTOR class IDLException(osrf.ex.OSRFException): pass @@ -40,7 +41,9 @@ class IDLParser(object): the global IDL repository ''' if IDLParser._global_parser is None: parser = IDLParser() - parser.set_IDL(osrf.set.get('IDL')) + idl_path = osrf.ses.ClientSession.atomic_request( + OILS_APP_ACTOR, 'opensrf.open-ils.fetch_idl.file') + parser.set_IDL(idl_path) parser.parse_IDL() IDLParser._global_parser = parser -- 2.43.2