Skip to content
Snippets Groups Projects
Commit 51270ce4 authored by Brandon Heller's avatar Brandon Heller
Browse files

Use setuptools to install python files

Now, to reference mininet files, use 'import mininet.mininet'.

PYTHONPATH mods are no longer required for installation.
parent cd27f9db
No related branches found
No related tags found
No related merge requests found
......@@ -3,9 +3,12 @@ Preliminary Mininet Installation/Configuration Notes
- This is not (yet) a 'release'; things may be broken.
- Mininet is not currently 'installed.' If you want to install it,
so that you can 'import mininet', place mininet.py somewhere in your
python path.
- To install mininet, with root privileges:
python setup.py install
This places the mininet package in /usr/lib/python-2.5/site-packages/,
so that 'import mininet' will work.
- A functional netns binary is required to run mininet, but currently you
have to compile it and install it yourself from the included .c file:
......
......@@ -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()
......
......@@ -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 @@
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()
......
......@@ -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 @@
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 @@
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
......
......@@ -11,7 +11,7 @@
"""
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 @@
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 = {}
......
......@@ -7,7 +7,7 @@
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."
......
File moved
File moved
setup.py 0 → 100644
#!/usr/bin/env python
'''Setuptools params'''
from setuptools import setup, find_packages
setup(
name='mininet',
version='0.0.0',
description='The OpenFlow-based data center network',
author='Bob Lantz',
author_email='rlantz@cs.stanford.edu',
packages=find_packages(exclude='test'),
long_description="""\
Insert longer description here.
""",
classifiers=[
"License :: OSI Approved :: GNU General Public License (GPL)",
"Programming Language :: Python",
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Topic :: Internet",
],
keywords='networking protocol Internet OpenFlow',
license='GPL',
install_requires=[
'setuptools'
])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment