Allow keystoneclient to work with older keystone installs
Older keystone installs may return 501 for GET / instead of 300 like today. We should be able to assume that if 501 is returned the server will support v2.0 only. Fixes bug 1159911 Change-Id: If264840d8678a490264f1bdb62f1b51c362619e1
This commit is contained in:
@@ -410,7 +410,10 @@ class AuthProtocol(object):
|
||||
def _get_supported_versions(self):
|
||||
versions = []
|
||||
response, data = self._json_request('GET', '/')
|
||||
if response.status != 300:
|
||||
if response.status == 501:
|
||||
self.LOG.warning("Old keystone installation found...assuming v2.0")
|
||||
versions.append("v2.0")
|
||||
elif response.status != 300:
|
||||
self.LOG.error('Unable to get version info from keystone: %s' %
|
||||
response.status)
|
||||
raise ServiceError('Unable to get version info from keystone')
|
||||
|
Reference in New Issue
Block a user