Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ycai
simbricks
Commits
7294c065
Unverified
Commit
7294c065
authored
Jan 20, 2025
by
Jakob Görgen
Browse files
symphony/orchestration: small adjustments toJSON + fromJSON for host/app.py
parent
72dddf90
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
12 deletions
+4
-12
symphony/orchestration/simbricks/orchestration/system/host/app.py
.../orchestration/simbricks/orchestration/system/host/app.py
+4
-12
No files found.
symphony/orchestration/simbricks/orchestration/system/host/app.py
View file @
7294c065
...
...
@@ -120,9 +120,7 @@ class BaseLinuxApplication(Application):
@
classmethod
def
fromJSON
(
cls
,
system
:
sys_base
.
System
,
json_obj
:
dict
):
instance
=
super
().
fromJSON
(
system
,
json_obj
)
instance
.
start_delay
=
utils_base
.
get_json_attr_top_or_none
(
json_obj
,
"start_delay"
)
instance
.
start_delay
=
utils_base
.
get_json_attr_top_or_none
(
json_obj
,
"start_delay"
)
instance
.
end_delay
=
utils_base
.
get_json_attr_top_or_none
(
json_obj
,
"end_delay"
)
instance
.
wait
=
utils_base
.
get_json_attr_top
(
json_obj
,
"wait"
)
return
instance
...
...
@@ -149,9 +147,7 @@ class PingClient(BaseLinuxApplication):
class
Sleep
(
BaseLinuxApplication
):
def
__init__
(
self
,
h
:
sys_host
.
LinuxHost
,
delay
:
float
=
10
,
infinite
:
bool
=
False
)
->
None
:
def
__init__
(
self
,
h
:
sys_host
.
LinuxHost
,
delay
:
float
=
10
,
infinite
:
bool
=
False
)
->
None
:
super
().
__init__
(
h
)
self
.
infinite
:
bool
=
infinite
self
.
delay
:
float
=
delay
...
...
@@ -216,10 +212,6 @@ class NetperfClient(BaseLinuxApplication):
def
fromJSON
(
cls
,
system
:
sys_base
.
System
,
json_obj
:
dict
)
->
NetperfClient
:
instance
=
super
().
fromJSON
(
system
,
json_obj
)
instance
.
server_ip
=
utils_base
.
get_json_attr_top
(
json_obj
,
"server_ip"
)
instance
.
duration_tp
=
int
(
utils_base
.
get_json_attr_top
(
json_obj
,
"duration_tp"
)
)
instance
.
duration_lat
=
int
(
utils_base
.
get_json_attr_top
(
json_obj
,
"duration_lat"
)
)
instance
.
duration_tp
=
int
(
utils_base
.
get_json_attr_top
(
json_obj
,
"duration_tp"
))
instance
.
duration_lat
=
int
(
utils_base
.
get_json_attr_top
(
json_obj
,
"duration_lat"
))
return
instance
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment