Revision 696a619d examples/scratchnetuser.py

View differences:

examples/scratchnetuser.py
3 3
"""
4 4
Build a simple network from scratch, using mininet primitives.
5 5
This is more complicated than using the higher-level classes,
6
but it exposes the configuration details and allows cusomization.
6
but it exposes the configuration details and allows customization.
7 7

  
8 8
This version uses the user datapath.
9 9
"""
10 10

  
11 11
from mininet import init, Node, createLink
12 12

  
13
def scratchNet( cname='controller', cargs='ptcp:'):
13
def scratchNetUser( cname='controller', cargs='ptcp:'):
14 14
   # Create Network
15
   # It's not strictly necessary for the controller and switches
16
   # to be in separate namespaces. For performance, they probably
17
   # should be in the root namespace. However, it's interesting to
18
   # see how they could work even if they are in separate namespaces.
15 19
   controller = Node( 'c0' )
16 20
   switch = Node( 's0')
17 21
   h0 = Node( 'h0' )
......
40 44
   
41 45
if __name__ == '__main__':
42 46
   init()   
43
   scratchNet()
47
   scratchNetUser()

Also available in: Unified diff