create stats api
This commit is contained in:
parent
f0667781a4
commit
9e03deeadc
13
deevirt_schema/api/stats.py
Normal file
13
deevirt_schema/api/stats.py
Normal 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()
|
Loading…
x
Reference in New Issue
Block a user