Commit 696861c6 authored by Hejing Li's avatar Hejing Li
Browse files

use super() fucntion

parent 66c411ea
......@@ -38,8 +38,8 @@ class HostSim(sim_base.Simulator):
def __init__(self, e: sim_base.Simulation):
super().__init__(e)
self.hosts: tp.List['Host'] = []
self.wait = True
self.name = f'{self._id}'
def full_name(self) -> str:
return 'host.' + self.name
......@@ -54,9 +54,7 @@ class HostSim(sim_base.Simulator):
return deps
def add(self, host: 'Host'):
self.hosts.append(host)
self.name = f'{self._id}'
self._simulation.add_spec_sim_map(host, self)
super().add(host)
def config_str(self) -> str:
return []
......
......@@ -58,14 +58,11 @@ class NICSim(PCIDevSim):
def __init__(self, e: base.Simulation) -> None:
super().__init__(e)
self.experiment = e
self.nics: tp.List[sys_conf.SimplePCIeNIC] = []
self.start_tick = 0
self.name = f'{self._id}'
def add(self, nic: sys_conf.SimplePCIeNIC):
self.nics.append(nic)
self.experiment.add_spec_sim_map(nic, self)
self.name = f'{nic._id}'
super().add(nic)
def basic_args(self, env: ExpEnv, extra: tp.Optional[str] = None) -> str:
cmd = (
......
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