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
696861c6
Commit
696861c6
authored
Sep 12, 2024
by
Hejing Li
Browse files
use super() fucntion
parent
66c411ea
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
9 deletions
+4
-9
experiments/simbricks/orchestration/simulation/host.py
experiments/simbricks/orchestration/simulation/host.py
+2
-4
experiments/simbricks/orchestration/simulation/pcidev.py
experiments/simbricks/orchestration/simulation/pcidev.py
+2
-5
No files found.
experiments/simbricks/orchestration/simulation/host.py
View file @
696861c6
...
...
@@ -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
[]
...
...
experiments/simbricks/orchestration/simulation/pcidev.py
View file @
696861c6
...
...
@@ -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
=
(
...
...
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