Fix the return value for glance get_version

The VERSIONS.get_version returned a Version object instead of a string,
it will raise ValueError: Circular reference detected when json encode.

This issue was introduced by commit
834722cf8a

Change-Id: Ib41b2f7e77ac49911e9d5a4e129047f941bf5d24
Closes-bug: #1672291
This commit is contained in:
liyingjun 2017-03-14 10:48:38 +08:00
parent 1a1dd88904
commit 942fa3d7cd
2 changed files with 2 additions and 2 deletions

View File

@ -37,7 +37,7 @@ class Version(generic.View):
def get(self, request):
"""Get active glance version.
"""
return {'version': api.glance.get_version()}
return {'version': str(api.glance.get_version())}
@urls.register

View File

@ -33,7 +33,7 @@ class Version(generic.View):
def get(self, request):
"""Get active keystone version.
"""
return {'version': api.keystone.get_version()}
return {'version': str(api.keystone.get_version())}
@urls.register