Documentation: update README and server args tips
authorLuc Yriarte <luc.yriarte@linux.intel.com>
Wed, 12 Sep 2012 09:53:01 +0000 (11:53 +0200)
committerLuc Yriarte <luc.yriarte@linux.intel.com>
Wed, 12 Sep 2012 09:53:01 +0000 (11:53 +0200)
README.md
cloudeebus/cloudeebus.py

index 1b26d4b..4e2fa7f 100644 (file)
--- a/README.md
+++ b/README.md
@@ -2,30 +2,65 @@
 Cloudeebus
 ==========
 
-Cloudeebus is a component which enables calling dbus methods and registering on dbus signals from Javascript.
+Cloudeebus - DBus for the Cloud - is a component which enables calling DBus
+ methods and registering on DBus signals from Javascript.
 
 
-Example:
+Install
+-------
+
+  * Installing Cloudeebus from the project root directory:
+
+Cloudeebus will install itself in Python's dist-packages folder. The
+ cloudeebus.py wrapper shell goes in the executables path.
+
+       sudo python setup.py install
+
+
+  * Running Cloudeebus:
+
+The Cloudeebus server must be run either with credentials and a whitelist to
+ restrict access to DBus services, or in opendoor mode.
+
+       usage: cloudeebus.py [-h] [-d] [-o] [-p PORT] [-c CREDENTIALS] [-w WHITELIST]
+       
+       Javascript DBus bridge.
+       
+       optional arguments:
+         -h, --help            show this help message and exit
+         -d, --debug           log debug info on standard output
+         -o, --opendoor        allow anonymous access to all services
+         -p PORT, --port PORT  port number
+         -c CREDENTIALS, --credentials CREDENTIALS
+                               path to credentials file
+         -w WHITELIST, --whitelist WHITELIST
+                               path to whitelist file
+
+
+Examples
 --------
 
-The /doc/dbus-tools folder contains a dbus-send and a dbus-register server, with corresponding test pages.
+  * The /doc/dbus-tools folder contains dbus-send and dbus-register test pages.
+
+Cloudeebus runs in opendoor mode, the dbus-tools pages have no manifest.
+
+       cloudeebus.py --debug --opendoor &
+       firefox ./doc/dbus-tools/dbus-register.html ./doc/dbus-tools/dbus-send.html &
 
- * Running a demo: from the project root directory
+  * The /doc/sample folder contains a working sample using credentials, whitelist
+   and manifest.
 
-       python cloudeebus/cloudeebus.py &
-       firefox file://`pwd`/doc/dbus-tools/dbus-send.html  file://`pwd`/doc/dbus-tools/dbus-register.html &
+Cloudeebus runs with credentials and a whitelist that are matched by the
+ sample page manifest.
+
+       cloudeebus.py --debug --credentials=./doc/sample/CREDENTIALS --whitelist=./doc/sample/WHITELIST &
+       firefox ./doc/sample/cloudeebus.html &
 
 
 Acknowledgements
 ----------------
 
-Cloudeebus uses code from the following open-source projects
+Cloudeebus uses code from the following open-source projects:
 
   * [AutobahnJS](http://autobahn.ws/js)
   * [AutobahnPython](http://autobahn.ws/python)
-
-
-Install:
---------
-
-       sudo python setup.py install
index 6b613c7..da75713 100755 (executable)
@@ -261,11 +261,16 @@ if __name__ == '__main__':
        cache = DbusCache()
 
        parser = argparse.ArgumentParser(description='Javascript DBus bridge.')
-       parser.add_argument('-d', '--debug', action='store_true')
-       parser.add_argument('-o', '--opendoor', action='store_true')
-       parser.add_argument('-p', '--port', default='9000')
-       parser.add_argument('-c', '--credentials')
-       parser.add_argument('-w', '--whitelist')
+       parser.add_argument('-d', '--debug', action='store_true', 
+               help='log debug info on standard output')
+       parser.add_argument('-o', '--opendoor', action='store_true',
+               help='allow anonymous access to all services')
+       parser.add_argument('-p', '--port', default='9000',
+               help='port number')
+       parser.add_argument('-c', '--credentials',
+               help='path to credentials file')
+       parser.add_argument('-w', '--whitelist',
+               help='path to whitelist file')
        
        args = parser.parse_args(sys.argv[1:])