From 9e03deeadc5a476b1f0c46433f297d9579c72461 Mon Sep 17 00:00:00 2001 From: Mickael B Date: Thu, 24 Oct 2024 12:51:59 +0200 Subject: [PATCH] create stats api --- deevirt_schema/api/stats.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 deevirt_schema/api/stats.py diff --git a/deevirt_schema/api/stats.py b/deevirt_schema/api/stats.py new file mode 100644 index 0000000..343f619 --- /dev/null +++ b/deevirt_schema/api/stats.py @@ -0,0 +1,13 @@ +from typing import Optional +from pydantic import BaseModel, Field +from ..libvirt.events import Stats + +class MemorySwap(BaseModel): + swp_in:Optional[int] = Field(default=None) + swp_out:Optional[int] = Field(default=None) + +class Memory(BaseModel): + swap:MemorySwap = Field() + +class Stats(Stats): + memory:Memory = Field() \ No newline at end of file