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

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.
parent 0774c8bb
No related branches found
No related tags found
No related merge requests found
......@@ -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 )
......
......@@ -59,9 +59,10 @@ def emptyline( self ):
"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 @@ def default( self, line ):
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
......@@ -422,7 +422,7 @@ def monitor( self ):
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 @@ def __init__( self, ip, prefixLen ):
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 @@ def __init__( self, name, inNamespace=False, noxArgs=None, **kwargs ):
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."
......
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