Disable shared SSH connections by default.

Note that we do still provide a default if you specify
ControlPath=True
This commit is contained in:
Bob Lantz
2014-11-12 13:29:58 -08:00
parent 434619053a
commit dde2263fe7
2 changed files with 5 additions and 3 deletions
-1
View File
@@ -254,7 +254,6 @@ class MininetRunner( object ):
def begin( self ): def begin( self ):
"Create and run mininet." "Create and run mininet."
if self.options.clean: if self.options.clean:
cleanup() cleanup()
exit() exit()
+5 -2
View File
@@ -113,18 +113,21 @@ class RemoteMixin( object ):
'-o', 'ForwardAgent=yes', '-tt' ] '-o', 'ForwardAgent=yes', '-tt' ]
def __init__( self, name, server='localhost', user=None, serverIP=None, def __init__( self, name, server='localhost', user=None, serverIP=None,
controlPath='/tmp/mn-%r@%h:%p', splitInit=False, **kwargs): controlPath=False, splitInit=False, **kwargs):
"""Instantiate a remote node """Instantiate a remote node
name: name of remote node name: name of remote node
server: remote server (optional) server: remote server (optional)
user: user on remote server (optional) user: user on remote server (optional)
controlPath: ssh control path template (optional) controlPath: specify shared ssh control path (optional)
splitInit: split initialization? splitInit: split initialization?
**kwargs: see Node()""" **kwargs: see Node()"""
# We connect to servers by IP address # We connect to servers by IP address
self.server = server if server else 'localhost' self.server = server if server else 'localhost'
self.serverIP = serverIP if serverIP else self.findServerIP( self.server ) self.serverIP = serverIP if serverIP else self.findServerIP( self.server )
self.user = user if user else self.findUser() self.user = user if user else self.findUser()
if controlPath is True:
# Set a default control path for shared SSH connections
controlPath = '/tmp/mn-%r@%h:%p'
self.controlPath = controlPath self.controlPath = controlPath
self.splitInit = splitInit self.splitInit = splitInit
if self.user and self.server != 'localhost': if self.user and self.server != 'localhost':