summaryrefslogtreecommitdiff
path: root/ironic_python_agent/errors.py
diff options
context:
space:
mode:
authorJosh Gachnang <josh@pcsforeducation.com>2014-07-18 08:13:12 -0700
committerJosh Gachnang <josh@pcsforeducation.com>2014-07-18 17:42:23 -0700
commit83782018f73266d52e5c3fab6e82f3d3257fb94d (patch)
tree6ddfe5df6580b7bdcdfa6f471ee1c5bcc020309d /ironic_python_agent/errors.py
parent5e1aa0a8f81f7ed2b7f50686ded439692ad739ad (diff)
downloadironic-python-agent-83782018f73266d52e5c3fab6e82f3d3257fb94d.tar.gz
Improve Disk Detection
The previous implementation of list_block_devices used blockdev, which would list partitions, software RAID and other devices as block devices. By switching to lsblk, the agent can filter down to only physical block devices, which is all the agent cares about for any of its operations. This change adds two new fields to the BlockDevice class: model, a string of the block devices reported model, and rotational, a boolean representing a spinning disk (True) or a solid state disk (False). This data can be useful for vendor hardware managers. Change-Id: I385c3bb378c2c49385bca14a1d7efa074933becf Closes-Bug: 1344351
Diffstat (limited to 'ironic_python_agent/errors.py')
-rw-r--r--ironic_python_agent/errors.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/ironic_python_agent/errors.py b/ironic_python_agent/errors.py
index be61bdb6..f461aaa1 100644
--- a/ironic_python_agent/errors.py
+++ b/ironic_python_agent/errors.py
@@ -214,5 +214,14 @@ class BlockDeviceEraseError(RESTError):
self.details = details
+class BlockDeviceError(RESTError):
+ """Error raised when a block devices causes an unknown error"""
+ message = 'Block device caused unknown error'
+
+ def __init__(self, details):
+ super(BlockDeviceError, self).__init__(details)
+ self.details = details
+
+
class ExtensionError(Exception):
pass