diff options
| author | Russell Haering <russellhaering@gmail.com> | 2014-06-04 10:44:25 -0700 |
|---|---|---|
| committer | Russell Haering <russellhaering@gmail.com> | 2014-06-06 10:27:53 -0700 |
| commit | dff46583d354ced83a056d404abc70fd3ac92de3 (patch) | |
| tree | 07c67a0e2dfe910e157d4d92ccbbec2958dade77 /ironic_python_agent/errors.py | |
| parent | 8fd76c877bdfc6eb7c3bfd5e82b710bed4a1d687 (diff) | |
| download | ironic-python-agent-dff46583d354ced83a056d404abc70fd3ac92de3.tar.gz | |
Add a HardwareManager method to erase devices
Add erase_devices method to the HardwareManager class. By default this
method iterates block devices, and calls a new abstract
erase_block_device method for each device. This patch includes a
simple implementation of erase_block_device on the
GenericHardwareManager which attempts to issue an ATA secure erase on
supported devices.
Change-Id: I81da065395b8785f636f1b0a0d60c9f1c045441e
Diffstat (limited to 'ironic_python_agent/errors.py')
| -rw-r--r-- | ironic_python_agent/errors.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ironic_python_agent/errors.py b/ironic_python_agent/errors.py index 0d86ebac..61d17b3b 100644 --- a/ironic_python_agent/errors.py +++ b/ironic_python_agent/errors.py @@ -184,5 +184,15 @@ class SystemRebootError(RESTError): self.details = self.details.format(exit_code) +class BlockDeviceEraseError(RESTError): + """Error raised when an error occurs erasing a block device.""" + + message = 'Error erasing block device' + + def __init__(self, details): + super(BlockDeviceEraseError, self).__init__(details) + self.details = details + + class ExtensionError(Exception): pass |
