Commit 401f3c30 authored by Antoine Kaufmann's avatar Antoine Kaufmann Committed by Hejing Li
Browse files

experiments: add support for simbricks hosts in e2e dc topology

parent e10352ef
......@@ -107,6 +107,7 @@ class DCFatTree(E2ETopology):
'agg_link_delay': '1us',
'agg_link_rate': '10Gbps',
'agg_link_queue': '512KB',
'sbhost_eth_latency': '500ns',
}
for (n,v) in kwargs.items():
self.params[n] = v
......@@ -123,6 +124,8 @@ class DCFatTree(E2ETopology):
self.hosts = []
self.n_simbricks_host = 0
bn = basename
# Create spine switches
......@@ -224,6 +227,23 @@ class DCFatTree(E2ETopology):
raise BufferError('Network is full')
(agg, rack, _) = random.choice(rs)
self.add_host(agg, rack, h)
return (agg, rack)
def wrap_simbricks_host(self, nic):
i = self.n_simbricks_host
self.n_simbricks_host += 1
host = e2e.E2ESimbricksHost(f'_sbh-{i}-{nic.name}')
host.eth_latency = self.params['sbhost_eth_latency']
host.simbricks_component = nic
return host
def add_simbricks_host(self, agg, rack, nic):
self.add_host(agg, rack, self.wrap_simbricks_host(nic))
def add_simbricks_host_r(self, nic):
return self.add_host_r(self.wrap_simbricks_host(nic))
def add_contig_bg(topo, subnet='10.42.0.0/16', **kwargs):
params = {
......
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