Skip to content

Commit

Permalink
Moved all files in core dir to the top level
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzosaino committed Jul 9, 2017
1 parent 7101a3c commit 9fdc51a
Show file tree
Hide file tree
Showing 94 changed files with 115 additions and 247 deletions.
File renamed without changes.
File renamed without changes.
94 changes: 32 additions & 62 deletions Makefile
@@ -1,75 +1,45 @@
SHELL = /bin/sh

VERSION = 0.6.1
BUILD_DIR = build
DIST_DIR = dist
TEST_DIR = test
DOC_DIR = doc

CORE_DIR = core
CPP_DIR = cpp
JAVA_DIR = java
NS3_DIR = ns3
.PHONY: clean dist doc test install upload distclean docclean

DOC_DIR = doc
DIST_DIR = dist
all: dist

ARCHIVE_NAME = fnss-$(VERSION)

.PHONY: clean doc dist docclean distclean install test
# Run all test cases
test:
cd $(TEST_DIR); python test.py

# Build all components
all: test doc dist
# Build HTML documentation
doc: docclean
cd $(DOC_DIR); make html

# Build all documentation
doc: dist docclean
cd $(CPP_DIR); make doc
cd $(NS3_DIR); make doc
mkdir -p $(DOC_DIR)
mkdir -p $(DOC_DIR)/core
mkdir -p $(DOC_DIR)/java
mkdir -p $(DOC_DIR)/cpp
mkdir -p $(DOC_DIR)/ns3
cp -r $(CORE_DIR)/doc/build/html/* $(DOC_DIR)/core
cp -r $(JAVA_DIR)/doc/* $(DOC_DIR)/java
cp -r $(CPP_DIR)/doc/html/* $(DOC_DIR)/cpp
cp -r $(NS3_DIR)/doc/html/* $(DOC_DIR)/ns3
# Create distribution package
dist: clean doc
python setup.py sdist

# Collect all distribution files
dist: distclean
cd $(JAVA_DIR); ant
cd $(CORE_DIR); make dist
cd $(CPP_DIR); make dist
cd $(NS3_DIR); make dist
mkdir -p $(DIST_DIR)
mkdir -p $(DIST_DIR)/core
mkdir -p $(DIST_DIR)/java
mkdir -p $(DIST_DIR)/cpp
mkdir -p $(DIST_DIR)/ns3
cp -r $(CORE_DIR)/dist/* $(DIST_DIR)/core
cp -r $(JAVA_DIR)/dist/* $(DIST_DIR)/java
cp -r $(CPP_DIR)/dist/* $(DIST_DIR)/cpp
cp -r $(NS3_DIR)/dist/* $(DIST_DIR)/ns3
cd $(DIST_DIR)/core ; for f in * ; do mv $$f `echo $$f | sed s/fnss-/fnss-core-/` ; done
# Install the library
install: clean
python setup.py install

# Clean centralized dist directory
distclean:
rm -rf $(DIST_DIR)
# Upload FNSS to Python Package Index (you need access credentials)
upload: clean doc
python setup.py sdist upload

# Clean centralized documentation directory
# Clean documentation
docclean:
rm -rf $(DOC_DIR)
cd $(DOC_DIR); make clean

# Clean all project
clean: distclean docclean
cd $(JAVA_DIR); ant clean
cd $(CORE_DIR); make clean
cd $(CPP_DIR); make clean
cd $(NS3_DIR); make clean

# Install core and C++ libraries
install:
cd $(CORE_DIR); make install
cd $(CPP_DIR); make install
# Clean dist files
distclean:
rm -rf fnss.egg-info
rm -rf $(DIST_DIR)

# Run all test cases
test:
cd $(CORE_DIR); make test
cd $(JAVA_DIR); ant test.run
cd $(CPP_DIR); make test
# Delete temp and build files
clean: docclean distclean
find . -name "*__pycache__" | xargs rm -rf
find . -name "*.pyc" | xargs rm -rf
rm -rf $(BUILD_DIR)
126 changes: 83 additions & 43 deletions README.md
@@ -1,57 +1,97 @@
# Fast Network Simulation Setup (FNSS)
Fast Network Simulation Setup (FNSS) is a toolchain allowing network researchers and engineers to simplify the process of setting up a network experiment scenario. It allows users to:
# FNSS core (Python) library
The FNSS core library is a Python library providing a set of features allowing the simplification of the setup of a network experiment.
These features include the ability to:

* Parse a topology from a dataset or a topology generator or generate it according to a number of synthetic models
* Configure links with capacity, weights, delays and buffer sizes
* Deploy applications and protocol stacks on nodes
* Generate traffic matrices
* Generate event schedules
* Deploy network and workload configuration to a number of simulators and emulators
* Parse a topology from a dataset, a topology generator or generate it according to a number of synthetic models
* Apply link capacity, link weights, link delays and buffer sizes
* Deploy application stacks
* Generate traffic matrices
* Generate event schedules

FNSS comprises a core library (written in Python) and a set of adapters. The core library provides all capabilities for generating the experiment scenario. The adapters allow users to export scenarios generated with the core library to [ns-2](http://www.isi.edu/nsnam/ns/), [ns-3](http://www.nsnam.org/), [Mininet](http://www.mininet.org/), [Omnet++](http://www.omnetpp.org/), [Autonetkit](http://www.autonetkit.org/) and [jFed](http://jfed.iminds.be/) as well other simulators or emulators through the Python core library itself or the provided Java and C++ libraries.
The core library provides function to export created topologies to [ns-2](http://www.isi.edu/nsnam/ns/), [Mininet](http://www.mininet.org), [Omnet++](http://www.omnetpp.org/), [Autonetkit](http://www.autonetkit.org) and [jFed](http://jfed.iminds.be/).
It can also be used in conjunction with the FNSS Java, C++ API or [ns-3](http://www.nsnam.org/) libraries to import topologies, traffic matrices and event schedules in the desired target simulator or emulator.

## Project directory structure
The project files are organized in the following directories:
The files of the FNSS core library are organized in the following directories.

* core: core Python library
* cpp: C++ API
* java: Java API
* ns3: ns-3 API
* `bin`: verious scripts to be run from the command shell
* `dist`: folder where the built packages are saved
* `doc`: documentation
* `examples`: example code using the library
* `fnss`: source code
* `test`: test code

## How to use it
The FNSS library comprises a core Python library, which also includes adapters for ns-2, Mininet and Autonetkit and libraries for ns-3 and Java and C++ simulators/emulators.
The core Python library is needed for creating and configuring topologies, traffic matrices and event schedules. Such objects can then be used directly if you intend to use a Python simulator. Otherwise, they can be exported to ns-2, Autonetkit and Mininet or saved to XML files which can then be parsed by the ns-3, Java or C++ libraries.
For detailed information on how to use each component of the toolchain, please refer to the instructions included in the `README` files contained in the root directory of each subcomponent (`core`, `cpp`, `java` and `ns3`) or visit the [FNSS website](http://fnss.github.io).
## Install
You do not necessarily need to install FNSS to start using it. If you have already all the required packages on your system (look at requirements section below), you can simply add the directory where this README is located to your PYTHONPATH environment variable and you will be able to FNSS straight away.

## License
The core (Python), Java and C++ libraries are licensed under the term of [BSD License](http://en.wikipedia.org/wiki/BSD_licenses). The ns-3 API is instead licensed under the terms of the [GNU GPLv2 license](http://www.gnu.org/licenses/gpl-2.0.html).
However, we recommend to install FNSS using the following process, which will take care installing all required packages, if missing.

To install the package from sources, the easiest way is to open a shell and move to the directory where this README file is located.
There should be a `setup.py` file in this directory.

To install run the following command:

$ python setup.py install

Alternatively, you can use the make script provided:

$ make install

## Build package and documentation
You do not need to build the package to use the FNSS core library: you can install it following the procedure described above.
If you wish to build a package, for example to redistribute it, open a shell and move to the directory where this README file is located.
There should also be a `setup.py` file in this directory.

To create a package, run the following command:

$ make dist

This will create the package file and save them in the `dist` folder.
It will also generate all the HTML documentation and save it in the folder `doc/html`.
If you only want to build the documentation, run:

$ make doc

## Citing
If you cite FNSS in your paper, please refer to the following pubblication:
Before attempting to build the documentation make sure that you have all the packages required, listed below.

L. Saino, C. Cocora, G. Pavlou, [A Toolchain for Simplifying Network Simulation Setup](http://www.ee.ucl.ac.uk/~lsaino/publications/fnss-simutools13.pdf), in *Proceedings of the 6th International ICST Conference on Simulation Tools and Techniques (SIMUTOOLS '13)*, Cannes, France, March 2013
## How to use
Once the package is successfully installed, you can start using FNSS straight away.
To use the FNSS package, simply import it by typing `import fnss` in your Python console or in your source file.
After importing the `fnss` package, all FNSS functions and classes are automatically imported.
For furhter information on how to use library you can either look at the API documentation located in the `doc/html` folder (run `make doc` to build it). Alternatively, you can have a look at some code examples under the `examples` directory.

@inproceedings{fnss,
author = {Saino, Lorenzo and Cocora, Cosmin and Pavlou, George},
title = {A Toolchain for Simplifying Network Simulation Setup},
booktitle = {Proceedings of the 6th International ICST Conference on Simulation Tools and Techniques},
series = {SIMUTOOLS '13},
year = {2013},
location = {Cannes, France},
numpages = {10},
publisher = {ICST},
address = {ICST, Brussels, Belgium, Belgium},
}
## Test
To run the tests, open a shell and move to the `test` subdirectory (it should contain a `test.py` file) and then run the command:

## Bug reports
If you wish to report a bug, please open an issue on the GitHub [issue page](https://github.com/fnss/fnss/issues/).
When reporting an issue, please try to provide a reproducible example of the problem, if possible.
$ python test.py

## Contributions
Any contributions to the project (either bug fixes or new features) are very much welcome. To submit your code, please send a pull request on the [GitHub project page](https://github.com/fnss/fnss/).
Alternatively, you can use the make script provided:

If you wish to contribute please try to follow these guidelines:
$ make test

* Write commit messages conforming to [Git convention](http://365git.tumblr.com/post/3308646748/writing-git-commit-messages)
* If you are sending a fix to an open issue, feel free to send a pull request directly, but make sure to reference the issue ID that you are fixing in the commit message.
* Think about writing test cases for your feature or bug fix, if relevant. If you can't, don't worry: send your code anyway.
## Requirements
To run the core library of FNSS you need to have [Python](http://www.python.org/) (version 2.7, 3.4 or later).
In addition you also need the following Python packages.

* [numpy](http://www.numpy.org/) (version 1.4 or later)
* [networkx](http://networkx.github.gov/) (version 1.6 or later)

To be able to export topologies to ns-2, you also need:

* [mako](http://www.makotemplates.org/) (version 0.4 or later)

To be able to export topologies to Mininet you need Mininet itself:

* [mininet](http://www.mininet.org/) (version 2.1.0 or later)

To run unit test cases, you also need the nose package:

* [nose](https://nose.readthedocs.org/en/latest/) (version 1.1 or later)

To build the documentation from sources, you also need the following Python packages:

* [sphinx](http://sphinx-doc.org/) (version 1.1 or later)
* [numpydoc](http://pypi.python.org/pypi/numpydoc/) (version 0.4 or later)

## License
The FNSS core library is released under the terms of the [BSD License](http://en.wikipedia.org/wiki/BSD_licenses). See `LICENSE.txt`.
File renamed without changes.
File renamed without changes.
45 changes: 0 additions & 45 deletions core/Makefile

This file was deleted.

97 changes: 0 additions & 97 deletions core/README.md

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 9fdc51a

Please sign in to comment.