diff --git a/mininet/test/test_hifi.py b/mininet/test/test_hifi.py index 542e009958758969bbe54e913bfbab6a6384b7a3..f6ebb71f05645cca2b0973adaa84714f8648903b 100755 --- a/mininet/test/test_hifi.py +++ b/mininet/test/test_hifi.py @@ -4,9 +4,10 @@ Test creation and pings for topologies with link and/or CPU options.""" import unittest +from functools import partial from mininet.net import Mininet -from mininet.node import OVSKernelSwitch, UserSwitch, IVSSwitch +from mininet.node import OVSSwitch, UserSwitch, IVSSwitch from mininet.node import CPULimitedHost from mininet.link import TCLink from mininet.topo import Topo @@ -124,7 +125,12 @@ def testMostOptions( self ): class testOptionsTopoOVSKernel( testOptionsTopoCommon, unittest.TestCase ): "Verify ability to create networks with host and link options (OVS kernel switch)." - switchClass = OVSKernelSwitch + switchClass = OVSSwitch + +@unittest.skip( 'Skipping OVS user switch test for now' ) +class testOptionsTopoOVSUser( testOptionsTopoCommon, unittest.TestCase ): + "Verify ability to create networks with host and link options (OVS user switch)." + switchClass = partial( OVSSwitch, datapath='user' ) @unittest.skipUnless( quietRun( 'which ivs-ctl' ), 'IVS is not installed' ) class testOptionsTopoIVS( testOptionsTopoCommon, unittest.TestCase ): diff --git a/mininet/test/test_nets.py b/mininet/test/test_nets.py index f378ce89c0f1c4b89277d0fa7ab5c3d03fe09ca0..a56061b8e5a3bdb5278dbf7257df635aa1aaaed7 100755 --- a/mininet/test/test_nets.py +++ b/mininet/test/test_nets.py @@ -4,10 +4,11 @@ Test creation and all-pairs ping for each included mininet topo type.""" import unittest +from functools import partial from mininet.net import Mininet from mininet.node import Host, Controller -from mininet.node import UserSwitch, OVSKernelSwitch, IVSSwitch +from mininet.node import UserSwitch, OVSSwitch, IVSSwitch from mininet.topo import SingleSwitchTopo, LinearTopo from mininet.log import setLogLevel from mininet.util import quietRun @@ -32,8 +33,11 @@ def testSingle5( self ): class testSingleSwitchOVSKernel( testSingleSwitchCommon, unittest.TestCase ): "Test ping with single switch topology (OVS kernel switch)." - switchClass = OVSKernelSwitch + switchClass = OVSSwitch +class testSingleSwitchOVSUser( testSingleSwitchCommon, unittest.TestCase ): + "Test ping with single switch topology (OVS user switch)." + switchClass = partial( OVSSwitch, datapath='user' ) @unittest.skipUnless( quietRun( 'which ivs-ctl' ), 'IVS is not installed' ) class testSingleSwitchIVS( testSingleSwitchCommon, unittest.TestCase ): @@ -61,7 +65,11 @@ def testLinear5( self ): class testLinearOVSKernel( testLinearCommon, unittest.TestCase ): "Test all-pairs ping with LinearNet (OVS kernel switch)." - switchClass = OVSKernelSwitch + switchClass = OVSSwitch + +class testLinearOVSUser( testLinearCommon, unittest.TestCase ): + "Test all-pairs ping with LinearNet (OVS user switch)." + switchClass = partial( OVSSwitch, datapath='user' ) @unittest.skipUnless( quietRun( 'which ivs-ctl' ), 'IVS is not installed' ) class testLinearIVS( testLinearCommon, unittest.TestCase ):