summaryrefslogtreecommitdiff
path: root/tests/topotests/ldp_topo1/test_ldp_topo1.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/topotests/ldp_topo1/test_ldp_topo1.py')
-rw-r--r--tests/topotests/ldp_topo1/test_ldp_topo1.py16
1 files changed, 5 insertions, 11 deletions
diff --git a/tests/topotests/ldp_topo1/test_ldp_topo1.py b/tests/topotests/ldp_topo1/test_ldp_topo1.py
index 06e7734094..c0f869f826 100644
--- a/tests/topotests/ldp_topo1/test_ldp_topo1.py
+++ b/tests/topotests/ldp_topo1/test_ldp_topo1.py
@@ -65,15 +65,10 @@ import sys
import pytest
from time import sleep
-from mininet.topo import Topo
-from mininet.net import Mininet
-from mininet.node import Node, OVSSwitch, Host
-from mininet.log import setLogLevel, info
-from mininet.cli import CLI
-from mininet.link import Intf
-
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from lib import topotest
+from lib.micronet_compat import Topo
+from lib.micronet_compat import Mininet
fatal_error = ""
@@ -99,7 +94,7 @@ class NetworkTopo(Topo):
# Setup Switches, add Interfaces and Connections
switch = {}
# First switch
- switch[0] = self.addSwitch("sw0", cls=topotest.LegacySwitch)
+ switch[0] = self.addSwitch("sw0")
self.addLink(
switch[0],
router[1],
@@ -115,7 +110,7 @@ class NetworkTopo(Topo):
addr2="00:11:00:02:00:00",
)
# Second switch
- switch[1] = self.addSwitch("sw1", cls=topotest.LegacySwitch)
+ switch[1] = self.addSwitch("sw1")
self.addLink(
switch[1],
router[2],
@@ -138,7 +133,7 @@ class NetworkTopo(Topo):
addr2="00:11:00:04:00:00",
)
# Third switch
- switch[2] = self.addSwitch("sw2", cls=topotest.LegacySwitch)
+ switch[2] = self.addSwitch("sw2")
self.addLink(
switch[2],
router[2],
@@ -885,7 +880,6 @@ def test_shutdown_check_memleak():
if __name__ == "__main__":
- setLogLevel("info")
# To suppress tracebacks, either use the following pytest call or add "--tb=no" to cli
# retval = pytest.main(["-s", "--tb=no"])
retval = pytest.main(["-s"])