From e043bd1560e6f2f071870c2be09748163fe70b97 Mon Sep 17 00:00:00 2001 From: Gordon Chung <chungg@ca.ibm.com> Date: Fri, 22 Feb 2013 13:33:40 -0500 Subject: [PATCH] Accept 201 status code on POST On POST requests, keystone should return '201 Created' according to api docs. Related to but not dependent on: https://bugs.launchpad.net/keystone/+bug/1131119 Change-Id: I04c398ad7946f5ddcfd2059e4f8d97608e5d0ed3 --- novaclient/client.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/novaclient/client.py b/novaclient/client.py index 763eec271..1ebfaeb05 100644 --- a/novaclient/client.py +++ b/novaclient/client.py @@ -240,7 +240,8 @@ class HTTPClient(object): We may get redirected to another site, fail or actually get back a service catalog with a token and our endpoints.""" - if resp.status_code == 200: # content must always present + # content must always present + if resp.status_code == 200 or resp.status_code == 201: try: self.auth_url = url self.service_catalog = \