2024-11-08 12:27:20 +01:00

17 lines
476 B
Python

import time, datetime
from typing import Optional
from pydantic import BaseModel, ConfigDict, Field
from ..libvirt.dom.stats import Stats, Memory
class MemorySwap(BaseModel):
swp_in:Optional[int] = Field(default=None)
swp_out:Optional[int] = Field(default=None)
class Memory(Memory):
swap:MemorySwap = Field()
class Stats(Stats):
memory:Memory = Field()
class MongoStats(Stats):
created_at: Optional[float] = Field(default=None, alias='created_at')