mirror of
https://github.com/Wojtek242/route0.git
synced 2024-11-22 15:15:26 +01:00
Clarify naming
This commit is contained in:
parent
a7f731b7c0
commit
279b84c78d
@ -2,10 +2,14 @@ import importlib
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
|
|
||||||
class Scenario(object):
|
class Experiment(object):
|
||||||
"""Class that describes a network scenario. A scenario defines which nodes
|
"""Class that describes a network experiment. An experiment is a particular
|
||||||
are routers and which are hosts as well as which nodes need to start which
|
combination of topology and scenario.
|
||||||
daemons.
|
|
||||||
|
A topology determines the nodes and their links in the network.
|
||||||
|
|
||||||
|
A scenario determines which daemons need to be started on which nodes and
|
||||||
|
the location of the relevant config files.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ from mininet.net import Mininet
|
|||||||
from mininet.cli import CLI
|
from mininet.cli import CLI
|
||||||
|
|
||||||
from router import Router
|
from router import Router
|
||||||
from scenario import Scenario
|
from experiment import Experiment
|
||||||
|
|
||||||
|
|
||||||
def start_daemon(node, daemon, conf_dir):
|
def start_daemon(node, daemon, conf_dir):
|
||||||
@ -60,7 +60,7 @@ def run(scenario):
|
|||||||
|
|
||||||
CLI(net)
|
CLI(net)
|
||||||
net.stop()
|
net.stop()
|
||||||
os.system("killall -9 {}".format(' '.join(daemons)))
|
os.system("killall -9 {} > /dev/null 2>&1".format(' '.join(daemons)))
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
@ -72,6 +72,6 @@ if __name__ == "__main__":
|
|||||||
help='the scenario to set up in the network')
|
help='the scenario to set up in the network')
|
||||||
ARGS = parser.parse_args()
|
ARGS = parser.parse_args()
|
||||||
|
|
||||||
scenario = Scenario(ARGS.topology, ARGS.scenario)
|
experiment = Experiment(ARGS.topology, ARGS.scenario)
|
||||||
|
|
||||||
run(scenario)
|
run(experiment)
|
||||||
|
Loading…
Reference in New Issue
Block a user