Rename Controller.controller to .command
This commit is contained in:
1 parent
55ca2d0c96
commit
e30f2c99c2
1 file changed
+5
-5
+5
-5
@@ -181,12 +181,12 @@ class Mininet( object ):
|
|||||||
self.nameToNode[ name ] = sw
|
self.nameToNode[ name ] = sw
|
||||||
return sw
|
return sw
|
||||||
|
|
||||||
def addController( self, name='c0', Controller=None, **kwargs ):
|
def addController( self, name='c0', controller=None, **kwargs ):
|
||||||
"""Add controller.
|
"""Add controller.
|
||||||
Controller: Controller class"""
|
controller: Controller class"""
|
||||||
if not Controller:
|
if not controller:
|
||||||
Controller = self.controller
|
controller = self.controller
|
||||||
controller_new = Controller( name, **kwargs )
|
controller_new = controller( name, **kwargs )
|
||||||
if controller_new: # allow controller-less setups
|
if controller_new: # allow controller-less setups
|
||||||
self.controllers.append( controller_new )
|
self.controllers.append( controller_new )
|
||||||
self.nameToNode[ name ] = controller_new
|
self.nameToNode[ name ] = controller_new
|
||||||
|
|||||||
Reference in new issue
Block a user