Skip to content
Snippets Groups Projects
Commit 02bf34aa authored by Bob Lantz's avatar Bob Lantz
Browse files

Remove setup/isOldOVS which have been merged into OVSSwitch

parent 13bdd914
No related branches found
No related tags found
No related merge requests found
...@@ -27,26 +27,11 @@ ...@@ -27,26 +27,11 @@
from random import randint from random import randint
from re import findall from re import findall
from distutils.version import StrictVersion
class MobilitySwitch( OVSSwitch ): class MobilitySwitch( OVSSwitch ):
"Switch that can reattach and rename interfaces" "Switch that can reattach and rename interfaces"
@classmethod
def setup( cls ):
"Call our parent method and determine OVS version"
OVSSwitch.setup()
info = quietRun( 'ovs-vsctl --version' )
cls.OVSVersion = findall( '\d+\.\d+', info )[ 0 ]
if cls.isOldOVS():
warn( 'WARNING: port selection may not work '
' with OVS ', cls.OVSVersion )
@classmethod
def isOldOVS( cls ):
return ( StrictVersion( cls.OVSVersion ) <
StrictVersion( '1.10' ) )
def delIntf( self, intf ): def delIntf( self, intf ):
"Remove (and detach) an interface" "Remove (and detach) an interface"
port = self.ports[ intf ] port = self.ports[ intf ]
......
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