create new class MongoStats

This commit is contained in:
Jonathan Gohier 2024-11-07 09:35:35 +01:00
parent 6b386d6758
commit cfb1647039
3 changed files with 10 additions and 3 deletions

View File

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

View File

@ -1,3 +1,4 @@
import datetime
from typing import List, Optional
from pydantic import UUID4, BaseModel, ConfigDict, Field
from time import time_ns

View File

@ -2,7 +2,7 @@ from setuptools import find_packages, setup
setup(
name='deevirt_schema',
version='0.1.6',
version='0.1.7',
description='Deevirt Schema',
url='https://git.celeonet.fr/Deevirt/deevirt_schema.git',
author='Celeonet',