Rename engine.py (too generic) as cloudeebusengine.py
authorLuc Yriarte <luc.yriarte@intel.com>
Fri, 11 Jul 2014 11:39:27 +0000 (13:39 +0200)
committerLuc Yriarte <luc.yriarte@intel.com>
Fri, 11 Jul 2014 11:39:27 +0000 (13:39 +0200)
cloudeebus/cloudeebus.py
cloudeebus/cloudeebusengine.py [moved from cloudeebus/engine.py with 99% similarity]
cloudeebus/xwalkcloudeebus.py
setup.py

index b360387..33bcc72 100755 (executable)
@@ -46,8 +46,8 @@ from twisted.python import log
 
 ###############################################################################
 
-from engine import VERSION, SERVICELIST, CloudeebusService, cache
-import engine
+from cloudeebusengine import VERSION, SERVICELIST, CloudeebusService, cache
+import cloudeebusengine
 
 OPENDOOR = False
 CREDENTIALS = {}
@@ -210,9 +210,9 @@ if __name__ == '__main__':
     factory.protocol = CloudeebusServerProtocol
     factory.setProtocolOptions(allowHixie76 = True)
 
-    # Configure engine for WAMP.
-    engine.factory = factory
-    engine.OPENDOOR = OPENDOOR
+    # Configure cloudeebus engine for WAMP.
+    cloudeebusengine.factory = factory
+    cloudeebusengine.OPENDOOR = OPENDOOR
 
     listenWS(factory)
     
similarity index 99%
rename from cloudeebus/engine.py
rename to cloudeebus/cloudeebusengine.py
index ee2ffc6..2417444 100644 (file)
@@ -33,7 +33,7 @@ from xml.etree.ElementTree import XMLParser
 
 from twisted.internet import defer
 
-# The user of engine.py must set this to some object
+# The user of cloudeebusengine.py must set this to some object
 # providing a dispatch(topicUri, event) method as in WampServerFactory
 factory = None
 
index 831d7c4..9d55a33 100644 (file)
@@ -23,7 +23,7 @@
 # message passing instead of the original WebSocket/WAMP.
 #
 # Installation:
-# cloudeebus.js, xwalkcloudeebus.py and engine.py must be installed in
+# cloudeebus.js, xwalkcloudeebus.py and cloudeebusengine.py must be installed in
 # the same directory. xwalkcloudeebus.py (or a symlink to it) and a
 # symlink to libpycrosswalk.so must be in a directory that Crosswalk
 # searches for extensions.
@@ -67,11 +67,11 @@ from twisted.python import log
 
 import xwalk
 
-# Configure engine module. Partly has to be done before importing
+# Configure cloudeebus engine module. Partly has to be done before importing
 # because the engine needs to know how it is going to be used.
 os.environ['CLOUDEEBUS_XWALK'] = '1'
-import engine
-engine.OPENDOOR = True # No other process has access, so we need no additional credential checking.
+import cloudeebusengine
+cloudeebusengine.OPENDOOR = True # No other process has access, so we need no additional credential checking.
 
 class Factory:
   # Mapping from instance ID to hash with all subscribed topics.
@@ -81,9 +81,9 @@ class Factory:
       if topic in topics:
         xwalk.PostMessage(instance, json.dumps(['signal', topic, event]))
 
-engine.factory = Factory()
+cloudeebusengine.factory = Factory()
 
-service = engine.CloudeebusService({'permissions': [], 'authextra': '', 'services': []})
+service = cloudeebusengine.CloudeebusService({'permissions': [], 'authextra': '', 'services': []})
 methods = {}
 
 for method in inspect.getmembers(service.__class__, inspect.ismethod):
index 7a57b46..8e45626 100755 (executable)
--- a/setup.py
+++ b/setup.py
@@ -30,7 +30,7 @@ setup(name = "cloudeebus",
        author_email = "luc.yriarte@intel.com, christophe.guiraud@intel.com, frederic.paut@intel.com",
        url = "https://github.com/01org/cloudeebus/wiki",
        license = "http://www.apache.org/licenses/LICENSE-2.0",
-       scripts = ["cloudeebus/cloudeebus.py","cloudeebus/engine.py"],
+       scripts = ["cloudeebus/cloudeebus.py","cloudeebus/cloudeebusengine.py"],
        packages = ["cloudeebus"],
        data_files = [("cloudeebus" ,["AUTHORS", "README.md", "LICENSE"]),
                                 ('/etc/dbus-1/system.d/', ['org.cloudeebus.conf'])],