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
787267c4
".github/vscode:/vscode.git/clone" did not exist on "fda762a27d2bc52f509e2d1813b5ba2c1d6b6aac"
Commit
787267c4
authored
Dec 21, 2024
by
Jonas Kaufmann
Browse files
orchestration/simulation/base: fix typo on inst_socket.SockType
parent
7373f058
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
symphony/orchestration/simbricks/orchestration/simulation/base.py
.../orchestration/simbricks/orchestration/simulation/base.py
+7
-7
No files found.
symphony/orchestration/simbricks/orchestration/simulation/base.py
View file @
787267c4
...
...
@@ -148,7 +148,7 @@ class Simulator(utils_base.IdObj, abc.ABC):
@
staticmethod
def
filter_sockets
(
sockets
:
list
[
inst_socket
.
Socket
],
filter_type
:
inst_socket
.
s
ockType
=
inst_socket
.
s
ockType
.
LISTEN
,
filter_type
:
inst_socket
.
S
ockType
=
inst_socket
.
S
ockType
.
LISTEN
,
)
->
list
[
inst_socket
.
Socket
]:
res
=
list
(
filter
(
lambda
sock
:
sock
.
_type
==
filter_type
,
sockets
))
return
res
...
...
@@ -158,10 +158,10 @@ class Simulator(utils_base.IdObj, abc.ABC):
sockets
:
list
[
inst_socket
.
Socket
],
)
->
tuple
[
list
[
inst_socket
.
Socket
],
list
[
inst_socket
.
Socket
]]:
listen
=
Simulator
.
filter_sockets
(
sockets
=
sockets
,
filter_type
=
inst_socket
.
s
ockType
.
LISTEN
sockets
=
sockets
,
filter_type
=
inst_socket
.
S
ockType
.
LISTEN
)
connect
=
Simulator
.
filter_sockets
(
sockets
=
sockets
,
filter_type
=
inst_socket
.
s
ockType
.
CONNECT
sockets
=
sockets
,
filter_type
=
inst_socket
.
S
ockType
.
CONNECT
)
return
listen
,
connect
...
...
@@ -249,7 +249,7 @@ class Simulator(utils_base.IdObj, abc.ABC):
return
sockets
def
_get_all_sockets_by_type
(
self
,
inst
:
inst_base
.
Instantiation
,
sock_type
:
inst_socket
.
s
ockType
self
,
inst
:
inst_base
.
Instantiation
,
sock_type
:
inst_socket
.
S
ockType
)
->
list
[
inst_socket
.
Socket
]:
sockets
=
self
.
_get_socks_by_all_comp
(
inst
=
inst
)
sockets
=
Simulator
.
filter_sockets
(
sockets
=
sockets
,
filter_type
=
sock_type
)
...
...
@@ -286,21 +286,21 @@ class Simulator(utils_base.IdObj, abc.ABC):
@
abc
.
abstractmethod
def
supported_socket_types
(
self
,
interface
:
sys_conf
.
Interface
)
->
set
[
inst_socket
.
s
ockType
]:
)
->
set
[
inst_socket
.
S
ockType
]:
return
{}
# Sockets to be cleaned up: always the CONNECTING sockets
# pylint: disable=unused-argument
def
sockets_cleanup
(
self
,
inst
:
inst_base
.
Instantiation
)
->
list
[
inst_socket
.
Socket
]:
return
self
.
_get_all_sockets_by_type
(
inst
=
inst
,
sock_type
=
inst_socket
.
s
ockType
.
LISTEN
inst
=
inst
,
sock_type
=
inst_socket
.
S
ockType
.
LISTEN
)
# sockets to wait for indicating the simulator is ready
# pylint: disable=unused-argument
def
sockets_wait
(
self
,
inst
:
inst_base
.
Instantiation
)
->
list
[
inst_socket
.
Socket
]:
return
self
.
_get_all_sockets_by_type
(
inst
=
inst
,
sock_type
=
inst_socket
.
s
ockType
.
LISTEN
inst
=
inst
,
sock_type
=
inst_socket
.
S
ockType
.
LISTEN
)
def
start_delay
(
self
)
->
int
:
...
...
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