Use setuptools to install python files
Now, to reference mininet files, use 'import mininet.mininet'. PYTHONPATH mods are no longer required for installation.
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
"Create a tree network and run the CLI on it."
|
||||
|
||||
from mininet import init, TreeNet, Cli
|
||||
from mininet.mininet import init, TreeNet, Cli
|
||||
|
||||
if __name__ == '__main__':
|
||||
init()
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
"Instantiate a Grid network and use NOX as the controller."
|
||||
|
||||
from mininet import init, Controller, GridNet, Cli
|
||||
from mininet.mininet import init, Controller, GridNet, Cli
|
||||
|
||||
class NoxController( Controller ):
|
||||
def __init__( self, name, **kwargs ):
|
||||
|
||||
@@ -15,8 +15,8 @@ switches, so this test WILL NOT WORK unless you have recompiled
|
||||
your controller to support 100 switches (or more.)
|
||||
"""
|
||||
|
||||
from mininet import init, Network, defaultNames, Host, Switch
|
||||
from mininet import createLink, flush, iperf, pingTestVerbose, Cli
|
||||
from mininet.mininet import init, Network, defaultNames, Host, Switch
|
||||
from mininet.mininet import createLink, flush, iperf, pingTestVerbose, Cli
|
||||
|
||||
class LinearNet( Network ):
|
||||
def __init__( self, switchCount, **kwargs ):
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
"Run multiple tests on a network."
|
||||
|
||||
from mininet import init, TreeNet, pingTestVerbose, iperfTest, Cli
|
||||
from mininet.mininet import init, TreeNet, pingTestVerbose, iperfTest, Cli
|
||||
|
||||
if __name__ == '__main__':
|
||||
init()
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
"Instantiate a Tree network and use NOX as the controller."
|
||||
|
||||
from mininet import init, Controller, TreeNet, Cli
|
||||
from mininet.mininet import init, Controller, TreeNet, Cli
|
||||
|
||||
class NoxController( Controller ):
|
||||
def __init__( self, name, **kwargs ):
|
||||
|
||||
@@ -5,14 +5,14 @@
|
||||
import ripcord
|
||||
from ripcord.topo import FatTreeTopo
|
||||
|
||||
from mininet import init, Controller, Network, Host, nameGen, Cli
|
||||
from mininet import createLink, flush
|
||||
from mininet.mininet import init, Controller, Network, Host, nameGen, Cli
|
||||
from mininet.mininet import createLink, flush
|
||||
|
||||
class NoxController( Controller ):
|
||||
def __init__( self, name, kernel=False **kwargs ):
|
||||
def __init__( self, name, kernel=False, **kwargs ):
|
||||
Controller.__init__( self, name, kernel=kernel,
|
||||
controller='nox_core',
|
||||
cargs='-v --libdir=/usr/local/lib -i ptcp: routing',
|
||||
cargs='-v --libdir=/usr/local/lib -i ptcp:',
|
||||
cdir='/usr/local/bin', **kwargs)
|
||||
|
||||
class FatTree( Network ):
|
||||
|
||||
@@ -6,7 +6,7 @@ This is more complicated than using the higher-level classes,
|
||||
but it exposes the configuration details and allows customization.
|
||||
"""
|
||||
|
||||
from mininet import init, Node, createLink
|
||||
from mininet.mininet import init, Node, createLink
|
||||
|
||||
def scratchNet( cname='controller', cargs='ptcp:'):
|
||||
# Create Network
|
||||
|
||||
@@ -8,7 +8,7 @@ but it exposes the configuration details and allows customization.
|
||||
This version uses the user datapath.
|
||||
"""
|
||||
|
||||
from mininet import init, Node, createLink
|
||||
from mininet.mininet import init, Node, createLink
|
||||
|
||||
def scratchNetUser( cname='controller', cargs='ptcp:'):
|
||||
# Create Network
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ unchanged on mininet and hardware.
|
||||
"""
|
||||
|
||||
import sys ; readline = sys.stdin.readline
|
||||
from mininet import init, Node, createLink, TreeNet, Cli
|
||||
from mininet.mininet import init, Node, createLink, TreeNet, Cli
|
||||
|
||||
def nets( hosts ):
|
||||
"Return list of networks (/24) for hosts."
|
||||
|
||||
@@ -7,7 +7,7 @@ to adjust them, e.g. by adding entries to /etc/sysctl.conf
|
||||
and running sysctl -p.
|
||||
"""
|
||||
|
||||
from mininet import init, TreeNet, Cli
|
||||
from mininet.mininet import init, TreeNet, Cli
|
||||
|
||||
if __name__ == '__main__':
|
||||
init()
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
"Create a 64-node tree network, and test connectivity using ping."
|
||||
|
||||
from mininet import init, TreeNet, pingTestVerbose
|
||||
from mininet.mininet import init, TreeNet, pingTestVerbose
|
||||
|
||||
def treePing64():
|
||||
results = {}
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ host. Requires xterm(1) and GNU screen(1).
|
||||
|
||||
import os, re
|
||||
from subprocess import Popen
|
||||
from mininet import init, TreeNet, quietRun
|
||||
from mininet.mininet import init, TreeNet, quietRun
|
||||
|
||||
def makeXterm( node, title ):
|
||||
"Run screen on a node, and hook up an xterm."
|
||||
|
||||
Reference in New Issue
Block a user