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=
|
#enable-msg=
|
||||||
|
|
||||||
# Disable the message(s) with the given id(s).
|
# 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]
|
[REPORTS]
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ def buildTopo( topo ):
|
|||||||
topo_seq_params = [ s for s in topo_params if '=' not in s ]
|
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_seq_params = [ makeNumeric( s ) for s in topo_seq_params ]
|
||||||
topo_kw_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( '=' )
|
key, val = s.split( '=' )
|
||||||
topo_kw_params[ key ] = makeNumeric( val )
|
topo_kw_params[ key ] = makeNumeric( val )
|
||||||
|
|
||||||
|
|||||||
+5
-5
@@ -59,9 +59,10 @@ class CLI( Cmd ):
|
|||||||
"Don't repeat last command when you hit return."
|
"Don't repeat last command when you hit return."
|
||||||
pass
|
pass
|
||||||
|
|
||||||
# Disable pylint "Unused argument: 'arg's'" messages.
|
# Disable pylint "Unused argument: 'arg's'" messages, as well as
|
||||||
# Each CLI function needs the same interface.
|
# "method could be a function" warning, since each CLI function
|
||||||
# pylint: disable-msg=W0613
|
# must have the same interface
|
||||||
|
# pylint: disable-msg=W0613,R0201
|
||||||
|
|
||||||
def do_help( self, args ):
|
def do_help( self, args ):
|
||||||
"Describe available CLI commands."
|
"Describe available CLI commands."
|
||||||
@@ -218,5 +219,4 @@ class CLI( Cmd ):
|
|||||||
else:
|
else:
|
||||||
self.stdout.write( '*** Unknown syntax: %s\n' % line )
|
self.stdout.write( '*** Unknown syntax: %s\n' % line )
|
||||||
|
|
||||||
# Re-enable pylint "Unused argument: 'arg's'" messages.
|
# pylint: enable-msg=W0613,R0201
|
||||||
# pylint: enable-msg=W0613
|
|
||||||
|
|||||||
+6
-5
@@ -422,7 +422,7 @@ class Switch( Node ):
|
|||||||
class UserSwitch( Switch ):
|
class UserSwitch( Switch ):
|
||||||
"User-space switch."
|
"User-space switch."
|
||||||
|
|
||||||
def __init__( self, name, *args, **kwargs ):
|
def __init__( self, name, **kwargs ):
|
||||||
"""Init.
|
"""Init.
|
||||||
name: name for the switch"""
|
name: name for the switch"""
|
||||||
Switch.__init__( self, name, **kwargs )
|
Switch.__init__( self, name, **kwargs )
|
||||||
@@ -658,7 +658,7 @@ class ControllerParams( object ):
|
|||||||
class NOX( Controller ):
|
class NOX( Controller ):
|
||||||
"Controller to run a NOX application."
|
"Controller to run a NOX application."
|
||||||
|
|
||||||
def __init__( self, name, inNamespace=False, noxArgs=None, **kwargs ):
|
def __init__( self, name, noxArgs=None, **kwargs ):
|
||||||
"""Init.
|
"""Init.
|
||||||
name: name to give controller
|
name: name to give controller
|
||||||
noxArgs: list of args, or single arg, to pass to NOX"""
|
noxArgs: list of args, or single arg, to pass to NOX"""
|
||||||
@@ -681,14 +681,15 @@ class NOX( Controller ):
|
|||||||
class RemoteController( Controller ):
|
class RemoteController( Controller ):
|
||||||
"Controller running outside of Mininet's control."
|
"Controller running outside of Mininet's control."
|
||||||
|
|
||||||
def __init__( self, name, inNamespace=False, defaultIP='127.0.0.1',
|
def __init__( self, name, defaultIP='127.0.0.1',
|
||||||
port=6633 ):
|
port=6633, **kwargs):
|
||||||
"""Init.
|
"""Init.
|
||||||
name: name to give controller
|
name: name to give controller
|
||||||
defaultIP: the IP address where the remote controller is
|
defaultIP: the IP address where the remote controller is
|
||||||
listening
|
listening
|
||||||
port: the port 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 ):
|
def start( self ):
|
||||||
"Overridden to do nothing."
|
"Overridden to do nothing."
|
||||||
|
|||||||
Reference in New Issue
Block a user