From 327a6d99796f4f0ffef6d0e6ae1cf3f6b85dc5a1 Mon Sep 17 00:00:00 2001 From: Mickael B Date: Wed, 30 Oct 2024 12:35:18 +0100 Subject: [PATCH] correction for current_time for the stats. --- deevirt_schema/libvirt/dom/stats.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/deevirt_schema/libvirt/dom/stats.py b/deevirt_schema/libvirt/dom/stats.py index 2997fc9..442883e 100644 --- a/deevirt_schema/libvirt/dom/stats.py +++ b/deevirt_schema/libvirt/dom/stats.py @@ -4,7 +4,8 @@ from time import time_ns class CPU(BaseModel): model_config = ConfigDict() - time:int = Field(default_factory=time_ns) + current_time:int = Field(default_factory=time_ns) + time:int = Field() user:int = Field() system:int = Field() count:int = Field() @@ -16,7 +17,7 @@ class DiskFlows(BaseModel): class Disk(BaseModel): model_config = ConfigDict() - time:int = Field(default_factory=time_ns) + current_time:int = Field(default_factory=time_ns) uuid:UUID4 = Field() name:str = Field() read:DiskFlows = Field() @@ -28,7 +29,7 @@ class MemorySwap(BaseModel): class Memory(BaseModel): model_config = ConfigDict() - time:int = Field() + current_time:int = Field() available:Optional[int] = Field(default=None) current:int = Field() maximum:int = Field() @@ -48,7 +49,7 @@ class Interface(BaseModel): model_config = ConfigDict() uuid:UUID4 = Field() - time:int = Field(default_factory=time_ns) + current_time:int = Field(default_factory=time_ns) name:str = Field() rx:InterfaceFlows = Field() tx:InterfaceFlows = Field()