Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
shared-libs
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pi-Lab
shared-libs
Commits
d8e3ae58
Commit
d8e3ae58
authored
10 months ago
by
Alfred Ashur Oshana
Browse files
Options
Downloads
Patches
Plain Diff
fix: small changes
parent
2f93ef99
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
pilab/events/meta.py
+2
-3
2 additions, 3 deletions
pilab/events/meta.py
pilab/events/reservation.py
+3
-3
3 additions, 3 deletions
pilab/events/reservation.py
setup.py
+1
-1
1 addition, 1 deletion
setup.py
with
6 additions
and
7 deletions
pilab/events/meta.py
+
2
−
3
View file @
d8e3ae58
...
...
@@ -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
]
...
...
This diff is collapsed.
Click to expand it.
pilab/events/reservation.py
+
3
−
3
View file @
d8e3ae58
...
...
@@ -25,7 +25,7 @@ class Reservation(BaseModel):
pi_id
:
int
starttime
:
datetime
endtime
:
datetime
extra
U
sers
:
Optional
[
List
[
str
]]
=
None
extra
_u
sers
:
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
.
extra
U
sers
is
None
:
if
res
.
extra
_u
sers
is
None
:
return
[
res
.
owner
]
else
:
return
[
*
res
.
extra
U
sers
,
res
.
owner
]
return
[
*
res
.
extra
_u
sers
,
res
.
owner
]
else
:
return
[]
...
...
This diff is collapsed.
Click to expand it.
setup.py
+
1
−
1
View file @
d8e3ae58
...
...
@@ -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
'
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment