create stats api

This commit is contained in:
Mickael BOURNEUF 2024-10-24 12:51:59 +02:00
parent f0667781a4
commit 9e03deeadc
1 changed files with 13 additions and 0 deletions

View File

@ -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()