create new class MongoStats
This commit is contained in:
parent
6b386d6758
commit
cfb1647039
|
@ -1,5 +1,6 @@
|
||||||
|
import datetime
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
from pydantic import BaseModel, Field
|
from pydantic import BaseModel, ConfigDict, Field
|
||||||
from ..libvirt.dom.stats import Stats
|
from ..libvirt.dom.stats import Stats
|
||||||
|
|
||||||
class MemorySwap(BaseModel):
|
class MemorySwap(BaseModel):
|
||||||
|
@ -10,4 +11,9 @@ class Memory(BaseModel):
|
||||||
swap:MemorySwap = Field()
|
swap:MemorySwap = Field()
|
||||||
|
|
||||||
class Stats(Stats):
|
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 typing import List, Optional
|
||||||
from pydantic import UUID4, BaseModel, ConfigDict, Field
|
from pydantic import UUID4, BaseModel, ConfigDict, Field
|
||||||
from time import time_ns
|
from time import time_ns
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -2,7 +2,7 @@ from setuptools import find_packages, setup
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='deevirt_schema',
|
name='deevirt_schema',
|
||||||
version='0.1.6',
|
version='0.1.7',
|
||||||
description='Deevirt Schema',
|
description='Deevirt Schema',
|
||||||
url='https://git.celeonet.fr/Deevirt/deevirt_schema.git',
|
url='https://git.celeonet.fr/Deevirt/deevirt_schema.git',
|
||||||
author='Celeonet',
|
author='Celeonet',
|
||||||
|
|
Loading…
Reference in New Issue