mirror of
https://github.com/Wojtek242/route0.git
synced 2024-11-22 07:05:25 +01:00
Create util directory
This commit is contained in:
parent
a71cf2b6f3
commit
228defd9f0
@ -6,8 +6,8 @@ import os
|
||||
from mininet.net import Mininet
|
||||
from mininet.cli import CLI
|
||||
|
||||
from router import Router
|
||||
from experiment import Experiment
|
||||
from util.router import Router
|
||||
from util.experiment import Experiment
|
||||
|
||||
|
||||
def start_daemon(node, daemon, conf_dir):
|
||||
|
0
util/__init__.py
Normal file
0
util/__init__.py
Normal file
@ -1,5 +1,6 @@
|
||||
import importlib
|
||||
import os
|
||||
import sys
|
||||
|
||||
|
||||
class Experiment(object):
|
||||
@ -14,7 +15,7 @@ class Experiment(object):
|
||||
"""
|
||||
|
||||
def __init__(self, topology, scenario):
|
||||
root_dir = os.path.dirname(os.path.realpath(__file__))
|
||||
root_dir = os.path.dirname(sys.modules['__main__'].__file__)
|
||||
|
||||
# Check if the topology directory exists.
|
||||
topo_dir = os.path.join(root_dir, "topology/{}".format(topology))
|
Loading…
Reference in New Issue
Block a user