summaryrefslogtreecommitdiff
path: root/cloudinit/sources/azure/errors.py
diff options
context:
space:
mode:
Diffstat (limited to 'cloudinit/sources/azure/errors.py')
-rw-r--r--cloudinit/sources/azure/errors.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/cloudinit/sources/azure/errors.py b/cloudinit/sources/azure/errors.py
index 5c4ad7db..ca902a03 100644
--- a/cloudinit/sources/azure/errors.py
+++ b/cloudinit/sources/azure/errors.py
@@ -84,6 +84,21 @@ class ReportableError(Exception):
return self.as_encoded_report()
+class ReportableErrorDhcpInterfaceNotFound(ReportableError):
+ def __init__(self, duration: float) -> None:
+ super().__init__("failure to find DHCP interface")
+
+ self.supporting_data["duration"] = duration
+
+
+class ReportableErrorDhcpLease(ReportableError):
+ def __init__(self, duration: float, interface: Optional[str]) -> None:
+ super().__init__("failure to obtain DHCP lease")
+
+ self.supporting_data["duration"] = duration
+ self.supporting_data["interface"] = interface
+
+
class ReportableErrorUnhandledException(ReportableError):
def __init__(self, exception: Exception) -> None:
super().__init__("unhandled exception")