"""mgf.vm.libvirt — the libvirt adapter.

Implements ``HypervisorBackend`` and ``StorageBackend`` (plus the OPTIONAL
``MetricsBackend`` (D-G13), ``NetworkBackend`` (D-G15) and
``GuestAgentBackend`` (D-G19)) from
``mgf.vm.core`` against the libvirt / KVM / QEMU stack. The wrap (not
marry) of libvirt: every libvirt-specific concept (domain XML,
``libvirt-python`` binding ergonomics, error codes) is contained in
this package and translated to the typed surface in ``mgf.vm.core``.

The full method-by-method spec the adapter satisfies lives in
``vm-vmanager-docs/component-specs/contracts.md`` §3 + §4.

Phase 0 status (vm-vmanager-docs/ROADMAP.md Stream B): FOUNDATION slice
landed — the connection wrapper, exception-translation seam, XML
translation layer, and bridge-spec. ``LibvirtAdapter`` (the
``HypervisorBackend`` / ``StorageBackend`` impl) lands on top of these
in the backends slice.
"""

from __future__ import annotations

from mgf.vm.libvirt._connection import LibvirtConnection
from mgf.vm.libvirt._domain_policy import LibvirtDomainPolicyBackend
from mgf.vm.libvirt._errors import LibvirtErrorTranslator, translate_at_seam
from mgf.vm.libvirt._guest_agent import LibvirtGuestAgentBackend
from mgf.vm.libvirt._hypervisor import LibvirtHypervisorBackend
from mgf.vm.libvirt._metrics import LibvirtMetricsBackend
from mgf.vm.libvirt._network import LibvirtNetworkBackend, network_spec_to_xml
from mgf.vm.libvirt._spec import DiskSpec, LibvirtVmSpec, NicSpec
from mgf.vm.libvirt._storage import LibvirtStorageBackend
from mgf.vm.libvirt._xml import (
    canonicalize,
    semantic_equal,
    vmspec_to_xml,
    xml_to_domaininfo,
)

__version__ = "0.1.10"

__all__: list[str] = [
    "DiskSpec",
    "LibvirtConnection",
    "LibvirtDomainPolicyBackend",
    "LibvirtErrorTranslator",
    "LibvirtGuestAgentBackend",
    "LibvirtHypervisorBackend",
    "LibvirtMetricsBackend",
    "LibvirtNetworkBackend",
    "LibvirtStorageBackend",
    "LibvirtVmSpec",
    "NicSpec",
    "__version__",
    "canonicalize",
    "network_spec_to_xml",
    "semantic_equal",
    "translate_at_seam",
    "vmspec_to_xml",
    "xml_to_domaininfo",
]
