summaryrefslogtreecommitdiff
path: root/ironic_python_agent/errors.py
diff options
context:
space:
mode:
authorEllen Hui <ellenfkh@gmail.com>2014-05-30 23:55:34 +0000
committerEllen Hui <ellenfkh@gmail.com>2014-06-10 20:54:34 +0000
commitb4f1a0b2d32fc21ede9460540128a2129dc733ea (patch)
treeda6e0c442b62c9bba626a0410864b988acd81bf3 /ironic_python_agent/errors.py
parent263f97c0e0fe4792c5aca1ac107bc2d5bb38115d (diff)
downloadironic-python-agent-b4f1a0b2d32fc21ede9460540128a2129dc733ea.tar.gz
Tries to advertise valid default IP
During the first heartbeat, the heartbeater asks the agent to check its advertised address; if the advertised IP is still the default (None), the agent tries to replace it with the IP of the first network interface it finds. If it fails to find either a network interface or an IP address, the agent raises an exception. Change-Id: I6d435d39e99ed0ff5c8b4883b6aa0b356f6cb4ae Closes-Bug: #1309110
Diffstat (limited to 'ironic_python_agent/errors.py')
-rw-r--r--ironic_python_agent/errors.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/ironic_python_agent/errors.py b/ironic_python_agent/errors.py
index 61d17b3b..a02b80b2 100644
--- a/ironic_python_agent/errors.py
+++ b/ironic_python_agent/errors.py
@@ -115,6 +115,24 @@ class LookupNodeError(IronicAPIError):
super(LookupNodeError, self).__init__(details)
+class LookupAgentIPError(IronicAPIError):
+ """Error raised when automatic IP lookup fails."""
+
+ message = 'Error finding IP for Ironic Agent'
+
+ def __init__(self, details):
+ super(IronicAPIError, self).__init__(details)
+
+
+class LookupAgentInterfaceError(IronicAPIError):
+ """Error raised when agent interface lookup fails."""
+
+ message = 'Error finding network interface for Ironic Agent'
+
+ def __init__(self, details):
+ super(IronicAPIError, self).__init__(details)
+
+
class ImageDownloadError(RESTError):
"""Error raised when an image cannot be downloaded."""