Skip to content
Snippets Groups Projects
Commit 54932125 authored by Bob Lantz's avatar Bob Lantz Committed by Brian O'Connor
Browse files

Add tests for OVS user switch (skipping hifi test for now)

test_hifi.py currently fails for OVS when datapath=user -
we should look at this and fix it.
parent 45d365f9
No related branches found
No related tags found
No related merge requests found
...@@ -4,9 +4,10 @@ ...@@ -4,9 +4,10 @@
Test creation and pings for topologies with link and/or CPU options.""" Test creation and pings for topologies with link and/or CPU options."""
import unittest import unittest
from functools import partial
from mininet.net import Mininet 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.node import CPULimitedHost
from mininet.link import TCLink from mininet.link import TCLink
from mininet.topo import Topo from mininet.topo import Topo
...@@ -124,7 +125,12 @@ def testMostOptions( self ): ...@@ -124,7 +125,12 @@ def testMostOptions( self ):
class testOptionsTopoOVSKernel( testOptionsTopoCommon, unittest.TestCase ): class testOptionsTopoOVSKernel( testOptionsTopoCommon, unittest.TestCase ):
"Verify ability to create networks with host and link options (OVS kernel switch)." "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' ) @unittest.skipUnless( quietRun( 'which ivs-ctl' ), 'IVS is not installed' )
class testOptionsTopoIVS( testOptionsTopoCommon, unittest.TestCase ): class testOptionsTopoIVS( testOptionsTopoCommon, unittest.TestCase ):
......
...@@ -4,10 +4,11 @@ ...@@ -4,10 +4,11 @@
Test creation and all-pairs ping for each included mininet topo type.""" Test creation and all-pairs ping for each included mininet topo type."""
import unittest import unittest
from functools import partial
from mininet.net import Mininet from mininet.net import Mininet
from mininet.node import Host, Controller 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.topo import SingleSwitchTopo, LinearTopo
from mininet.log import setLogLevel from mininet.log import setLogLevel
from mininet.util import quietRun from mininet.util import quietRun
...@@ -32,8 +33,11 @@ def testSingle5( self ): ...@@ -32,8 +33,11 @@ def testSingle5( self ):
class testSingleSwitchOVSKernel( testSingleSwitchCommon, unittest.TestCase ): class testSingleSwitchOVSKernel( testSingleSwitchCommon, unittest.TestCase ):
"Test ping with single switch topology (OVS kernel switch)." "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' ) @unittest.skipUnless( quietRun( 'which ivs-ctl' ), 'IVS is not installed' )
class testSingleSwitchIVS( testSingleSwitchCommon, unittest.TestCase ): class testSingleSwitchIVS( testSingleSwitchCommon, unittest.TestCase ):
...@@ -61,7 +65,11 @@ def testLinear5( self ): ...@@ -61,7 +65,11 @@ def testLinear5( self ):
class testLinearOVSKernel( testLinearCommon, unittest.TestCase ): class testLinearOVSKernel( testLinearCommon, unittest.TestCase ):
"Test all-pairs ping with LinearNet (OVS kernel switch)." "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' ) @unittest.skipUnless( quietRun( 'which ivs-ctl' ), 'IVS is not installed' )
class testLinearIVS( testLinearCommon, unittest.TestCase ): class testLinearIVS( testLinearCommon, unittest.TestCase ):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment