pass code check

This commit is contained in:
Bob Lantz
2015-02-04 05:27:14 -08:00
parent 5ac113cfaa
commit 74c3511d5c
3 changed files with 5 additions and 3 deletions
+2 -1
View File
@@ -70,7 +70,8 @@ class Cleanup( object ):
cleanUpScreens() cleanUpScreens()
info( "*** Removing excess kernel datapaths\n" ) info( "*** Removing excess kernel datapaths\n" )
dps = sh( "ps ax | egrep -o 'dp[0-9]+' | sed 's/dp/nl:/'" ).splitlines() dps = sh( "ps ax | egrep -o 'dp[0-9]+' | sed 's/dp/nl:/'"
).splitlines()
for dp in dps: for dp in dps:
if dp: if dp:
sh( 'dpctl deldp ' + dp ) sh( 'dpctl deldp ' + dp )
+2 -2
View File
@@ -377,6 +377,7 @@ class Link( object ):
"""A basic link is just a veth pair. """A basic link is just a veth pair.
Other types of links could be tunnels, link emulators, etc..""" Other types of links could be tunnels, link emulators, etc.."""
# pylint: disable=too-many-branches
def __init__( self, node1, node2, port1=None, port2=None, def __init__( self, node1, node2, port1=None, port2=None,
intfName1=None, intfName2=None, addr1=None, addr2=None, intfName1=None, intfName2=None, addr1=None, addr2=None,
intf=Intf, cls1=None, cls2=None, params1=None, intf=Intf, cls1=None, cls2=None, params1=None,
@@ -395,7 +396,6 @@ class Link( object ):
# This is a bit awkward; it seems that having everything in # This is a bit awkward; it seems that having everything in
# params is more orthogonal, but being able to specify # params is more orthogonal, but being able to specify
# in-line arguments is more convenient! So we support both. # in-line arguments is more convenient! So we support both.
# pylint: disable=too-many-branches
if params1 is None: if params1 is None:
params1 = {} params1 = {}
if params2 is None: if params2 is None:
@@ -429,7 +429,6 @@ class Link( object ):
cls1 = intf cls1 = intf
if not cls2: if not cls2:
cls2 = intf cls2 = intf
# pylint: enable=too-many-branches
intf1 = cls1( name=intfName1, node=node1, intf1 = cls1( name=intfName1, node=node1,
link=self, mac=addr1, **params1 ) link=self, mac=addr1, **params1 )
@@ -438,6 +437,7 @@ class Link( object ):
# All we are is dust in the wind, and our two interfaces # All we are is dust in the wind, and our two interfaces
self.intf1, self.intf2 = intf1, intf2 self.intf1, self.intf2 = intf1, intf2
# pylint: enable=too-many-branches
@staticmethod @staticmethod
def _ignore( *args, **kwargs ): def _ignore( *args, **kwargs ):
+1
View File
@@ -543,6 +543,7 @@ def customConstructor( constructors, argStr ):
# Return a customized subclass # Return a customized subclass
cls = constructor cls = constructor
class CustomClass( cls ): class CustomClass( cls ):
"Customized subclass, useful for Node, Link, and other classes" "Customized subclass, useful for Node, Link, and other classes"
def __init__( self, name, *args, **params ): def __init__( self, name, *args, **params ):