Commit f43660c8 authored by Hejing Li's avatar Hejing Li
Browse files

net_base.py: fix switch dependency

parent b4d9511a
...@@ -43,9 +43,11 @@ class NetSim(sim_base.Simulator): ...@@ -43,9 +43,11 @@ class NetSim(sim_base.Simulator):
def dependencies(self) -> list[sim_base.Simulator]: def dependencies(self) -> list[sim_base.Simulator]:
# TODO # TODO
deps = [] deps = []
for s in self.switches: for s in self._components:
for n in s.netdevs: for n in s.eth_ifs:
deps.append(n.net[0].sim) peer_comp = n.find_peer().component
peer_sim = self._simulation.find_sim(peer_comp)
deps.append(peer_sim)
return deps return deps
def init_network(self) -> None: def init_network(self) -> None:
......
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