Revision 736db20c examples/bind.py

View differences:

examples/bind.py
35 35
"""
36 36

  
37 37
from mininet.net import Mininet
38
from mininet.node import Host, HostWithPrivateDirs
38
from mininet.node import Host
39 39
from mininet.cli import CLI
40 40
from mininet.topo import SingleSwitchTopo
41 41
from mininet.log import setLogLevel, info, debug
......
51 51
    privateDirs = [ ( '/var/log', '/tmp/%(name)s/var/log' ), 
52 52
                    ( '/var/run', '/tmp/%(name)s/var/run' ), 
53 53
                      '/var/mn' ]
54
    host = partial( HostWithPrivateDirs,
54
    host = partial( Host,
55 55
                    privateDirs=privateDirs )
56 56
    net = Mininet( topo=topo, host=host )
57 57
    net.start()
58
    directories = []
59
    for directory in privateDirs:
60
        directories.append( directory[ 0 ]
61
                            if isinstance( directory, tuple )
62
                            else directory )
58
    directories = [ directory[ 0 ] if isinstance( directory, tuple )
59
                    else directory for directory in privateDirs ]
63 60
    info( 'Private Directories:',  directories, '\n' )
64 61
    CLI( net )
65 62
    net.stop()

Also available in: Unified diff