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
eb611e2c
Commit
eb611e2c
authored
Sep 05, 2024
by
Hejing Li
Browse files
net/base.py: rename add function
parent
a72c6391
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
experiments/simbricks/orchestration/simulation/net/base.py
experiments/simbricks/orchestration/simulation/net/base.py
+4
-2
No files found.
experiments/simbricks/orchestration/simulation/net/base.py
View file @
eb611e2c
...
...
@@ -78,9 +78,10 @@ class WireNet(NetSim):
self
.
_wire_comp
:
eth
.
EthWire
|
None
=
None
self
.
_relative_pcap_file_path
:
str
|
None
=
'relative_pcap_file_path'
def
add
_wire
(
self
,
wire
:
eth
.
EthWire
):
def
add
(
self
,
wire
:
eth
.
EthWire
):
assert
self
.
_wire_comp
is
None
super
().
_add_component
(
wire
)
self
.
experiment
.
add_network
(
self
)
self
.
_wire_comp
=
wire
def
run_cmd
(
self
,
inst
:
inst_base
.
Instantiation
)
->
str
:
...
...
@@ -130,9 +131,10 @@ class SwitchNet(NetSim):
self
.
_switch_spec
:
eth
.
EthSwitch
|
None
=
None
self
.
_relative_pcap_file_path
:
str
|
None
=
relative_pcap_file_path
def
add
_switch
(
self
,
switch_spec
:
eth
.
EthSwitch
):
def
add
(
self
,
switch_spec
:
eth
.
EthSwitch
):
assert
self
.
_switch_spec
is
None
super
().
_add_component
(
switch_spec
)
self
.
experiment
.
add_network
(
self
)
self
.
_switch_spec
=
switch_spec
def
run_cmd
(
self
,
inst
:
inst_base
.
Instantiation
)
->
str
:
...
...
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