python-compute/node_agent/exceptions.py
2023-07-22 23:59:49 +03:00

22 lines
598 B
Python

class ConfigLoadError(Exception):
"""Bad config file syntax, unreachable file or bad data."""
class LibvirtSessionError(Exception):
"""Something went wrong while connecting to libvirt."""
class VMError(Exception):
"""Something went wrong while interacting with the domain."""
class VMNotFound(Exception):
def __init__(self, domain, message='VM not found: {domain}'):
self.domain = domain
self.message = message.format(domain=domain)
super().__init__(self.message)
class QemuAgentError(Exception):
"""Mostly QEMU Guest Agent is not responding."""