2023-07-22 23:59:49 +03:00
|
|
|
class ConfigLoadError(Exception):
|
|
|
|
"""Bad config file syntax, unreachable file or bad data."""
|
2023-06-17 20:07:50 +03:00
|
|
|
|
|
|
|
|
2023-07-22 23:59:49 +03:00
|
|
|
class LibvirtSessionError(Exception):
|
|
|
|
"""Something went wrong while connecting to libvirt."""
|
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):
|
|
|
|
def __init__(self, domain, message='VM not found: {domain}'):
|
2023-06-17 20:07:50 +03:00
|
|
|
self.domain = domain
|
|
|
|
self.message = message.format(domain=domain)
|
|
|
|
super().__init__(self.message)
|
2023-07-22 23:59:49 +03:00
|
|
|
|
|
|
|
|
|
|
|
class QemuAgentError(Exception):
|
|
|
|
"""Mostly QEMU Guest Agent is not responding."""
|