python-compute/node_agent/vm/exceptions.py

15 lines
401 B
Python
Raw Normal View History

2023-07-29 15:35:36 +03:00
class QemuAgentError(Exception):
"""Mostly QEMU Guest Agent is not responding."""
2023-06-17 20:07:50 +03:00
2023-07-22 23:59:49 +03:00
class VMError(Exception):
"""Something went wrong while interacting with the domain."""
2023-06-17 20:07:50 +03:00
2023-07-22 23:59:49 +03:00
class VMNotFound(Exception):
2023-08-24 22:36:12 +03:00
2023-08-27 23:42:56 +03:00
def __init__(self, domain, message='VM not found vm={domain}'):
2023-06-17 20:07:50 +03:00
self.domain = domain
self.message = message.format(domain=domain)
super().__init__(self.message)