Renamed mn_run.py -> mn, mn_clean.py -> mnclean; updated Makefle
It's possible that mn_clean is a bit easier to read; mnclean may be easier to type, however. Added variables to Makefile so that source files are listed in a single location.
This commit is contained in:
@@ -1,12 +1,17 @@
|
|||||||
all: codecheck test
|
all: codecheck test
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf build dist build *.egg-info *.pyc
|
rm -rf build dist *.egg-info *.pyc
|
||||||
|
|
||||||
codecheck: mininet/*.py mininet/test/*.py
|
MININET = mininet/*.py
|
||||||
pyflakes mininet/*.py mininet/test/*.py bin/*.py
|
TEST = mininet/test/*.py
|
||||||
pylint --rcfile=.pylint mininet/*.py mininet/test/*.py bin/*.py
|
BIN = bin/mn bin/mnclean
|
||||||
pep8 --ignore=E251 mininet/*.py mininet/test/*.py bin/*.py
|
PYSRC = $(MININET) $(TEST) $(BIN)
|
||||||
|
|
||||||
test: mininet/*.py mininet/test/*.py
|
codecheck: $(PYSRC)
|
||||||
|
pyflakes $(PYSRC)
|
||||||
|
pylint --rcfile=.pylint $(PYSRC)
|
||||||
|
pep8 --ignore=E251 $(PYSRC)
|
||||||
|
|
||||||
|
test: $(MININET) $(TEST)
|
||||||
mininet/test/test_nets.py
|
mininet/test/test_nets.py
|
||||||
|
|||||||
+2
-2
@@ -1,9 +1,9 @@
|
|||||||
This directory should hold configuration files for custom mininets.
|
This directory should hold configuration files for custom mininets.
|
||||||
|
|
||||||
See custom_example.py, which loads the default minimal topology. The advantage of defining a mininet in a separate file is that you then use the --custom option in mn_run.py to run the CLI or specific tests with it.
|
See custom_example.py, which loads the default minimal topology. The advantage of defining a mininet in a separate file is that you then use the --custom option in mn to run the CLI or specific tests with it.
|
||||||
|
|
||||||
Each custom file must define a Mininet object for an 'mn' variable.
|
Each custom file must define a Mininet object for an 'mn' variable.
|
||||||
|
|
||||||
To start up a mininet with this custom topology, do:
|
To start up a mininet with this custom topology, do:
|
||||||
sudo mn_run.py --custom custom_example.py
|
sudo mn --custom custom_example.py
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ from setuptools import setup, find_packages
|
|||||||
from os.path import join
|
from os.path import join
|
||||||
|
|
||||||
scripts = [join('bin', filename) for filename in
|
scripts = [join('bin', filename) for filename in
|
||||||
['mn_run.py', 'mn_clean.py']]
|
['mn', 'mnclean']]
|
||||||
|
|
||||||
modname = distname = 'mininet'
|
modname = distname = 'mininet'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user