mirror of
https://github.com/Wojtek242/route0.git
synced 2024-11-21 23:05:24 +01:00
Clarify naming
This commit is contained in:
parent
a7f731b7c0
commit
279b84c78d
@ -2,10 +2,14 @@ import importlib
|
||||
import os
|
||||
|
||||
|
||||
class Scenario(object):
|
||||
"""Class that describes a network scenario. A scenario defines which nodes
|
||||
are routers and which are hosts as well as which nodes need to start which
|
||||
daemons.
|
||||
class Experiment(object):
|
||||
"""Class that describes a network experiment. An experiment is a particular
|
||||
combination of topology and scenario.
|
||||
|
||||
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 router import Router
|
||||
from scenario import Scenario
|
||||
from experiment import Experiment
|
||||
|
||||
|
||||
def start_daemon(node, daemon, conf_dir):
|
||||
@ -60,7 +60,7 @@ def run(scenario):
|
||||
|
||||
CLI(net)
|
||||
net.stop()
|
||||
os.system("killall -9 {}".format(' '.join(daemons)))
|
||||
os.system("killall -9 {} > /dev/null 2>&1".format(' '.join(daemons)))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
@ -72,6 +72,6 @@ if __name__ == "__main__":
|
||||
help='the scenario to set up in the network')
|
||||
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