Move utility functions out of mininet.py
Having a file with the same name as its package creates hard-to-diagnose import error, so rename mininet.py to net.py. This commit moves utility functions, generally those dealing with network namespaces and interface management, into their own file. Also fix a few minor formatting bugs and clean up logging code (which had issues when multiple files would import mininet.logging_mod).
This commit is contained in:
@@ -7,7 +7,7 @@ Test creation and all-pairs ping for each included mininet topo type.
|
||||
from time import sleep
|
||||
import unittest
|
||||
|
||||
from mininet.mininet import init, TreeNet, LinearNet, pingTest, DATAPATHS
|
||||
from mininet.net import init, TreeNet, LinearNet, pingTest, DATAPATHS
|
||||
|
||||
class testMinimal(unittest.TestCase):
|
||||
'''For each datapath type, test ping with a minimal topology.
|
||||
|
||||
Reference in New Issue
Block a user