create new class MongoStats
This commit is contained in:
parent
6b386d6758
commit
cfb1647039
|
@ -1,5 +1,6 @@
|
|||
import datetime
|
||||
from typing import Optional
|
||||
from pydantic import BaseModel, Field
|
||||
from pydantic import BaseModel, ConfigDict, Field
|
||||
from ..libvirt.dom.stats import Stats
|
||||
|
||||
class MemorySwap(BaseModel):
|
||||
|
@ -10,4 +11,9 @@ class Memory(BaseModel):
|
|||
swap:MemorySwap = Field()
|
||||
|
||||
class Stats(Stats):
|
||||
memory:Memory = Field()
|
||||
memory:Memory = Field()
|
||||
|
||||
class MongoStats(Stats):
|
||||
model_config = ConfigDict(arbitrary_types_allowed=True)
|
||||
|
||||
created_at: datetime = Field(default=datetime.datetime.now(datetime.timezone.utc), alias='send_at')
|
|
@ -1,3 +1,4 @@
|
|||
import datetime
|
||||
from typing import List, Optional
|
||||
from pydantic import UUID4, BaseModel, ConfigDict, Field
|
||||
from time import time_ns
|
||||
|
|
Loading…
Reference in New Issue