From 2e804ee9ca6e0383eec93f167f94a4be26a0d9c2 Mon Sep 17 00:00:00 2001 From: Mickael B Date: Tue, 17 Dec 2024 10:36:54 +0100 Subject: [PATCH] update to 0.1.34 --- deevirt_schema/api/storage.py | 3 +++ deevirt_schema/api/vm.py | 31 ++++++++++++++++--------------- setup.py | 2 +- 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/deevirt_schema/api/storage.py b/deevirt_schema/api/storage.py index 54aef63..82cfa6d 100644 --- a/deevirt_schema/api/storage.py +++ b/deevirt_schema/api/storage.py @@ -40,6 +40,9 @@ class StorageBlockAttached(BaseModel): id:UUID4 = Field() order:int = Field() +class StorageBlockDeattached(BaseModel): + id:UUID4 = Field() + """class DiskDriver(configDom.DevicesDiskDriver): name:str = Field(default="qemu") type:configDom.DevicesDiskDriver.typeEnum = Field(default=configDom.DevicesDiskDriver.typeEnum.raw) diff --git a/deevirt_schema/api/vm.py b/deevirt_schema/api/vm.py index 7ee9bb3..b0f6d04 100644 --- a/deevirt_schema/api/vm.py +++ b/deevirt_schema/api/vm.py @@ -162,20 +162,7 @@ class VM(BaseModel): # Devices devices:Devices = Field(default=Devices(), description="Matériel virtuel: Périphériques") -"""VM LIST GET""" -class VMs(BaseModel): - model_config = ConfigDict(from_attributes=True) - class Datacenter(BaseModel): - model_config = ConfigDict(from_attributes=True) - - id:UUID4 - name:str - - id:UUID4 - name:str - state:int - datacenter:Optional[Datacenter] = Field(default=[]) """VM GET""" class VMGetVCPU(VCPU): @@ -212,6 +199,21 @@ class VMGet(VM): os:VMGetOS = Field(default=VMGetOS(), description="Options VM: Options de démarrage.") devices:VMGetDevices = Field(default=VMGetDevices(), description="Matériel virtuel: Périphériques") +"""VM LIST GET""" +class VMs(BaseModel): + model_config = ConfigDict(from_attributes=True) + + class Datacenter(BaseModel): + model_config = ConfigDict(from_attributes=True) + + id:UUID4 + name:str + + id:UUID4 + name:str + state:VMGet.StateEnum = Field(default=None) + datacenter:Optional[Datacenter] = Field(default=[]) + """VM POST""" class VMPost(VM): id:UUID4 = Field(default_factory=uuid4) @@ -219,8 +221,7 @@ class VMPost(VM): """VM DELETE""" class VMDelete(BaseModel): - id:UUID4 = Field() - inventory_only:Optional[bool] = Field(default=True) + all_delete:Optional[bool] = Field(default=False) """VM STOP""" class VMStop(BaseModel): diff --git a/setup.py b/setup.py index 91c0f32..2bf058c 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import find_packages, setup setup( name='deevirt_schema', - version='0.1.33', + version='0.1.34', description='Deevirt Schema', url='https://git.celeonet.fr/Deevirt/deevirt_schema.git', author='Celeonet',