"docs/vscode:/vscode.git/clone" did not exist on "5e746753d6f0bbadb3649b1d366c61f748ff68ee"
Commit 787267c4 authored by Jonas Kaufmann's avatar Jonas Kaufmann
Browse files

orchestration/simulation/base: fix typo on inst_socket.SockType

parent 7373f058
...@@ -148,7 +148,7 @@ class Simulator(utils_base.IdObj, abc.ABC): ...@@ -148,7 +148,7 @@ class Simulator(utils_base.IdObj, abc.ABC):
@staticmethod @staticmethod
def filter_sockets( def filter_sockets(
sockets: list[inst_socket.Socket], sockets: list[inst_socket.Socket],
filter_type: inst_socket.sockType = inst_socket.sockType.LISTEN, filter_type: inst_socket.SockType = inst_socket.SockType.LISTEN,
) -> list[inst_socket.Socket]: ) -> list[inst_socket.Socket]:
res = list(filter(lambda sock: sock._type == filter_type, sockets)) res = list(filter(lambda sock: sock._type == filter_type, sockets))
return res return res
...@@ -158,10 +158,10 @@ class Simulator(utils_base.IdObj, abc.ABC): ...@@ -158,10 +158,10 @@ class Simulator(utils_base.IdObj, abc.ABC):
sockets: list[inst_socket.Socket], sockets: list[inst_socket.Socket],
) -> tuple[list[inst_socket.Socket], list[inst_socket.Socket]]: ) -> tuple[list[inst_socket.Socket], list[inst_socket.Socket]]:
listen = Simulator.filter_sockets( listen = Simulator.filter_sockets(
sockets=sockets, filter_type=inst_socket.sockType.LISTEN sockets=sockets, filter_type=inst_socket.SockType.LISTEN
) )
connect = Simulator.filter_sockets( connect = Simulator.filter_sockets(
sockets=sockets, filter_type=inst_socket.sockType.CONNECT sockets=sockets, filter_type=inst_socket.SockType.CONNECT
) )
return listen, connect return listen, connect
...@@ -249,7 +249,7 @@ class Simulator(utils_base.IdObj, abc.ABC): ...@@ -249,7 +249,7 @@ class Simulator(utils_base.IdObj, abc.ABC):
return sockets return sockets
def _get_all_sockets_by_type( def _get_all_sockets_by_type(
self, inst: inst_base.Instantiation, sock_type: inst_socket.sockType self, inst: inst_base.Instantiation, sock_type: inst_socket.SockType
) -> list[inst_socket.Socket]: ) -> list[inst_socket.Socket]:
sockets = self._get_socks_by_all_comp(inst=inst) sockets = self._get_socks_by_all_comp(inst=inst)
sockets = Simulator.filter_sockets(sockets=sockets, filter_type=sock_type) sockets = Simulator.filter_sockets(sockets=sockets, filter_type=sock_type)
...@@ -286,21 +286,21 @@ class Simulator(utils_base.IdObj, abc.ABC): ...@@ -286,21 +286,21 @@ class Simulator(utils_base.IdObj, abc.ABC):
@abc.abstractmethod @abc.abstractmethod
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
def sockets_cleanup(self, inst: inst_base.Instantiation) -> list[inst_socket.Socket]: def sockets_cleanup(self, inst: inst_base.Instantiation) -> list[inst_socket.Socket]:
return self._get_all_sockets_by_type( return self._get_all_sockets_by_type(
inst=inst, sock_type=inst_socket.sockType.LISTEN inst=inst, sock_type=inst_socket.SockType.LISTEN
) )
# sockets to wait for indicating the simulator is ready # sockets to wait for indicating the simulator is ready
# pylint: disable=unused-argument # pylint: disable=unused-argument
def sockets_wait(self, inst: inst_base.Instantiation) -> list[inst_socket.Socket]: def sockets_wait(self, inst: inst_base.Instantiation) -> list[inst_socket.Socket]:
return self._get_all_sockets_by_type( return self._get_all_sockets_by_type(
inst=inst, sock_type=inst_socket.sockType.LISTEN inst=inst, sock_type=inst_socket.SockType.LISTEN
) )
def start_delay(self) -> int: def start_delay(self) -> int:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment