From e23d0e4c68249a36b7c0debb2aae3b7dce4a63ed Mon Sep 17 00:00:00 2001 From: Mickael B Date: Sun, 10 Nov 2024 17:23:41 +0100 Subject: [PATCH] update storage & events --- deevirt_schema/api/storage.py | 6 +++--- deevirt_schema/libvirt/dom/events.py | 1 + deevirt_schema/libvirt/events/__init__.py | 0 3 files changed, 4 insertions(+), 3 deletions(-) delete mode 100644 deevirt_schema/libvirt/events/__init__.py diff --git a/deevirt_schema/api/storage.py b/deevirt_schema/api/storage.py index 2745ade..f05fe4d 100644 --- a/deevirt_schema/api/storage.py +++ b/deevirt_schema/api/storage.py @@ -17,7 +17,7 @@ class StorageBlock(BaseModel): name:str = Field() size:int = Field() vm_hard_disk:Optional[List[VMHardDisk]] = Field(default=[]) - + class StoragePool(BaseModel): model_config = ConfigDict(from_attributes=True) @@ -32,7 +32,7 @@ class Storage(BaseModel): name:str = Field() pool: Optional[List[StoragePool]] = Field(default=[], alias='storage_pool') -class DiskDriver(configDom.DevicesDiskDriver): +"""class DiskDriver(configDom.DevicesDiskDriver): name:str = Field(default="qemu") type:configDom.DevicesDiskDriver.typeEnum = Field(default=configDom.DevicesDiskDriver.typeEnum.raw) @@ -66,7 +66,7 @@ class DiskCreate(Disk): order:int = Field(default=0, json_schema_extra={"hidden": True}) class DiskAttached(BaseModel): - order:int = Field() + order:int = Field()""" class BlockCreate(BaseModel): size:int = Field() diff --git a/deevirt_schema/libvirt/dom/events.py b/deevirt_schema/libvirt/dom/events.py index 6c8239d..8dce26e 100644 --- a/deevirt_schema/libvirt/dom/events.py +++ b/deevirt_schema/libvirt/dom/events.py @@ -67,6 +67,7 @@ class LifeCycle(BaseModel): REBOOT = 100 company_id:UUID4 = Field() + datacenter_id:UUID4 = Field() vm_id:UUID = Field() action:EventType = Field() diff --git a/deevirt_schema/libvirt/events/__init__.py b/deevirt_schema/libvirt/events/__init__.py deleted file mode 100644 index e69de29..0000000