summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortermie <github@anarkystic.com>2011-11-08 16:05:48 -0800
committertermie <github@anarkystic.com>2011-11-08 16:05:48 -0800
commitcd712b2643b818ffb4272c4b3b546685c48e9640 (patch)
treefbd68e142331ec2060bc022c4191e9f21d6c37cb
parent8ae627a317f91797fc3331f8f8eda0e7682ecc36 (diff)
downloadkeystone-cd712b2643b818ffb4272c4b3b546685c48e9640.tar.gz
keystone-cd712b2643b818ffb4272c4b3b546685c48e9640.tar.xz
keystone-cd712b2643b818ffb4272c4b3b546685c48e9640.zip
add a default handler for /
-rwxr-xr-xbin/keystone2
-rw-r--r--keystonelight/keystone_compat.py6
2 files changed, 8 insertions, 0 deletions
diff --git a/bin/keystone b/bin/keystone
index b0e31f04..75663d1b 100755
--- a/bin/keystone
+++ b/bin/keystone
@@ -1,6 +1,7 @@
#!/usr/bin/env python
# vim: tabstop=4 shiftwidth=4 softtabstop=4
+import logging
import os
import sys
@@ -23,6 +24,7 @@ if __name__ == '__main__':
default_conf = os.path.join(possible_topdir,
'etc',
'keystone.conf')
+ logging.getLogger().setLevel(logging.DEBUG)
conf = len(sys.argv) > 1 and sys.argv[1] or default_conf
app = deploy.loadapp('config:%s' % conf)
diff --git a/keystonelight/keystone_compat.py b/keystonelight/keystone_compat.py
index 0bb0ed41..f751a905 100644
--- a/keystonelight/keystone_compat.py
+++ b/keystonelight/keystone_compat.py
@@ -18,6 +18,9 @@ class KeystoneRouter(wsgi.Router):
self.keystone_controller = KeystoneController(options)
mapper = routes.Mapper()
+ mapper.connect('/',
+ controller=self.keystone_controller,
+ action='noop')
mapper.connect('/v2.0/tokens',
controller=self.keystone_controller,
action='authenticate',
@@ -41,6 +44,9 @@ class KeystoneController(service.BaseApplication):
self.token_api = token.Manager(options)
pass
+ def noop(self, context):
+ return {}
+
def authenticate(self, context, auth=None):
"""Authenticate credentials and return a token.