[X2Go-Commits] x2gobroker.git - build-main (branch) updated: 0.0.1.0-6-g830502f

X2Go dev team git-admin at x2go.org
Sat Apr 27 13:04:07 CEST 2013


The branch, build-main has been updated
  discards  317325dd112ba89775ff81984ef985f061a81b21 (commit)
  discards  2cee942cb70599dd79ef3cf7f93fc2aeaa950472 (commit)
  discards  0beb6626be0dd1c9d0363435268def8df85f1380 (commit)
  discards  d14d83a114d66019fe9fa031f3a367c65224cf6a (commit)
  discards  8130c9d12e3447fda3064b4b3f1ba0aef1015341 (commit)
  discards  00fb61c3429809f7511f7bda5667a77facd96918 (commit)
  discards  e341bd86111730b2919697a74ac18d759d2a9e74 (commit)
  discards  c9c92dbff6b4e9ee872eb738121dbd51da94d329 (commit)
  discards  1734e9987eebeaf7574c42c28b92f010fb827008 (commit)
  discards  cd9500b7a1d12cd973af7726dbead83b79bc8581 (commit)
  discards  890debb62b31a29ed482d392e7d276c5d9936d90 (commit)
  discards  aea8e30472982caf3be18c73e3175becfc6d6b4a (commit)
  discards  19582aa37e0e3cab202c43cd7497d791cbeee1b3 (commit)
       via  830502fcaa69733d4c5f6561d335a5f7032c4baa (commit)
       via  48ca859f6e7950c9f08d20ac7c79feff70a65b2e (commit)
       via  17d847151ef8803f9e973ddbe9e8b47c56d30623 (commit)
       via  3eece58572d42b888f3f922eac9ca7f64937a2da (commit)
       via  5a4f129a152362b5bfb133d39638274ed0c65f41 (commit)

This update added new revisions after undoing existing revisions.  That is
to say, the old revision is not a strict subset of the new revision.  This
situation occurs when you --force push a change and generate a repository
containing something like this:

 * -- * -- B -- O -- O -- O (317325dd112ba89775ff81984ef985f061a81b21)
            \
             N -- N -- N (830502fcaa69733d4c5f6561d335a5f7032c4baa)

When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 debian/changelog                                   |    6 +-
 debian/control                                     |  104 +++++----
 debian/rules                                       |    8 +-
 debian/x2gobroker-agent.postrm                     |    8 +-
 debian/x2gobroker-daemon.postrm                    |    9 +-
 debian/x2gobroker-wsgi.install                     |    1 +
 debian/x2gobroker-wsgi.links                       |    1 +
 ...er-daemon.postinst => x2gobroker-wsgi.postinst} |    0
 ...broker-daemon.postrm => x2gobroker-wsgi.postrm} |    9 +-
 etc/broker/x2gobroker-sessionprofiles.conf         |    4 +-
 etc/x2gobroker-wsgi.apache.conf                    |   43 ++++
 sbin/x2gobroker                                    |   27 ++-
 x2gobroker/brokers/zeroconf_broker.py              |    7 +-
 x2gobroker/defaults.py                             |    4 +-
 x2gobroker/tests/test_broker_base.py               |    4 +-
 x2gobroker/tests/test_broker_inifile.py            |  142 +++---------
 x2gobroker/tests/test_broker_zeroconf.py           |    2 -
 x2gobroker/tests/test_web_plain_zeroconf.py        |    9 +-
 x2gobroker/tests/test_web_uccs_zeroconf.py         |   80 -------
 x2gobroker/uccsjson.py                             |  241 --------------------
 x2gobroker/web/uccs.py                             |  128 -----------
 21 files changed, 181 insertions(+), 656 deletions(-)
 delete mode 100644 debian/x2gobroker-cgi.install
 create mode 100644 debian/x2gobroker-wsgi.install
 create mode 100644 debian/x2gobroker-wsgi.links
 copy debian/{x2gobroker-daemon.postinst => x2gobroker-wsgi.postinst} (100%)
 copy debian/{x2gobroker-daemon.postrm => x2gobroker-wsgi.postrm} (84%)
 create mode 100644 etc/x2gobroker-wsgi.apache.conf
 delete mode 100644 x2gobroker/tests/test_web_uccs_zeroconf.py
 delete mode 100644 x2gobroker/uccsjson.py
 delete mode 100644 x2gobroker/web/uccs.py

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index be2985b..caddae8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,10 @@
 x2gobroker (0.0.1.1-0~x2go1) UNRELEASED; urgency=low
 
   * New upstream version (0.0.1.1):
-    - Add command and directrdp session profile parameters to defaults.
-    - Fix wrong usage of session option »cmd«, has to be »command«.
+    - Add WSGI support to X2Go Session Broker. Allows plugging into
+      Apache2 by using the mod_wsgi module.
+  * /debian/control:
+    + Fix --root parameter in DEB_PYTHON_INSTALL_ARGS.
 
  -- Mike Gabriel <mike.gabriel at das-netzwerkteam.de>  Sun, 10 Mar 2013 13:00:32 +0100
 
diff --git a/debian/control b/debian/control
index eb7187c..45e0eae 100644
--- a/debian/control
+++ b/debian/control
@@ -1,5 +1,5 @@
 Source: x2gobroker
-Section: python
+Section: misc
 Priority: optional
 Maintainer: X2Go Developers <x2go-dev at lists.berlios.de>
 Uploaders:
@@ -13,14 +13,47 @@ Build-Depends:
  python-setuptools,
  python-nose,
  python-paste,
-Standards-Version: 3.9.3
-XS-Python-Version: >= 2.4
+Standards-Version: 3.9.4
 
-Package: x2gobroker
+Package: python-x2gobroker
+Section: python
 Architecture: all
 Depends:
+ ${python:Depends},
  ${misc:Depends},
+ python,
+ python-pampy,
+ python-netaddr,
+ python-tornado,
+ python-paramiko,
+Description: X2Go http(s) based session broker (Python modules)
+ X2Go is a server based computing environment with
+    - session resuming
+    - low bandwidth support
+    - LDAP support
+    - client side mass storage mounting support
+    - client side printing support
+    - audio support
+    - authentication by smartcard and USB stick
+ .
+ The session broker is a server tool for X2Go that
+ tells your X2Go Client application in a terminal
+ server cluster what servers and session types are
+ most appropriate for the user in front of the
+ X2Go terminal.
+ .
+ A session broker is most useful in load balanced
+ X2Go server farms.
+ .
+ This package contains common files needed by all X2Go session
+ brokers being package for this distribution.
+XS-Python-Version: >= 2.6
+
+Package: x2gobroker
+Architecture: all
+Depends:
  ${python:Depends},
+ ${misc:Depends},
  python,
  python-argparse,
  python-setproctitle,
@@ -52,13 +85,13 @@ Description: X2Go http(s) based session broker (executable)
 Package: x2gobroker-authservice
 Architecture: all
 Depends:
+ ${python:Depends},
+ ${misc:Depends},
  python,
  python-argparse,
  python-setproctitle,
- ${misc:Depends},
- ${python:Depends},
 Suggests:
- apache2 | httpd,
+ x2gobroker-daemon,
 Description: X2Go http(s) based session broker (PAM authentication service)
  X2Go is a server based computing environment with
     - session resuming
@@ -85,13 +118,10 @@ Package: x2gobroker-daemon
 Architecture: all
 Depends:
  ${misc:Depends},
- ${python:Depends},
  adduser,
  x2gobroker (>= ${source:Version}), x2gobroker (<< ${source:Version}.1~),
 Recommends:
  x2gobroker-authservice,
-Suggests:
- apache2 | httpd,
 Description: X2Go http(s) based session broker (daemon)
  X2Go is a server based computing environment with
     - session resuming
@@ -115,48 +145,17 @@ Description: X2Go http(s) based session broker (daemon)
  installs the X2Go Session Broker as standalone
  daemon.
 
-#Package: x2gobroker-cgi
-#Architecture: all
-#Depends:
-# ${misc:Depends},
-# ${python:Depends},
-#Suggests:
-# apache2 | httpd,
-#Description: X2Go http(s) based session broker (CGI)
-# X2Go is a server based computing environment with
-#    - session resuming
-#    - low bandwidth support
-#    - LDAP support
-#    - client side mass storage mounting support
-#    - client side printing support
-#    - audio support
-#    - authentication by smartcard and USB stick
-# .
-# The session broker is a server tool for X2Go that
-# tells your X2Go Client application in a terminal
-# server cluster what servers and session types are
-# most appropriate for the user in front of the
-# X2Go terminal.
-# .
-# A session broker is most useful in load balanced
-# X2Go server farms.
-# .
-# This package contains a configuration that installs
-# the X2Go Session Broker as a CGI script so it
-# can be run from within an existing httpd server.
-
-Package: python-x2gobroker
+Package: x2gobroker-wsgi
 Architecture: all
 Depends:
  ${misc:Depends},
  ${python:Depends},
- python-pampy,
- python-netaddr,
- python-tornado,
- python-paramiko,
+ python,
+ adduser,
+ python-wsgilog,
 Suggests:
- apache2 | httpd,
-Description: X2Go http(s) based session broker (Python modules)
+ apache2,
+Description: X2Go http(s) based session broker (CGI)
  X2Go is a server based computing environment with
     - session resuming
     - low bandwidth support
@@ -175,16 +174,21 @@ Description: X2Go http(s) based session broker (Python modules)
  A session broker is most useful in load balanced
  X2Go server farms.
  .
- This package contains common files needed by all X2Go session
- brokers being package for this distribution.
+ This package contains an Apache2 configuration that
+ installs the X2Go Session Broker as a WSGI application
+ into a running Apache2 httpd.
 
 Package: x2gobroker-agent
 Architecture: any
 Depends:
  ${shlibs:Depends},
+ ${python:Depends},
  ${misc:Depends},
- perl,
  python,
+ python-setproctitle,
+ python-argparse,
+ python-paramiko,
+ perl,
  adduser,
  x2goserver,
 Description: X2Go http(s) based session broker (common files)
diff --git a/debian/rules b/debian/rules
index 28be4dc..321f0cc 100755
--- a/debian/rules
+++ b/debian/rules
@@ -22,12 +22,12 @@
 #export DEB_CFLAGS_MAINT_APPEND = -Wall
 #include /usr/share/dpkg/buildflags.mk
 
-DEB_PYTHON_SYSTEM = $(shell test -f /usr/bin/dh_python2 && echo "" || echo "pysupport")
-DEB_PYTHON_INSTALL_ARGS_ALL = --install-layout=deb --single-version-externally-managed
-
 include /usr/share/cdbs/1/rules/debhelper.mk
-include /usr/share/cdbs/1/class/makefile.mk
+
+DEB_PYTHON_SYSTEM = $(shell test -f /usr/bin/dh_python2 && echo "" || echo "pysupport")
+DEB_PYTHON_INSTALL_ARGS_python-x2gobroker ?= --root=$(DEB_DESTDIR) --prefix=$(DEB_PYTHON_PREFIX_ARG) --no-compile -O0 --install-layout=deb
 include /usr/share/cdbs/1/class/python-distutils.mk
+include /usr/share/cdbs/1/class/makefile.mk
 
 # needed when building with pysupport (e.g. on Ubuntu lucid)
 common-binary-indep::
diff --git a/debian/x2gobroker-agent.postrm b/debian/x2gobroker-agent.postrm
index bc535ee..9b74861 100755
--- a/debian/x2gobroker-agent.postrm
+++ b/debian/x2gobroker-agent.postrm
@@ -18,11 +18,17 @@ set -e
 
 case "$1" in
 	purge)
+
 		if dpkg-statoverride --list /usr/lib/x2go/x2gobroker-agent 1>/dev/null; then
 			dpkg-statoverride --remove /usr/lib/x2go/x2gobroker-agent
 		fi
 
-		if [ ! -d /usr/share/doc/x2gobroker-daemon ]; then
+		if [ ! -d /usr/share/doc/x2gobroker-daemon ] && [ ! -d /usr/share/doc/x2gobroker-wsgi ]; then
+
+			if dpkg-statoverride --list /var/log/x2gobroker 1>/dev/null; then
+				dpkg-statoverride --remove /var/log/x2gobroker
+			fi
+
 			# remove user/group x2gobroker from system (if not in use by x2gobroker-daemon
 			getent passwd x2gobroker 1>/dev/null && deluser x2gobroker
 			getent group x2gobroker 1>/dev/null && delgroup x2gobroker
diff --git a/debian/x2gobroker-cgi.install b/debian/x2gobroker-cgi.install
deleted file mode 100644
index e69de29..0000000
diff --git a/debian/x2gobroker-daemon.postrm b/debian/x2gobroker-daemon.postrm
index 34a8687..a1e2845 100755
--- a/debian/x2gobroker-daemon.postrm
+++ b/debian/x2gobroker-daemon.postrm
@@ -19,11 +19,12 @@ set -e
 case "$1" in
 	purge)
 
-		if dpkg-statoverride --list /var/log/x2gobroker 1>/dev/null; then
-			dpkg-statoverride --remove /var/log/x2gobroker
-		fi
+		if [ ! -d /usr/share/doc/x2gobroker-agent ] && [ ! -d /usr/share/doc/x2gobroker-wsgi ]; then
+
+			if dpkg-statoverride --list /var/log/x2gobroker 1>/dev/null; then
+				dpkg-statoverride --remove /var/log/x2gobroker
+			fi
 
-		if [ ! -d /usr/share/doc/x2gobroker-agent ]; then
 			# remove user/group x2gobroker from system (only if not in use by x2gobroker-agent
 			getent passwd x2gobroker 1>/dev/null && deluser x2gobroker
 			getent group x2gobroker 1>/dev/null && delgroup x2gobroker
diff --git a/debian/x2gobroker-wsgi.install b/debian/x2gobroker-wsgi.install
new file mode 100644
index 0000000..40b18c5
--- /dev/null
+++ b/debian/x2gobroker-wsgi.install
@@ -0,0 +1 @@
+etc/x2gobroker-wsgi.apache.conf /etc/x2go/
\ No newline at end of file
diff --git a/debian/x2gobroker-wsgi.links b/debian/x2gobroker-wsgi.links
new file mode 100644
index 0000000..99e592a
--- /dev/null
+++ b/debian/x2gobroker-wsgi.links
@@ -0,0 +1 @@
+/etc/x2go/x2gobroker-wsgi.apache.conf /etc/apache2/conf.d/x2gobroker-wsgi
\ No newline at end of file
diff --git a/debian/x2gobroker-daemon.postinst b/debian/x2gobroker-wsgi.postinst
similarity index 100%
copy from debian/x2gobroker-daemon.postinst
copy to debian/x2gobroker-wsgi.postinst
diff --git a/debian/x2gobroker-daemon.postrm b/debian/x2gobroker-wsgi.postrm
similarity index 84%
copy from debian/x2gobroker-daemon.postrm
copy to debian/x2gobroker-wsgi.postrm
index 34a8687..006022f 100755
--- a/debian/x2gobroker-daemon.postrm
+++ b/debian/x2gobroker-wsgi.postrm
@@ -19,11 +19,12 @@ set -e
 case "$1" in
 	purge)
 
-		if dpkg-statoverride --list /var/log/x2gobroker 1>/dev/null; then
-			dpkg-statoverride --remove /var/log/x2gobroker
-		fi
+		if [ ! -d /usr/share/doc/x2gobroker-agent ] && [ ! -d /usr/share/doc/x2gobroker-daemon ]; then
+
+			if dpkg-statoverride --list /var/log/x2gobroker 1>/dev/null; then
+				dpkg-statoverride --remove /var/log/x2gobroker
+			fi
 
-		if [ ! -d /usr/share/doc/x2gobroker-agent ]; then
 			# remove user/group x2gobroker from system (only if not in use by x2gobroker-agent
 			getent passwd x2gobroker 1>/dev/null && deluser x2gobroker
 			getent group x2gobroker 1>/dev/null && delgroup x2gobroker
diff --git a/etc/broker/x2gobroker-sessionprofiles.conf b/etc/broker/x2gobroker-sessionprofiles.conf
index 8d060ec..dc79a6b 100644
--- a/etc/broker/x2gobroker-sessionprofiles.conf
+++ b/etc/broker/x2gobroker-sessionprofiles.conf
@@ -29,7 +29,6 @@
 
 
 [DEFAULT]
-command=TERMINAL
 defsndport=true
 useiconv=false
 iconvfrom=UTF-8
@@ -53,14 +52,13 @@ applications=TERMINAL,WWWBROWSER,MAILCLIENT,OFFICE
 multidisp=false
 sshproxyport=22
 sound=true
-rootless=true
+rootless=false
 iconvto=UTF-8
 soundtunnel=true
 dpi=96
 sshport=22
 setdpi=0
 pack=16m-jpeg
-directrdp=false
 
 ### EXAMPLES: Below you find some config examples. Adapt them to your needs or
 ### simply write your own session profiles and remove the examples below.
diff --git a/etc/x2gobroker-wsgi.apache.conf b/etc/x2gobroker-wsgi.apache.conf
new file mode 100644
index 0000000..92c432f
--- /dev/null
+++ b/etc/x2gobroker-wsgi.apache.conf
@@ -0,0 +1,43 @@
+# enable debugging
+#SetEnv X2GOBROKER_DEBUG off
+
+# the default user/group that this WSGI application runs as
+#X2GOBROKER_DAEMON_USER=x2gobroker
+#X2GOBROKER_DAEMON_GROUP=x2gobroker
+WSGIDaemonProcess x2gobroker user=x2gobroker group=x2gobroker processes=5 threads=15
+
+# default broker backend (default: zeroconf)
+SetEnv X2GOBROKER_DEFAULT_BACKEND zeroconf
+#SetEnv X2GOBROKER_DEFAULT_BACKEND inifile
+#SetEnv X2GOBROKER_DEFAULT_BACKEND ldap
+#SetEnv X2GOBROKER_DEFAULT_BACKEND <some-other-broker-backend>
+
+# path to the X2Go Session Broker's configuration file
+#SetEnv X2GOBROKER_CONFIG /etc/x2go/x2gobroker.conf
+
+# path to the X2Go Session Broker's session profiles file (when using the inifile backend)
+#SetEnv X2GOBROKER_SESSIONPROFILES /etc/x2go/broker/x2gobroker-sessionprofiles.conf
+
+# path to the X2Go Session Broker's agent command
+#SetEnv X2GOBROKER_AGENT_CMD /usr/lib/x2go/x2gobroker-agent
+
+# authentication socket of the X2Go Broker's PAM Authentication Service
+#SetEnv X2GOBROKER_AUTHSOCKET /run/x2gobroker/x2gobroker-authservice.socket
+
+# if you have to-be-statically-served files somewhere below the broker URL
+#Alias /x2gobroker/static /some/static/path/
+
+WSGIScriptAlias /x2gobroker /usr/sbin/x2gobroker
+WSGIProcessGroup x2gobroker
+
+<Directory /usr/sbin/x2gobroker>
+    Order deny,allow
+    Deny from all
+
+    # grant explicit access below
+    Allow from localhost
+    Allow from localhost-ip6
+
+    Options +FollowSymLinks
+    Options -Indexes
+</Directory>
diff --git a/sbin/x2gobroker b/sbin/x2gobroker
index 894b3c0..bc28d0b 100755
--- a/sbin/x2gobroker
+++ b/sbin/x2gobroker
@@ -27,9 +27,6 @@ import argparse
 import socket
 import logging
 import thread
-import tornado.web
-import tornado.httpserver
-import tornado.ioloop
 
 try:
     import x2gobroker.defaults
@@ -110,7 +107,6 @@ if __name__ == "__main__":
 
 # import classes serving the different web.py URLs
 import x2gobroker.web.plain
-import x2gobroker.web.uccs
 #import x2gobroker.web.json
 #import x2gobroker.web.html
 import x2gobroker.web.extras
@@ -126,10 +122,13 @@ urls = ( ('/plain/(.*)', x2gobroker.web.plain.X2GoBrokerWeb,),
 settings = {
     'log_function': tornado_log_request,
 }
-application = tornado.web.Application(urls, **settings)
 
 # run the web.py standalone daemon...
 if __name__ == "__main__":
+    import tornado.web
+    import tornado.httpserver
+    import tornado.ioloop
+    application = tornado.web.Application(urls, **settings)
     try:
         if x2gobroker.defaults.X2GOBROKER_SSL_CERTFILE and x2gobroker.defaults.X2GOBROKER_SSL_KEYFILE:
             # switch on https:// mode
@@ -146,3 +145,21 @@ if __name__ == "__main__":
         tornado.ioloop.IOLoop.instance().start()
     except socket.error, e:
         print (e)
+else:
+    import tornado.wsgi
+    import wsgilog
+    _tornado_application = tornado.wsgi.WSGIApplication(urls, **settings)
+
+    def _application(environ, start_response):
+
+        # some WSGI implementations do not like the SCRIPT_NAME env var
+        if 'SCRIPT_NAME' in environ:
+            del environ['SCRIPT_NAME']
+
+        # make sure the httpd server's environment is set as os.environ
+        os.environ = environ
+        reload(x2gobroker.defaults)
+
+        return _tornado_application(environ, start_response)
+
+    application = wsgilog.WsgiLog(_application, tohtml=True, tofile=True, tostream=False, toprint=False, file='/var/log/x2gobroker/wsgi.log', )
diff --git a/x2gobroker/brokers/zeroconf_broker.py b/x2gobroker/brokers/zeroconf_broker.py
index 6cb83ad..5970659 100644
--- a/x2gobroker/brokers/zeroconf_broker.py
+++ b/x2gobroker/brokers/zeroconf_broker.py
@@ -36,7 +36,7 @@ class X2GoBroker(base.X2GoBroker):
 
     def list_profiles(self, username):
 
-        _list_of_profiles = {
+        list_of_profiles = {
             uuid.uuid4(): {
                 'user': u'',
                 'defsndport': True,
@@ -74,11 +74,6 @@ class X2GoBroker(base.X2GoBroker):
                 'pack': u'16m-jpeg',
             },
         }
-        list_of_profiles = {}
-        for profile_id in _list_of_profiles.keys():
-            profile = self.get_profile_defaults()
-            profile.update(_list_of_profiles[profile_id])
-            list_of_profiles[profile_id] = profile
         return list_of_profiles
 
     def select_session(self, profile_id, username=None):
diff --git a/x2gobroker/defaults.py b/x2gobroker/defaults.py
index 9e61d83..fcbb8ca 100644
--- a/x2gobroker/defaults.py
+++ b/x2gobroker/defaults.py
@@ -161,7 +161,6 @@ X2GOBROKER_CONFIG_DEFAULTS = {
 # defaults for X2Go Sessino Broker session profiles file
 X2GOBROKER_SESSIONPROFILE_DEFAULTS = {
     u'DEFAULT': {
-        u'command': u'TERMINAL',
         u'defsndport': True,
         u'useiconv': False,
         u'iconvfrom': u'UTF-8',
@@ -185,7 +184,7 @@ X2GOBROKER_SESSIONPROFILE_DEFAULTS = {
         u'multidisp': False,
         u'sshproxyport': 22,
         u'sound': True,
-        u'rootless': True,
+        u'rootless': False,
         u'iconvto': u'UTF-8',
         u'soundtunnel': True,
         u'dpi': 96,
@@ -194,7 +193,6 @@ X2GOBROKER_SESSIONPROFILE_DEFAULTS = {
         u'pack': u'16m-jpeg',
         u'user': '',
         u'host': [ u'localhost', ],
-        u'directrdp': False,
         u'acl-users-allow': [],
         u'acl-users-deny': [],
         u'acl-users-order': '',
diff --git a/x2gobroker/tests/test_broker_base.py b/x2gobroker/tests/test_broker_base.py
index 1371724..0bda18e 100644
--- a/x2gobroker/tests/test_broker_base.py
+++ b/x2gobroker/tests/test_broker_base.py
@@ -274,7 +274,6 @@ check-credentials = false
     def test_getdefaultprofile(self):
         base_backend = self._init_base_backend()
         _expected_profile = {
-            'command': 'TERMINAL',
             'defsndport': True,
             'useiconv': False,
             'iconvfrom': 'UTF-8',
@@ -298,7 +297,7 @@ check-credentials = false
             'multidisp': False,
             'sshproxyport': 22,
             'sound': True,
-            'rootless': True,
+            'rootless': False,
             'iconvto': 'UTF-8',
             'soundtunnel': True,
             'dpi': 96,
@@ -307,7 +306,6 @@ check-credentials = false
             'pack': '16m-jpeg',
             'user': '',
             'host': [u'localhost'],
-            'directrdp': False,
         }
         _profile = base_backend.get_profile_defaults()
         self.assertEqual(len(_expected_profile.keys()), len(_profile.keys()))
diff --git a/x2gobroker/tests/test_broker_inifile.py b/x2gobroker/tests/test_broker_inifile.py
index 6bc62f8..35b4289 100644
--- a/x2gobroker/tests/test_broker_inifile.py
+++ b/x2gobroker/tests/test_broker_inifile.py
@@ -47,96 +47,6 @@ class TestX2GoBrokerBackendInifile(unittest.TestCase):
         for _profile_id in _profile_ids:
             self.assertTrue( ( 'default' not in inifile_backend.get_profile(_profile_id).keys() ) )
 
-    # TEST COMPLETION OF DEFAULTS FROM CODE IN defaults.py
-
-    def test_getprofilecompletion(self):
-        _session_profiles = """
-[DEFAULT]
-exports =
-fullscreen = false
-width = 800
-height = 600
-applications = TERMINAL, WWWBROWSER
-
-[testprofile]
-user = foo
-command = GNOME
-
-"""
-        tf = tempfile.NamedTemporaryFile()
-        print >> tf, _session_profiles
-        tf.seek(0)
-        inifile_backend = inifile.X2GoBroker(profile_config_file=tf.name)
-        _expected_defaults = copy.deepcopy(x2gobroker.defaults.X2GOBROKER_SESSIONPROFILE_DEFAULTS['DEFAULT'])
-        for key in copy.deepcopy(_expected_defaults).keys():
-            if key.startswith('acl-'):
-                del _expected_defaults[key]
-        _expected_defaults.update( {
-            u'exports': '',
-            u'fullscreen': False,
-            u'width': 800,
-            u'height': 600,
-            u'applications': ['TERMINAL','WWWBROWSER',],
-            u'user': 'foo',
-            u'command': 'GNOME',
-        } )
-        # just testing the directrdp hard-coded defaults
-        _expected_defaults.update( {
-            u'directrdp': False,
-        } )
-        _expected_profile = copy.deepcopy(_expected_defaults)
-        _profile = inifile_backend.get_profile('testprofile')
-        print _expected_defaults
-        for key in _expected_profile.keys():
-            self.assertTrue( ( key in _profile.keys() ) )
-        for key in _profile.keys():
-            self.assertTrue( ( key in _expected_profile.keys()  and _profile[key] == _expected_profile[key] ) )
-
-    # TEST COMPLETION OF DEFAULTS FROM CODE IN defaults.py
-
-    def test_getprofilecompletion(self):
-        _session_profiles = """
-[DEFAULT]
-exports =
-fullscreen = false
-width = 800
-height = 600
-applications = TERMINAL, WWWBROWSER
-
-[testprofile]
-user = foo
-command = GNOME
-
-"""
-        tf = tempfile.NamedTemporaryFile()
-        print >> tf, _session_profiles
-        tf.seek(0)
-        inifile_backend = inifile.X2GoBroker(profile_config_file=tf.name)
-        _expected_defaults = copy.deepcopy(x2gobroker.defaults.X2GOBROKER_SESSIONPROFILE_DEFAULTS['DEFAULT'])
-        for key in copy.deepcopy(_expected_defaults).keys():
-            if key.startswith('acl-'):
-                del _expected_defaults[key]
-        _expected_defaults.update( {
-            u'exports': '',
-            u'fullscreen': False,
-            u'width': 800,
-            u'height': 600,
-            u'applications': ['TERMINAL','WWWBROWSER',],
-            u'user': 'foo',
-            u'command': 'GNOME',
-        } )
-        # just testing the directrdp hard-coded defaults
-        _expected_defaults.update( {
-            u'directrdp': False,
-        } )
-        _expected_profile = copy.deepcopy(_expected_defaults)
-        _profile = inifile_backend.get_profile('testprofile')
-        for key in _expected_profile.keys():
-            self.assertTrue( ( key in _profile.keys() ) )
-        for key in _profile.keys():
-            self.assertTrue( ( key in _expected_profile.keys()  and _profile[key] == _expected_profile[key] ) )
-
-
     ### TEST SESSION PROFILES: get_profile_defaults()
 
     def test_getprofiledefaults(self):
@@ -164,16 +74,16 @@ applications = TERMINAL, WWWBROWSER
 
 [testprofile1]
 user = foo
-command = GNOME
+cmd = GNOME
 
 [testprofile2]
 user = bar
-command = KDE
+cmd = KDE
 fullscreen = true
 
 [testprofile3]
 user = bar
-command = KDE
+cmd = KDE
 fullscreen = true
 acl-users-deny = ALL
 acl-users-allow = foo,bar
@@ -192,23 +102,23 @@ acl-users-order = deny-allow
             u'fullscreen': False,
             u'width': 800,
             u'height': 600,
-            u'applications': ['TERMINAL','WWWBROWSER',],
+            u'applications': ['TERMINAL','WWWBROWSER',]
         } )
         _expected_profile1 = copy.deepcopy(_expected_defaults)
         _expected_profile1.update({
             u'user': 'foo',
-            u'command': 'GNOME',
+            u'cmd': 'GNOME',
         })
         _expected_profile2 = copy.deepcopy(_expected_defaults)
         _expected_profile2.update({
             u'user': 'bar',
-            u'command': 'KDE',
+            u'cmd': 'KDE',
             u'fullscreen': True,
         })
         _expected_profile3 = copy.deepcopy(_expected_defaults)
         _expected_profile3.update({
             u'user': 'bar',
-            u'command': 'KDE',
+            u'cmd': 'KDE',
             u'fullscreen': True,
         })
         _profile1 = inifile_backend.get_profile('testprofile1')
@@ -244,16 +154,16 @@ acl-clients-allow = 10.0.0.0/16,10.1.0.0/16,admin-1.intern,admin-2.intern
 
 [testprofile1]
 user = foo
-command = GNOME
+cmd = GNOME
 
 [testprofile2]
 user = foo
-command = GNOME
+cmd = GNOME
 acl-clients-deny = 10.0.2.0/24,ALL
 
 [testprofile3]
 user = bar
-command = KDE
+cmd = KDE
 fullscreen = true
 acl-users-deny = ALL
 acl-users-allow = foo,bar
@@ -313,15 +223,15 @@ applications = TERMINAL, WWWBROWSER
 
 [testprofile1]
 user =
-command = GNOME
+cmd = GNOME
 
 [testprofile2]
 user =
-command = XFCE
+cmd = XFCE
 
 [testprofile3]
 user =
-command = KDE
+cmd = KDE
 fullscreen = true
 """
         tf = tempfile.NamedTemporaryFile()
@@ -363,21 +273,21 @@ acl-groups-order = deny-allow
 
 [testprofile1]
 user =
-command = GNOME
+cmd = GNOME
 acl-users-allow = flip
 acl-users-deny = ALL
 acl-users-order = deny-allow
 
 [testprofile2]
 user =
-command = XFCE
+cmd = XFCE
 acl-users-allow = thekla
 acl-users-deny = ALL
 acl-users-order = deny-allow
 
 [testprofile3]
 user =
-command = KDE
+cmd = KDE
 fullscreen = true
 acl-users-deny = willi
 acl-users-order = deny-allow
@@ -392,40 +302,40 @@ acl-users-order = deny-allow
         list_of_profile_ids = list_of_profiles.keys()
         list_of_profile_ids.sort()
         self.assertEqual(list_of_profile_ids, ['testprofile1'])
-        self.assertEqual(list_of_profiles['testprofile1']['command'], 'GNOME')
+        self.assertEqual(list_of_profiles['testprofile1']['cmd'], 'GNOME')
 
         username_m = 'maja'
         list_of_profiles = inifile_backend.list_profiles(username_m)
         list_of_profile_ids = list_of_profiles.keys()
         list_of_profile_ids.sort()
         self.assertEqual(list_of_profile_ids, ['testprofile1', 'testprofile2', 'testprofile3'])
-        self.assertEqual(list_of_profiles['testprofile1']['command'], 'GNOME')
-        self.assertEqual(list_of_profiles['testprofile2']['command'], 'XFCE')
-        self.assertEqual(list_of_profiles['testprofile3']['command'], 'KDE')
+        self.assertEqual(list_of_profiles['testprofile1']['cmd'], 'GNOME')
+        self.assertEqual(list_of_profiles['testprofile2']['cmd'], 'XFCE')
+        self.assertEqual(list_of_profiles['testprofile3']['cmd'], 'KDE')
 
         username_k = 'kassandra'
         list_of_profiles = inifile_backend.list_profiles(username_k)
         list_of_profile_ids = list_of_profiles.keys()
         list_of_profile_ids.sort()
         self.assertEqual(list_of_profile_ids, ['testprofile1', 'testprofile2', 'testprofile3'])
-        self.assertEqual(list_of_profiles['testprofile1']['command'], 'GNOME')
-        self.assertEqual(list_of_profiles['testprofile2']['command'], 'XFCE')
-        self.assertEqual(list_of_profiles['testprofile3']['command'], 'KDE')
+        self.assertEqual(list_of_profiles['testprofile1']['cmd'], 'GNOME')
+        self.assertEqual(list_of_profiles['testprofile2']['cmd'], 'XFCE')
+        self.assertEqual(list_of_profiles['testprofile3']['cmd'], 'KDE')
 
         username_t = 'thekla'
         list_of_profiles = inifile_backend.list_profiles(username_t)
         list_of_profile_ids = list_of_profiles.keys()
         list_of_profile_ids.sort()
         self.assertEqual(list_of_profile_ids, ['testprofile2'])
-        self.assertEqual(list_of_profiles['testprofile2']['command'], 'XFCE')
+        self.assertEqual(list_of_profiles['testprofile2']['cmd'], 'XFCE')
 
         username_w = 'willi'
         list_of_profiles = inifile_backend.list_profiles(username_w)
         list_of_profile_ids = list_of_profiles.keys()
         list_of_profile_ids.sort()
         self.assertEqual(list_of_profile_ids, ['testprofile1', 'testprofile2'])
-        self.assertEqual(list_of_profiles['testprofile1']['command'], 'GNOME')
-        self.assertEqual(list_of_profiles['testprofile2']['command'], 'XFCE')
+        self.assertEqual(list_of_profiles['testprofile1']['cmd'], 'GNOME')
+        self.assertEqual(list_of_profiles['testprofile2']['cmd'], 'XFCE')
 
     ### TEST: select_session() method
 
diff --git a/x2gobroker/tests/test_broker_zeroconf.py b/x2gobroker/tests/test_broker_zeroconf.py
index 485e8bd..0e97b66 100644
--- a/x2gobroker/tests/test_broker_zeroconf.py
+++ b/x2gobroker/tests/test_broker_zeroconf.py
@@ -63,8 +63,6 @@ class TestX2GoBrokerBackendZeroconf(unittest.TestCase):
                 'sshport': 22,
                 'setdpi': 0,
                 'pack': u'16m-jpeg',
-                # make sure, hard-coded defaults end up in the list_profiles() output of the zeroconf backend, as well
-                'directrdp': False,
             },
         }
         zeroconf_backend = x2gobroker.brokers.zeroconf_broker.X2GoBroker()
diff --git a/x2gobroker/tests/test_web_plain_zeroconf.py b/x2gobroker/tests/test_web_plain_zeroconf.py
index 8b98daf..dad829b 100644
--- a/x2gobroker/tests/test_web_plain_zeroconf.py
+++ b/x2gobroker/tests/test_web_plain_zeroconf.py
@@ -52,10 +52,11 @@ desktop-shell = KDE
         r.mustcontain('START_USER_SESSIONS')
         r.mustcontain('command=KDE')
         r.mustcontain('END_USER_SESSIONS')
-        r.mustcontain(no='<BR>',)
-        r.mustcontain(no='<br>',)
-        r.mustcontain(no='<BR />', )
-        r.mustcontain(no='<br />', )
+        # FIXME: get html tags out of the text/plain web renderer, needs patching of X2Go Client
+        #r.mustcontain(no='<BR>',)
+        #r.mustcontain(no='<br>',)
+        #r.mustcontain(no='<BR />', )
+        #r.mustcontain(no='<br />', )
         tf.close()
         _config = """
 [zeroconf]
diff --git a/x2gobroker/tests/test_web_uccs_zeroconf.py b/x2gobroker/tests/test_web_uccs_zeroconf.py
deleted file mode 100644
index 6c5d2b5..0000000
--- a/x2gobroker/tests/test_web_uccs_zeroconf.py
+++ /dev/null
@@ -1,80 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright (C) 2012 by Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
-#
-# X2Go Session Broker is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# X2Go Session Broker is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program; if not, write to the
-# Free Software Foundation, Inc.,
-# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
-
-import unittest
-import tempfile
-from paste.fixture import TestApp
-from nose.tools import *
-import tornado.wsgi
-import json
-
-# Python X2GoBroker modules
-import x2gobroker.defaults
-import x2gobroker.web.uccs
-
-urls = ( ('/uccs/(.*)', x2gobroker.web.uccs.X2GoBrokerWeb,) ,)
-application = tornado.wsgi.WSGIApplication(urls)
-
-class TestX2GoBrokerWebUccsZeroConf(unittest.TestCase):
-
-    ### TEST TASK: listsessions (you can influence the session command via the X2Go Broker's configurationfile)
-
-    def test_listsessions(self):
-        _expected_result = {
-            u'URL': u'http://localhost:8080/uccs/zeroconf',
-            u'AdditionalManagementServers': [],
-            u'Name': u'X2Go Session Broker',
-            u'RemoteDesktopServers': [
-                {
-                    u'Username': u'',
-                    u'Protocol': u'x2go',
-                    u'Name': u'LOCALHOST',
-                    u'URL': u'localhost:22',
-                    u'SessionTypeRequired': True,
-                    u'Password': None
-                },
-            ],
-        }
-        _config = """
-[global]
-enable-uccs-output=true
-
-[zeroconf]
-enable = true
-auth-mech = testsuite
-desktop-shell = KDE
-"""
-        tf = tempfile.NamedTemporaryFile()
-        print >> tf, _config
-        tf.seek(0)
-        x2gobroker.defaults.X2GOBROKER_CONFIG = tf.name
-        testApp = TestApp(application)
-        r = testApp.get('/uccs/zeroconf/', params={'user': 'test', 'password': 'sweet',  'task': 'listsessions', }, expect_errors=True)
-        assert_equal(r.status, 200)
-        body = r.normal_body
-        result = json.loads(body)
-        self.assertEqual(_expected_result, result)
-        tf.close()
-
-
-def test_suite():
-    from unittest import TestSuite, makeSuite
-    suite = TestSuite()
-    suite.addTest(makeSuite(TestX2GoBrokerWebUccsZeroConf))
-    return suite
diff --git a/x2gobroker/uccsjson.py b/x2gobroker/uccsjson.py
deleted file mode 100644
index abbcd80..0000000
--- a/x2gobroker/uccsjson.py
+++ /dev/null
@@ -1,241 +0,0 @@
-# Copyright (C) 2012 by Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
-# Copyright (C) 2012 by Oleksandr Shneyder <oleksandr.shneyder at obviously-nice.de>
-# Copyright (C) 2012 by Heinz-Markus Graesing <heinz-m.graesing at obviously-nice.de>
-#
-# X2Go Session Broker is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# X2Go Session Broker is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program; if not, write to the
-# Free Software Foundation, Inc.,
-# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
-
-import json
-
-def convert_to_builtin_type(obj):
-    """\
-    Helper function for converting Python objects to dictionaries.
-    Used for doing JSON dumps.
-
-    """
-    d = { }
-    d.update(obj.__dict__)
-    return d
-
-class ManagementServer():
-    """\
-    Base class for generating UCCS compatible JSON object.
-
-    """
-    def __init__(self, url, name):
-        """\
-        Initializ instance.
-
-        @param url: URL of the UCCS broker server
-        @type url: C{unicode}
-        @param name: human-readable, descriptive server name
-        @type name: C{unicode}
-
-        """
-        self.RemoteDesktopServers = []
-        self.AdditionalManagementServers = []
-        self.URL = url
-        self.Name = name
-
-    def set_default(self, ts_name):
-        """\
-        Define the default (terminal) server instance.
-
-        @param ts_name: name of the terminal server that is to be set as default
-        @type ts_name: C{unicode}
-
-        """
-        if isinstance(tsName, str):
-            self.DefaultServer = tsName
-        else:
-            raise TypeError("set_default expects a string argument")
-
-    def add_terminalserver(self, server):
-        """\
-        Add a terminal server to this management server object.
-
-        @param server: instance of class L{RDPServer} or L{X2GoServer}.
-        @type server: C{obj}
-
-        """
-        self.RemoteDesktopServers.append(server)
-
-    # NOT USED!!!
-    #def add_additional_management_server(self, amserver):
-    #    if isinstance(amserver, AdditionalManagementServer):
-    #        self.AdditionalManagementServers.append(amserver)
-    #    else:
-    #        raise TypeError("add_additional_management_server expects a "\
-    #            "AdditionalManagementServer argument")
-
-    def toJson(self):
-        """\
-        Dump this instance as JSON object.
-
-        """
-        return json.dumps(self, default=convert_to_builtin_type)
-
-
-# NOT USED!!!
-#class AdditionalManagementServer():
-#    def __init__(self, url, name):
-#        self.URL = url
-#        self.Name = name
-
-
-class RDPServer():
-    """\
-    Instantiate a UCCS compatible RDP server session profile object.
-
-    """
-    def __init__(self, host, name, username=None, password=None):
-        """\
-        @param host: hostname of RDP server host
-        @type host: C{unicode}
-        @param name: session profile name
-        @type name: C{unicode}
-        @param username: username to be used for login
-        @type username: C{unicode}
-        @param password: password to be used for login
-        @type password: C{unicode}
-
-        """
-        self.URL = unicode(host)
-        self.Name = unicode(name)
-        self.Protocol = u'freerdp'
-        self.DomainRequired = unicode(True)
-        self.Username = unicode(username)
-        self.Password = unicode(password)
-
-    def set_domain(self, domain):
-        """\
-        Set the domain for this RDP server.
-
-        @param domain: the domain name to be set
-        @type domain: C{unicode}
-
-        @raise TypeError: domain has to be C{str} or C{unicode}
-
-        """
-        if isinstance(domainName, str):
-            self.WindowsDomain = unicode(domain)
-        elif isinstance(domainName, unicode):
-            self.WindowsDomain = domain
-        else:
-            raise TypeError("set_domain() expects a string or unicode argument")
-
-    def toJson(self):
-        """\
-        Dump this instance as JSON object.
-
-        """
-        return json.dumps(self, default=convert_to_builtin_type)
-
-
-class ICAServer():
-    """\
-    Instantiate a UCCS compatible ICA server session profile object.
-
-    """
-    def __init__(self, host, name, username=None, password=None):
-        """\
-        @param host: hostname of ICA server host
-        @type host: C{unicode}
-        @param name: session profile name
-        @type name: C{unicode}
-        @param username: username to be used for login
-        @type username: C{unicode}
-        @param password: password to be used for login
-        @type password: C{unicode}
-
-        """
-        self.URL = unicode(host)
-        self.Name = unicode(name)
-        self.Protocol = u'ica'
-        self.DomainRequired = unicode(True)
-        self.Username = unicode(username)
-        self.Password = unicode(password)
-
-    def set_domain(self, domain):
-        """\
-        Set the domain for this ICA server.
-
-        @param domain: the domain name to be set
-        @type domain: C{unicode}
-
-        @raise TypeError: domain has to be C{str} or C{unicode}
-
-        """
-        if isinstance(domainName, str):
-            self.WindowsDomain = unicode(domain)
-        elif isinstance(domainName, unicode):
-            self.WindowsDomain = domain
-        else:
-            raise TypeError("set_domain() expects a string or unicode argument")
-
-    def toJson(self):
-        """\
-        Dump this instance as JSON object.
-
-        """
-        return json.dumps(self, default=convert_to_builtin_type)
-
-
-class X2GoServer():
-    """\
-    Instantiate a UCCS compatible X2Go Server session profile object.
-
-    """
-    def __init__(self, host, name, username=None, password=None):
-        """\
-        @param host: hostname of X2Go Server host
-        @type host: C{unicode}
-        @param name: session profile name
-        @type name: C{unicode}
-        @param username: username to be used for login
-        @type username: C{unicode}
-        @param password: password to be used for login
-        @type password: C{unicode}
-
-        """
-        self.URL = host
-        self.Name = name
-        self.Protocol = 'x2go'
-        self.SessionTypeRequired = True
-        self.Username = username
-        self.Password = password
-
-    def set_session_type(self, session_type):
-        """\
-        Set the session type to be used with this X2Go Server.
-
-        @param session_type: the session type to be set
-        @type session_type: C{unicode}
-
-        @raise TypeError: session_type has to be C{str} or C{unicode}
-
-        """
-        if isinstance(domainName, str):
-            self.SessionType = sessiontypeName
-        else:
-            raise TypeError("set_session_type() expects a string or unicode argument")
-
-    def toJson(self):
-        """\
-        Dump this instance as JSON object.
-
-        """
-        return json.dumps(self, default=convert_to_builtin_type)
-
diff --git a/x2gobroker/web/uccs.py b/x2gobroker/web/uccs.py
deleted file mode 100644
index 394583c..0000000
--- a/x2gobroker/web/uccs.py
+++ /dev/null
@@ -1,128 +0,0 @@
-#!/usr/bin/env python
-
-# This file is part of the  X2Go Project - http://www.x2go.org
-# Copyright (C) 2011-2012 by Oleksandr Shneyder <oleksandr.shneyder at obviously-nice.de>
-# Copyright (C) 2011-2012 by Heinz-Markus Graesing <heinz-m.graesing at obviously-nice.de>
-# Copyright (C) 2012 by Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
-#
-# X2Go Session Broker is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# X2Go Session Broker is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program; if not, write to the
-# Free Software Foundation, Inc.,
-# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
-
-# modules
-import types
-import tornado.web
-from tornado.escape import native_str, parse_qs_bytes
-
-# Python X2Go Broker modules
-import x2gobroker.defaults
-
-from x2gobroker.loggers import logger_broker, logger_error
-import x2gobroker.uccsjson
-
-class X2GoBrokerWeb(tornado.web.RequestHandler):
-
-    http_header_items = {
-        'Content-Type': 'text/plain; charset=utf-8',
-        'Expires': '+1h',
-    }
-
-    def _gen_http_header(self):
-
-        for http_header_item in self.http_header_items.keys():
-            self.set_header(http_header_item, self.http_header_items[http_header_item])
-
-    def get(self, backend):
-        if x2gobroker.defaults.X2GOBROKER_DEBUG:
-            self._gen_http_header()
-            logger_broker.warn('GET http request detected, if unwanted: disable X2GOBROKER_DEBUG')
-            return self.post(backend)
-        raise tornado.web.HTTPError(404)
-
-    def post(self, backend):
-
-        if not backend:
-            backend = x2gobroker.defaults.X2GOBROKER_DEFAULT_BACKEND
-        else:
-            backend = backend.rstrip('/')
-
-        # silence pyflakes...
-        broker_backend = None
-        # dynamically detect broker backend from given URL
-        exec("import x2gobroker.brokers.{backend}_broker".format(backend=backend))
-        exec("broker_backend = x2gobroker.brokers.{backend}_broker.X2GoBroker()".format(backend=backend))
-        global_config = broker_backend.get_global_config()
-
-        # if the broker backend is disabled in the configuration, pretend to have nothing on offer
-        if not broker_backend.is_enabled():
-            raise tornado.web.HTTPError(404)
-
-        # FIXME: this is to work around a bug in X2Go Client (http://bugs.x2go.org/138)
-        content_type = self.request.headers.get("Content-Type", "")
-        if not content_type.startswith("application/x-www-form-urlencoded"):
-            for name, values in parse_qs_bytes(native_str(self.request.body)).iteritems():
-                self.request.arguments.setdefault(name, []).extend(values)
-
-        # set the client address for the broker backend
-        ip = self.request.remote_ip
-        if ip:
-            logger_broker.info('client address is {address}'.format(address=ip))
-            broker_backend.set_client_address(ip)
-        elif not x2gobroker.defaults.X2GOBROKER_DEBUG:
-            # if the client IP is not set, we pretend to have nothing on offer
-            logger_error.error('client could not provide an IP address, pretending: 404 Not Found')
-            raise tornado.web.HTTPError(404)
-
-        username = 'foo'
-        #username = self.get_argument('user', default='')
-        #password = self.get_argument('password', default='')
-        #cookie = self.get_argument('cookie', default='')
-        #task = self.get_argument('task', default='')
-        #profile_id = self.get_argument('sid', default='')
-        #new_password = self.get_argument('newpass', default='')
-
-        output = ''
-
-        #logger_broker.debug ('username: {username}, password: {password}, task: {task}, profile_id: {profile_id}'.format(username=username, password='XXXXX', task=task, profile_id=profile_id))
-        #if broker_backend.check_access(username=username, password=password, cookie=cookie):
-
-        ###
-        ### CONFIRM SUCCESSFUL AUTHENTICATION FIRST
-        ###
-
-        profiles = broker_backend.list_profiles(username)
-        ms = x2gobroker.uccsjson.ManagementServer('http://localhost:8080/uccs/{backend}'.format(backend=backend), 'X2Go Session Broker')
-
-        profile_ids = profiles.keys()
-        profile_ids.sort()
-
-        for profile_id in profile_ids:
-
-            if profiles[profile_id][u'directrdp']:
-                pass
-            else:
-                ts = x2gobroker.uccsjson.X2GoServer(
-                        host='{hostname}:{port}'.format(hostname=profiles[profile_id][u'host'], port=profiles[profile_id][u'sshport']),
-                        name=profiles[profile_id][u'name'],
-                        username=profiles[profile_id][u'user'],
-                )
-            ms.add_terminalserver(ts)
-
-        output += ms.toJson()
-
-        self.write(output)
-        return
-
-        #raise tornado.web.HTTPError(401)
-


hooks/post-receive
-- 
x2gobroker.git (HTTP(S) Session broker for X2Go)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "x2gobroker.git" (HTTP(S) Session broker for X2Go).




More information about the x2go-commits mailing list