[asterisk-scf-commits] asterisk-scf/release/configurator.git branch "master" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Thu Apr 12 10:03:49 CDT 2012


branch "master" has been updated
       via  f75c28f13c57e4624f97412f96ccefd6bf89d0b0 (commit)
       via  cfb18a4d277998604e9eb1bfcf21d1fb5f47448c (commit)
      from  ca857b6d911fe4defcfe25cbaec1957c14dcf17d (commit)

Summary of changes:
 .gitignore      |    1 +
 Configurator.py |   23 ++++++++++++++++++++---
 2 files changed, 21 insertions(+), 3 deletions(-)
 create mode 100644 .gitignore


- Log -----------------------------------------------------------------
commit f75c28f13c57e4624f97412f96ccefd6bf89d0b0
Author: David M. Lee <dlee at digium.com>
Date:   Thu Apr 12 10:03:21 2012 -0500

    Added astscfLoadSlice function.
    
    This should make loading AsteriskSCF slice files less hackish and more
    consistent.

diff --git a/Configurator.py b/Configurator.py
index a11a076..6517ae8 100755
--- a/Configurator.py
+++ b/Configurator.py
@@ -3,7 +3,7 @@
 #
 # Asterisk SCF -- An open-source communications framework.
 #
-# Copyright (C) 2011, Digium, Inc.
+# Copyright (C) 2011-2012, Digium, Inc.
 #
 # See http://www.asterisk.org for more information about
 # the Asterisk SCF project. Please do not directly contact
@@ -24,9 +24,26 @@ sys.path.append('/opt/Ice-3.4/python')
 
 import ConfigParser, traceback, os, Ice, getopt
 
+def astscfLoadSlice(component, sliceFile):
+    # TODO - handle case where ASTSCF_HOME points to install directory instead of source directory
+    componentSliceDir = "%(astscfHome)s/%(component)s/slice" % {
+        "astscfHome": os.environ["ASTSCF_HOME"],
+        "component": component
+        }
+    scfSliceDir = "%(astscfHome)s/slice/slice" % {
+        "astscfHome": os.environ["ASTSCF_HOME"]
+        }
+    loadSliceCmd = '-I"%(scfSliceDir)s" -I"%(iceSliceDir)s" -I"%(componentSliceDir)s" --all "%(componentSliceDir)s"/%(slice)s' % {
+        "scfSliceDir": scfSliceDir,
+        "iceSliceDir": Ice.getSliceDir(),
+        "componentSliceDir": componentSliceDir,
+        "slice": sliceFile
+        }
+    Ice.loadSlice(loadSliceCmd)
+
 # Load and make the configuration interface available, we require it
-Ice.loadSlice("-I\"" + os.environ["ASTSCF_HOME"] + "\" -I\"" + Ice.getSliceDir() + "\" --all \"" + os.environ["ASTSCF_HOME"] + "/slice/slice/AsteriskSCF/System/Component/ConfigurationIf.ice\"")
-Ice.loadSlice("-I\"" + os.environ["ASTSCF_HOME"] + "\" -I\"" + Ice.getSliceDir() + "\" --all \"" + os.environ["ASTSCF_HOME"] + "/slice/slice/AsteriskSCF/Core/Discovery/ServiceLocatorIf.ice\"")
+astscfLoadSlice('slice', 'AsteriskSCF/System/Component/ConfigurationIf.ice')
+astscfLoadSlice('slice', 'AsteriskSCF/Core/Discovery/ServiceLocatorIf.ice')
 
 import AsteriskSCF.System.Configuration.V1
 import AsteriskSCF.Core.Discovery.V1

commit cfb18a4d277998604e9eb1bfcf21d1fb5f47448c
Author: David M. Lee <dlee at digium.com>
Date:   Thu Apr 12 09:49:28 2012 -0500

    Ignore .pyc files

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..0d20b64
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+*.pyc

-----------------------------------------------------------------------


-- 
asterisk-scf/release/configurator.git



More information about the asterisk-scf-commits mailing list