summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRamana Juvvadi <rjuvvadi@hcl.com>2011-05-08 00:41:37 -0500
committerRamana Juvvadi <rjuvvadi@hcl.com>2011-05-08 00:41:37 -0500
commitc32b81baa25c827f72bde67832b2f4e20f09f10c (patch)
treed8bb13a23b381396c7d2965a694c411fc3716ad3
parent71cd6006bd29b804560b564bfff2d9b1609b94bd (diff)
downloadkeystone-c32b81baa25c827f72bde67832b2f4e20f09f10c.tar.gz
keystone-c32b81baa25c827f72bde67832b2f4e20f09f10c.tar.xz
keystone-c32b81baa25c827f72bde67832b2f4e20f09f10c.zip
get_version_info is still not working
-rwxr-xr-xkeystone/auth_server.py17
1 files changed, 7 insertions, 10 deletions
diff --git a/keystone/auth_server.py b/keystone/auth_server.py
index 61b2b2d0..35812f48 100755
--- a/keystone/auth_server.py
+++ b/keystone/auth_server.py
@@ -64,8 +64,6 @@ import keystone.logic.types.tenant as tenants
import keystone.logic.types.auth as auth
import keystone.logic.types.fault as fault
import keystone.logic.types.user as users
-import bottle
-
VERSION_STATUS = "ALPHA"
VERSION_DATE = "2011-04-23T00:00:00Z"
@@ -121,23 +119,22 @@ class MiscController(wsgi.Controller):
self.options = options
def get_version_info(self, req):
- response=Response()
if is_xml_response(req):
resp_file = os.path.join(POSSIBLE_TOPDIR,
"keystone/content/version.xml.tpl")
- response.content_type = "application/xml"
else:
resp_file = os.path.join(POSSIBLE_TOPDIR,
"keystone/content/version.json.tpl")
- response.content_type = "application/json"
- print resp_file
- hostname = req.environ.get("SERVER_NAME")
- port = req.environ.get("SERVER_PORT")
+ hostname = req.environ.get("SERVER_NAME")
+ port = req.environ.get("SERVER_PORT")
+ #try:
+ tmplfile=open(resp_file);
+ tmplstring=tmplfile.read()
- return bottle.template(resp_file, HOST=hostname, PORT=port,
+ send_result(200,req, tmplstring.format(HOST=hostname, PORT=port,
VERSION_STATUS=VERSION_STATUS,
- VERSION_DATE=VERSION_DATE)
+ VERSION_DATE=VERSION_DATE))
class AuthController(wsgi.Controller):