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
0afce61c
Unverified
Commit
0afce61c
authored
Dec 10, 2024
by
Jakob Görgen
Browse files
symphony/orchestration: fixed fromJSON WireNet + SwitchNet
parent
113fcda2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
symphony/orchestration/simbricks/orchestration/simulation/net/net_base.py
...ration/simbricks/orchestration/simulation/net/net_base.py
+3
-2
No files found.
symphony/orchestration/simbricks/orchestration/simulation/net/net_base.py
View file @
0afce61c
...
@@ -88,7 +88,7 @@ class WireNet(NetSim):
...
@@ -88,7 +88,7 @@ class WireNet(NetSim):
@
classmethod
@
classmethod
def
fromJSON
(
cls
,
simulation
:
sim_base
.
Simulation
,
json_obj
:
dict
)
->
WireNet
:
def
fromJSON
(
cls
,
simulation
:
sim_base
.
Simulation
,
json_obj
:
dict
)
->
WireNet
:
instance
=
super
().
fromJSON
(
simulation
,
json_obj
)
instance
=
super
().
fromJSON
(
simulation
,
json_obj
)
# TODO: FIXME
instance
.
_relative_pcap_file_path
=
base_utils
.
get_json_attr_top
(
json_obj
,
"relative_pcap_file_path"
)
return
instance
return
instance
def
run_cmd
(
self
,
inst
:
inst_base
.
Instantiation
)
->
str
:
def
run_cmd
(
self
,
inst
:
inst_base
.
Instantiation
)
->
str
:
...
@@ -140,7 +140,7 @@ class SwitchNet(NetSim):
...
@@ -140,7 +140,7 @@ class SwitchNet(NetSim):
@
classmethod
@
classmethod
def
fromJSON
(
cls
,
simulation
:
sim_base
.
Simulation
,
json_obj
:
dict
)
->
SwitchNet
:
def
fromJSON
(
cls
,
simulation
:
sim_base
.
Simulation
,
json_obj
:
dict
)
->
SwitchNet
:
instance
=
super
().
fromJSON
(
simulation
,
json_obj
)
instance
=
super
().
fromJSON
(
simulation
,
json_obj
)
# TODO: FIXME
instance
.
_relative_pcap_file_path
=
base_utils
.
get_json_attr_top
(
json_obj
,
"relative_pcap_file_path"
)
return
instance
return
instance
def
run_cmd
(
self
,
inst
:
inst_base
.
Instantiation
)
->
str
:
def
run_cmd
(
self
,
inst
:
inst_base
.
Instantiation
)
->
str
:
...
@@ -189,6 +189,7 @@ class MemSwitchNet(SwitchNet):
...
@@ -189,6 +189,7 @@ class MemSwitchNet(SwitchNet):
def
toJSON
(
self
)
->
dict
:
def
toJSON
(
self
)
->
dict
:
json_obj
=
super
().
toJSON
()
json_obj
=
super
().
toJSON
()
# TODO: FIXME
return
json_obj
return
json_obj
@
classmethod
@
classmethod
...
...
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