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
0d850bbd
Commit
0d850bbd
authored
Jan 22, 2024
by
Antoine Kaufmann
Committed by
Hejing Li
Feb 01, 2024
Browse files
experiemnts: add get_switches and get_links method to e2e topologies
parent
3303b48b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
experiments/simbricks/orchestration/e2e_topologies.py
experiments/simbricks/orchestration/e2e_topologies.py
+20
-0
No files found.
experiments/simbricks/orchestration/e2e_topologies.py
View file @
0d850bbd
...
...
@@ -36,6 +36,14 @@ class E2ETopology(ABC):
def
add_to_network
(
self
,
net
):
pass
@
abstractmethod
def
get_switches
(
self
):
pass
@
abstractmethod
def
get_links
(
self
):
pass
class
E2EDumbbellTopology
(
E2ETopology
):
...
...
@@ -90,6 +98,12 @@ class E2EDumbbellTopology(E2ETopology):
def
delay
(
self
,
delay
:
str
):
self
.
link
.
delay
=
delay
def
get_switches
(
self
):
return
[
self
.
left_switch
,
self
.
right_switch
]
def
get_links
(
self
):
return
[
self
.
link
]
class
DCFatTree
(
E2ETopology
):
...
...
@@ -244,6 +258,12 @@ class DCFatTree(E2ETopology):
def
add_simbricks_host_r
(
self
,
nic
):
return
self
.
add_host_r
(
self
.
wrap_simbricks_host
(
nic
))
def
get_switches
(
self
):
return
self
.
switches
def
get_links
(
self
):
return
self
.
links
def
add_contig_bg
(
topo
,
subnet
=
'10.42.0.0/16'
,
**
kwargs
):
params
=
{
...
...
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