Clarify naming

This commit is contained in:
Wojciech Kozlowski 2019-04-07 00:26:44 +02:00
parent a7f731b7c0
commit 279b84c78d
2 changed files with 12 additions and 8 deletions

View File

@ -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.
""" """

View File

@ -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)