Changes to pass code check.
We should check NOXController and RemoteController to make sure that they are not broken, but I cannot do this at the moment.
This commit is contained in:
@@ -53,7 +53,7 @@ disable-msg-cat=IR
|
||||
#enable-msg=
|
||||
|
||||
# Disable the message(s) with the given id(s).
|
||||
disable-msg=W0704,C0103,W0231,E1102,W0511,W0142
|
||||
disable-msg=W0704,C0103,W0231,E1102,W0511,W0142,R0902,R0903,R0904,R0913,R0914,R0801
|
||||
|
||||
|
||||
[REPORTS]
|
||||
|
||||
@@ -65,7 +65,7 @@ def buildTopo( topo ):
|
||||
topo_seq_params = [ s for s in topo_params if '=' not in s ]
|
||||
topo_seq_params = [ makeNumeric( s ) for s in topo_seq_params ]
|
||||
topo_kw_params = {}
|
||||
for s in [ s for s in topo_params if '=' in s ]:
|
||||
for s in [ p for p in topo_params if '=' in p ]:
|
||||
key, val = s.split( '=' )
|
||||
topo_kw_params[ key ] = makeNumeric( val )
|
||||
|
||||
|
||||
+5
-5
@@ -59,9 +59,10 @@ class CLI( Cmd ):
|
||||
"Don't repeat last command when you hit return."
|
||||
pass
|
||||
|
||||
# Disable pylint "Unused argument: 'arg's'" messages.
|
||||
# Each CLI function needs the same interface.
|
||||
# pylint: disable-msg=W0613
|
||||
# Disable pylint "Unused argument: 'arg's'" messages, as well as
|
||||
# "method could be a function" warning, since each CLI function
|
||||
# must have the same interface
|
||||
# pylint: disable-msg=W0613,R0201
|
||||
|
||||
def do_help( self, args ):
|
||||
"Describe available CLI commands."
|
||||
@@ -218,5 +219,4 @@ class CLI( Cmd ):
|
||||
else:
|
||||
self.stdout.write( '*** Unknown syntax: %s\n' % line )
|
||||
|
||||
# Re-enable pylint "Unused argument: 'arg's'" messages.
|
||||
# pylint: enable-msg=W0613
|
||||
# pylint: enable-msg=W0613,R0201
|
||||
|
||||
+6
-5
@@ -422,7 +422,7 @@ class Switch( Node ):
|
||||
class UserSwitch( Switch ):
|
||||
"User-space switch."
|
||||
|
||||
def __init__( self, name, *args, **kwargs ):
|
||||
def __init__( self, name, **kwargs ):
|
||||
"""Init.
|
||||
name: name for the switch"""
|
||||
Switch.__init__( self, name, **kwargs )
|
||||
@@ -658,7 +658,7 @@ class ControllerParams( object ):
|
||||
class NOX( Controller ):
|
||||
"Controller to run a NOX application."
|
||||
|
||||
def __init__( self, name, inNamespace=False, noxArgs=None, **kwargs ):
|
||||
def __init__( self, name, noxArgs=None, **kwargs ):
|
||||
"""Init.
|
||||
name: name to give controller
|
||||
noxArgs: list of args, or single arg, to pass to NOX"""
|
||||
@@ -681,14 +681,15 @@ class NOX( Controller ):
|
||||
class RemoteController( Controller ):
|
||||
"Controller running outside of Mininet's control."
|
||||
|
||||
def __init__( self, name, inNamespace=False, defaultIP='127.0.0.1',
|
||||
port=6633 ):
|
||||
def __init__( self, name, defaultIP='127.0.0.1',
|
||||
port=6633, **kwargs):
|
||||
"""Init.
|
||||
name: name to give controller
|
||||
defaultIP: the IP address where the remote controller is
|
||||
listening
|
||||
port: the port where the remote controller is listening"""
|
||||
Controller.__init__( self, name, defaultIP=defaultIP, port=port )
|
||||
Controller.__init__( self, name, defaultIP=defaultIP, port=port,
|
||||
**kwargs )
|
||||
|
||||
def start( self ):
|
||||
"Overridden to do nothing."
|
||||
|
||||
Reference in New Issue
Block a user