summaryrefslogtreecommitdiff
path: root/keystoneclient/generic
diff options
context:
space:
mode:
authorNachiappan VR N <nachiappan.veerappan-nachiappan@hp.com>2013-03-05 20:31:52 -0800
committerNachiappan VR N <nachiappan.veerappan-nachiappan@hp.com>2013-03-13 15:58:42 -0700
commitffaa0a69e71019cdfdba5354bfc7d5c10ba21b79 (patch)
tree9b97c855cb486a37bed4a64ffe5ef05fcb8f53c6 /keystoneclient/generic
parentc07d0a829329ac797e5482bf4286fa8a677e39b6 (diff)
downloadpython-keystoneclient-ffaa0a69e71019cdfdba5354bfc7d5c10ba21b79.tar.gz
Make keystone client handle the response code 300.
Keystone discover command currently fails to list the keystone server. Fix is made such that client handle the response code 300 from the keystone server. Fixes Bug #1136476 Change-Id: Iada31f1e274aade90aa4b4be2a136793a0ba64d7
Diffstat (limited to 'keystoneclient/generic')
-rw-r--r--keystoneclient/generic/client.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/keystoneclient/generic/client.py b/keystoneclient/generic/client.py
index 4818ddf..d2ac0db 100644
--- a/keystoneclient/generic/client.py
+++ b/keystoneclient/generic/client.py
@@ -84,7 +84,11 @@ class Client(client.HTTPClient):
resp, body = httpclient.request(url, "GET",
headers={'Accept':
'application/json'})
- if resp.status_code in (200, 204): # some cases we get No Content
+ # Multiple Choices status code is returned by the root
+ # identity endpoint, with references to one or more
+ # Identity API versions -- v3 spec
+ # some cases we get No Content
+ if resp.status_code in (200, 204, 300):
try:
results = {}
if 'version' in body: