Back port this bug fix to stable/ocata
Return the correct verion in RootController's get method
The RootController's get method returns 'v1' as the default version.
It should have returned "proton" instead
Change-Id: I723e5e1486c026aaad58a0c09267740c33e830e9
Closes-Bug: #1661108
(cherry picked from commit 6316e37eb5
)
This commit is contained in:
parent
47fc9747f3
commit
df4cd31fe5
@ -57,13 +57,13 @@ class Root(APIBase):
|
||||
"""A link to the default version of the API"""
|
||||
|
||||
@staticmethod
|
||||
def convert():
|
||||
def convert(version='v1'):
|
||||
root = Root()
|
||||
root.name = "Gluon API"
|
||||
root.description = ("OpenStack Gluon acts as a port arbiter between "
|
||||
"Nova and port-provider such as Neutron")
|
||||
root.versions = [Version.convert('v1')]
|
||||
root.default_version = Version.convert('v1')
|
||||
root.versions = [Version.convert(version)]
|
||||
root.default_version = Version.convert(version)
|
||||
return root
|
||||
|
||||
|
||||
@ -82,7 +82,7 @@ class RootController(rest.RestController):
|
||||
# NOTE: The reason why convert() is being called for every
|
||||
# request is because we need to get the host url from
|
||||
# the request object to make the links.
|
||||
return Root.convert()
|
||||
return Root.convert(version=self._default_version)
|
||||
|
||||
@pecan.expose()
|
||||
def _route(self, args, request=None):
|
||||
|
Loading…
Reference in New Issue
Block a user