summaryrefslogtreecommitdiff
path: root/ironic/common
diff options
context:
space:
mode:
authorRuby Loo <rloo@yahoo-inc.com>2014-08-19 14:10:34 +0000
committerRuby Loo <rloo@yahoo-inc.com>2014-08-20 16:35:15 +0000
commit7c765279a4eb577d03dfa4e640d008331f67626a (patch)
tree857d996f23a10e8ea1d92a40d7c5934395a11a5f /ironic/common
parentab314d704022144aabbe705695d6a10e757d702f (diff)
downloadironic-7c765279a4eb577d03dfa4e640d008331f67626a.tar.gz
return power state ERROR instead of an exception
iboot's _power_status() could raise an exception if it doesn't get the expected response from the iboot command. A new IBootOperationError is raised if the response isn't a list, and we return ERROR power state if the returned list doesn't have the power status information. Change-Id: I4b88c24a77a4f46464cf36224878b4e3205f646c Partial-Bug: #1267693
Diffstat (limited to 'ironic/common')
-rw-r--r--ironic/common/exception.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/ironic/common/exception.py b/ironic/common/exception.py
index 124ce1383..bb211a496 100644
--- a/ironic/common/exception.py
+++ b/ironic/common/exception.py
@@ -404,6 +404,10 @@ class PasswordFileFailedToCreate(IronicException):
message = _("Failed to create the password file. %(error)s")
+class IBootOperationError(IronicException):
+ pass
+
+
class IloOperationError(IronicException):
message = _("%(operation)s failed, error: %(error)s")