rack creation error fix
Change-Id: I9a7afad61a8432ff29f300bf6a1f2a9bbeed46f2 Fixes: bug #1211781
This commit is contained in:
parent
a858f10d13
commit
049ca9b739
@ -17,8 +17,11 @@ from django.utils.translation import ugettext_lazy as _ # noqa
|
|||||||
|
|
||||||
from horizon import exceptions
|
from horizon import exceptions
|
||||||
from horizon import forms
|
from horizon import forms
|
||||||
|
from horizon import messages
|
||||||
from horizon import workflows
|
from horizon import workflows
|
||||||
|
|
||||||
|
import requests
|
||||||
|
|
||||||
from tuskar_ui import api as tuskar
|
from tuskar_ui import api as tuskar
|
||||||
|
|
||||||
|
|
||||||
@ -186,8 +189,14 @@ class CreateRack(workflows.Workflow):
|
|||||||
nodes=[{'id': node_id}])
|
nodes=[{'id': node_id}])
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
except requests.ConnectionError:
|
||||||
|
messages.error(request,
|
||||||
|
_("Unable to connect to Nova Baremetal. Please "
|
||||||
|
"check your configuration."))
|
||||||
|
return False
|
||||||
except Exception:
|
except Exception:
|
||||||
exceptions.handle(request, _("Unable to create rack."))
|
exceptions.handle(request, _("Unable to create rack."))
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
class EditRack(CreateRack):
|
class EditRack(CreateRack):
|
||||||
|
Loading…
Reference in New Issue
Block a user