@@ -31,8 +31,9 @@ def __init__(self, details=None, *args, **kwargs):
3131
3232
3333class InvalidContentError (RESTError ):
34- """Error which occurs when a user supplies invalid content, either
35- because that content cannot be parsed according to the advertised
34+ """Error which occurs when a user supplies invalid content.
35+
36+ Either because that content cannot be parsed according to the advertised
3637 `Content-Type`, or due to a content validation error.
3738 """
3839 message = 'Invalid request body'
@@ -43,10 +44,7 @@ def __init__(self, details):
4344
4445
4546class NotFound (RESTError ):
46- """Error which occurs when a user supplies invalid content, either
47- because that content cannot be parsed according to the advertised
48- `Content-Type`, or due to a content validation error.
49- """
47+ """Error which occurs if a non-existent API endpoint is called."""
5048 message = 'Not found'
5149 status_code = 404
5250 details = 'The requested URL was not found.'
@@ -104,9 +102,7 @@ def __init__(self, details):
104102
105103
106104class LookupNodeError (IronicAPIError ):
107- """Error raised when the node configuration lookup to the Ironic API
108- fails.
109- """
105+ """Error raised when the node lookup to the Ironic API fails."""
110106
111107 message = 'Error getting configuration from Ironic.'
112108
@@ -167,6 +163,7 @@ def __init__(self, device, exit_code, stdout, stderr):
167163
168164class ConfigDriveTooLargeError (RESTError ):
169165 """Error raised when a configdrive is larger than the partition."""
166+
170167 message = 'Configdrive is too large for intended partition.'
171168
172169 def __init__ (self , filename , filesize ):
@@ -176,9 +173,7 @@ def __init__(self, filename, filesize):
176173
177174
178175class ConfigDriveWriteError (RESTError ):
179- """Error raised when a configdrive directory cannot be written to a
180- device.
181- """
176+ """Error raised when a configdrive cannot be written to a device."""
182177
183178 message = 'Error writing configdrive to device.'
184179
@@ -211,18 +206,18 @@ def __init__(self, details):
211206
212207
213208class BlockDeviceError (RESTError ):
214- """Error raised when a block devices causes an unknown error"""
209+ """Error raised when a block devices causes an unknown error."""
210+
215211 message = 'Block device caused unknown error'
216212
217213 def __init__ (self , details ):
218214 super (BlockDeviceError , self ).__init__ (details )
219215
220216
221217class VirtualMediaBootError (RESTError ):
222- """Error raised when booting ironic-python-client from virtual media
223- fails.
224- """
225- message = 'Booting ironic-python-client from virtual media failed.'
218+ """Error raised when virtual media device cannot be found for config."""
219+
220+ message = 'Configuring agent from virtual media failed.'
226221
227222 def __init__ (self , details ):
228223 super (VirtualMediaBootError , self ).__init__ (details )
@@ -270,9 +265,7 @@ def __init__(self, method):
270265
271266
272267class IncompatibleHardwareMethodError (RESTError ):
273- """Error raised when HardwareManager method is incompatible with node
274- hardware.
275- """
268+ """Error raised when HardwareManager method incompatible with hardware."""
276269
277270 message = 'HardwareManager method is not compatible with hardware.'
278271
@@ -306,6 +299,7 @@ def __init__(self, agent_version, node_version):
306299
307300class CleaningError (RESTError ):
308301 """Error raised when a cleaning step fails."""
302+
309303 message = 'Clean step failed.'
310304
311305 def __init__ (self , details = None ):
@@ -329,9 +323,7 @@ def __init__(self, error_msg, exit_code, stdout, stderr):
329323
330324
331325class DeviceNotFound (NotFound ):
332- """Error raised when the disk or partition to deploy the image onto is
333- not found.
334- """
326+ """Error raised when the device to deploy the image onto is not found."""
335327
336328 message = ('Error finding the disk or partition device to deploy '
337329 'the image onto.' )
0 commit comments