Skip to content
Snippets Groups Projects
Commit d8e3ae58 authored by Alfred Ashur Oshana's avatar Alfred Ashur Oshana
Browse files

fix: small changes

parent 2f93ef99
Branches
No related tags found
No related merge requests found
......@@ -31,19 +31,19 @@ class Host(BaseModel):
mac: str
ipv4_address: IPv4Address
hostname: str
model: str
class Switch(Host):
"""
representation of host object with id
"""
model: str
poe: bool
class Controller(Host):
"""
representation of host object with id
"""
model: str
pass
class HostUpdate(Host):
......@@ -58,7 +58,6 @@ class Pi(Host):
representation of pi object with host id
"""
serial: bytes
display: bool
position: int
ssh_host_ed25519_key: Optional[str]
......
......@@ -25,7 +25,7 @@ class Reservation(BaseModel):
pi_id : int
starttime: datetime
endtime: datetime
extraUsers: Optional[List[str]] = None
extra_users: Optional[List[str]] = None
reason: str
......@@ -302,10 +302,10 @@ def get_active_users(pi_id: int):
raise RuntimeError("Reservation consumer is not initialized")
if res and res.endtime > datetime.utcnow().replace(tzinfo=ZoneInfo('UTC')):
if res.extraUsers is None:
if res.extra_users is None:
return [res.owner]
else:
return [*res.extraUsers, res.owner]
return [*res.extra_users, res.owner]
else:
return []
......
......@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
setup(
name='pilab',
version='4.3.0',
version='4.3.1',
description='Shared-Libs for the pi-lab microservices',
url='https://code.fbi.h-da.de/api/v4/projects/27896/packages/pypi/pilab',
author='Max Reinheimer',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment