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
f451e1e4
Commit
f451e1e4
authored
Nov 24, 2023
by
Marvin Meiers
Committed by
Antoine Kaufmann
May 08, 2024
Browse files
experiments: resolve id paths for end-to-end components only once
parent
d29f998b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
experiments/simbricks/orchestration/e2e_components.py
experiments/simbricks/orchestration/e2e_components.py
+1
-2
experiments/simbricks/orchestration/simulators.py
experiments/simbricks/orchestration/simulators.py
+2
-1
No files found.
experiments/simbricks/orchestration/e2e_components.py
View file @
f451e1e4
...
@@ -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
):
...
...
experiments/simbricks/orchestration/simulators.py
View file @
f451e1e4
...
@@ -904,6 +904,7 @@ class NS3E2ENet(NetSim):
...
@@ -904,6 +904,7 @@ 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
:
if
not
topo
.
has_path
:
topo
.
resolve_paths
()
topo
.
resolve_paths
()
for
c
in
topo
.
components
:
for
c
in
topo
.
components
:
if
isinstance
(
c
,
E2ESimbricksHost
):
if
isinstance
(
c
,
E2ESimbricksHost
):
...
...
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