Merge pull request #606 from oliviertilmans/patch-2

link: Fix circular import
This commit is contained in:
lantz
2017-01-06 15:26:47 -08:00
committed by GitHub
+4 -3
View File
@@ -26,7 +26,6 @@ Link: basic link class for creating veth pairs
from mininet.log import info, error, debug
from mininet.util import makeIntfPair
import mininet.node
import re
class Intf( object ):
@@ -531,10 +530,12 @@ class OVSLink( Link ):
than ~64 OVS patch links should be used in row."""
def __init__( self, node1, node2, **kwargs ):
from mininet.node import OVSSwitch
"See Link.__init__() for options"
self.isPatchLink = False
if ( isinstance( node1, mininet.node.OVSSwitch ) and
isinstance( node2, mininet.node.OVSSwitch ) ):
if ( isinstance( node1, OVSSwitch ) and
isinstance( node2, OVSSwitch ) ):
self.isPatchLink = True
kwargs.update( cls1=OVSIntf, cls2=OVSIntf )
Link.__init__( self, node1, node2, **kwargs )