add an OverlordAPIError

This commit is contained in:
Russell Haering 2014-01-16 18:32:15 -08:00
parent f6178f6118
commit 8eb89e73de

@ -53,14 +53,23 @@ class RequestedObjectNotFoundError(errors.NotFound):
self.details = details
class HeartbeatError(errors.RESTError):
class OverlordAPIError(errors.RESTError):
"""Error raised when a call to the agent API fails."""
message = 'Error in call to teeth-agent-api.'
def __init__(self, details):
super(OverlordAPIError, self).__init__(details)
self.details = details
class HeartbeatError(OverlordAPIError):
"""Error raised when a heartbeat to the agent API fails."""
message = 'Error heartbeating to agent API.'
def __init__(self, details):
super(HeartbeatError, self).__init__()
self.details = details
super(HeartbeatError, self).__init__(details)
class ImageDownloadError(errors.RESTError):