Remove/merge obsolete examples
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
"Create a tree network and run the CLI on it."
|
||||
|
||||
from mininet.mininet import init, TreeNet, Cli
|
||||
|
||||
if __name__ == '__main__':
|
||||
init()
|
||||
network = TreeNet( depth=2, fanout=4, kernel=True )
|
||||
network.run( Cli )
|
||||
@@ -1,17 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
"Instantiate a Grid network and use NOX as the controller."
|
||||
|
||||
from mininet.mininet import init, Controller, GridNet, Cli
|
||||
|
||||
class NoxController( Controller ):
|
||||
def __init__( self, name, **kwargs ):
|
||||
Controller.__init__( self, name,
|
||||
controller='nox_core',
|
||||
cargs='-v --libdir=/usr/local/lib -i ptcp: routing',
|
||||
cdir='/usr/local/bin', **kwargs)
|
||||
|
||||
if __name__ == '__main__':
|
||||
init()
|
||||
network = GridNet( 2, 2, kernel=True, Controller=NoxController )
|
||||
network.run( Cli )
|
||||
@@ -1,14 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
"Run multiple tests on a network."
|
||||
|
||||
from mininet.mininet import init, TreeNet, pingTestVerbose, iperfTest, Cli
|
||||
|
||||
if __name__ == '__main__':
|
||||
init()
|
||||
network = TreeNet( depth=2, fanout=2, kernel=True )
|
||||
network.start()
|
||||
network.runTest( pingTestVerbose )
|
||||
network.runTest( iperfTest)
|
||||
network.runTest( Cli )
|
||||
network.stop()
|
||||
@@ -1,17 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
"Instantiate a Tree network and use NOX as the controller."
|
||||
|
||||
from mininet.mininet import init, Controller, TreeNet, Cli
|
||||
|
||||
class NoxController( Controller ):
|
||||
def __init__( self, name, **kwargs ):
|
||||
Controller.__init__( self, name,
|
||||
controller='nox_core',
|
||||
cargs='--libdir=/usr/local/lib -i ptcp: pyswitch',
|
||||
cdir='/usr/local/bin', **kwargs)
|
||||
|
||||
if __name__ == '__main__':
|
||||
init()
|
||||
network = TreeNet( depth=2, fanout=4, kernel=True, Controller=NoxController )
|
||||
network.run( Cli )
|
||||
@@ -1,16 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
'''Run a FatTree network from the Ripcord project.'''
|
||||
|
||||
from ripcord.topo import FatTreeTopo
|
||||
|
||||
from mininet.logging_mod import set_loglevel
|
||||
from mininet.net import init, Mininet
|
||||
from mininet.node import Switch, Host, NOXController, ControllerParams
|
||||
|
||||
if __name__ == '__main__':
|
||||
set_loglevel('info')
|
||||
init()
|
||||
controller_params = ControllerParams(0x0a000000, 8) # 10.0.0.0/8
|
||||
mn = Mininet(FatTreeTopo(4), Switch, Host, NOXController,
|
||||
controller_params)
|
||||
mn.interact()
|
||||
@@ -1,15 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
"""
|
||||
Create a 1024-host network, and run the CLI on it.
|
||||
If this fails because of kernel limits, you may have
|
||||
to adjust them, e.g. by adding entries to /etc/sysctl.conf
|
||||
and running sysctl -p.
|
||||
"""
|
||||
|
||||
from mininet.mininet import init, TreeNet, Cli
|
||||
|
||||
if __name__ == '__main__':
|
||||
init()
|
||||
network = TreeNet( depth=2, fanout=32, kernel=True )
|
||||
network.run( Cli )
|
||||
@@ -1,28 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
"Create a 64-node tree network, and test connectivity using ping."
|
||||
|
||||
from mininet.mininet import init, TreeNet, pingTestVerbose
|
||||
|
||||
def treePing64():
|
||||
results = {}
|
||||
datapaths = [ 'user', 'kernel' ]
|
||||
|
||||
print "*** Testing Mininet with user and kernel datapaths"
|
||||
|
||||
for datapath in datapaths:
|
||||
k = datapath == 'kernel'
|
||||
network = TreeNet( depth=2, fanout=8, kernel=k )
|
||||
result = network.run( pingTestVerbose )
|
||||
results[ datapath ] = result
|
||||
|
||||
print
|
||||
print "*** TreeNet ping results:"
|
||||
for datapath in datapaths:
|
||||
print "%s:" % datapath, results[ datapath ]
|
||||
print
|
||||
|
||||
if __name__ == '__main__':
|
||||
init()
|
||||
treePing64()
|
||||
|
||||
Reference in New Issue
Block a user