Commit 8a5e54cb authored by Hejing Li's avatar Hejing Li
Browse files

some more errors

parent 907fda7b
...@@ -24,7 +24,7 @@ pcie0 = system.PCIeHostInterface(host0) ...@@ -24,7 +24,7 @@ pcie0 = system.PCIeHostInterface(host0)
host0.add_if(pcie0) host0.add_if(pcie0)
nic0 = system.IntelI40eNIC(sys) nic0 = system.IntelI40eNIC(sys)
nic0.add_ipv4('10.0.0.1') nic0.add_ipv4('10.0.0.1')
pcichannel0 = system.PCIeChannel(pcie0, nic0.pci_if) pcichannel0 = system.PCIeChannel(pcie0, nic0._pci_if)
# create a host instance and a NIC instance then install the NIC on the host # create a host instance and a NIC instance then install the NIC on the host
host1 = system.I40ELinuxHost(sys) host1 = system.I40ELinuxHost(sys)
...@@ -32,18 +32,18 @@ pcie1 = system.PCIeHostInterface(host1) ...@@ -32,18 +32,18 @@ pcie1 = system.PCIeHostInterface(host1)
host1.add_if(pcie0) host1.add_if(pcie0)
nic1 = system.IntelI40eNIC(sys) nic1 = system.IntelI40eNIC(sys)
nic1.add_ipv4('10.0.0.2') nic1.add_ipv4('10.0.0.2')
pcichannel1 = system.PCIeChannel(pcie1, nic1.pci_if) pcichannel1 = system.PCIeChannel(pcie1, nic1._pci_if)
# create switch and its ports # create switch and its ports
switch = system.EthSwitch(sys) switch = system.EthSwitch(sys)
netif0 = system.EthInterface(switch) netif0 = system.EthInterface(switch)
switch.if_add(netif0) switch.add_if(netif0)
netif1 = system.EthInterface(switch) netif1 = system.EthInterface(switch)
switch.if_add(netif1) switch.add_if(netif1)
# create channels and connect the switch to the host nics # create channels and connect the switch to the host nics
ethchannel0 = system.EthChannel(switch.eth_ifs[0], nic0.eth_if) ethchannel0 = system.EthChannel(switch.eth_ifs[0], nic0._eth_if)
ethchannel1 = system.EthChannel(switch.eth_ifs[1], nic1.eth_if) ethchannel1 = system.EthChannel(switch.eth_ifs[1], nic1._eth_if)
# configure the software to run on the host # configure the software to run on the host
host0.add_app(system.NetperfClient(host0, nic1.ip)) host0.add_app(system.NetperfClient(host0, nic1.ip))
......
...@@ -76,7 +76,7 @@ class LocalSimpleRuntime(run_base.Runtime): ...@@ -76,7 +76,7 @@ class LocalSimpleRuntime(run_base.Runtime):
async def start(self) -> None: async def start(self) -> None:
"""Execute the runs defined in `self.runnable`.""" """Execute the runs defined in `self.runnable`."""
for run in self.runnable: for run in self._runnable:
if self._interrupted: if self._interrupted:
return return
......
...@@ -260,7 +260,7 @@ class ExperimentDistributedRunner(ExperimentBaseRunner): ...@@ -260,7 +260,7 @@ class ExperimentDistributedRunner(ExperimentBaseRunner):
# TODO: FIXME # TODO: FIXME
def __init__( def __init__(
self, execs: dict[sim -> command_executor.Executor], exp: DistributedExperiment, *args, **kwargs self, execs, exp: DistributedExperiment, *args, **kwargs
) -> None: ) -> None:
self.execs = execs self.execs = execs
super().__init__(exp, *args, **kwargs) super().__init__(exp, *args, **kwargs)
......
...@@ -41,7 +41,7 @@ class Host(base.Component): ...@@ -41,7 +41,7 @@ class Host(base.Component):
return self.pcie_ifs + self.eth_ifs + self.mem_ifs return self.pcie_ifs + self.eth_ifs + self.mem_ifs
def add_if(self, interface: base.Interface) -> None: def add_if(self, interface: base.Interface) -> None:
self.ifs.append(i) self.ifs.append(interface)
def add_app(self, a: 'Application') -> None: def add_app(self, a: 'Application') -> None:
self.applications.append(a) self.applications.append(a)
......
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