MCPcopy Create free account
hub / github.com/mininet/mininet / testHostWithPrivateDirs

Function testHostWithPrivateDirs

examples/bind.py:48–62  ·  view source on GitHub ↗

Test bind mounts

()

Source from the content-addressed store, hash-verified

46# Sample usage
47
48def testHostWithPrivateDirs():
49 "Test bind mounts"
50 topo = SingleSwitchTopo( 10 )
51 privateDirs = [ ( '/var/log', '/tmp/%(name)s/var/log' ),
52 ( '/var/run', '/tmp/%(name)s/var/run' ),
53 '/var/mn' ]
54 host = partial( Host,
55 privateDirs=privateDirs )
56 net = Mininet( topo=topo, host=host, waitConnected=True )
57 net.start()
58 directories = [ directory[ 0 ] if isinstance( directory, tuple )
59 else directory for directory in privateDirs ]
60 info( 'Private Directories:', directories, '\n' )
61 CLI( net )
62 net.stop()
63
64
65if __name__ == '__main__':

Callers 1

bind.pyFile · 0.85

Calls 5

startMethod · 0.95
stopMethod · 0.95
SingleSwitchTopoClass · 0.90
MininetClass · 0.90
CLIClass · 0.90

Tested by

no test coverage detected