fetching IDL from new open-ils idl method. added a remote_connect option for clients...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 6 Mar 2008 16:31:19 +0000 (16:31 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 6 Mar 2008 16:31:19 +0000 (16:31 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@8884 dcc99617-32d9-48b4-a31d-7c20da2025e4

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

index e4b0a3d..17ae11d 100644 (file)
@@ -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()
index def3b24..5a2eae7 100644 (file)
@@ -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