This commit is contained in:
Mickael BOURNEUF 2024-11-07 16:35:20 +01:00
parent 00235f0084
commit 8300dcba26
1 changed files with 81 additions and 81 deletions

View File

@ -30,7 +30,7 @@ class MetadataDeevirtNS(MetadataDeevirt, ns="deevirt", nsmap={'deevirt': 'https:
class Metadata(BaseXmlModel):
instance:Optional[MetadataDeevirtNS] = element(default=None, ns="deevirt", nsmap={'deevirt': 'https://deevirt.fr/schema/1.0'})
class OSType(BaseXmlModel, search_mode='ordered'):
class OSType(BaseXmlModel, search_mode='unordered'):
class archEnum(str, Enum):
x86 = "x86"
x86_64 = "x86_64"
@ -42,7 +42,7 @@ class OSType(BaseXmlModel, search_mode='ordered'):
machine:Optional[str] = attr(default="q35")
value:typeEnum = typeEnum.hvm
class OSFirmwareFeature(BaseXmlModel, search_mode='ordered'):
class OSFirmwareFeature(BaseXmlModel, search_mode='unordered'):
class nameEnum(str, Enum):
enrolled_keys = "enrolled-keys"
secure_boot = "secure-boot"
@ -50,10 +50,10 @@ class OSFirmwareFeature(BaseXmlModel, search_mode='ordered'):
enabled:YesNoEnum = attr(default=YesNoEnum.NO)
name:nameEnum = attr()
class OSFirmware(BaseXmlModel, search_mode='ordered'):
class OSFirmware(BaseXmlModel, search_mode='unordered'):
feature:Optional[List[OSFirmwareFeature]] = element(default=None)
class OSLoader(BaseXmlModel, search_mode='ordered'):
class OSLoader(BaseXmlModel, search_mode='unordered'):
class typeEnum(str, Enum):
nvram = "nvram"
pflash = "pflash"
@ -63,7 +63,7 @@ class OSLoader(BaseXmlModel, search_mode='ordered'):
type:typeEnum = attr(default=typeEnum.pflash)
path:Optional[str] = ""
class OSBoot(BaseXmlModel, search_mode='ordered'):
class OSBoot(BaseXmlModel, search_mode='unordered'):
class bootEnum(str, Enum):
hd = "hd",
network = "network",
@ -71,17 +71,17 @@ class OSBoot(BaseXmlModel, search_mode='ordered'):
dev:bootEnum = attr()
class OSBootMenu(BaseXmlModel, search_mode='ordered'):
class OSBootMenu(BaseXmlModel, search_mode='unordered'):
enable:YesNoEnum = attr(default=YesNoEnum.NO)
timeout:int = attr(default=0)
class OSSmbios(BaseXmlModel, search_mode='ordered'):
class OSSmbios(BaseXmlModel, search_mode='unordered'):
class modeEnum(str, Enum):
sysinfo = "sysinfo"
mode:modeEnum = attr(default=modeEnum.sysinfo)
class OS(BaseXmlModel, search_mode='ordered'):
class OS(BaseXmlModel, search_mode='unordered'):
class firmwareEnum(str, Enum):
bios = "bios"
efi = "efi"
@ -95,14 +95,14 @@ class OS(BaseXmlModel, search_mode='ordered'):
bootmenu:Optional[OSBootMenu] = element(default=None)
smbios:OSSmbios = element(default=OSSmbios())
class SysinfoEntry(BaseXmlModel, search_mode='ordered'):
class SysinfoEntry(BaseXmlModel, search_mode='unordered'):
name:str = attr()
value:str
class SysinfoBIOS(BaseXmlModel, search_mode='ordered'):
class SysinfoBIOS(BaseXmlModel, search_mode='unordered'):
entry:SysinfoEntry = element(default=None)
class SysinfoSystem(BaseXmlModel, search_mode='ordered'):
class SysinfoSystem(BaseXmlModel, search_mode='unordered'):
entry:List[SysinfoEntry] = element(default=[
SysinfoEntry(
name="manufacturer",
@ -122,16 +122,16 @@ class SysinfoSystem(BaseXmlModel, search_mode='ordered'):
)
])
class SysinfoBaseBoard(BaseXmlModel, search_mode='ordered'):
class SysinfoBaseBoard(BaseXmlModel, search_mode='unordered'):
entry:List[SysinfoEntry] = element(default=None)
class SysinfoChassis(BaseXmlModel, search_mode='ordered'):
class SysinfoChassis(BaseXmlModel, search_mode='unordered'):
entry:List[SysinfoEntry] = element(default=None)
class SysinfoOEMStrings(BaseXmlModel, search_mode='ordered'):
class SysinfoOEMStrings(BaseXmlModel, search_mode='unordered'):
entry:List[SysinfoEntry] = element(default=None)
class Sysinfo(BaseXmlModel, search_mode='ordered'):
class Sysinfo(BaseXmlModel, search_mode='unordered'):
class typeEnum(str, Enum):
smbios = "smbios"
@ -142,7 +142,7 @@ class Sysinfo(BaseXmlModel, search_mode='ordered'):
chassis:Optional[SysinfoChassis] = element(default=None)
oemStrings:Optional[SysinfoOEMStrings] = element(default=None)
class VCPU(BaseXmlModel, search_mode='ordered'):
class VCPU(BaseXmlModel, search_mode='unordered'):
class placementEnum(str, Enum):
static = "static"
auto = "auto"
@ -152,63 +152,63 @@ class VCPU(BaseXmlModel, search_mode='ordered'):
current:int = attr()
max:int = None
class VCPUS(BaseXmlModel, search_mode='ordered'):
class VCPUS(BaseXmlModel, search_mode='unordered'):
id:int = attr()
enabled:YesNoEnum = attr(default=YesNoEnum.YES)
hotpluggable:YesNoEnum = attr(default=YesNoEnum.YES)
order:int = attr()
class CPUTune(BaseXmlModel, search_mode='ordered'):
class CPUTune(BaseXmlModel, search_mode='unordered'):
"""Not implemented"""
pass
class MaxMemory(BaseXmlModel, search_mode='ordered'):
class MaxMemory(BaseXmlModel, search_mode='unordered'):
slots:int = attr()
unit:UnitEnum = attr(default=UnitEnum.MiB)
value:int
class Memory(BaseXmlModel, search_mode='ordered'):
class Memory(BaseXmlModel, search_mode='unordered'):
unit:UnitEnum = attr(default=UnitEnum.MiB)
value:int
class CurrentMemory(BaseXmlModel, search_mode='ordered'):
class CurrentMemory(BaseXmlModel, search_mode='unordered'):
unit:UnitEnum = attr(default=UnitEnum.MiB)
value:int
class MemoryBacking(BaseXmlModel, search_mode='ordered'):
class MemoryBacking(BaseXmlModel, search_mode='unordered'):
"""Not implemented"""
pass
class MemTune(BaseXmlModel, search_mode='ordered'):
class MemTune(BaseXmlModel, search_mode='unordered'):
"""Not implemented"""
pass
class NumaTuneMemory(BaseXmlModel, search_mode='ordered'):
class NumaTuneMemory(BaseXmlModel, search_mode='unordered'):
class modeEnum(str, Enum):
interleave = "interleave"
strict = "strict"
preferred = "preferred"
restrictive = "restrictive"
mode:modeEnum = attr()
modeset:str = attr()
mode:modeEnum = attr(default=None)
modeset:str = attr(default=None)
class NumaMemnode(BaseXmlModel, search_mode='ordered'):
class NumaMemnode(BaseXmlModel, search_mode='unordered'):
cellid:int = attr()
mode:NumaTuneMemory.modeEnum = attr()
nodeset:str = attr()
class NumaTune(BaseXmlModel, search_mode='ordered'):
memory:NumaTuneMemory = element()
memnode:NumaMemnode = element()
class NumaTune(BaseXmlModel, search_mode='unordered'):
memory:NumaTuneMemory = element(default=None)
memnode:NumaMemnode = element(default=None)
class ResourcePartition(BaseXmlModel, search_mode='ordered'):
class ResourcePartition(BaseXmlModel, search_mode='unordered'):
value:str
class Resource(BaseXmlModel, search_mode='ordered'):
class Resource(BaseXmlModel, search_mode='unordered'):
partition:ResourcePartition = element()
class CPUModel(BaseXmlModel, search_mode='ordered'):
class CPUModel(BaseXmlModel, search_mode='unordered'):
class fallbackEnum(str, Enum):
force = "force"
require = "require"
@ -219,14 +219,14 @@ class CPUModel(BaseXmlModel, search_mode='ordered'):
fallback:fallbackEnum = attr()
value:str
class CPUTopology(BaseXmlModel, search_mode='ordered'):
class CPUTopology(BaseXmlModel, search_mode='unordered'):
sockets:int = attr()
dies:Optional[int] = attr(default=None)
clusters:Optional[int] = attr(default=None)
cores:int = attr()
threads:int = attr()
class CPUCache(BaseXmlModel, search_mode='ordered'):
class CPUCache(BaseXmlModel, search_mode='unordered'):
class modeEnum(str, Enum):
emulate = "emulate"
passthrough = "passthrough"
@ -235,7 +235,7 @@ class CPUCache(BaseXmlModel, search_mode='ordered'):
level:int = attr()
mode:modeEnum = attr()
class CPUMaxphysaddr(BaseXmlModel, search_mode='ordered'):
class CPUMaxphysaddr(BaseXmlModel, search_mode='unordered'):
class modeEnum(str, Enum):
emulate = "emulate"
passthrough = "passthrough"
@ -243,7 +243,7 @@ class CPUMaxphysaddr(BaseXmlModel, search_mode='ordered'):
mode:modeEnum = attr()
bits:int = attr()
class CPUFeature(BaseXmlModel, search_mode='ordered'):
class CPUFeature(BaseXmlModel, search_mode='unordered'):
class policyEnum(str, Enum):
force = "force"
require = "require"
@ -254,14 +254,14 @@ class CPUFeature(BaseXmlModel, search_mode='ordered'):
policy:policyEnum = attr()
name:str = attr()
class CPUDistancesSibling(BaseXmlModel, search_mode='ordered'):
class CPUDistancesSibling(BaseXmlModel, search_mode='unordered'):
id:int = attr()
value:int = attr()
class CPUDistances(BaseXmlModel, search_mode='ordered'):
class CPUDistances(BaseXmlModel, search_mode='unordered'):
sibling:Optional[List[CPUDistancesSibling]] = element(default=None)
class CPUNumaCell(BaseXmlModel, search_mode='ordered'):
class CPUNumaCell(BaseXmlModel, search_mode='unordered'):
class memaccessEnum(str, Enum):
shared = "shared"
private = "private"
@ -274,10 +274,10 @@ class CPUNumaCell(BaseXmlModel, search_mode='ordered'):
memaccess:Optional[memaccessEnum] = attr(default=None)
distances:Optional[CPUDistances] = element()
class CPUNuma(BaseXmlModel, search_mode='ordered'):
class CPUNuma(BaseXmlModel, search_mode='unordered'):
cell:Optional[List[CPUNumaCell]] = element(default=[])
class CPU(BaseXmlModel, search_mode='ordered'):
class CPU(BaseXmlModel, search_mode='unordered'):
class matchEnum(str, Enum):
minimum = "minimum"
exact = "exact"
@ -303,40 +303,40 @@ class CPU(BaseXmlModel, search_mode='ordered'):
feature:Optional[CPUFeature] = element(default=None)
numa:Optional[CPUNuma] = element(default=None)
class PMSuspendToDisk(BaseXmlModel, search_mode='ordered'):
class PMSuspendToDisk(BaseXmlModel, search_mode='unordered'):
enabled:YesNoEnum = attr(default=YesNoEnum.NO)
class PMSuspendToMem(BaseXmlModel, search_mode='ordered'):
class PMSuspendToMem(BaseXmlModel, search_mode='unordered'):
enabled:YesNoEnum = attr(default=YesNoEnum.NO)
class PM(BaseXmlModel, search_mode='ordered'):
class PM(BaseXmlModel, search_mode='unordered'):
suspend_to_disk:PMSuspendToDisk = element(tag="suspend-to-disk", default=PMSuspendToDisk())
suspend_to_mem:PMSuspendToMem = element(tag="suspend-to-mem", default=PMSuspendToMem())
class FeaturesKVMHidden(BaseXmlModel, search_mode='ordered'):
class FeaturesKVMHidden(BaseXmlModel, search_mode='unordered'):
state:OnOffEnum = attr()
class FeaturesKVMHintDedicated(BaseXmlModel, search_mode='ordered'):
class FeaturesKVMHintDedicated(BaseXmlModel, search_mode='unordered'):
state:OnOffEnum = attr()
class FeaturesKVMPollControl(BaseXmlModel, search_mode='ordered'):
class FeaturesKVMPollControl(BaseXmlModel, search_mode='unordered'):
state:OnOffEnum = attr()
class FeaturesKVMPvIpi(BaseXmlModel, search_mode='ordered'):
class FeaturesKVMPvIpi(BaseXmlModel, search_mode='unordered'):
state:OnOffEnum = attr()
class FeaturesKVMDirtyRing(BaseXmlModel, search_mode='ordered'):
class FeaturesKVMDirtyRing(BaseXmlModel, search_mode='unordered'):
state:OnOffEnum = attr()
size:int = attr()
class FeaturesKVM(BaseXmlModel, search_mode='ordered'):
class FeaturesKVM(BaseXmlModel, search_mode='unordered'):
hidden:Optional[FeaturesKVMHidden] = element(default=None)
hint_dedicated:Optional[FeaturesKVMHintDedicated] = element(tag="hint-dedicated", default=None)
poll_control:Optional[FeaturesKVMPollControl] = element(tag="poll-control", default=None)
pv_ipi:Optional[FeaturesKVMPvIpi] = element(tag="pv-ipi", default=None)
dirty_ring:Optional[FeaturesKVMDirtyRing] = element(tag="dirty-ring", default=None)
class Features(BaseXmlModel, search_mode='ordered'):
class Features(BaseXmlModel, search_mode='unordered'):
pae:str = element(default=None)
acpi:str = element(default="")
apic:str = element(default="")
@ -344,12 +344,12 @@ class Features(BaseXmlModel, search_mode='ordered'):
privnet:str = element(default=None)
kvm:FeaturesKVM = element(default=None)
class ClockTimerCatchup(BaseXmlModel, search_mode='ordered'):
class ClockTimerCatchup(BaseXmlModel, search_mode='unordered'):
threshold:int = attr()
slew:int = attr()
limit:int = attr()
class ClockTimer(BaseXmlModel, search_mode='ordered'):
class ClockTimer(BaseXmlModel, search_mode='unordered'):
class nameEnum(str, Enum):
kvmclock = "kvmclock"
@ -369,7 +369,7 @@ class ClockTimer(BaseXmlModel, search_mode='ordered'):
track:Optional[trackEnum] = attr(default=None)
catchup:Optional[ClockTimerCatchup] = element(default=None)
class Clock(BaseXmlModel, search_mode='ordered'):
class Clock(BaseXmlModel, search_mode='unordered'):
class offsetEnum(str, Enum):
utc = "utc"
localtime = "localtime"
@ -380,11 +380,11 @@ class Clock(BaseXmlModel, search_mode='ordered'):
offset:Optional[offsetEnum] = attr(default=offsetEnum.utc)
timer:Optional[ClockTimer] = element(default=None)
class Perf(BaseXmlModel, search_mode='ordered'):
class Perf(BaseXmlModel, search_mode='unordered'):
"""Not implemented"""
pass
class DevicesDiskDriver(BaseXmlModel, search_mode='ordered'):
class DevicesDiskDriver(BaseXmlModel, search_mode='unordered'):
class nameEnum(str, Enum):
qemu = "qemu"
@ -399,22 +399,22 @@ class DevicesDiskDriver(BaseXmlModel, search_mode='ordered'):
type:typeEnum = attr(default=typeEnum.raw)
discard:discardEnum = attr(default=discardEnum.unmap)
class DevicesDiskAuthSecret(BaseXmlModel, search_mode='ordered'):
class DevicesDiskAuthSecret(BaseXmlModel, search_mode='unordered'):
class typeEnum(str, Enum):
ceph = "ceph"
type:typeEnum = attr(default=typeEnum.ceph)
uuid:UUID4 = attr(default=None)
class DevicesDiskAuth(BaseXmlModel, search_mode='ordered'):
class DevicesDiskAuth(BaseXmlModel, search_mode='unordered'):
username:str = attr()
secret:DevicesDiskAuthSecret = element(default=DevicesDiskAuthSecret())
class DevicesDiskSourceHost(BaseXmlModel, search_mode='ordered'):
class DevicesDiskSourceHost(BaseXmlModel, search_mode='unordered'):
name:str = attr()
port:int = attr()
class DevicesDiskSource(BaseXmlModel, search_mode='ordered'):
class DevicesDiskSource(BaseXmlModel, search_mode='unordered'):
class protocolEnum(str, Enum):
rbd = "rbd"
http = "http"
@ -426,7 +426,7 @@ class DevicesDiskSource(BaseXmlModel, search_mode='ordered'):
name:str = attr()
host:List[DevicesDiskSourceHost] = element(default=None)
class DevicesDiskTarget(BaseXmlModel, search_mode='ordered'):
class DevicesDiskTarget(BaseXmlModel, search_mode='unordered'):
class busEnum(str, Enum):
virtio = "virtio"
scsi = "scsi"
@ -435,7 +435,7 @@ class DevicesDiskTarget(BaseXmlModel, search_mode='ordered'):
dev:str = attr()
bus:busEnum = attr(default=busEnum.virtio)
class DevicesDisk(BaseXmlModel, search_mode='ordered'):
class DevicesDisk(BaseXmlModel, search_mode='unordered'):
"""
Disk: CEPH Storage only
CDROM: Network Only
@ -456,32 +456,32 @@ class DevicesDisk(BaseXmlModel, search_mode='ordered'):
target:DevicesDiskTarget = element(default=None)
serial:UUID4 = element(default_factory=uuid4)
class DevicesInterfaceMAC(BaseXmlModel, search_mode='ordered'):
class DevicesInterfaceMAC(BaseXmlModel, search_mode='unordered'):
address:Optional[str] = attr(default=None)
class DevicesInterfaceSource(BaseXmlModel, search_mode='ordered'):
class DevicesInterfaceSource(BaseXmlModel, search_mode='unordered'):
bridge:str = attr(default="br-int")
class DevicesInterfaceVirtualPortParameters(BaseXmlModel, search_mode='ordered'):
class DevicesInterfaceVirtualPortParameters(BaseXmlModel, search_mode='unordered'):
interfaceid:UUID4 = attr(default=None)
class DevicesInterfaceVirtualport(BaseXmlModel, search_mode='ordered'):
class DevicesInterfaceVirtualport(BaseXmlModel, search_mode='unordered'):
class typeEnum(str, Enum):
openvswitch = "openvswitch"
type:typeEnum = attr(default=typeEnum.openvswitch)
parameters:DevicesInterfaceVirtualPortParameters = element(default=DevicesInterfaceVirtualPortParameters())
class DevicesInterfaceModel(BaseXmlModel, search_mode='ordered'):
class DevicesInterfaceModel(BaseXmlModel, search_mode='unordered'):
class typeEnum(str, Enum):
virtio = "virtio"
type:typeEnum = attr(default=typeEnum.virtio)
class DevicesInterfaceMTU(BaseXmlModel, search_mode='ordered'):
class DevicesInterfaceMTU(BaseXmlModel, search_mode='unordered'):
mtu:int = attr(default=1500)
class DevicesInterface(BaseXmlModel, search_mode='ordered'):
class DevicesInterface(BaseXmlModel, search_mode='unordered'):
"""Openvswitch Only"""
class typeEnum(str, Enum):
@ -494,14 +494,14 @@ class DevicesInterface(BaseXmlModel, search_mode='ordered'):
model:DevicesInterfaceModel = element(default=DevicesInterfaceModel())
mtu:DevicesInterfaceMTU = element(default=DevicesInterfaceMTU())
class DevicesChannelSource(BaseXmlModel, search_mode='ordered'):
class DevicesChannelSource(BaseXmlModel, search_mode='unordered'):
class modeEnum(str, Enum):
bind = "bind"
mode:modeEnum = attr(default=modeEnum.bind)
path:str = attr(default=None)
class DevicesChannelTarget(BaseXmlModel, search_mode='ordered'):
class DevicesChannelTarget(BaseXmlModel, search_mode='unordered'):
class typeEnum(str, Enum):
virtio = "virtio"
@ -516,7 +516,7 @@ class DevicesChannel(BaseXmlModel):
source:DevicesChannelSource = element(default=DevicesChannelSource())
target:DevicesChannelTarget = element(default=DevicesChannelTarget())
class Graphics(BaseXmlModel, search_mode='ordered'):
class Graphics(BaseXmlModel, search_mode='unordered'):
class typeEnum(str, Enum):
vnc = "vnc"
@ -562,10 +562,10 @@ class Graphics(BaseXmlModel, search_mode='ordered'):
keymap:keymapEnum = attr(default=keymapEnum.en_us)
powerControl:YesNoEnum = attr(default=YesNoEnum.YES)
class Audio(BaseXmlModel, search_mode='ordered'):
class Audio(BaseXmlModel, search_mode='unordered'):
pass
class VideoModel(BaseXmlModel, search_mode='ordered'):
class VideoModel(BaseXmlModel, search_mode='unordered'):
class typeEnum(str, Enum):
vga = "vga"
cirrus = "cirrus"
@ -575,10 +575,10 @@ class VideoModel(BaseXmlModel, search_mode='ordered'):
vram:int = attr(default=16384)
primary:YesNoEnum = attr(default=YesNoEnum.YES)
class Video(BaseXmlModel, search_mode='ordered'):
class Video(BaseXmlModel, search_mode='unordered'):
model:VideoModel = element()
class Watchdog(BaseXmlModel, search_mode='ordered'):
class Watchdog(BaseXmlModel, search_mode='unordered'):
class modelEnum(str, Enum):
itco = "itco"
@ -598,7 +598,7 @@ class Watchdog(BaseXmlModel, search_mode='ordered'):
class TPMBackendEncryption(BaseXmlModel):
secret:UUID4 = attr()
class TPMBackend(BaseXmlModel, search_mode='ordered'):
class TPMBackend(BaseXmlModel, search_mode='unordered'):
class typeEnum(str, Enum):
emulator = "emulator"
@ -610,7 +610,7 @@ class TPMBackend(BaseXmlModel, search_mode='ordered'):
version:versionEnum = attr(default=versionEnum.v20)
encryption:Optional[TPMBackendEncryption] = element(default=None)
class TPM(BaseXmlModel, search_mode='ordered'):
class TPM(BaseXmlModel, search_mode='unordered'):
class modelEnum(str, Enum):
tpm_tis = "tpm-tis"
tpm_crb = "tpm-crb"
@ -618,7 +618,7 @@ class TPM(BaseXmlModel, search_mode='ordered'):
model:modelEnum = attr(default=modelEnum.tpm_tis)
backend:TPMBackend = element(default=TPMBackend())
class Devices(BaseXmlModel, search_mode='ordered'):
class Devices(BaseXmlModel, search_mode='unordered'):
emulator:str = element(default="/usr/libexec/qemu-kvm")
disk:Optional[List[DevicesDisk]] = element(default=[])
interface:Optional[List[DevicesInterface]] = element(default=[])
@ -629,7 +629,7 @@ class Devices(BaseXmlModel, search_mode='ordered'):
watchdog:Optional[Watchdog] = element(default=None)
tpm:Optional[TPM] = element(default=None)
class Dom(BaseXmlModel, tag='domain', search_mode='ordered'):
class Dom(BaseXmlModel, tag='domain', search_mode='unordered'):
class typeEnum(str, Enum):
kvm = "kvm"