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
8073e668
Commit
8073e668
authored
Dec 21, 2024
by
Jonas Kaufmann
Browse files
orchestration/simulation: actually return sets for supported_socket_types()
parent
aa0cb6a7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
4 deletions
+9
-4
symphony/orchestration/simbricks/orchestration/simulation/base.py
.../orchestration/simbricks/orchestration/simulation/base.py
+6
-1
symphony/orchestration/simbricks/orchestration/simulation/host.py
.../orchestration/simbricks/orchestration/simulation/host.py
+1
-1
symphony/orchestration/simbricks/orchestration/simulation/net/net_base.py
...ration/simbricks/orchestration/simulation/net/net_base.py
+1
-1
symphony/orchestration/simbricks/orchestration/simulation/pcidev.py
...rchestration/simbricks/orchestration/simulation/pcidev.py
+1
-1
No files found.
symphony/orchestration/simbricks/orchestration/simulation/base.py
View file @
8073e668
...
@@ -287,7 +287,7 @@ class Simulator(utils_base.IdObj, abc.ABC):
...
@@ -287,7 +287,7 @@ class Simulator(utils_base.IdObj, abc.ABC):
def
supported_socket_types
(
def
supported_socket_types
(
self
,
interface
:
sys_conf
.
Interface
self
,
interface
:
sys_conf
.
Interface
)
->
set
[
inst_socket
.
sockType
]:
)
->
set
[
inst_socket
.
sockType
]:
return
[]
return
{}
# Sockets to be cleaned up: always the CONNECTING sockets
# Sockets to be cleaned up: always the CONNECTING sockets
# pylint: disable=unused-argument
# pylint: disable=unused-argument
...
@@ -452,6 +452,11 @@ class Simulation(utils_base.IdObj):
...
@@ -452,6 +452,11 @@ class Simulation(utils_base.IdObj):
self
.
update_channel_mapping
(
sys_chan
=
chan
,
sim_chan
=
channel
)
self
.
update_channel_mapping
(
sys_chan
=
chan
,
sim_chan
=
channel
)
return
channel
return
channel
def
get_channel
(
self
,
chan
:
sys_conf
.
Channel
)
->
sim_chan
.
Channel
:
if
not
self
.
is_channel_instantiated
(
chan
):
raise
RuntimeError
(
f
"Channel
{
chan
}
is not instantiated"
)
return
self
.
_chan_map
[
chan
]
def
all_simulators
(
self
)
->
list
[
Simulator
]:
def
all_simulators
(
self
)
->
list
[
Simulator
]:
return
self
.
_sim_list
return
self
.
_sim_list
...
...
symphony/orchestration/simbricks/orchestration/simulation/host.py
View file @
8073e668
...
@@ -61,7 +61,7 @@ class HostSim(sim_base.Simulator):
...
@@ -61,7 +61,7 @@ class HostSim(sim_base.Simulator):
def
supported_socket_types
(
def
supported_socket_types
(
self
,
interface
:
system
.
Interface
self
,
interface
:
system
.
Interface
)
->
set
[
inst_base
.
SockType
]:
)
->
set
[
inst_base
.
SockType
]:
return
[
inst_
socket
.
SockType
.
CONNECT
]
return
{
inst_
base
.
SockType
.
CONNECT
}
class
Gem5Sim
(
HostSim
):
class
Gem5Sim
(
HostSim
):
...
...
symphony/orchestration/simbricks/orchestration/simulation/net/net_base.py
View file @
8073e668
...
@@ -50,7 +50,7 @@ class NetSim(sim_base.Simulator):
...
@@ -50,7 +50,7 @@ class NetSim(sim_base.Simulator):
def
supported_socket_types
(
def
supported_socket_types
(
self
,
interface
:
sys_base
.
Interface
self
,
interface
:
sys_base
.
Interface
)
->
set
[
inst_socket
.
SockType
]:
)
->
set
[
inst_socket
.
SockType
]:
return
[
inst_
base
.
SockType
.
CONNECT
]
return
{
inst_
socket
.
SockType
.
CONNECT
}
def
toJSON
(
self
)
->
dict
:
def
toJSON
(
self
)
->
dict
:
json_obj
=
super
().
toJSON
()
json_obj
=
super
().
toJSON
()
...
...
symphony/orchestration/simbricks/orchestration/simulation/pcidev.py
View file @
8073e668
...
@@ -45,7 +45,7 @@ class PCIDevSim(sim_base.Simulator):
...
@@ -45,7 +45,7 @@ class PCIDevSim(sim_base.Simulator):
def
supported_socket_types
(
def
supported_socket_types
(
self
,
interface
:
sys_base
.
Interface
self
,
interface
:
sys_base
.
Interface
)
->
set
[
inst_socket
.
SockType
]:
)
->
set
[
inst_socket
.
SockType
]:
return
[
inst_socket
.
SockType
.
LISTEN
]
return
{
inst_socket
.
SockType
.
LISTEN
}
class
NICSim
(
PCIDevSim
):
class
NICSim
(
PCIDevSim
):
...
...
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