Handle creating Qemu disk images and resizing

This commit is contained in:
grossmj
2022-04-07 16:21:47 +08:00
parent 888c773dc0
commit fda2a37b98
20 changed files with 701 additions and 472 deletions

View File

@ -51,3 +51,24 @@ class ControllerForbiddenError(ControllerError):
class ControllerTimeoutError(ControllerError):
def __init__(self, message: str):
super().__init__(message)
class ComputeError(ControllerError):
pass
class ComputeConflictError(ComputeError):
"""
Raise when the compute sends a 409 that we can handle
:param request URL: compute URL used for the request
:param response: compute JSON response
"""
def __init__(self, url, response):
super().__init__(response["message"])
self._url = url
self._response = response
def url(self):
return self._url