summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLadislav Smola <lsmola@redhat.com>2014-04-04 16:17:38 +0200
committerLadislav Smola <lsmola@redhat.com>2014-04-04 16:17:38 +0200
commitced29a9d64e5d988af6c6f68cce4917d9545dea6 (patch)
tree7467454df75daf0ff74ac72a12a1d9002ff915d8
parenta8d1dde57fd8735588e35398d1c991aebafaba7c (diff)
downloadtuskar-ui-ced29a9d64e5d988af6c6f68cce4917d9545dea6.tar.gz
Catching overcloud keystone exception
-catching exception from overcloud keystone, before we are able to connect. Uncatched exception was breaking the detail page Change-Id: I8ab6684f9fa696ebea8057c41d44293dcbae2b5b
-rw-r--r--tuskar_ui/api.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/tuskar_ui/api.py b/tuskar_ui/api.py
index b068c257..3c66339d 100644
--- a/tuskar_ui/api.py
+++ b/tuskar_ui/api.py
@@ -11,6 +11,7 @@
# under the License.
import django.conf
import heatclient
+import keystoneclient
import logging
import urlparse
@@ -227,10 +228,13 @@ class Overcloud(base.APIResourceWrapper):
break
else:
return None
-
- return overcloud_keystoneclient(self._request,
- output['output_value'],
- self.attributes['AdminPassword'])
+ try:
+ return overcloud_keystoneclient(self._request,
+ output['output_value'],
+ self.attributes['AdminPassword'])
+ except keystoneclient.apiclient.exceptions.Unauthorized:
+ LOG.debug('Unable to connect overcloud keystone.')
+ return None
@classmethod
def create(cls, request, overcloud_sizing, overcloud_configuration):