Commit f451e1e4 authored by Marvin Meiers's avatar Marvin Meiers Committed by Antoine Kaufmann
Browse files

experiments: resolve id paths for end-to-end components only once

parent d29f998b
...@@ -91,6 +91,7 @@ class E2EComponent(E2EBase): ...@@ -91,6 +91,7 @@ class E2EComponent(E2EBase):
self.components.append(component) self.components.append(component)
def resolve_paths(self) -> None: def resolve_paths(self) -> None:
self.has_path = True
for component in self.components: for component in self.components:
if component.has_path: if component.has_path:
print( print(
...@@ -99,7 +100,6 @@ class E2EComponent(E2EBase): ...@@ -99,7 +100,6 @@ class E2EComponent(E2EBase):
) )
sys.exit(1) sys.exit(1)
component.id = f"{self.id}/{component.id}" component.id = f"{self.id}/{component.id}"
component.has_path = True
component.resolve_paths() component.resolve_paths()
...@@ -108,7 +108,6 @@ class E2ETopology(E2EComponent): ...@@ -108,7 +108,6 @@ class E2ETopology(E2EComponent):
def __init__(self, idd: str) -> None: def __init__(self, idd: str) -> None:
super().__init__(idd) super().__init__(idd)
self.category = "Topology" self.category = "Topology"
self.has_path = True
class E2EDumbbellTopology(E2ETopology): class E2EDumbbellTopology(E2ETopology):
......
...@@ -904,7 +904,8 @@ class NS3E2ENet(NetSim): ...@@ -904,7 +904,8 @@ class NS3E2ENet(NetSim):
def run_cmd(self, env): def run_cmd(self, env):
for topo in self.e2e_components: for topo in self.e2e_components:
topo.resolve_paths() if not topo.has_path:
topo.resolve_paths()
for c in topo.components: for c in topo.components:
if isinstance(c, E2ESimbricksHost): if isinstance(c, E2ESimbricksHost):
self.resolve_socket_paths(env, c) self.resolve_socket_paths(env, c)
......
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