update current_time and interval for stats
This commit is contained in:
parent
491fc1116c
commit
76d643b3ab
|
@ -1,11 +1,12 @@
|
||||||
import datetime
|
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
|
||||||
|
|
||||||
class CPU(BaseModel):
|
class CPU(BaseModel):
|
||||||
model_config = ConfigDict()
|
model_config = ConfigDict()
|
||||||
current_time:int = Field(default_factory=time_ns)
|
current_time:int = Field(default_factory=time)
|
||||||
|
interval:int = Field()
|
||||||
time:int = Field()
|
time:int = Field()
|
||||||
user:int = Field()
|
user:int = Field()
|
||||||
system:int = Field()
|
system:int = Field()
|
||||||
|
@ -18,7 +19,8 @@ class DiskFlows(BaseModel):
|
||||||
|
|
||||||
class Disk(BaseModel):
|
class Disk(BaseModel):
|
||||||
model_config = ConfigDict()
|
model_config = ConfigDict()
|
||||||
current_time:int = Field(default_factory=time_ns)
|
current_time:int = Field(default_factory=time)
|
||||||
|
interval:int = Field()
|
||||||
uuid:UUID4 = Field()
|
uuid:UUID4 = Field()
|
||||||
name:str = Field()
|
name:str = Field()
|
||||||
read:DiskFlows = Field()
|
read:DiskFlows = Field()
|
||||||
|
@ -50,12 +52,15 @@ class Interface(BaseModel):
|
||||||
model_config = ConfigDict()
|
model_config = ConfigDict()
|
||||||
|
|
||||||
uuid:UUID4 = Field()
|
uuid:UUID4 = Field()
|
||||||
current_time:int = Field(default_factory=time_ns)
|
current_time:int = Field(default_factory=time)
|
||||||
|
interval:int = Field()
|
||||||
name:str = Field()
|
name:str = Field()
|
||||||
rx:InterfaceFlows = Field()
|
rx:InterfaceFlows = Field()
|
||||||
tx:InterfaceFlows = Field()
|
tx:InterfaceFlows = Field()
|
||||||
|
|
||||||
class Stats(BaseModel):
|
class Stats(BaseModel):
|
||||||
|
current_time:int = Field(default_factory=time)
|
||||||
|
interval:int = Field()
|
||||||
company_id:UUID4 = Field()
|
company_id:UUID4 = Field()
|
||||||
datacenter_id:UUID4 = Field()
|
datacenter_id:UUID4 = Field()
|
||||||
vm_id:UUID4 = Field()
|
vm_id:UUID4 = Field()
|
||||||
|
|
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.27',
|
version='0.1.28',
|
||||||
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