Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
synnefo
Commits
f1a08381
Commit
f1a08381
authored
Oct 18, 2013
by
Christos Stavrakakis
Browse files
cyclades: Add message to exceptions
parent
42e027fb
Changes
1
Show whitespace changes
Inline
Side-by-side
snf-cyclades-app/synnefo/db/models.py
View file @
f1a08381
...
...
@@ -121,7 +121,8 @@ class Backend(models.Model):
def
get_client
(
self
):
"""Get or create a client. """
if
self
.
offline
:
raise
faults
.
ServiceUnavailable
raise
faults
.
ServiceUnavailable
(
"Backend '%s' is offline"
%
self
)
return
get_rapi_client
(
self
.
id
,
self
.
hash
,
self
.
clustername
,
self
.
port
,
...
...
@@ -344,7 +345,7 @@ class VirtualMachine(models.Model):
if
self
.
backend
:
return
self
.
backend
.
get_client
()
else
:
raise
faults
.
ServiceUnavailable
raise
faults
.
ServiceUnavailable
(
"VirtualMachine without backend"
)
def
get_last_diagnostic
(
self
,
**
filters
):
try
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment