Merge pull request #606 from oliviertilmans/patch-2
link: Fix circular import
This commit is contained in:
+4
-3
@@ -26,7 +26,6 @@ Link: basic link class for creating veth pairs
|
|||||||
|
|
||||||
from mininet.log import info, error, debug
|
from mininet.log import info, error, debug
|
||||||
from mininet.util import makeIntfPair
|
from mininet.util import makeIntfPair
|
||||||
import mininet.node
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
class Intf( object ):
|
class Intf( object ):
|
||||||
@@ -531,10 +530,12 @@ class OVSLink( Link ):
|
|||||||
than ~64 OVS patch links should be used in row."""
|
than ~64 OVS patch links should be used in row."""
|
||||||
|
|
||||||
def __init__( self, node1, node2, **kwargs ):
|
def __init__( self, node1, node2, **kwargs ):
|
||||||
|
from mininet.node import OVSSwitch
|
||||||
|
|
||||||
"See Link.__init__() for options"
|
"See Link.__init__() for options"
|
||||||
self.isPatchLink = False
|
self.isPatchLink = False
|
||||||
if ( isinstance( node1, mininet.node.OVSSwitch ) and
|
if ( isinstance( node1, OVSSwitch ) and
|
||||||
isinstance( node2, mininet.node.OVSSwitch ) ):
|
isinstance( node2, OVSSwitch ) ):
|
||||||
self.isPatchLink = True
|
self.isPatchLink = True
|
||||||
kwargs.update( cls1=OVSIntf, cls2=OVSIntf )
|
kwargs.update( cls1=OVSIntf, cls2=OVSIntf )
|
||||||
Link.__init__( self, node1, node2, **kwargs )
|
Link.__init__( self, node1, node2, **kwargs )
|
||||||
|
|||||||
Reference in New Issue
Block a user