From: Alina Quereilhac Date: Thu, 26 Mar 2015 18:49:13 +0000 (+0100) Subject: add sphinx documentation X-Git-Tag: nepi-3.2.4-pypi~3^2~4 X-Git-Url: http://git.onelab.eu/?p=nepi.git;a=commitdiff_plain;h=590481ab47520f9bfdfda34630408a09a770f5a1 add sphinx documentation --- diff --git a/doc/sphinx/Makefile b/doc/sphinx/Makefile new file mode 100644 index 00000000..99929ff3 --- /dev/null +++ b/doc/sphinx/Makefile @@ -0,0 +1,153 @@ +# Makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +PAPER = +BUILDDIR = _build + +# Internal variables. +PAPEROPT_a4 = -D latex_paper_size=a4 +PAPEROPT_letter = -D latex_paper_size=letter +ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . +# the i18n builder cannot share the environment and doctrees with the others +I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . + +.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext + +help: + @echo "Please use \`make ' where is one of" + @echo " html to make standalone HTML files" + @echo " dirhtml to make HTML files named index.html in directories" + @echo " singlehtml to make a single large HTML file" + @echo " pickle to make pickle files" + @echo " json to make JSON files" + @echo " htmlhelp to make HTML files and a HTML help project" + @echo " qthelp to make HTML files and a qthelp project" + @echo " devhelp to make HTML files and a Devhelp project" + @echo " epub to make an epub" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" + @echo " latexpdf to make LaTeX files and run them through pdflatex" + @echo " text to make text files" + @echo " man to make manual pages" + @echo " texinfo to make Texinfo files" + @echo " info to make Texinfo files and run them through makeinfo" + @echo " gettext to make PO message catalogs" + @echo " changes to make an overview of all changed/added/deprecated items" + @echo " linkcheck to check all external links for integrity" + @echo " doctest to run all doctests embedded in the documentation (if enabled)" + +clean: + -rm -rf $(BUILDDIR)/* + +html: + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." + +dirhtml: + $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." + +singlehtml: + $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml + @echo + @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." + +pickle: + $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle + @echo + @echo "Build finished; now you can process the pickle files." + +json: + $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json + @echo + @echo "Build finished; now you can process the JSON files." + +htmlhelp: + $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp + @echo + @echo "Build finished; now you can run HTML Help Workshop with the" \ + ".hhp project file in $(BUILDDIR)/htmlhelp." + +qthelp: + $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp + @echo + @echo "Build finished; now you can run "qcollectiongenerator" with the" \ + ".qhcp project file in $(BUILDDIR)/qthelp, like this:" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Nepi.qhcp" + @echo "To view the help file:" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Nepi.qhc" + +devhelp: + $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp + @echo + @echo "Build finished." + @echo "To view the help file:" + @echo "# mkdir -p $$HOME/.local/share/devhelp/Nepi" + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Nepi" + @echo "# devhelp" + +epub: + $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub + @echo + @echo "Build finished. The epub file is in $(BUILDDIR)/epub." + +latex: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo + @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." + @echo "Run \`make' in that directory to run these through (pdf)latex" \ + "(use \`make latexpdf' here to do that automatically)." + +latexpdf: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through pdflatex..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +text: + $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text + @echo + @echo "Build finished. The text files are in $(BUILDDIR)/text." + +man: + $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man + @echo + @echo "Build finished. The manual pages are in $(BUILDDIR)/man." + +texinfo: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo + @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." + @echo "Run \`make' in that directory to run these through makeinfo" \ + "(use \`make info' here to do that automatically)." + +info: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo "Running Texinfo files through makeinfo..." + make -C $(BUILDDIR)/texinfo info + @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." + +gettext: + $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale + @echo + @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." + +changes: + $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes + @echo + @echo "The overview file is in $(BUILDDIR)/changes." + +linkcheck: + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck + @echo + @echo "Link check complete; look for any errors in the above output " \ + "or in $(BUILDDIR)/linkcheck/output.txt." + +doctest: + $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest + @echo "Testing of doctests in the sources finished, look at the " \ + "results in $(BUILDDIR)/doctest/output.txt." diff --git a/doc/sphinx/_build/doctrees/_layout/modules.doctree b/doc/sphinx/_build/doctrees/_layout/modules.doctree new file mode 100644 index 00000000..ec30cb79 Binary files /dev/null and b/doc/sphinx/_build/doctrees/_layout/modules.doctree differ diff --git a/doc/sphinx/_build/doctrees/_layout/nepi.data.doctree b/doc/sphinx/_build/doctrees/_layout/nepi.data.doctree new file mode 100644 index 00000000..c4f78450 Binary files /dev/null and b/doc/sphinx/_build/doctrees/_layout/nepi.data.doctree differ diff --git a/doc/sphinx/_build/doctrees/_layout/nepi.data.processing.ccn.doctree b/doc/sphinx/_build/doctrees/_layout/nepi.data.processing.ccn.doctree new file mode 100644 index 00000000..a5a88175 Binary files /dev/null and b/doc/sphinx/_build/doctrees/_layout/nepi.data.processing.ccn.doctree differ diff --git a/doc/sphinx/_build/doctrees/_layout/nepi.data.processing.doctree b/doc/sphinx/_build/doctrees/_layout/nepi.data.processing.doctree new file mode 100644 index 00000000..70a98ba2 Binary files /dev/null and b/doc/sphinx/_build/doctrees/_layout/nepi.data.processing.doctree differ diff --git a/doc/sphinx/_build/doctrees/_layout/nepi.data.processing.ping.doctree b/doc/sphinx/_build/doctrees/_layout/nepi.data.processing.ping.doctree new file mode 100644 index 00000000..f97deac6 Binary files /dev/null and b/doc/sphinx/_build/doctrees/_layout/nepi.data.processing.ping.doctree differ diff --git a/doc/sphinx/_build/doctrees/_layout/nepi.doctree b/doc/sphinx/_build/doctrees/_layout/nepi.doctree new file mode 100644 index 00000000..a07ade50 Binary files /dev/null and b/doc/sphinx/_build/doctrees/_layout/nepi.doctree differ diff --git a/doc/sphinx/_build/doctrees/_layout/nepi.execution.doctree b/doc/sphinx/_build/doctrees/_layout/nepi.execution.doctree new file mode 100644 index 00000000..d18e0a56 Binary files /dev/null and b/doc/sphinx/_build/doctrees/_layout/nepi.execution.doctree differ diff --git a/doc/sphinx/_build/doctrees/_layout/nepi.resources.all.doctree b/doc/sphinx/_build/doctrees/_layout/nepi.resources.all.doctree new file mode 100644 index 00000000..c9116763 Binary files /dev/null and b/doc/sphinx/_build/doctrees/_layout/nepi.resources.all.doctree differ diff --git a/doc/sphinx/_build/doctrees/_layout/nepi.resources.doctree b/doc/sphinx/_build/doctrees/_layout/nepi.resources.doctree new file mode 100644 index 00000000..4acbd6ab Binary files /dev/null and b/doc/sphinx/_build/doctrees/_layout/nepi.resources.doctree differ diff --git a/doc/sphinx/_build/doctrees/_layout/nepi.resources.linux.ccn.doctree b/doc/sphinx/_build/doctrees/_layout/nepi.resources.linux.ccn.doctree new file mode 100644 index 00000000..2b7a2f4e Binary files /dev/null and b/doc/sphinx/_build/doctrees/_layout/nepi.resources.linux.ccn.doctree differ diff --git a/doc/sphinx/_build/doctrees/_layout/nepi.resources.linux.doctree b/doc/sphinx/_build/doctrees/_layout/nepi.resources.linux.doctree new file mode 100644 index 00000000..26c8ded5 Binary files /dev/null and b/doc/sphinx/_build/doctrees/_layout/nepi.resources.linux.doctree differ diff --git a/doc/sphinx/_build/doctrees/_layout/nepi.resources.linux.netns.doctree b/doc/sphinx/_build/doctrees/_layout/nepi.resources.linux.netns.doctree new file mode 100644 index 00000000..a5af36f1 Binary files /dev/null and b/doc/sphinx/_build/doctrees/_layout/nepi.resources.linux.netns.doctree differ diff --git a/doc/sphinx/_build/doctrees/_layout/nepi.resources.linux.ns3.ccn.doctree b/doc/sphinx/_build/doctrees/_layout/nepi.resources.linux.ns3.ccn.doctree new file mode 100644 index 00000000..a3194bd8 Binary files /dev/null and b/doc/sphinx/_build/doctrees/_layout/nepi.resources.linux.ns3.ccn.doctree differ diff --git a/doc/sphinx/_build/doctrees/_layout/nepi.resources.linux.ns3.doctree b/doc/sphinx/_build/doctrees/_layout/nepi.resources.linux.ns3.doctree new file mode 100644 index 00000000..f82425ee Binary files /dev/null and b/doc/sphinx/_build/doctrees/_layout/nepi.resources.linux.ns3.doctree differ diff --git a/doc/sphinx/_build/doctrees/_layout/nepi.resources.netns.doctree b/doc/sphinx/_build/doctrees/_layout/nepi.resources.netns.doctree new file mode 100644 index 00000000..4c231727 Binary files /dev/null and b/doc/sphinx/_build/doctrees/_layout/nepi.resources.netns.doctree differ diff --git a/doc/sphinx/_build/doctrees/_layout/nepi.resources.ns3.classes.doctree b/doc/sphinx/_build/doctrees/_layout/nepi.resources.ns3.classes.doctree new file mode 100644 index 00000000..10cd63b1 Binary files /dev/null and b/doc/sphinx/_build/doctrees/_layout/nepi.resources.ns3.classes.doctree differ diff --git a/doc/sphinx/_build/doctrees/_layout/nepi.resources.ns3.doctree b/doc/sphinx/_build/doctrees/_layout/nepi.resources.ns3.doctree new file mode 100644 index 00000000..dd6ab1b4 Binary files /dev/null and b/doc/sphinx/_build/doctrees/_layout/nepi.resources.ns3.doctree differ diff --git a/doc/sphinx/_build/doctrees/_layout/nepi.resources.omf.doctree b/doc/sphinx/_build/doctrees/_layout/nepi.resources.omf.doctree new file mode 100644 index 00000000..ee74928b Binary files /dev/null and b/doc/sphinx/_build/doctrees/_layout/nepi.resources.omf.doctree differ diff --git a/doc/sphinx/_build/doctrees/_layout/nepi.resources.planetlab.doctree b/doc/sphinx/_build/doctrees/_layout/nepi.resources.planetlab.doctree new file mode 100644 index 00000000..6f56c318 Binary files /dev/null and b/doc/sphinx/_build/doctrees/_layout/nepi.resources.planetlab.doctree differ diff --git a/doc/sphinx/_build/doctrees/_layout/nepi.resources.planetlab.ns3.doctree b/doc/sphinx/_build/doctrees/_layout/nepi.resources.planetlab.ns3.doctree new file mode 100644 index 00000000..397fa8bd Binary files /dev/null and b/doc/sphinx/_build/doctrees/_layout/nepi.resources.planetlab.ns3.doctree differ diff --git a/doc/sphinx/_build/doctrees/_layout/nepi.resources.planetlab.openvswitch.doctree b/doc/sphinx/_build/doctrees/_layout/nepi.resources.planetlab.openvswitch.doctree new file mode 100644 index 00000000..3ede8d5a Binary files /dev/null and b/doc/sphinx/_build/doctrees/_layout/nepi.resources.planetlab.openvswitch.doctree differ diff --git a/doc/sphinx/_build/doctrees/_layout/nepi.util.doctree b/doc/sphinx/_build/doctrees/_layout/nepi.util.doctree new file mode 100644 index 00000000..d114ec2d Binary files /dev/null and b/doc/sphinx/_build/doctrees/_layout/nepi.util.doctree differ diff --git a/doc/sphinx/_build/doctrees/_layout/nepi.util.parsers.doctree b/doc/sphinx/_build/doctrees/_layout/nepi.util.parsers.doctree new file mode 100644 index 00000000..c281d945 Binary files /dev/null and b/doc/sphinx/_build/doctrees/_layout/nepi.util.parsers.doctree differ diff --git a/doc/sphinx/_build/doctrees/environment.pickle b/doc/sphinx/_build/doctrees/environment.pickle new file mode 100644 index 00000000..b277fb63 Binary files /dev/null and b/doc/sphinx/_build/doctrees/environment.pickle differ diff --git a/doc/sphinx/_build/doctrees/index.doctree b/doc/sphinx/_build/doctrees/index.doctree new file mode 100644 index 00000000..cef08a56 Binary files /dev/null and b/doc/sphinx/_build/doctrees/index.doctree differ diff --git a/doc/sphinx/_build/html/.buildinfo b/doc/sphinx/_build/html/.buildinfo new file mode 100644 index 00000000..25f64894 --- /dev/null +++ b/doc/sphinx/_build/html/.buildinfo @@ -0,0 +1,4 @@ +# Sphinx build info version 1 +# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. +config: b80fe6905e1167a38cd1f4c456e3337c +tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/doc/sphinx/_build/html/_layout/modules.html b/doc/sphinx/_build/html/_layout/modules.html new file mode 100644 index 00000000..40aa1401 --- /dev/null +++ b/doc/sphinx/_build/html/_layout/modules.html @@ -0,0 +1,150 @@ + + + + + + + + nepi — NEPI 3.0 documentation + + + + + + + + + + + + +
+
+

This Page

+ + + +
+
+ + + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_layout/nepi.data.html b/doc/sphinx/_build/html/_layout/nepi.data.html new file mode 100644 index 00000000..5199c38f --- /dev/null +++ b/doc/sphinx/_build/html/_layout/nepi.data.html @@ -0,0 +1,134 @@ + + + + + + + + nepi.data package — NEPI 3.0 documentation + + + + + + + + + + + + +
+
+

Table Of Contents

+ + +

This Page

+ + + +
+
+ + + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_layout/nepi.data.processing.ccn.html b/doc/sphinx/_build/html/_layout/nepi.data.processing.ccn.html new file mode 100644 index 00000000..49ad55d6 --- /dev/null +++ b/doc/sphinx/_build/html/_layout/nepi.data.processing.ccn.html @@ -0,0 +1,174 @@ + + + + + + + + nepi.data.processing.ccn package — NEPI 3.0 documentation + + + + + + + + + + + + +
+
+

Table Of Contents

+ + +

This Page

+ + + +
+
+ +
+
+
+
+ +
+

nepi.data.processing.ccn package¶

+
+

Submodules¶

+
+
+

nepi.data.processing.ccn.parser module¶

+
+
+nepi.data.processing.ccn.parser.annotate_cn_graph(logs_dir, graph, parse_ping_logs=False)[source]¶
+

Adds CCN content history for each node in the topology graph.

+
+ +
+
+nepi.data.processing.ccn.parser.annotate_cn_node(graph, nid, ips2nid, data, content_history)[source]¶
+
+ +
+
+nepi.data.processing.ccn.parser.ccn_consumers(graph)[source]¶
+

Returns the nodes that are content consumers

+
+ +
+
+nepi.data.processing.ccn.parser.ccn_producers(graph)[source]¶
+

Returns the nodes that are content providers

+
+ +
+
+nepi.data.processing.ccn.parser.dump_content_history(content_history)[source]¶
+
+ +
+
+nepi.data.processing.ccn.parser.is_control(content_name)[source]¶
+
+ +
+
+nepi.data.processing.ccn.parser.load_content_history(fname)[source]¶
+
+ +
+
+nepi.data.processing.ccn.parser.parse_file(filename)[source]¶
+

Parses message information from ccnd log files

+

filename: path to ccndlog file

+
+ +
+
+nepi.data.processing.ccn.parser.process_content_history(graph)[source]¶
+

Compute CCN message counts and aggregates content historical +information in the content_names dictionary

+
+ +
+
+nepi.data.processing.ccn.parser.process_content_history_logs(logs_dir, graph, parse_ping_logs=False)[source]¶
+

Parse CCN logs and aggregate content history information in graph. +Returns annotated graph and message countn and content names history.

+
+ +
+
+

Module contents¶

+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_layout/nepi.data.processing.html b/doc/sphinx/_build/html/_layout/nepi.data.processing.html new file mode 100644 index 00000000..4fb2e10a --- /dev/null +++ b/doc/sphinx/_build/html/_layout/nepi.data.processing.html @@ -0,0 +1,127 @@ + + + + + + + + nepi.data.processing package — NEPI 3.0 documentation + + + + + + + + + + + + +
+
+

Table Of Contents

+ + +

This Page

+ + + +
+
+ + + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_layout/nepi.data.processing.ping.html b/doc/sphinx/_build/html/_layout/nepi.data.processing.ping.html new file mode 100644 index 00000000..c9162d9c --- /dev/null +++ b/doc/sphinx/_build/html/_layout/nepi.data.processing.ping.html @@ -0,0 +1,133 @@ + + + + + + + + nepi.data.processing.ping package — NEPI 3.0 documentation + + + + + + + + + + + + +
+
+

Table Of Contents

+ + +

This Page

+ + + +
+
+ +
+
+
+
+ +
+

nepi.data.processing.ping package¶

+
+

Submodules¶

+
+
+

nepi.data.processing.ping.parser module¶

+
+
+nepi.data.processing.ping.parser.annotate_cn_graph(logs_dir, graph)[source]¶
+

Add delay inormation to graph using data collected using +ping.

+
+ +
+
+nepi.data.processing.ping.parser.annotate_cn_node(graph, nid1, ips2nid, data)[source]¶
+
+ +
+
+nepi.data.processing.ping.parser.parse_file(filename)[source]¶
+

filename: path to traceroute file

+
+ +
+
+

Module contents¶

+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_layout/nepi.execution.html b/doc/sphinx/_build/html/_layout/nepi.execution.html new file mode 100644 index 00000000..75b38a02 --- /dev/null +++ b/doc/sphinx/_build/html/_layout/nepi.execution.html @@ -0,0 +1,2376 @@ + + + + + + + + nepi.execution package — NEPI 3.0 documentation + + + + + + + + + + + + + + +
+
+
+
+ +
+

nepi.execution package¶

+
+

Submodules¶

+
+
+

nepi.execution.attribute module¶

+
+
+class nepi.execution.attribute.Attribute(name, help, type='STRING', flags=None, default=None, allowed=None, range=None, set_hook=None)[source]¶
+

Bases: object

+

An Attribute exposes a configuration parameter of a resource

+
+
+allowed[source]¶
+

Returns the set of allowed values for the Attribute

+
+ +
+
+default[source]¶
+

Returns the default value of the Attribute

+
+ +
+
+flags[source]¶
+

Returns the flags of the Attribute

+
+ +
+
+get_value()[source]¶
+

Returns the value of the Attribute

+
+ +
+
+has_changed[source]¶
+

Returns True if the value has changed from the default

+
+ +
+
+has_flag(flag)[source]¶
+

Returns True if the Attribute has the flag ‘flag’

+ +++ + + + +
Parameters:flag (Flags) – Flag to be checked
+
+ +
+
+help[source]¶
+

Returns the description of the Attribute

+
+ +
+
+is_valid_value(value)[source]¶
+

Attribute subclasses will override this method to add +adequate validation

+
+ +
+
+name[source]¶
+

Returns the name of the Attribute

+
+ +
+
+range[source]¶
+

Returns the range of allowed numerical values for the Attribute

+
+ +
+
+set_value(value)[source]¶
+

Configure a new value for the Attribute

+
+ +
+
+type[source]¶
+

Returns the type of the Attribute

+
+ +
+
+value¶
+

Returns the value of the Attribute

+
+ +
+ +
+
+class nepi.execution.attribute.Flags[source]¶
+

Flags to characterize the scope of an Attribute

+
+
+Construct = 8¶
+
+ +
+
+Credential = 20¶
+
+ +
+
+Design = 4¶
+
+ +
+
+Filter = 36¶
+
+ +
+
+Global = 128¶
+
+ +
+
+NoRead = 1¶
+
+ +
+
+NoWrite = 2¶
+
+ +
+
+Reserved = 64¶
+
+ +
+ +
+
+class nepi.execution.attribute.Types[source]¶
+

Allowed types for the Attribute value

+
+
+Bool = 'BOOL'¶
+
+ +
+
+Double = 'DOUBLE'¶
+
+ +
+
+Enumerate = 'ENUM'¶
+
+ +
+
+Integer = 'INTEGER'¶
+
+ +
+
+String = 'STRING'¶
+
+ +
+ +
+
+

nepi.execution.ec module¶

+
+
+class nepi.execution.ec.ECState[source]¶
+

Bases: object

+

Possible states of the ExperimentController

+
+
+FAILED = 2¶
+
+ +
+
+RELEASED = 3¶
+
+ +
+
+RUNNING = 1¶
+
+ +
+
+TERMINATED = 4¶
+
+ +
+ +
+
+class nepi.execution.ec.ExperimentController(exp_id=None, local_dir=None, persist=False, fm=None, add_node_callback=None, add_edge_callback=None, **kwargs)[source]¶
+

Bases: object

+

An experiment, or scenario, is defined by a concrete set of resources, +and the behavior, configuration and interconnection of those resources. +The Experiment Description (ED) is a detailed representation of a +single experiment. It contains all the necessary information to +allow repeating the experiment. NEPI allows to describe +experiments by registering components (resources), configuring them +and interconnecting them.

+

A same experiment (scenario) can be executed many times, generating +different results. We call an experiment execution (instance) a ‘run’.

+

The ExperimentController (EC), is the entity responsible of +managing an experiment run. The same scenario can be +recreated (and re-run) by instantiating an EC and recreating +the same experiment description.

+

An experiment is represented as a graph of interconnected +resources. A resource is a generic concept in the sense that any +component taking part of an experiment, whether physical of +virtual, is considered a resource. A resources could be a host, +a virtual machine, an application, a simulator, a IP address.

+

A ResourceManager (RM), is the entity responsible for managing a +single resource. ResourceManagers are specific to a resource +type (i.e. An RM to control a Linux application will not be +the same as the RM used to control a ns-3 simulation). +To support a new type of resource, a new RM must be implemented. +NEPI already provides a variety of RMs to control basic resources, +and new can be extended from the existing ones.

+

Through the EC interface the user can create ResourceManagers (RMs), +configure them and interconnect them, to describe an experiment. +Describing an experiment through the EC does not run the experiment. +Only when the ‘deploy()’ method is invoked on the EC, the EC will take +actions to transform the ‘described’ experiment into a ‘running’ experiment.

+

While the experiment is running, it is possible to continue to +create/configure/connect RMs, and to deploy them to involve new +resources in the experiment (this is known as ‘interactive’ deployment).

+

An experiments in NEPI is identified by a string id, +which is either given by the user, or automatically generated by NEPI. +The purpose of this identifier is to separate files and results that +belong to different experiment scenarios. +However, since a same ‘experiment’ can be run many times, the experiment +id is not enough to identify an experiment instance (run). +For this reason, the ExperimentController has two identifier, the +exp_id, which can be re-used in different ExperimentController, +and the run_id, which is unique to one ExperimentController instance, and +is automatically generated by NEPI.

+
+
+abort[source]¶
+

Returns True if the experiment has failed and should be interrupted, +False otherwise.

+
+ +
+
+deploy(guids=None, wait_all_ready=True, group=None)[source]¶
+

Deploys all ResourceManagers in the guids list.

+

If the argument ‘guids’ is not given, all RMs with state NEW +are deployed.

+
+
+++ + + + + + + + + + + + + + + +
param guids:List of guids of RMs to deploy
type guids:list
param wait_all_ready:
 Wait until all RMs are ready in +order to start the RMs
type guid:int
param group:Id of deployment group in which to deploy RMs
type group:int
+
+
+ +
+
+discover(guid)[source]¶
+

Discovers an available resource matching the criteria defined +by the RM with guid ‘guid’, and associates that resource to the RM

+

Not all RM types require (or are capable of) performing resource +discovery. For the RM types which are not capable of doing so, +invoking this method does not have any consequences.

+
+
+++ + + + + + +
param guid:Guid of the RM
type guid:int
+
+
+ +
+
+ecstate[source]¶
+

Returns the state of the Experiment Controller

+
+ +
+
+enable_trace(guid, name)[source]¶
+

Enables a trace to be collected during the experiment run

+ +++ + + + +
Parameters:name (str) – Name of the trace
+
+ +
+
+exp_dir[source]¶
+

Local directory to store results and other files related to the +experiment.

+
+ +
+
+exp_id[source]¶
+

Returns the experiment id assigned by the user

+
+ +
+
+failure_level[source]¶
+

Returns the level of FAILURE of th experiment

+
+ +
+
+filter_resources(rtype)[source]¶
+

Returns the guids of all ResourceManagers of type rtype

+ +++ + + + + + +
Parameters:rtype (string) – Resource type
Return type:list of guids
+
+ +
+
+fm[source]¶
+

Returns the failure manager

+
+ +
+
+get(guid, name)[source]¶
+

Returns the value of the attribute with name ‘name’ on the +RM with guid ‘guid’

+
+
+++ + + + + + + + + + + + +
param guid:Guid of the RM
type guid:int
param name:Name of the attribute
type name:str
return:The value of the attribute with name ‘name’
+
+
+ +
+
+get_attribute(guid, name)[source]¶
+

Returns the attribute ‘name’ of the RM with guid ‘guid’

+ +++ + + + + + + + +
Parameters:
    +
  • guid (int) – Guid of the RM
  • +
  • name (str) – Name of the attribute
  • +
+
Returns:

The attribute with name ‘name’

+
Return type:

Attribute

+
+
+ +
+
+get_attributes(guid)[source]¶
+

Returns all the attributes of the RM with guid ‘guid’

+ +++ + + + + + + + +
Parameters:guid (int) – Guid of the RM
Returns:List of attributes
Return type:list
+
+ +
+
+get_discover_time(guid)[source]¶
+

Returns the discover time of the RM as a timestamp

+
+ +
+
+get_failed_time(guid)[source]¶
+

Returns the time failure occured for the RM as a timestamp

+
+ +
+
+get_global(rtype, name)[source]¶
+

Returns the value of the global attribute with name ‘name’ on the +RMs of rtype ‘rtype’.

+
+
+++ + + + + + + + + + + + +
param guid:Guid of the RM
type guid:int
param name:Name of the attribute
type name:str
return:The value of the attribute with name ‘name’
+
+
+ +
+
+get_provision_time(guid)[source]¶
+

Returns the provision time of the RM as a timestamp

+
+ +
+
+get_ready_time(guid)[source]¶
+

Returns the deployment time of the RM as a timestamp

+
+ +
+
+get_release_time(guid)[source]¶
+

Returns the release time of the RM as a timestamp

+
+ +
+
+get_resource(guid)[source]¶
+

Returns a registered ResourceManager by its guid

+ +++ + + + + + +
Parameters:guid (int) – Id of the resource
Return type:ResourceManager
+
+ +
+
+get_resources_by_type(rtype)[source]¶
+

Returns the ResourceManager objects of type rtype

+ +++ + + + + + +
Parameters:rtype (string) – Resource type
Return type:list of ResourceManagers
+
+ +
+
+get_start_time(guid)[source]¶
+

Returns the start time of the RM as a timestamp

+
+ +
+
+get_stop_time(guid)[source]¶
+

Returns the stop time of the RM as a timestamp

+
+ +
+
+get_task(tid)[source]¶
+

Returns a task by its id

+ +++ + + + + + +
Parameters:tid (int) – Id of the task
Return type:Task
+
+ +
+
+get_traces(guid)[source]¶
+

Returns the list of the trace names of the RM with guid ‘guid’

+ +++ + + + + + + + +
Parameters:guid (int) – Guid of the RM
Returns:List of trace names
Return type:list
+
+ +
+
+inform_failure(guid)[source]¶
+

Reports a failure in a RM to the EC for evaluation

+ +++ + + + +
Parameters:guid (int) – Resource id
+
+ +
+
+classmethod load(filepath, format='xml')[source]¶
+
+ +
+
+local_dir[source]¶
+

Root local directory for experiment files

+
+ +
+
+logger[source]¶
+

Returns the logger instance of the Experiment Controller

+
+ +
+
+netgraph[source]¶
+

Return NetGraph instance if experiment description was automatically +generated

+
+ +
+
+nthreads[source]¶
+

Returns the number of processing nthreads used

+
+ +
+
+persist[source]¶
+

If True, persists the ExperimentController to XML format upon +experiment completion

+
+ +
+
+plot(dirpath=None, format='figure', show=False)[source]¶
+
+ +
+
+provision(guid)[source]¶
+

Provisions the resource associated to the RM with guid ‘guid’.

+

Provisioning means making a resource ‘accessible’ to the user. +Not all RM types require (or are capable of) performing resource +provisioning. For the RM types which are not capable of doing so, +invoking this method does not have any consequences.

+
+
+++ + + + + + +
param guid:Guid of the RM
type guid:int
+
+
+ +
+
+register_condition(guids1, action, guids2, state, time=None)[source]¶
+

Registers an action START, STOP or DEPLOY for all RM on list +guids1 to occur at time ‘time’ after all elements in list guids2 +have reached state ‘state’.

+
+
+++ + + + + + + + + + + + + + + + + + + + + + +
param guids1:List of guids of RMs subjected to action
type guids1:list
param action:Action to perform (either START, STOP or DEPLOY)
type action:ResourceAction
param guids2:List of guids of RMs to we waited for
type guids2:list
param state:State to wait for on RMs of list guids2 (STARTED, +STOPPED, etc)
type state:ResourceState
param time:Time to wait after guids2 has reached status
type time:string
+
+
+ +
+
+register_connection(guid1, guid2)[source]¶
+

Registers a connection between a RM with guid ‘guid1’ +and another RM with guid ‘guid2’.

+

The order of the in which the two guids are provided is not +important, since the connection relationship is symmetric.

+
+
+++ + + + + + + + + + +
param guid1:First guid to connect
type guid1:ResourceManager
param guid2:Second guid to connect
type guid:ResourceManager
+
+
+ +
+
+register_resource(rtype, guid=None)[source]¶
+

Registers a new ResourceManager of type ‘rtype’ in the experiment

+

This method will assign a new ‘guid’ for the RM, if no guid +is specified.

+
+
+++ + + + + + + + + + +
param rtype:Type of the RM
type rtype:str
return:Guid of the RM
rtype:int
+
+
+ +
+
+release(guids=None)[source]¶
+

Releases all ResourceManagers in the guids list.

+

If the argument ‘guids’ is not given, all RMs registered +in the experiment are released.

+
+
+++ + + + + + +
param guids:List of RM guids
type guids:list
+
+
+ +
+
+remove_resource(guid)[source]¶
+
+ +
+
+resources[source]¶
+

Returns the guids of all ResourceManagers

+ +++ + + + + + +
Returns:Set of all RM guids
Return type:list
+
+ +
+
+run_dir[source]¶
+

Local directory to store results and other files related to the +experiment run.

+
+ +
+
+run_id[source]¶
+

Returns the experiment instance (run) identifier (automatically +generated)

+
+ +
+
+save(dirpath=None, format='xml')[source]¶
+
+ +
+
+schedule(date, callback, track=False)[source]¶
+

Schedules a callback to be executed at time ‘date’.

+ +++ + + + +
Parameters:
    +
  • date – string containing execution time for the task. +It can be expressed as an absolute time, using +timestamp format, or as a relative time matching +^d+.d+(h|m|s|ms|us)$
  • +
  • callback – code to be executed for the task. Must be a +Python function, and receives args and kwargs +as arguments.
  • +
  • track – if set to True, the task will be retrievable with +the get_task() method
  • +
+
+

:return : The Id of the task +:rtype: int

+
+ +
+
+serialize(format='xml')[source]¶
+
+ +
+
+set(guid, name, value)[source]¶
+

Modifies the value of the attribute with name ‘name’ on the +RM with guid ‘guid’.

+
+
+++ + + + + + + + + + + + +
param guid:Guid of the RM
type guid:int
param name:Name of the attribute
type name:str
param value:Value of the attribute
+
+
+ +
+
+set_global(rtype, name, value)[source]¶
+

Modifies the value of the global attribute with name ‘name’ on the +RMs of with rtype ‘rtype’.

+
+
+++ + + + + + + + + + + + +
param guid:Guid of the RM
type guid:int
param name:Name of the attribute
type name:str
param value:Value of the attribute
+
+
+ +
+
+set_with_conditions(name, value, guids1, guids2, state, time=None)[source]¶
+

Modifies the value of attribute with name ‘name’ on all RMs +on the guids1 list when time ‘time’ has elapsed since all +elements in guids2 list have reached state ‘state’.

+
+
+++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
param name:Name of attribute to set in RM
type name:string
param value:Value of attribute to set in RM
type name:string
param guids1:List of guids of RMs subjected to action
type guids1:list
param action:Action to register (either START or STOP)
type action:ResourceAction
param guids2:List of guids of RMs to we waited for
type guids2:list
param state:State to wait for on RMs (STARTED, STOPPED, etc)
type state:ResourceState
param time:Time to wait after guids2 has reached status
type time:string
+
+
+ +
+
+shutdown()[source]¶
+

Releases all resources and stops the ExperimentController

+
+ +
+
+start(guid)[source]¶
+

Starts the RM with guid ‘guid’

+

Starting a RM means that the resource it controls will +begin taking part of the experiment.

+
+
+++ + + + + + +
param guid:Guid of the RM
type guid:int
+
+
+ +
+
+state(guid, hr=False)[source]¶
+

Returns the state of a resource

+ +++ + + + +
Parameters:
    +
  • guid (integer) – Resource guid
  • +
  • hr (boolean) – Human readable. Forces return of a +status string instead of a number
  • +
+
+
+ +
+
+stop(guid)[source]¶
+

Stops the RM with guid ‘guid’

+

Stopping a RM means that the resource it controls will +no longer take part of the experiment.

+
+
+++ + + + + + +
param guid:Guid of the RM
type guid:int
+
+
+ +
+
+trace(guid, name, attr='all', block=512, offset=0)[source]¶
+

Returns information on a collected trace, the trace stream or +blocks (chunks) of the trace stream

+
+
+++ + + + + + + + + + + + + + + + + + + + +
param name:

Name of the trace

+
type name:

str

+
param attr:

Can be one of: +- TraceAttr.ALL (complete trace content), +- TraceAttr.STREAM (block in bytes to read starting

+
+

at offset),

+
+
    +
  • TraceAttr.PATH (full path to the trace file),
  • +
  • TraceAttr.SIZE (size of trace file).
  • +
+
type attr:

str

+
param block:

Number of bytes to retrieve from trace, when attr is +TraceAttr.STREAM

+
type name:

int

+
param offset:

Number of ‘blocks’ to skip, when attr is TraceAttr.STREAM

+
type name:

int

+
rtype:

str

+
+
+
+ +
+
+trace_enabled(guid, name)[source]¶
+

Returns True if the trace of name ‘name’ is enabled

+ +++ + + + +
Parameters:name (str) – Name of the trace
+
+ +
+
+wait(guids, state, quit)[source]¶
+

Blocking method that waits until all RMs in the ‘guids’ list +have reached a state >= ‘state’, or until the ‘quit’ callback +yields True

+
+
+++ + + + + + +
param guids:List of guids
type guids:list
+
+
+ +
+
+wait_deployed(guids)[source]¶
+

Blocking method that waits until all RMs in the ‘guids’ list +have reached a state >= READY, or until a failure in the +experiment occurs (i.e. abort == True)

+
+
+++ + + + + + +
param guids:List of guids
type guids:list
+
+
+ +
+
+wait_finished(guids)[source]¶
+

Blocking method that waits until all RMs in the ‘guids’ list +have reached a state >= STOPPED (i.e. STOPPED, FAILED or +RELEASED ), or until a failure in the experiment occurs +(i.e. abort == True)

+
+
+++ + + + + + +
param guids:List of guids
type guids:list
+
+
+ +
+
+wait_released(guids)[source]¶
+

Blocking method that waits until all RMs in the ‘guids’ list +have reached a state == RELEASED, or until the EC fails

+
+
+++ + + + + + +
param guids:List of guids
type guids:list
+
+
+ +
+
+wait_started(guids)[source]¶
+

Blocking method that waits until all RMs in the ‘guids’ list +have reached a state >= STARTED, or until a failure in the +experiment occurs (i.e. abort == True)

+
+
+++ + + + + + +
param guids:List of guids
type guids:list
+
+
+ +
+ +
+
+class nepi.execution.ec.FailureLevel[source]¶
+

Bases: object

+

Possible failure states for the experiment

+
+
+EC_FAILURE = 3¶
+
+ +
+
+OK = 1¶
+
+ +
+
+RM_FAILURE = 2¶
+
+ +
+ +
+
+class nepi.execution.ec.FailureManager[source]¶
+

Bases: object

+

The FailureManager is responsible for handling errors +and deciding whether an experiment should be aborted or not

+
+
+abort[source]¶
+
+ +
+
+ec[source]¶
+

Returns the ExperimentController associated to this FailureManager

+
+ +
+
+eval_failure(guid)[source]¶
+

Implements failure policy and sets the abort state of the +experiment based on the failure state and criticality of +the RM

+ +++ + + + +
Parameters:guid (int) – Guid of the RM upon which the failure of the experiment +is evaluated
+
+ +
+
+set_ec(ec)[source]¶
+
+ +
+
+set_ec_failure()[source]¶
+
+ +
+ +
+
+

nepi.execution.resource module¶

+
+
+class nepi.execution.resource.ResourceAction[source]¶
+

Action that a user can order to a Resource Manager

+
+
+DEPLOY = 0¶
+
+ +
+
+START = 1¶
+
+ +
+
+STOP = 2¶
+
+ +
+ +
+
+class nepi.execution.resource.ResourceFactory[source]¶
+

Bases: object

+
+
+classmethod create(rtype, ec, guid)[source]¶
+

Create a new instance of a Ressource Manager

+
+ +
+
+classmethod get_resource_type(rtype)[source]¶
+

Return the type of the Class

+
+ +
+
+classmethod register_type(rclass)[source]¶
+

Register a new Ressource Manager

+
+ +
+
+classmethod resource_types()[source]¶
+

Return the type of the Class

+
+ +
+ +
+
+class nepi.execution.resource.ResourceManager(ec, guid)[source]¶
+

Bases: nepi.util.logger.Logger

+

Base clase for all ResourceManagers.

+

A ResourceManger is specific to a resource type (e.g. Node, +Switch, Application, etc) on a specific platform (e.g. PlanetLab, +OMF, etc).

+

The ResourceManager instances are responsible for interacting with +and controlling concrete (physical or virtual) resources in the +experimental platforms.

+
+
+conditions[source]¶
+

Returns the conditions to which the RM is subjected to.

+

This method returns a dictionary of conditions lists indexed by +a ResourceAction.

+
+ +
+
+configure(*args, **kwargs)[source]¶
+
+ +
+
+connections[source]¶
+

Returns the set of guids of connected RMs

+
+ +
+
+deploy(*args, **kwargs)[source]¶
+
+ +
+
+deploy_with_conditions()[source]¶
+

Deploy RM when all the conditions in self.conditions for +action ‘READY’ are satisfied.

+
+ +
+
+discover(*args, **kwargs)[source]¶
+
+ +
+
+discover_time[source]¶
+

Returns the discover time of the RM as a timestamp

+
+ +
+
+do_configure()[source]¶
+
+ +
+
+do_connect(guid)[source]¶
+

Performs actions that need to be taken upon associating RMs. +This method should be redefined when necessary in child classes.

+
+ +
+
+do_deploy()[source]¶
+
+ +
+
+do_disconnect(guid)[source]¶
+

Performs actions that need to be taken upon disassociating RMs. +This method should be redefined when necessary in child classes.

+
+ +
+
+do_discover()[source]¶
+
+ +
+
+do_fail()[source]¶
+
+ +
+
+do_provision()[source]¶
+
+ +
+
+do_release()[source]¶
+
+ +
+
+do_reserve()[source]¶
+
+ +
+
+do_start()[source]¶
+
+ +
+
+do_stop()[source]¶
+
+ +
+
+ec[source]¶
+

Returns the Experiment Controller of the RM

+
+ +
+
+enable_trace(name)[source]¶
+

Explicitly enable trace generation

+ +++ + + + +
Parameters:name (str) – Name of the trace
+
+ +
+
+fail()[source]¶
+

Sets the RM to state FAILED.

+

This method should not be overridden directly. Specific functionality +should be added in the do_fail method.

+
+ +
+
+failed_time[source]¶
+

Returns the time failure occurred for the RM as a timestamp

+
+ +
+
+get(name)[source]¶
+

Returns the value of the attribute

+ +++ + + + + + +
Parameters:name (str) – Name of the attribute
Return type:str
+
+ +
+
+classmethod get_attribute(name)[source]¶
+

Returns a copy of the attribute with name ‘name’

+
+ +
+
+classmethod get_attributes()[source]¶
+

Returns a copy of the attributes

+
+ +
+
+get_connected(rtype=None)[source]¶
+

Returns the list of RM with the type ‘rtype’

+ +++ + + + + + +
Parameters:rtype (str) – Type of the RM we look for
Returns:list of guid
+
+ +
+
+classmethod get_global(name)[source]¶
+
+
Returns the value of a global attribute
+
Global attribute meaning an attribute for +all the resources from a rtype
+
+ +++ + + + + + +
Parameters:name (str) – Name of the attribute
Return type:str
+
+ +
+
+classmethod get_help()[source]¶
+

Returns the description of the type of Resource

+
+ +
+
+classmethod get_platform()[source]¶
+

Returns the identified of the platform (i.e. testbed type) +for the Resource

+
+ +
+
+classmethod get_rtype()[source]¶
+

Returns the type of the Resource Manager

+
+ +
+
+classmethod get_traces()[source]¶
+

Returns a copy of the traces

+
+ +
+
+guid[source]¶
+

Returns the global unique identifier of the RM

+
+ +
+
+has_attribute(name)[source]¶
+

Returns true if the RM has an attribute with name

+ +++ + + + +
Parameters:name (string) – name of the attribute
+
+ +
+
+has_changed(name)[source]¶
+
+
Returns the True is the value of the attribute
+
has been modified by the user.
+
+ +++ + + + + + +
Parameters:name (str) – Name of the attribute
Return type:str
+
+ +
+
+has_flag(name, flag)[source]¶
+

Returns true if the attribute has the flag ‘flag’

+ +++ + + + +
Parameters:flag (Flags) – Flag to be checked
+
+ +
+
+is_rm_instance(rtype)[source]¶
+

Returns True if the RM is instance of ‘rtype’

+ +++ + + + + + +
Parameters:rtype (str) – Type of the RM we look for
Returns:True|False
+
+ +
+
+log_message(msg)[source]¶
+

Returns the log message formatted with added information.

+ +++ + + + + + +
Parameters:msg (str) – text message
Return type:str
+
+ +
+
+provision(*args, **kwargs)[source]¶
+
+ +
+
+provision_time[source]¶
+

Returns the provision time of the RM as a timestamp

+
+ +
+
+ready_time[source]¶
+

Returns the deployment time of the RM as a timestamp

+
+ +
+
+register_condition(action, group, state, time=None)[source]¶
+

Registers a condition on the resource manager to allow execution +of ‘action’ only after ‘time’ has elapsed from the moment all resources +in ‘group’ reached state ‘state’

+ +++ + + + +
Parameters:
    +
  • action (str) – Action to restrict to condition (either ‘START’ or ‘STOP’)
  • +
  • group (int or list of int) – Group of RMs to wait for (list of guids)
  • +
  • state (str) – State to wait for on all RM in group. (either ‘STARTED’, ‘STOPPED’ or ‘READY’)
  • +
  • time (str) – Time to wait after ‘state’ is reached on all RMs in group. (e.g. ‘2s’)
  • +
+
+
+ +
+
+register_connection(guid)[source]¶
+

Registers a connection to the RM identified by guid

+

This method should not be overridden. Specific functionality +should be added in the do_connect method.

+ +++ + + + +
Parameters:guid (int) – Global unique identified of the RM to connect to
+
+ +
+
+release()[source]¶
+

Perform actions to free resources used by the RM.

+

This method is responsible for releasing resources that were +used during the experiment by the RM.

+

This method should not be overridden directly. Specific functionality +should be added in the do_release method.

+
+ +
+
+release_time[source]¶
+

Returns the release time of the RM as a timestamp

+
+ +
+
+reschedule_delay[source]¶
+

Returns default reschedule delay

+
+ +
+
+reserve(*args, **kwargs)[source]¶
+
+ +
+
+reserved_time[source]¶
+

Returns the reserved time of the RM as a timestamp

+
+ +
+
+set(name, value)[source]¶
+

Set the value of the attribute

+ +++ + + + +
Parameters:
    +
  • name (str) – Name of the attribute
  • +
  • name – Value of the attribute
  • +
+
+
+ +
+
+set_discovered(time=None)[source]¶
+

Mark ResourceManager as DISCOVERED

+
+ +
+
+set_failed(time=None)[source]¶
+

Mark ResourceManager as FAILED

+
+ +
+
+classmethod set_global(name, value)[source]¶
+

Set value for a global attribute

+ +++ + + + +
Parameters:
    +
  • name (str) – Name of the attribute
  • +
  • name – Value of the attribute
  • +
+
+
+ +
+
+set_provisioned(time=None)[source]¶
+

Mark ResourceManager as PROVISIONED

+
+ +
+
+set_ready(time=None)[source]¶
+

Mark ResourceManager as READY

+
+ +
+
+set_released(time=None)[source]¶
+

Mark ResourceManager as REALEASED

+
+ +
+
+set_reserved(time=None)[source]¶
+

Mark ResourceManager as RESERVED

+
+ +
+
+set_started(time=None)[source]¶
+

Mark ResourceManager as STARTED

+
+ +
+
+set_state(state, state_time_attr, time=None)[source]¶
+

Set the state of the RM while keeping a trace of the time

+
+ +
+
+set_state_time(state, state_time_attr, time)[source]¶
+

Set the time for the RM state change

+
+ +
+
+set_stopped(time=None)[source]¶
+

Mark ResourceManager as STOPPED

+
+ +
+
+set_with_conditions(name, value, group, state, time)[source]¶
+

Set value ‘value’ on attribute with name ‘name’ when ‘time’ +has elapsed since all elements in ‘group’ have reached state +‘state’

+ +++ + + + +
Parameters:
    +
  • name (str) – Name of the attribute to set
  • +
  • name – Value of the attribute to set
  • +
  • group (int or list of int) – Group of RMs to wait for (list of guids)
  • +
  • state (str) – State to wait for on all RM in group. (either ‘STARTED’, ‘STOPPED’ or ‘READY’)
  • +
  • time (str) – Time to wait after ‘state’ is reached on all RMs in group. (e.g. ‘2s’)
  • +
+
+
+ +
+
+start(*args, **kwargs)[source]¶
+
+ +
+
+start_time[source]¶
+

Returns the start time of the RM as a timestamp

+
+ +
+
+start_with_conditions()[source]¶
+

Starts RM when all the conditions in self.conditions for +action ‘START’ are satisfied.

+
+ +
+
+state[source]¶
+

Get the current state of the RM

+
+ +
+
+stop(*args, **kwargs)[source]¶
+
+ +
+
+stop_time[source]¶
+

Returns the stop time of the RM as a timestamp

+
+ +
+
+stop_with_conditions()[source]¶
+

Stops RM when all the conditions in self.conditions for +action ‘STOP’ are satisfied.

+
+ +
+
+trace(name, attr='all', block=512, offset=0)[source]¶
+

Get information on collected trace

+ +++ + + + + + +
Parameters:
    +
  • name (int) – Name of the trace
  • +
  • attr (str) – Can be one of: +- TraceAttr.ALL (complete trace content), +- TraceAttr.STREAM (block in bytes to read starting at offset), +- TraceAttr.PATH (full path to the trace file), +- TraceAttr.SIZE (size of trace file).
  • +
  • block – Number of bytes to retrieve from trace, when attr is TraceAttr.STREAM
  • +
  • offset – Number of ‘blocks’ to skip, when attr is TraceAttr.STREAM
  • +
+
Return type:

str

+
+
+ +
+
+trace_enabled(name)[source]¶
+

Returns True if trace is enables

+ +++ + + + +
Parameters:name (str) – Name of the trace
+
+ +
+
+unregister_condition(group, action=None)[source]¶
+

Removed conditions for a certain group of guids

+ +++ + + + +
Parameters:
    +
  • action (str) – Action to restrict to condition (either ‘START’, ‘STOP’ or ‘READY’)
  • +
  • group (int or list of int) – Group of RMs to wait for (list of guids)
  • +
+
+
+ +
+
+unregister_connection(guid)[source]¶
+

Removes a registered connection to the RM identified by guid

+

This method should not be overridden. Specific functionality +should be added in the do_disconnect method.

+ +++ + + + +
Parameters:guid (int) – Global unique identified of the RM to connect to
+
+ +
+
+valid_connection(guid)[source]¶
+

Checks whether a connection with the other RM +is valid. +This method need to be redefined by each new Resource Manager.

+ +++ + + + + + +
Parameters:guid (int) – Guid of the current Resource Manager
Return type:Boolean
+
+ +
+ +
+
+class nepi.execution.resource.ResourceState[source]¶
+

State of a Resource Manager

+
+
+DISCOVERED = 1¶
+
+ +
+
+FAILED = 7¶
+
+ +
+
+NEW = 0¶
+
+ +
+
+PROVISIONED = 3¶
+
+ +
+
+READY = 4¶
+
+ +
+
+RELEASED = 8¶
+
+ +
+
+RESERVED = 2¶
+
+ +
+
+STARTED = 5¶
+
+ +
+
+STOPPED = 6¶
+
+ +
+ +
+
+nepi.execution.resource.clsinit(cls)[source]¶
+

Initializes template information (i.e. attributes and traces) +on classes derived from the ResourceManager class.

+

It is used as a decorator in the class declaration as follows:

+
+

@clsinit +class MyResourceManager(ResourceManager):

+
+
...
+
+
+ +
+
+nepi.execution.resource.clsinit_copy(cls)[source]¶
+

Initializes template information (i.e. attributes and traces) +on classes derived from the ResourceManager class. +It differs from the clsinit method in that it forces inheritance +of attributes and traces from the parent class.

+

It is used as a decorator in the class declaration as follows:

+
+

@clsinit +class MyResourceManager(ResourceManager):

+
+
...
+
+

clsinit_copy should be prefered to clsinit when creating new +ResourceManager child classes.

+
+ +
+
+nepi.execution.resource.failtrap(func)[source]¶
+

Decorator function for instance methods that should set the +RM state to FAILED when an error is raised. The methods that must be +decorated are: discover, reserved, provision, deploy, start, stop.

+
+ +
+
+nepi.execution.resource.find_types()[source]¶
+

Look into the different folders to find all the +availables Resources Managers

+
+ +
+
+nepi.execution.resource.populate_factory()[source]¶
+

Find and rgister all available RMs

+
+ +
+
+

nepi.execution.runner module¶

+
+
+class nepi.execution.runner.ExperimentRunner[source]¶
+

Bases: object

+

The ExperimentRunner entity is responsible of +re-running an experiment described by an ExperimentController +multiple time

+
+
+evaluate_normal_convergence(ec, run, metrics)[source]¶
+

Returns True when the confidence interval of the sample mean is +less than 5% of the mean value, for a 95% confidence level, +assuming normal distribution of the data

+
+ +
+
+run(ec, min_runs=1, max_runs=-1, wait_time=0, wait_guids=[], compute_metric_callback=None, evaluate_convergence_callback=None)[source]¶
+

Run a same experiment independently multiple times, until the +evaluate_convergence_callback function returns True

+ +++ + + + +
Parameters:
    +
  • ec (ExperimentController) – Description of experiment to replicate. +The runner takes care of deploying the EC, so ec.deploy() +must not be invoked directly before or after invoking +runner.run().
  • +
  • min_runs (int) – Minimum number of times the experiment must be +replicated
  • +
  • max_runs (int) – Maximum number of times the experiment can be +replicated
  • +
  • wait_time (float) – Time to wait in seconds on each run between invoking +ec.deploy() and ec.release().
  • +
  • wait_guids (list) – List of guids wait for finalization on each run. +This list is passed to ec.wait_finished()
  • +
  • compute_metric_callback (function) –

    User defined function invoked after +each experiment run to compute a metric. The metric is usually +a network measurement obtained from the data collected +during experiment execution. +The function is invoked passing the ec and the run number as arguments. +It must return the value for the computed metric(s) (usually a single +numerical value, but it can be several).

    +
    +
    metric = compute_metric_callback(ec, run)
    +
  • +
  • evaluate_convergence_callback (function) –

    User defined function invoked after +computing the metric on each run, to evaluate the experiment was +run enough times. It takes the list of cumulated metrics produced by +the compute_metric_callback up to the current run, and decided +whether the metrics have statistically converged to a meaningful value +or not. It must return either True or False.

    +
    +
    stop = evaluate_convergence_callback(ec, run, metrics)
    +

    If stop is True, then the runner will exit.

    +
  • +
+
+
+ +
+
+run_experiment(filepath, wait_time, wait_guids)[source]¶
+

Run an experiment based on the description stored +in filepath.

+
+ +
+ +
+
+

nepi.execution.scheduler module¶

+
+
+class nepi.execution.scheduler.HeapScheduler[source]¶
+

Bases: object

+

Create a Heap Scheduler

+
+

Note

+

This class is thread safe. +All calls to C Extensions are made atomic by the GIL in the CPython implementation. +heapq.heappush, heapq.heappop, and list access are therefore thread-safe.

+
+
+
+next()[source]¶
+

Get the next task in the queue by timestamp and arrival order

+
+ +
+
+pending[source]¶
+

Returns the list of pending task ids

+
+ +
+
+remove(tid)[source]¶
+

Remove a task form the queue

+ +++ + + + +
Parameters:tid (int) – Id of the task to be removed
+
+ +
+
+schedule(task)[source]¶
+

Add a task to the queue ordered by task.timestamp and arrival order

+ +++ + + + +
Parameters:task (task) – task to schedule
+
+ +
+ +
+
+class nepi.execution.scheduler.Task(timestamp, callback)[source]¶
+

Bases: object

+

A Task represents an operation to be executed by the +ExperimentController scheduler

+
+ +
+
+class nepi.execution.scheduler.TaskStatus[source]¶
+

Execution state of the Task

+
+
+DONE = 1¶
+
+ +
+
+ERROR = 2¶
+
+ +
+
+NEW = 0¶
+
+ +
+ +
+
+

nepi.execution.tags module¶

+
+
+

nepi.execution.trace module¶

+
+
+class nepi.execution.trace.Trace(name, help, enabled=False)[source]¶
+

Bases: object

+

A Trace represents information about a Resource that can +be collected

+
+
+help[source]¶
+

Returns the help of the trace

+
+ +
+
+name[source]¶
+

Returns the name of the trace

+
+ +
+ +
+
+class nepi.execution.trace.TraceAttr[source]¶
+

A Trace attribute defines information about a Trace that can +be queried

+
+
+ALL = 'all'¶
+
+ +
+
+PATH = 'path'¶
+
+ +
+
+SIZE = 'size'¶
+
+ +
+
+STREAM = 'stream'¶
+
+ +
+ +
+
+

Module contents¶

+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_layout/nepi.html b/doc/sphinx/_build/html/_layout/nepi.html new file mode 100644 index 00000000..a68ddb6f --- /dev/null +++ b/doc/sphinx/_build/html/_layout/nepi.html @@ -0,0 +1,483 @@ + + + + + + + + nepi package — NEPI 3.0 documentation + + + + + + + + + + + + +
+
+

Table Of Contents

+ + +

This Page

+ + + +
+
+ +
+
+
+
+ +
+

nepi package¶

+
+

Subpackages¶

+
+ +
+
+
+

Module contents¶

+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_layout/nepi.resources.all.html b/doc/sphinx/_build/html/_layout/nepi.resources.all.html new file mode 100644 index 00000000..ec59dd76 --- /dev/null +++ b/doc/sphinx/_build/html/_layout/nepi.resources.all.html @@ -0,0 +1,165 @@ + + + + + + + + nepi.resources.all package — NEPI 3.0 documentation + + + + + + + + + + + + +
+
+

Table Of Contents

+ + +

This Page

+ + + +
+
+ +
+
+
+
+ +
+

nepi.resources.all package¶

+
+

Submodules¶

+
+
+

nepi.resources.all.collector module¶

+
+
+class nepi.resources.all.collector.Collector(ec, guid)[source]¶
+

Bases: nepi.execution.resource.ResourceManager

+

The collector entity is reponsible of collecting traces +of a same type associated to RMs into a local directory.

+
+
+Class Args :
+
+++ + + + +
Parameters:
    +
  • ec (ExperimentController) – The Experiment controller
  • +
  • guid (int) – guid of the RM
  • +
+
+
+ +
+
+do_deploy()[source]¶
+
+ +
+
+do_provision()[source]¶
+
+ +
+
+do_release()[source]¶
+
+ +
+
+store_path[source]¶
+
+ +
+
+valid_connection(guid)[source]¶
+
+ +
+ +
+
+

Module contents¶

+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_layout/nepi.resources.html b/doc/sphinx/_build/html/_layout/nepi.resources.html new file mode 100644 index 00000000..c7c70527 --- /dev/null +++ b/doc/sphinx/_build/html/_layout/nepi.resources.html @@ -0,0 +1,409 @@ + + + + + + + + nepi.resources package — NEPI 3.0 documentation + + + + + + + + + + + + +
+
+

Table Of Contents

+ + +

This Page

+ + + +
+
+ +
+
+
+
+ +
+

nepi.resources package¶

+
+

Subpackages¶

+
+ +
+
+
+

Module contents¶

+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_layout/nepi.resources.linux.ccn.html b/doc/sphinx/_build/html/_layout/nepi.resources.linux.ccn.html new file mode 100644 index 00000000..82f66eeb --- /dev/null +++ b/doc/sphinx/_build/html/_layout/nepi.resources.linux.ccn.html @@ -0,0 +1,446 @@ + + + + + + + + nepi.resources.linux.ccn package — NEPI 3.0 documentation + + + + + + + + + + + + + + +
+
+
+
+ +
+

nepi.resources.linux.ccn package¶

+
+

Submodules¶

+
+
+

nepi.resources.linux.ccn.ccnapplication module¶

+
+
+class nepi.resources.linux.ccn.ccnapplication.LinuxCCNApplication(ec, guid)[source]¶
+

Bases: nepi.resources.linux.application.LinuxApplication

+
+
+ccnd[source]¶
+
+ +
+
+do_deploy()[source]¶
+
+ +
+
+node[source]¶
+
+ +
+
+valid_connection(guid)[source]¶
+
+ +
+ +
+
+

nepi.resources.linux.ccn.ccncat module¶

+
+
+class nepi.resources.linux.ccn.ccncat.LinuxCCNCat(ec, guid)[source]¶
+

Bases: nepi.resources.linux.ccn.ccnapplication.LinuxCCNApplication

+
+
+do_deploy()[source]¶
+
+ +
+
+valid_connection(guid)[source]¶
+
+ +
+ +
+
+

nepi.resources.linux.ccn.ccncontent module¶

+
+
+class nepi.resources.linux.ccn.ccncontent.LinuxCCNContent(ec, guid)[source]¶
+

Bases: nepi.resources.linux.application.LinuxApplication

+
+
+ccnd[source]¶
+
+ +
+
+ccnr[source]¶
+
+ +
+
+do_deploy()[source]¶
+
+ +
+
+do_start()[source]¶
+
+ +
+
+node[source]¶
+
+ +
+
+upload_start_command()[source]¶
+
+ +
+
+valid_connection(guid)[source]¶
+
+ +
+ +
+
+

nepi.resources.linux.ccn.ccnd module¶

+
+
+class nepi.resources.linux.ccn.ccnd.LinuxCCND(ec, guid)[source]¶
+

Bases: nepi.resources.linux.application.LinuxApplication

+
+
+do_deploy()[source]¶
+
+ +
+
+do_start()[source]¶
+
+ +
+
+do_stop()[source]¶
+
+ +
+
+path[source]¶
+
+ +
+
+state[source]¶
+
+ +
+
+upload_start_command()[source]¶
+
+ +
+
+valid_connection(guid)[source]¶
+
+ +
+
+version[source]¶
+
+ +
+ +
+
+

nepi.resources.linux.ccn.ccnpeek module¶

+
+
+class nepi.resources.linux.ccn.ccnpeek.LinuxCCNPeek(ec, guid)[source]¶
+

Bases: nepi.resources.linux.ccn.ccnapplication.LinuxCCNApplication

+
+
+do_deploy()[source]¶
+
+ +
+
+valid_connection(guid)[source]¶
+
+ +
+ +
+
+

nepi.resources.linux.ccn.ccnping module¶

+
+
+class nepi.resources.linux.ccn.ccnping.LinuxCCNPing(ec, guid)[source]¶
+

Bases: nepi.resources.linux.ccn.ccnpingserver.LinuxCCNPingServer

+
+
+ccnpingserver[source]¶
+
+ +
+
+do_start()[source]¶
+
+ +
+
+valid_connection(guid)[source]¶
+
+ +
+ +
+
+

nepi.resources.linux.ccn.ccnpingserver module¶

+
+
+class nepi.resources.linux.ccn.ccnpingserver.LinuxCCNPingServer(ec, guid)[source]¶
+

Bases: nepi.resources.linux.ccn.ccnapplication.LinuxCCNApplication

+
+
+do_deploy()[source]¶
+
+ +
+
+valid_connection(guid)[source]¶
+
+ +
+ +
+
+

nepi.resources.linux.ccn.ccnpoke module¶

+
+
+class nepi.resources.linux.ccn.ccnpoke.LinuxCCNPoke(ec, guid)[source]¶
+

Bases: nepi.resources.linux.ccn.ccnapplication.LinuxCCNApplication

+
+
+do_deploy()[source]¶
+
+ +
+
+valid_connection(guid)[source]¶
+
+ +
+ +
+
+

nepi.resources.linux.ccn.ccnr module¶

+
+
+class nepi.resources.linux.ccn.ccnr.LinuxCCNR(ec, guid)[source]¶
+

Bases: nepi.resources.linux.application.LinuxApplication

+
+
+ccnd[source]¶
+
+ +
+
+do_deploy()[source]¶
+
+ +
+
+do_start()[source]¶
+
+ +
+
+node[source]¶
+
+ +
+
+upload_start_command()[source]¶
+
+ +
+
+valid_connection(guid)[source]¶
+
+ +
+ +
+
+

nepi.resources.linux.ccn.fibentry module¶

+
+
+class nepi.resources.linux.ccn.fibentry.LinuxFIBEntry(ec, guid)[source]¶
+

Bases: nepi.resources.linux.application.LinuxApplication

+
+
+ccnd[source]¶
+
+ +
+
+configure()[source]¶
+
+ +
+
+do_deploy()[source]¶
+
+ +
+
+do_start()[source]¶
+
+ +
+
+do_stop()[source]¶
+
+ +
+
+node[source]¶
+
+ +
+
+ping[source]¶
+
+ +
+
+trace(name, attr='all', block=512, offset=0)[source]¶
+
+ +
+
+traceroute[source]¶
+
+ +
+
+upload_start_command()[source]¶
+
+ +
+
+valid_connection(guid)[source]¶
+
+ +
+ +
+
+

Module contents¶

+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_layout/nepi.resources.linux.html b/doc/sphinx/_build/html/_layout/nepi.resources.linux.html new file mode 100644 index 00000000..08ed22a6 --- /dev/null +++ b/doc/sphinx/_build/html/_layout/nepi.resources.linux.html @@ -0,0 +1,1539 @@ + + + + + + + + nepi.resources.linux package — NEPI 3.0 documentation + + + + + + + + + + + + + + +
+
+
+
+ +
+

nepi.resources.linux package¶

+
+

Subpackages¶

+
+ +
+
+
+

Submodules¶

+
+
+

nepi.resources.linux.application module¶

+
+
+class nepi.resources.linux.application.LinuxApplication(ec, guid)[source]¶
+

Bases: nepi.execution.resource.ResourceManager

+
+
+Class Args :
+
+++ + + + +
Parameters:
    +
  • ec (ExperimentController) – The Experiment controller
  • +
  • guid (int) – guid of the RM
  • +
+
+
+ +
+

Note

+

A LinuxApplication RM represents a process that can be executed in +a remote Linux host using SSH.

+

The LinuxApplication RM takes care of uploadin sources and any files +needed to run the experiment, to the remote host. +It also allows to provide source compilation (build) and installation +instructions, and takes care of automating the sources build and +installation tasks for the user.

+

It is important to note that files uploaded to the remote host have +two possible scopes: single-experiment or multi-experiment. +Single experiment files are those that will not be re-used by other +experiments. Multi-experiment files are those that will. +Sources and shared files are always made available to all experiments.

+

Directory structure:

+

The directory structure used by LinuxApplication RM at the Linux +host is the following:

+
+
${HOME}/.nepi/nepi-usr –> Base directory for multi-experiment files
+
+

+
+
+
+

${LIB} |- /lib –> Base directory for libraries +${BIN} |- /bin –> Base directory for binary files +${SRC} |- /src –> Base directory for sources +${SHARE} |- /share –> Base directory for other files

+
+
${HOME}/.nepi/nepi-exp –> Base directory for single-experiment files
+
+

+
+
+
${EXP_HOME} |- /<exp-id> –> Base directory for experiment exp-id
+
+

+
+
+
${APP_HOME} |- /<app-guid> –> Base directory for application
+
+
specific files (e.g. command.sh, input)
+

+
+
+
+

${RUN_HOME} |- /<run-id> –> Base directory for run specific

+
+
+
+app_home[source]¶
+
+ +
+
+build(build=None)[source]¶
+
+ +
+
+do_deploy()[source]¶
+
+ +
+
+do_provision()[source]¶
+
+ +
+
+do_release()[source]¶
+
+ +
+
+do_start()[source]¶
+
+ +
+
+do_stop()[source]¶
+

Stops application execution

+
+ +
+
+execute_command(command, env=None, sudo=False, tty=False, forward_x11=False, blocking=False)[source]¶
+
+ +
+
+execute_deploy_command(command, prefix='deploy')[source]¶
+
+ +
+
+in_foreground[source]¶
+

Returns True if the command needs to be executed in foreground. +This means that command will be executed using ‘execute’ instead of +‘run’ (‘run’ executes a command in background and detached from the +terminal)

+

When using X11 forwarding option, the command can not run in background +and detached from a terminal, since we need to keep the terminal attached +to interact with it.

+
+ +
+
+install(install=None)[source]¶
+
+ +
+
+install_dependencies(depends=None)[source]¶
+
+ +
+
+log_message(msg)[source]¶
+
+ +
+
+node[source]¶
+
+ +
+
+pid[source]¶
+
+ +
+
+ppid[source]¶
+
+ +
+
+replace_paths(command, node=None, app_home=None, run_home=None)[source]¶
+

Replace all special path tags with shell-escaped actual paths.

+
+ +
+
+run_home[source]¶
+
+ +
+
+state[source]¶
+

Returns the state of the application

+
+ +
+
+trace(name, attr='all', block=512, offset=0)[source]¶
+
+ +
+
+trace_filepath(filename)[source]¶
+
+ +
+
+upload_binaries(bins=None)[source]¶
+
+ +
+
+upload_code(code=None)[source]¶
+
+ +
+
+upload_files(files=None)[source]¶
+
+ +
+
+upload_libraries(libs=None)[source]¶
+
+ +
+
+upload_sources(sources=None, src_dir=None)[source]¶
+
+ +
+
+upload_start_command(overwrite=False)[source]¶
+
+ +
+
+upload_stdin(stdin=None)[source]¶
+
+ +
+
+valid_connection(guid)[source]¶
+
+ +
+ +
+
+

nepi.resources.linux.channel module¶

+
+
+class nepi.resources.linux.channel.LinuxChannel(ec, guid)[source]¶
+

Bases: nepi.execution.resource.ResourceManager

+
+
+log_message(msg)[source]¶
+
+ +
+
+valid_connection(guid)[source]¶
+
+ +
+ +
+
+

nepi.resources.linux.debfuncs module¶

+
+
+nepi.resources.linux.debfuncs.install_packages_command(os, packages)[source]¶
+
+ +
+
+nepi.resources.linux.debfuncs.remove_packages_command(os, packages)[source]¶
+
+ +
+
+

nepi.resources.linux.gretunnel module¶

+
+
+class nepi.resources.linux.gretunnel.LinuxGRETunnel(ec, guid)[source]¶
+

Bases: nepi.resources.linux.tunnel.LinuxTunnel

+
+
+check_state_connection()[source]¶
+
+ +
+
+establish_connection(endpoint, remote_endpoint, data)[source]¶
+
+ +
+
+get_endpoints()[source]¶
+

Returns the list of RM that are endpoints to the tunnel

+
+ +
+
+initiate_connection(endpoint, remote_endpoint)[source]¶
+
+ +
+
+log_message(msg)[source]¶
+
+ +
+
+terminate_connection(endpoint, remote_endpoint)[source]¶
+
+ +
+
+valid_connection(guid)[source]¶
+
+ +
+
+verify_connection(endpoint, remote_endpoint)[source]¶
+
+ +
+ +
+
+

nepi.resources.linux.interface module¶

+
+
+class nepi.resources.linux.interface.LinuxInterface(ec, guid)[source]¶
+

Bases: nepi.execution.resource.ResourceManager

+
+
+add_set_hooks()[source]¶
+
+ +
+
+channel[source]¶
+
+ +
+
+do_deploy()[source]¶
+
+ +
+
+do_discover()[source]¶
+
+ +
+
+do_provision()[source]¶
+
+ +
+
+do_release()[source]¶
+
+ +
+
+load_configuration(devname, mac, ip4, mask4, ip6, mask6, mtu, up)[source]¶
+
+ +
+
+log_message(msg)[source]¶
+
+ +
+
+node[source]¶
+
+ +
+
+set_hook_mtu(oldval, newval)[source]¶
+
+ +
+
+set_hook_up(oldval, newval)[source]¶
+
+ +
+
+valid_connection(guid)[source]¶
+
+ +
+ +
+
+

nepi.resources.linux.mtr module¶

+
+
+class nepi.resources.linux.mtr.LinuxMtr(ec, guid)[source]¶
+

Bases: nepi.resources.linux.application.LinuxApplication

+
+
+do_deploy()[source]¶
+
+ +
+
+do_start()[source]¶
+
+ +
+
+upload_start_command()[source]¶
+
+ +
+
+valid_connection(guid)[source]¶
+
+ +
+ +
+
+

nepi.resources.linux.node module¶

+
+
+class nepi.resources.linux.node.ExitCode[source]¶
+

Error codes that the rexitcode function can return if unable to +check the exit code of a spawned process

+
+
+CORRUPTFILE = -2¶
+
+ +
+
+ERROR = -3¶
+
+ +
+
+FILENOTFOUND = -1¶
+
+ +
+
+OK = 0¶
+
+ +
+ +
+
+class nepi.resources.linux.node.LinuxNode(ec, guid)[source]¶
+

Bases: nepi.execution.resource.ResourceManager

+
+
+Class Args :
+
+++ + + + +
Parameters:
    +
  • ec (ExperimentController) – The Experiment controller
  • +
  • guid (int) – guid of the RM
  • +
+
+
+ +
+

Note

+

There are different ways in which commands can be executed using the +LinuxNode interface (i.e. ‘execute’ - blocking and non blocking, ‘run’, +‘run_and_wait’).

+

Brief explanation:

+
+
    +
  • ‘execute’ (blocking mode) :

    +
    +

    HOW IT WORKS: ‘execute’, forks a process and run the +command, synchronously, attached to the terminal, in +foreground. +The execute method will block until the command returns +the result on ‘out’, ‘err’ (so until it finishes executing).

    +

    USAGE: short-lived commands that must be executed attached +to a terminal and in foreground, for which it IS necessary +to block until the command has finished (e.g. if you want +to run ‘ls’ or ‘cat’).

    +
    +
  • +
  • ‘execute’ (NON blocking mode - blocking = False) :

    +
    +

    HOW IT WORKS: Same as before, except that execute method +will return immediately (even if command still running).

    +

    USAGE: long-lived commands that must be executed attached +to a terminal and in foreground, but for which it is not +necessary to block until the command has finished. (e.g. +start an application using X11 forwarding)

    +
    +
  • +
+
+
    +
  • ‘run’ :

    +
    +

    HOW IT WORKS: Connects to the host ( using SSH if remote) +and launches the command in background, detached from any +terminal (daemonized), and returns. The command continues to +run remotely, but since it is detached from the terminal, +its pipes (stdin, stdout, stderr) can’t be redirected to the +console (as normal non detached processes would), and so they +are explicitly redirected to files. The pidfile is created as +part of the process of launching the command. The pidfile +holds the pid and ppid of the process forked in background, +so later on it is possible to check whether the command is still +running.

    +
    +

    USAGE: long-lived commands that can run detached in background, +for which it is NOT necessary to block (wait) until the command +has finished. (e.g. start an application that is not using X11 +forwarding. It can run detached and remotely in background)

    +
    +
    +
  • +
  • ‘run_and_wait’ :

    +
    +

    HOW IT WORKS: Similar to ‘run’ except that it ‘blocks’ until +the command has finished execution. It also checks whether +errors occurred during runtime by reading the exitcode file, +which contains the exit code of the command that was run +(checking stderr only is not always reliable since many +commands throw debugging info to stderr and the only way to +automatically know whether an error really happened is to +check the process exit code).

    +

    Another difference with respect to ‘run’, is that instead +of directly executing the command as a bash command line, +it uploads the command to a bash script and runs the script. +This allows to use the bash script to debug errors, since +it remains at the remote host and can be run manually to +reproduce the error.

    +

    USAGE: medium-lived commands that can run detached in +background, for which it IS necessary to block (wait) until +the command has finished. (e.g. Package installation, +source compilation, file download, etc)

    +
    +
  • +
+
+
+
+
+
+bin_dir[source]¶
+
+ +
+
+check_errors(home, ecodefile='exitcode', stderr='stderr')[source]¶
+

Checks whether errors occurred while running a command. +It first checks the exit code for the command, and only if the +exit code is an error one it returns the error output.

+
+ +
+
+check_output(home, filename)[source]¶
+

Retrives content of file

+
+ +
+
+clean_experiment()[source]¶
+

Cleans all experiment related files in the Linux host. +It preserves NEPI files and folders that have a multi experiment +scope.

+
+ +
+
+clean_home()[source]¶
+

Cleans all NEPI related folders in the Linux host

+
+ +
+
+clean_processes()[source]¶
+
+ +
+
+copy(src, dst)[source]¶
+
+ +
+
+do_deploy()[source]¶
+
+ +
+
+do_provision()[source]¶
+
+ +
+
+do_release()[source]¶
+
+ +
+
+download(src, dst, raise_on_error=True)[source]¶
+
+ +
+
+execute(command, sudo=False, env=None, tty=False, forward_x11=False, retry=3, connect_timeout=30, strict_host_checking=False, persistent=True, blocking=True, with_lock=False)[source]¶
+

Notice that this invocation will block until the +execution finishes. If this is not the desired behavior, +use ‘run’ instead.

+
+ +
+
+exitcode(home, ecodefile='exitcode')[source]¶
+

Get the exit code of an application. +Returns an integer value with the exit code

+
+ +
+
+exp_dir[source]¶
+
+ +
+
+exp_home[source]¶
+
+ +
+
+filter_existing_files(src, dst)[source]¶
+

Removes files that already exist in the Linux host from src list

+
+ +
+
+find_home()[source]¶
+

Retrieves host home directory

+
+ +
+
+format_environment(env, inline=False)[source]¶
+
+
Formats the environment variables for a command to be executed
+
+
either as an inline command +(i.e. export PYTHONPATH=src/..; export LALAL= ..;python script.py) or +as a bash script (i.e. export PYTHONPATH=src/..
+

export LALA=..

+
+
+

)

+
+ +
+
+get_os()[source]¶
+
+ +
+
+getpid(home, pidfile='pidfile')[source]¶
+
+ +
+
+home_dir[source]¶
+
+ +
+
+install_packages(packages, home, run_home=None, raise_on_error=True)[source]¶
+

Install packages in the Linux host.

+

‘home’ is the directory to upload the package installation script. +‘run_home’ is the directory from where to execute the script.

+
+ +
+
+install_packages_command(packages)[source]¶
+
+ +
+
+is_alive()[source]¶
+

Checks if host is responsive

+
+ +
+
+kill(pid, ppid, sudo=False)[source]¶
+
+ +
+
+lib_dir[source]¶
+
+ +
+
+localhost[source]¶
+
+ +
+
+log_message(msg)[source]¶
+
+ +
+
+mkdir(paths, clean=False)[source]¶
+

Paths is either a single remote directory path to create, +or a list of directories to create.

+
+ +
+
+nepi_home[source]¶
+
+ +
+
+node_home[source]¶
+
+ +
+
+os[source]¶
+
+ +
+
+remove_packages(packages, home, run_home=None, raise_on_error=True)[source]¶
+

Uninstall packages from the Linux host.

+

‘home’ is the directory to upload the package un-installation script. +‘run_home’ is the directory from where to execute the script.

+
+ +
+
+rmdir(paths)[source]¶
+

Paths is either a single remote directory path to delete, +or a list of directories to delete.

+
+ +
+
+run(command, home, create_home=False, pidfile='pidfile', stdin=None, stdout='stdout', stderr='stderr', sudo=False, tty=False, strict_host_checking=False)[source]¶
+
+ +
+
+run_and_wait(command, home, shfile='cmd.sh', env=None, overwrite=True, wait_run=True, pidfile='pidfile', ecodefile='exitcode', stdin=None, stdout='stdout', stderr='stderr', sudo=False, tty=False, raise_on_error=True)[source]¶
+

Uploads the ‘command’ to a bash script in the host. +Then runs the script detached in background in the host, and +busy-waites until the script finishes executing.

+
+ +
+
+run_home[source]¶
+
+ +
+
+share_dir[source]¶
+
+ +
+
+src_dir[source]¶
+
+ +
+
+status(pid, ppid)[source]¶
+
+ +
+
+upload(src, dst, text=False, overwrite=True, raise_on_error=True)[source]¶
+

Copy content to destination

+
+
src string with the content to copy. Can be:
+
    +
  • plain text
  • +
  • a string with the path to a local file
  • +
  • a string with a semi-colon separeted list of local files
  • +
  • a string with a local directory
  • +
+
+
dst string with destination path on the remote host (remote is
+
always self.host)
+
+

text src is text input, it must be stored into a temp file before +uploading

+
+ +
+
+upload_command(command, shfile='cmd.sh', ecodefile='exitcode', overwrite=True, env=None)[source]¶
+

Saves the command as a bash script file in the remote host, and +forces to save the exit code of the command execution to the ecodefile

+
+ +
+
+use_deb[source]¶
+
+ +
+
+use_rpm[source]¶
+
+ +
+
+usr_dir[source]¶
+
+ +
+
+valid_connection(guid)[source]¶
+
+ +
+
+wait_pid(home, pidfile='pidfile', raise_on_error=False)[source]¶
+

Waits until the pid file for the command is generated, +and returns the pid and ppid of the process

+
+ +
+
+wait_run(pid, ppid, trial=0)[source]¶
+

wait for a remote process to finish execution

+
+ +
+ +
+
+class nepi.resources.linux.node.OSType[source]¶
+

Supported flavors of Linux OS

+
+
+DEBIAN = 1¶
+
+ +
+
+FEDORA = 4¶
+
+ +
+
+FEDORA_12 = 20¶
+
+ +
+
+FEDORA_14 = 36¶
+
+ +
+
+FEDORA_8 = 12¶
+
+ +
+
+UBUNTU = 2¶
+
+ +
+ +
+
+

nepi.resources.linux.nping module¶

+
+
+class nepi.resources.linux.nping.LinuxNPing(ec, guid)[source]¶
+

Bases: nepi.resources.linux.application.LinuxApplication

+
+
+do_deploy()[source]¶
+
+ +
+
+valid_connection(guid)[source]¶
+
+ +
+ +
+
+

nepi.resources.linux.ping module¶

+
+
+class nepi.resources.linux.ping.LinuxPing(ec, guid)[source]¶
+

Bases: nepi.resources.linux.application.LinuxApplication

+
+
+do_deploy()[source]¶
+
+ +
+
+do_start()[source]¶
+
+ +
+
+upload_start_command()[source]¶
+
+ +
+
+valid_connection(guid)[source]¶
+
+ +
+ +
+
+

nepi.resources.linux.route module¶

+
+
+class nepi.resources.linux.route.LinuxRoute(ec, guid)[source]¶
+

Bases: nepi.resources.linux.application.LinuxApplication

+
+
+device[source]¶
+
+ +
+
+do_deploy()[source]¶
+
+ +
+
+do_start()[source]¶
+
+ +
+
+do_stop()[source]¶
+
+ +
+
+node[source]¶
+
+ +
+
+upload_sources()[source]¶
+
+ +
+
+upload_start_command()[source]¶
+
+ +
+ +
+
+

nepi.resources.linux.rpmfuncs module¶

+
+
+nepi.resources.linux.rpmfuncs.install_packages_command(os, packages)[source]¶
+
+ +
+
+nepi.resources.linux.rpmfuncs.install_rpmfusion_command(os)[source]¶
+
+ +
+
+nepi.resources.linux.rpmfuncs.remove_packages_command(os, packages)[source]¶
+
+ +
+
+

nepi.resources.linux.tap module¶

+
+
+class nepi.resources.linux.tap.LinuxTap(ec, guid)[source]¶
+

Bases: nepi.resources.linux.application.LinuxApplication

+
+
+IFF_TAP = 2¶
+
+ +
+
+IFF_TUN = 1¶
+
+ +
+
+check_status()[source]¶
+
+ +
+
+do_deploy()[source]¶
+
+ +
+
+do_release()[source]¶
+
+ +
+
+do_start()[source]¶
+
+ +
+
+do_stop()[source]¶
+
+ +
+
+establish_udp_connection(remote_endpoint, connection_app_home, connection_run_home, port)[source]¶
+
+ +
+
+gre_connect(remote_endpoint, connection_app_home, connection_run_home)[source]¶
+
+ +
+
+gre_enabled[source]¶
+
+ +
+
+initiate_udp_connection(remote_endpoint, connection_app_home, connection_run_home, cipher, cipher_key, bwlimit, txqueuelen)[source]¶
+
+ +
+
+node[source]¶
+
+ +
+
+sock_name[source]¶
+
+ +
+
+state[source]¶
+
+ +
+
+terminate_connection(remote_endpoint, connection_app_home, connection_run_home)[source]¶
+
+ +
+
+udp_connect(remote_endpoint, connection_app_home, connection_run_home, cipher, cipher_key, bwlimit, txqueuelen)[source]¶
+
+ +
+
+upload_sources()[source]¶
+
+ +
+
+upload_start_command()[source]¶
+
+ +
+
+valid_connection(guid)[source]¶
+
+ +
+
+verify_connection(remote_endpoint, connection_app_home, connection_run_home)[source]¶
+
+ +
+
+vif_prefix[source]¶
+
+ +
+
+vif_type[source]¶
+
+ +
+
+vif_type_flag[source]¶
+
+ +
+
+wait_file(home, filename)[source]¶
+

Waits until file on endpoint is generated

+
+ +
+ +
+
+

nepi.resources.linux.tcpdump module¶

+
+
+class nepi.resources.linux.tcpdump.LinuxTcpdump(ec, guid)[source]¶
+

Bases: nepi.resources.linux.application.LinuxApplication

+
+
+do_deploy()[source]¶
+
+ +
+
+valid_connection(guid)[source]¶
+
+ +
+ +
+
+

nepi.resources.linux.traceroute module¶

+
+
+class nepi.resources.linux.traceroute.LinuxTraceroute(ec, guid)[source]¶
+

Bases: nepi.resources.linux.application.LinuxApplication

+
+
+do_deploy()[source]¶
+
+ +
+
+do_start()[source]¶
+
+ +
+
+upload_start_command()[source]¶
+
+ +
+
+valid_connection(guid)[source]¶
+
+ +
+ +
+
+

nepi.resources.linux.tun module¶

+
+
+class nepi.resources.linux.tun.LinuxTun(ec, guid)[source]¶
+

Bases: nepi.resources.linux.tap.LinuxTap

+
+ +
+
+

nepi.resources.linux.tunnel module¶

+
+
+class nepi.resources.linux.tunnel.LinuxTunnel(ec, guid)[source]¶
+

Bases: nepi.resources.linux.application.LinuxApplication

+
+
+app_home(endpoint)[source]¶
+
+ +
+
+check_state_connection(endpoint, remote_endpoint)[source]¶
+
+ +
+
+do_deploy()[source]¶
+
+ +
+
+do_provision()[source]¶
+
+ +
+
+do_start()[source]¶
+
+ +
+
+do_stop()[source]¶
+

Stops application execution

+
+ +
+
+endpoint1[source]¶
+
+ +
+
+endpoint2[source]¶
+
+ +
+
+endpoint_mkdir(endpoint)[source]¶
+
+ +
+
+establish_connection(endpoint, remote_endpoint, data)[source]¶
+
+ +
+
+get_endpoints()[source]¶
+

Returns the list of RM that are endpoints to the tunnel

+
+ +
+
+initiate_connection(endpoint, remote_endpoint)[source]¶
+
+ +
+
+log_message(msg)[source]¶
+
+ +
+
+run_home(endpoint)[source]¶
+
+ +
+
+state[source]¶
+

Returns the state of the application

+
+ +
+
+terminate_connection(endpoint, remote_endpoint)[source]¶
+
+ +
+
+valid_connection(guid)[source]¶
+
+ +
+
+verify_connection(endpoint, remote_endpoint)[source]¶
+
+ +
+ +
+
+

nepi.resources.linux.udptest module¶

+
+
+class nepi.resources.linux.udptest.LinuxUdpTest(ec, guid)[source]¶
+

Bases: nepi.resources.linux.application.LinuxApplication

+

Uses the hpcbench udptest tool to gather UDP measurements. +Measurements require two ends, a server and a client RM.

+

http://hpcbench.sourceforge.net/

+
+
+do_deploy()[source]¶
+
+ +
+
+do_start()[source]¶
+
+ +
+
+upload_start_command()[source]¶
+
+ +
+
+valid_connection(guid)[source]¶
+
+ +
+ +
+
+

nepi.resources.linux.udptunnel module¶

+
+
+class nepi.resources.linux.udptunnel.LinuxUdpTunnel(ec, guid)[source]¶
+

Bases: nepi.resources.linux.tunnel.LinuxTunnel

+
+
+check_state_connection()[source]¶
+
+ +
+
+establish_connection(endpoint, remote_endpoint, port)[source]¶
+
+ +
+
+get_endpoints()[source]¶
+

Returns the list of RM that are endpoints to the tunnel

+
+ +
+
+initiate_connection(endpoint, remote_endpoint)[source]¶
+
+ +
+
+log_message(msg)[source]¶
+
+ +
+
+terminate_connection(endpoint, remote_endpoint)[source]¶
+
+ +
+
+verify_connection(endpoint, remote_endpoint)[source]¶
+
+ +
+ +
+
+

Module contents¶

+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_layout/nepi.resources.linux.netns.html b/doc/sphinx/_build/html/_layout/nepi.resources.linux.netns.html new file mode 100644 index 00000000..1a34b535 --- /dev/null +++ b/doc/sphinx/_build/html/_layout/nepi.resources.linux.netns.html @@ -0,0 +1,285 @@ + + + + + + + + nepi.resources.linux.netns package — NEPI 3.0 documentation + + + + + + + + + + + + +
+
+

Table Of Contents

+ + +

This Page

+ + + +
+
+ +
+
+
+
+ +
+

nepi.resources.linux.netns package¶

+
+

Submodules¶

+
+
+

nepi.resources.linux.netns.netnsclient module¶

+
+
+class nepi.resources.linux.netns.netnsclient.LinuxNetNSClient(emulation)[source]¶
+

Bases: nepi.resources.netns.netnsclient.NetNSClient

+
+
+create(*args, **kwargs)[source]¶
+
+ +
+
+emulation[source]¶
+
+ +
+
+flush(*args, **kwargs)[source]¶
+
+ +
+
+get(*args, **kwargs)[source]¶
+
+ +
+
+invoke(*args, **kwargs)[source]¶
+
+ +
+
+send_msg(msg_type, *args, **kwargs)[source]¶
+
+ +
+
+set(*args, **kwargs)[source]¶
+
+ +
+
+shutdown(*args, **kwargs)[source]¶
+
+ +
+ +
+
+

nepi.resources.linux.netns.netnsemulation module¶

+
+
+class nepi.resources.linux.netns.netnsemulation.LinuxNetNSEmulation(ec, guid)[source]¶
+

Bases: nepi.resources.linux.application.LinuxApplication, nepi.resources.netns.netnsemulation.NetNSEmulation

+
+
+clone_command(name, repo, src)[source]¶
+
+ +
+
+do_deploy()[source]¶
+
+ +
+
+do_release()[source]¶
+
+ +
+
+do_start()[source]¶
+

Starts execution execution

+
+ +
+
+do_stop()[source]¶
+

Stops simulation execution

+
+ +
+
+netns_repo[source]¶
+
+ +
+
+netns_src[source]¶
+
+ +
+
+netns_version[source]¶
+
+ +
+
+python_passfd_repo[source]¶
+
+ +
+
+python_passfd_src[source]¶
+
+ +
+
+python_passfd_version[source]¶
+
+ +
+
+python_unshare_repo[source]¶
+
+ +
+
+python_unshare_src[source]¶
+
+ +
+
+python_unshare_version[source]¶
+
+ +
+
+remote_socket[source]¶
+
+ +
+
+replace_paths(command)[source]¶
+

Replace all special path tags with shell-escaped actual paths.

+
+ +
+
+socket_name[source]¶
+
+ +
+
+upload_extra_sources(sources=None, src_dir=None)[source]¶
+
+ +
+
+upload_sources()[source]¶
+
+ +
+
+upload_start_command()[source]¶
+
+ +
+
+valid_connection(guid)[source]¶
+
+ +
+
+wait_remote_socket()[source]¶
+

Waits until the remote socket is created

+
+ +
+ +
+
+

Module contents¶

+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_layout/nepi.resources.linux.ns3.ccn.html b/doc/sphinx/_build/html/_layout/nepi.resources.linux.ns3.ccn.html new file mode 100644 index 00000000..5098df24 --- /dev/null +++ b/doc/sphinx/_build/html/_layout/nepi.resources.linux.ns3.ccn.html @@ -0,0 +1,186 @@ + + + + + + + + nepi.resources.linux.ns3.ccn package — NEPI 3.0 documentation + + + + + + + + + + + + + + +
+
+
+
+ +
+

nepi.resources.linux.ns3.ccn package¶

+
+

Submodules¶

+
+
+

nepi.resources.linux.ns3.ccn.ns3ccncatdceapplication module¶

+
+
+class nepi.resources.linux.ns3.ccn.ns3ccncatdceapplication.LinuxNS3DceCCNCat(ec, guid)[source]¶
+

Bases: nepi.resources.linux.ns3.ccn.ns3ccndceapplication.LinuxNS3CCNDceApplication

+
+ +
+
+

nepi.resources.linux.ns3.ccn.ns3ccndceapplication module¶

+
+
+class nepi.resources.linux.ns3.ccn.ns3ccndceapplication.LinuxNS3CCNDceApplication(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3ccndceapplication.NS3BaseCCNDceApplication

+
+ +
+
+

nepi.resources.linux.ns3.ccn.ns3ccnddceapplication module¶

+
+
+class nepi.resources.linux.ns3.ccn.ns3ccnddceapplication.LinuxNS3DceCCND(ec, guid)[source]¶
+

Bases: nepi.resources.linux.ns3.ccn.ns3ccndceapplication.LinuxNS3CCNDceApplication

+
+
+version[source]¶
+
+ +
+ +
+
+

nepi.resources.linux.ns3.ccn.ns3ccnpeekdceapplication module¶

+
+
+class nepi.resources.linux.ns3.ccn.ns3ccnpeekdceapplication.LinuxNS3DceCCNPeek(ec, guid)[source]¶
+

Bases: nepi.resources.linux.ns3.ccn.ns3ccndceapplication.LinuxNS3CCNDceApplication

+
+ +
+
+

nepi.resources.linux.ns3.ccn.ns3ccnpokedceapplication module¶

+
+
+class nepi.resources.linux.ns3.ccn.ns3ccnpokedceapplication.LinuxNS3DceCCNPoke(ec, guid)[source]¶
+

Bases: nepi.resources.linux.ns3.ccn.ns3ccndceapplication.LinuxNS3CCNDceApplication

+
+ +
+
+

nepi.resources.linux.ns3.ccn.ns3ccnrdceapplication module¶

+
+
+class nepi.resources.linux.ns3.ccn.ns3ccnrdceapplication.LinuxNS3DceCCNR(ec, guid)[source]¶
+

Bases: nepi.resources.linux.ns3.ccn.ns3ccndceapplication.LinuxNS3CCNDceApplication

+
+ +
+
+

nepi.resources.linux.ns3.ccn.ns3fibentrydceapplication module¶

+
+
+class nepi.resources.linux.ns3.ccn.ns3fibentrydceapplication.LinuxNS3DceFIBEntry(ec, guid)[source]¶
+

Bases: nepi.resources.linux.ns3.ccn.ns3ccndceapplication.LinuxNS3CCNDceApplication

+
+ +
+
+

Module contents¶

+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_layout/nepi.resources.linux.ns3.html b/doc/sphinx/_build/html/_layout/nepi.resources.linux.ns3.html new file mode 100644 index 00000000..9f1cc83c --- /dev/null +++ b/doc/sphinx/_build/html/_layout/nepi.resources.linux.ns3.html @@ -0,0 +1,536 @@ + + + + + + + + nepi.resources.linux.ns3 package — NEPI 3.0 documentation + + + + + + + + + + + + + + +
+
+
+
+ +
+

nepi.resources.linux.ns3 package¶

+ +
+

Submodules¶

+
+
+

nepi.resources.linux.ns3.fdudptunnel module¶

+
+
+class nepi.resources.linux.ns3.fdudptunnel.LinuxNs3FdUdpTunnel(ec, guid)[source]¶
+

Bases: nepi.resources.linux.udptunnel.LinuxUdpTunnel

+
+
+app_home(endpoint)[source]¶
+
+ +
+
+check_state_connection()[source]¶
+
+ +
+
+endpoint1[source]¶
+
+ +
+
+endpoint2[source]¶
+
+ +
+
+endpoint_mkdir(endpoint)[source]¶
+
+ +
+
+endpoint_node(endpoint)[source]¶
+
+ +
+
+establish(endpoint, remote_endpoint, port)[source]¶
+
+ +
+
+establish_connection(endpoint, remote_endpoint, port)[source]¶
+
+ +
+
+get_endpoints()[source]¶
+

Returns the list of RM that are endpoints to the tunnel

+
+ +
+
+initiate(endpoint, remote_endpoint, address, cipher, cipher_key, bwlimit, txqueuelen)[source]¶
+
+ +
+
+initiate_connection(endpoint, remote_endpoint)[source]¶
+
+ +
+
+log_message(msg)[source]¶
+
+ +
+
+node1[source]¶
+
+ +
+
+node2[source]¶
+
+ +
+
+pi[source]¶
+
+ +
+
+run_home(endpoint)[source]¶
+
+ +
+
+terminate_connection(endpoint, remote_endpoint)[source]¶
+
+ +
+
+upload_sources(endpoint)[source]¶
+
+ +
+
+verify(endpoint)[source]¶
+
+ +
+
+verify_connection(endpoint, remote_endpoint)[source]¶
+
+ +
+
+wait_file(endpoint, filename)[source]¶
+

Waits until file on endpoint is generated

+
+ +
+
+wait_local_port(endpoint)[source]¶
+

Waits until the local_port file for the endpoint is generated, +and returns the port number

+
+ +
+
+wait_result(endpoint)[source]¶
+

Waits until the return code file for the endpoint is generated

+
+ +
+ +
+
+

nepi.resources.linux.ns3.ns3client module¶

+
+
+class nepi.resources.linux.ns3.ns3client.LinuxNS3Client(simulation)[source]¶
+

Bases: nepi.resources.ns3.ns3client.NS3Client

+
+
+create(*args, **kwargs)[source]¶
+
+ +
+
+factory(*args, **kwargs)[source]¶
+
+ +
+
+flush(*args, **kwargs)[source]¶
+
+ +
+
+get(*args, **kwargs)[source]¶
+
+ +
+
+invoke(*args, **kwargs)[source]¶
+
+ +
+
+send_msg(msg_type, *args, **kwargs)[source]¶
+
+ +
+
+set(*args, **kwargs)[source]¶
+
+ +
+
+shutdown(*args, **kwargs)[source]¶
+
+ +
+
+simulation[source]¶
+
+ +
+
+start(*args, **kwargs)[source]¶
+
+ +
+
+stop(*args, **kwargs)[source]¶
+
+ +
+ +
+
+

nepi.resources.linux.ns3.ns3dceapplication module¶

+
+
+class nepi.resources.linux.ns3.ns3dceapplication.LinuxNS3DceApplication(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3dceapplication.NS3BaseDceApplication

+
+ +
+
+

nepi.resources.linux.ns3.ns3pingdceapplication module¶

+
+
+class nepi.resources.linux.ns3.ns3pingdceapplication.LinuxDcePing(ec, guid)[source]¶
+

Bases: nepi.resources.linux.ns3.ns3dceapplication.LinuxNS3DceApplication

+
+ +
+
+

nepi.resources.linux.ns3.ns3simulation module¶

+
+
+class nepi.resources.linux.ns3.ns3simulation.LinuxNS3Simulation(ec, guid)[source]¶
+

Bases: nepi.resources.linux.application.LinuxApplication, nepi.resources.ns3.ns3simulation.NS3Simulation

+
+
+configure()[source]¶
+
+ +
+
+dce_helper[source]¶
+
+ +
+
+dce_repo[source]¶
+
+ +
+
+dce_src_location[source]¶
+
+ +
+
+dce_version[source]¶
+
+ +
+
+do_deploy()[source]¶
+
+ +
+
+do_release()[source]¶
+
+ +
+
+do_start()[source]¶
+

Starts simulation execution

+
+ +
+
+do_stop()[source]¶
+

Stops simulation execution

+
+ +
+
+enable_dce[source]¶
+
+ +
+
+ns3_build_location[source]¶
+
+ +
+
+ns3_repo[source]¶
+
+ +
+
+ns3_src_location[source]¶
+
+ +
+
+pygccxml_version[source]¶
+
+ +
+
+remote_socket[source]¶
+
+ +
+
+replace_paths(command)[source]¶
+

Replace all special path tags with shell-escaped actual paths.

+
+ +
+
+socket_name[source]¶
+
+ +
+
+state[source]¶
+
+ +
+
+trace(name, attr='all', block=512, offset=0)[source]¶
+
+ +
+
+upload_extra_sources(sources=None, src_dir=None)[source]¶
+
+ +
+
+upload_sources()[source]¶
+
+ +
+
+upload_start_command()[source]¶
+
+ +
+
+valid_connection(guid)[source]¶
+
+ +
+
+wait_remote_socket()[source]¶
+

Waits until the remote socket is created

+
+ +
+ +
+ +
+

Module contents¶

+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_layout/nepi.resources.netns.html b/doc/sphinx/_build/html/_layout/nepi.resources.netns.html new file mode 100644 index 00000000..6df18f48 --- /dev/null +++ b/doc/sphinx/_build/html/_layout/nepi.resources.netns.html @@ -0,0 +1,617 @@ + + + + + + + + nepi.resources.netns package — NEPI 3.0 documentation + + + + + + + + + + + + + + +
+
+
+
+ +
+

nepi.resources.netns package¶

+
+

Submodules¶

+
+
+

nepi.resources.netns.netnsapplication module¶

+
+
+class nepi.resources.netns.netnsapplication.NetNSApplication(ec, guid)[source]¶
+

Bases: nepi.resources.netns.netnsbase.NetNSBase

+
+
+do_start()[source]¶
+
+ +
+
+emulation[source]¶
+
+ +
+
+node[source]¶
+
+ +
+
+state[source]¶
+
+ +
+ +
+
+

nepi.resources.netns.netnsbase module¶

+
+
+class nepi.resources.netns.netnsbase.NetNSBase(ec, guid)[source]¶
+

Bases: nepi.execution.resource.ResourceManager

+
+
+connected[source]¶
+
+ +
+
+do_deploy()[source]¶
+
+ +
+
+do_provision()[source]¶
+
+ +
+
+do_start()[source]¶
+
+ +
+
+do_stop()[source]¶
+
+ +
+
+get(name)[source]¶
+
+ +
+
+set(name, value)[source]¶
+
+ +
+
+state[source]¶
+
+ +
+
+trace(name, attr='all', block=512, offset=0)[source]¶
+
+ +
+
+uuid[source]¶
+
+ +
+ +
+
+

nepi.resources.netns.netnsclient module¶

+
+
+class nepi.resources.netns.netnsclient.NetNSClient[source]¶
+

Bases: object

+

Common Interface for NS3 client classes

+
+
+create(*args, **kwargs)[source]¶
+
+ +
+
+flush(*args, **kwargs)[source]¶
+
+ +
+
+get(*args, **kwargs)[source]¶
+
+ +
+
+invoke(*args, **kwargs)[source]¶
+
+ +
+
+set(*args, **kwargs)[source]¶
+
+ +
+
+shutdown(*args, **kwargs)[source]¶
+
+ +
+ +
+
+

nepi.resources.netns.netnsemulation module¶

+
+
+class nepi.resources.netns.netnsemulation.NetNSEmulation[source]¶
+

Bases: object

+
+
+client[source]¶
+
+ +
+
+create(*args, **kwargs)[source]¶
+
+ +
+
+emu_get(*args, **kwargs)[source]¶
+
+ +
+
+emu_set(*args, **kwargs)[source]¶
+
+ +
+
+flush(*args, **kwargs)[source]¶
+
+ +
+
+invoke(*args, **kwargs)[source]¶
+
+ +
+
+shutdown(*args, **kwargs)[source]¶
+
+ +
+ +
+
+

nepi.resources.netns.netnsinterface module¶

+
+
+class nepi.resources.netns.netnsinterface.NetNSInterface(ec, guid)[source]¶
+

Bases: nepi.resources.netns.netnsbase.NetNSBase

+
+ +
+
+

nepi.resources.netns.netnsipv4address module¶

+
+
+class nepi.resources.netns.netnsipv4address.NetNSIPv4Address(ec, guid)[source]¶
+

Bases: nepi.resources.netns.netnsbase.NetNSBase

+
+
+emulation[source]¶
+
+ +
+
+interface[source]¶
+
+ +
+
+node[source]¶
+
+ +
+ +
+
+

nepi.resources.netns.netnsnode module¶

+
+
+class nepi.resources.netns.netnsnode.NetNSNode(ec, guid)[source]¶
+

Bases: nepi.resources.netns.netnsbase.NetNSBase

+
+
+emulation[source]¶
+
+ +
+ +
+
+

nepi.resources.netns.netnsnodeinterface module¶

+
+
+class nepi.resources.netns.netnsnodeinterface.NetNSNodeInterface(ec, guid)[source]¶
+

Bases: nepi.resources.netns.netnsinterface.NetNSInterface

+
+
+emulation[source]¶
+
+ +
+
+node[source]¶
+
+ +
+
+switch[source]¶
+
+ +
+ +
+
+

nepi.resources.netns.netnsroute module¶

+
+
+class nepi.resources.netns.netnsroute.NetNSIPv4Route(ec, guid)[source]¶
+

Bases: nepi.resources.netns.netnsbase.NetNSBase

+
+
+emulation[source]¶
+
+ +
+
+node[source]¶
+
+ +
+ +
+
+

nepi.resources.netns.netnsserver module¶

+
+
+class nepi.resources.netns.netnsserver.NetNSWrapperMessage[source]¶
+
+
+CREATE = 'CREATE'¶
+
+ +
+
+FLUSH = 'FLUSH'¶
+
+ +
+
+GET = 'GET'¶
+
+ +
+
+INVOKE = 'INVOKE'¶
+
+ +
+
+SET = 'SET'¶
+
+ +
+
+SHUTDOWN = 'SHUTDOWN'¶
+
+ +
+ +
+
+nepi.resources.netns.netnsserver.create_socket(socket_name)[source]¶
+
+ +
+
+nepi.resources.netns.netnsserver.get_options()[source]¶
+
+ +
+
+nepi.resources.netns.netnsserver.handle_message(wrapper, msg_type, args, kwargs)[source]¶
+
+ +
+
+nepi.resources.netns.netnsserver.recv_msg(conn)[source]¶
+
+ +
+
+nepi.resources.netns.netnsserver.run_server(socket_name, level=20, enable_dump=False)[source]¶
+
+ +
+
+nepi.resources.netns.netnsserver.send_reply(conn, reply)[source]¶
+
+ +
+
+

nepi.resources.netns.netnsswitch module¶

+
+
+class nepi.resources.netns.netnsswitch.NetNSSwitch(ec, guid)[source]¶
+

Bases: nepi.resources.netns.netnsbase.NetNSBase

+
+
+emulation[source]¶
+
+ +
+
+interface[source]¶
+
+ +
+
+node[source]¶
+
+ +
+ +
+
+

nepi.resources.netns.netnswrapper module¶

+
+
+class nepi.resources.netns.netnswrapper.NetNSWrapper(loglevel=20, enable_dump=False)[source]¶
+

Bases: object

+
+
+create(clazzname, *args)[source]¶
+

This method should be used to construct netns objects

+
+ +
+
+debuger[source]¶
+
+ +
+
+get(uuid, name)[source]¶
+
+ +
+
+get_object(uuid)[source]¶
+
+ +
+
+invoke(uuid, operation, *args, **kwargs)[source]¶
+
+ +
+
+logger[source]¶
+
+ +
+
+make_uuid()[source]¶
+
+ +
+
+replace_args(args)[source]¶
+
+ +
+
+replace_kwargs(kwargs)[source]¶
+
+ +
+
+set(uuid, name, value)[source]¶
+
+ +
+
+shutdown()[source]¶
+
+ +
+ +
+
+

nepi.resources.netns.netnswrapper_debug module¶

+
+
+class nepi.resources.netns.netnswrapper_debug.NetNSWrapperDebuger(enabled)[source]¶
+

Bases: object

+
+
+dump_create(uuid, clazzname, args)[source]¶
+
+ +
+
+dump_factory(uuid, type_name, kwargs)[source]¶
+
+ +
+
+dump_get(uuid, name)[source]¶
+
+ +
+
+dump_header()[source]¶
+
+ +
+
+dump_invoke(newuuid, uuid, operation, args, kwargs)[source]¶
+
+ +
+
+dump_set(uuid, name, value)[source]¶
+
+ +
+
+dump_shutdown()[source]¶
+
+ +
+
+dump_to_script(command)[source]¶
+
+ +
+
+enabled[source]¶
+
+ +
+
+format_args(args)[source]¶
+
+ +
+
+format_kwargs(kwargs)[source]¶
+
+ +
+
+format_value(value)[source]¶
+
+ +
+
+script_path[source]¶
+
+ +
+ +
+
+

Module contents¶

+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_layout/nepi.resources.ns3.classes.html b/doc/sphinx/_build/html/_layout/nepi.resources.ns3.classes.html new file mode 100644 index 00000000..38f606a7 --- /dev/null +++ b/doc/sphinx/_build/html/_layout/nepi.resources.ns3.classes.html @@ -0,0 +1,1171 @@ + + + + + + + + nepi.resources.ns3.classes package — NEPI 3.0 documentation + + + + + + + + + + + + +
+
+

Table Of Contents

+ + +

This Page

+ + + +
+
+ +
+
+
+
+ +
+

nepi.resources.ns3.classes package¶

+
+

Submodules¶

+
+
+

nepi.resources.ns3.classes.aarf_wifi_manager module¶

+
+
+class nepi.resources.ns3.classes.aarf_wifi_manager.NS3AarfWifiManager(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3wifiremotestationmanager.NS3BaseWifiRemoteStationManager

+
+ +
+
+

nepi.resources.ns3.classes.aarfcd_wifi_manager module¶

+
+
+class nepi.resources.ns3.classes.aarfcd_wifi_manager.NS3AarfcdWifiManager(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3wifiremotestationmanager.NS3BaseWifiRemoteStationManager

+
+ +
+
+

nepi.resources.ns3.classes.adhoc_wifi_mac module¶

+
+
+class nepi.resources.ns3.classes.adhoc_wifi_mac.NS3AdhocWifiMac(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3wifimac.NS3BaseWifiMac

+
+ +
+
+

nepi.resources.ns3.classes.aloha_noack_net_device module¶

+
+
+class nepi.resources.ns3.classes.aloha_noack_net_device.NS3AlohaNoackNetDevice(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3netdevice.NS3BaseNetDevice

+
+ +
+
+

nepi.resources.ns3.classes.amrr_wifi_manager module¶

+
+
+class nepi.resources.ns3.classes.amrr_wifi_manager.NS3AmrrWifiManager(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3wifiremotestationmanager.NS3BaseWifiRemoteStationManager

+
+ +
+
+

nepi.resources.ns3.classes.ap_wifi_mac module¶

+
+
+class nepi.resources.ns3.classes.ap_wifi_mac.NS3ApWifiMac(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3wifimac.NS3BaseWifiMac

+
+ +
+
+

nepi.resources.ns3.classes.arf_wifi_manager module¶

+
+
+class nepi.resources.ns3.classes.arf_wifi_manager.NS3ArfWifiManager(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3wifiremotestationmanager.NS3BaseWifiRemoteStationManager

+
+ +
+
+

nepi.resources.ns3.classes.arp_l3protocol module¶

+
+
+class nepi.resources.ns3.classes.arp_l3protocol.NS3ArpL3Protocol(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3arpl3protocol.NS3BaseArpL3Protocol

+
+ +
+
+

nepi.resources.ns3.classes.base_station_net_device module¶

+
+
+class nepi.resources.ns3.classes.base_station_net_device.NS3BaseStationNetDevice(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3netdevice.NS3BaseNetDevice

+
+ +
+
+

nepi.resources.ns3.classes.binary_error_model module¶

+
+
+class nepi.resources.ns3.classes.binary_error_model.NS3BinaryErrorModel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3errormodel.NS3BaseErrorModel

+
+ +
+
+

nepi.resources.ns3.classes.binary_error_sixlow_model module¶

+
+
+class nepi.resources.ns3.classes.binary_error_sixlow_model.NS3BinaryErrorSixlowModel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3errormodel.NS3BaseErrorModel

+
+ +
+
+

nepi.resources.ns3.classes.bridge_channel module¶

+
+
+class nepi.resources.ns3.classes.bridge_channel.NS3BridgeChannel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3channel.NS3BaseChannel

+
+ +
+
+

nepi.resources.ns3.classes.bridge_net_device module¶

+
+
+class nepi.resources.ns3.classes.bridge_net_device.NS3BridgeNetDevice(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3netdevice.NS3BaseNetDevice

+
+ +
+
+

nepi.resources.ns3.classes.bulk_send_application module¶

+
+
+class nepi.resources.ns3.classes.bulk_send_application.NS3BulkSendApplication(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3application.NS3BaseApplication

+
+ +
+
+

nepi.resources.ns3.classes.burst_error_model module¶

+
+
+class nepi.resources.ns3.classes.burst_error_model.NS3BurstErrorModel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3errormodel.NS3BaseErrorModel

+
+ +
+
+

nepi.resources.ns3.classes.cara_wifi_manager module¶

+
+
+class nepi.resources.ns3.classes.cara_wifi_manager.NS3CaraWifiManager(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3wifiremotestationmanager.NS3BaseWifiRemoteStationManager

+
+ +
+
+

nepi.resources.ns3.classes.constant_acceleration_mobility_model module¶

+
+
+class nepi.resources.ns3.classes.constant_acceleration_mobility_model.NS3ConstantAccelerationMobilityModel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3mobilitymodel.NS3BaseMobilityModel

+
+ +
+
+

nepi.resources.ns3.classes.constant_position_mobility_model module¶

+
+
+class nepi.resources.ns3.classes.constant_position_mobility_model.NS3ConstantPositionMobilityModel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3mobilitymodel.NS3BaseMobilityModel

+
+ +
+
+

nepi.resources.ns3.classes.constant_rate_wifi_manager module¶

+
+
+class nepi.resources.ns3.classes.constant_rate_wifi_manager.NS3ConstantRateWifiManager(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3wifiremotestationmanager.NS3BaseWifiRemoteStationManager

+
+ +
+
+

nepi.resources.ns3.classes.constant_speed_propagation_delay_model module¶

+
+
+class nepi.resources.ns3.classes.constant_speed_propagation_delay_model.NS3ConstantSpeedPropagationDelayModel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3propagationdelaymodel.NS3BasePropagationDelayModel

+
+ +
+
+

nepi.resources.ns3.classes.constant_velocity_mobility_model module¶

+
+
+class nepi.resources.ns3.classes.constant_velocity_mobility_model.NS3ConstantVelocityMobilityModel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3mobilitymodel.NS3BaseMobilityModel

+
+ +
+
+

nepi.resources.ns3.classes.cost231propagation_loss_model module¶

+
+
+class nepi.resources.ns3.classes.cost231propagation_loss_model.NS3Cost231PropagationLossModel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3propagationlossmodel.NS3BasePropagationLossModel

+
+ +
+
+

nepi.resources.ns3.classes.csma_channel module¶

+
+
+class nepi.resources.ns3.classes.csma_channel.NS3CsmaChannel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3channel.NS3BaseChannel

+
+ +
+
+

nepi.resources.ns3.classes.csma_net_device module¶

+
+
+class nepi.resources.ns3.classes.csma_net_device.NS3CsmaNetDevice(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3netdevice.NS3BaseNetDevice

+
+ +
+
+

nepi.resources.ns3.classes.drop_tail_queue module¶

+
+
+class nepi.resources.ns3.classes.drop_tail_queue.NS3DropTailQueue(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3queue.NS3BaseQueue

+
+ +
+
+

nepi.resources.ns3.classes.dsrdsr_routing module¶

+
+
+class nepi.resources.ns3.classes.dsrdsr_routing.NS3dsrDsrRouting(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3base.NS3Base

+
+ +
+
+

nepi.resources.ns3.classes.emu_net_device module¶

+
+
+class nepi.resources.ns3.classes.emu_net_device.NS3EmuNetDevice(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3netdevice.NS3BaseNetDevice

+
+ +
+
+

nepi.resources.ns3.classes.error_channel module¶

+
+
+class nepi.resources.ns3.classes.error_channel.NS3ErrorChannel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3channel.NS3BaseChannel

+
+ +
+
+

nepi.resources.ns3.classes.error_channel_sixlow module¶

+
+
+class nepi.resources.ns3.classes.error_channel_sixlow.NS3ErrorChannelSixlow(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3channel.NS3BaseChannel

+
+ +
+
+

nepi.resources.ns3.classes.error_net_device module¶

+
+
+class nepi.resources.ns3.classes.error_net_device.NS3ErrorNetDevice(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3netdevice.NS3BaseNetDevice

+
+ +
+
+

nepi.resources.ns3.classes.fd_net_device module¶

+
+
+class nepi.resources.ns3.classes.fd_net_device.NS3FdNetDevice(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3fdnetdevice.NS3BaseFdNetDevice

+
+ +
+
+

nepi.resources.ns3.classes.fixed_rss_loss_model module¶

+
+
+class nepi.resources.ns3.classes.fixed_rss_loss_model.NS3FixedRssLossModel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3propagationlossmodel.NS3BasePropagationLossModel

+
+ +
+
+

nepi.resources.ns3.classes.friis_propagation_loss_model module¶

+
+
+class nepi.resources.ns3.classes.friis_propagation_loss_model.NS3FriisPropagationLossModel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3propagationlossmodel.NS3BasePropagationLossModel

+
+ +
+
+

nepi.resources.ns3.classes.gauss_markov_mobility_model module¶

+
+
+class nepi.resources.ns3.classes.gauss_markov_mobility_model.NS3GaussMarkovMobilityModel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3mobilitymodel.NS3BaseMobilityModel

+
+ +
+
+

nepi.resources.ns3.classes.hierarchical_mobility_model module¶

+
+
+class nepi.resources.ns3.classes.hierarchical_mobility_model.NS3HierarchicalMobilityModel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3mobilitymodel.NS3BaseMobilityModel

+
+ +
+
+

nepi.resources.ns3.classes.hybrid_buildings_propagation_loss_model module¶

+
+
+class nepi.resources.ns3.classes.hybrid_buildings_propagation_loss_model.NS3HybridBuildingsPropagationLossModel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3propagationlossmodel.NS3BasePropagationLossModel

+
+ +
+
+

nepi.resources.ns3.classes.icmpv4l4protocol module¶

+
+
+class nepi.resources.ns3.classes.icmpv4l4protocol.NS3Icmpv4L4Protocol(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3icmpv4l4protocol.NS3BaseIcmpv4L4Protocol

+
+ +
+
+

nepi.resources.ns3.classes.icmpv6l4protocol module¶

+
+
+class nepi.resources.ns3.classes.icmpv6l4protocol.NS3Icmpv6L4Protocol(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3base.NS3Base

+
+ +
+
+

nepi.resources.ns3.classes.ideal_wifi_manager module¶

+
+
+class nepi.resources.ns3.classes.ideal_wifi_manager.NS3IdealWifiManager(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3wifiremotestationmanager.NS3BaseWifiRemoteStationManager

+
+ +
+
+

nepi.resources.ns3.classes.ipv4l3protocol module¶

+
+
+class nepi.resources.ns3.classes.ipv4l3protocol.NS3Ipv4L3Protocol(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3ipv4l3protocol.NS3BaseIpv4L3Protocol

+
+ +
+
+

nepi.resources.ns3.classes.itu_r1411los_propagation_loss_model module¶

+
+
+class nepi.resources.ns3.classes.itu_r1411los_propagation_loss_model.NS3ItuR1411LosPropagationLossModel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3propagationlossmodel.NS3BasePropagationLossModel

+
+ +
+
+

nepi.resources.ns3.classes.itu_r1411nlos_over_rooftop_propagation_loss_model module¶

+
+
+class nepi.resources.ns3.classes.itu_r1411nlos_over_rooftop_propagation_loss_model.NS3ItuR1411NlosOverRooftopPropagationLossModel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3propagationlossmodel.NS3BasePropagationLossModel

+
+ +
+
+

nepi.resources.ns3.classes.jakes_propagation_loss_model module¶

+
+
+class nepi.resources.ns3.classes.jakes_propagation_loss_model.NS3JakesPropagationLossModel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3propagationlossmodel.NS3BasePropagationLossModel

+
+ +
+
+

nepi.resources.ns3.classes.kun2600mhz_propagation_loss_model module¶

+
+
+class nepi.resources.ns3.classes.kun2600mhz_propagation_loss_model.NS3Kun2600MhzPropagationLossModel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3propagationlossmodel.NS3BasePropagationLossModel

+
+ +
+
+

nepi.resources.ns3.classes.list_error_model module¶

+
+
+class nepi.resources.ns3.classes.list_error_model.NS3ListErrorModel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3errormodel.NS3BaseErrorModel

+
+ +
+
+

nepi.resources.ns3.classes.log_distance_propagation_loss_model module¶

+
+
+class nepi.resources.ns3.classes.log_distance_propagation_loss_model.NS3LogDistancePropagationLossModel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3propagationlossmodel.NS3BasePropagationLossModel

+
+ +
+
+

nepi.resources.ns3.classes.loopback_net_device module¶

+
+
+class nepi.resources.ns3.classes.loopback_net_device.NS3LoopbackNetDevice(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3netdevice.NS3BaseNetDevice

+
+ +
+
+

nepi.resources.ns3.classes.lr_wpan_net_device module¶

+
+
+class nepi.resources.ns3.classes.lr_wpan_net_device.NS3LrWpanNetDevice(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3netdevice.NS3BaseNetDevice

+
+ +
+
+

nepi.resources.ns3.classes.lte_enb_net_device module¶

+
+
+class nepi.resources.ns3.classes.lte_enb_net_device.NS3LteEnbNetDevice(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3netdevice.NS3BaseNetDevice

+
+ +
+
+

nepi.resources.ns3.classes.lte_simple_net_device module¶

+
+
+class nepi.resources.ns3.classes.lte_simple_net_device.NS3LteSimpleNetDevice(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3netdevice.NS3BaseNetDevice

+
+ +
+
+

nepi.resources.ns3.classes.lte_ue_net_device module¶

+
+
+class nepi.resources.ns3.classes.lte_ue_net_device.NS3LteUeNetDevice(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3netdevice.NS3BaseNetDevice

+
+ +
+
+

nepi.resources.ns3.classes.matrix_propagation_loss_model module¶

+
+
+class nepi.resources.ns3.classes.matrix_propagation_loss_model.NS3MatrixPropagationLossModel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3propagationlossmodel.NS3BasePropagationLossModel

+
+ +
+
+

nepi.resources.ns3.classes.mesh_point_device module¶

+
+
+class nepi.resources.ns3.classes.mesh_point_device.NS3MeshPointDevice(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3netdevice.NS3BaseNetDevice

+
+ +
+
+

nepi.resources.ns3.classes.mesh_wifi_interface_mac module¶

+
+
+class nepi.resources.ns3.classes.mesh_wifi_interface_mac.NS3MeshWifiInterfaceMac(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3wifimac.NS3BaseWifiMac

+
+ +
+
+

nepi.resources.ns3.classes.minstrel_wifi_manager module¶

+
+
+class nepi.resources.ns3.classes.minstrel_wifi_manager.NS3MinstrelWifiManager(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3wifiremotestationmanager.NS3BaseWifiRemoteStationManager

+
+ +
+
+

nepi.resources.ns3.classes.multi_model_spectrum_channel module¶

+
+
+class nepi.resources.ns3.classes.multi_model_spectrum_channel.NS3MultiModelSpectrumChannel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3channel.NS3BaseChannel

+
+ +
+
+

nepi.resources.ns3.classes.nakagami_propagation_loss_model module¶

+
+
+class nepi.resources.ns3.classes.nakagami_propagation_loss_model.NS3NakagamiPropagationLossModel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3propagationlossmodel.NS3BasePropagationLossModel

+
+ +
+
+

nepi.resources.ns3.classes.nist_error_rate_model module¶

+
+
+class nepi.resources.ns3.classes.nist_error_rate_model.NS3NistErrorRateModel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3errorratemodel.NS3BaseErrorRateModel

+
+ +
+
+

nepi.resources.ns3.classes.node module¶

+
+
+class nepi.resources.ns3.classes.node.NS3Node(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3node.NS3BaseNode

+
+ +
+
+

nepi.resources.ns3.classes.non_communicating_net_device module¶

+
+
+class nepi.resources.ns3.classes.non_communicating_net_device.NS3NonCommunicatingNetDevice(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3netdevice.NS3BaseNetDevice

+
+ +
+
+

nepi.resources.ns3.classes.ocb_wifi_mac module¶

+
+
+class nepi.resources.ns3.classes.ocb_wifi_mac.NS3OcbWifiMac(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3wifimac.NS3BaseWifiMac

+
+ +
+
+

nepi.resources.ns3.classes.oh_buildings_propagation_loss_model module¶

+
+
+class nepi.resources.ns3.classes.oh_buildings_propagation_loss_model.NS3OhBuildingsPropagationLossModel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3propagationlossmodel.NS3BasePropagationLossModel

+
+ +
+
+

nepi.resources.ns3.classes.okumura_hata_propagation_loss_model module¶

+
+
+class nepi.resources.ns3.classes.okumura_hata_propagation_loss_model.NS3OkumuraHataPropagationLossModel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3propagationlossmodel.NS3BasePropagationLossModel

+
+ +
+
+

nepi.resources.ns3.classes.on_off_application module¶

+
+
+class nepi.resources.ns3.classes.on_off_application.NS3OnOffApplication(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3application.NS3BaseApplication

+
+ +
+
+

nepi.resources.ns3.classes.onoe_wifi_manager module¶

+
+
+class nepi.resources.ns3.classes.onoe_wifi_manager.NS3OnoeWifiManager(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3wifiremotestationmanager.NS3BaseWifiRemoteStationManager

+
+ +
+
+

nepi.resources.ns3.classes.packet_sink module¶

+
+
+class nepi.resources.ns3.classes.packet_sink.NS3PacketSink(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3application.NS3BaseApplication

+
+ +
+
+

nepi.resources.ns3.classes.ping6 module¶

+
+
+class nepi.resources.ns3.classes.ping6.NS3Ping6(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3application.NS3BaseApplication

+
+ +
+
+

nepi.resources.ns3.classes.point_to_point_channel module¶

+
+
+class nepi.resources.ns3.classes.point_to_point_channel.NS3PointToPointChannel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3channel.NS3BaseChannel

+
+ +
+
+

nepi.resources.ns3.classes.point_to_point_net_device module¶

+
+
+class nepi.resources.ns3.classes.point_to_point_net_device.NS3PointToPointNetDevice(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3netdevice.NS3BaseNetDevice

+
+ +
+
+

nepi.resources.ns3.classes.point_to_point_remote_channel module¶

+
+
+class nepi.resources.ns3.classes.point_to_point_remote_channel.NS3PointToPointRemoteChannel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3channel.NS3BaseChannel

+
+ +
+
+

nepi.resources.ns3.classes.radvd module¶

+
+
+class nepi.resources.ns3.classes.radvd.NS3Radvd(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3application.NS3BaseApplication

+
+ +
+
+

nepi.resources.ns3.classes.random_direction2d_mobility_model module¶

+
+
+class nepi.resources.ns3.classes.random_direction2d_mobility_model.NS3RandomDirection2dMobilityModel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3mobilitymodel.NS3BaseMobilityModel

+
+ +
+
+

nepi.resources.ns3.classes.random_propagation_delay_model module¶

+
+
+class nepi.resources.ns3.classes.random_propagation_delay_model.NS3RandomPropagationDelayModel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3propagationdelaymodel.NS3BasePropagationDelayModel

+
+ +
+
+

nepi.resources.ns3.classes.random_propagation_loss_model module¶

+
+
+class nepi.resources.ns3.classes.random_propagation_loss_model.NS3RandomPropagationLossModel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3propagationlossmodel.NS3BasePropagationLossModel

+
+ +
+
+

nepi.resources.ns3.classes.random_walk2d_mobility_model module¶

+
+
+class nepi.resources.ns3.classes.random_walk2d_mobility_model.NS3RandomWalk2dMobilityModel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3mobilitymodel.NS3BaseMobilityModel

+
+ +
+
+

nepi.resources.ns3.classes.random_waypoint_mobility_model module¶

+
+
+class nepi.resources.ns3.classes.random_waypoint_mobility_model.NS3RandomWaypointMobilityModel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3mobilitymodel.NS3BaseMobilityModel

+
+ +
+
+

nepi.resources.ns3.classes.range_propagation_loss_model module¶

+
+
+class nepi.resources.ns3.classes.range_propagation_loss_model.NS3RangePropagationLossModel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3propagationlossmodel.NS3BasePropagationLossModel

+
+ +
+
+

nepi.resources.ns3.classes.rate_error_model module¶

+
+
+class nepi.resources.ns3.classes.rate_error_model.NS3RateErrorModel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3errormodel.NS3BaseErrorModel

+
+ +
+
+

nepi.resources.ns3.classes.receive_list_error_model module¶

+
+
+class nepi.resources.ns3.classes.receive_list_error_model.NS3ReceiveListErrorModel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3errormodel.NS3BaseErrorModel

+
+ +
+
+

nepi.resources.ns3.classes.red_queue module¶

+
+
+class nepi.resources.ns3.classes.red_queue.NS3RedQueue(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3queue.NS3BaseQueue

+
+ +
+
+

nepi.resources.ns3.classes.rraa_wifi_manager module¶

+
+
+class nepi.resources.ns3.classes.rraa_wifi_manager.NS3RraaWifiManager(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3wifiremotestationmanager.NS3BaseWifiRemoteStationManager

+
+ +
+
+

nepi.resources.ns3.classes.simple_channel module¶

+
+
+class nepi.resources.ns3.classes.simple_channel.NS3SimpleChannel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3channel.NS3BaseChannel

+
+ +
+
+

nepi.resources.ns3.classes.simple_net_device module¶

+
+
+class nepi.resources.ns3.classes.simple_net_device.NS3SimpleNetDevice(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3netdevice.NS3BaseNetDevice

+
+ +
+
+

nepi.resources.ns3.classes.single_model_spectrum_channel module¶

+
+
+class nepi.resources.ns3.classes.single_model_spectrum_channel.NS3SingleModelSpectrumChannel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3channel.NS3BaseChannel

+
+ +
+
+

nepi.resources.ns3.classes.six_low_pan_net_device module¶

+
+
+class nepi.resources.ns3.classes.six_low_pan_net_device.NS3SixLowPanNetDevice(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3netdevice.NS3BaseNetDevice

+
+ +
+
+

nepi.resources.ns3.classes.sta_wifi_mac module¶

+
+
+class nepi.resources.ns3.classes.sta_wifi_mac.NS3StaWifiMac(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3wifimac.NS3BaseWifiMac

+
+ +
+
+

nepi.resources.ns3.classes.steady_state_random_waypoint_mobility_model module¶

+
+
+class nepi.resources.ns3.classes.steady_state_random_waypoint_mobility_model.NS3SteadyStateRandomWaypointMobilityModel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3mobilitymodel.NS3BaseMobilityModel

+
+ +
+
+

nepi.resources.ns3.classes.subscriber_station_net_device module¶

+
+
+class nepi.resources.ns3.classes.subscriber_station_net_device.NS3SubscriberStationNetDevice(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3netdevice.NS3BaseNetDevice

+
+ +
+
+

nepi.resources.ns3.classes.tap_bridge module¶

+
+
+class nepi.resources.ns3.classes.tap_bridge.NS3TapBridge(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3netdevice.NS3BaseNetDevice

+
+ +
+
+

nepi.resources.ns3.classes.tcp_l4protocol module¶

+
+
+class nepi.resources.ns3.classes.tcp_l4protocol.NS3TcpL4Protocol(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3base.NS3Base

+
+ +
+
+

nepi.resources.ns3.classes.three_log_distance_propagation_loss_model module¶

+
+
+class nepi.resources.ns3.classes.three_log_distance_propagation_loss_model.NS3ThreeLogDistancePropagationLossModel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3propagationlossmodel.NS3BasePropagationLossModel

+
+ +
+
+

nepi.resources.ns3.classes.two_ray_ground_propagation_loss_model module¶

+
+
+class nepi.resources.ns3.classes.two_ray_ground_propagation_loss_model.NS3TwoRayGroundPropagationLossModel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3propagationlossmodel.NS3BasePropagationLossModel

+
+ +
+
+

nepi.resources.ns3.classes.uan_channel module¶

+
+
+class nepi.resources.ns3.classes.uan_channel.NS3UanChannel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3channel.NS3BaseChannel

+
+ +
+
+

nepi.resources.ns3.classes.udp_client module¶

+
+
+class nepi.resources.ns3.classes.udp_client.NS3UdpClient(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3application.NS3BaseApplication

+
+ +
+
+

nepi.resources.ns3.classes.udp_echo_client module¶

+
+
+class nepi.resources.ns3.classes.udp_echo_client.NS3UdpEchoClient(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3application.NS3BaseApplication

+
+ +
+
+

nepi.resources.ns3.classes.udp_echo_server module¶

+
+
+class nepi.resources.ns3.classes.udp_echo_server.NS3UdpEchoServer(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3application.NS3BaseApplication

+
+ +
+
+

nepi.resources.ns3.classes.udp_l4protocol module¶

+
+
+class nepi.resources.ns3.classes.udp_l4protocol.NS3UdpL4Protocol(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3base.NS3Base

+
+ +
+
+

nepi.resources.ns3.classes.udp_server module¶

+
+
+class nepi.resources.ns3.classes.udp_server.NS3UdpServer(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3application.NS3BaseApplication

+
+ +
+
+

nepi.resources.ns3.classes.udp_trace_client module¶

+
+
+class nepi.resources.ns3.classes.udp_trace_client.NS3UdpTraceClient(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3application.NS3BaseApplication

+
+ +
+
+

nepi.resources.ns3.classes.v4ping module¶

+
+
+class nepi.resources.ns3.classes.v4ping.NS3V4Ping(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3application.NS3BaseApplication

+
+ +
+
+

nepi.resources.ns3.classes.virtual_net_device module¶

+
+
+class nepi.resources.ns3.classes.virtual_net_device.NS3VirtualNetDevice(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3netdevice.NS3BaseNetDevice

+
+ +
+
+

nepi.resources.ns3.classes.waypoint_mobility_model module¶

+
+
+class nepi.resources.ns3.classes.waypoint_mobility_model.NS3WaypointMobilityModel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3mobilitymodel.NS3BaseMobilityModel

+
+ +
+
+

nepi.resources.ns3.classes.wifi_net_device module¶

+
+
+class nepi.resources.ns3.classes.wifi_net_device.NS3WifiNetDevice(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3wifinetdevice.NS3BaseWifiNetDevice

+
+ +
+
+

nepi.resources.ns3.classes.yans_error_rate_model module¶

+
+
+class nepi.resources.ns3.classes.yans_error_rate_model.NS3YansErrorRateModel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3errorratemodel.NS3BaseErrorRateModel

+
+ +
+
+

nepi.resources.ns3.classes.yans_wifi_channel module¶

+
+
+class nepi.resources.ns3.classes.yans_wifi_channel.NS3YansWifiChannel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3wifichannel.NS3BaseWifiChannel

+
+ +
+
+

nepi.resources.ns3.classes.yans_wifi_phy module¶

+
+
+class nepi.resources.ns3.classes.yans_wifi_phy.NS3YansWifiPhy(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3wifiphy.NS3BaseWifiPhy

+
+ +
+
+

Module contents¶

+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_layout/nepi.resources.ns3.html b/doc/sphinx/_build/html/_layout/nepi.resources.ns3.html new file mode 100644 index 00000000..5add2fcc --- /dev/null +++ b/doc/sphinx/_build/html/_layout/nepi.resources.ns3.html @@ -0,0 +1,1239 @@ + + + + + + + + nepi.resources.ns3 package — NEPI 3.0 documentation + + + + + + + + + + + + +
+
+

Table Of Contents

+ + +

This Page

+ + + +
+
+ +
+
+
+
+ +
+

nepi.resources.ns3 package¶

+
+

Subpackages¶

+
+ +
+
+
+

Submodules¶

+
+
+

nepi.resources.ns3.ns3application module¶

+
+
+class nepi.resources.ns3.ns3application.NS3BaseApplication(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3base.NS3Base

+
+
+do_start()[source]¶
+
+ +
+
+do_stop()[source]¶
+
+ +
+
+node[source]¶
+
+ +
+
+state[source]¶
+
+ +
+ +
+
+

nepi.resources.ns3.ns3arpl3protocol module¶

+
+
+class nepi.resources.ns3.ns3arpl3protocol.NS3BaseArpL3Protocol(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3base.NS3Base

+
+
+node[source]¶
+
+ +
+ +
+
+

nepi.resources.ns3.ns3base module¶

+
+
+class nepi.resources.ns3.ns3base.NS3Base(ec, guid)[source]¶
+

Bases: nepi.execution.resource.ResourceManager

+
+
+connected[source]¶
+
+ +
+
+do_deploy()[source]¶
+
+ +
+
+do_provision()[source]¶
+
+ +
+
+do_start()[source]¶
+
+ +
+
+do_stop()[source]¶
+
+ +
+
+get(name)[source]¶
+
+ +
+
+node[source]¶
+
+ +
+
+set(name, value)[source]¶
+
+ +
+
+simulation[source]¶
+
+ +
+
+state[source]¶
+
+ +
+
+trace(name, attr='all', block=512, offset=0)[source]¶
+
+ +
+
+uuid[source]¶
+
+ +
+ +
+
+

nepi.resources.ns3.ns3ccndceapplication module¶

+
+
+class nepi.resources.ns3.ns3ccndceapplication.NS3BaseCCNDceApplication(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3dceapplication.NS3BaseDceApplication

+
+
+ccn_client_helper_uuid[source]¶
+
+ +
+
+ccn_client_lock = <thread.lock object at 0x7f0290310f90>¶
+
+ +
+ +
+
+

nepi.resources.ns3.ns3channel module¶

+
+
+class nepi.resources.ns3.ns3channel.NS3BaseChannel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3base.NS3Base

+
+
+devices[source]¶
+
+ +
+
+simulation[source]¶
+
+ +
+ +
+
+

nepi.resources.ns3.ns3client module¶

+
+
+class nepi.resources.ns3.ns3client.NS3Client[source]¶
+

Bases: object

+

Common Interface for NS3 client classes

+
+
+create(*args, **kwargs)[source]¶
+
+ +
+
+factory(*args, **kwargs)[source]¶
+
+ +
+
+flush(*args, **kwargs)[source]¶
+
+ +
+
+get(*args, **kwargs)[source]¶
+
+ +
+
+invoke(*args, **kwargs)[source]¶
+
+ +
+
+set(*args, **kwargs)[source]¶
+
+ +
+
+shutdown(*args, **kwargs)[source]¶
+
+ +
+
+start(*args, **kwargs)[source]¶
+
+ +
+
+stop(*args, **kwargs)[source]¶
+
+ +
+ +
+
+

nepi.resources.ns3.ns3dceapplication module¶

+
+
+class nepi.resources.ns3.ns3dceapplication.NS3BaseDceApplication(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3application.NS3BaseApplication

+
+
+do_start()[source]¶
+
+ +
+
+do_stop()[source]¶
+
+ +
+
+pid[source]¶
+
+ +
+
+trace(name, attr='all', block=512, offset=0)[source]¶
+
+ +
+ +
+
+

nepi.resources.ns3.ns3dcehelper module¶

+
+
+class nepi.resources.ns3.ns3dcehelper.NS3DceHelper(simulation)[source]¶
+

Bases: object

+
+
+dce_application_lock[source]¶
+
+ +
+
+dce_application_uuid[source]¶
+
+ +
+
+dce_manager_lock[source]¶
+
+ +
+
+dce_manager_uuid[source]¶
+
+ +
+ +
+
+

nepi.resources.ns3.ns3errormodel module¶

+
+
+class nepi.resources.ns3.ns3errormodel.NS3BaseErrorModel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3base.NS3Base

+
+
+device[source]¶
+
+ +
+ +
+
+

nepi.resources.ns3.ns3errorratemodel module¶

+
+
+class nepi.resources.ns3.ns3errorratemodel.NS3BaseErrorRateModel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3base.NS3Base

+
+
+node[source]¶
+
+ +
+
+phy[source]¶
+
+ +
+ +
+
+

nepi.resources.ns3.ns3fdnetdevice module¶

+
+
+class nepi.resources.ns3.ns3fdnetdevice.NS3BaseFdNetDevice(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3netdevice.NS3BaseNetDevice

+
+
+recv_fd()[source]¶
+
+ +
+ +
+
+

nepi.resources.ns3.ns3icmpv4l4protocol module¶

+
+
+class nepi.resources.ns3.ns3icmpv4l4protocol.NS3BaseIcmpv4L4Protocol(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3base.NS3Base

+
+
+node[source]¶
+
+ +
+ +
+
+

nepi.resources.ns3.ns3ipv4l3protocol module¶

+
+
+class nepi.resources.ns3.ns3ipv4l3protocol.NS3BaseIpv4L3Protocol(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3base.NS3Base

+
+
+node[source]¶
+
+ +
+ +
+
+

nepi.resources.ns3.ns3mobilitymodel module¶

+
+
+class nepi.resources.ns3.ns3mobilitymodel.NS3BaseMobilityModel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3base.NS3Base

+
+ +
+
+

nepi.resources.ns3.ns3netdevice module¶

+
+
+class nepi.resources.ns3.ns3netdevice.NS3BaseNetDevice(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3base.NS3Base

+
+
+ascii_helper_uuid[source]¶
+
+ +
+
+channel[source]¶
+
+ +
+
+device_helper_uuid[source]¶
+
+ +
+
+node[source]¶
+
+ +
+
+queue[source]¶
+
+ +
+ +
+
+

nepi.resources.ns3.ns3node module¶

+
+
+class nepi.resources.ns3.ns3node.NS3BaseNode(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3base.NS3Base

+
+
+arp[source]¶
+
+ +
+
+dceapplications[source]¶
+
+ +
+
+devices[source]¶
+
+ +
+
+ipv4[source]¶
+
+ +
+
+mobility[source]¶
+
+ +
+
+node_id[source]¶
+
+ +
+
+simulation[source]¶
+
+ +
+ +
+
+

nepi.resources.ns3.ns3pipechanel module¶

+
+
+class nepi.resources.ns3.ns3pipechanel.NS3BasePipeChannel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3base.NS3Base

+

Interconnects two FdNetDevices with a PIPE

+
+
+devices[source]¶
+
+ +
+
+node[source]¶
+
+ +
+ +
+
+

nepi.resources.ns3.ns3propagationdelaymodel module¶

+
+
+class nepi.resources.ns3.ns3propagationdelaymodel.NS3BasePropagationDelayModel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3base.NS3Base

+
+
+channel[source]¶
+
+ +
+
+simulation[source]¶
+
+ +
+ +
+
+

nepi.resources.ns3.ns3propagationlossmodel module¶

+
+
+class nepi.resources.ns3.ns3propagationlossmodel.NS3BasePropagationLossModel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3base.NS3Base

+
+
+channel[source]¶
+
+ +
+
+simulation[source]¶
+
+ +
+ +
+
+

nepi.resources.ns3.ns3queue module¶

+
+
+class nepi.resources.ns3.ns3queue.NS3BaseQueue(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3base.NS3Base

+
+
+device[source]¶
+
+ +
+
+node[source]¶
+
+ +
+ +
+
+

nepi.resources.ns3.ns3route module¶

+
+
+class nepi.resources.ns3.ns3route.NS3Route(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3base.NS3Base

+
+
+node[source]¶
+
+ +
+ +
+
+

nepi.resources.ns3.ns3server module¶

+
+
+class nepi.resources.ns3.ns3server.NS3WrapperMessage[source]¶
+
+
+CREATE = 'CREATE'¶
+
+ +
+
+FACTORY = 'FACTORY'¶
+
+ +
+
+FLUSH = 'FLUSH'¶
+
+ +
+
+GET = 'GET'¶
+
+ +
+
+INVOKE = 'INVOKE'¶
+
+ +
+
+SET = 'SET'¶
+
+ +
+
+SHUTDOWN = 'SHUTDOWN'¶
+
+ +
+
+START = 'START'¶
+
+ +
+
+STOP = 'STOP'¶
+
+ +
+ +
+
+nepi.resources.ns3.ns3server.close_socket(sock)[source]¶
+
+ +
+
+nepi.resources.ns3.ns3server.get_options()[source]¶
+
+ +
+
+nepi.resources.ns3.ns3server.handle_message(ns3_wrapper, msg_type, args, kwargs)[source]¶
+
+ +
+
+nepi.resources.ns3.ns3server.open_socket(socket_name)[source]¶
+
+ +
+
+nepi.resources.ns3.ns3server.recv_msg(conn)[source]¶
+
+ +
+
+nepi.resources.ns3.ns3server.run_server(socket_name, level=20, ns_log=None, enable_dump=False)[source]¶
+
+ +
+
+nepi.resources.ns3.ns3server.send_reply(conn, reply)[source]¶
+
+ +
+
+

nepi.resources.ns3.ns3simulation module¶

+
+
+class nepi.resources.ns3.ns3simulation.NS3Simulation[source]¶
+

Bases: object

+
+
+client[source]¶
+
+ +
+
+create(*args, **kwargs)[source]¶
+
+ +
+
+factory(*args, **kwargs)[source]¶
+
+ +
+
+flush(*args, **kwargs)[source]¶
+
+ +
+
+invoke(*args, **kwargs)[source]¶
+
+ +
+
+ns3_get(*args, **kwargs)[source]¶
+
+ +
+
+ns3_set(*args, **kwargs)[source]¶
+
+ +
+
+shutdown(*args, **kwargs)[source]¶
+
+ +
+
+start(*args, **kwargs)[source]¶
+
+ +
+
+stop(*args, **kwargs)[source]¶
+
+ +
+ +
+
+

nepi.resources.ns3.ns3wifichannel module¶

+
+
+class nepi.resources.ns3.ns3wifichannel.NS3BaseWifiChannel(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3base.NS3Base

+
+
+phys[source]¶
+
+ +
+
+simulation[source]¶
+
+ +
+ +
+
+

nepi.resources.ns3.ns3wifimac module¶

+
+
+class nepi.resources.ns3.ns3wifimac.NS3BaseWifiMac(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3base.NS3Base

+
+
+device[source]¶
+
+ +
+
+node[source]¶
+
+ +
+ +
+
+

nepi.resources.ns3.ns3wifinetdevice module¶

+
+
+class nepi.resources.ns3.ns3wifinetdevice.NS3BaseWifiNetDevice(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3netdevice.NS3BaseNetDevice

+
+ +
+
+

nepi.resources.ns3.ns3wifiphy module¶

+
+
+class nepi.resources.ns3.ns3wifiphy.NS3BaseWifiPhy(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3base.NS3Base

+
+
+channel[source]¶
+
+ +
+
+device[source]¶
+
+ +
+
+node[source]¶
+
+ +
+ +
+
+

nepi.resources.ns3.ns3wifiremotestationmanager module¶

+
+
+class nepi.resources.ns3.ns3wifiremotestationmanager.NS3BaseWifiRemoteStationManager(ec, guid)[source]¶
+

Bases: nepi.resources.ns3.ns3base.NS3Base

+
+
+device[source]¶
+
+ +
+
+node[source]¶
+
+ +
+ +
+
+

nepi.resources.ns3.ns3wrapper module¶

+
+
+class nepi.resources.ns3.ns3wrapper.NS3Wrapper(loglevel=20, enable_dump=False)[source]¶
+

Bases: object

+
+
+allowed_types[source]¶
+
+ +
+
+create(clazzname, *args)[source]¶
+

This method should be used to construct ns-3 objects that +do not have a TypeId (e.g. Values)

+
+ +
+
+debuger[source]¶
+
+ +
+
+factory(type_name, **kwargs)[source]¶
+

This method should be used to construct ns-3 objects +that have a TypeId and related introspection information

+
+ +
+
+get(uuid, name)[source]¶
+
+ +
+
+get_object(uuid)[source]¶
+
+ +
+
+invoke(uuid, operation, *args, **kwargs)[source]¶
+
+ +
+
+is_finished[source]¶
+
+ +
+
+is_running[source]¶
+
+ +
+
+is_started[source]¶
+
+ +
+
+logger[source]¶
+
+ +
+
+make_uuid()[source]¶
+
+ +
+
+ns3[source]¶
+
+ +
+
+replace_args(args)[source]¶
+
+ +
+
+replace_kwargs(kwargs)[source]¶
+
+ +
+
+set(uuid, name, value)[source]¶
+
+ +
+
+shutdown()[source]¶
+
+ +
+
+start()[source]¶
+
+ +
+
+stop(time=None)[source]¶
+
+ +
+ +
+
+nepi.resources.ns3.ns3wrapper.load_ns3_libraries()[source]¶
+
+ +
+
+nepi.resources.ns3.ns3wrapper.load_ns3_module()[source]¶
+
+ +
+
+

nepi.resources.ns3.ns3wrapper_debug module¶

+
+
+class nepi.resources.ns3.ns3wrapper_debug.NS3WrapperDebuger(enabled)[source]¶
+

Bases: object

+
+
+dump_create(uuid, clazzname, args)[source]¶
+
+ +
+
+dump_factory(uuid, type_name, kwargs)[source]¶
+
+ +
+
+dump_get(uuid, name)[source]¶
+
+ +
+
+dump_header()[source]¶
+
+ +
+
+dump_invoke(newuuid, uuid, operation, args, kwargs)[source]¶
+
+ +
+
+dump_set(uuid, name, value)[source]¶
+
+ +
+
+dump_shutdown()[source]¶
+
+ +
+
+dump_start()[source]¶
+
+ +
+
+dump_stop(time=None)[source]¶
+
+ +
+
+dump_to_script(command)[source]¶
+
+ +
+
+enabled[source]¶
+
+ +
+
+format_args(args)[source]¶
+
+ +
+
+format_kwargs(kwargs)[source]¶
+
+ +
+
+format_value(value)[source]¶
+
+ +
+
+script_path[source]¶
+
+ +
+ +
+
+

nepi.resources.ns3.resource_manager_generator module¶

+
+
+nepi.resources.ns3.resource_manager_generator.create_ns3_rms()[source]¶
+
+ +
+
+nepi.resources.ns3.resource_manager_generator.select_base_class(ns3, tid)[source]¶
+
+ +
+
+nepi.resources.ns3.resource_manager_generator.template_attributes(ns3, tid)[source]¶
+
+ +
+
+nepi.resources.ns3.resource_manager_generator.template_traces(ns3, tid)[source]¶
+
+ +
+
+

Module contents¶

+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_layout/nepi.resources.omf.html b/doc/sphinx/_build/html/_layout/nepi.resources.omf.html new file mode 100644 index 00000000..c4353be0 --- /dev/null +++ b/doc/sphinx/_build/html/_layout/nepi.resources.omf.html @@ -0,0 +1,1597 @@ + + + + + + + + nepi.resources.omf package — NEPI 3.0 documentation + + + + + + + + + + + + + + +
+
+
+
+ +
+

nepi.resources.omf package¶

+
+

Submodules¶

+
+
+

nepi.resources.omf.application module¶

+
+
+class nepi.resources.omf.application.OMFApplication(ec, guid)[source]¶
+

Bases: nepi.resources.omf.omf_resource.OMFResource

+
+
+Class Args :
+
+++ + + + +
Parameters:
    +
  • ec (ExperimentController) – The Experiment controller
  • +
  • guid (int) – guid of the RM
  • +
+
+
+ +
+
+add_set_hook()[source]¶
+

Initialize the hooks for OMF 5.4 only

+
+ +
+
+check_deploy(cid)[source]¶
+

Check, through the mail box in the parser, +if the confirmation of the creation has been received

+ +++ + + + +
Parameters:cid – the id of the original message
+
+ +
+
+check_release(cid)[source]¶
+

Check, through the mail box in the parser, +if the confirmation of the release has been received

+ +++ + + + +
Parameters:cid – the id of the original message
+
+ +
+
+check_start(uid)[source]¶
+

Check, through the mail box in the parser, +if the confirmation of the start has been received

+ +++ + + + +
Parameters:uid – the id of the original message
+
+ +
+
+do_deploy()[source]¶
+

Deploy the RM. It means nothing special for an application +for now (later it will be upload sources, ...) +It becomes DEPLOYED after the topic for the application has been created

+
+ +
+
+do_release()[source]¶
+

Clean the RM at the end of the experiment and release the API.

+
+ +
+
+do_start()[source]¶
+

Start the RM. It means : Send Xmpp Message Using OMF protocol +to execute the application.

+
+ +
+
+do_stop()[source]¶
+

Stop the RM. It means : Send Xmpp Message Using OMF protocol to +kill the application. +State is set to STOPPED after the message is sent.

+
+ +
+
+exp_id[source]¶
+
+ +
+
+node[source]¶
+
+ +
+
+stdin_hook(old_value, new_value)[source]¶
+

Set a hook to the stdin attribute in order to send a message at each time +the value of this parameter is changed. Used ofr OMF 5.4 only

+
+ +
+
+trace(name, attr='all', block=512, offset=0)[source]¶
+
+ +
+
+valid_connection(guid)[source]¶
+

Check if the connection with the guid in parameter is possible. +Only meaningful connections are allowed.

+ +++ + + + + + +
Parameters:guid (int) – Guid of RM it will be connected
Return type:Boolean
+
+ +
+ +
+
+

nepi.resources.omf.channel module¶

+
+
+class nepi.resources.omf.channel.OMFChannel(ec, guid)[source]¶
+

Bases: nepi.resources.omf.omf_resource.OMFResource

+
+
+Class Args :
+
+++ + + + +
Parameters:
    +
  • ec (ExperimentController) – The Experiment controller
  • +
  • guid (int) – guid of the RM
  • +
  • creds (dict) – Credentials to communicate with the rm (XmppClient for OMF)
  • +
+
+
+ +
+
+ChannelToFreq = {'11': '2462', '10': '2457', '13': '2472', '12': '2467', '1': '2412', '3': '2422', '2': '2417', '5': '2432', '4': '2427', '7': '2442', '6': '2437', '9': '2452', '8': '2447'}¶
+
+ +
+
+do_deploy()[source]¶
+

Deploy the RM. It means : Get the xmpp client and send messages +using OMF 5.4 or 6 protocol to configure the channel.

+
+ +
+
+do_release()[source]¶
+

Clean the RM at the end of the experiment and release the API

+
+ +
+
+exp_id[source]¶
+
+ +
+
+get_frequency(channel)[source]¶
+

Returns the frequency of a specific channel number

+
+ +
+
+valid_connection(guid)[source]¶
+

Check if the connection with the guid in parameter is possible. +Only meaningful connections are allowed.

+ +++ + + + + + +
Parameters:guid (int) – Guid of the current RM
Return type:Boolean
+
+ +
+ +
+
+

nepi.resources.omf.interface module¶

+
+
+class nepi.resources.omf.interface.OMFWifiInterface(ec, guid)[source]¶
+

Bases: nepi.resources.omf.omf_resource.OMFResource

+
+
+Class Args :
+
+++ + + + +
Parameters:
    +
  • ec (ExperimentController) – The Experiment controller
  • +
  • guid (int) – guid of the RM
  • +
+
+
+ +
+
+channel[source]¶
+
+ +
+
+check_deploy(cid)[source]¶
+

Check, through the mail box in the parser, +if the confirmation of the creation has been received

+ +++ + + + +
Parameters:cid – the id of the original message
+
+ +
+
+check_release(cid)[source]¶
+

Check, through the mail box in the parser, +if the confirmation of the release has been received

+ +++ + + + +
Parameters:cid – the id of the original message
+
+ +
+
+configure_iface()[source]¶
+

Configure the interface without the ip

+
+ +
+
+configure_ip()[source]¶
+

Configure the ip of the interface

+

CELL ID shraing problem. By putting th ip at the end of the configuration, +each node use the same channel and can then share the same CELL ID. +In the second case, the channel is defined at the end and the node don’t +share a common CELL ID and can not communicate.

+
+ +
+
+configure_on_omf5()[source]¶
+

Method to configure the wifi interface when OMF 5.4 is used.

+
+ +
+
+configure_on_omf6()[source]¶
+

Method to configure the wifi interface when OMF 6 is used.

+
+ +
+
+do_deploy()[source]¶
+

Deploy the RM. It means : Get the xmpp client and send messages +using OMF 5.4 or 6 protocol to configure the interface.

+
+ +
+
+do_release()[source]¶
+

Clean the RM at the end of the experiment and release the API

+
+ +
+
+exp_id[source]¶
+
+ +
+
+node[source]¶
+
+ +
+
+valid_connection(guid)[source]¶
+

Check if the connection with the guid in parameter is possible. +Only meaningful connections are allowed.

+ +++ + + + + + +
Parameters:guid (int) – Guid of the current RM
Return type:Boolean
+
+ +
+ +
+
+

nepi.resources.omf.messages_5_4 module¶

+
+
+class nepi.resources.omf.messages_5_4.MessageHandler(sliceid, expid)[source]¶
+
+
+Class Args :
+
+++ + + + +
Parameters:
    +
  • sliceid – Slice Name (= Xmpp Slice)
  • +
  • expid (str) – Experiment ID (= Xmpp User)
  • +
+
+
+ +
+

Note

+

This class is used only for OMF 5.4 Protocol and is going to become unused

+
+
+
+alias_function(name, target)[source]¶
+

Build an Alias Message

+ +++ + + + +
Parameters:
    +
  • name (str) – Name of the new alias
  • +
  • target (str) – Hrn of the target node (ex : omf.plexus.wlab17)
  • +
+
+
+ +
+
+configure_function(target, value, path)[source]¶
+

Build a Configure Message

+ +++ + + + +
Parameters:
    +
  • target (str) – Hrn of the target node (ex : omf.plexus.wlab17)
  • +
  • value (int) – guid of the RM
  • +
  • path (dict) – Path of the element to configure (ex : net/w0/channel)
  • +
+
+
+ +
+
+enroll_function(enrollkey, image, index, target)[source]¶
+

Build an Enroll Message

+ +++ + + + +
Parameters:
    +
  • enrollkey (str) – Type of enrollment (= 1)
  • +
  • image (str) – Image (= * when all the nodes are concerned)
  • +
  • index (str) – Index (= 1 in general)
  • +
  • target (str) – Hrn of the target node (ex : omf.plexus.wlab17)
  • +
+
+
+ +
+
+execute_function(target, appid, cmdlineargs, path, env)[source]¶
+

Build an Execute Message

+ +++ + + + +
Parameters:
    +
  • target (str) – Hrn of the target node (ex : omf.plexus.wlab17)
  • +
  • appid (str) – Application id
  • +
  • cmdlineargs (str) – Arguments of the application
  • +
  • path (str) – Path of the application
  • +
  • env (str) – Environment variables
  • +
+
+
+ +
+
+exit_function(target, appid)[source]¶
+

Build an Exit Message

+ +++ + + + +
Parameters:
    +
  • target (str) – Hrn of the target node (ex : omf.plexus.wlab17)
  • +
  • appid (str) – Application id (ex : vlc#1)
  • +
+
+
+ +
+
+log_function(level, logger, level_name, data)[source]¶
+

Build a Log Message

+ +++ + + + +
Parameters:
    +
  • level (str) – Level of logging
  • +
  • logger (str) – Element publishing the log
  • +
  • level_name (str) – Name of the level (ex : INFO)
  • +
  • data (str) – Content to publish
  • +
+
+
+ +
+
+newexp_function(experimentid, address)[source]¶
+

Build a NewExp Message

+ +++ + + + +
Parameters:
    +
  • experimentid (str) – Id of the new experiment
  • +
  • address (str) – Adress of the destination set of nodes
  • +
+
+
+ +
+
+noop_function(target)[source]¶
+

Build a Noop Message

+ +++ + + + +
Parameters:target (str) – Hrn of the target node (ex : omf.plexus.wlab17)
+
+ +
+
+stdin_function(target, value, appid)[source]¶
+

Build an Execute Message

+ +++ + + + +
Parameters:
    +
  • value (str) – parameter that go in the stdin
  • +
  • target (str) – Hrn of the target node (ex : omf.plexus.wlab17)
  • +
  • appid (str) – Application id
  • +
+
+
+ +
+ +
+
+

nepi.resources.omf.messages_6 module¶

+
+
+class nepi.resources.omf.messages_6.MessageHandler[source]¶
+
+
+Class Args :
+
+++ + + + +
Parameters:
    +
  • sliceid – Slice Name (= Xmpp Slice)
  • +
  • expid (str) – Experiment ID (= Xmpp User)
  • +
+
+
+ +
+

Note

+

This class is used only for OMF 5.4 Protocol and is going to become unused

+
+
+
+configure_function(msg_id, src, timestamp, props=None, guards=None)[source]¶
+

Build a configure message

+ +++ + + + +
Parameters:
    +
  • msg_id (str) – Id of the message
  • +
  • src (str) – Src node that send the message (jabber source)
  • +
  • timestamp (str) – Unix Timestamp
  • +
  • props (list) – List of properties
  • +
  • guards (list) – list of guards (assertions for properties)
  • +
+
+
+ +
+
+create_function(msg_id, src, rtype, timestamp, props=None, guards=None)[source]¶
+

Build a create message

+ +++ + + + +
Parameters:
    +
  • msg_id (str) – Id of the message
  • +
  • src (str) – Src node that send the message (jabber source)
  • +
  • rtype (str) – Type of the object
  • +
  • timestamp (str) – Unix Timestamp
  • +
  • props (list) – List of properties
  • +
  • guards (list) – list of guards (assertions for properties)
  • +
+
+
+ +
+
+release_function(msg_id, src, timestamp, res_id=None, props=None, guards=None)[source]¶
+

Build a release message

+ +++ + + + +
Parameters:
    +
  • msg_id (str) – Id of the message
  • +
  • src (str) – Src node that send the message (jabber source)
  • +
  • timestamp (str) – Unix Timestamp
  • +
  • res_id (str) – Id of the release resource
  • +
  • props (list) – List of properties
  • +
  • guards (list) – list of guards (assertions for properties)
  • +
+
+
+ +
+
+request_function(msg_id, src, timestamp, props=None, guards=None)[source]¶
+

Build a request message

+ +++ + + + +
Parameters:
    +
  • msg_id (str) – Id of the message
  • +
  • src (str) – Src node that send the message (jabber source)
  • +
  • timestamp (str) – Unix Timestamp
  • +
  • props (list) – List of properties
  • +
  • guards (list) – list of guards (assertions for properties)
  • +
+
+
+ +
+ +
+
+

nepi.resources.omf.node module¶

+
+
+class nepi.resources.omf.node.OMFNode(ec, guid)[source]¶
+

Bases: nepi.resources.omf.omf_resource.OMFResource

+
+
+Class Args :
+
+++ + + + +
Parameters:
    +
  • ec (ExperimentController) – The Experiment controller
  • +
  • guid (int) – guid of the RM
  • +
  • creds (dict) – Credentials to communicate with the rm (XmppClient for OMF)
  • +
+
+
+ +
+
+do_deploy()[source]¶
+

Deploy the RM. It means : Send Xmpp Message Using OMF protocol +to enroll the node into the experiment.

+
+ +
+
+do_release()[source]¶
+

Clean the RM at the end of the experiment by unenrolling +the node from the topic

+
+ +
+
+exp_id[source]¶
+
+ +
+
+valid_connection(guid)[source]¶
+

Check if the connection with the guid in parameter is possible. +Only meaningful connections are allowed.

+ +++ + + + + + +
Parameters:guid (int) – Guid of the current RM
Return type:Boolean
+
+ +
+ +
+
+

nepi.resources.omf.omf5_api module¶

+
+
+class nepi.resources.omf.omf5_api.OMF5API(host, slice, port, password, xmpp_root=None, exp_id=None)[source]¶
+

Bases: nepi.util.logger.Logger

+
+
+Class Args :
+
+++ + + + +
Parameters:
    +
  • host (str) – Xmpp Server
  • +
  • slice (str) – Xmpp Slice
  • +
  • port (str) – Xmpp Port
  • +
  • password (str) – Xmpp password
  • +
  • xmpp_root (str) – Root of the Xmpp Topic Architecture
  • +
+
+
+ +
+

Note

+

This class is the implementation of an OMF 5.4 API. +Since the version 5.4.1, the Topic Architecture start with OMF_5.4 +instead of OMF used for OMF5.3

+
+
+
+configure(hostname, attribute, value)[source]¶
+

Configure attribute on the node

+ +++ + + + +
Parameters:
    +
  • hostname (str) – Full hrn of the node
  • +
  • attribute (str) – Attribute that need to be configured ( +often written as /net/wX/attribute, with X the interface number)
  • +
  • value (str) – Value of the attribute
  • +
+
+
+ +
+
+delete(hostname)[source]¶
+

Delete the topic corresponding to the hostname for this session

+ +++ + + + +
Parameters:hostname (str) – Full hrn of the node
+
+ +
+
+disconnect()[source]¶
+

Delete the session and logger topics. Then disconnect

+
+ +
+
+enroll_host(hostname)[source]¶
+
+
Create and Subscribe to the session topic and the resources
+
corresponding to the hostname
+
+ +++ + + + +
Parameters:hostname (str) – Full hrn of the node
+
+ +
+
+execute(hostname, app_id, arguments, path, env)[source]¶
+

Execute command on the node

+ +++ + + + +
Parameters:
    +
  • hostname (str) – Full hrn of the node
  • +
  • app_id (str) – Application Id (Any id that represents in a unique +way the application)
  • +
  • arguments (str) – Arguments of the application
  • +
  • path (str) – Path of the application
  • +
  • env (str) – Environnement values for the application
  • +
+
+
+ +
+
+exit(hostname, app_id)[source]¶
+

Kill an application started with OMF

+ +++ + + + +
Parameters:
    +
  • hostname (str) – Full hrn of the node
  • +
  • app_id (str) – Application Id of the application you want to stop
  • +
+
+
+ +
+
+release(hostname)[source]¶
+

Delete the session and logger topics. Then disconnect

+
+ +
+
+send_stdin(hostname, value, app_id)[source]¶
+

Send to the stdin of the application the value

+ +++ + + + +
Parameters:
    +
  • hostname (str) – Full hrn of the node
  • +
  • appid (str) – Application Id (Any id that represents in a unique +way the application)
  • +
  • value (str) – parameter to execute in the stdin of the application
  • +
+
+
+ +
+ +
+
+

nepi.resources.omf.omf6_api module¶

+
+
+class nepi.resources.omf.omf6_api.OMF6API(server, user='nepi', port='5222', password='1234', exp_id=None)[source]¶
+

Bases: nepi.util.logger.Logger

+
+
+Class Args :
+
+++ + + + +
Parameters:
    +
  • server (str) – Xmpp Server
  • +
  • user (str) – Xmpp User
  • +
  • port (str) – Xmpp Port
  • +
  • password (str) – Xmpp password
  • +
  • xmpp_root (str) – Root of the Xmpp Topic Architecture
  • +
+
+
+ +
+

Note

+

This class is the implementation of an OMF 5.4 API. +Since the version 5.4.1, the Topic Architecture start with OMF_5.4 +instead of OMF used for OMF5.3

+
+
+
+check_mailbox(itype, attr)[source]¶
+

Check the mail box

+ +++ + + + +
Parameters:
    +
  • itype (str) – type of mail
  • +
  • attr (str) – value wanted
  • +
+
+
+ +
+
+check_ready(xmpp)[source]¶
+
+ +
+
+create_and_enroll_topic(topic)[source]¶
+
+
Create and Subscribe to the session topic and the resources
+
corresponding to the hostname
+
+ +++ + + + +
Parameters:hostname (str) – Full hrn of the node
+
+ +
+
+disconnect()[source]¶
+

Delete the session and logger topics. Then disconnect

+
+ +
+
+enroll_topic(topic)[source]¶
+

Create and Subscribe to the session topic and the resources +corresponding to the hostname

+
+ +
+
+frcp_configure(topic, props=None, guards=None)[source]¶
+

Publish a configure message

+
+ +
+
+frcp_create(msg_id, topic, rtype, props=None, guards=None)[source]¶
+

Publish a create message

+
+ +
+
+frcp_inform(topic, cid, itype)[source]¶
+

Publish an inform message

+
+ +
+
+frcp_release(msg_id, parent, child, res_id=None, props=None, guards=None)[source]¶
+

Publish a release message

+
+ +
+
+frcp_request(topic, props=None, guards=None)[source]¶
+

Execute command on the node

+
+ +
+
+unenroll_topic(topic)[source]¶
+

Create and Subscribe to the session topic and the resources +corresponding to the hostname

+
+ +
+ +
+
+

nepi.resources.omf.omf6_parser module¶

+
+
+class nepi.resources.omf.omf6_parser.OMF6Parser[source]¶
+

Bases: nepi.util.logger.Logger

+
+
+Class Args :
+
+++ + + + +
Parameters:
    +
  • jid (str) – Jabber Id (= Xmpp Slice + Date)
  • +
  • password (str) – Jabber Password (= Xmpp Password)
  • +
+
+
+ +
+

Note

+

This class is an XMPP Client with customized method

+
+
+
+check_mailbox(itype, attr)[source]¶
+

Check the mail box

+ +++ + + + +
Parameters:
    +
  • itype (str) – type of mail
  • +
  • attr (str) – value wanted
  • +
+
+
+ +
+
+handle(iq)[source]¶
+

Check the mail box

+ +++ + + + +
Parameters:iq – message received
+
+ +
+
+init_mailbox()[source]¶
+
+ +
+ +
+
+

nepi.resources.omf.omf_api_factory module¶

+
+
+class nepi.resources.omf.omf_api_factory.OMFAPIFactory[source]¶
+

Bases: object

+
+

Note

+

It allows the different RM to use the same xmpp client if they use +the same credentials. For the moment, it is focused on XMPP.

+
+
+
+classmethod create_api(version, server, user, port, password, exp_id)[source]¶
+

Create an OMF API if this one doesn’t exist yet with this credentials

+ +++ + + + +
Parameters:
    +
  • version (str) – OMF Version. Either 5 or 6
  • +
  • server (str) – Xmpp Server Adress
  • +
  • user (str) – Xmpp User
  • +
  • port (str) – Xmpp Port (Default : 5222)
  • +
  • password (str) – Xmpp Password
  • +
  • exp_id (str) – Id of the experiment
  • +
+
+
+ +
+
+classmethod get_api(version, server, user, port, password, exp_id=None)[source]¶
+

Get an OMF Api

+ +++ + + + +
Parameters:
    +
  • version (str) – OMF Version. Either 5 or 6
  • +
  • server (str) – Xmpp Server Adress
  • +
  • user (str) – Xmpp User
  • +
  • port (str) – Xmpp Port (Default : 5222)
  • +
  • password (str) – Xmpp Password
  • +
  • exp_id (str) – Id of the experiment
  • +
+
+
+ +
+
+lock = <thread.lock object at 0x7f028fc193b0>¶
+
+ +
+
+classmethod release_api(version, server, user, port, password, exp_id=None)[source]¶
+

Release an OMF API with this credentials

+ +++ + + + +
Parameters:
    +
  • version (str) – OMF Version. Either 5 or 6
  • +
  • server (str) – Xmpp Server Adress
  • +
  • user (str) – Xmpp User
  • +
  • port (str) – Xmpp Port (Default : 5222)
  • +
  • password (str) – Xmpp Password
  • +
  • exp_id (str) – Id of the experiment
  • +
+
+
+ +
+ +
+
+

nepi.resources.omf.omf_client module¶

+
+
+class nepi.resources.omf.omf_client.BaseOMFClient(jid, password, ssl=False, plugin_config={}, plugin_whitelist=[], escape_quotes=True, sasl_mech=None)[source]¶
+

Bases: sleekxmpp.clientxmpp.ClientXMPP

+
+ +
+
+class nepi.resources.omf.omf_client.OMFClient(jid, password)[source]¶
+

Bases: nepi.resources.omf.omf_client.BaseOMFClient, nepi.util.logger.Logger

+
+
+Class Args :
+
+++ + + + +
Parameters:
    +
  • jid (str) – Jabber Id (= Xmpp Slice + Date)
  • +
  • password (str) – Jabber Password (= Xmpp Password)
  • +
+
+
+ +
+

Note

+

This class is an XMPP Client with customized method

+
+
+
+check_mailbox(itype, attr)[source]¶
+

Check the mail box

+ +++ + + + +
Parameters:
    +
  • itype (str) – type of mail
  • +
  • attr (str) – value wanted
  • +
+
+
+ +
+
+create(node)[source]¶
+

Create the topic corresponding to the node

+ +++ + + + +
Parameters:node (str) – Name of the topic, corresponding to the node (ex : omf.plexus.wlab17)
+
+ +
+
+delete(node)[source]¶
+

Delete the topic corresponding to the node

+ +++ + + + +
Parameters:node (str) – Name of the topic, corresponding to the node (ex : omf.plexus.wlab17)
+
+ +
+
+get(data)[source]¶
+

Get the item

+ +++ + + + +
Parameters:data (str) – data from which the items will be get back
+
+ +
+
+handle_omf_message(iq)[source]¶
+

Handle published/received message

+ +++ + + + +
Parameters:iq (Iq Stanza) – Stanzas that is currently published/received
+
+ +
+
+nodes()[source]¶
+

Get all the nodes of the Xmppp Server.

+
+ +
+
+publish(data, node)[source]¶
+

Publish the data to the corresponding topic

+ +++ + + + +
Parameters:
    +
  • data (str) – Data that will be published
  • +
  • node (str) – Name of the topic
  • +
+
+
+ +
+
+purge()[source]¶
+

Purge the information in the server

+
+ +
+
+ready[source]¶
+

Check if the client is ready

+
+ +
+
+register(iq)[source]¶
+

Register to the Xmppp Server. This function is called directly by the sleekXmpp library

+
+ +
+
+retract(data)[source]¶
+

Retract the item

+ +++ + + + +
Parameters:data (str) – data from which the item will be retracted
+
+ +
+
+start(event)[source]¶
+

Send presence to the Xmppp Server. This function is called directly by the sleekXmpp library

+
+ +
+
+subscribe(node)[source]¶
+

Subscribe to a topic

+ +++ + + + +
Parameters:node (str) – Name of the topic
+
+ +
+
+subscriptions()[source]¶
+

Get all the subscriptions of the Xmppp Server.

+
+ +
+
+unregister()[source]¶
+

Unregister from the Xmppp Server.

+
+ +
+
+unsubscribe(node)[source]¶
+

Unsubscribe to a topic

+ +++ + + + +
Parameters:node (str) – Name of the topic
+
+ +
+ +
+
+

nepi.resources.omf.omf_resource module¶

+
+
+class nepi.resources.omf.omf_resource.OMFResource(ec, guid)[source]¶
+

Bases: nepi.execution.resource.ResourceManager

+

Generic resource gathering XMPP credential information and common methods +for OMF nodes, channels, applications, etc.

+
+ +
+
+class nepi.resources.omf.omf_resource.ResourceGateway[source]¶
+

Dictionary used to set OMF gateway depending on Testbed information.

+
+
+AMtoGateway = {'nitlab.inf.uth.gr': 'nitlab.inf.uth.gr', 'nicta': '??.??.??', 'am.wilab2.ilabt.iminds.be': 'ops.wilab2.ilabt.iminds.be'}¶
+
+ +
+
+TestbedtoGateway = {'wilabt': 'ops.wilab2.ilabt.iminds.be', 'nicta': '??.??.??', 'nitos': 'nitlab.inf.uth.gr'}¶
+
+ +
+ +
+
+

nepi.resources.omf.wilabt_node module¶

+
+
+class nepi.resources.omf.wilabt_node.WilabtSfaNode(ec, guid)[source]¶
+

Bases: nepi.resources.omf.node.OMFNode

+
+
+do_deploy()[source]¶
+
+ +
+
+do_discover()[source]¶
+

Based on the attributes defined by the user, discover the suitable +node for provision.

+
+ +
+
+do_provision()[source]¶
+

Add node to user’s slice and verifing that the node is functioning +correctly. Check ssh, omf rc running, hostname, file system.

+
+ +
+
+do_release()[source]¶
+
+ +
+
+execute(command, sudo=False, env=None, tty=False, forward_x11=False, retry=3, connect_timeout=30, strict_host_checking=False, persistent=True, blocking=True)[source]¶
+

Notice that this invocation will block until the +execution finishes. If this is not the desired behavior, +use ‘run’ instead.

+
+ +
+
+fail_discovery()[source]¶
+
+ +
+
+fail_node_not_alive(host=None)[source]¶
+
+ +
+
+fail_node_not_available(host)[source]¶
+
+ +
+
+fail_not_enough_nodes()[source]¶
+
+ +
+
+fail_sfaapi()[source]¶
+
+ +
+
+sfaapi[source]¶
+

Property to instanciate the SFA API based in sfi client. +For each SFA method called this instance is used.

+
+ +
+
+valid_connection(guid)[source]¶
+
+ +
+ +
+
+

Module contents¶

+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_layout/nepi.resources.planetlab.html b/doc/sphinx/_build/html/_layout/nepi.resources.planetlab.html new file mode 100644 index 00000000..8477bca4 --- /dev/null +++ b/doc/sphinx/_build/html/_layout/nepi.resources.planetlab.html @@ -0,0 +1,629 @@ + + + + + + + + nepi.resources.planetlab package — NEPI 3.0 documentation + + + + + + + + + + + + + + +
+
+
+
+ +
+

nepi.resources.planetlab package¶

+ +
+

Submodules¶

+
+
+

nepi.resources.planetlab.node module¶

+
+
+class nepi.resources.planetlab.node.PlanetlabNode(ec, guid)[source]¶
+

Bases: nepi.resources.linux.node.LinuxNode

+
+
+do_discover()[source]¶
+

Based on the attributes defined by the user, discover the suitable +nodes for provision.

+
+ +
+
+do_provision()[source]¶
+

Add node to user’s slice after verifing that the node is functioning +correctly

+
+ +
+
+do_release()[source]¶
+
+ +
+
+fail_discovery()[source]¶
+
+ +
+
+fail_node_not_alive(hostname=None)[source]¶
+
+ +
+
+fail_node_not_available(hostname)[source]¶
+
+ +
+
+fail_not_enough_nodes()[source]¶
+
+ +
+
+fail_plapi()[source]¶
+
+ +
+
+lock = <thread.lock object at 0x7f028fc19a70>¶
+
+ +
+
+plapi[source]¶
+
+ +
+
+valid_connection(guid)[source]¶
+
+ +
+ +
+
+

nepi.resources.planetlab.plcapi module¶

+
+
+class nepi.resources.planetlab.plcapi.PLCAPI(username, password, hostname, urlpattern, ec, proxy, session_key=None, local_peer='PLE')[source]¶
+

Bases: object

+
+
+add_slice_nodes(slicename, nodes)[source]¶
+
+ +
+
+api[source]¶
+
+ +
+
+blacklist_host(node_id)[source]¶
+
+ +
+
+blacklisted()[source]¶
+
+ +
+
+delete_slice_node(slice_id_or_name, node_id_or_hostname)[source]¶
+
+ +
+
+finish_multicall()[source]¶
+
+ +
+
+get_interfaces(interface_id_or_ip=None, fields=None, **kw)[source]¶
+
+ +
+
+get_node_flavour(node)[source]¶
+

Returns detailed information on a given node’s flavour, +i.e. its base installation.

+

This depends on the global PLC settings in the PLC_FLAVOUR area, +optionnally overridden by any of the following tags if set on that node: +‘arch’, ‘pldistro’, ‘fcdistro’, ‘deployment’, ‘extensions’

+

Params:

+
+
    +
  • +
    node : int or string
    +
      +
    • int, Node identifier
    • +
    • string, Fully qualified hostname
    • +
    +
    +
    +
  • +
+
+

Returns:

+
+
+
struct
+
    +
  • extensions : array of string, extensions to add to the base install
  • +
  • fcdistro : string, the fcdistro this node should be based upon
  • +
  • nodefamily : string, the nodefamily this node should be based upon
  • +
  • plain : boolean, use plain bootstrapfs image if set (for tests)
  • +
+
+
+
+
+ +
+
+get_node_info(node_id)[source]¶
+
+ +
+
+get_node_tags(node_tag_id=None, fields=None, **kw)[source]¶
+
+ +
+
+get_nodes(node_id_or_name=None, fields=None, **kw)[source]¶
+

Returns an array of structs containing details about nodes. +If node_id_or_name is specified and is an array of node identifiers +or hostnames, or the filters keyword argument with struct of node +attributes, or node attributes by keyword argument, +only nodes matching the filter will be returned.

+

If fields is specified, only the specified details will be returned. +NOTE that if fields is unspecified, the complete set of native fields are +returned, which DOES NOT include tags at this time.

+

Some fields may only be viewed by admins.

+

Special params:

+
+

fields: an optional list of fields to retrieve. The default is all.

+
+
filters: an optional mapping with custom filters, which is the only
+
way to support complex filters like negation and numeric comparisons.
+
peer: a string (or sequence of strings) with the name(s) of peers
+
to filter - or None for local nodes.
+
+
+
+ +
+
+get_slice_id(slicename)[source]¶
+
+ +
+
+get_slice_nodes(slicename)[source]¶
+
+ +
+
+get_slice_tags(slice_tag_id=None, fields=None, **kw)[source]¶
+
+ +
+
+get_slice_vnet_sys_tag(slicename)[source]¶
+
+ +
+
+get_slices(slice_id_or_name=None, fields=None, **kw)[source]¶
+
+ +
+
+mcapi[source]¶
+
+ +
+
+network_types[source]¶
+
+ +
+
+peer_map[source]¶
+
+ +
+
+release()[source]¶
+
+ +
+
+reserve_host(node_id)[source]¶
+
+ +
+
+reserved()[source]¶
+
+ +
+
+start_multicall()[source]¶
+
+ +
+
+test()[source]¶
+
+ +
+
+unblacklist_host(node_id)[source]¶
+
+ +
+
+unreserve_host(node_id)[source]¶
+
+ +
+
+update_slice(slice_id_or_name, **kw)[source]¶
+
+ +
+ +
+
+class nepi.resources.planetlab.plcapi.PLCAPIFactory[source]¶
+

Bases: object

+
+

Note

+

It allows PlanetLab RMs sharing a same slice, to use a same plcapi instance, +and to sincronize blacklisted and reserved hosts.

+
+
+
+classmethod create_api(pl_user, pl_pass, pl_host, pl_ptn, ec, proxy=None)[source]¶
+

Create an PLCAPI instance

+ +++ + + + +
Parameters:
    +
  • pl_user (str) – Planelab user name (used for web login)
  • +
  • pl_pass (str) – Planetlab password (used for web login)
  • +
  • pl_host (str) – Planetlab registry host (e.g. “www.planet-lab.eu”)
  • +
  • pl_ptn (str) – XMLRPC service pattern (e.g. https://%(hostname)s:443/PLCAPI/)
  • +
  • proxy – Proxy service url
  • +
+
+
+ +
+
+classmethod get_api(pl_user, pl_pass, pl_host, pl_ptn, ec, proxy=None)[source]¶
+

Get existing PLCAPI instance

+ +++ + + + +
Parameters:
    +
  • pl_user (str) – Planelab user name (used for web login)
  • +
  • pl_pass (str) – Planetlab password (used for web login)
  • +
  • pl_host (str) – Planetlab registry host (e.g. “www.planet-lab.eu”)
  • +
  • pl_ptn (str) – XMLRPC service pattern (e.g. https://%(hostname)s:443/PLCAPI/)
  • +
  • proxy – Proxy service url
  • +
+
+
+ +
+ +
+
+

nepi.resources.planetlab.sfa_node module¶

+
+
+class nepi.resources.planetlab.sfa_node.PlanetlabSfaNode(ec, guid)[source]¶
+

Bases: nepi.resources.linux.node.LinuxNode

+
+
+do_discover()[source]¶
+

Based on the attributes defined by the user, discover the suitable +nodes for provision.

+
+ +
+
+do_provision()[source]¶
+

Add node to user’s slice and verifing that the node is functioning +correctly. Check ssh, file system.

+
+ +
+
+do_release()[source]¶
+
+ +
+
+fail_discovery()[source]¶
+
+ +
+
+fail_node_not_alive(hostname=None)[source]¶
+
+ +
+
+fail_node_not_available(hostname)[source]¶
+
+ +
+
+fail_not_enough_nodes()[source]¶
+
+ +
+
+fail_sfaapi()[source]¶
+
+ +
+
+sfaapi[source]¶
+

Property to instanciate the SFA API based in sfi client. +For each SFA method called this instance is used.

+
+ +
+
+valid_connection(guid)[source]¶
+
+ +
+ +
+
+

nepi.resources.planetlab.tap module¶

+
+
+class nepi.resources.planetlab.tap.PlanetlabTap(ec, guid)[source]¶
+

Bases: nepi.resources.linux.tap.LinuxTap

+
+
+gre_connect(remote_endpoint, connection_app_home, connection_run_home)[source]¶
+
+ +
+
+node[source]¶
+
+ +
+
+upload_sources()[source]¶
+
+ +
+
+upload_start_command()[source]¶
+
+ +
+
+valid_connection(guid)[source]¶
+
+ +
+
+vif_name_file[source]¶
+
+ +
+
+wait_vif_name(exec_run_home=None)[source]¶
+

Waits until the vif_name file for the command is generated, +and returns the vif_name for the device

+
+ +
+ +
+
+

nepi.resources.planetlab.tun module¶

+
+
+class nepi.resources.planetlab.tun.PlanetlabTun(ec, guid)[source]¶
+

Bases: nepi.resources.planetlab.tap.PlanetlabTap

+
+ +
+
+

nepi.resources.planetlab.vroute module¶

+
+
+class nepi.resources.planetlab.vroute.PlanetlabVroute(ec, guid)[source]¶
+

Bases: nepi.resources.linux.application.LinuxApplication

+
+
+do_deploy()[source]¶
+
+ +
+
+do_release()[source]¶
+
+ +
+
+do_start()[source]¶
+
+ +
+
+do_stop()[source]¶
+
+ +
+
+node[source]¶
+
+ +
+
+tap[source]¶
+
+ +
+
+upload_sources()[source]¶
+
+ +
+
+upload_start_command()[source]¶
+
+ +
+
+valid_connection(guid)[source]¶
+
+ +
+ +
+
+

Module contents¶

+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_layout/nepi.resources.planetlab.ns3.html b/doc/sphinx/_build/html/_layout/nepi.resources.planetlab.ns3.html new file mode 100644 index 00000000..9f3b72ff --- /dev/null +++ b/doc/sphinx/_build/html/_layout/nepi.resources.planetlab.ns3.html @@ -0,0 +1,153 @@ + + + + + + + + nepi.resources.planetlab.ns3 package — NEPI 3.0 documentation + + + + + + + + + + + + +
+
+

Table Of Contents

+ + +

This Page

+ + + +
+
+ +
+
+
+
+ +
+

nepi.resources.planetlab.ns3 package¶

+
+

Submodules¶

+
+
+

nepi.resources.planetlab.ns3.fdudptunnel module¶

+
+
+class nepi.resources.planetlab.ns3.fdudptunnel.PlanetlabNs3FdUdpTunnel(ec, guid)[source]¶
+

Bases: nepi.resources.linux.ns3.fdudptunnel.LinuxNs3FdUdpTunnel

+
+
+get_endpoints()[source]¶
+

Returns the list of RM that are endpoints to the tunnel

+
+ +
+ +
+ +
+

Module contents¶

+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_layout/nepi.resources.planetlab.openvswitch.html b/doc/sphinx/_build/html/_layout/nepi.resources.planetlab.openvswitch.html new file mode 100644 index 00000000..714703b5 --- /dev/null +++ b/doc/sphinx/_build/html/_layout/nepi.resources.planetlab.openvswitch.html @@ -0,0 +1,321 @@ + + + + + + + + nepi.resources.planetlab.openvswitch package — NEPI 3.0 documentation + + + + + + + + + + + + +
+
+

Table Of Contents

+ + +

This Page

+ + + +
+
+ +
+
+
+
+ +
+

nepi.resources.planetlab.openvswitch package¶

+
+

Submodules¶

+
+
+

nepi.resources.planetlab.openvswitch.ovs module¶

+
+
+class nepi.resources.planetlab.openvswitch.ovs.PlanetlabOVSSwitch(ec, guid)[source]¶
+

Bases: nepi.resources.linux.application.LinuxApplication

+
+
+Class Args :
+
+++ + + + +
Parameters:
    +
  • ec (ExperimentController) – The Experiment controller
  • +
  • guid (int) – guid of the RM
  • +
+
+
+ +
+
+assign_controller()[source]¶
+

Set the controller IP

+
+ +
+
+check_sliver_ovs()[source]¶
+

Check if sliver-ovs exists. If it does not exist, the execution is stopped

+
+ +
+
+create_bridge()[source]¶
+

Create the bridge/switch and check error during SSH connection

+
+ +
+
+do_deploy()[source]¶
+

Deploy the OVS Switch : Turn on the server, create the bridges +and assign the controller

+
+ +
+
+do_provision()[source]¶
+
+ +
+
+do_release()[source]¶
+

Delete the bridge and close the server.

+
+
+

to be released before releasing itself

+
+ +
+
+node[source]¶
+

Node wthat run the switch

+
+ +
+
+ovs_status()[source]¶
+

Print the status of the bridge

+
+ +
+
+servers_on()[source]¶
+

Start the openvswitch servers and check it

+
+ +
+
+valid_connection(guid)[source]¶
+

Check if the connection with the guid in parameter is possible. Only meaningful connections are allowed.

+ +++ + + + + + +
Parameters:guid (int) – Guid of the current RM
Return type:Boolean
+
+ +
+ +
+
+

nepi.resources.planetlab.openvswitch.ovsport module¶

+
+
+class nepi.resources.planetlab.openvswitch.ovsport.PlanetlabOVSPort(ec, guid)[source]¶
+

Bases: nepi.resources.linux.application.LinuxApplication

+
+
+Class Args :
+
+++ + + + +
Parameters:
    +
  • ec (ExperimentController) – The Experiment controller
  • +
  • guid (int) – guid of the RM
  • +
+
+
+ +
+
+check_status()[source]¶
+
+ +
+
+create_port()[source]¶
+

Create the desired port

+
+ +
+
+do_deploy()[source]¶
+

Deploy the OVS port after the OVS Switch

+
+ +
+
+do_provision()[source]¶
+
+ +
+
+do_release()[source]¶
+

Delete the port on the OVSwitch. It needs to wait for the tunnel +to be released.

+
+ +
+
+establish_udp_connection(remote_endpoint, connection_app_home, connection_run_home, port)[source]¶
+
+ +
+
+initiate_udp_connection(remote_endpoint, connection_app_home, connection_run_home, cipher, cipher_key, bwlimit, txqueuelen)[source]¶
+

Get the local_endpoint of the port

+
+ +
+
+node[source]¶
+

Node that run the switch and the ports

+
+ +
+
+ovsswitch[source]¶
+

Switch where the port is created

+
+ +
+
+port_number[source]¶
+
+ +
+
+terminate_connection(endpoint, connection_app_home, connection_run_home)[source]¶
+
+ +
+
+valid_connection(guid)[source]¶
+

Check if the connection is available.

+ +++ + + + + + +
Parameters:guid (int) – Guid of the current RM
Return type:Boolean
+
+ +
+
+verify_connection(remote_endpoint, connection_app_home, connection_run_home)[source]¶
+
+ +
+ +
+
+

Module contents¶

+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_layout/nepi.util.html b/doc/sphinx/_build/html/_layout/nepi.util.html new file mode 100644 index 00000000..e888283b --- /dev/null +++ b/doc/sphinx/_build/html/_layout/nepi.util.html @@ -0,0 +1,1227 @@ + + + + + + + + nepi.util package — NEPI 3.0 documentation + + + + + + + + + + + + + + +
+
+
+
+ +
+

nepi.util package¶

+ +
+

Submodules¶

+
+
+

nepi.util.environ module¶

+
+
+nepi.util.environ.execute(cmd)[source]¶
+
+ +
+
+nepi.util.environ.backticks(cmd)[source]¶
+
+ +
+
+

nepi.util.execfuncs module¶

+
+
+nepi.util.execfuncs.lcopy(source, dest, recursive=False)[source]¶
+

Copies from/to localy.

+
+ +
+
+nepi.util.execfuncs.lexec(command, user=None, sudo=False, env=None)[source]¶
+

Executes a local command, returns ((stdout,stderr),process)

+
+ +
+
+nepi.util.execfuncs.lgetpid(pidfile)[source]¶
+

Check the pidfile of a process spawned with remote_spawn.

+
+
Parameters:
+
pidfile: the pidfile passed to remote_span
+
+

Returns:

+
+
A (pid, ppid) tuple useful for calling remote_status and remote_kill, +or None if the pidfile isn’t valid yet (maybe the process is still starting).
+
+ +
+
+nepi.util.execfuncs.lkill(pid, ppid, sudo=False)[source]¶
+

Kill a process spawned with lspawn.

+

First tries a SIGTERM, and if the process does not end in 10 seconds, +it sends a SIGKILL.

+
+
Parameters:
+

pid/ppid: pid and parent-pid of the spawned process. See remote_check_pid

+

sudo: whether the command was run with sudo - careful killing like this.

+
+
+

Returns:

+
+
Nothing, should have killed the process
+
+ +
+
+nepi.util.execfuncs.lspawn(command, pidfile, stdout='/dev/null', stderr=<class nepi.util.sshfuncs.STDOUT at 0x7f028ff15bb0>, stdin='/dev/null', home=None, create_home=False, sudo=False, user=None)[source]¶
+

Spawn a local command such that it will continue working asynchronously.

+
+
Parameters:
+

command: the command to run - it should be a single line.

+

pidfile: path of a (ideally unique to this task) pidfile for tracking the process.

+
+
stdout: path of a file to redirect standard output to - must be a string.
+
Defaults to /dev/null
+
stderr: path of a file to redirect standard error to - string or the special STDOUT value
+
to redirect to the same file stdout was redirected to. Defaults to STDOUT.
+
+

stdin: path of a file with input to be piped into the command’s standard input

+

home: path of a folder to use as working directory - should exist, unless you specify create_home

+

create_home: if True, the home folder will be created first with mkdir -p

+

sudo: whether the command needs to be executed as root

+
+
Returns:
+

(stdout, stderr), process

+

Of the spawning process, which only captures errors at spawning time. +Usually only useful for diagnostics.

+
+
+
+ +
+
+nepi.util.execfuncs.lstatus(pid, ppid)[source]¶
+

Check the status of a process spawned with remote_spawn.

+
+
Parameters:
+
pid/ppid: pid and parent-pid of the spawned process. See remote_check_pid
+
+

Returns:

+
+
One of NOT_STARTED, RUNNING, FINISHED
+
+ +
+
+

nepi.util.guid module¶

+
+
+class nepi.util.guid.GuidGenerator[source]¶
+

Bases: object

+
+
+next(guid=None)[source]¶
+
+ +
+ +
+
+

nepi.util.logger module¶

+
+
+class nepi.util.logger.Logger(logger_component)[source]¶
+

Bases: object

+
+
+debug(msg, out=None, err=None)[source]¶
+
+ +
+
+error(msg, out=None, err=None)[source]¶
+
+ +
+
+info(msg, out=None, err=None)[source]¶
+
+ +
+
+log(msg, level, out=None, err=None)[source]¶
+
+ +
+
+log_message(msg)[source]¶
+
+ +
+
+logger[source]¶
+
+ +
+
+warning(msg, out=None, err=None)[source]¶
+
+ +
+ +
+
+

nepi.util.manifoldapi module¶

+
+
+class nepi.util.manifoldapi.MANIFOLDAPI(username, password, hostname, urlpattern)[source]¶
+

Bases: object

+

API to query different data platforms as SFA, TopHat, OML Central Server, +using Manifold Framework, the backend of MySlice.

+
+
+add_resource_to_slice(slicename, resource_urn)[source]¶
+

Add resource to user’s slice. The query needs to specify the new +resource plus the previous resources already in the slice.

+
+ +
+
+api[source]¶
+
+ +
+
+get_resource_info(filters=None, fields=None)[source]¶
+

Create and execute the Manifold API Query to get the resources +according fields and filters. +:param filters: resource’s constraints for the experiment +:type filters: dict +:param fields: desire fields in the result of the query +:type fields: list

+
+ +
+
+get_resource_urn(filters=None)[source]¶
+

Retrieves the resources urn of the resources matching filters.

+
+ +
+
+get_session_key()[source]¶
+

Retrieves the session key, in order to use the same session for +queries.

+
+ +
+
+get_slice_resources(slicename)[source]¶
+

Retrieves resources attached to user’s slice. +return value: list of resources’ urn

+
+ +
+
+remove_resource_from_slice(slicename, resource_urn)[source]¶
+

Remove resource from user’s slice. The query needs to specify the list +of previous resources in the slice without the one to be remove.

+
+ +
+ +
+
+class nepi.util.manifoldapi.MANIFOLDAPIFactory[source]¶
+

Bases: object

+

API Factory to manage a map of MANIFOLDAPI instances as key-value pairs, it +instanciate a single instance per key. The key represents the same SFA, +MF (ManiFold) credentials.

+
+
+classmethod get_api(username, password, hostname='test.myslice.info', urlpattern='http://%(hostname)s:7080')[source]¶
+
+++ + + + +
Parameters:
    +
  • username (str) – Manifold user (also used for MySlice web login)
  • +
  • password (str) – Manifold password (also used for MySlice web login)
  • +
  • hostname (str) – Hostname of the Manifold API to query SFA, TopHat, etc
  • +
  • urlpattern (str) – Url of the Manifold API to query SFA, TopHat, etc
  • +
+
+
+ +
+
+classmethod make_key(*args)[source]¶
+
+ +
+ +
+
+

nepi.util.netgraph module¶

+
+
+class nepi.util.netgraph.NetGraph(**kwargs)[source]¶
+

Bases: object

+

NetGraph represents a network topology. +Network graphs are internally using the networkx library.

+
+
+add_edge(nid1, nid2)[source]¶
+
+ +
+
+add_node(nid)[source]¶
+
+ +
+
+annotate_edge(nid1, nid2, name, value)[source]¶
+
+ +
+
+annotate_edge_net(nid1, nid2, ip1, ip2, mask, network, prefixlen)[source]¶
+
+ +
+
+annotate_node(nid, name, value)[source]¶
+
+ +
+
+annotate_node_ip(nid, ip)[source]¶
+
+ +
+
+assign_p2p_ips(network='10.0.0.0', prefix=8, version=4)[source]¶
+

Assign IP addresses to each end of each edge of the network graph, +computing all the point to point subnets and addresses in the network +representation.

+
+
+++ + + + + + + + + + + + + + +
param network:Base network address used for subnetting.
type network:str
param prefix:Prefix for the base network address used for subnetting.
type prefixt:int
param version:IP version (either 4 or 6).
type version:int
+
+
+ +
+
+del_edge_annotation(nid1, nid2, name)[source]¶
+
+ +
+
+del_node_annotation(nid, name)[source]¶
+
+ +
+
+edge_annotation(nid1, nid2, name)[source]¶
+
+ +
+
+edge_annotations(nid1, nid2)[source]¶
+
+ +
+
+edge_net_annotation(nid1, nid2)[source]¶
+
+ +
+
+edges()[source]¶
+
+ +
+
+generate_topology(topo_type, node_count, branches=None)[source]¶
+
+ +
+
+get_p2p_info(nid1, nid2)[source]¶
+
+ +
+
+is_source(nid)[source]¶
+
+ +
+
+is_target(nid)[source]¶
+
+ +
+
+node_annotation(nid, name)[source]¶
+
+ +
+
+node_annotations(nid)[source]¶
+
+ +
+
+node_ip_annotations(nid)[source]¶
+
+ +
+
+nodes()[source]¶
+
+ +
+
+order[source]¶
+
+ +
+
+select_random_source(**kwargs)[source]¶
+

Mark a random node as source.

+
+ +
+
+select_target_zero()[source]¶
+

Mark the node 0 as target

+
+ +
+
+set_source(nid)[source]¶
+
+ +
+
+set_target(nid)[source]¶
+
+ +
+
+sources()[source]¶
+

Returns the nodes that are sources

+
+ +
+
+targets()[source]¶
+

Returns the nodes that are targets

+
+ +
+
+topo_type[source]¶
+
+ +
+
+topology[source]¶
+
+ +
+ +
+
+class nepi.util.netgraph.TopologyType[source]¶
+
+
+ADHOC = 'adhoc'¶
+
+ +
+
+LADDER = 'ladder'¶
+
+ +
+
+LINEAR = 'linear'¶
+
+ +
+
+MESH = 'mesh'¶
+
+ +
+
+STAR = 'star'¶
+
+ +
+
+TREE = 'tree'¶
+
+ +
+ +
+
+

nepi.util.parallel module¶

+
+
+class nepi.util.parallel.ParallelRun(maxthreads=None, maxqueue=None, results=True)[source]¶
+

Bases: object

+
+
+destroy()[source]¶
+
+ +
+
+empty()[source]¶
+
+ +
+
+initialize_workers()[source]¶
+
+ +
+
+join()[source]¶
+
+ +
+
+put(callable, *args, **kwargs)[source]¶
+
+ +
+
+put_nowait(callable, *args, **kwargs)[source]¶
+
+ +
+
+start()[source]¶
+
+ +
+
+sync()[source]¶
+
+ +
+ +
+
+class nepi.util.parallel.WorkerThread(group=None, target=None, name=None, args=(), kwargs=None, verbose=None)[source]¶
+

Bases: threading.Thread

+
+
+class QUIT[source]¶
+
+ +
+
+WorkerThread.attach(queue, rvqueue, delayed_exceptions)[source]¶
+
+ +
+
+WorkerThread.quit()[source]¶
+
+ +
+
+WorkerThread.run()[source]¶
+
+ +
+ +
+
+

nepi.util.plotter module¶

+
+
+class nepi.util.plotter.ECPlotter[source]¶
+

Bases: object

+
+
+plot(ec, dirpath=None, format='figure', show=False)[source]¶
+
+ +
+ +
+
+class nepi.util.plotter.PFormats[source]¶
+
+
+DOT = 'dot'¶
+
+ +
+
+FIGURE = 'figure'¶
+
+ +
+ +
+
+

nepi.util.rmatcher module¶

+
+
+nepi.util.rmatcher.find_boxes(box, all_tags=None, exact_tags=None, max_depth=1)[source]¶
+

Look for the connected boxes with the required tags, doing breath-first +search, until max_depth ( max_depth = None will traverse the entire graph ).

+
+ +
+
+nepi.util.rmatcher.match_tags(box, all_tags, exact_tags)[source]¶
+

returns True if box has required tags

+
+ +
+
+

nepi.util.serializer module¶

+
+
+class nepi.util.serializer.ECSerializer[source]¶
+

Bases: object

+
+
+load(filepath, format='xml')[source]¶
+
+ +
+
+save(ec, dirpath, format='xml')[source]¶
+
+ +
+
+serialize(ec, format='xml')[source]¶
+
+ +
+ +
+
+class nepi.util.serializer.SFormats[source]¶
+
+
+XML = 'xml'¶
+
+ +
+ +
+
+

nepi.util.sfaapi module¶

+
+
+class nepi.util.sfaapi.SFAAPI(sfi_user, sfi_auth, sfi_registry, sfi_sm, private_key, ec, batch, rtype, timeout)[source]¶
+

Bases: object

+

API for quering the SFA service. It uses Sfi class from the tool sfi client.

+
+
+add_resource_to_slice(slicename, resource_hrn, leases=None)[source]¶
+

Get the list of resources’ urn, build the rspec string and call the allocate +and provision method.

+
+ +
+
+add_resource_to_slice_batch(slicename, resource_hrn, properties=None, leases=None)[source]¶
+

Method to add all resources together to the slice. Previous deletion of slivers. +Specially used for wilabt that doesn’t allow to add more resources to the slice +after some resources are added. Every sliver have to be deleted and the batch +has to be added at once.

+
+ +
+
+blacklist_resource(resource_hrn)[source]¶
+

Adding resource_hrn to blacklist, and taking +the resource from the reserved list.

+
+ +
+
+blacklisted(resource_hrn)[source]¶
+

Check if the resource is in the blacklist.

+
+ +
+
+get_resources_hrn(resources=None)[source]¶
+

Get list of resources hrn, without the resource info.

+
+ +
+
+get_resources_info()[source]¶
+

Get all resources and its attributes from aggregate.

+
+ +
+
+get_slice_resources(slicename)[source]¶
+

Get resources and info from slice.

+
+ +
+
+release()[source]¶
+

Remove hosts from the reserved and blacklist lists, and in case +the persist attribute is set, it saves the blacklisted hosts +in the blacklist file.

+
+ +
+
+remove_all_from_slice(slicename)[source]¶
+

De-allocate and de-provision all slivers of the named slice. +Currently sfi doesn’t support removing particular +slivers, so this method works only for removing every sliver. Setting the +resource_hrn parameter is not necessary.

+
+ +
+
+remove_resource_from_slice(slicename, resource_hrn, leases=None)[source]¶
+

Remove slivers from slice. Currently sfi doesn’t support removing particular +slivers.

+
+ +
+
+reserve_resource(resource_hrn)[source]¶
+

Add resource to the reserved list.

+
+ +
+
+reserved(resource_hrn)[source]¶
+

Check that the resource in not reserved.

+
+ +
+ +
+
+class nepi.util.sfaapi.SFAAPIFactory[source]¶
+

Bases: object

+

API Factory to manage a map of SFAAPI instances as key-value pairs, it +instanciate a single instance per key. The key represents the same SFA, +credentials.

+
+
+classmethod get_api(sfi_user, sfi_auth, sfi_registry, sfi_sm, private_key, ec, batch=False, rtype=None, timeout=None)[source]¶
+
+ +
+
+classmethod make_key(*args)[source]¶
+
+ +
+ +
+
+

nepi.util.sfarspec_proc module¶

+
+
+class nepi.util.sfarspec_proc.SfaRSpecProcessing(config=None)[source]¶
+

Bases: object

+

Class to process SFA RSpecs, parse the RSpec replies such as Advertisement RSpecs, +and build in the case of Request RSpecs.

+
+
+build_sfa_rspec(slice_id, resources, properties, leases)[source]¶
+

Build the XML RSpec from list of resources’ urns. +eg. resources = [“urn:publicid:IDN+ple:modenaple+node+planetlab-1.ing.unimo.it“]

+
+ +
+
+make_dict_rec(obj)[source]¶
+
+ +
+
+parse_sfa_rspec(rspec_string)[source]¶
+

Parse the RSpec XML as a string.

+
+ +
+ +
+
+

nepi.util.sshfuncs module¶

+
+
+class nepi.util.sshfuncs.ProcStatus[source]¶
+

Codes for status of remote spawned process

+
+
+FINISHED = 2¶
+
+ +
+
+NOT_STARTED = 3¶
+
+ +
+
+RUNNING = 1¶
+
+ +
+ +
+
+class nepi.util.sshfuncs.STDOUT[source]¶
+

Special value that when given to rspawn in stderr causes stderr to +redirect to whatever stdout was redirected to.

+
+ +
+
+nepi.util.sshfuncs.eintr_retry(func)[source]¶
+

Retries a function invocation when a EINTR occurs

+
+ +
+
+nepi.util.sshfuncs.gethostbyname(host)[source]¶
+
+ +
+
+nepi.util.sshfuncs.log(msg, level, out=None, err=None)[source]¶
+
+ +
+
+nepi.util.sshfuncs.make_control_path(agent, forward_x11)[source]¶
+
+ +
+
+nepi.util.sshfuncs.make_server_key_args(server_key, host, port)[source]¶
+

Returns a reference to a temporary known_hosts file, to which +the server key has been added.

+

Make sure to hold onto the temp file reference until the process is +done with it

+ +++ + + + +
Parameters:
    +
  • server_key (str) – the server public key
  • +
  • host (str) – the hostname
  • +
  • port (str) – the ssh port
  • +
+
+
+ +
+
+nepi.util.sshfuncs.openssh_has_persist()[source]¶
+

The ssh_config options ControlMaster and ControlPersist allow to +reuse a same network connection for multiple ssh sessions. In this +way limitations on number of open ssh connections can be bypassed. +However, older versions of openSSH do not support this feature. +This function is used to determine if ssh connection persist features +can be used.

+
+ +
+
+nepi.util.sshfuncs.rcopy(source, dest, port=None, gwuser=None, gw=None, recursive=False, identity=None, server_key=None, retry=3, strict_host_checking=True)[source]¶
+

Copies from/to remote sites.

+

Source and destination should have the user and host encoded +as per scp specs.

+

Source can be a list of files to copy to a single destination, +(in which case it is advised that the destination be a folder), +or a single file in a string.

+
+ +
+
+nepi.util.sshfuncs.resolve_hostname(host)[source]¶
+
+ +
+
+nepi.util.sshfuncs.rexec(command, host, user, port=None, gwuser=None, gw=None, agent=True, sudo=False, identity=None, server_key=None, env=None, tty=False, connect_timeout=30, retry=3, persistent=True, forward_x11=False, blocking=True, strict_host_checking=True)[source]¶
+

Executes a remote command, returns ((stdout,stderr),process)

+
+ +
+
+nepi.util.sshfuncs.rgetpid(*p, **kw)[source]¶
+

Returns the pid and ppid of a process from a remote file where the +information was stored.

+
+
+++ + + + + + + + + + + + +
param home:Path to directory where the pidfile is located
type home:str
param pidfile:Name of file containing the pid information
type pidfile:str
rtype:int
+

A (pid, ppid) tuple useful for calling rstatus and rkill, +or None if the pidfile isn’t valid yet (can happen when process is staring up)

+
+
+ +
+
+nepi.util.sshfuncs.rkill(*p, **kw)[source]¶
+

Sends a kill signal to a remote process.

+

First tries a SIGTERM, and if the process does not end in 10 seconds, +it sends a SIGKILL.

+
+
+++ + + + + + + + + + + + + + +
param pid:Process id of process to be killed
type pid:int
param ppid:Parent process id of process to be killed
type ppid:int
param sudo:Flag indicating if sudo should be used to kill the process
type sudo:bool
+
+
+ +
+
+nepi.util.sshfuncs.rspawn(command, pidfile, stdout='/dev/null', stderr=<class nepi.util.sshfuncs.STDOUT at 0x7f028ff15bb0>, stdin='/dev/null', home=None, create_home=False, sudo=False, host=None, port=None, user=None, gwuser=None, gw=None, agent=None, identity=None, server_key=None, tty=False, strict_host_checking=True)[source]¶
+

Spawn a remote command such that it will continue working asynchronously in +background.

+
+
+++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
param command:The command to run, it should be a single line.
type command:str
param pidfile:Path to a file where to store the pid and ppid of the +spawned process
type pidfile:str
param stdout:Path to file to redirect standard output. +The default value is /dev/null
type stdout:str
param stderr:Path to file to redirect standard error. +If the special STDOUT value is used, stderr will +be redirected to the same file as stdout
type stderr:str
param stdin:Path to a file with input to be piped into the command’s standard input
type stdin:str
param home:Path to working directory folder. +It is assumed to exist unless the create_home flag is set.
type home:str
param create_home:
 Flag to force creation of the home folder before +running the command
type create_home:
 bool
param sudo:Flag forcing execution with sudo user
type sudo:bool
rtype:tuple
+

(stdout, stderr), process

+

Of the spawning process, which only captures errors at spawning time. +Usually only useful for diagnostics.

+
+
+ +
+
+nepi.util.sshfuncs.rstatus(*p, **kw)[source]¶
+

Returns a code representing the the status of a remote process

+
+
+++ + + + + + + + + + + + +
param pid:Process id of the process
type pid:int
param ppid:Parent process id of process
type ppid:int
rtype:int (One of NOT_STARTED, RUNNING, FINISHED)
+
+
+ +
+
+nepi.util.sshfuncs.shell_escape(s)[source]¶
+

Escapes strings so that they are safe to use as command-line +arguments

+
+ +
+
+

nepi.util.statfuncs module¶

+
+
+nepi.util.statfuncs.compute_mean(sample)[source]¶
+
+ +
+
+

nepi.util.timefuncs module¶

+
+
+nepi.util.timefuncs.compute_delay_ms(timestamp2, timestamp1)[source]¶
+
+ +
+
+nepi.util.timefuncs.stabsformat(sdate, dbase=None)[source]¶
+

Constructs a datetime object from a string date. +The string date can be expressed as an absolute date +( i.e. format YYYYMMddHHMMSSffff ) or as a relative time +( e.g. format ‘5m’ or ‘10s’). +If the date is a relative time and the dbase parameter +is given (dbase must be datetime object), the returned +date will be dbase + sdate. If dbase is None, +current time will be used instead as base time.

+

:param date : string date +:type date : date

+
+ +
+
+nepi.util.timefuncs.stformat(sdate)[source]¶
+

Constructs a datetime object from a string date with +format YYYYMMddHHMMSSffff

+
+ +
+
+nepi.util.timefuncs.tdiff(date1, date2)[source]¶
+

Returns difference ( date1 - date2 ) as a datetime object, +where date1 and date 2 are datetime objects

+
+ +
+
+nepi.util.timefuncs.tdiffsec(date1, date2)[source]¶
+

Returns the date difference ( date1 - date2 ) in seconds, +where date1 and date 2 are datetime objects

+
+ +
+
+nepi.util.timefuncs.tnow()[source]¶
+

Returns datetime object with the current time

+
+ +
+
+nepi.util.timefuncs.tsformat(date=None)[source]¶
+

Formats a datetime object to a string with format YYYYMMddHHMMSSffff. +If no date is given, the current date is used.

+
+ +
+
+

Module contents¶

+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_layout/nepi.util.parsers.html b/doc/sphinx/_build/html/_layout/nepi.util.parsers.html new file mode 100644 index 00000000..c31a65de --- /dev/null +++ b/doc/sphinx/_build/html/_layout/nepi.util.parsers.html @@ -0,0 +1,151 @@ + + + + + + + + nepi.util.parsers package — NEPI 3.0 documentation + + + + + + + + + + + + +
+
+

Table Of Contents

+ + +

This Page

+ + + +
+
+ +
+
+
+
+ +
+

nepi.util.parsers package¶

+
+

Submodules¶

+
+
+

nepi.util.parsers.xml_parser module¶

+
+
+class nepi.util.parsers.xml_parser.ECXMLParser[source]¶
+

Bases: object

+
+
+from_xml(xml)[source]¶
+
+ +
+
+to_xml(ec)[source]¶
+
+ +
+ +
+
+nepi.util.parsers.xml_parser.from_type(value)[source]¶
+
+ +
+
+nepi.util.parsers.xml_parser.to_type(type, value)[source]¶
+
+ +
+
+nepi.util.parsers.xml_parser.xmldecode(s, cast=<type 'str'>)[source]¶
+
+ +
+
+nepi.util.parsers.xml_parser.xmlencode(s)[source]¶
+
+ +
+
+

Module contents¶

+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/index.html b/doc/sphinx/_build/html/_modules/index.html new file mode 100644 index 00000000..976b752e --- /dev/null +++ b/doc/sphinx/_build/html/_modules/index.html @@ -0,0 +1,330 @@ + + + + + + + + Overview: module code — NEPI 3.0 documentation + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

All modules for which code is available

+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/data/processing/ccn/parser.html b/doc/sphinx/_build/html/_modules/nepi/data/processing/ccn/parser.html new file mode 100644 index 00000000..57ea0d14 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/data/processing/ccn/parser.html @@ -0,0 +1,505 @@ + + + + + + + + nepi.data.processing.ccn.parser — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.data.processing.ccn.parser

+#!/usr/bin/env python
+
+###############################################################################
+#
+#    CCNX benchmark
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+#
+###############################################################################
+
+#
+# This library contains functions to parse (CCNx) ccnd logs.
+#
+# Results from experiments must be stored in a directory
+# named with the experiment run id.
+# ccnd logs are stored in .log files in a subdirectory per node.
+# The following diagram exemplifies the experiment result directory
+# structure (nidi is the unique identifier assigned to node i):
+#
+#    run_id
+#               \   nid1
+#                        \ nid2.log
+#               \   nid2
+#                        \ nid1.log
+#               \   nid3
+#                        \ nid3.log
+#
+
+import collections
+import functools
+import networkx
+import os
+import pickle
+import tempfile
+
+from nepi.util.timefuncs import compute_delay_ms
+from nepi.util.statfuncs import compute_mean
+import nepi.data.processing.ping.parser as ping_parser
+
+
[docs]def is_control(content_name): + return content_name.startswith("ccnx:/%C1") or \ + content_name.startswith("ccnx:/ccnx") or \ + content_name.startswith("ccnx:/...") + +
+
[docs]def parse_file(filename): + """ Parses message information from ccnd log files + + filename: path to ccndlog file + + """ + + faces = dict() + sep = " " + + f = open(filename, "r") + + data = [] + + for line in f: + cols = line.strip().split(sep) + + # CCN_PEEK + # MESSAGE interest_from + # 1374181938.808523 ccnd[9245]: debug.4352 interest_from 6 ccnx:/test/bunny.ts (23 bytes,sim=0CDCC1D7) + # + # MESSAGE interest_to + # 1374181938.812750 ccnd[9245]: debug.3502 interest_to 5 ccnx:/test/bunny.ts (39 bytes,i=2844,sim=0CDCC1D7) + # + # MESSAGE CONTENT FROM + # 1374181938.868682 ccnd[9245]: debug.4643 content_from 5 ccnx:/test/bunny.ts/%FD%05%1E%85%8FVw/%00/%9E%3D%01%D9%3Cn%95%2BvZ%8 + # + # MESSAGE CONTENT_TO + # 1374181938.868772 ccnd[9245]: debug.1619 content_to 6 ccnx:/test/bunny.ts/%FD%05%1E%85%8FVw/%00/%9E%3D%01%D9%3Cn%95%2BvZ%8 + # + # 1375596708.222304 ccnd[9758]: debug.3692 interest_expiry ccnx:/test/bunny.ts/%FD%05%1E%86%B1GS/%00%0A%F7 (44 bytes,c=0:1,i=2819,sim=49FA8048) + + # External face creation + # 1374181452.965961 ccnd[9245]: accepted datagram client id=5 (flags=0x40012) 204.85.191.10 port 9695 + + if line.find("accepted datagram client") > -1: + face_id = (cols[5]).replace("id=",'') + ip = cols[7] + port = cols[9] + faces[face_id] = (ip, port) + continue + + # 1374181452.985296 ccnd[9245]: releasing face id 4 (slot 4) + if line.find("releasing face id") > -1: + face_id = cols[5] + if face_id in faces: + del faces[face_id] + continue + + if len(cols) < 6: + continue + + timestamp = cols[0] + message_type = cols[3] + + if message_type not in ["interest_from", "interest_to", "content_from", + "content_to", "interest_dupnonce", "interest_expiry"]: + continue + + face_id = cols[4] + content_name = cols[5] + + # Interest Nonce ? -> 412A74-0844-0008-50AA-F6EAD4 + nonce = "" + if message_type in ["interest_from", "interest_to", "interest_dupnonce"]: + last = cols[-1] + if len(last.split("-")) == 5: + nonce = last + + try: + size = int((cols[6]).replace('(','')) + except: + print "interest_expiry without face id!", line + continue + + # If no external IP address was identified for this face + # asume it is a local face + peer = "localhost" + + if face_id in faces: + peer, port = faces[face_id] + + data.append((content_name, timestamp, message_type, peer, face_id, + size, nonce, line)) + + f.close() + + return data +
+
[docs]def dump_content_history(content_history): + f = tempfile.NamedTemporaryFile(delete=False) + pickle.dump(content_history, f) + f.close() + return f.name +
+
[docs]def load_content_history(fname): + f = open(fname, "r") + content_history = pickle.load(f) + f.close() + + os.remove(fname) + return content_history +
+
[docs]def annotate_cn_node(graph, nid, ips2nid, data, content_history): + for (content_name, timestamp, message_type, peer, face_id, + size, nonce, line) in data: + + # Ignore control messages for the time being + if is_control(content_name): + continue + + if message_type == "interest_from" and \ + peer == "localhost": + graph.node[nid]["ccn_consumer"] = True + elif message_type == "content_from" and \ + peer == "localhost": + graph.node[nid]["ccn_producer"] = True + + # Ignore local messages for the time being. + # They could later be used to calculate the processing times + # of messages. + if peer == "localhost": + continue + + # remove digest + if message_type in ["content_from", "content_to"]: + content_name = "/".join(content_name.split("/")[:-1]) + + if content_name not in content_history: + content_history[content_name] = list() + + peernid = ips2nid[peer] + graph.add_edge(nid, peernid) + + content_history[content_name].append((timestamp, message_type, nid, + peernid, nonce, size, line)) +
+
[docs]def annotate_cn_graph(logs_dir, graph, parse_ping_logs = False): + """ Adds CCN content history for each node in the topology graph. + + """ + + # Make a copy of the graph to ensure integrity + graph = graph.copy() + + ips2nid = dict() + + for nid in graph.nodes(): + ips = graph.node[nid]["ips"] + for ip in ips: + ips2nid[ip] = nid + + found_files = False + + # Now walk through the ccnd logs... + for dirpath, dnames, fnames in os.walk(logs_dir): + # continue if we are not at the leaf level (if there are subdirectories) + if dnames: + continue + + # Each dirpath correspond to a different node + nid = os.path.basename(dirpath) + + # Cast to numeric nid if necessary + if int(nid) in graph.nodes(): + nid = int(nid) + + content_history = dict() + + for fname in fnames: + if fname.endswith(".log"): + found_files = True + filename = os.path.join(dirpath, fname) + data = parse_file(filename) + annotate_cn_node(graph, nid, ips2nid, data, content_history) + + # Avoid storing everything in memory, instead dump to a file + # and reference the file + fname = dump_content_history(content_history) + graph.node[nid]["history"] = fname + + if not found_files: + msg = "No CCND output files were found to parse at %s " % logs_dir + raise RuntimeError, msg + + if parse_ping_logs: + ping_parser.annotate_cn_graph(logs_dir, graph) + + return graph +
+
[docs]def ccn_producers(graph): + """ Returns the nodes that are content providers """ + return [nid for nid in graph.nodes() \ + if graph.node[nid].get("ccn_producer")] +
+
[docs]def ccn_consumers(graph): + """ Returns the nodes that are content consumers """ + return [nid for nid in graph.nodes() \ + if graph.node[nid].get("ccn_consumer")] +
+
[docs]def process_content_history(graph): + """ Compute CCN message counts and aggregates content historical + information in the content_names dictionary + + """ + + ## Assume single source + source = ccn_consumers(graph)[0] + + interest_expiry_count = 0 + interest_dupnonce_count = 0 + interest_count = 0 + content_count = 0 + content_names = dict() + + # Collect information about exchanged messages by content name and + # link delay info. + for nid in graph.nodes(): + # Load the data collected from the node's ccnd log + fname = graph.node[nid]["history"] + history = load_content_history(fname) + + for content_name in history.keys(): + hist = history[content_name] + + for (timestamp, message_type, nid1, nid2, nonce, size, line) in hist: + if message_type in ["content_from", "content_to"]: + # The first Interest sent will not have a version or chunk number. + # The first Content sent back in reply, will end in /=00 or /%00. + # Make sure to map the first Content to the first Interest. + if content_name.endswith("/=00"): + content_name = "/".join(content_name.split("/")[0:-2]) + + # Add content name to dictionary + if content_name not in content_names: + content_names[content_name] = dict() + content_names[content_name]["interest"] = dict() + content_names[content_name]["content"] = list() + + # Classify interests by replica + if message_type in ["interest_from"] and \ + nonce not in content_names[content_name]["interest"]: + content_names[content_name]["interest"][nonce] = list() + + # Add consumer history + if nid == source: + if message_type in ["interest_to", "content_from"]: + # content name history as seen by the source + if "consumer_history" not in content_names[content_name]: + content_names[content_name]["consumer_history"] = list() + + content_names[content_name]["consumer_history"].append( + (timestamp, message_type)) + + # Add messages per content name and cumulate totals by message type + if message_type == "interest_dupnonce": + interest_dupnonce_count += 1 + elif message_type == "interest_expiry": + interest_expiry_count += 1 + elif message_type == "interest_from": + interest_count += 1 + # Append to interest history of the content name + content_names[content_name]["interest"][nonce].append( + (timestamp, nid2, nid1)) + elif message_type == "content_from": + content_count += 1 + # Append to content history of the content name + content_names[content_name]["content"].append((timestamp, nid2, nid1)) + else: + continue + del hist + del history + + # Compute the time elapsed between the time an interest is sent + # in the consumer node and when the content is received back + for content_name in content_names.keys(): + # order content and interest messages by timestamp + content_names[content_name]["content"] = sorted( + content_names[content_name]["content"]) + + for nonce, timestamps in content_names[content_name][ + "interest"].iteritems(): + content_names[content_name]["interest"][nonce] = sorted( + timestamps) + + history = sorted(content_names[content_name]["consumer_history"]) + content_names[content_name]["consumer_history"] = history + + # compute the rtt time of the message + rtt = None + waiting_content = False + interest_timestamp = None + content_timestamp = None + + for (timestamp, message_type) in history: + if not waiting_content and message_type == "interest_to": + waiting_content = True + interest_timestamp = timestamp + continue + + if waiting_content and message_type == "content_from": + content_timestamp = timestamp + break + + # If we can't determine who sent the interest, discard it + rtt = -1 + if interest_timestamp and content_timestamp: + rtt = compute_delay_ms(content_timestamp, interest_timestamp) + + content_names[content_name]["rtt"] = rtt + content_names[content_name]["lapse"] = (interest_timestamp, content_timestamp) + + return (graph, + content_names, + interest_expiry_count, + interest_dupnonce_count, + interest_count, + content_count) +
+
[docs]def process_content_history_logs(logs_dir, graph, parse_ping_logs = False): + """ Parse CCN logs and aggregate content history information in graph. + Returns annotated graph and message countn and content names history. + + """ + ## Process logs and analyse data + try: + graph = annotate_cn_graph(logs_dir, graph, + parse_ping_logs = parse_ping_logs) + except: + print "Skipping: Error parsing ccnd logs", logs_dir + raise + + source = ccn_consumers(graph)[0] + target = ccn_producers(graph)[0] + + # Process the data from the ccnd logs, but do not re compute + # the link delay. + try: + (graph, + content_names, + interest_expiry_count, + interest_dupnonce_count, + interest_count, + content_count) = process_content_history(graph) + except: + print "Skipping: Error processing ccn data", logs_dir + raise + + return (graph, + content_names, + interest_expiry_count, + interest_dupnonce_count, + interest_count, + content_count)
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/data/processing/ping/parser.html b/doc/sphinx/_build/html/_modules/nepi/data/processing/ping/parser.html new file mode 100644 index 00000000..e69772ad --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/data/processing/ping/parser.html @@ -0,0 +1,212 @@ + + + + + + + + nepi.data.processing.ping.parser — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.data.processing.ping.parser

+#!/usr/bin/env python
+
+###############################################################################
+#
+#    CCNX benchmark
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+#
+###############################################################################
+
+#
+# This library contains functions to parse log files generated using ping. 
+#
+
+import collections
+import re
+import os
+
+# RE to match line starting "traceroute to"
+_rre = re.compile("\d+ bytes from ((?P<hostname>[^\s]+) )?\(?(?P<ip>[^\s]+)\)??: icmp_.eq=\d+ ttl=\d+ time=(?P<time>[^\s]+) ms")
+
+
[docs]def parse_file(filename): + """ + filename: path to traceroute file + + """ + + f = open(filename, "r") + + # Traceroute info + target_ip = None + target_hostname = None + + data = [] + + for line in f: + # match traceroute to ... + m = re.match(_rre, line) + if not m: + continue + + target_ip = m.groupdict()["ip"] + # FIX THIS: Make sure the regular expression does not inlcude + # the ')' in the ip group + target_ip = target_ip.replace(")","") + target_hostname = m.groupdict()["hostname"] + time = m.groupdict()["time"] + data.append((target_ip, target_hostname, time)) + + f.close() + + return data +
+
[docs]def annotate_cn_node(graph, nid1, ips2nid, data): + for (target_ip, target_hostname, time) in data: + nid2 = ips2nid[target_ip] + + if "delays" not in graph.edge[nid1][nid2]: + graph.edge[nid1][nid2]["delays"] = [] + + time = float(time.replace("ms", "").replace(" ","")) + + graph.edge[nid1][nid2]["delays"].append(time) +
+
[docs]def annotate_cn_graph(logs_dir, graph): + """ Add delay inormation to graph using data collected using + ping. + + """ + ips2nid = dict() + + for nid in graph.nodes(): + ips = graph.node[nid]["ips"] + for ip in ips: + ips2nid[ip] = nid + + # Walk through the ping logs... + found_files = False + + for dirpath, dnames, fnames in os.walk(logs_dir): + # continue if we are not at the leaf level (if there are subdirectories) + if dnames: + continue + + # Each dirpath correspond to a different host + nid = os.path.basename(dirpath) + + for fname in fnames: + if fname.endswith(".ping"): + found_files = True + filename = os.path.join(dirpath, fname) + data = parse_file(filename) + annotate_cn_node(graph, nid, ips2nid, data) + + if not found_files: + msg = "No PING output files were found to parse at %s " % logs_dir + raise RuntimeError, msg + + # Take as weight the most frequent value + for nid1, nid2 in graph.edges(): + delays = collections.Counter(graph.edge[nid1][nid2]["delays"]) + weight = delays.most_common(1)[0][0] + del graph.edge[nid1][nid2]["delays"] + graph.edge[nid1][nid2]["weight"] = weight + + return graph +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/execution/attribute.html b/doc/sphinx/_build/html/_modules/nepi/execution/attribute.html new file mode 100644 index 00000000..8c87b68b --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/execution/attribute.html @@ -0,0 +1,286 @@ + + + + + + + + nepi.execution.attribute — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.execution.attribute

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+### Attribute Types
+
[docs]class Types: + """ Allowed types for the Attribute value + """ + String = "STRING" + Bool = "BOOL" + Enumerate = "ENUM" + Double = "DOUBLE" + Integer = "INTEGER" + +### Attribute Flags
+
[docs]class Flags: + """ Flags to characterize the scope of an Attribute + """ + # Attribute value can not be read (it is hidden to the user) + NoRead = 1 # 1 + + # Attribute value can not be modified (it is not editable by the user) + NoWrite = 1 << 1 # 2 + + # Attribute value can be modified only before deployment + Design = 1 << 2 # 4 + + # Attribute value will be used at deployment time for initial configuration + Construct = 1 << 3 # 8 + + # Attribute provides credentials to access resources + Credential = 1 << 4 | Design # 16 + 4 + + # Attribute is a filter used to discover resources + Filter = 1 << 5 | Design # 32 + 4 + + # Attribute Flag is reserved for internal RM usage (i.e. should be + # transparent to the user) + Reserved = 1 << 6 # 64 + + # Attribute global is set to all resources of rtype + Global = 1 << 7 # 128 + +
+
[docs]class Attribute(object): + """ An Attribute exposes a configuration parameter of a resource + """ + + def __init__(self, name, help, type = Types.String, + flags = None, default = None, allowed = None, + range = None, set_hook = None): + """ + :param name: Name of the Attribute + :type name: str + + :param help: Description of the Attribute + :type help: str + + :param type: The type expected for the Attribute value. + Should be one of Attribute.Types + :type type: str + + :param flags: Defines Attribute behavior (i.e. whether it is read-only, + read and write, etc). This parameter must take its values from + Attribute.Flags. Flags values can be bitwised + :type flags: hex + + :param default: Default value for the Attribute + :type default: Depends on the type of Attribute + + :param allowed: List of values that the Attribute can take. + This parameter is only meaningful for Enumerate type Attributes + :type allowed: list + + :param range: (max, min) tuple with range of possible values for + Attributes. + This parameter is only meaningful for Integer or Double type + Attributes + :type range: (int, int) or (float, float) + + :param set_hook: Function that will be executed whenever a new + value is set for the Attribute. + :type set_hook: function + + """ + self._name = name + self._help = help + self._type = type + self._flags = flags or 0 + self._allowed = allowed + self._range = range + self._default = self._value = default + # callback to be invoked upon changing the + # attribute value + self.set_hook = set_hook + + @property +
[docs] def name(self): + """ Returns the name of the Attribute """ + return self._name +
+ @property +
[docs] def default(self): + """ Returns the default value of the Attribute """ + return self._default +
+ @property +
[docs] def type(self): + """ Returns the type of the Attribute """ + return self._type +
+ @property +
[docs] def help(self): + """ Returns the description of the Attribute """ + return self._help +
+ @property +
[docs] def flags(self): + """ Returns the flags of the Attribute """ + return self._flags +
+ @property +
[docs] def allowed(self): + """ Returns the set of allowed values for the Attribute """ + return self._allowed +
+ @property +
[docs] def range(self): + """ Returns the range of allowed numerical values for the Attribute """ + return self._range +
+
[docs] def has_flag(self, flag): + """ Returns True if the Attribute has the flag 'flag' + + :param flag: Flag to be checked + :type flag: Flags + """ + return (self._flags & flag) == flag +
+
[docs] def get_value(self): + """ Returns the value of the Attribute """ + return self._value +
+
[docs] def set_value(self, value): + """ Configure a new value for the Attribute """ + valid = True + + if self.type == Types.Enumerate: + valid = value in self._allowed + + if self.type in [Types.Double, Types.Integer] and self.range: + (min, max) = self.range + + value = float(value) + + valid = (value >= min and value <= max) + + valid = valid and self.is_valid_value(value) + + if valid: + if self.set_hook: + # Hook receives old value, new value + value = self.set_hook(self._value, value) + + self._value = value + else: + raise ValueError("Invalid value %s for attribute %s" % + (str(value), self.name)) +
+ value = property(get_value, set_value) + +
[docs] def is_valid_value(self, value): + """ Attribute subclasses will override this method to add + adequate validation""" + return True +
+ @property +
[docs] def has_changed(self): + """ Returns True if the value has changed from the default """ + return self.value != self.default +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/execution/ec.html b/doc/sphinx/_build/html/_modules/nepi/execution/ec.html new file mode 100644 index 00000000..e95bbc47 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/execution/ec.html @@ -0,0 +1,1365 @@ + + + + + + + + nepi.execution.ec — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.execution.ec

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.util import guid
+from nepi.util.parallel import ParallelRun
+from nepi.util.timefuncs import tnow, tdiffsec, stabsformat, tsformat 
+from nepi.execution.resource import ResourceFactory, ResourceAction, \
+        ResourceState, ResourceState2str
+from nepi.execution.scheduler import HeapScheduler, Task, TaskStatus
+from nepi.execution.trace import TraceAttr
+from nepi.util.serializer import ECSerializer, SFormats
+from nepi.util.plotter import ECPlotter, PFormats
+from nepi.util.netgraph import NetGraph, TopologyType 
+
+# TODO: use multiprocessing instead of threading
+# TODO: Allow to reconnect to a running experiment instance! (reconnect mode vs deploy mode)
+
+import functools
+import logging
+import os
+import sys
+import tempfile
+import time
+import threading
+import weakref
+
+
[docs]class FailureLevel(object): + """ Possible failure states for the experiment """ + OK = 1 + RM_FAILURE = 2 + EC_FAILURE = 3 +
+
[docs]class FailureManager(object): + """ The FailureManager is responsible for handling errors + and deciding whether an experiment should be aborted or not + """ + + def __init__(self): + self._ec = None + self._failure_level = FailureLevel.OK + self._abort = False + +
[docs] def set_ec(self, ec): + self._ec = weakref.ref(ec) +
+ @property +
[docs] def ec(self): + """ Returns the ExperimentController associated to this FailureManager + """ + return self._ec() +
+ @property +
[docs] def abort(self): + return self._abort +
+
[docs] def eval_failure(self, guid): + """ Implements failure policy and sets the abort state of the + experiment based on the failure state and criticality of + the RM + + :param guid: Guid of the RM upon which the failure of the experiment + is evaluated + :type guid: int + + """ + if self._failure_level == FailureLevel.OK: + rm = self.ec.get_resource(guid) + state = rm.state + critical = rm.get("critical") + + if state == ResourceState.FAILED and critical: + self._failure_level = FailureLevel.RM_FAILURE + self._abort = True + self.ec.logger.debug("RM critical failure occurred on guid %d." \ + " Setting EC FAILURE LEVEL to RM_FAILURE" % guid) +
+
[docs] def set_ec_failure(self): + self._failure_level = FailureLevel.EC_FAILURE +
+
[docs]class ECState(object): + """ Possible states of the ExperimentController + + """ + RUNNING = 1 + FAILED = 2 + RELEASED = 3 + TERMINATED = 4 +
+
[docs]class ExperimentController(object): + """ + .. note:: + + An experiment, or scenario, is defined by a concrete set of resources, + and the behavior, configuration and interconnection of those resources. + The Experiment Description (ED) is a detailed representation of a + single experiment. It contains all the necessary information to + allow repeating the experiment. NEPI allows to describe + experiments by registering components (resources), configuring them + and interconnecting them. + + A same experiment (scenario) can be executed many times, generating + different results. We call an experiment execution (instance) a 'run'. + + The ExperimentController (EC), is the entity responsible of + managing an experiment run. The same scenario can be + recreated (and re-run) by instantiating an EC and recreating + the same experiment description. + + An experiment is represented as a graph of interconnected + resources. A resource is a generic concept in the sense that any + component taking part of an experiment, whether physical of + virtual, is considered a resource. A resources could be a host, + a virtual machine, an application, a simulator, a IP address. + + A ResourceManager (RM), is the entity responsible for managing a + single resource. ResourceManagers are specific to a resource + type (i.e. An RM to control a Linux application will not be + the same as the RM used to control a ns-3 simulation). + To support a new type of resource, a new RM must be implemented. + NEPI already provides a variety of RMs to control basic resources, + and new can be extended from the existing ones. + + Through the EC interface the user can create ResourceManagers (RMs), + configure them and interconnect them, to describe an experiment. + Describing an experiment through the EC does not run the experiment. + Only when the 'deploy()' method is invoked on the EC, the EC will take + actions to transform the 'described' experiment into a 'running' experiment. + + While the experiment is running, it is possible to continue to + create/configure/connect RMs, and to deploy them to involve new + resources in the experiment (this is known as 'interactive' deployment). + + An experiments in NEPI is identified by a string id, + which is either given by the user, or automatically generated by NEPI. + The purpose of this identifier is to separate files and results that + belong to different experiment scenarios. + However, since a same 'experiment' can be run many times, the experiment + id is not enough to identify an experiment instance (run). + For this reason, the ExperimentController has two identifier, the + exp_id, which can be re-used in different ExperimentController, + and the run_id, which is unique to one ExperimentController instance, and + is automatically generated by NEPI. + + """ + + @classmethod +
[docs] def load(cls, filepath, format = SFormats.XML): + serializer = ECSerializer() + ec = serializer.load(filepath) + return ec +
+ def __init__(self, exp_id = None, local_dir = None, persist = False, + fm = None, add_node_callback = None, add_edge_callback = None, + **kwargs): + """ ExperimentController entity to model an execute a network + experiment. + + :param exp_id: Human readable name to identify the experiment + :type exp_id: str + + :param local_dir: Path to local directory where to store experiment + related files + :type local_dir: str + + :param persist: Save an XML description of the experiment after + completion at local_dir + :type persist: bool + + :param fm: FailureManager object. If None is given, the default + FailureManager class will be used + :type fm: FailureManager + + :param add_node_callback: Callback to invoke for node instantiation + when automatic topology creation mode is used + :type add_node_callback: function + + :param add_edge_callback: Callback to invoke for edge instantiation + when automatic topology creation mode is used + :type add_edge_callback: function + + """ + super(ExperimentController, self).__init__() + + # Logging + self._logger = logging.getLogger("ExperimentController") + + # Run identifier. It identifies a concrete execution instance (run) + # of an experiment. + # Since a same experiment (same configuration) can be executed many + # times, this run_id permits to separate result files generated on + # different experiment executions + self._run_id = tsformat() + + # Experiment identifier. Usually assigned by the user + # Identifies the experiment scenario (i.e. configuration, + # resources used, etc) + self._exp_id = exp_id or "exp-%s" % os.urandom(8).encode('hex') + + # Local path where to store experiment related files (results, etc) + if not local_dir: + local_dir = tempfile.gettempdir() # /tmp + + self._local_dir = local_dir + self._exp_dir = os.path.join(local_dir, self.exp_id) + self._run_dir = os.path.join(self.exp_dir, self.run_id) + + # If True persist the experiment controller in XML format, after completion + self._persist = persist + + # generator of globally unique ids + self._guid_generator = guid.GuidGenerator() + + # Resource managers + self._resources = dict() + + # Scheduler. It a queue that holds tasks scheduled for + # execution, and yields the next task to be executed + # ordered by execution and arrival time + self._scheduler = HeapScheduler() + + # Tasks + self._tasks = dict() + + # RM groups (for deployment) + self._groups = dict() + + # generator of globally unique id for groups + self._group_id_generator = guid.GuidGenerator() + + # Flag to stop processing thread + self._stop = False + + # Entity in charge of managing system failures + if not fm: + self._fm = FailureManager() + self._fm.set_ec(self) + + # EC state + self._state = ECState.RUNNING + + # Automatically construct experiment description + self._netgraph = None + if add_node_callback or add_edge_callback or kwargs.get("topology"): + self._build_from_netgraph(add_node_callback, add_edge_callback, + **kwargs) + + # The runner is a pool of threads used to parallelize + # execution of tasks + self._nthreads = 20 + self._runner = None + + # Event processing thread + self._cond = threading.Condition() + self._thread = threading.Thread(target = self._process) + self._thread.setDaemon(True) + self._thread.start() + + @property +
[docs] def logger(self): + """ Returns the logger instance of the Experiment Controller + + """ + return self._logger +
+ @property +
[docs] def fm(self): + """ Returns the failure manager + + """ + + return self._fm +
+ @property +
[docs] def failure_level(self): + """ Returns the level of FAILURE of th experiment + + """ + + return self._fm._failure_level +
+ @property +
[docs] def ecstate(self): + """ Returns the state of the Experiment Controller + + """ + return self._state +
+ @property +
[docs] def exp_id(self): + """ Returns the experiment id assigned by the user + + """ + return self._exp_id +
+ @property +
[docs] def run_id(self): + """ Returns the experiment instance (run) identifier (automatically + generated) + + """ + return self._run_id +
+ @property +
[docs] def nthreads(self): + """ Returns the number of processing nthreads used + + """ + return self._nthreads +
+ @property +
[docs] def local_dir(self): + """ Root local directory for experiment files + + """ + return self._local_dir +
+ @property +
[docs] def exp_dir(self): + """ Local directory to store results and other files related to the + experiment. + + """ + return self._exp_dir +
+ @property +
[docs] def run_dir(self): + """ Local directory to store results and other files related to the + experiment run. + + """ + return self._run_dir +
+ @property +
[docs] def persist(self): + """ If True, persists the ExperimentController to XML format upon + experiment completion + + """ + return self._persist +
+ @property +
[docs] def netgraph(self): + """ Return NetGraph instance if experiment description was automatically + generated + + """ + return self._netgraph +
+ @property +
[docs] def abort(self): + """ Returns True if the experiment has failed and should be interrupted, + False otherwise. + + """ + return self._fm.abort +
+
[docs] def inform_failure(self, guid): + """ Reports a failure in a RM to the EC for evaluation + + :param guid: Resource id + :type guid: int + + """ + + return self._fm.eval_failure(guid) +
+
[docs] def wait_finished(self, guids): + """ Blocking method that waits until all RMs in the 'guids' list + have reached a state >= STOPPED (i.e. STOPPED, FAILED or + RELEASED ), or until a failure in the experiment occurs + (i.e. abort == True) + + :param guids: List of guids + :type guids: list + + """ + + def quit(): + return self.abort + + return self.wait(guids, state = ResourceState.STOPPED, + quit = quit) +
+
[docs] def wait_started(self, guids): + """ Blocking method that waits until all RMs in the 'guids' list + have reached a state >= STARTED, or until a failure in the + experiment occurs (i.e. abort == True) + + :param guids: List of guids + :type guids: list + + """ + + def quit(): + return self.abort + + return self.wait(guids, state = ResourceState.STARTED, + quit = quit) +
+
[docs] def wait_released(self, guids): + """ Blocking method that waits until all RMs in the 'guids' list + have reached a state == RELEASED, or until the EC fails + + :param guids: List of guids + :type guids: list + + """ + + def quit(): + return self._state == ECState.FAILED + + return self.wait(guids, state = ResourceState.RELEASED, + quit = quit) +
+
[docs] def wait_deployed(self, guids): + """ Blocking method that waits until all RMs in the 'guids' list + have reached a state >= READY, or until a failure in the + experiment occurs (i.e. abort == True) + + :param guids: List of guids + :type guids: list + + """ + + def quit(): + return self.abort + + return self.wait(guids, state = ResourceState.READY, + quit = quit) +
+
[docs] def wait(self, guids, state, quit): + """ Blocking method that waits until all RMs in the 'guids' list + have reached a state >= 'state', or until the 'quit' callback + yields True + + :param guids: List of guids + :type guids: list + + """ + if isinstance(guids, int): + guids = [guids] + + # Make a copy to avoid modifying the original guids list + guids = list(guids) + + while True: + # If there are no more guids to wait for + # or the quit function returns True, exit the loop + if len(guids) == 0 or quit(): + break + + # If a guid reached one of the target states, remove it from list + guid = guids.pop() + rm = self.get_resource(guid) + rstate = rm.state + + if rstate >= state: + self.logger.debug(" %s guid %d DONE - state is %s, required is >= %s " % ( + rm.get_rtype(), guid, rstate, state)) + else: + # Debug... + self.logger.debug(" WAITING FOR guid %d - state is %s, required is >= %s " % ( + guid, rstate, state)) + + guids.append(guid) + + time.sleep(0.5) +
+
[docs] def plot(self, dirpath = None, format= PFormats.FIGURE, show = False): + plotter = ECPlotter() + fpath = plotter.plot(self, dirpath = dirpath, format= format, + show = show) + return fpath +
+
[docs] def serialize(self, format = SFormats.XML): + serializer = ECSerializer() + sec = serializer.load(self, format = format) + return sec +
+
[docs] def save(self, dirpath = None, format = SFormats.XML): + if dirpath == None: + dirpath = self.run_dir + + try: + os.makedirs(dirpath) + except OSError: + pass + + serializer = ECSerializer() + path = serializer.save(self, dirpath, format = format) + return path +
+
[docs] def get_task(self, tid): + """ Returns a task by its id + + :param tid: Id of the task + :type tid: int + + :rtype: Task + + """ + return self._tasks.get(tid) +
+
[docs] def get_resource(self, guid): + """ Returns a registered ResourceManager by its guid + + :param guid: Id of the resource + :type guid: int + + :rtype: ResourceManager + + """ + rm = self._resources.get(guid) + return rm +
+
[docs] def get_resources_by_type(self, rtype): + """ Returns the ResourceManager objects of type rtype + + :param rtype: Resource type + :type rtype: string + + :rtype: list of ResourceManagers + + """ + rms = [] + for guid, rm in self._resources.iteritems(): + if rm.get_rtype() == rtype: + rms.append(rm) + return rms +
+
[docs] def remove_resource(self, guid): + del self._resources[guid] +
+ @property +
[docs] def resources(self): + """ Returns the guids of all ResourceManagers + + :return: Set of all RM guids + :rtype: list + + """ + keys = self._resources.keys() + + return keys +
+
[docs] def filter_resources(self, rtype): + """ Returns the guids of all ResourceManagers of type rtype + + :param rtype: Resource type + :type rtype: string + + :rtype: list of guids + + """ + rms = [] + for guid, rm in self._resources.iteritems(): + if rm.get_rtype() == rtype: + rms.append(rm.guid) + return rms +
+
[docs] def register_resource(self, rtype, guid = None): + """ Registers a new ResourceManager of type 'rtype' in the experiment + + This method will assign a new 'guid' for the RM, if no guid + is specified. + + :param rtype: Type of the RM + :type rtype: str + + :return: Guid of the RM + :rtype: int + + """ + # Get next available guid + guid = self._guid_generator.next(guid) + + # Instantiate RM + rm = ResourceFactory.create(rtype, self, guid) + + # Store RM + self._resources[guid] = rm + + return guid +
+
[docs] def get_attributes(self, guid): + """ Returns all the attributes of the RM with guid 'guid' + + :param guid: Guid of the RM + :type guid: int + + :return: List of attributes + :rtype: list + + """ + rm = self.get_resource(guid) + return rm.get_attributes() +
+
[docs] def get_attribute(self, guid, name): + """ Returns the attribute 'name' of the RM with guid 'guid' + + :param guid: Guid of the RM + :type guid: int + + :param name: Name of the attribute + :type name: str + + :return: The attribute with name 'name' + :rtype: Attribute + + """ + rm = self.get_resource(guid) + return rm.get_attribute(name) +
+
[docs] def register_connection(self, guid1, guid2): + """ Registers a connection between a RM with guid 'guid1' + and another RM with guid 'guid2'. + + The order of the in which the two guids are provided is not + important, since the connection relationship is symmetric. + + :param guid1: First guid to connect + :type guid1: ResourceManager + + :param guid2: Second guid to connect + :type guid: ResourceManager + + """ + rm1 = self.get_resource(guid1) + rm2 = self.get_resource(guid2) + + rm1.register_connection(guid2) + rm2.register_connection(guid1) +
+
[docs] def register_condition(self, guids1, action, guids2, state, + time = None): + """ Registers an action START, STOP or DEPLOY for all RM on list + guids1 to occur at time 'time' after all elements in list guids2 + have reached state 'state'. + + :param guids1: List of guids of RMs subjected to action + :type guids1: list + + :param action: Action to perform (either START, STOP or DEPLOY) + :type action: ResourceAction + + :param guids2: List of guids of RMs to we waited for + :type guids2: list + + :param state: State to wait for on RMs of list guids2 (STARTED, + STOPPED, etc) + :type state: ResourceState + + :param time: Time to wait after guids2 has reached status + :type time: string + + """ + if isinstance(guids1, int): + guids1 = [guids1] + if isinstance(guids2, int): + guids2 = [guids2] + + for guid1 in guids1: + rm = self.get_resource(guid1) + rm.register_condition(action, guids2, state, time) +
+
[docs] def enable_trace(self, guid, name): + """ Enables a trace to be collected during the experiment run + + :param name: Name of the trace + :type name: str + + """ + rm = self.get_resource(guid) + rm.enable_trace(name) +
+
[docs] def trace_enabled(self, guid, name): + """ Returns True if the trace of name 'name' is enabled + + :param name: Name of the trace + :type name: str + + """ + rm = self.get_resource(guid) + return rm.trace_enabled(name) +
+
[docs] def trace(self, guid, name, attr = TraceAttr.ALL, block = 512, offset = 0): + """ Returns information on a collected trace, the trace stream or + blocks (chunks) of the trace stream + + :param name: Name of the trace + :type name: str + + :param attr: Can be one of: + - TraceAttr.ALL (complete trace content), + - TraceAttr.STREAM (block in bytes to read starting + at offset), + - TraceAttr.PATH (full path to the trace file), + - TraceAttr.SIZE (size of trace file). + :type attr: str + + :param block: Number of bytes to retrieve from trace, when attr is + TraceAttr.STREAM + :type name: int + + :param offset: Number of 'blocks' to skip, when attr is TraceAttr.STREAM + :type name: int + + :rtype: str + + """ + rm = self.get_resource(guid) + return rm.trace(name, attr, block, offset) +
+
[docs] def get_traces(self, guid): + """ Returns the list of the trace names of the RM with guid 'guid' + + :param guid: Guid of the RM + :type guid: int + + :return: List of trace names + :rtype: list + + """ + rm = self.get_resource(guid) + return rm.get_traces() + +
+
[docs] def discover(self, guid): + """ Discovers an available resource matching the criteria defined + by the RM with guid 'guid', and associates that resource to the RM + + Not all RM types require (or are capable of) performing resource + discovery. For the RM types which are not capable of doing so, + invoking this method does not have any consequences. + + :param guid: Guid of the RM + :type guid: int + + """ + rm = self.get_resource(guid) + return rm.discover() +
+
[docs] def provision(self, guid): + """ Provisions the resource associated to the RM with guid 'guid'. + + Provisioning means making a resource 'accessible' to the user. + Not all RM types require (or are capable of) performing resource + provisioning. For the RM types which are not capable of doing so, + invoking this method does not have any consequences. + + :param guid: Guid of the RM + :type guid: int + + """ + rm = self.get_resource(guid) + return rm.provision() +
+
[docs] def get(self, guid, name): + """ Returns the value of the attribute with name 'name' on the + RM with guid 'guid' + + :param guid: Guid of the RM + :type guid: int + + :param name: Name of the attribute + :type name: str + + :return: The value of the attribute with name 'name' + + """ + rm = self.get_resource(guid) + return rm.get(name) +
+
[docs] def set(self, guid, name, value): + """ Modifies the value of the attribute with name 'name' on the + RM with guid 'guid'. + + :param guid: Guid of the RM + :type guid: int + + :param name: Name of the attribute + :type name: str + + :param value: Value of the attribute + + """ + rm = self.get_resource(guid) + rm.set(name, value) +
+
[docs] def get_global(self, rtype, name): + """ Returns the value of the global attribute with name 'name' on the + RMs of rtype 'rtype'. + + :param guid: Guid of the RM + :type guid: int + + :param name: Name of the attribute + :type name: str + + :return: The value of the attribute with name 'name' + + """ + rclass = ResourceFactory.get_resource_type(rtype) + return rclass.get_global(name) +
+
[docs] def set_global(self, rtype, name, value): + """ Modifies the value of the global attribute with name 'name' on the + RMs of with rtype 'rtype'. + + :param guid: Guid of the RM + :type guid: int + + :param name: Name of the attribute + :type name: str + + :param value: Value of the attribute + + """ + rclass = ResourceFactory.get_resource_type(rtype) + return rclass.set_global(name, value) +
+
[docs] def state(self, guid, hr = False): + """ Returns the state of a resource + + :param guid: Resource guid + :type guid: integer + + :param hr: Human readable. Forces return of a + status string instead of a number + :type hr: boolean + + """ + rm = self.get_resource(guid) + state = rm.state + + if hr: + return ResourceState2str.get(state) + + return state +
+
[docs] def stop(self, guid): + """ Stops the RM with guid 'guid' + + Stopping a RM means that the resource it controls will + no longer take part of the experiment. + + :param guid: Guid of the RM + :type guid: int + + """ + rm = self.get_resource(guid) + return rm.stop() +
+
[docs] def start(self, guid): + """ Starts the RM with guid 'guid' + + Starting a RM means that the resource it controls will + begin taking part of the experiment. + + :param guid: Guid of the RM + :type guid: int + + """ + rm = self.get_resource(guid) + return rm.start() +
+
[docs] def get_start_time(self, guid): + """ Returns the start time of the RM as a timestamp """ + rm = self.get_resource(guid) + return rm.start_time +
+
[docs] def get_stop_time(self, guid): + """ Returns the stop time of the RM as a timestamp """ + rm = self.get_resource(guid) + return rm.stop_time +
+
[docs] def get_discover_time(self, guid): + """ Returns the discover time of the RM as a timestamp """ + rm = self.get_resource(guid) + return rm.discover_time +
+
[docs] def get_provision_time(self, guid): + """ Returns the provision time of the RM as a timestamp """ + rm = self.get_resource(guid) + return rm.provision_time +
+
[docs] def get_ready_time(self, guid): + """ Returns the deployment time of the RM as a timestamp """ + rm = self.get_resource(guid) + return rm.ready_time +
+
[docs] def get_release_time(self, guid): + """ Returns the release time of the RM as a timestamp """ + rm = self.get_resource(guid) + return rm.release_time +
+
[docs] def get_failed_time(self, guid): + """ Returns the time failure occured for the RM as a timestamp """ + rm = self.get_resource(guid) + return rm.failed_time +
+
[docs] def set_with_conditions(self, name, value, guids1, guids2, state, + time = None): + """ Modifies the value of attribute with name 'name' on all RMs + on the guids1 list when time 'time' has elapsed since all + elements in guids2 list have reached state 'state'. + + :param name: Name of attribute to set in RM + :type name: string + + :param value: Value of attribute to set in RM + :type name: string + + :param guids1: List of guids of RMs subjected to action + :type guids1: list + + :param action: Action to register (either START or STOP) + :type action: ResourceAction + + :param guids2: List of guids of RMs to we waited for + :type guids2: list + + :param state: State to wait for on RMs (STARTED, STOPPED, etc) + :type state: ResourceState + + :param time: Time to wait after guids2 has reached status + :type time: string + + """ + if isinstance(guids1, int): + guids1 = [guids1] + if isinstance(guids2, int): + guids2 = [guids2] + + for guid1 in guids1: + rm = self.get_resource(guid) + rm.set_with_conditions(name, value, guids2, state, time) +
+
[docs] def deploy(self, guids = None, wait_all_ready = True, group = None): + """ Deploys all ResourceManagers in the guids list. + + If the argument 'guids' is not given, all RMs with state NEW + are deployed. + + :param guids: List of guids of RMs to deploy + :type guids: list + + :param wait_all_ready: Wait until all RMs are ready in + order to start the RMs + :type guid: int + + :param group: Id of deployment group in which to deploy RMs + :type group: int + + """ + self.logger.debug(" ------- DEPLOY START ------ ") + + if not guids: + # If no guids list was passed, all 'NEW' RMs will be deployed + guids = [] + for guid, rm in self._resources.iteritems(): + if rm.state == ResourceState.NEW: + guids.append(guid) + + if isinstance(guids, int): + guids = [guids] + + # Create deployment group + # New guids can be added to a same deployment group later on + new_group = False + if not group: + new_group = True + group = self._group_id_generator.next() + + if group not in self._groups: + self._groups[group] = [] + + self._groups[group].extend(guids) + + def wait_all_and_start(group): + # Function that checks if all resources are READY + # before scheduling a start_with_conditions for each RM + reschedule = False + + # Get all guids in group + guids = self._groups[group] + + for guid in guids: + if self.state(guid) < ResourceState.READY: + reschedule = True + break + + if reschedule: + callback = functools.partial(wait_all_and_start, group) + self.schedule("1s", callback) + else: + # If all resources are ready, we schedule the start + for guid in guids: + rm = self.get_resource(guid) + self.schedule("0s", rm.start_with_conditions) + + if rm.conditions.get(ResourceAction.STOP): + # Only if the RM has STOP conditions we + # schedule a stop. Otherwise the RM will stop immediately + self.schedule("0s", rm.stop_with_conditions) + + if wait_all_ready and new_group: + # Schedule a function to check that all resources are + # READY, and only then schedule the start. + # This aims at reducing the number of tasks looping in the + # scheduler. + # Instead of having many start tasks, we will have only one for + # the whole group. + callback = functools.partial(wait_all_and_start, group) + self.schedule("0s", callback) + + for guid in guids: + rm = self.get_resource(guid) + rm.deployment_group = group + self.schedule("0s", rm.deploy_with_conditions) + + if not wait_all_ready: + self.schedule("0s", rm.start_with_conditions) + + if rm.conditions.get(ResourceAction.STOP): + # Only if the RM has STOP conditions we + # schedule a stop. Otherwise the RM will stop immediately + self.schedule("0s", rm.stop_with_conditions) +
+
[docs] def release(self, guids = None): + """ Releases all ResourceManagers in the guids list. + + If the argument 'guids' is not given, all RMs registered + in the experiment are released. + + :param guids: List of RM guids + :type guids: list + + """ + if self._state == ECState.RELEASED: + return + + if isinstance(guids, int): + guids = [guids] + + if not guids: + guids = self.resources + + for guid in guids: + rm = self.get_resource(guid) + self.schedule("0s", rm.release) + + self.wait_released(guids) + + if self.persist: + self.save() + + for guid in guids: + if self.get(guid, "hardRelease"): + self.remove_resource(guid)\ + + # Mark the EC state as RELEASED + self._state = ECState.RELEASED +
+
[docs] def shutdown(self): + """ Releases all resources and stops the ExperimentController + + """ + # If there was a major failure we can't exit gracefully + if self._state == ECState.FAILED: + raise RuntimeError("EC failure. Can not exit gracefully") + + # Remove all pending tasks from the scheduler queue + for tid in list(self._scheduler.pending): + self._scheduler.remove(tid) + + # Remove pending tasks from the workers queue + self._runner.empty() + + self.release() + + # Mark the EC state as TERMINATED + self._state = ECState.TERMINATED + + # Stop processing thread + self._stop = True + + # Notify condition to wake up the processing thread + self._notify() + + if self._thread.is_alive(): + self._thread.join() +
+
[docs] def schedule(self, date, callback, track = False): + """ Schedules a callback to be executed at time 'date'. + + :param date: string containing execution time for the task. + It can be expressed as an absolute time, using + timestamp format, or as a relative time matching + ^\d+.\d+(h|m|s|ms|us)$ + + :param callback: code to be executed for the task. Must be a + Python function, and receives args and kwargs + as arguments. + + :param track: if set to True, the task will be retrievable with + the get_task() method + + :return : The Id of the task + :rtype: int + + """ + timestamp = stabsformat(date) + task = Task(timestamp, callback) + task = self._scheduler.schedule(task) + + if track: + self._tasks[task.id] = task + + # Notify condition to wake up the processing thread + self._notify() + + return task.id +
+ def _process(self): + """ Process scheduled tasks. + + .. note:: + + Tasks are scheduled by invoking the schedule method with a target + callback and an execution time. + The schedule method creates a new Task object with that callback + and execution time, and pushes it into the '_scheduler' queue. + The execution time and the order of arrival of tasks are used + to order the tasks in the queue. + + The _process method is executed in an independent thread held by + the ExperimentController for as long as the experiment is running. + This method takes tasks from the '_scheduler' queue in a loop + and processes them in parallel using multithreading. + The environmental variable NEPI_NTHREADS can be used to control + the number of threads used to process tasks. The default value is + 50. + + To execute tasks in parallel, a ParallelRunner (PR) object is used. + This object keeps a pool of threads (workers), and a queue of tasks + scheduled for 'immediate' execution. + + On each iteration, the '_process' loop will take the next task that + is scheduled for 'future' execution from the '_scheduler' queue, + and if the execution time of that task is >= to the current time, + it will push that task into the PR for 'immediate execution'. + As soon as a worker is free, the PR will assign the next task to + that worker. + + Upon receiving a task to execute, each PR worker (thread) will + invoke the _execute method of the EC, passing the task as + argument. + The _execute method will then invoke task.callback inside a + try/except block. If an exception is raised by the tasks.callback, + it will be trapped by the try block, logged to standard error + (usually the console), and the task will be marked as failed. + + """ + + self._nthreads = int(os.environ.get("NEPI_NTHREADS", str(self._nthreads))) + self._runner = ParallelRun(maxthreads = self.nthreads) + self._runner.start() + + while not self._stop: + try: + self._cond.acquire() + + task = self._scheduler.next() + + if not task: + # No task to execute. Wait for a new task to be scheduled. + self._cond.wait() + else: + # The task timestamp is in the future. Wait for timeout + # or until another task is scheduled. + now = tnow() + if now < task.timestamp: + # Calculate timeout in seconds + timeout = tdiffsec(task.timestamp, now) + + # Re-schedule task with the same timestamp + self._scheduler.schedule(task) + + task = None + + # Wait timeout or until a new task awakes the condition + self._cond.wait(timeout) + + self._cond.release() + + if task: + # Process tasks in parallel + self._runner.put(self._execute, task) + except: + import traceback + err = traceback.format_exc() + self.logger.error("Error while processing tasks in the EC: %s" % err) + + # Set the EC to FAILED state + self._state = ECState.FAILED + + # Set the FailureManager failure level to EC failure + self._fm.set_ec_failure() + + self.logger.debug("Exiting the task processing loop ... ") + + self._runner.sync() + self._runner.destroy() + + def _execute(self, task): + """ Executes a single task. + + :param task: Object containing the callback to execute + :type task: Task + + """ + try: + # Invoke callback + task.result = task.callback() + task.status = TaskStatus.DONE + except: + import traceback + err = traceback.format_exc() + task.result = err + task.status = TaskStatus.ERROR + + self.logger.error("Error occurred while executing task: %s" % err) + + def _notify(self): + """ Awakes the processing thread if it is blocked waiting + for new tasks to arrive + + """ + self._cond.acquire() + self._cond.notify() + self._cond.release() + + def _build_from_netgraph(self, add_node_callback, add_edge_callback, + **kwargs): + """ Automates experiment description using a NetGraph instance. + """ + self._netgraph = NetGraph(**kwargs) + + if add_node_callback: + ### Add resources to the EC + for nid in self.netgraph.nodes(): + add_node_callback(self, nid) + + if add_edge_callback: + #### Add connections between resources + for nid1, nid2 in self.netgraph.edges(): + add_edge_callback(self, nid1, nid2) +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/execution/resource.html b/doc/sphinx/_build/html/_modules/nepi/execution/resource.html new file mode 100644 index 00000000..dd535d73 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/execution/resource.html @@ -0,0 +1,1326 @@ + + + + + + + + nepi.execution.resource — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.execution.resource

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.util.timefuncs import tnow, tdiff, tdiffsec, stabsformat
+from nepi.util.logger import Logger
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import TraceAttr
+
+import copy
+import functools
+import logging
+import os
+import pkgutil
+import sys
+import threading
+import weakref
+
+
[docs]class ResourceAction: + """ Action that a user can order to a Resource Manager + + """ + DEPLOY = 0 + START = 1 + STOP = 2 +
+
[docs]class ResourceState: + """ State of a Resource Manager + + """ + NEW = 0 + DISCOVERED = 1 + RESERVED = 2 + PROVISIONED = 3 + READY = 4 + STARTED = 5 + STOPPED = 6 + FAILED = 7 + RELEASED = 8 +
+ResourceState2str = dict({ + ResourceState.NEW : "NEW", + ResourceState.DISCOVERED : "DISCOVERED", + ResourceState.RESERVED : "RESERVED", + ResourceState.PROVISIONED : "PROVISIONED", + ResourceState.READY : "READY", + ResourceState.STARTED : "STARTED", + ResourceState.STOPPED : "STOPPED", + ResourceState.FAILED : "FAILED", + ResourceState.RELEASED : "RELEASED", + }) + +
[docs]def clsinit(cls): + """ Initializes template information (i.e. attributes and traces) + on classes derived from the ResourceManager class. + + It is used as a decorator in the class declaration as follows: + + @clsinit + class MyResourceManager(ResourceManager): + + ... + + """ + + cls._clsinit() + return cls +
+
[docs]def clsinit_copy(cls): + """ Initializes template information (i.e. attributes and traces) + on classes derived from the ResourceManager class. + It differs from the clsinit method in that it forces inheritance + of attributes and traces from the parent class. + + It is used as a decorator in the class declaration as follows: + + @clsinit + class MyResourceManager(ResourceManager): + + ... + + + clsinit_copy should be prefered to clsinit when creating new + ResourceManager child classes. + + """ + + cls._clsinit_copy() + return cls +
+
[docs]def failtrap(func): + """ Decorator function for instance methods that should set the + RM state to FAILED when an error is raised. The methods that must be + decorated are: discover, reserved, provision, deploy, start, stop. + + """ + def wrapped(self, *args, **kwargs): + try: + return func(self, *args, **kwargs) + except: + self.fail() + + import traceback + err = traceback.format_exc() + logger = Logger(self._rtype) + logger.error(err) + logger.error("SETTING guid %d to state FAILED" % self.guid) + raise + + return wrapped +
+@clsinit +
[docs]class ResourceManager(Logger): + """ Base clase for all ResourceManagers. + + A ResourceManger is specific to a resource type (e.g. Node, + Switch, Application, etc) on a specific platform (e.g. PlanetLab, + OMF, etc). + + The ResourceManager instances are responsible for interacting with + and controlling concrete (physical or virtual) resources in the + experimental platforms. + + """ + _rtype = "Resource" + _attributes = None + _traces = None + _help = None + _platform = None + _reschedule_delay = "0.5s" + + @classmethod + def _register_attribute(cls, attr): + """ Resource subclasses will invoke this method to add a + resource attribute + + """ + + cls._attributes[attr.name] = attr + + @classmethod + def _remove_attribute(cls, name): + """ Resource subclasses will invoke this method to remove a + resource attribute + + """ + + del cls._attributes[name] + + @classmethod + def _register_trace(cls, trace): + """ Resource subclasses will invoke this method to add a + resource trace + + """ + + cls._traces[trace.name] = trace + + @classmethod + def _remove_trace(cls, name): + """ Resource subclasses will invoke this method to remove a + resource trace + + """ + + del cls._traces[name] + + @classmethod + def _register_attributes(cls): + """ Resource subclasses will invoke this method to register + resource attributes. + + This method should be overriden in the RMs that define + attributes. + + """ + critical = Attribute("critical", + "Defines whether the resource is critical. " + "A failure on a critical resource will interrupt " + "the experiment. ", + type = Types.Bool, + default = True, + flags = Flags.Design) + hard_release = Attribute("hardRelease", + "Forces removal of all result files and directories associated " + "to the RM upon resource release. After release the RM will " + "be removed from the EC and the results will not longer be " + "accessible", + type = Types.Bool, + default = False, + flags = Flags.Design) + + cls._register_attribute(critical) + cls._register_attribute(hard_release) + + @classmethod + def _register_traces(cls): + """ Resource subclasses will invoke this method to register + resource traces + + This method should be overridden in the RMs that define traces. + + """ + + pass + + @classmethod + def _clsinit(cls): + """ ResourceManager classes have different attributes and traces. + Attribute and traces are stored in 'class attribute' dictionaries. + When a new ResourceManager class is created, the _clsinit method is + called to create a new instance of those dictionaries and initialize + them. + + The _clsinit method is called by the clsinit decorator method. + + """ + + # static template for resource attributes + cls._attributes = dict() + cls._register_attributes() + + # static template for resource traces + cls._traces = dict() + cls._register_traces() + + @classmethod + def _clsinit_copy(cls): + """ Same as _clsinit, except that after creating new instances of the + dictionaries it copies all the attributes and traces from the parent + class. + + The _clsinit_copy method is called by the clsinit_copy decorator method. + + """ + # static template for resource attributes + cls._attributes = copy.deepcopy(cls._attributes) + cls._register_attributes() + + # static template for resource traces + cls._traces = copy.deepcopy(cls._traces) + cls._register_traces() + + @classmethod +
[docs] def get_rtype(cls): + """ Returns the type of the Resource Manager + + """ + return cls._rtype +
+ @classmethod +
[docs] def get_attributes(cls): + """ Returns a copy of the attributes + + """ + return copy.deepcopy(cls._attributes.values()) +
+ @classmethod +
[docs] def get_attribute(cls, name): + """ Returns a copy of the attribute with name 'name' + + """ + return copy.deepcopy(cls._attributes[name]) +
+ @classmethod +
[docs] def get_traces(cls): + """ Returns a copy of the traces + + """ + return copy.deepcopy(cls._traces.values()) +
+ @classmethod +
[docs] def get_help(cls): + """ Returns the description of the type of Resource + + """ + return cls._help +
+ @classmethod +
[docs] def get_platform(cls): + """ Returns the identified of the platform (i.e. testbed type) + for the Resource + + """ + return cls._platform +
+ @classmethod +
[docs] def get_global(cls, name): + """ Returns the value of a global attribute + Global attribute meaning an attribute for + all the resources from a rtype + + :param name: Name of the attribute + :type name: str + :rtype: str + """ + global_attr = cls._attributes[name] + return global_attr.value +
+ @classmethod +
[docs] def set_global(cls, name, value): + """ Set value for a global attribute + + :param name: Name of the attribute + :type name: str + :param name: Value of the attribute + :type name: str + """ + global_attr = cls._attributes[name] + global_attr.value = value + return value +
+ def __init__(self, ec, guid): + super(ResourceManager, self).__init__(self.get_rtype()) + + self._guid = guid + self._ec = weakref.ref(ec) + self._connections = set() + self._conditions = dict() + + # the resource instance gets a copy of all attributes + self._attrs = copy.deepcopy(self._attributes) + + # the resource instance gets a copy of all traces + self._trcs = copy.deepcopy(self._traces) + + # Each resource is placed on a deployment group by the EC + # during deployment + self.deployment_group = None + + self._start_time = None + self._stop_time = None + self._discover_time = None + self._reserved_time = None + self._provision_time = None + self._ready_time = None + self._release_time = None + self._failed_time = None + + self._state = ResourceState.NEW + + # instance lock to synchronize exclusive state change methods (such + # as deploy and release methods), in order to prevent them from being + # executed at the same time and corrupt internal resource state + self._release_lock = threading.Lock() + + @property +
[docs] def guid(self): + """ Returns the global unique identifier of the RM """ + return self._guid +
+ @property +
[docs] def ec(self): + """ Returns the Experiment Controller of the RM """ + return self._ec() +
+ @property +
[docs] def connections(self): + """ Returns the set of guids of connected RMs """ + return self._connections +
+ @property +
[docs] def conditions(self): + """ Returns the conditions to which the RM is subjected to. + + This method returns a dictionary of conditions lists indexed by + a ResourceAction. + + """ + return self._conditions +
+ @property +
[docs] def start_time(self): + """ Returns the start time of the RM as a timestamp """ + return self._start_time +
+ @property +
[docs] def stop_time(self): + """ Returns the stop time of the RM as a timestamp """ + return self._stop_time +
+ @property +
[docs] def discover_time(self): + """ Returns the discover time of the RM as a timestamp """ + return self._discover_time +
+ @property +
[docs] def reserved_time(self): + """ Returns the reserved time of the RM as a timestamp """ + return self._reserved_time +
+ @property +
[docs] def provision_time(self): + """ Returns the provision time of the RM as a timestamp """ + return self._provision_time +
+ @property +
[docs] def ready_time(self): + """ Returns the deployment time of the RM as a timestamp """ + return self._ready_time +
+ @property +
[docs] def release_time(self): + """ Returns the release time of the RM as a timestamp """ + return self._release_time +
+ @property +
[docs] def failed_time(self): + """ Returns the time failure occurred for the RM as a timestamp """ + return self._failed_time +
+ @property +
[docs] def state(self): + """ Get the current state of the RM """ + return self._state +
+ @property +
[docs] def reschedule_delay(self): + """ Returns default reschedule delay """ + return self._reschedule_delay +
+
[docs] def log_message(self, msg): + """ Returns the log message formatted with added information. + + :param msg: text message + :type msg: str + :rtype: str + + """ + return " %s guid %d - %s " % (self._rtype, self.guid, msg) +
+
[docs] def register_connection(self, guid): + """ Registers a connection to the RM identified by guid + + This method should not be overridden. Specific functionality + should be added in the do_connect method. + + :param guid: Global unique identified of the RM to connect to + :type guid: int + + """ + if self.valid_connection(guid): + self.do_connect(guid) + self._connections.add(guid) +
+
[docs] def unregister_connection(self, guid): + """ Removes a registered connection to the RM identified by guid + + This method should not be overridden. Specific functionality + should be added in the do_disconnect method. + + :param guid: Global unique identified of the RM to connect to + :type guid: int + + """ + if guid in self._connections: + self.do_disconnect(guid) + self._connections.remove(guid) +
+ @failtrap +
[docs] def discover(self): + """ Performs resource discovery. + + This method is responsible for selecting an individual resource + matching user requirements. + + This method should not be overridden directly. Specific functionality + should be added in the do_discover method. + + """ + with self._release_lock: + if self._state != ResourceState.RELEASED: + self.do_discover() +
+ @failtrap +
[docs] def reserve(self): + """ Performs resource reserve. + + This method is responsible for reserving an individual resource + matching user requirements. + + This method should not be overridden directly. Specific functionality + should be added in the do_reserved method. + + """ + with self._release_lock: + if self._state != ResourceState.RELEASED: + self.do_reserve() +
+ @failtrap +
[docs] def provision(self): + """ Performs resource provisioning. + + This method is responsible for provisioning one resource. + After this method has been successfully invoked, the resource + should be accessible/controllable by the RM. + + This method should not be overridden directly. Specific functionality + should be added in the do_provision method. + + """ + with self._release_lock: + if self._state != ResourceState.RELEASED: + self.do_provision() +
+ @failtrap +
[docs] def configure(self): + """ Performs resource configuration. + + This method is responsible for configuring one resource. + After this method has been successfully invoked, the resource + should be set up to start the experimentation. + + This method should not be overridden directly. Specific functionality + should be added in the do_configure method. + + """ + with self._release_lock: + if self._state != ResourceState.RELEASED: + self.do_configure() +
+ @failtrap +
[docs] def start(self): + """ Starts the RM (e.g. launch remote process). + + There is no standard start behavior. Some RMs will not need to perform + any actions upon start. + + This method should not be overridden directly. Specific functionality + should be added in the do_start method. + + """ + + if not self.state in [ResourceState.READY, ResourceState.STOPPED]: + self.error("Wrong state %s for start" % self.state) + return + + with self._release_lock: + if self._state != ResourceState.RELEASED: + self.do_start() +
+ @failtrap +
[docs] def stop(self): + """ Interrupts the RM, stopping any tasks the RM was performing. + + There is no standard stop behavior. Some RMs will not need to perform + any actions upon stop. + + This method should not be overridden directly. Specific functionality + should be added in the do_stop method. + + """ + if not self.state in [ResourceState.STARTED]: + self.error("Wrong state %s for stop" % self.state) + return + + with self._release_lock: + self.do_stop() +
+ @failtrap +
[docs] def deploy(self): + """ Execute all steps required for the RM to reach the state READY. + + This method is responsible for deploying the resource (and invoking + the discover and provision methods). + + This method should not be overridden directly. Specific functionality + should be added in the do_deploy method. + + """ + if self.state > ResourceState.READY: + self.error("Wrong state %s for deploy" % self.state) + return + + with self._release_lock: + if self._state != ResourceState.RELEASED: + self.do_deploy() +
+
[docs] def release(self): + """ Perform actions to free resources used by the RM. + + This method is responsible for releasing resources that were + used during the experiment by the RM. + + This method should not be overridden directly. Specific functionality + should be added in the do_release method. + + """ + with self._release_lock: + try: + self.do_release() + except: + self.set_released() + + import traceback + err = traceback.format_exc() + msg = " %s guid %d ----- FAILED TO RELEASE ----- \n %s " % ( + self._rtype, self.guid, err) + logger = Logger(self._rtype) + logger.debug(msg) +
+
[docs] def fail(self): + """ Sets the RM to state FAILED. + + This method should not be overridden directly. Specific functionality + should be added in the do_fail method. + + """ + with self._release_lock: + if self._state != ResourceState.RELEASED: + self.do_fail() +
+
[docs] def set(self, name, value): + """ Set the value of the attribute + + :param name: Name of the attribute + :type name: str + :param name: Value of the attribute + :type name: str + """ + attr = self._attrs[name] + attr.value = value + return value +
+
[docs] def get(self, name): + """ Returns the value of the attribute + + :param name: Name of the attribute + :type name: str + :rtype: str + """ + attr = self._attrs[name] + + """ + A.Q. Commenting due to performance impact + if attr.has_flag(Flags.Global): + self.warning( "Attribute %s is global. Use get_global instead." % name) + """ + + return attr.value +
+
[docs] def has_changed(self, name): + """ Returns the True is the value of the attribute + has been modified by the user. + + :param name: Name of the attribute + :type name: str + :rtype: str + """ + attr = self._attrs[name] + return attr.has_changed +
+
[docs] def has_flag(self, name, flag): + """ Returns true if the attribute has the flag 'flag' + + :param flag: Flag to be checked + :type flag: Flags + """ + attr = self._attrs[name] + return attr.has_flag(flag) +
+
[docs] def has_attribute(self, name): + """ Returns true if the RM has an attribute with name + + :param name: name of the attribute + :type name: string + """ + return name in self._attrs +
+
[docs] def enable_trace(self, name): + """ Explicitly enable trace generation + + :param name: Name of the trace + :type name: str + """ + trace = self._trcs[name] + trace.enabled = True +
+
[docs] def trace_enabled(self, name): + """Returns True if trace is enables + + :param name: Name of the trace + :type name: str + """ + trace = self._trcs[name] + return trace.enabled +
+
[docs] def trace(self, name, attr = TraceAttr.ALL, block = 512, offset = 0): + """ Get information on collected trace + + :param name: Name of the trace + :type name: str + + :param attr: Can be one of: + - TraceAttr.ALL (complete trace content), + - TraceAttr.STREAM (block in bytes to read starting at offset), + - TraceAttr.PATH (full path to the trace file), + - TraceAttr.SIZE (size of trace file). + :type attr: str + + :param block: Number of bytes to retrieve from trace, when attr is TraceAttr.STREAM + :type name: int + + :param offset: Number of 'blocks' to skip, when attr is TraceAttr.STREAM + :type name: int + + :rtype: str + """ + pass +
+
[docs] def register_condition(self, action, group, state, time = None): + """ Registers a condition on the resource manager to allow execution + of 'action' only after 'time' has elapsed from the moment all resources + in 'group' reached state 'state' + + :param action: Action to restrict to condition (either 'START' or 'STOP') + :type action: str + :param group: Group of RMs to wait for (list of guids) + :type group: int or list of int + :param state: State to wait for on all RM in group. (either 'STARTED', 'STOPPED' or 'READY') + :type state: str + :param time: Time to wait after 'state' is reached on all RMs in group. (e.g. '2s') + :type time: str + + """ + + if not action in self.conditions: + self._conditions[action] = list() + + conditions = self.conditions.get(action) + + # For each condition to register a tuple of (group, state, time) is + # added to the 'action' list + if not isinstance(group, list): + group = [group] + + conditions.append((group, state, time)) +
+
[docs] def unregister_condition(self, group, action = None): + """ Removed conditions for a certain group of guids + + :param action: Action to restrict to condition (either 'START', 'STOP' or 'READY') + :type action: str + + :param group: Group of RMs to wait for (list of guids) + :type group: int or list of int + + """ + # For each condition a tuple of (group, state, time) is + # added to the 'action' list + if not isinstance(group, list): + group = [group] + + for act, conditions in self.conditions.iteritems(): + if action and act != action: + continue + + for condition in list(conditions): + (grp, state, time) = condition + + # If there is an intersection between grp and group, + # then remove intersected elements + intsec = set(group).intersection(set(grp)) + if intsec: + idx = conditions.index(condition) + newgrp = set(grp) + newgrp.difference_update(intsec) + conditions[idx] = (newgrp, state, time) +
+
[docs] def get_connected(self, rtype = None): + """ Returns the list of RM with the type 'rtype' + + :param rtype: Type of the RM we look for + :type rtype: str + :return: list of guid + """ + connected = [] + rclass = ResourceFactory.get_resource_type(rtype) + for guid in self.connections: + rm = self.ec.get_resource(guid) + if not rtype or isinstance(rm, rclass): + connected.append(rm) + return connected +
+
[docs] def is_rm_instance(self, rtype): + """ Returns True if the RM is instance of 'rtype' + + :param rtype: Type of the RM we look for + :type rtype: str + :return: True|False + """ + rclass = ResourceFactory.get_resource_type(rtype) + if isinstance(self, rclass): + return True + return False +
+ @failtrap + def _needs_reschedule(self, group, state, time): + """ Internal method that verify if 'time' has elapsed since + all elements in 'group' have reached state 'state'. + + :param group: Group of RMs to wait for (list of guids) + :type group: int or list of int + :param state: State to wait for on all RM in group. (either 'STARTED', 'STOPPED' or 'READY') + :type state: str + :param time: Time to wait after 'state' is reached on all RMs in group. (e.g. '2s') + :type time: str + + .. note : time should be written like "2s" or "3m" with s for seconds, m for minutes, h for hours, ... + If for example, you need to wait 2min 30sec, time could be "150s" or "2.5m". + For the moment, 2m30s is not a correct syntax. + + """ + reschedule = False + delay = self.reschedule_delay + + # check state and time elapsed on all RMs + for guid in group: + rm = self.ec.get_resource(guid) + + # If one of the RMs this resource needs to wait for has FAILED + # and is critical we raise an exception + if rm.state == ResourceState.FAILED: + if not rm.get('critical'): + continue + msg = "Resource can not wait for FAILED RM %d. Setting Resource to FAILED" + raise RuntimeError, msg + + # If the RM state is lower than the requested state we must + # reschedule (e.g. if RM is READY but we required STARTED). + if rm.state < state: + reschedule = True + break + + # If there is a time restriction, we must verify the + # restriction is satisfied + if time: + if state == ResourceState.DISCOVERED: + t = rm.discover_time + elif state == ResourceState.RESERVED: + t = rm.reserved_time + elif state == ResourceState.PROVISIONED: + t = rm.provision_time + elif state == ResourceState.READY: + t = rm.ready_time + elif state == ResourceState.STARTED: + t = rm.start_time + elif state == ResourceState.STOPPED: + t = rm.stop_time + elif state == ResourceState.RELEASED: + t = rm.release_time + else: + break + + # time already elapsed since RM changed state + waited = "%fs" % tdiffsec(tnow(), t) + + # time still to wait + wait = tdiffsec(stabsformat(time), stabsformat(waited)) + + if wait > 0.001: + reschedule = True + delay = "%fs" % wait + break + + return reschedule, delay + +
[docs] def set_with_conditions(self, name, value, group, state, time): + """ Set value 'value' on attribute with name 'name' when 'time' + has elapsed since all elements in 'group' have reached state + 'state' + + :param name: Name of the attribute to set + :type name: str + :param name: Value of the attribute to set + :type name: str + :param group: Group of RMs to wait for (list of guids) + :type group: int or list of int + :param state: State to wait for on all RM in group. (either 'STARTED', 'STOPPED' or 'READY') + :type state: str + :param time: Time to wait after 'state' is reached on all RMs in group. (e.g. '2s') + :type time: str + """ + + reschedule = False + delay = self.reschedule_delay + + ## evaluate if set conditions are met + + # only can set with conditions after the RM is started + if self.state != ResourceState.STARTED: + reschedule = True + else: + reschedule, delay = self._needs_reschedule(group, state, time) + + if reschedule: + callback = functools.partial(self.set_with_conditions, + name, value, group, state, time) + self.ec.schedule(delay, callback) + else: + self.set(name, value) +
+
[docs] def start_with_conditions(self): + """ Starts RM when all the conditions in self.conditions for + action 'START' are satisfied. + + """ + #import pdb;pdb.set_trace() + + reschedule = False + delay = self.reschedule_delay + + + ## evaluate if conditions to start are met + if self.ec.abort: + return + + # Can only start when RM is either STOPPED or READY + if self.state not in [ResourceState.STOPPED, ResourceState.READY]: + reschedule = True + self.debug("---- RESCHEDULING START ---- state %s " % self.state ) + else: + start_conditions = self.conditions.get(ResourceAction.START, []) + + self.debug("---- START CONDITIONS ---- %s" % start_conditions) + + # Verify all start conditions are met + for (group, state, time) in start_conditions: + # Uncomment for debug + #unmet = [] + #for guid in group: + # rm = self.ec.get_resource(guid) + # unmet.append((guid, rm._state)) + # + #self.debug("---- WAITED STATES ---- %s" % unmet ) + + reschedule, delay = self._needs_reschedule(group, state, time) + if reschedule: + break + + if reschedule: + self.ec.schedule(delay, self.start_with_conditions) + else: + self.debug("----- STARTING ---- ") + self.start() +
+
[docs] def stop_with_conditions(self): + """ Stops RM when all the conditions in self.conditions for + action 'STOP' are satisfied. + + """ + reschedule = False + delay = self.reschedule_delay + + ## evaluate if conditions to stop are met + if self.ec.abort: + return + + # only can stop when RM is STARTED + if self.state != ResourceState.STARTED: + reschedule = True + self.debug("---- RESCHEDULING STOP ---- state %s " % self.state ) + else: + self.debug(" ---- STOP CONDITIONS ---- %s" % + self.conditions.get(ResourceAction.STOP)) + + stop_conditions = self.conditions.get(ResourceAction.STOP, []) + for (group, state, time) in stop_conditions: + reschedule, delay = self._needs_reschedule(group, state, time) + if reschedule: + break + + if reschedule: + callback = functools.partial(self.stop_with_conditions) + self.ec.schedule(delay, callback) + else: + self.debug(" ----- STOPPING ---- ") + self.stop() +
+
[docs] def deploy_with_conditions(self): + """ Deploy RM when all the conditions in self.conditions for + action 'READY' are satisfied. + + """ + reschedule = False + delay = self.reschedule_delay + + ## evaluate if conditions to deploy are met + if self.ec.abort: + return + + # only can deploy when RM is either NEW, DISCOVERED or PROVISIONED + if self.state not in [ResourceState.NEW, ResourceState.DISCOVERED, + ResourceState.RESERVED, ResourceState.PROVISIONED]: + #### XXX: A.Q. IT SHOULD FAIL IF DEPLOY IS CALLED IN OTHER STATES! + reschedule = True + self.debug("---- RESCHEDULING DEPLOY ---- state %s " % self.state ) + else: + deploy_conditions = self.conditions.get(ResourceAction.DEPLOY, []) + + self.debug("---- DEPLOY CONDITIONS ---- %s" % deploy_conditions) + + # Verify all start conditions are met + for (group, state, time) in deploy_conditions: + # Uncomment for debug + #unmet = [] + #for guid in group: + # rm = self.ec.get_resource(guid) + # unmet.append((guid, rm._state)) + + #self.debug("---- WAITED STATES ---- %s" % unmet ) + + reschedule, delay = self._needs_reschedule(group, state, time) + if reschedule: + break + + if reschedule: + self.ec.schedule(delay, self.deploy_with_conditions) + else: + self.debug("----- DEPLOYING ---- ") + self.deploy() +
+
[docs] def do_connect(self, guid): + """ Performs actions that need to be taken upon associating RMs. + This method should be redefined when necessary in child classes. + """ + pass +
+
[docs] def do_disconnect(self, guid): + """ Performs actions that need to be taken upon disassociating RMs. + This method should be redefined when necessary in child classes. + """ + pass +
+
[docs] def valid_connection(self, guid): + """Checks whether a connection with the other RM + is valid. + This method need to be redefined by each new Resource Manager. + + :param guid: Guid of the current Resource Manager + :type guid: int + :rtype: Boolean + + """ + # TODO: Validate! + return True +
+
[docs] def do_discover(self): + self.set_discovered() +
+
[docs] def do_reserve(self): + self.set_reserved() +
+
[docs] def do_provision(self): + self.set_provisioned() +
+
[docs] def do_configure(self): + pass +
+
[docs] def do_start(self): + self.set_started() +
+
[docs] def do_stop(self): + self.set_stopped() +
+
[docs] def do_deploy(self): + self.set_ready() +
+
[docs] def do_release(self): + self.set_released() +
+
[docs] def do_fail(self): + self.set_failed() + self.ec.inform_failure(self.guid) +
+
[docs] def set_started(self, time = None): + """ Mark ResourceManager as STARTED """ + self.set_state(ResourceState.STARTED, "_start_time", time) + self.debug("----- STARTED ---- ") +
+
[docs] def set_stopped(self, time = None): + """ Mark ResourceManager as STOPPED """ + self.set_state(ResourceState.STOPPED, "_stop_time", time) + self.debug("----- STOPPED ---- ") +
+
[docs] def set_ready(self, time = None): + """ Mark ResourceManager as READY """ + self.set_state(ResourceState.READY, "_ready_time", time) + self.debug("----- READY ---- ") +
+
[docs] def set_released(self, time = None): + """ Mark ResourceManager as REALEASED """ + self.set_state(ResourceState.RELEASED, "_release_time", time) + + msg = " %s guid %d ----- RELEASED ----- " % (self._rtype, self.guid) + logger = Logger(self._rtype) + logger.debug(msg) +
+
[docs] def set_failed(self, time = None): + """ Mark ResourceManager as FAILED """ + self.set_state(ResourceState.FAILED, "_failed_time", time) + + msg = " %s guid %d ----- FAILED ----- " % (self._rtype, self.guid) + logger = Logger(self._rtype) + logger.debug(msg) +
+
[docs] def set_discovered(self, time = None): + """ Mark ResourceManager as DISCOVERED """ + self.set_state(ResourceState.DISCOVERED, "_discover_time", time) + self.debug("----- DISCOVERED ---- ") +
+
[docs] def set_reserved(self, time = None): + """ Mark ResourceManager as RESERVED """ + self.set_state(ResourceState.RESERVED, "_reserved_time", time) + self.debug("----- RESERVED ---- ") +
+
[docs] def set_provisioned(self, time = None): + """ Mark ResourceManager as PROVISIONED """ + self.set_state(ResourceState.PROVISIONED, "_provision_time", time) + self.debug("----- PROVISIONED ---- ") +
+
[docs] def set_state(self, state, state_time_attr, time = None): + """ Set the state of the RM while keeping a trace of the time """ + + # Ensure that RM state will not change after released + if self._state == ResourceState.RELEASED: + return + + time = time or tnow() + self.set_state_time(state, state_time_attr, time) +
+
[docs] def set_state_time(self, state, state_time_attr, time): + """ Set the time for the RM state change """ + setattr(self, state_time_attr, time) + self._state = state +
+
[docs]class ResourceFactory(object): + _resource_types = dict() + + @classmethod +
[docs] def resource_types(cls): + """Return the type of the Class""" + return cls._resource_types +
+ @classmethod +
[docs] def get_resource_type(cls, rtype): + """Return the type of the Class""" + return cls._resource_types.get(rtype) +
+ @classmethod +
[docs] def register_type(cls, rclass): + """Register a new Ressource Manager""" + cls._resource_types[rclass.get_rtype()] = rclass +
+ @classmethod +
[docs] def create(cls, rtype, ec, guid): + """Create a new instance of a Ressource Manager""" + rclass = cls._resource_types[rtype] + return rclass(ec, guid) +
+
[docs]def populate_factory(): + """Find and rgister all available RMs + """ + # Once the factory is populated, don't repopulate + if not ResourceFactory.resource_types(): + for rclass in find_types(): + ResourceFactory.register_type(rclass) +
+
[docs]def find_types(): + """Look into the different folders to find all the + availables Resources Managers + """ + search_path = os.environ.get("NEPI_SEARCH_PATH", "") + search_path = set(search_path.split(" ")) + + import inspect + import nepi.resources + path = os.path.dirname(nepi.resources.__file__) + search_path.add(path) + + types = set() + + for importer, modname, ispkg in pkgutil.walk_packages(search_path, + prefix = "nepi.resources."): + + loader = importer.find_module(modname) + + try: + # Notice: Repeated calls to load_module will act as a reload of the module + if modname in sys.modules: + module = sys.modules.get(modname) + else: + module = loader.load_module(modname) + + for attrname in dir(module): + if attrname.startswith("_"): + continue + + attr = getattr(module, attrname) + + if attr == ResourceManager: + continue + + if not inspect.isclass(attr): + continue + + if issubclass(attr, ResourceManager): + types.add(attr) + + if not modname in sys.modules: + sys.modules[modname] = module + + except: + import traceback + import logging + err = traceback.format_exc() + logger = logging.getLogger("Resource.find_types()") + logger.error("Error while loading Resource Managers %s" % err) + + return types +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/execution/runner.html b/doc/sphinx/_build/html/_modules/nepi/execution/runner.html new file mode 100644 index 00000000..63b0f158 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/execution/runner.html @@ -0,0 +1,267 @@ + + + + + + + + nepi.execution.runner — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.execution.runner

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.ec import ExperimentController, ECState
+
+import math
+import numpy
+import os
+import time
+
+
[docs]class ExperimentRunner(object): + """ The ExperimentRunner entity is responsible of + re-running an experiment described by an ExperimentController + multiple time + + """ + def __init__(self): + super(ExperimentRunner, self).__init__() + +
[docs] def run(self, ec, min_runs = 1, max_runs = -1, wait_time = 0, + wait_guids = [], compute_metric_callback = None, + evaluate_convergence_callback = None ): + """ Run a same experiment independently multiple times, until the + evaluate_convergence_callback function returns True + + :param ec: Description of experiment to replicate. + The runner takes care of deploying the EC, so ec.deploy() + must not be invoked directly before or after invoking + runner.run(). + :type ec: ExperimentController + + :param min_runs: Minimum number of times the experiment must be + replicated + :type min_runs: int + + :param max_runs: Maximum number of times the experiment can be + replicated + :type max_runs: int + + :param wait_time: Time to wait in seconds on each run between invoking + ec.deploy() and ec.release(). + :type wait_time: float + + :param wait_guids: List of guids wait for finalization on each run. + This list is passed to ec.wait_finished() + :type wait_guids: list + + :param compute_metric_callback: User defined function invoked after + each experiment run to compute a metric. The metric is usually + a network measurement obtained from the data collected + during experiment execution. + The function is invoked passing the ec and the run number as arguments. + It must return the value for the computed metric(s) (usually a single + numerical value, but it can be several). + + metric = compute_metric_callback(ec, run) + + :type compute_metric_callback: function + + :param evaluate_convergence_callback: User defined function invoked after + computing the metric on each run, to evaluate the experiment was + run enough times. It takes the list of cumulated metrics produced by + the compute_metric_callback up to the current run, and decided + whether the metrics have statistically converged to a meaningful value + or not. It must return either True or False. + + stop = evaluate_convergence_callback(ec, run, metrics) + + If stop is True, then the runner will exit. + + :type evaluate_convergence_callback: function + + """ + + if (not max_runs or max_runs < 0) and not compute_metric_callback: + msg = "Undefined STOP condition, set stop_callback or max_runs" + raise RuntimeError, msg + + if compute_metric_callback and not evaluate_convergence_callback: + evaluate_convergence_callback = self.evaluate_normal_convergence + ec.logger.info(" Treating data as normal to evaluate convergence. " + "Experiment will stop when the standard error with 95% " + "confidence interval is >= 5% of the mean of the collected samples ") + + # Force persistence of experiment controller + ec._persist = True + + filepath = ec.save(dirpath = ec.exp_dir) + + samples = [] + run = 0 + stop = False + + while not stop: + run += 1 + + ec = self.run_experiment(filepath, wait_time, wait_guids) + + ec.logger.info(" RUN %d \n" % run) + + if compute_metric_callback: + metric = compute_metric_callback(ec, run) + if metric is not None: + samples.append(metric) + + if run >= min_runs and evaluate_convergence_callback: + if evaluate_convergence_callback(ec, run, samples): + stop = True + + if run >= min_runs and max_runs > -1 and run >= max_runs : + stop = True + + ec.shutdown() + del ec + + return run +
+
[docs] def evaluate_normal_convergence(self, ec, run, metrics): + """ Returns True when the confidence interval of the sample mean is + less than 5% of the mean value, for a 95% confidence level, + assuming normal distribution of the data + """ + + if len(metrics) == 0: + msg = "0 samples collected" + raise RuntimeError, msg + + x = numpy.array(metrics) + n = len(metrics) + std = x.std() + se = std / math.sqrt(n) + m = x.mean() + + # Confidence interval for 95% confidence level, + # assuming normally distributed data. + ci95 = se * 2 + + ec.logger.info(" RUN %d - SAMPLES %d MEAN %.2f STD %.2f CI (95%%) %.2f \n" % ( + run, n, m, std, ci95 ) ) + + return m * 0.05 >= ci95 +
+
[docs] def run_experiment(self, filepath, wait_time, wait_guids): + """ Run an experiment based on the description stored + in filepath. + + """ + ec = ExperimentController.load(filepath) + + ec.deploy() + + ec.wait_finished(wait_guids) + time.sleep(wait_time) + + ec.release() + + if ec.state == ECState.FAILED: + raise RuntimeError, "Experiment failed" + + return ec +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/execution/scheduler.html b/doc/sphinx/_build/html/_modules/nepi/execution/scheduler.html new file mode 100644 index 00000000..f5ff0e15 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/execution/scheduler.html @@ -0,0 +1,201 @@ + + + + + + + + nepi.execution.scheduler — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.execution.scheduler

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+import itertools
+import heapq
+
+
[docs]class TaskStatus: + """ Execution state of the Task + """ + NEW = 0 + DONE = 1 + ERROR = 2 +
+
[docs]class Task(object): + """ A Task represents an operation to be executed by the + ExperimentController scheduler + """ + + def __init__(self, timestamp, callback): + """ + :param timestamp: Future execution date of the operation + :type timestamp: str + + :param callback: A function to invoke in order to execute the operation + :type callback: function + + """ + self.id = None + self.timestamp = timestamp + self.callback = callback + self.result = None + self.status = TaskStatus.NEW +
+
[docs]class HeapScheduler(object): + """ Create a Heap Scheduler + + .. note:: + + This class is thread safe. + All calls to C Extensions are made atomic by the GIL in the CPython implementation. + heapq.heappush, heapq.heappop, and list access are therefore thread-safe. + + """ + + def __init__(self): + super(HeapScheduler, self).__init__() + self._queue = list() + self._valid = set() + self._idgen = itertools.count(1) + + @property +
[docs] def pending(self): + """ Returns the list of pending task ids """ + return self._valid +
+
[docs] def schedule(self, task): + """ Add a task to the queue ordered by task.timestamp and arrival order + + :param task: task to schedule + :type task: task + """ + if task.id == None: + task.id = self._idgen.next() + + entry = (task.timestamp, task.id, task) + self._valid.add(task.id) + heapq.heappush(self._queue, entry) + return task +
+
[docs] def remove(self, tid): + """ Remove a task form the queue + + :param tid: Id of the task to be removed + :type tid: int + + """ + try: + self._valid.remove(tid) + except: + pass +
+
[docs] def next(self): + """ Get the next task in the queue by timestamp and arrival order + """ + while self._queue: + try: + timestamp, tid, task = heapq.heappop(self._queue) + if tid in self._valid: + self.remove(tid) + return task + except IndexError: + # heap empty + pass + return None +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/execution/trace.html b/doc/sphinx/_build/html/_modules/nepi/execution/trace.html new file mode 100644 index 00000000..dfe0bb19 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/execution/trace.html @@ -0,0 +1,148 @@ + + + + + + + + nepi.execution.trace — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.execution.trace

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+
[docs]class TraceAttr: + """A Trace attribute defines information about a Trace that can + be queried + """ + ALL = "all" + STREAM = "stream" + PATH = "path" + SIZE = "size" +
+
[docs]class Trace(object): + """ A Trace represents information about a Resource that can + be collected + """ + + def __init__(self, name, help, enabled = False): + """ + :param name: Name of the Trace + :type name: str + + :param help: Description of the Trace + :type help: str + + :param enabled: Sets activation state of Trace + :type enabled: bool + """ + self._name = name + self._help = help + self.enabled = enabled + + @property +
[docs] def name(self): + """ Returns the name of the trace """ + return self._name +
+ @property +
[docs] def help(self): + """ Returns the help of the trace """ + return self._help +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/all/collector.html b/doc/sphinx/_build/html/_modules/nepi/resources/all/collector.html new file mode 100644 index 00000000..55ec554d --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/all/collector.html @@ -0,0 +1,227 @@ + + + + + + + + nepi.resources.all.collector — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.all.collector

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState, ResourceAction
+from nepi.util.sshfuncs import ProcStatus
+
+import os
+import tempfile
+
+@clsinit_copy
+
[docs]class Collector(ResourceManager): + """ The collector entity is reponsible of collecting traces + of a same type associated to RMs into a local directory. + + .. class:: Class Args : + + :param ec: The Experiment controller + :type ec: ExperimentController + :param guid: guid of the RM + :type guid: int + + """ + _rtype = "Collector" + _help = "A Collector can be attached to a trace name on another " \ + "ResourceManager and will retrieve and store the trace content " \ + "in a local file at the end of the experiment" + _platform = "all" + + @classmethod + def _register_attributes(cls): + trace_name = Attribute("traceName", + "Name of the trace to be collected", + flags = Flags.Design) + + sub_dir = Attribute("subDir", + "Sub directory to collect traces into", + flags = Flags.Design) + + rename = Attribute("rename", + "Name to give to the collected trace file", + flags = Flags.Design) + + cls._register_attribute(trace_name) + cls._register_attribute(sub_dir) + cls._register_attribute(rename) + + def __init__(self, ec, guid): + super(Collector, self).__init__(ec, guid) + self._store_path = None + + @property +
[docs] def store_path(self): + return self._store_path +
+
[docs] def do_provision(self): + trace_name = self.get("traceName") + if not trace_name: + self.fail() + + msg = "No traceName was specified" + self.error(msg) + raise RuntimeError, msg + + self._store_path = self.ec.run_dir + + subdir = self.get("subDir") + if subdir: + self._store_path = os.path.join(self.store_path, subdir) + + msg = "Creating local directory at %s to store %s traces " % ( + self.store_path, trace_name) + self.info(msg) + + try: + os.makedirs(self.store_path) + except OSError: + pass + + super(Collector, self).do_provision() +
+
[docs] def do_deploy(self): + self.do_discover() + self.do_provision() + + super(Collector, self).do_deploy() +
+
[docs] def do_release(self): + trace_name = self.get("traceName") + rename = self.get("rename") or trace_name + + msg = "Collecting '%s' traces to local directory %s" % ( + trace_name, self.store_path) + self.info(msg) + + rms = self.get_connected() + for rm in rms: + fpath = os.path.join(self.store_path, "%d.%s" % (rm.guid, + rename)) + + try: + result = self.ec.trace(rm.guid, trace_name) + f = open(fpath, "w") + f.write(result) + f.close() + except: + import traceback + err = traceback.format_exc() + msg = "Couldn't retrieve trace %s for %d at %s " % (trace_name, + rm.guid, fpath) + self.error(msg, out = "", err = err) + continue + + super(Collector, self).do_release() +
+
[docs] def valid_connection(self, guid): + # TODO: Validate! + return True +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/linux/application.html b/doc/sphinx/_build/html/_modules/nepi/resources/linux/application.html new file mode 100644 index 00000000..37493562 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/linux/application.html @@ -0,0 +1,860 @@ + + + + + + + + nepi.resources.linux.application — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.linux.application

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.linux.node import LinuxNode
+from nepi.util.sshfuncs import ProcStatus
+from nepi.util.timefuncs import tnow, tdiffsec
+
+import os
+import subprocess
+
+# TODO: Resolve wildcards in commands!!
+# TODO: When a failure occurs during deployment, scp and ssh processes are left running behind!!
+
+@clsinit_copy
+
[docs]class LinuxApplication(ResourceManager): + """ + .. class:: Class Args : + + :param ec: The Experiment controller + :type ec: ExperimentController + :param guid: guid of the RM + :type guid: int + + .. note:: + + A LinuxApplication RM represents a process that can be executed in + a remote Linux host using SSH. + + The LinuxApplication RM takes care of uploadin sources and any files + needed to run the experiment, to the remote host. + It also allows to provide source compilation (build) and installation + instructions, and takes care of automating the sources build and + installation tasks for the user. + + It is important to note that files uploaded to the remote host have + two possible scopes: single-experiment or multi-experiment. + Single experiment files are those that will not be re-used by other + experiments. Multi-experiment files are those that will. + Sources and shared files are always made available to all experiments. + + Directory structure: + + The directory structure used by LinuxApplication RM at the Linux + host is the following: + + ${HOME}/.nepi/nepi-usr --> Base directory for multi-experiment files + | + ${LIB} |- /lib --> Base directory for libraries + ${BIN} |- /bin --> Base directory for binary files + ${SRC} |- /src --> Base directory for sources + ${SHARE} |- /share --> Base directory for other files + + ${HOME}/.nepi/nepi-exp --> Base directory for single-experiment files + | + ${EXP_HOME} |- /<exp-id> --> Base directory for experiment exp-id + | + ${APP_HOME} |- /<app-guid> --> Base directory for application + | specific files (e.g. command.sh, input) + | + ${RUN_HOME} |- /<run-id> --> Base directory for run specific + + """ + + _rtype = "linux::Application" + _help = "Runs an application on a Linux host with a BASH command " + _platform = "linux" + + @classmethod + def _register_attributes(cls): + command = Attribute("command", "Command to execute at application start. " + "Note that commands will be executed in the ${RUN_HOME} directory, " + "make sure to take this into account when using relative paths. ", + flags = Flags.Design) + forward_x11 = Attribute("forwardX11", "Enables X11 forwarding for SSH connections", + flags = Flags.Design) + env = Attribute("env", "Environment variables string for command execution", + flags = Flags.Design) + sudo = Attribute("sudo", "Run with root privileges", + flags = Flags.Design) + depends = Attribute("depends", + "Space-separated list of packages required to run the application", + flags = Flags.Design) + sources = Attribute("sources", + "semi-colon separated list of regular files to be uploaded to ${SRC} " + "directory prior to building. Archives won't be expanded automatically. " + "Sources are globally available for all experiments unless " + "cleanHome is set to True (This will delete all sources). ", + flags = Flags.Design) + files = Attribute("files", + "semi-colon separated list of regular miscellaneous files to be uploaded " + "to ${SHARE} directory. " + "Files are globally available for all experiments unless " + "cleanHome is set to True (This will delete all files). ", + flags = Flags.Design) + libs = Attribute("libs", + "semi-colon separated list of libraries (e.g. .so files) to be uploaded " + "to ${LIB} directory. " + "Libraries are globally available for all experiments unless " + "cleanHome is set to True (This will delete all files). ", + flags = Flags.Design) + bins = Attribute("bins", + "semi-colon separated list of binary files to be uploaded " + "to ${BIN} directory. " + "Binaries are globally available for all experiments unless " + "cleanHome is set to True (This will delete all files). ", + flags = Flags.Design) + code = Attribute("code", + "Plain text source code to be uploaded to the ${APP_HOME} directory. ", + flags = Flags.Design) + build = Attribute("build", + "Build commands to execute after deploying the sources. " + "Sources are uploaded to the ${SRC} directory and code " + "is uploaded to the ${APP_HOME} directory. \n" + "Usage example: tar xzf ${SRC}/my-app.tgz && cd my-app && " + "./configure && make && make clean.\n" + "Make sure to make the build commands return with a nonzero exit " + "code on error.", + flags = Flags.Design) + install = Attribute("install", + "Commands to transfer built files to their final destinations. " + "Install commands are executed after build commands. ", + flags = Flags.Design) + stdin = Attribute("stdin", "Standard input for the 'command'", + flags = Flags.Design) + tear_down = Attribute("tearDown", "Command to be executed just before " + "releasing the resource", + flags = Flags.Design) + + cls._register_attribute(command) + cls._register_attribute(forward_x11) + cls._register_attribute(env) + cls._register_attribute(sudo) + cls._register_attribute(depends) + cls._register_attribute(sources) + cls._register_attribute(code) + cls._register_attribute(files) + cls._register_attribute(bins) + cls._register_attribute(libs) + cls._register_attribute(build) + cls._register_attribute(install) + cls._register_attribute(stdin) + cls._register_attribute(tear_down) + + @classmethod + def _register_traces(cls): + stdout = Trace("stdout", "Standard output stream", enabled = True) + stderr = Trace("stderr", "Standard error stream", enabled = True) + + cls._register_trace(stdout) + cls._register_trace(stderr) + + def __init__(self, ec, guid): + super(LinuxApplication, self).__init__(ec, guid) + self._pid = None + self._ppid = None + self._node = None + self._home = "app-%s" % self.guid + + # whether the command should run in foreground attached + # to a terminal + self._in_foreground = False + + # whether to use sudo to kill the application process + self._sudo_kill = False + + # keep a reference to the running process handler when + # the command is not executed as remote daemon in background + self._proc = None + + # timestamp of last state check of the application + self._last_state_check = tnow() + +
[docs] def log_message(self, msg): + return " guid %d - host %s - %s " % (self.guid, + self.node.get("hostname"), msg) +
+ @property +
[docs] def node(self): + if not self._node: + node = self.get_connected(LinuxNode.get_rtype()) + if not node: + msg = "Application %s guid %d NOT connected to Node" % ( + self._rtype, self.guid) + raise RuntimeError, msg + + self._node = node[0] + + return self._node +
+ @property +
[docs] def app_home(self): + return os.path.join(self.node.exp_home, self._home) +
+ @property +
[docs] def run_home(self): + return os.path.join(self.app_home, self.ec.run_id) +
+ @property +
[docs] def pid(self): + return self._pid +
+ @property +
[docs] def ppid(self): + return self._ppid +
+ @property +
[docs] def in_foreground(self): + """ Returns True if the command needs to be executed in foreground. + This means that command will be executed using 'execute' instead of + 'run' ('run' executes a command in background and detached from the + terminal) + + When using X11 forwarding option, the command can not run in background + and detached from a terminal, since we need to keep the terminal attached + to interact with it. + """ + return self.get("forwardX11") or self._in_foreground +
+
[docs] def trace_filepath(self, filename): + return os.path.join(self.run_home, filename) +
+
[docs] def trace(self, name, attr = TraceAttr.ALL, block = 512, offset = 0): + self.info("Retrieving '%s' trace %s " % (name, attr)) + + path = self.trace_filepath(name) + + command = "(test -f %s && echo 'success') || echo 'error'" % path + (out, err), proc = self.node.execute(command) + + if (err and proc.poll()) or out.find("error") != -1: + msg = " Couldn't find trace %s " % name + self.error(msg, out, err) + return None + + if attr == TraceAttr.PATH: + return path + + if attr == TraceAttr.ALL: + (out, err), proc = self.node.check_output(self.run_home, name) + + if proc.poll(): + msg = " Couldn't read trace %s " % name + self.error(msg, out, err) + return None + + return out + + if attr == TraceAttr.STREAM: + cmd = "dd if=%s bs=%d count=1 skip=%d" % (path, block, offset) + elif attr == TraceAttr.SIZE: + cmd = "stat -c%%s %s " % path + + (out, err), proc = self.node.execute(cmd) + + if proc.poll(): + msg = " Couldn't find trace %s " % name + self.error(msg, out, err) + return None + + if attr == TraceAttr.SIZE: + out = int(out.strip()) + + return out +
+
[docs] def do_provision(self): + # take a snapshot of the system if user is root + # to ensure that cleanProcess will not kill + # pre-existent processes + if self.node.get("username") == 'root': + import pickle + procs = dict() + ps_aux = "ps aux |awk '{print $2,$11}'" + (out, err), proc = self.node.execute(ps_aux) + if len(out) != 0: + for line in out.strip().split("\n"): + parts = line.strip().split(" ") + procs[parts[0]] = parts[1] + pickle.dump(procs, open("/tmp/save.proc", "wb")) + + # create run dir for application + self.node.mkdir(self.run_home) + + # List of all the provision methods to invoke + steps = [ + # upload sources + self.upload_sources, + # upload files + self.upload_files, + # upload binaries + self.upload_binaries, + # upload libraries + self.upload_libraries, + # upload code + self.upload_code, + # upload stdin + self.upload_stdin, + # install dependencies + self.install_dependencies, + # build + self.build, + # Install + self.install] + + command = [] + + # Since provisioning takes a long time, before + # each step we check that the EC is still + for step in steps: + if self.ec.abort: + self.debug("Interrupting provisioning. EC says 'ABORT") + return + + ret = step() + if ret: + command.append(ret) + + # upload deploy script + deploy_command = ";".join(command) + self.execute_deploy_command(deploy_command) + + # upload start script + self.upload_start_command() + + self.info("Provisioning finished") + + super(LinuxApplication, self).do_provision() +
+
[docs] def upload_start_command(self, overwrite = False): + # Upload command to remote bash script + # - only if command can be executed in background and detached + command = self.get("command") + + if command and not self.in_foreground: + self.info("Uploading command '%s'" % command) + + # replace application specific paths in the command + command = self.replace_paths(command) + # replace application specific paths in the environment + env = self.get("env") + env = env and self.replace_paths(env) + + shfile = os.path.join(self.app_home, "start.sh") + + self.node.upload_command(command, + shfile = shfile, + env = env, + overwrite = overwrite) +
+
[docs] def execute_deploy_command(self, command, prefix="deploy"): + if command: + # replace application specific paths in the command + command = self.replace_paths(command) + + # replace application specific paths in the environment + env = self.get("env") + env = env and self.replace_paths(env) + + # Upload the command to a bash script and run it + # in background ( but wait until the command has + # finished to continue ) + shfile = os.path.join(self.app_home, "%s.sh" % prefix) + self.node.run_and_wait(command, self.run_home, + shfile = shfile, + overwrite = False, + pidfile = "%s_pidfile" % prefix, + ecodefile = "%s_exitcode" % prefix, + stdout = "%s_stdout" % prefix, + stderr = "%s_stderr" % prefix) +
+
[docs] def upload_sources(self, sources = None, src_dir = None): + if not sources: + sources = self.get("sources") + + command = "" + + if not src_dir: + src_dir = self.node.src_dir + + if sources: + self.info("Uploading sources ") + + sources = map(str.strip, sources.split(";")) + + # Separate sources that should be downloaded from + # the web, from sources that should be uploaded from + # the local machine + command = [] + for source in list(sources): + if source.startswith("http") or source.startswith("https"): + # remove the hhtp source from the sources list + sources.remove(source) + + command.append( " ( " + # Check if the source already exists + " ls %(src_dir)s/%(basename)s " + " || ( " + # If source doesn't exist, download it and check + # that it it downloaded ok + " wget -c --directory-prefix=%(src_dir)s %(source)s && " + " ls %(src_dir)s/%(basename)s " + " ) ) " % { + "basename": os.path.basename(source), + "source": source, + "src_dir": src_dir + }) + + command = " && ".join(command) + + # replace application specific paths in the command + command = self.replace_paths(command) + + if sources: + sources = ';'.join(sources) + self.node.upload(sources, src_dir, overwrite = False) + + return command +
+
[docs] def upload_files(self, files = None): + if not files: + files = self.get("files") + + if files: + self.info("Uploading files %s " % files) + self.node.upload(files, self.node.share_dir, overwrite = False) +
+
[docs] def upload_libraries(self, libs = None): + if not libs: + libs = self.get("libs") + + if libs: + self.info("Uploading libraries %s " % libaries) + self.node.upload(libs, self.node.lib_dir, overwrite = False) +
+
[docs] def upload_binaries(self, bins = None): + if not bins: + bins = self.get("bins") + + if bins: + self.info("Uploading binaries %s " % binaries) + self.node.upload(bins, self.node.bin_dir, overwrite = False) +
+
[docs] def upload_code(self, code = None): + if not code: + code = self.get("code") + + if code: + self.info("Uploading code") + + dst = os.path.join(self.app_home, "code") + self.node.upload(code, dst, overwrite = False, text = True) +
+
[docs] def upload_stdin(self, stdin = None): + if not stdin: + stdin = self.get("stdin") + + if stdin: + # create dir for sources + self.info("Uploading stdin") + + # upload stdin file to ${SHARE_DIR} directory + if os.path.isfile(stdin): + basename = os.path.basename(stdin) + dst = os.path.join(self.node.share_dir, basename) + else: + dst = os.path.join(self.app_home, "stdin") + + self.node.upload(stdin, dst, overwrite = False, text = True) + + # create "stdin" symlink on ${APP_HOME} directory + command = "( cd %(app_home)s ; [ ! -f stdin ] && ln -s %(stdin)s stdin )" % ({ + "app_home": self.app_home, + "stdin": dst }) + + return command +
+
[docs] def install_dependencies(self, depends = None): + if not depends: + depends = self.get("depends") + + if depends: + self.info("Installing dependencies %s" % depends) + return self.node.install_packages_command(depends) +
+
[docs] def build(self, build = None): + if not build: + build = self.get("build") + + if build: + self.info("Building sources ") + + # replace application specific paths in the command + return self.replace_paths(build) +
+
[docs] def install(self, install = None): + if not install: + install = self.get("install") + + if install: + self.info("Installing sources ") + + # replace application specific paths in the command + return self.replace_paths(install) +
+
[docs] def do_deploy(self): + # Wait until node is associated and deployed + node = self.node + if not node or node.state < ResourceState.READY: + self.debug("---- RESCHEDULING DEPLOY ---- node state %s " % self.node.state) + self.ec.schedule(self.reschedule_delay, self.deploy) + else: + command = self.get("command") or "" + self.info("Deploying command '%s' " % command) + self.do_discover() + self.do_provision() + + super(LinuxApplication, self).do_deploy() +
+
[docs] def do_start(self): + command = self.get("command") + + self.info("Starting command '%s'" % command) + + if not command: + # If no command was given (i.e. Application was used for dependency + # installation), then the application is directly marked as STOPPED + super(LinuxApplication, self).set_stopped() + else: + if self.in_foreground: + self._run_in_foreground() + else: + self._run_in_background() + + super(LinuxApplication, self).do_start() +
+ def _run_in_foreground(self): + command = self.get("command") + sudo = self.get("sudo") or False + x11 = self.get("forwardX11") + env = self.get("env") + + # Command will be launched in foreground and attached to the + # terminal using the node 'execute' in non blocking mode. + + # We save the reference to the process in self._proc + # to be able to kill the process from the stop method. + # We also set blocking = False, since we don't want the + # thread to block until the execution finishes. + (out, err), self._proc = self.execute_command(command, + env = env, + sudo = sudo, + forward_x11 = x11, + blocking = False) + + if self._proc.poll(): + self.error(msg, out, err) + raise RuntimeError, msg + + def _run_in_background(self): + command = self.get("command") + env = self.get("env") + sudo = self.get("sudo") or False + + stdout = "stdout" + stderr = "stderr" + stdin = os.path.join(self.app_home, "stdin") if self.get("stdin") \ + else None + + # Command will be run as a daemon in baground and detached from any + # terminal. + # The command to run was previously uploaded to a bash script + # during deployment, now we launch the remote script using 'run' + # method from the node. + cmd = "bash %s" % os.path.join(self.app_home, "start.sh") + (out, err), proc = self.node.run(cmd, self.run_home, + stdin = stdin, + stdout = stdout, + stderr = stderr, + sudo = sudo) + + # check if execution errors occurred + msg = " Failed to start command '%s' " % command + + if proc.poll(): + self.error(msg, out, err) + raise RuntimeError, msg + + # Wait for pid file to be generated + pid, ppid = self.node.wait_pid(self.run_home) + if pid: self._pid = int(pid) + if ppid: self._ppid = int(ppid) + + # If the process is not running, check for error information + # on the remote machine + if not self.pid or not self.ppid: + (out, err), proc = self.node.check_errors(self.run_home, + stderr = stderr) + + # Out is what was written in the stderr file + if err: + msg = " Failed to start command '%s' " % command + self.error(msg, out, err) + raise RuntimeError, msg + +
[docs] def do_stop(self): + """ Stops application execution + """ + command = self.get('command') or '' + + if self.state == ResourceState.STARTED: + + self.info("Stopping command '%s' " % command) + + # If the command is running in foreground (it was launched using + # the node 'execute' method), then we use the handler to the Popen + # process to kill it. Else we send a kill signal using the pid and ppid + # retrieved after running the command with the node 'run' method + if self._proc: + self._proc.kill() + else: + # Only try to kill the process if the pid and ppid + # were retrieved + if self.pid and self.ppid: + (out, err), proc = self.node.kill(self.pid, self.ppid, + sudo = self._sudo_kill) + + """ + # TODO: check if execution errors occurred + if (proc and proc.poll()) or err: + msg = " Failed to STOP command '%s' " % self.get("command") + self.error(msg, out, err) + """ + + super(LinuxApplication, self).do_stop() +
+
[docs] def do_release(self): + self.info("Releasing resource") + + self.do_stop() + + tear_down = self.get("tearDown") + if tear_down: + self.node.execute(tear_down) + + hard_release = self.get("hardRelease") + if hard_release: + self.node.rmdir(self.app_home) + + super(LinuxApplication, self).do_release() +
+ @property +
[docs] def state(self): + """ Returns the state of the application + """ + if self._state == ResourceState.STARTED: + if self.in_foreground: + # Check if the process we used to execute the command + # is still running ... + retcode = self._proc.poll() + + # retcode == None -> running + # retcode > 0 -> error + # retcode == 0 -> finished + if retcode: + out = "" + msg = " Failed to execute command '%s'" % self.get("command") + err = self._proc.stderr.read() + self.error(msg, out, err) + self.do_fail() + + elif retcode == 0: + self.set_stopped() + else: + # We need to query the status of the command we launched in + # background. In order to avoid overwhelming the remote host and + # the local processor with too many ssh queries, the state is only + # requested every 'state_check_delay' seconds. + state_check_delay = 0.5 + if tdiffsec(tnow(), self._last_state_check) > state_check_delay: + if self.pid and self.ppid: + # Make sure the process is still running in background + status = self.node.status(self.pid, self.ppid) + + if status == ProcStatus.FINISHED: + # If the program finished, check if execution + # errors occurred + (out, err), proc = self.node.check_errors( + self.run_home) + + if err: + msg = "Failed to execute command '%s'" % \ + self.get("command") + self.error(msg, out, err) + self.do_fail() + else: + self.set_stopped() + + self._last_state_check = tnow() + + return self._state +
+
[docs] def execute_command(self, command, + env=None, + sudo=False, + tty=False, + forward_x11=False, + blocking=False): + + environ = "" + if env: + environ = self.node.format_environment(env, inline=True) + command = environ + command + command = self.replace_paths(command) + + return self.node.execute(command, + sudo=sudo, + tty=tty, + forward_x11=forward_x11, + blocking=blocking) +
+
[docs] def replace_paths(self, command, node=None, app_home=None, run_home=None): + """ + Replace all special path tags with shell-escaped actual paths. + """ + if not node: + node=self.node + + if not app_home: + app_home=self.app_home + + if not run_home: + run_home = self.run_home + + return ( command + .replace("${USR}", node.usr_dir) + .replace("${LIB}", node.lib_dir) + .replace("${BIN}", node.bin_dir) + .replace("${SRC}", node.src_dir) + .replace("${SHARE}", node.share_dir) + .replace("${EXP}", node.exp_dir) + .replace("${EXP_HOME}", node.exp_home) + .replace("${APP_HOME}", app_home) + .replace("${RUN_HOME}", run_home) + .replace("${NODE_HOME}", node.node_home) + .replace("${HOME}", node.home_dir) + ) +
+
[docs] def valid_connection(self, guid): + # TODO: Validate! + return True +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/linux/ccn/ccnapplication.html b/doc/sphinx/_build/html/_modules/nepi/resources/linux/ccn/ccnapplication.html new file mode 100644 index 00000000..b46dd26e --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/linux/ccn/ccnapplication.html @@ -0,0 +1,159 @@ + + + + + + + + nepi.resources.linux.ccn.ccnapplication — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.linux.ccn.ccnapplication

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.resource import clsinit_copy, ResourceState
+from nepi.resources.linux.application import LinuxApplication
+from nepi.resources.linux.ccn.ccnd import LinuxCCND
+
+import os
+
+@clsinit_copy
+
[docs]class LinuxCCNApplication(LinuxApplication): + _rtype = "linux::CCNApplication" + + def __init__(self, ec, guid): + super(LinuxCCNApplication, self).__init__(ec, guid) + self._home = "ccnapp-%s" % self.guid + + @property +
[docs] def ccnd(self): + ccnd = self.get_connected(LinuxCCND.get_rtype()) + if ccnd: return ccnd[0] + return None +
+ @property +
[docs] def node(self): + if self.ccnd: return self.ccnd.node + return None +
+
[docs] def do_deploy(self): + if not self.ccnd or self.ccnd.state < ResourceState.READY: + self.debug("---- RESCHEDULING DEPLOY ---- node state %s " % self.node.state ) + self.ec.schedule(self.reschedule_delay, self.deploy) + else: + command = self.get("command") or "" + + self.info("Deploying command '%s' " % command) + + if not self.get("env"): + self.set("env", self._environment) + + self.do_discover() + self.do_provision() + + self.set_ready() +
+ @property + def _environment(self): + return self.ccnd.path + +
[docs] def valid_connection(self, guid): + # TODO: Validate! + return True +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/linux/ccn/ccncat.html b/doc/sphinx/_build/html/_modules/nepi/resources/linux/ccn/ccncat.html new file mode 100644 index 00000000..f2bbea97 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/linux/ccn/ccncat.html @@ -0,0 +1,163 @@ + + + + + + + + nepi.resources.linux.ccn.ccncat — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.linux.ccn.ccncat

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.resource import clsinit_copy, ResourceState
+from nepi.resources.linux.ccn.ccnapplication import LinuxCCNApplication
+
+import os
+
+@clsinit_copy
+
[docs]class LinuxCCNCat(LinuxCCNApplication): + _rtype = "linux::CCNCat" + + @classmethod + def _register_attributes(cls): + content_name = Attribute("contentName", + "Content name for the content to peek", + flags = Flags.Design) + + pipeline = Attribute("pipeline", + "CCNCat pipeline", + flags = Flags.Design) + + cls._register_attribute(content_name) + cls._register_attribute(pipeline) + + def __init__(self, ec, guid): + super(LinuxCCNCat, self).__init__(ec, guid) + self._home = "ccncat-%s" % self.guid + +
[docs] def do_deploy(self): + if not self.ccnd or self.ccnd.state < ResourceState.READY: + self.debug("---- RESCHEDULING DEPLOY ---- node state %s " % self.node.state ) + self.ec.schedule(self.reschedule_delay, self.deploy) + else: + command = self.get("command") + if not command: + command = "ccncat %s" % self.get("contentName") + if self.get("pipeline"): + command += " -p %s " % self.get("pipeline") + + self.set("command", command) + + self.info("Deploying command '%s' " % command) + + if not self.get("env"): + self.set("env", self._environment) + + self.do_discover() + self.do_provision() + + self.set_ready() +
+
[docs] def valid_connection(self, guid): + # TODO: Validate! + return True +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/linux/ccn/ccncontent.html b/doc/sphinx/_build/html/_modules/nepi/resources/linux/ccn/ccncontent.html new file mode 100644 index 00000000..9d0f2479 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/linux/ccn/ccncontent.html @@ -0,0 +1,241 @@ + + + + + + + + nepi.resources.linux.ccn.ccncontent — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.linux.ccn.ccncontent

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.resource import clsinit_copy, ResourceState, \
+    ResourceAction
+from nepi.resources.linux.application import LinuxApplication
+from nepi.resources.linux.ccn.ccnr import LinuxCCNR
+from nepi.util.timefuncs import tnow
+
+import os
+
+@clsinit_copy
+
[docs]class LinuxCCNContent(LinuxApplication): + _rtype = "linux::CCNContent" + + @classmethod + def _register_attributes(cls): + content_name = Attribute("contentName", + "The name of the content to publish (e.g. ccn:/VIDEO) ", + flags = Flags.Design) + + content = Attribute("content", + "The content to publish. It can be a path to a file or plain text ", + flags = Flags.Design) + + scope = Attribute("scope", + "Use the given scope on the start-write request (if -r specified). " + "scope can be 1 (local), 2 (neighborhood), or 3 (unlimited). " + "Note that a scope of 3 is encoded as the absence of any scope in the interest. ", + type = Types.Integer, + default = 1, + flags = Flags.Design) + + cls._register_attribute(content_name) + cls._register_attribute(content) + cls._register_attribute(scope) + + def __init__(self, ec, guid): + super(LinuxCCNContent, self).__init__(ec, guid) + self._home = "content-%s" % self.guid + + @property +
[docs] def ccnr(self): + ccnr = self.get_connected(LinuxCCNR.get_rtype()) + if ccnr: return ccnr[0] + return None +
+ @property +
[docs] def ccnd(self): + if self.ccnr: return self.ccnr.ccnd + return None +
+ @property +
[docs] def node(self): + if self.ccnr: return self.ccnr.node + return None +
+
[docs] def do_deploy(self): + if not self.ccnr or self.ccnr.state < ResourceState.READY: + self.debug("---- RESCHEDULING DEPLOY ---- node state %s " % self.node.state ) + + # ccnr needs to wait until ccnd is deployed and running + self.ec.schedule(self.reschedule_delay, self.deploy) + else: + if not self.get("command"): + self.set("command", self._start_command) + + if not self.get("env"): + self.set("env", self._environment) + + # set content to stdin, so the content will be + # uploaded during provision + self.set("stdin", self.get("content")) + + command = self.get("command") + + self.info("Deploying command '%s' " % command) + + self.do_discover() + self.do_provision() + + self.set_ready() +
+
[docs] def upload_start_command(self): + command = self.get("command") + env = self.get("env") + + self.info("Uploading command '%s'" % command) + + # We want to make sure the content is published + # before the experiment starts. + # Run the command as a bash script in the background, + # in the host ( but wait until the command has + # finished to continue ) + env = self.replace_paths(env) + command = self.replace_paths(command) + + (out, err), proc = self.execute_command(command, + env, blocking = True) + + if proc.poll(): + msg = "Failed to execute command" + self.error(msg, out, err) + raise RuntimeError, msg +
+
[docs] def do_start(self): + if self.state == ResourceState.READY: + command = self.get("command") + self.info("Starting command '%s'" % command) + + self.set_started() + else: + msg = " Failed to execute command '%s'" % command + self.error(msg, out, err) + raise RuntimeError, msg +
+ @property + def _start_command(self): + command = ["ccnseqwriter"] + command.append("-r %s" % self.get("contentName")) + command.append("-s %d" % self.get("scope")) + command.append("< %s" % os.path.join(self.app_home, 'stdin')) + + command = " ".join(command) + return command + + @property + def _environment(self): + return self.ccnd.path + +
[docs] def valid_connection(self, guid): + # TODO: Validate! + return True +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/linux/ccn/ccnd.html b/doc/sphinx/_build/html/_modules/nepi/resources/linux/ccn/ccnd.html new file mode 100644 index 00000000..062828ab --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/linux/ccn/ccnd.html @@ -0,0 +1,442 @@ + + + + + + + + nepi.resources.linux.ccn.ccnd — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.linux.ccn.ccnd

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.linux.application import LinuxApplication
+from nepi.resources.linux.node import OSType
+from nepi.util.timefuncs import tnow, tdiffsec
+
+import os
+
+# TODO: use ccndlogging to dynamically change the logging level
+
+
+@clsinit_copy
+
[docs]class LinuxCCND(LinuxApplication): + _rtype = "linux::CCND" + + @classmethod + def _register_attributes(cls): + debug = Attribute("debug", "Sets the CCND_DEBUG environmental variable. " + " Allowed values are : \n" + " 0 - no messages \n" + " 1 - basic messages (any non-zero value gets these) \n" + " 2 - interest messages \n" + " 4 - content messages \n" + " 8 - matching details \n" + " 16 - interest details \n" + " 32 - gory interest details \n" + " 64 - log occasional human-readable timestamps \n" + " 128 - face registration debugging \n" + " -1 - max logging \n" + " Or apply bitwise OR to these values to get combinations of them", + type = Types.Integer, + flags = Flags.Design) + + port = Attribute("port", "Sets the CCN_LOCAL_PORT environmental variable. " + "Defaults to 9695 ", + flags = Flags.Design) + + sockname = Attribute("sockname", + "Sets the CCN_LOCAL_SCOKNAME environmental variable. " + "Defaults to /tmp/.ccnd.sock", + flags = Flags.Design) + + capacity = Attribute("capacity", + "Sets the CCND_CAP environmental variable. " + "Capacity limit in terms of ContentObjects", + flags = Flags.Design) + + mtu = Attribute("mtu", "Sets the CCND_MTU environmental variable. ", + flags = Flags.Design) + + data_pause = Attribute("dataPauseMicrosec", + "Sets the CCND_DATA_PAUSE_MICROSEC environmental variable. ", + flags = Flags.Design) + + default_stale = Attribute("defaultTimeToStale", + "Sets the CCND_DEFAULT_TIME_TO_STALE environmental variable. ", + flags = Flags.Design) + + max_stale = Attribute("maxTimeToStale", + "Sets the CCND_MAX_TIME_TO_STALE environmental variable. ", + flags = Flags.Design) + + max_rte = Attribute("maxRteMicrosec", + "Sets the CCND_MAX_RTE_MICROSEC environmental variable. ", + flags = Flags.Design) + + keystore = Attribute("keyStoreDirectory", + "Sets the CCND_KEYSTORE_DIRECTORY environmental variable. ", + flags = Flags.Design) + + listen_on = Attribute("listenOn", + "Sets the CCND_LISTEN_ON environmental variable. ", + flags = Flags.Design) + + autoreg = Attribute("autoreg", + "Sets the CCND_AUTOREG environmental variable. ", + flags = Flags.Design) + + prefix = Attribute("prefix", + "Sets the CCND_PREFIX environmental variable. ", + flags = Flags.Design) + + cls._register_attribute(debug) + cls._register_attribute(port) + cls._register_attribute(sockname) + cls._register_attribute(capacity) + cls._register_attribute(mtu) + cls._register_attribute(data_pause) + cls._register_attribute(default_stale) + cls._register_attribute(max_stale) + cls._register_attribute(max_rte) + cls._register_attribute(keystore) + cls._register_attribute(listen_on) + cls._register_attribute(autoreg) + cls._register_attribute(prefix) + + @classmethod + def _register_traces(cls): + log = Trace("log", "CCND log output") + status = Trace("status", "ccndstatus output") + + cls._register_trace(log) + cls._register_trace(status) + + def __init__(self, ec, guid): + super(LinuxCCND, self).__init__(ec, guid) + self._home = "ccnd-%s" % self.guid + self._version = "ccnx" + + @property +
[docs] def version(self): + return self._version +
+ @property +
[docs] def path(self): + return "PATH=$PATH:${BIN}/%s/" % self.version +
+
[docs] def do_deploy(self): + if not self.node or self.node.state < ResourceState.READY: + self.debug("---- RESCHEDULING DEPLOY ---- node state %s " % self.node.state ) + + # ccnd needs to wait until node is deployed and running + self.ec.schedule(self.reschedule_delay, self.deploy) + else: + if not self.get("command"): + self.set("command", self._start_command) + + if not self.get("depends"): + self.set("depends", self._dependencies) + + if not self.get("sources"): + self.set("sources", self._sources) + + sources = self.get("sources") + source = sources.split(" ")[0] + basename = os.path.basename(source) + self._version = ( basename.strip().replace(".tar.gz", "") + .replace(".tar","") + .replace(".gz","") + .replace(".zip","") ) + + if not self.get("build"): + self.set("build", self._build) + + if not self.get("install"): + self.set("install", self._install) + + if not self.get("env"): + self.set("env", self._environment) + + command = self.get("command") + + self.info("Deploying command '%s' " % command) + + self.do_discover() + self.do_provision() + + self.set_ready() +
+
[docs] def upload_start_command(self): + command = self.get("command") + env = self.get("env") + + # We want to make sure the ccnd is running + # before the experiment starts. + # Run the command as a bash script in background, + # in the host ( but wait until the command has + # finished to continue ) + env = self.replace_paths(env) + command = self.replace_paths(command) + + shfile = os.path.join(self.app_home, "start.sh") + self.node.run_and_wait(command, self.run_home, + shfile = shfile, + overwrite = False, + env = env) +
+
[docs] def do_start(self): + if self.state == ResourceState.READY: + command = self.get("command") + self.info("Starting command '%s'" % command) + + self.set_started() + else: + msg = " Failed to execute command '%s'" % command + self.error(msg, out, err) + raise RuntimeError, msg +
+
[docs] def do_stop(self): + command = self.get('command') or '' + + if self.state == ResourceState.STARTED: + self.info("Stopping command '%s'" % command) + + command = "ccndstop" + env = self.get("env") + + # replace application specific paths in the command + command = self.replace_paths(command) + env = env and self.replace_paths(env) + + # Upload the command to a file, and execute asynchronously + shfile = os.path.join(self.app_home, "stop.sh") + self.node.run_and_wait(command, self.run_home, + shfile = shfile, + overwrite = False, + env = env, + pidfile = "ccndstop_pidfile", + ecodefile = "ccndstop_exitcode", + stdout = "ccndstop_stdout", + stderr = "ccndstop_stderr") + + self.set_stopped() +
+ @property +
[docs] def state(self): + # First check if the ccnd has failed + state_check_delay = 0.5 + if self._state == ResourceState.STARTED and \ + tdiffsec(tnow(), self._last_state_check) > state_check_delay: + (out, err), proc = self._ccndstatus() + + retcode = proc.poll() + + if retcode == 1 and err.find("No such file or directory") > -1: + # ccnd is not running (socket not found) + self.set_stopped() + elif retcode: + # other errors ... + msg = " Failed to execute command '%s'" % self.get("command") + self.error(msg, out, err) + self.fail() + + self._last_state_check = tnow() + + return self._state +
+ def _ccndstatus(self): + env = self.get('env') or "" + environ = self.node.format_environment(env, inline = True) + command = environ + " ccndstatus" + command = self.replace_paths(command) + + return self.node.execute(command) + + @property + def _start_command(self): + return "ccndstart" + + @property + def _dependencies(self): + if self.node.use_rpm: + return ( " autoconf openssl-devel expat-devel libpcap-devel " + " ecryptfs-utils-devel libxml2-devel automake gawk " + " gcc gcc-c++ git pcre-devel make ") + elif self.node.use_deb: + return ( " autoconf libssl-dev libexpat-dev libpcap-dev " + " libecryptfs0 libxml2-utils automake gawk gcc g++ " + " git-core pkg-config libpcre3-dev make ") + return "" + + @property + def _sources(self): + return "http://www.ccnx.org/releases/ccnx-0.8.2.tar.gz" + + @property + def _build(self): + sources = self.get("sources").split(" ")[0] + sources = os.path.basename(sources) + + return ( + # Evaluate if ccnx binaries are already installed + " ( " + " test -f ${BIN}/%(version)s/ccnd && " + " echo 'binaries found, nothing to do' " + " ) || ( " + # If not, untar and build + " ( " + " mkdir -p ${SRC}/%(version)s && " + " tar xf ${SRC}/%(sources)s --strip-components=1 -C ${SRC}/%(version)s " + " ) && " + "cd ${SRC}/%(version)s && " + # Just execute and silence warnings... + " ( ./configure && make ) " + " )") % ({ 'sources': sources, + 'version': self.version + }) + + @property + def _install(self): + return ( + # Evaluate if ccnx binaries are already installed + " ( " + " test -f ${BIN}/%(version)s/ccnd && " + " echo 'binaries found, nothing to do' " + " ) || ( " + # If not, install + " mkdir -p ${BIN}/%(version)s && " + " mv ${SRC}/%(version)s/bin/* ${BIN}/%(version)s/ " + " )" + ) % ({ 'version': self.version + }) + + @property + def _environment(self): + envs = dict({ + "debug": "CCND_DEBUG", + "port": "CCN_LOCAL_PORT", + "sockname" : "CCN_LOCAL_SOCKNAME", + "capacity" : "CCND_CAP", + "mtu" : "CCND_MTU", + "dataPauseMicrosec" : "CCND_DATA_PAUSE_MICROSEC", + "defaultTimeToStale" : "CCND_DEFAULT_TIME_TO_STALE", + "maxTimeToStale" : "CCND_MAX_TIME_TO_STALE", + "maxRteMicrosec" : "CCND_MAX_RTE_MICROSEC", + "keyStoreDirectory" : "CCND_KEYSTORE_DIRECTORY", + "listenOn" : "CCND_LISTEN_ON", + "autoreg" : "CCND_AUTOREG", + "prefix" : "CCND_PREFIX", + }) + + env = self.path + env += " ".join(map(lambda k: "%s=%s" % (envs.get(k), str(self.get(k))) \ + if self.get(k) else "", envs.keys())) + + return env + +
[docs] def valid_connection(self, guid): + # TODO: Validate! + return True +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/linux/ccn/ccnpeek.html b/doc/sphinx/_build/html/_modules/nepi/resources/linux/ccn/ccnpeek.html new file mode 100644 index 00000000..8d52c8fc --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/linux/ccn/ccnpeek.html @@ -0,0 +1,155 @@ + + + + + + + + nepi.resources.linux.ccn.ccnpeek — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.linux.ccn.ccnpeek

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.resource import clsinit_copy, ResourceState
+from nepi.resources.linux.ccn.ccnapplication import LinuxCCNApplication
+
+import os
+
+@clsinit_copy
+
[docs]class LinuxCCNPeek(LinuxCCNApplication): + _rtype = "linux::CCNPeek" + + @classmethod + def _register_attributes(cls): + content_name = Attribute("contentName", + "Content name for the content to peek", + flags = Flags.Design) + + cls._register_attribute(content_name) + + def __init__(self, ec, guid): + super(LinuxCCNPeek, self).__init__(ec, guid) + self._home = "ccnpeek-%s" % self.guid + +
[docs] def do_deploy(self): + if not self.ccnd or self.ccnd.state < ResourceState.READY: + self.debug("---- RESCHEDULING DEPLOY ---- node state %s " % self.node.state ) + self.ec.schedule(self.reschedule_delay, self.deploy) + else: + command = self.get("command") + if not command: + command = "ccnpeek %s" % self.get("contentName") + self.set("command", command) + + self.info("Deploying command '%s' " % command) + + if not self.get("env"): + self.set("env", self._environment) + + self.do_discover() + self.do_provision() + + self.set_ready() +
+
[docs] def valid_connection(self, guid): + # TODO: Validate! + return True +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/linux/ccn/ccnping.html b/doc/sphinx/_build/html/_modules/nepi/resources/linux/ccn/ccnping.html new file mode 100644 index 00000000..fcac0904 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/linux/ccn/ccnping.html @@ -0,0 +1,186 @@ + + + + + + + + nepi.resources.linux.ccn.ccnping — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.linux.ccn.ccnping

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.linux.ccn.ccnpingserver import LinuxCCNPingServer
+from nepi.util.timefuncs import tnow, tdiffsec
+
+import os
+
+@clsinit_copy
+
[docs]class LinuxCCNPing(LinuxCCNPingServer): + _rtype = "linux::CCNPing" + + @classmethod + def _register_attributes(cls): + interval = Attribute("i", + "Set ping interval in seconds (minimum 0.10 second) ", + type = Types.Integer, + flags = Flags.Design) + + count = Attribute("c", + "Total number of pings", + type = Types.Double, + flags = Flags.Design) + + number = Attribute("n", + "Set the starting number, the number is incremented by 1 after each Interest ", + type = Types.Integer, + flags = Flags.Design) + + prefix = Attribute("prefix", + "Prefix to serve content (e.g. ccnx:/name/prefix)", + flags = Flags.Design) + + cls._register_attribute(interval) + cls._register_attribute(count) + cls._register_attribute(number) + cls._register_attribute(prefix) + + def __init__(self, ec, guid): + super(LinuxCCNPing, self).__init__(ec, guid) + self._home = "ccnping-%s" % self.guid + + @property +
[docs] def ccnpingserver(self): + ccnpingserver = self.get_connected(LinuxCCNPingServer.get_rtype()) + if ccnpingserver: return ccnpingserver[0] + return None +
+
[docs] def do_start(self): + if not self.ccnpingserver or \ + self.ccnpingserver.state < ResourceState.STARTED: + self.debug("---- RESCHEDULING START---- ccnpingserver state %s " % \ + self.ccnpingserver.state ) + self.ec.schedule(self.reschedule_delay, self.start) + else: + super(LinuxCCNPing, self).do_start() +
+ @property + def _start_command(self): + args = [] + args.append("ccnping") + args.append(self.get("prefix")) + if self.get("c"): + args.append("-c %d" % self.get("c")) + if self.get("n"): + args.append("-n %d" % self.get("n")) + if self.get("i"): + args.append("-i %.2f" % self.get("i")) + + command = " ".join(args) + + return command + +
[docs] def valid_connection(self, guid): + # TODO: Validate! + return True +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/linux/ccn/ccnpingserver.html b/doc/sphinx/_build/html/_modules/nepi/resources/linux/ccn/ccnpingserver.html new file mode 100644 index 00000000..d3b8af68 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/linux/ccn/ccnpingserver.html @@ -0,0 +1,225 @@ + + + + + + + + nepi.resources.linux.ccn.ccnpingserver — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.linux.ccn.ccnpingserver

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.linux.ccn.ccnapplication import LinuxCCNApplication
+from nepi.util.timefuncs import tnow, tdiffsec
+
+import os
+
+@clsinit_copy
+
[docs]class LinuxCCNPingServer(LinuxCCNApplication): + _rtype = "linux::CCNPingServer" + + @classmethod + def _register_attributes(cls): + daemon = Attribute("d", + "Run ccnping server as a daemon in background", + type = Types.Bool, + default = False, + flags = Flags.Design) + + freshness = Attribute("x", + "Set FreshnessSeconds", + type = Types.Integer, + flags = Flags.Design) + + prefix = Attribute("prefix", + "Prefix to serve content (e.g. ccnx:/name/prefix)", + flags = Flags.Design) + + cls._register_attribute(daemon) + cls._register_attribute(freshness) + cls._register_attribute(prefix) + + def __init__(self, ec, guid): + super(LinuxCCNPingServer, self).__init__(ec, guid) + self._home = "ccnping-serv-%s" % self.guid + +
[docs] def do_deploy(self): + if not self.get("command"): + self.set("command", self._start_command) + + if not self.get("env"): + self.set("env", self._environment) + + if not self.get("depends"): + self.set("depends", self._dependencies) + + if not self.get("build"): + self.set("build", self._build) + + if not self.get("install"): + self.set("install", self._install) + + super(LinuxCCNPingServer, self).do_deploy() +
+ @property + def _start_command(self): + args = [] + args.append("ccnpingserver") + args.append(self.get("prefix")) + if self.get("d") == True: + args.append("-d") + if self.get("x"): + args.append("-x %d" % self.get("x")) + + command = " ".join(args) + + return command + + @property + def _dependencies(self): + return "git" + + @property + def _build(self): + return ( + # Evaluate if ccnx binaries are already installed + " ( " + " test -f ${BIN}/ccnping && " + " echo 'binaries found, nothing to do' " + " ) || ( " + # If not, untar and build + " ( " + " git clone git://github.com/NDN-Routing/ccnping ${SRC}/ccnping " + " ) && " + # build + "cd ${SRC}/ccnping && " + " ( " + " ./configure LDFLAGS=-L${SRC}/ccnx-0.7.2/lib CFLAGS=-I${SRC}/ccnx-0.7.2/include " + " --prefix=${BIN}/ccnping && make " + " ) " + " )") + + @property + def _install(self): + return ( + # Evaluate if ccnx binaries are already installed + " ( " + " test -f ${BIN}/ccnping && " + " echo 'binaries found, nothing to do' " + " ) || ( " + # If not, install + " mkdir -p ${BIN}/ccnping && " + " mv ${SRC}/ccnping/ccnping ${BIN}/ccnping/ && " + " mv ${SRC}/ccnping/ccnpingserver ${BIN}/ccnping/ " + " )" + ) + + @property + def _environment(self): + return "%s:%s" % (self.ccnd.path, "${BIN}/ccnping") + +
[docs] def valid_connection(self, guid): + # TODO: Validate! + return True +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/linux/ccn/ccnpoke.html b/doc/sphinx/_build/html/_modules/nepi/resources/linux/ccn/ccnpoke.html new file mode 100644 index 00000000..71ff3d7b --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/linux/ccn/ccnpoke.html @@ -0,0 +1,163 @@ + + + + + + + + nepi.resources.linux.ccn.ccnpoke — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.linux.ccn.ccnpoke

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.resource import clsinit_copy, ResourceState
+from nepi.resources.linux.ccn.ccnapplication import LinuxCCNApplication
+
+import os
+
+@clsinit_copy
+
[docs]class LinuxCCNPoke(LinuxCCNApplication): + _rtype = "linux::CCNPoke" + + @classmethod + def _register_attributes(cls): + content_name = Attribute("contentName", + "Content name for the content to peek", + flags = Flags.Design) + + content = Attribute("content", + "Content to poke (as a text string)", + flags = Flags.Design) + + cls._register_attribute(content_name) + cls._register_attribute(content) + + def __init__(self, ec, guid): + super(LinuxCCNPoke, self).__init__(ec, guid) + self._home = "ccnpoke-%s" % self.guid + +
[docs] def do_deploy(self): + if not self.ccnd or self.ccnd.state < ResourceState.READY: + self.debug("---- RESCHEDULING DEPLOY ---- node state %s " % self.node.state ) + self.ec.schedule(self.reschedule_delay, self.deploy) + else: + command = self.get("command") + if not command: + command = "ccnpoke %s" % self.get("contentName") + self.set("command", command) + + self.info("Deploying command '%s' " % command) + + if self.get("content"): + self.set("stdin", self.get("content")) + + if not self.get("env"): + self.set("env", self._environment) + + self.do_discover() + self.do_provision() + + self.set_ready() +
+
[docs] def valid_connection(self, guid): + # TODO: Validate! + return True +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/linux/ccn/ccnr.html b/doc/sphinx/_build/html/_modules/nepi/resources/linux/ccn/ccnr.html new file mode 100644 index 00000000..382fc972 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/linux/ccn/ccnr.html @@ -0,0 +1,397 @@ + + + + + + + + nepi.resources.linux.ccn.ccnr — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.linux.ccn.ccnr

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import clsinit_copy, ResourceState, \
+    ResourceAction
+from nepi.resources.linux.application import LinuxApplication
+from nepi.resources.linux.ccn.ccnd import LinuxCCND
+from nepi.util.timefuncs import tnow
+
+import os
+
+@clsinit_copy
+
[docs]class LinuxCCNR(LinuxApplication): + _rtype = "linux::CCNR" + + @classmethod + def _register_attributes(cls): + max_fanout = Attribute("maxFanout", + "Sets the CCNR_BTREE_MAX_FANOUT environmental variable. ", + flags = Flags.Design) + + max_leaf_entries = Attribute("maxLeafEntries", + "Sets the CCNR_BTREE_MAX_LEAF_ENTRIES environmental variable. ", + flags = Flags.Design) + + max_node_bytes = Attribute("maxNodeBytes", + "Sets the CCNR_BTREE_MAX_NODE_BYTES environmental variable. ", + flags = Flags.Design) + + max_node_pool = Attribute("maxNodePool", + "Sets the CCNR_BTREE_MAX_NODE_POOL environmental variable. ", + flags = Flags.Design) + + content_cache = Attribute("contentCache", + "Sets the CCNR_CONTENT_CACHE environmental variable. ", + flags = Flags.Design) + + debug = Attribute("debug", + "Sets the CCNR_DEBUG environmental variable. " + "Logging level for ccnr. Defaults to WARNING.", + type = Types.Enumerate, + allowed = [ + "NONE", + "SEVERE", + "ERROR", + "WARNING", + "INFO", + "FINE, FINER, FINEST"], + flags = Flags.Design) + + directory = Attribute("directory", + "Sets the CCNR_DIRECTORY environmental variable. ", + flags = Flags.Design) + + global_prefix = Attribute("globalPrefix", + "Sets the CCNR_GLOBAL_PREFIX environmental variable. ", + flags = Flags.Design) + + listen_on = Attribute("listenOn", + "Sets the CCNR_LISTEN_ON environmental variable. ", + flags = Flags.Design) + + min_send_bufsize = Attribute("minSendBufsize", + "Sets the CCNR_MIN_SEND_BUFSIZE environmental variable. ", + flags = Flags.Design) + + proto = Attribute("proto", + "Sets the CCNR_PROTO environmental variable. ", + flags = Flags.Design) + + status_port = Attribute("statusPort", + "Sets the CCNR_STATUS_PORT environmental variable. ", + flags = Flags.Design) + + start_write_scope_limit = Attribute("startWriteScopeLimit", + "Sets the CCNR_START_WRITE_SCOPE_LIMIT environmental variable. ", + flags = Flags.Design) + + ccns_debug = Attribute("ccnsDebug", + "Sets the CCNS_DEBUG environmental variable. ", + flags = Flags.Design) + + ccns_enable = Attribute("ccnsEnable", + "Sets the CCNS_ENABLE environmental variable. ", + flags = Flags.Design) + + ccns_faux_error = Attribute("ccnsFauxError", + "Sets the CCNS_FAUX_ERROR environmental variable. ", + flags = Flags.Design) + + ccns_heartbeat_micros = Attribute("ccnsHeartBeatMicros", + "Sets the CCNS_HEART_BEAT_MICROS environmental variable. ", + flags = Flags.Design) + + ccns_max_compares_busy = Attribute("ccnsMaxComparesBusy", + "Sets the CCNS_MAX_COMPARES_BUSY environmental variable. ", + flags = Flags.Design) + + ccns_max_fetch_busy = Attribute("ccnsMaxFetchBusy", + "Sets the CCNS_MAX_FETCH_BUSY environmental variable. ", + flags = Flags.Design) + + ccns_node_fetch_lifetime = Attribute("ccnsNodeFetchLifetime", + "Sets the CCNS_NODE_FETCH_LIFETIME environmental variable. ", + flags = Flags.Design) + + ccns_note_err = Attribute("ccnsNoteErr", + "Sets the CCNS_NOTE_ERR environmental variable. ", + flags = Flags.Design) + + ccns_repo_store = Attribute("ccnsRepoStore", + "Sets the CCNS_REPO_STORE environmental variable. ", + flags = Flags.Design) + + ccns_root_advise_fresh = Attribute("ccnsRootAdviseFresh", + "Sets the CCNS_ROOT_ADVISE_FRESH environmental variable. ", + flags = Flags.Design) + + ccns_root_advise_lifetime = Attribute("ccnsRootAdviseLifetime", + "Sets the CCNS_ROOT_ADVISE_LIFETIME environmental variable. ", + flags = Flags.Design) + + ccns_stable_enabled = Attribute("ccnsStableEnabled", + "Sets the CCNS_STABLE_ENABLED environmental variable. ", + flags = Flags.Design) + + ccns_sync_scope = Attribute("ccnsSyncScope", + "Sets the CCNS_SYNC_SCOPE environmental variable. ", + flags = Flags.Design) + + repo_file = Attribute("repoFile1", + "The Repository uses $CCNR_DIRECTORY/repoFile1 for " + "persistent storage of CCN Content Objects", + flags = Flags.Design) + + cls._register_attribute(max_fanout) + cls._register_attribute(max_leaf_entries) + cls._register_attribute(max_node_bytes) + cls._register_attribute(max_node_pool) + cls._register_attribute(content_cache) + cls._register_attribute(debug) + cls._register_attribute(directory) + cls._register_attribute(global_prefix) + cls._register_attribute(listen_on) + cls._register_attribute(min_send_bufsize) + cls._register_attribute(proto) + cls._register_attribute(status_port) + cls._register_attribute(start_write_scope_limit) + cls._register_attribute(ccns_debug) + cls._register_attribute(ccns_enable) + cls._register_attribute(ccns_faux_error) + cls._register_attribute(ccns_heartbeat_micros) + cls._register_attribute(ccns_max_compares_busy) + cls._register_attribute(ccns_max_fetch_busy) + cls._register_attribute(ccns_node_fetch_lifetime) + cls._register_attribute(ccns_note_err) + cls._register_attribute(ccns_repo_store) + cls._register_attribute(ccns_root_advise_fresh) + cls._register_attribute(ccns_root_advise_lifetime) + cls._register_attribute(ccns_stable_enabled) + cls._register_attribute(ccns_sync_scope) + cls._register_attribute(repo_file) + + @classmethod + def _register_traces(cls): + log = Trace("log", "CCND log output") + + cls._register_trace(log) + + def __init__(self, ec, guid): + super(LinuxCCNR, self).__init__(ec, guid) + self._home = "ccnr-%s" % self.guid + + @property +
[docs] def ccnd(self): + ccnd = self.get_connected(LinuxCCND.get_rtype()) + if ccnd: return ccnd[0] + return None +
+ @property +
[docs] def node(self): + if self.ccnd: return self.ccnd.node + return None +
+
[docs] def do_deploy(self): + if not self.ccnd or self.ccnd.state < ResourceState.READY: + self.debug("---- RESCHEDULING DEPLOY ---- CCND state %s " % self.ccnd.state ) + + # ccnr needs to wait until ccnd is deployed and running + self.ec.schedule(self.reschedule_delay, self.deploy) + else: + if not self.get("command"): + self.set("command", self._start_command) + + if not self.get("env"): + self.set("env", self._environment) + + command = self.get("command") + + self.info("Deploying command '%s' " % command) + + self.do_discover() + self.do_provision() + + self.set_ready() +
+
[docs] def upload_start_command(self): + command = self.get("command") + env = self.get("env") + + if self.get("repoFile1"): + # upload repoFile1 + local_file = self.get("repoFile1") + remote_file = "${RUN_HOME}/repoFile1" + remote_file = self.replace_paths(remote_file) + self.node.upload(local_file, + remote_file, + overwrite = False) + + # We want to make sure the repository is running + # before the experiment starts. + # Run the command as a bash script in background, + # in the host ( but wait until the command has + # finished to continue ) + env = self.replace_paths(env) + command = self.replace_paths(command) + + shfile = os.path.join(self.app_home, "start.sh") + self.node.run_and_wait(command, self.run_home, + shfile = shfile, + overwrite = False, + env = env) +
+
[docs] def do_start(self): + if self.state == ResourceState.READY: + command = self.get("command") + self.info("Starting command '%s'" % command) + + self.set_started() + else: + msg = " Failed to execute command '%s'" % command + self.error(msg, out, err) + raise RuntimeError, msg +
+ @property + def _start_command(self): + return "ccnr &" + + @property + def _environment(self): + envs = dict({ + "maxFanout": "CCNR_BTREE_MAX_FANOUT", + "maxLeafEntries": "CCNR_BTREE_MAX_LEAF_ENTRIES", + "maxNodeBytes": "CCNR_BTREE_MAX_NODE_BYTES", + "maxNodePool": "CCNR_BTREE_MAX_NODE_POOL", + "contentCache": "CCNR_CONTENT_CACHE", + "debug": "CCNR_DEBUG", + "directory": "CCNR_DIRECTORY", + "globalPrefix": "CCNR_GLOBAL_PREFIX", + "listenOn": "CCNR_LISTEN_ON", + "minSendBufsize": "CCNR_MIN_SEND_BUFSIZE", + "proto": "CCNR_PROTO", + "statusPort": "CCNR_STATUS_PORT", + "startWriteScopeLimit": "CCNR_START_WRITE_SCOPE_LIMIT", + "ccnsDebug": "CCNS_DEBUG", + "ccnsEnable": "CCNS_ENABLE", + "ccnsFauxError": "CCNS_FAUX_ERROR", + "ccnsHeartBeatMicros": "CCNS_HEART_BEAT_MICROS", + "ccnsMaxComparesBusy": "CCNS_MAX_COMPARES_BUSY", + "ccnsMaxFetchBusy": "CCNS_MAX_FETCH_BUSY", + "ccnsNodeFetchLifetime": "CCNS_NODE_FETCH_LIFETIME", + "ccnsNoteErr": "CCNS_NOTE_ERR", + "ccnsRepoStore": "CCNS_REPO_STORE", + "ccnsRootAdviseFresh": "CCNS_ROOT_ADVISE_FRESH", + "ccnsRootAdviseLifetime": "CCNS_ROOT_ADVISE_LIFETIME", + "ccnsStableEnabled": "CCNS_STABLE_ENABLED", + "ccnsSyncScope": "CCNS_SYNC_SCOPE", + }) + + env = self.ccnd.path + env += " ".join(map(lambda k: "%s=%s" % (envs.get(k), self.get(k)) \ + if self.get(k) else "", envs.keys())) + + return env + +
[docs] def valid_connection(self, guid): + # TODO: Validate! + return True +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/linux/ccn/fibentry.html b/doc/sphinx/_build/html/_modules/nepi/resources/linux/ccn/fibentry.html new file mode 100644 index 00000000..240329e9 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/linux/ccn/fibentry.html @@ -0,0 +1,367 @@ + + + + + + + + nepi.resources.linux.ccn.fibentry — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.linux.ccn.fibentry

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import clsinit_copy, ResourceState, \
+    ResourceAction
+from nepi.resources.linux.application import LinuxApplication
+from nepi.resources.linux.ccn.ccnd import LinuxCCND
+from nepi.util.timefuncs import tnow
+
+import os
+import socket
+import time
+
+
+# TODO: Add rest of options for ccndc!!!
+#       Implement ENTRY DELETE!!
+
+@clsinit_copy
+
[docs]class LinuxFIBEntry(LinuxApplication): + _rtype = "linux::FIBEntry" + + @classmethod + def _register_attributes(cls): + uri = Attribute("uri", + "URI prefix to match and route for this FIB entry", + default = "ccnx:/", + flags = Flags.Design) + + protocol = Attribute("protocol", + "Transport protocol used in network connection to peer " + "for this FIB entry. One of 'udp' or 'tcp'.", + type = Types.Enumerate, + default = "udp", + allowed = ["udp", "tcp"], + flags = Flags.Design) + + host = Attribute("host", + "Peer hostname used in network connection for this FIB entry. ", + flags = Flags.Design) + + port = Attribute("port", + "Peer port address used in network connection to peer " + "for this FIB entry.", + flags = Flags.Design) + + ip = Attribute("ip", + "Peer host public IP used in network connection for this FIB entry. ", + flags = Flags.Design) + + cls._register_attribute(uri) + cls._register_attribute(protocol) + cls._register_attribute(host) + cls._register_attribute(port) + cls._register_attribute(ip) + + @classmethod + def _register_traces(cls): + ping = Trace("ping", "Ping to the peer end") + mtr = Trace("mtr", "Mtr to the peer end") + traceroute = Trace("traceroute", "Tracerout to the peer end") + + cls._register_trace(ping) + cls._register_trace(mtr) + cls._register_trace(traceroute) + + def __init__(self, ec, guid): + super(LinuxFIBEntry, self).__init__(ec, guid) + self._home = "fib-%s" % self.guid + self._ping = None + self._traceroute = None + self._ccnd = None + + @property +
[docs] def ccnd(self): + if not self._ccnd: + ccnd = self.get_connected(LinuxCCND.get_rtype()) + if ccnd: + self._ccnd = ccnd[0] + + return self._ccnd +
+ @property +
[docs] def ping(self): + if not self._ping: + from nepi.resources.linux.ping import LinuxPing + ping = self.get_connected(LinuxPing.get_rtype()) + if ping: + self._ping = ping[0] + + return self._ping +
+ @property +
[docs] def traceroute(self): + if not self._traceroute: + from nepi.resources.linux.traceroute import LinuxTraceroute + traceroute = self.get_connected(LinuxTraceroute.get_rtype()) + if traceroute: + self._traceroute = traceroute[0] + + return self._traceroute +
+ @property +
[docs] def node(self): + if self.ccnd: return self.ccnd.node + return None +
+
[docs] def trace(self, name, attr = TraceAttr.ALL, block = 512, offset = 0): + if name == "ping": + if not self.ping: + return None + return self.ec.trace(self.ping.guid, "stdout", attr, block, offset) + + if name == "traceroute": + if not self.traceroute: + return None + return self.ec.trace(self.traceroute.guid, "stdout", attr, block, offset) + + return super(LinuxFIBEntry, self).trace(name, attr, block, offset) +
+
[docs] def do_deploy(self): + # Wait until associated ccnd is provisioned + if not self.ccnd or self.ccnd.state < ResourceState.READY: + # ccnr needs to wait until ccnd is deployed and running + self.ec.schedule(self.reschedule_delay, self.deploy) + else: + if not self.get("ip"): + host = self.get("host") + ip = socket.gethostbyname(host) + self.set("ip", ip) + + if not self.get("command"): + self.set("command", self._start_command) + + if not self.get("env"): + self.set("env", self._environment) + + command = self.get("command") + + self.info("Deploying command '%s' " % command) + + self.do_discover() + self.do_provision() + self.configure() + + self.set_ready() +
+
[docs] def upload_start_command(self): + command = self.get("command") + env = self.get("env") + + # We want to make sure the FIB entries are created + # before the experiment starts. + # Run the command as a bash script in the background, + # in the host ( but wait until the command has + # finished to continue ) + env = env and self.replace_paths(env) + command = self.replace_paths(command) + + # ccndc seems to return exitcode OK even if a (dns) error + # occurred, so we need to account for this case here. + (out, err), proc = self.execute_command(command, + env, blocking = True) + + if proc.poll(): + msg = "Failed to execute command" + self.error(msg, out, err) + raise RuntimeError, msg +
+
[docs] def configure(self): + if self.trace_enabled("ping") and not self.ping: + self.info("Configuring PING trace") + ping = self.ec.register_resource("linux::Ping") + self.ec.set(ping, "printTimestamp", True) + self.ec.set(ping, "target", self.get("host")) + self.ec.set(ping, "earlyStart", True) + self.ec.register_connection(ping, self.node.guid) + self.ec.register_connection(ping, self.guid) + # schedule ping deploy + self.ec.deploy(guids=[ping], group = self.deployment_group) + + if self.trace_enabled("traceroute") and not self.traceroute: + self.info("Configuring TRACEROUTE trace") + traceroute = self.ec.register_resource("linux::Traceroute") + self.ec.set(traceroute, "printTimestamp", True) + self.ec.set(traceroute, "continuous", True) + self.ec.set(traceroute, "target", self.get("host")) + self.ec.set(traceroute, "earlyStart", True) + self.ec.register_connection(traceroute, self.node.guid) + self.ec.register_connection(traceroute, self.guid) + # schedule mtr deploy + self.ec.deploy(guids=[traceroute], group = self.deployment_group) +
+
[docs] def do_start(self): + if self.state == ResourceState.READY: + command = self.get("command") + self.info("Starting command '%s'" % command) + + self.set_started() + else: + msg = " Failed to execute command '%s'" % command + self.error(msg, out, err) + raise RuntimeError, msg +
+
[docs] def do_stop(self): + command = self.get('command') + env = self.get('env') + + if self.state == ResourceState.STARTED: + self.info("Stopping command '%s'" % command) + + command = self._stop_command + (out, err), proc = self.execute_command(command, env, + blocking = True) + + self.set_stopped() + + if err: + msg = " Failed to execute command '%s'" % command + self.error(msg, out, err) + raise RuntimeError, msg +
+ @property + def _start_command(self): + uri = self.get("uri") or "" + protocol = self.get("protocol") or "" + ip = self.get("ip") or "" + port = self.get("port") or "" + + # add ccnx:/example.com/ udp 224.0.0.204 52428 + return "ccndc add %(uri)s %(protocol)s %(host)s %(port)s" % ({ + "uri" : uri, + "protocol": protocol, + "host": ip, + "port": port + }) + + @property + def _stop_command(self): + uri = self.get("uri") or "" + protocol = self.get("protocol") or "" + ip = self.get("ip") or "" + port = self.get("port") or "" + + # add ccnx:/example.com/ udp 224.0.0.204 52428 + return "ccndc del %(uri)s %(protocol)s %(host)s %(port)s" % ({ + "uri" : uri, + "protocol": protocol, + "host": ip, + "port": port + }) + + @property + def _environment(self): + return self.ccnd.path + +
[docs] def valid_connection(self, guid): + # TODO: Validate! + return True +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/linux/channel.html b/doc/sphinx/_build/html/_modules/nepi/resources/linux/channel.html new file mode 100644 index 00000000..171732c5 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/linux/channel.html @@ -0,0 +1,129 @@ + + + + + + + + nepi.resources.linux.channel — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.linux.channel

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+
+@clsinit_copy
+
[docs]class LinuxChannel(ResourceManager): + _rtype = "linux::Channel" + _help = "Represents a wireless channel on a network of Linux hosts" + _platform = "linux" + + def __init__(self, ec, guid): + super(LinuxChannel, self).__init__(ec, guid) + +
[docs] def log_message(self, msg): + return " guid %d - %s " % (self.guid, msg) +
+
[docs] def valid_connection(self, guid): + # TODO: Validate! + return True +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/linux/debfuncs.html b/doc/sphinx/_build/html/_modules/nepi/resources/linux/debfuncs.html new file mode 100644 index 00000000..c1e44985 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/linux/debfuncs.html @@ -0,0 +1,133 @@ + + + + + + + + nepi.resources.linux.debfuncs — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.linux.debfuncs

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+# TODO: Investigate using http://nixos.org/nix/
+
+
[docs]def install_packages_command(os, packages): + if not isinstance(packages, list): + packages = [packages] + + cmd = " && ".join(map(lambda p: + " { dpkg -s %(package)s || sudo -S apt-get -y install %(package)s ; } " % { + 'package': p}, packages)) + + #cmd = { dpkg -s vim || sudo -S apt-get -y install vim ; } && .. + return cmd +
+
[docs]def remove_packages_command(os, packages): + if not isinstance(packages, list): + packages = [packages] + + cmd = " && ".join(map(lambda p: + " { dpkg -s %(package)s && sudo -S apt-get -y purge %(package)s ; } " % { + 'package': p}, packages)) + + #cmd = { dpkg -s vim && sudo -S apt-get -y purge vim ; } && .. + return cmd +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/linux/gretunnel.html b/doc/sphinx/_build/html/_modules/nepi/resources/linux/gretunnel.html new file mode 100644 index 00000000..563f0b05 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/linux/gretunnel.html @@ -0,0 +1,177 @@ + + + + + + + + nepi.resources.linux.gretunnel — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.linux.gretunnel

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.resource import clsinit_copy, ResourceState
+from nepi.resources.linux.tunnel import LinuxTunnel
+from nepi.util.sshfuncs import ProcStatus
+from nepi.util.timefuncs import tnow, tdiffsec
+
+import re
+import socket
+import time
+import os
+
+@clsinit_copy
+
[docs]class LinuxGRETunnel(LinuxTunnel): + _rtype = "linux::GRETunnel" + _help = "Constructs a tunnel between two Linux endpoints using a UDP connection " + +
[docs] def log_message(self, msg): + return " guid %d - GRE tunnel %s - %s - %s " % (self.guid, + self.endpoint1.node.get("hostname"), + self.endpoint2.node.get("hostname"), + msg) +
+
[docs] def get_endpoints(self): + """ Returns the list of RM that are endpoints to the tunnel + """ + connected = [] + for guid in self.connections: + rm = self.ec.get_resource(guid) + if hasattr(rm, "gre_connect"): + connected.append(rm) + return connected +
+
[docs] def initiate_connection(self, endpoint, remote_endpoint): + # Return the command to execute to initiate the connection to the + # other endpoint + connection_run_home = self.run_home(endpoint) + connection_app_home = self.app_home(endpoint) + data = endpoint.gre_connect(remote_endpoint, + connection_app_home, + connection_run_home) + return data +
+
[docs] def establish_connection(self, endpoint, remote_endpoint, data): + pass +
+
[docs] def verify_connection(self, endpoint, remote_endpoint): + remote_ip = socket.gethostbyname(remote_endpoint.node.get("hostname")) + + command = "ping -c 4 %s" % remote_ip + (out, err), proc = endpoint.node.execute(command, + blocking = True) + + m = re.search("(\d+)% packet loss", str(out)) + if not m or int(m.groups()[0]) == 100: + msg = " Error establishing GRE Tunnel" + self.error(msg, out, err) + raise RuntimeError, msg +
+
[docs] def terminate_connection(self, endpoint, remote_endpoint): + pass +
+
[docs] def check_state_connection(self): + pass +
+
[docs] def valid_connection(self, guid): + # TODO: Validate! + return True +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/linux/interface.html b/doc/sphinx/_build/html/_modules/nepi/resources/linux/interface.html new file mode 100644 index 00000000..d1a91d19 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/linux/interface.html @@ -0,0 +1,402 @@ + + + + + + + + nepi.resources.linux.interface — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.linux.interface

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Types, Flags
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.linux.node import LinuxNode
+from nepi.resources.linux.channel import LinuxChannel
+
+import collections
+import os
+import random
+import re
+import tempfile
+import time
+
+# TODO: 
+#     - check UP, MTU attributes!
+#     - clean up code and test!
+
+@clsinit_copy
+
[docs]class LinuxInterface(ResourceManager): + _rtype = "linux::Interface" + _help = "Controls network devices on Linux hosts through the ifconfig tool" + _platform = "linux" + + @classmethod + def _register_attributes(cls): + ip4 = Attribute("ip4", "IPv4 Address", + flags = Flags.Design) + + ip6 = Attribute("ip6", "IPv6 Address", + flags = Flags.Design) + + mac = Attribute("mac", "MAC Address", + flags = Flags.Design) + + mask4 = Attribute("mask4", "IPv4 network mask", + flags = Flags.Design) + + mask6 = Attribute("mask6", "IPv6 network mask", + type = Types.Integer, + flags = Flags.Design) + + mtu = Attribute("mtu", "Maximum transmition unit for device", + type = Types.Integer) + + devname = Attribute("deviceName", + "Name of the network interface (e.g. eth0, wlan0, etc)", + flags = Flags.Design) + + up = Attribute("up", "Link up", type = Types.Bool) + + tear_down = Attribute("tearDown", "Bash script to be executed before " + \ + "releasing the resource", + flags = Flags.Design) + + cls._register_attribute(ip4) + cls._register_attribute(ip6) + cls._register_attribute(mac) + cls._register_attribute(mask4) + cls._register_attribute(mask6) + cls._register_attribute(mtu) + cls._register_attribute(devname) + cls._register_attribute(up) + cls._register_attribute(tear_down) + + def __init__(self, ec, guid): + super(LinuxInterface, self).__init__(ec, guid) + self._configured = False + + self.add_set_hooks() + +
[docs] def log_message(self, msg): + return " guid %d - host %s - %s " % (self.guid, + self.node.get("hostname"), msg) +
+ @property +
[docs] def node(self): + node = self.get_connected(LinuxNode.get_rtype()) + if node: return node[0] + return None +
+ @property +
[docs] def channel(self): + chan = self.get_connected(LinuxChannel.get_rtype()) + if chan: return chan[0] + return None +
+
[docs] def do_discover(self): + devname = self.get("deviceName") + ip4 = self.get("ip4") + ip6 = self.get("ip4") + mac = self.get("mac") + mask4 = self.get("mask4") + mask6 = self.get("mask6") + mtu = self.get("mtu") + + # Get current interfaces information + (out, err), proc = self.node.execute("ifconfig", sudo = True, tty = True) + + if err and proc.poll(): + msg = " Error retrieving interface information " + self.error(msg, out, err) + raise RuntimeError, "%s - %s - %s" % (msg, out, err) + + # Check if an interface is found matching the RM attributes + ifaces = out.split("\n\n") + + for i in ifaces: + m = re.findall("(\w+)\s+Link\s+encap:\w+(\s+HWaddr\s+(([0-9a-fA-F]{2}:?){6}))?(\s+inet\s+addr:((\d+\.?){4}).+Mask:(\d+\.\d+\.\d+\.\d+))?(.+inet6\s+addr:\s+([0-9a-fA-F:.]+)/(\d+))?(.+(UP))?(.+MTU:(\d+))?", i, re.DOTALL) + + m = m[0] + dn = m[0] + mc = m[2] + i4 = m[5] + msk4 = m[7] + i6 = m[9] + msk6 = m[10] + up = True if m[12] else False + mu = m[14] + + self.debug("Found interface %(devname)s with MAC %(mac)s," + "IPv4 %(ipv4)s %(mask4)s IPv6 %(ipv6)s/%(mask6)s %(up)s %(mtu)s" % ({ + 'devname': dn, + 'mac': mc, + 'ipv4': i4, + 'mask4': msk4, + 'ipv6': i6, + 'mask6': msk6, + 'up': up, + 'mtu': mu + }) ) + + # If the user didn't provide information we take the first + # interface that is UP + if not devname and not ip4 and not ip6 and up: + self._configured = True + self.load_configuration(dn, mc, i4, msk4, i6, msk6, mu, up) + break + + # If the user provided ipv4 or ipv6 matching that of an interface + # load the interface info + if (ip4 and ip4 == i4) or (ip6 and ip6 == i6): + self._configured = True + self.load_configuration(dn, mc, i4, msk4, i6, msk6, mu, up) + break + + # If the user provided the device name we load the associated info + if devname and devname == dn: + if ((ip4 and ip4 == i4) and (ipv6 and ip6 == i6)) or \ + not (ip4 or ip6): + self._configured = True + + # If the user gave a different ip than the existing, asume ip + # needs to be changed + i4 = ip4 or i4 + i6 = ip6 or i6 + mu = mtu or mu + + self.load_configuration(dn, mc, i4, msk4, i6, msk6, mu, up) + break + + if not self.get("deviceName"): + msg = "Unable to resolve interface " + self.error(msg) + raise RuntimeError, msg + + super(LinuxInterface, self).do_discover() +
+
[docs] def do_provision(self): + devname = self.get("deviceName") + ip4 = self.get("ip4") + ip6 = self.get("ip4") + mac = self.get("mac") + mask4 = self.get("mask4") + mask6 = self.get("mask6") + mtu = self.get("mtu") + + # Must configure interface if configuration is required + if not self._configured: + cmd = "ifconfig %s" % devname + + if ip4 and mask4: + cmd += " %(ip4)s netmask %(mask4)s broadcast %(bcast)s up" % ({ + 'ip4': ip4, + 'mask4': mask4, + 'bcast': bcast}) + if mtu: + cmd += " mtu %d " % mtu + + (out, err), proc = self.node.execute(cmd, sudo = True) + + if err and proc.poll(): + msg = "Error configuring interface with command '%s'" % cmd + self.error(msg, out, err) + raise RuntimeError, "%s - %s - %s" % (msg, out, err) + + if ip6 and mask6: + cmd = "ifconfig %(devname)s inet6 add %(ip6)s/%(mask6)d" % ({ + 'devname': devname, + 'ip6': ip6, + 'mask6': mask6}) + + (out, err), proc = self.node.execute(cmd, sudo = True) + + if err and proc.poll(): + msg = "Error seting ipv6 for interface using command '%s' " % cmd + self.error(msg, out, err) + raise RuntimeError, "%s - %s - %s" % (msg, out, err) + + super(LinuxInterface, self).do_provision() +
+
[docs] def do_deploy(self): + # Wait until node is provisioned + node = self.node + chan = self.channel + + if not node or node.state < ResourceState.PROVISIONED: + self.ec.schedule(self.reschedule_delay, self.deploy) + elif not chan or chan.state < ResourceState.READY: + self.ec.schedule(self.reschedule_delay, self.deploy) + else: + # Verify if the interface exists in node. If not, configue + # if yes, load existing configuration + self.do_discover() + self.do_provision() + + super(LinuxInterface, self).do_deploy() +
+
[docs] def do_release(self): + tear_down = self.get("tearDown") + if tear_down: + self.execute(tear_down) + + super(LinuxInterface, self).do_release() +
+
[docs] def valid_connection(self, guid): + # TODO: Validate! + return True +
+
[docs] def load_configuration(self, devname, mac, ip4, mask4, ip6, mask6, mtu, up): + self.set("deviceName", devname) + self.set("mac", mac) + self.set("ip4", ip4) + self.set("mask4", mask4) + self.set("ip6", ip6) + self.set("mask6", mask6) + + # set the following without validating or triggering hooks + attr = self._attrs["up"] + attr._value = up + attr = self._attrs["mtu"] + attr._value = mtu +
+
[docs] def add_set_hooks(self): + attrup = self._attrs["up"] + attrup.set_hook = self.set_hook_up + + attrmtu = self._attrs["mtu"] + attrmtu.set_hook = self.set_hook_mtu +
+
[docs] def set_hook_up(self, oldval, newval): + if self.state == ResourceState.NEW or oldval == newval: + return oldval + + # configure interface up + if newval == True: + cmd = "ifup %s" % self.get("deviceName") + elif newval == False: + cmd = "ifdown %s" % self.get("deviceName") + + (out, err), proc = self.node.execute(cmd, sudo = True) + + if err and proc.poll(): + msg = "Error setting interface up/down using command '%s' " % cmd + self.error(msg, err, out) + return oldval + + return newval +
+
[docs] def set_hook_mtu(self, oldval, newval): + if self.state == ResourceState.NEW or oldval == newval: + return oldval + + cmd = "ifconfig %s mtu %d" % (self.get("deviceName"), newval) + + (out, err), proc = self.node.execute(cmd, sudo = True) + + if err and proc.poll(): + msg = "Error setting interface MTU using command '%s' " % cmd + self.error(msg, err, out) + return oldval + + return newval +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/linux/mtr.html b/doc/sphinx/_build/html/_modules/nepi/resources/linux/mtr.html new file mode 100644 index 00000000..b7ff738e --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/linux/mtr.html @@ -0,0 +1,240 @@ + + + + + + + + nepi.resources.linux.mtr — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.linux.mtr

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.resource import clsinit_copy, ResourceState 
+from nepi.resources.linux.application import LinuxApplication
+from nepi.util.timefuncs import tnow
+
+import os
+
+@clsinit_copy
+
[docs]class LinuxMtr(LinuxApplication): + _rtype = "linux::Mtr" + + @classmethod + def _register_attributes(cls): + report_cycles = Attribute("reportCycles", + "sets mtr --report-cycles (-c) option. Determines the number of " + "pings sent to determine both machines in the networks. Each " + "cycle lasts one sencond.", + flags = Flags.Design) + + no_dns = Attribute("noDns", + "sets mtr --no-dns (-n) option. Forces mtr to display IPs intead of " + "trying to resolve to host names ", + type = Types.Bool, + default = True, + flags = Flags.Design) + + address = Attribute("address", + "sets mtr --address (-a) option. Binds the socket to send outgoing " + "packets to the interface of the specified address, so that any " + "any packets are sent through this interface. ", + flags = Flags.Design) + + interval = Attribute("interval", + "sets mtr --interval (-i) option. Specifies the number of seconds " + "between ICMP ECHO requests. Default value is one second ", + flags = Flags.Design) + + countinuous = Attribute("continuous", + "Run mtr in a while loop", + type = Types.Bool, + default = False, + flags = Flags.Design) + + print_timestamp = Attribute("printTimestamp", + "Print timestamp before running mtr", + type = Types.Bool, + default = False, + flags = Flags.Design) + + target = Attribute("target", + "mtr target host (host that will be pinged)", + flags = Flags.Design) + + early_start = Attribute("earlyStart", + "Start ping as early as deployment. ", + type = Types.Bool, + default = False, + flags = Flags.Design) + + cls._register_attribute(report_cycles) + cls._register_attribute(no_dns) + cls._register_attribute(address) + cls._register_attribute(interval) + cls._register_attribute(countinuous) + cls._register_attribute(print_timestamp) + cls._register_attribute(target) + cls._register_attribute(early_start) + + def __init__(self, ec, guid): + super(LinuxMtr, self).__init__(ec, guid) + self._home = "mtr-%s" % self.guid + self._sudo_kill = True + +
[docs] def upload_start_command(self): + super(LinuxMtr, self).upload_start_command() + + if self.get("earlyStart") == True: + self._run_in_background() +
+
[docs] def do_deploy(self): + if not self.get("command"): + self.set("command", self._start_command) + + if not self.get("env"): + self.set("env", "PATH=$PATH:/usr/sbin/") + + if not self.get("depends"): + self.set("depends", "mtr") + + super(LinuxMtr, self).do_deploy() +
+
[docs] def do_start(self): + if self.get("earlyStart") == True: + if self.state == ResourceState.READY: + command = self.get("command") + self.info("Starting command '%s'" % command) + + self.set_started() + else: + msg = " Failed to execute command '%s'" % command + self.error(msg, out, err) + raise RuntimeError, msg + else: + super(LinuxMtr, self).do_start() +
+ @property + def _start_command(self): + args = [] + if self.get("continuous") == True: + args.append("while true; do ") + if self.get("printTimestamp") == True: + args.append("""echo "`date +'%Y%m%d%H%M%S'`";""") + args.append("sudo -S mtr --report") + if self.get("reportCycles"): + args.append("-c %s" % self.get("reportCycles")) + if self.get("noDns") == True: + args.append("-n") + if self.get("address"): + args.append("-a %s" % self.get("address")) + args.append(self.get("target")) + if self.get("continuous") == True: + args.append("; done ") + + command = " ".join(args) + + return command + +
[docs] def valid_connection(self, guid): + # TODO: Validate! + return True +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/linux/netns/netnsclient.html b/doc/sphinx/_build/html/_modules/nepi/resources/linux/netns/netnsclient.html new file mode 100644 index 00000000..63d53cc8 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/linux/netns/netnsclient.html @@ -0,0 +1,198 @@ + + + + + + + + nepi.resources.linux.netns.netnsclient — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.linux.netns.netnsclient

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+import base64
+import cPickle
+import errno
+import os
+import socket
+import time
+import weakref
+
+from optparse import OptionParser, SUPPRESS_HELP
+
+from nepi.resources.netns.netnsclient import NetNSClient
+from nepi.resources.netns.netnsserver import NetNSWrapperMessage
+
+
[docs]class LinuxNetNSClient(NetNSClient): + def __init__(self, emulation): + super(LinuxNetNSClient, self).__init__() + self._emulation = weakref.ref(emulation) + + self._socat_proc = None + + @property +
[docs] def emulation(self): + return self._emulation() +
+
[docs] def send_msg(self, msg_type, *args, **kwargs): + msg = [msg_type, args, kwargs] + + def encode(item): + item = cPickle.dumps(item) + return base64.b64encode(item) + + encoded = "|".join(map(encode, msg)) + + if self.emulation.node.get("hostname") in ['localhost', '127.0.0.1']: + sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) + sock.connect(self.emulation.remote_socket) + sock.send("%s\n" % encoded) + reply = sock.recv(1024) + sock.close() + else: + command = ( "python -c 'import socket;" + "sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM);" + "sock.connect(\"%(socket_addr)s\");" + "msg = \"%(encoded_message)s\\n\";" + "sock.send(msg);" + "reply = sock.recv(1024);" + "sock.close();" + "print reply'") % { + "encoded_message": encoded, + "socket_addr": self.emulation.remote_socket, + } + + (reply, err), proc = self.emulation.node.execute(command, + with_lock = True) + + if (err and proc.poll()) or reply.strip() == "": + msg = (" Couldn't connect to remote socket %s - REPLY: %s " + "- ERROR: %s ") % ( + self.emulation.remote_socket, reply, err) + self.emulation.error(msg, reply, err) + raise RuntimeError(msg) + + reply = cPickle.loads(base64.b64decode(reply)) + + return reply +
+
[docs] def create(self, *args, **kwargs): + return self.send_msg(NetNSWrapperMessage.CREATE, *args, **kwargs) +
+
[docs] def invoke(self, *args, **kwargs): + return self.send_msg(NetNSWrapperMessage.INVOKE, *args, **kwargs) +
+
[docs] def set(self, *args, **kwargs): + return self.send_msg(NetNSWrapperMessage.SET, *args, **kwargs) +
+
[docs] def get(self, *args, **kwargs): + return self.send_msg(NetNSWrapperMessage.GET, *args, **kwargs) +
+
[docs] def flush(self, *args, **kwargs): + return self.send_msg(NetNSWrapperMessage.FLUSH, *args, **kwargs) +
+
[docs] def shutdown(self, *args, **kwargs): + try: + return self.send_msg(NetNSWrapperMessage.SHUTDOWN, *args, **kwargs) + except: + pass + + return None +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/linux/netns/netnsemulation.html b/doc/sphinx/_build/html/_modules/nepi/resources/linux/netns/netnsemulation.html new file mode 100644 index 00000000..1b3771eb --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/linux/netns/netnsemulation.html @@ -0,0 +1,473 @@ + + + + + + + + nepi.resources.linux.netns.netnsemulation — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.linux.netns.netnsemulation

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.linux.application import LinuxApplication
+from nepi.util.timefuncs import tnow, tdiffsec
+from nepi.resources.netns.netnsemulation import NetNSEmulation
+from nepi.resources.linux.netns.netnsclient import LinuxNetNSClient
+
+import os
+import time
+import threading
+
+@clsinit_copy
+
[docs]class LinuxNetNSEmulation(LinuxApplication, NetNSEmulation): + _rtype = "linux::netns::Emulation" + + @classmethod + def _register_attributes(cls): + verbose = Attribute("verbose", + "True to output debugging info for the client-server communication", + type = Types.Bool, + flags = Flags.Design) + + enable_dump = Attribute("enableDump", + "Enable dumping the remote executed commands to a script " + "in order to later reproduce and debug the experiment", + type = Types.Bool, + default = False, + flags = Flags.Design) + + version = Attribute("version", + "Version of netns to install from nsam repo", + default = "netns-dev", + flags = Flags.Design) + + cls._register_attribute(enable_dump) + cls._register_attribute(verbose) + cls._register_attribute(version) + + def __init__(self, ec, guid): + LinuxApplication.__init__(self, ec, guid) + NetNSEmulation.__init__(self) + + self._client = None + self._home = "netns-emu-%s" % self.guid + self._socket_name = "netns-%s.sock" % os.urandom(4).encode('hex') + + @property +
[docs] def socket_name(self): + return self._socket_name +
+ @property +
[docs] def remote_socket(self): + return os.path.join(self.run_home, self.socket_name) +
+
[docs] def upload_sources(self): + self.node.mkdir(os.path.join(self.node.src_dir, "netnswrapper")) + + # upload wrapper python script + wrapper = os.path.join(os.path.dirname(__file__), "..", "..", "netns", + "netnswrapper.py") + + self.node.upload(wrapper, + os.path.join(self.node.src_dir, "netnswrapper", "netnswrapper.py"), + overwrite = False) + + # upload wrapper debug python script + wrapper_debug = os.path.join(os.path.dirname(__file__), "..", "..", "netns", + "netnswrapper_debug.py") + + self.node.upload(wrapper_debug, + os.path.join(self.node.src_dir, "netnswrapper", "netnswrapper_debug.py"), + overwrite = False) + + # upload server python script + server = os.path.join(os.path.dirname(__file__), "..", "..", "netns", + "netnsserver.py") + + self.node.upload(server, + os.path.join(self.node.src_dir, "netnswrapper", "netnsserver.py"), + overwrite = False) + + # Upload user defined sources + self.node.mkdir(os.path.join(self.node.src_dir, "netns")) + src_dir = os.path.join(self.node.src_dir, "netns") + + super(LinuxNetNSEmulation, self).upload_sources(src_dir = src_dir) +
+
[docs] def upload_extra_sources(self, sources = None, src_dir = None): + return super(LinuxNetNSEmulation, self).upload_sources( + sources = sources, + src_dir = src_dir) +
+
[docs] def upload_start_command(self): + command = self.get("command") + env = self.get("env") + + # We want to make sure the emulator is running + # before the experiment starts. + # Run the command as a bash script in background, + # in the host ( but wait until the command has + # finished to continue ) + env = self.replace_paths(env) + command = self.replace_paths(command) + + shfile = os.path.join(self.app_home, "start.sh") + self.node.upload_command(command, + shfile = shfile, + env = env, + overwrite = True) + + # Run the wrapper + self._run_in_background() + + # Wait until the remote socket is created + self.wait_remote_socket() +
+
[docs] def do_deploy(self): + if not self.node or self.node.state < ResourceState.READY: + self.debug("---- RESCHEDULING DEPLOY ---- node state %s " % self.node.state ) + + # ccnd needs to wait until node is deployed and running + self.ec.schedule(self.reschedule_delay, self.deploy) + else: + if not self.get("command"): + self.set("command", self._start_command) + + if not self.get("depends"): + self.set("depends", self._dependencies) + + if self.get("sources"): + sources = self.get("sources") + source = sources.split(" ")[0] + basename = os.path.basename(source) + version = ( basename.strip().replace(".tar.gz", "") + .replace(".tar","") + .replace(".gz","") + .replace(".zip","") ) + + self.set("version", version) + self.set("sources", source) + + if not self.get("build"): + self.set("build", self._build) + + if not self.get("env"): + self.set("env", self._environment) + + self.do_discover() + self.do_provision() + + # Create client + self._client = LinuxNetNSClient(self) + + self.set_ready() +
+
[docs] def do_start(self): + """ Starts execution execution + + """ + self.info("Starting") + + if self.state == ResourceState.READY: + self.set_started() + else: + msg = " Failed to execute command '%s'" % command + self.error(msg, out, err) + raise RuntimeError, msg +
+
[docs] def do_stop(self): + """ Stops simulation execution + + """ + if self.state == ResourceState.STARTED: + self.set_stopped() +
+
[docs] def do_release(self): + self.info("Releasing resource") + + tear_down = self.get("tearDown") + if tear_down: + self.node.execute(tear_down) + + self.do_stop() + self._client.shutdown() + LinuxApplication.do_stop(self) + + super(LinuxApplication, self).do_release() +
+ @property + def _start_command(self): + command = [] + + #command.append("sudo") + command.append("PYTHONPATH=$PYTHONPATH:${SRC}/netnswrapper/") + command.append("python ${SRC}/netnswrapper/netnsserver.py -S %s" % \ + os.path.basename(self.remote_socket) ) + + if self.get("enableDump"): + command.append("-D") + + if self.get("verbose"): + command.append("-v") + + command = " ".join(command) + return command + + @property + def _dependencies(self): + if self.node.use_rpm: + return (" python python-devel mercurial unzip bridge-utils iproute") + elif self.node.use_deb: + return (" python python-dev mercurial unzip bridge-utils iproute") + return "" + + @property +
[docs] def netns_repo(self): + return "http://nepi.inria.fr/code/netns" +
+ @property +
[docs] def netns_version(self): + version = self.get("version") + return version or "dev" +
+ @property +
[docs] def python_unshare_repo(self): + return "http://nepi.inria.fr/code/python-unshare" +
+ @property +
[docs] def python_unshare_version(self): + return "dev" +
+ @property +
[docs] def python_passfd_repo(self): + return "http://nepi.inria.fr/code/python-passfd" +
+ @property +
[docs] def python_passfd_version(self): + return "dev" +
+ @property +
[docs] def netns_src(self): + location = "${SRC}/netns/%(version)s" \ + % { + "version": self.netns_version, + } + + return location +
+ @property +
[docs] def python_unshare_src(self): + location = "${SRC}/python_unshare/%(version)s" \ + % { + "version": self.python_unshare_version, + } + + return location +
+ @property +
[docs] def python_passfd_src(self): + location = "${SRC}/python_passfd/%(version)s" \ + % { + "version": self.python_passfd_version, + } + + return location +
+
[docs] def clone_command(self, name, repo, src): + clone_cmd = ( + # Test if alredy cloned + " ( " + " ( " + " ( test -d %(src)s ) " + " && echo '%(name)s binaries found, nothing to do'" + " ) " + " ) " + " || " + # clone source code + " ( " + " mkdir -p %(src)s && " + " hg clone %(repo)s %(src)s" + " ) " + ) % { + "repo": repo, + "src": src, + "name": name, + } + + return clone_cmd +
+ @property + def _build(self): + netns_clone = self.clone_command("netns", self.netns_repo, + self.netns_src) + python_unshare_clone = self.clone_command("python_unshare", + self.python_unshare_repo, self.python_unshare_src) + python_passfd_clone = self.clone_command("python_passfd", + self.python_passfd_repo, self.python_passfd_src) + + build_cmd = ( + # Netns installation + "( %(netns_clone)s )" + " && " + "( %(python_unshare_clone)s )" + " && " + "( %(python_passfd_clone)s )" + ) % { + "netns_clone": netns_clone, + "python_unshare_clone": python_unshare_clone, + "python_passfd_clone": python_passfd_clone, + } + + return build_cmd + + @property + def _environment(self): + env = [] + env.append("PYTHONPATH=$PYTHONPAH:%(netns_src)s/src/:%(python_unshare_src)s/src:%(python_passfd_src)s/src}" % { + "netns_src": self.netns_src, + "python_unshare_src": self.python_unshare_src, + "python_passfd_src": self.python_passfd_src, + }) + + return " ".join(env) + +
[docs] def replace_paths(self, command): + """ + Replace all special path tags with shell-escaped actual paths. + """ + return ( command + .replace("${USR}", self.node.usr_dir) + .replace("${LIB}", self.node.lib_dir) + .replace("${BIN}", self.node.bin_dir) + .replace("${SRC}", self.node.src_dir) + .replace("${SHARE}", self.node.share_dir) + .replace("${EXP}", self.node.exp_dir) + .replace("${EXP_HOME}", self.node.exp_home) + .replace("${APP_HOME}", self.app_home) + .replace("${RUN_HOME}", self.run_home) + .replace("${NODE_HOME}", self.node.node_home) + .replace("${HOME}", self.node.home_dir) + ) +
+
[docs] def valid_connection(self, guid): + # TODO: Validate! + return True +
+
[docs] def wait_remote_socket(self): + """ Waits until the remote socket is created + """ + command = " [ -e %s ] && echo 'DONE' " % self.remote_socket + + for i in xrange(200): + (out, err), proc = self.node.execute(command, retry = 1, + with_lock = True) + + if out.find("DONE") > -1: + break + else: + raise RuntimeError("Remote socket not found at %s" % \ + self.remote_socket) + +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/linux/node.html b/doc/sphinx/_build/html/_modules/nepi/resources/linux/node.html new file mode 100644 index 00000000..84bc1c1b --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/linux/node.html @@ -0,0 +1,1216 @@ + + + + + + + + nepi.resources.linux.node — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.linux.node

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.linux import rpmfuncs, debfuncs 
+from nepi.util import sshfuncs, execfuncs
+from nepi.util.sshfuncs import ProcStatus
+
+import collections
+import os
+import random
+import re
+import tempfile
+import time
+import threading
+import traceback
+
+# TODO: Unify delays!!
+# TODO: Validate outcome of uploads!! 
+
+
[docs]class ExitCode: + """ + Error codes that the rexitcode function can return if unable to + check the exit code of a spawned process + """ + FILENOTFOUND = -1 + CORRUPTFILE = -2 + ERROR = -3 + OK = 0 +
+
[docs]class OSType: + """ + Supported flavors of Linux OS + """ + DEBIAN = 1 + UBUNTU = 1 << 1 + FEDORA = 1 << 2 + FEDORA_8 = 1 << 3 | FEDORA + FEDORA_12 = 1 << 4 | FEDORA + FEDORA_14 = 1 << 5 | FEDORA +
+@clsinit_copy +
[docs]class LinuxNode(ResourceManager): + """ + .. class:: Class Args : + + :param ec: The Experiment controller + :type ec: ExperimentController + :param guid: guid of the RM + :type guid: int + + .. note:: + + There are different ways in which commands can be executed using the + LinuxNode interface (i.e. 'execute' - blocking and non blocking, 'run', + 'run_and_wait'). + + Brief explanation: + + * 'execute' (blocking mode) : + + HOW IT WORKS: 'execute', forks a process and run the + command, synchronously, attached to the terminal, in + foreground. + The execute method will block until the command returns + the result on 'out', 'err' (so until it finishes executing). + + USAGE: short-lived commands that must be executed attached + to a terminal and in foreground, for which it IS necessary + to block until the command has finished (e.g. if you want + to run 'ls' or 'cat'). + + * 'execute' (NON blocking mode - blocking = False) : + + HOW IT WORKS: Same as before, except that execute method + will return immediately (even if command still running). + + USAGE: long-lived commands that must be executed attached + to a terminal and in foreground, but for which it is not + necessary to block until the command has finished. (e.g. + start an application using X11 forwarding) + + * 'run' : + + HOW IT WORKS: Connects to the host ( using SSH if remote) + and launches the command in background, detached from any + terminal (daemonized), and returns. The command continues to + run remotely, but since it is detached from the terminal, + its pipes (stdin, stdout, stderr) can't be redirected to the + console (as normal non detached processes would), and so they + are explicitly redirected to files. The pidfile is created as + part of the process of launching the command. The pidfile + holds the pid and ppid of the process forked in background, + so later on it is possible to check whether the command is still + running. + + USAGE: long-lived commands that can run detached in background, + for which it is NOT necessary to block (wait) until the command + has finished. (e.g. start an application that is not using X11 + forwarding. It can run detached and remotely in background) + + * 'run_and_wait' : + + HOW IT WORKS: Similar to 'run' except that it 'blocks' until + the command has finished execution. It also checks whether + errors occurred during runtime by reading the exitcode file, + which contains the exit code of the command that was run + (checking stderr only is not always reliable since many + commands throw debugging info to stderr and the only way to + automatically know whether an error really happened is to + check the process exit code). + + Another difference with respect to 'run', is that instead + of directly executing the command as a bash command line, + it uploads the command to a bash script and runs the script. + This allows to use the bash script to debug errors, since + it remains at the remote host and can be run manually to + reproduce the error. + + USAGE: medium-lived commands that can run detached in + background, for which it IS necessary to block (wait) until + the command has finished. (e.g. Package installation, + source compilation, file download, etc) + + """ + _rtype = "linux::Node" + _help = "Controls Linux host machines ( either localhost or a host " \ + "that can be accessed using a SSH key)" + _platform = "linux" + + @classmethod + def _register_attributes(cls): + hostname = Attribute("hostname", "Hostname of the machine", + flags = Flags.Design) + + username = Attribute("username", "Local account username", + flags = Flags.Credential) + + port = Attribute("port", "SSH port", flags = Flags.Design) + + home = Attribute("home", + "Experiment home directory to store all experiment related files", + flags = Flags.Design) + + identity = Attribute("identity", "SSH identity file", + flags = Flags.Credential) + + server_key = Attribute("serverKey", "Server public key", + flags = Flags.Design) + + clean_home = Attribute("cleanHome", "Remove all nepi files and directories " + " from node home folder before starting experiment", + type = Types.Bool, + default = False, + flags = Flags.Design) + + clean_experiment = Attribute("cleanExperiment", "Remove all files and directories " + " from a previous same experiment, before the new experiment starts", + type = Types.Bool, + default = False, + flags = Flags.Design) + + clean_processes = Attribute("cleanProcesses", + "Kill all running processes before starting experiment", + type = Types.Bool, + default = False, + flags = Flags.Design) + + tear_down = Attribute("tearDown", "Bash script to be executed before " + \ + "releasing the resource", + flags = Flags.Design) + + gateway_user = Attribute("gatewayUser", "Gateway account username", + flags = Flags.Design) + + gateway = Attribute("gateway", "Hostname of the gateway machine", + flags = Flags.Design) + + ip = Attribute("ip", "Linux host public IP address. " + "Must not be modified by the user unless hostname is 'localhost'", + flags = Flags.Design) + + cls._register_attribute(hostname) + cls._register_attribute(username) + cls._register_attribute(port) + cls._register_attribute(home) + cls._register_attribute(identity) + cls._register_attribute(server_key) + cls._register_attribute(clean_home) + cls._register_attribute(clean_experiment) + cls._register_attribute(clean_processes) + cls._register_attribute(tear_down) + cls._register_attribute(gateway_user) + cls._register_attribute(gateway) + cls._register_attribute(ip) + + def __init__(self, ec, guid): + super(LinuxNode, self).__init__(ec, guid) + self._os = None + # home directory at Linux host + self._home_dir = "" + + # lock to prevent concurrent applications on the same node, + # to execute commands at the same time. There are potential + # concurrency issues when using SSH to a same host from + # multiple threads. There are also possible operational + # issues, e.g. an application querying the existence + # of a file or folder prior to its creation, and another + # application creating the same file or folder in between. + self._node_lock = threading.Lock() + +
[docs] def log_message(self, msg): + return " guid %d - host %s - %s " % (self.guid, + self.get("hostname"), msg) +
+ @property +
[docs] def home_dir(self): + home = self.get("home") or "" + if not home.startswith("/"): + home = os.path.join(self._home_dir, home) + return home +
+ @property +
[docs] def nepi_home(self): + return os.path.join(self.home_dir, ".nepi") +
+ @property +
[docs] def usr_dir(self): + return os.path.join(self.nepi_home, "nepi-usr") +
+ @property +
[docs] def lib_dir(self): + return os.path.join(self.usr_dir, "lib") +
+ @property +
[docs] def bin_dir(self): + return os.path.join(self.usr_dir, "bin") +
+ @property +
[docs] def src_dir(self): + return os.path.join(self.usr_dir, "src") +
+ @property +
[docs] def share_dir(self): + return os.path.join(self.usr_dir, "share") +
+ @property +
[docs] def exp_dir(self): + return os.path.join(self.nepi_home, "nepi-exp") +
+ @property +
[docs] def exp_home(self): + return os.path.join(self.exp_dir, self.ec.exp_id) +
+ @property +
[docs] def node_home(self): + return os.path.join(self.exp_home, "node-%d" % self.guid) +
+ @property +
[docs] def run_home(self): + return os.path.join(self.node_home, self.ec.run_id) +
+ @property +
[docs] def os(self): + if self._os: + return self._os + + if not self.localhost and not self.get("username"): + msg = "Can't resolve OS, insufficient data " + self.error(msg) + raise RuntimeError, msg + + out = self.get_os() + + if out.find("Debian") == 0: + self._os = OSType.DEBIAN + elif out.find("Ubuntu") ==0: + self._os = OSType.UBUNTU + elif out.find("Fedora release") == 0: + self._os = OSType.FEDORA + if out.find("Fedora release 8") == 0: + self._os = OSType.FEDORA_8 + elif out.find("Fedora release 12") == 0: + self._os = OSType.FEDORA_12 + elif out.find("Fedora release 14") == 0: + self._os = OSType.FEDORA_14 + else: + msg = "Unsupported OS" + self.error(msg, out) + raise RuntimeError, "%s - %s " %( msg, out ) + + return self._os +
+
[docs] def get_os(self): + # The underlying SSH layer will sometimes return an empty + # output (even if the command was executed without errors). + # To work arround this, repeat the operation N times or + # until the result is not empty string + out = "" + try: + (out, err), proc = self.execute("cat /etc/issue", + with_lock = True, + blocking = True) + except: + trace = traceback.format_exc() + msg = "Error detecting OS: %s " % trace + self.error(msg, out, err) + + return out +
+ @property +
[docs] def use_deb(self): + return (self.os & (OSType.DEBIAN|OSType.UBUNTU)) +
+ @property +
[docs] def use_rpm(self): + return (self.os & OSType.FEDORA) +
+ @property +
[docs] def localhost(self): + return self.get("hostname") in ['localhost', '127.0.0.1', '::1'] +
+
[docs] def do_provision(self): + # check if host is alive + if not self.is_alive(): + msg = "Deploy failed. Unresponsive node %s" % self.get("hostname") + self.error(msg) + raise RuntimeError, msg + + self.find_home() + + if self.get("cleanProcesses"): + self.clean_processes() + + if self.get("cleanHome"): + self.clean_home() + + if self.get("cleanExperiment"): + self.clean_experiment() + + # Create shared directory structure and node home directory + paths = [self.lib_dir, + self.bin_dir, + self.src_dir, + self.share_dir, + self.node_home] + + self.mkdir(paths) + + # Get Public IP address if possible + if not self.get("ip"): + try: + ip = sshfuncs.gethostbyname(self.get("hostname")) + self.set("ip", ip) + except: + if self.get("gateway") is None: + msg = "Local DNS can not resolve hostname %s" % self.get("hostname") + self.error(msg) + + super(LinuxNode, self).do_provision() +
+
[docs] def do_deploy(self): + if self.state == ResourceState.NEW: + self.info("Deploying node") + self.do_discover() + self.do_provision() + + # Node needs to wait until all associated interfaces are + # ready before it can finalize deployment + from nepi.resources.linux.interface import LinuxInterface + ifaces = self.get_connected(LinuxInterface.get_rtype()) + for iface in ifaces: + if iface.state < ResourceState.READY: + self.ec.schedule(self.reschedule_delay, self.deploy) + return + + super(LinuxNode, self).do_deploy() +
+
[docs] def do_release(self): + rms = self.get_connected() + for rm in rms: + # Node needs to wait until all associated RMs are released + # before it can be released + if rm.state != ResourceState.RELEASED: + self.ec.schedule(self.reschedule_delay, self.release) + return + + tear_down = self.get("tearDown") + if tear_down: + self.execute(tear_down) + + self.clean_processes() + + super(LinuxNode, self).do_release() +
+
[docs] def valid_connection(self, guid): + # TODO: Validate! + return True +
+
[docs] def clean_processes(self): + self.info("Cleaning up processes") + + if self.localhost: + return + + if self.get("username") != 'root': + cmd = ("sudo -S killall tcpdump || /bin/true ; " + + "sudo -S kill -9 $(ps aux | grep '[.]nepi' | awk '{print $2}') || /bin/true ; " + + "sudo -S killall -u %s || /bin/true ; " % self.get("username")) + else: + if self.state >= ResourceState.READY: + import pickle + pids = pickle.load(open("/tmp/save.proc", "rb")) + pids_temp = dict() + ps_aux = "ps aux |awk '{print $2,$11}'" + (out, err), proc = self.execute(ps_aux) + if len(out) != 0: + for line in out.strip().split("\n"): + parts = line.strip().split(" ") + pids_temp[parts[0]] = parts[1] + kill_pids = set(pids_temp.items()) - set(pids.items()) + kill_pids = ' '.join(dict(kill_pids).keys()) + + cmd = ("killall tcpdump || /bin/true ; " + + "kill $(ps aux | grep '[.]nepi' | awk '{print $2}') || /bin/true ; " + + "kill %s || /bin/true ; " % kill_pids) + else: + cmd = ("killall tcpdump || /bin/true ; " + + "kill $(ps aux | grep '[.]nepi' | awk '{print $2}') || /bin/true ; ") + else: + cmd = ("killall tcpdump || /bin/true ; " + + "kill $(ps aux | grep '[.]nepi' | awk '{print $2}') || /bin/true ; ") + + (out, err), proc = self.execute(cmd, retry = 1, with_lock = True) +
+
[docs] def clean_home(self): + """ Cleans all NEPI related folders in the Linux host + """ + self.info("Cleaning up home") + + cmd = "cd %s ; find . -maxdepth 1 -name \.nepi -execdir rm -rf {} + " % ( + self.home_dir ) + + return self.execute(cmd, with_lock = True) +
+
[docs] def clean_experiment(self): + """ Cleans all experiment related files in the Linux host. + It preserves NEPI files and folders that have a multi experiment + scope. + """ + self.info("Cleaning up experiment files") + + cmd = "cd %s ; find . -maxdepth 1 -name '%s' -execdir rm -rf {} + " % ( + self.exp_dir, + self.ec.exp_id ) + + return self.execute(cmd, with_lock = True) +
+
[docs] def execute(self, command, + sudo = False, + env = None, + tty = False, + forward_x11 = False, + retry = 3, + connect_timeout = 30, + strict_host_checking = False, + persistent = True, + blocking = True, + with_lock = False + ): + """ Notice that this invocation will block until the + execution finishes. If this is not the desired behavior, + use 'run' instead.""" + + if self.localhost: + (out, err), proc = execfuncs.lexec(command, + user = self.get("username"), # still problem with localhost + sudo = sudo, + env = env) + else: + if with_lock: + # If the execute command is blocking, we don't want to keep + # the node lock. This lock is used to avoid race conditions + # when creating the ControlMaster sockets. A more elegant + # solution is needed. + with self._node_lock: + (out, err), proc = sshfuncs.rexec( + command, + host = self.get("hostname"), + user = self.get("username"), + port = self.get("port"), + gwuser = self.get("gatewayUser"), + gw = self.get("gateway"), + agent = True, + sudo = sudo, + identity = self.get("identity"), + server_key = self.get("serverKey"), + env = env, + tty = tty, + forward_x11 = forward_x11, + retry = retry, + connect_timeout = connect_timeout, + persistent = persistent, + blocking = blocking, + strict_host_checking = strict_host_checking + ) + else: + (out, err), proc = sshfuncs.rexec( + command, + host = self.get("hostname"), + user = self.get("username"), + port = self.get("port"), + gwuser = self.get("gatewayUser"), + gw = self.get("gateway"), + agent = True, + sudo = sudo, + identity = self.get("identity"), + server_key = self.get("serverKey"), + env = env, + tty = tty, + forward_x11 = forward_x11, + retry = retry, + connect_timeout = connect_timeout, + persistent = persistent, + blocking = blocking, + strict_host_checking = strict_host_checking + ) + + return (out, err), proc +
+
[docs] def run(self, command, home, + create_home = False, + pidfile = 'pidfile', + stdin = None, + stdout = 'stdout', + stderr = 'stderr', + sudo = False, + tty = False, + strict_host_checking = False): + + self.debug("Running command '%s'" % command) + + if self.localhost: + (out, err), proc = execfuncs.lspawn(command, pidfile, + home = home, + create_home = create_home, + stdin = stdin or '/dev/null', + stdout = stdout or '/dev/null', + stderr = stderr or '/dev/null', + sudo = sudo) + else: + with self._node_lock: + (out, err), proc = sshfuncs.rspawn( + command, + pidfile = pidfile, + home = home, + create_home = create_home, + stdin = stdin or '/dev/null', + stdout = stdout or '/dev/null', + stderr = stderr or '/dev/null', + sudo = sudo, + host = self.get("hostname"), + user = self.get("username"), + port = self.get("port"), + gwuser = self.get("gatewayUser"), + gw = self.get("gateway"), + agent = True, + identity = self.get("identity"), + server_key = self.get("serverKey"), + tty = tty, + strict_host_checking = strict_host_checking + ) + + return (out, err), proc +
+
[docs] def getpid(self, home, pidfile = "pidfile"): + if self.localhost: + pidtuple = execfuncs.lgetpid(os.path.join(home, pidfile)) + else: + with self._node_lock: + pidtuple = sshfuncs.rgetpid( + os.path.join(home, pidfile), + host = self.get("hostname"), + user = self.get("username"), + port = self.get("port"), + gwuser = self.get("gatewayUser"), + gw = self.get("gateway"), + agent = True, + identity = self.get("identity"), + server_key = self.get("serverKey"), + strict_host_checking = False + ) + + return pidtuple +
+
[docs] def status(self, pid, ppid): + if self.localhost: + status = execfuncs.lstatus(pid, ppid) + else: + with self._node_lock: + status = sshfuncs.rstatus( + pid, ppid, + host = self.get("hostname"), + user = self.get("username"), + port = self.get("port"), + gwuser = self.get("gatewayUser"), + gw = self.get("gateway"), + agent = True, + identity = self.get("identity"), + server_key = self.get("serverKey"), + strict_host_checking = False + ) + + return status +
+
[docs] def kill(self, pid, ppid, sudo = False): + out = err = "" + proc = None + status = self.status(pid, ppid) + + if status == sshfuncs.ProcStatus.RUNNING: + if self.localhost: + (out, err), proc = execfuncs.lkill(pid, ppid, sudo) + else: + with self._node_lock: + (out, err), proc = sshfuncs.rkill( + pid, ppid, + host = self.get("hostname"), + user = self.get("username"), + port = self.get("port"), + gwuser = self.get("gatewayUser"), + gw = self.get("gateway"), + agent = True, + sudo = sudo, + identity = self.get("identity"), + server_key = self.get("serverKey"), + strict_host_checking = False + ) + + return (out, err), proc +
+
[docs] def copy(self, src, dst): + if self.localhost: + (out, err), proc = execfuncs.lcopy(src, dst, + recursive = True) + else: + with self._node_lock: + (out, err), proc = sshfuncs.rcopy( + src, dst, + port = self.get("port"), + gwuser = self.get("gatewayUser"), + gw = self.get("gateway"), + identity = self.get("identity"), + server_key = self.get("serverKey"), + recursive = True, + strict_host_checking = False) + + return (out, err), proc +
+
[docs] def upload(self, src, dst, text = False, overwrite = True, + raise_on_error = True): + """ Copy content to destination + + src string with the content to copy. Can be: + - plain text + - a string with the path to a local file + - a string with a semi-colon separeted list of local files + - a string with a local directory + + dst string with destination path on the remote host (remote is + always self.host) + + text src is text input, it must be stored into a temp file before + uploading + """ + # If source is a string input + f = None + if text and not os.path.isfile(src): + # src is text input that should be uploaded as file + # create a temporal file with the content to upload + f = tempfile.NamedTemporaryFile(delete=False) + f.write(src) + f.close() + src = f.name + + # If dst files should not be overwritten, check that the files do not + # exits already + if isinstance(src, str): + src = map(str.strip, src.split(";")) + + if overwrite == False: + src = self.filter_existing_files(src, dst) + if not src: + return ("", ""), None + + if not self.localhost: + # Build destination as <user>@<server>:<path> + dst = "%s@%s:%s" % (self.get("username"), self.get("hostname"), dst) + + ((out, err), proc) = self.copy(src, dst) + + # clean up temp file + if f: + os.remove(f.name) + + if err: + msg = " Failed to upload files - src: %s dst: %s" % (";".join(src), dst) + self.error(msg, out, err) + + msg = "%s out: %s err: %s" % (msg, out, err) + if raise_on_error: + raise RuntimeError, msg + + return ((out, err), proc) +
+
[docs] def download(self, src, dst, raise_on_error = True): + if not self.localhost: + # Build destination as <user>@<server>:<path> + src = "%s@%s:%s" % (self.get("username"), self.get("hostname"), src) + + ((out, err), proc) = self.copy(src, dst) + + if err: + msg = " Failed to download files - src: %s dst: %s" % (";".join(src), dst) + self.error(msg, out, err) + + if raise_on_error: + raise RuntimeError, msg + + return ((out, err), proc) +
+
[docs] def install_packages_command(self, packages): + command = "" + if self.use_rpm: + command = rpmfuncs.install_packages_command(self.os, packages) + elif self.use_deb: + command = debfuncs.install_packages_command(self.os, packages) + else: + msg = "Error installing packages ( OS not known ) " + self.error(msg, self.os) + raise RuntimeError, msg + + return command +
+
[docs] def install_packages(self, packages, home, run_home = None, + raise_on_error = True): + """ Install packages in the Linux host. + + 'home' is the directory to upload the package installation script. + 'run_home' is the directory from where to execute the script. + """ + command = self.install_packages_command(packages) + + run_home = run_home or home + + (out, err), proc = self.run_and_wait(command, run_home, + shfile = os.path.join(home, "instpkg.sh"), + pidfile = "instpkg_pidfile", + ecodefile = "instpkg_exitcode", + stdout = "instpkg_stdout", + stderr = "instpkg_stderr", + overwrite = False, + raise_on_error = raise_on_error) + + return (out, err), proc +
+
[docs] def remove_packages(self, packages, home, run_home = None, + raise_on_error = True): + """ Uninstall packages from the Linux host. + + 'home' is the directory to upload the package un-installation script. + 'run_home' is the directory from where to execute the script. + """ + if self.use_rpm: + command = rpmfuncs.remove_packages_command(self.os, packages) + elif self.use_deb: + command = debfuncs.remove_packages_command(self.os, packages) + else: + msg = "Error removing packages ( OS not known ) " + self.error(msg) + raise RuntimeError, msg + + run_home = run_home or home + + (out, err), proc = self.run_and_wait(command, run_home, + shfile = os.path.join(home, "rmpkg.sh"), + pidfile = "rmpkg_pidfile", + ecodefile = "rmpkg_exitcode", + stdout = "rmpkg_stdout", + stderr = "rmpkg_stderr", + overwrite = False, + raise_on_error = raise_on_error) + + return (out, err), proc +
+
[docs] def mkdir(self, paths, clean = False): + """ Paths is either a single remote directory path to create, + or a list of directories to create. + """ + if clean: + self.rmdir(paths) + + if isinstance(paths, str): + paths = [paths] + + cmd = " ; ".join(map(lambda path: "mkdir -p %s" % path, paths)) + + return self.execute(cmd, with_lock = True) +
+
[docs] def rmdir(self, paths): + """ Paths is either a single remote directory path to delete, + or a list of directories to delete. + """ + + if isinstance(paths, str): + paths = [paths] + + cmd = " ; ".join(map(lambda path: "rm -rf %s" % path, paths)) + + return self.execute(cmd, with_lock = True) +
+
[docs] def run_and_wait(self, command, home, + shfile="cmd.sh", + env=None, + overwrite=True, + wait_run=True, + pidfile="pidfile", + ecodefile="exitcode", + stdin=None, + stdout="stdout", + stderr="stderr", + sudo=False, + tty=False, + raise_on_error=True): + """ + Uploads the 'command' to a bash script in the host. + Then runs the script detached in background in the host, and + busy-waites until the script finishes executing. + """ + + if not shfile.startswith("/"): + shfile = os.path.join(home, shfile) + + self.upload_command(command, + shfile = shfile, + ecodefile = ecodefile, + env = env, + overwrite = overwrite) + + command = "bash %s" % shfile + # run command in background in remote host + (out, err), proc = self.run(command, home, + pidfile = pidfile, + stdin = stdin, + stdout = stdout, + stderr = stderr, + sudo = sudo, + tty = tty) + + # check no errors occurred + if proc.poll(): + msg = " Failed to run command '%s' " % command + self.error(msg, out, err) + if raise_on_error: + raise RuntimeError, msg + + # Wait for pid file to be generated + pid, ppid = self.wait_pid( + home = home, + pidfile = pidfile, + raise_on_error = raise_on_error) + + if wait_run: + # wait until command finishes to execute + self.wait_run(pid, ppid) + + (eout, err), proc = self.check_errors(home, + ecodefile = ecodefile, + stderr = stderr) + + # Out is what was written in the stderr file + if err: + msg = " Failed to run command '%s' " % command + self.error(msg, eout, err) + + if raise_on_error: + raise RuntimeError, msg + + (out, oerr), proc = self.check_output(home, stdout) + + return (out, err), proc +
+
[docs] def exitcode(self, home, ecodefile = "exitcode"): + """ + Get the exit code of an application. + Returns an integer value with the exit code + """ + (out, err), proc = self.check_output(home, ecodefile) + + # Succeeded to open file, return exit code in the file + if proc.wait() == 0: + try: + return int(out.strip()) + except: + # Error in the content of the file! + return ExitCode.CORRUPTFILE + + # No such file or directory + if proc.returncode == 1: + return ExitCode.FILENOTFOUND + + # Other error from 'cat' + return ExitCode.ERROR +
+
[docs] def upload_command(self, command, + shfile="cmd.sh", + ecodefile="exitcode", + overwrite=True, + env=None): + """ Saves the command as a bash script file in the remote host, and + forces to save the exit code of the command execution to the ecodefile + """ + + if not (command.strip().endswith(";") or command.strip().endswith("&")): + command += ";" + + # The exit code of the command will be stored in ecodefile + command = " { %(command)s } ; echo $? > %(ecodefile)s ;" % { + 'command': command, + 'ecodefile': ecodefile, + } + + # Export environment + environ = self.format_environment(env) + + # Add environ to command + command = environ + command + + return self.upload(command, shfile, text=True, overwrite=overwrite) +
+
[docs] def format_environment(self, env, inline=False): + """ Formats the environment variables for a command to be executed + either as an inline command + (i.e. export PYTHONPATH=src/..; export LALAL= ..;python script.py) or + as a bash script (i.e. export PYTHONPATH=src/.. \n export LALA=.. \n) + """ + if not env: return "" + + # Remove extra white spaces + env = re.sub(r'\s+', ' ', env.strip()) + + sep = ";" if inline else "\n" + return sep.join(map(lambda e: " export %s" % e, env.split(" "))) + sep +
+
[docs] def check_errors(self, home, + ecodefile = "exitcode", + stderr = "stderr"): + """ Checks whether errors occurred while running a command. + It first checks the exit code for the command, and only if the + exit code is an error one it returns the error output. + + """ + proc = None + err = "" + + # get exit code saved in the 'exitcode' file + ecode = self.exitcode(home, ecodefile) + + if ecode in [ ExitCode.CORRUPTFILE, ExitCode.ERROR ]: + err = "Error retrieving exit code status from file %s/%s" % (home, ecodefile) + elif ecode > 0 or ecode == ExitCode.FILENOTFOUND: + # The process returned an error code or didn't exist. + # Check standard error. + (err, eerr), proc = self.check_output(home, stderr) + + # If the stderr file was not found, assume nothing bad happened, + # and just ignore the error. + # (cat returns 1 for error "No such file or directory") + if ecode == ExitCode.FILENOTFOUND and proc.poll() == 1: + err = "" + + return ("", err), proc +
+
[docs] def wait_pid(self, home, pidfile = "pidfile", raise_on_error = False): + """ Waits until the pid file for the command is generated, + and returns the pid and ppid of the process """ + pid = ppid = None + delay = 1.0 + + for i in xrange(2): + pidtuple = self.getpid(home = home, pidfile = pidfile) + + if pidtuple: + pid, ppid = pidtuple + break + else: + time.sleep(delay) + delay = delay * 1.5 + else: + msg = " Failed to get pid for pidfile %s/%s " % ( + home, pidfile ) + self.error(msg) + + if raise_on_error: + raise RuntimeError, msg + + return pid, ppid +
+
[docs] def wait_run(self, pid, ppid, trial = 0): + """ wait for a remote process to finish execution """ + delay = 1.0 + + while True: + status = self.status(pid, ppid) + + if status is ProcStatus.FINISHED: + break + elif status is not ProcStatus.RUNNING: + delay = delay * 1.5 + time.sleep(delay) + # If it takes more than 20 seconds to start, then + # asume something went wrong + if delay > 20: + break + else: + # The app is running, just wait... + time.sleep(0.5) +
+
[docs] def check_output(self, home, filename): + """ Retrives content of file """ + (out, err), proc = self.execute("cat %s" % + os.path.join(home, filename), retry = 1, with_lock = True) + return (out, err), proc +
+
[docs] def is_alive(self): + """ Checks if host is responsive + """ + if self.localhost: + return True + + out = err = "" + msg = "Unresponsive host. Wrong answer. " + + # The underlying SSH layer will sometimes return an empty + # output (even if the command was executed without errors). + # To work arround this, repeat the operation N times or + # until the result is not empty string + try: + (out, err), proc = self.execute("echo 'ALIVE'", + blocking = True, + with_lock = True) + + if out.find("ALIVE") > -1: + return True + except: + trace = traceback.format_exc() + msg = "Unresponsive host. Error reaching host: %s " % trace + + self.error(msg, out, err) + return False +
+
[docs] def find_home(self): + """ Retrieves host home directory + """ + # The underlying SSH layer will sometimes return an empty + # output (even if the command was executed without errors). + # To work arround this, repeat the operation N times or + # until the result is not empty string + msg = "Impossible to retrieve HOME directory" + try: + (out, err), proc = self.execute("echo ${HOME}", + blocking = True, + with_lock = True) + + if out.strip() != "": + self._home_dir = out.strip() + except: + trace = traceback.format_exc() + msg = "Impossible to retrieve HOME directory %s" % trace + + if not self._home_dir: + self.error(msg) + raise RuntimeError, msg +
+
[docs] def filter_existing_files(self, src, dst): + """ Removes files that already exist in the Linux host from src list + """ + # construct a dictionary with { dst: src } + dests = dict(map(lambda s: (os.path.join(dst, os.path.basename(s)), s), src)) \ + if len(src) > 1 else dict({dst: src[0]}) + + command = [] + for d in dests.keys(): + command.append(" [ -f %(dst)s ] && echo '%(dst)s' " % {'dst' : d} ) + + command = ";".join(command) + + (out, err), proc = self.execute(command, retry = 1, with_lock = True) + + for d in dests.keys(): + if out.find(d) > -1: + del dests[d] + + if not dests: + return [] + + return dests.values() +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/linux/nping.html b/doc/sphinx/_build/html/_modules/nepi/resources/linux/nping.html new file mode 100644 index 00000000..e4c334ae --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/linux/nping.html @@ -0,0 +1,312 @@ + + + + + + + + nepi.resources.linux.nping — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.linux.nping

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.resource import clsinit_copy
+from nepi.resources.linux.application import LinuxApplication
+from nepi.util.timefuncs import tnow
+
+import os
+
+@clsinit_copy
+
[docs]class LinuxNPing(LinuxApplication): + _rtype = "linux::NPing" + + @classmethod + def _register_attributes(cls): + c = Attribute("c", + "Sets nping -c option. " + "Stop after a given number of rounds. ", + type = Types.Integer, + flags = Flags.Design) + + e = Attribute("e", + "Sets nping -e option. " + "Set the network interface to be used.", + flags = Flags.Design) + + delay = Attribute("delay", + "Sets nping --delay option. " + "Delay between probes ", + flags = Flags.Design) + + rate = Attribute("rate", + "Sets nping --rate option. " + "Send probes at a given rate ", + flags = Flags.Design) + + ttl = Attribute("ttl", + "Sets nping --ttl option. " + "Time To Live. ", + flags = Flags.Design) + + p = Attribute("p", + "Sets nping -p option. " + "Target ports. ", + type = Types.Integer, + flags = Flags.Design) + + tcp = Attribute("tcp", + "Sets nping --tcp option. " + "TCP mode. ", + type = Types.Bool, + default = False, + flags = Flags.Design) + + udp = Attribute("udp", + "Sets nping --udp option. " + "UDP mode. ", + type = Types.Bool, + default = False, + flags = Flags.Design) + + icmp = Attribute("icmp", + "Sets nping --icmp option. " + "ICMP mode. ", + type = Types.Bool, + default = False, + flags = Flags.Design) + + arp = Attribute("arp", + "Sets nping --arp option. " + "ARP mode. ", + type = Types.Bool, + default = False, + flags = Flags.Design) + + traceroute = Attribute("traceroute", + "Sets nping --traceroute option. " + "Traceroute mode. ", + type = Types.Bool, + default = False, + flags = Flags.Design) + + countinuous = Attribute("continuous", + "Run nping in a while loop", + type = Types.Bool, + default = False, + flags = Flags.Design) + + print_timestamp = Attribute("printTimestamp", + "Print timestamp before running nping", + type = Types.Bool, + default = False, + flags = Flags.Design) + + target = Attribute("target", + "nping target host (host that will be pinged)", + flags = Flags.Design) + + cls._register_attribute(c) + cls._register_attribute(e) + cls._register_attribute(delay) + cls._register_attribute(rate) + cls._register_attribute(ttl) + cls._register_attribute(p) + cls._register_attribute(tcp) + cls._register_attribute(udp) + cls._register_attribute(icmp) + cls._register_attribute(arp) + cls._register_attribute(traceroute) + cls._register_attribute(countinuous) + cls._register_attribute(print_timestamp) + cls._register_attribute(target) + + def __init__(self, ec, guid): + super(LinuxNPing, self).__init__(ec, guid) + self._home = "nping-%s" % self.guid + self._sudo_kill = True + +
[docs] def do_deploy(self): + if not self.get("command"): + self.set("command", self._start_command) + + if not self.get("install"): + self.set("install", self._install) + + if not self.get("env"): + self.set("env", "PATH=$PATH:/usr/sbin/") + + if not self.get("depends"): + self.set("depends", "nmap") + + super(LinuxNPing, self).do_deploy() +
+ @property + def _start_command(self): + args = [] + if self.get("continuous") == True: + args.append("while true; do ") + if self.get("printTimestamp") == True: + args.append("""echo "`date +'%Y%m%d%H%M%S'`";""") + args.append("sudo -S nping ") + if self.get("c"): + args.append("-c %s" % self.get("c")) + if self.get("e"): + args.append("-e %s" % self.get("e")) + if self.get("delay"): + args.append("--delay %s" % self.get("delay")) + if self.get("rate"): + args.append("--rate %s" % self.get("rate")) + if self.get("ttl"): + args.append("--ttl %s" % self.get("ttl")) + if self.get("p"): + args.append("-p %s" % self.get("p")) + if self.get("tcp") == True: + args.append("--tcp") + if self.get("udp") == True: + args.append("--udp") + if self.get("icmp") == True: + args.append("--icmp") + if self.get("arp") == True: + args.append("--arp") + if self.get("traceroute") == True: + args.append("--traceroute") + + args.append(self.get("target")) + + if self.get("continuous") == True: + args.append("; done ") + + command = " ".join(args) + + return command + + @property + def _install(self): + install = "echo 'nothing to do'" + if self.node.use_rpm: + install = ( + " ( " + " ( " + " if [ `uname -m` == 'x86_64' ]; then " + " wget -O nping.rpm http://nmap.org/dist/nping-0.6.25-1.x86_64.rpm ;" + " else wget -O nping.rpm http://nmap.org/dist/nping-0.6.25-1.i386.rpm ;" + " fi " + " )" + " && sudo -S rpm -vhU nping.rpm ) ") + elif self.node.use_deb: + from nepi.resources.linux import debfuncs + install_alien = debfuncs.install_packages_command(self.node.os, "alien gcc") + install = ( + " ( " + " ( " + " if [ `uname -m` == 'x86_64' ]; then " + " wget -O nping.rpm http://nmap.org/dist/nping-0.6.25-1.x86_64.rpm ;" + " else wget -O nping.rpm http://nmap.org/dist/nping-0.6.25-1.i386.rpm ;" + " fi " + " )" + " && %s && sudo alien -i nping.rpm ) " % install_alien) + + return ("( nping --version || %s )" % install) + +
[docs] def valid_connection(self, guid): + # TODO: Validate! + return True +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/linux/ns3/ccn/ns3ccncatdceapplication.html b/doc/sphinx/_build/html/_modules/nepi/resources/linux/ns3/ccn/ns3ccncatdceapplication.html new file mode 100644 index 00000000..600a4233 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/linux/ns3/ccn/ns3ccncatdceapplication.html @@ -0,0 +1,153 @@ + + + + + + + + nepi.resources.linux.ns3.ccn.ns3ccncatdceapplication — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.linux.ns3.ccn.ns3ccncatdceapplication

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.resource import clsinit_copy, ResourceState
+from nepi.resources.linux.ns3.ccn.ns3ccndceapplication import LinuxNS3CCNDceApplication
+
+@clsinit_copy
+
[docs]class LinuxNS3DceCCNCat(LinuxNS3CCNDceApplication): + _rtype = "linux::ns3::dce::CCNCat" + + @classmethod + def _register_attributes(cls): + content_name = Attribute("contentName", + "Content name for the requested content object. ", + flags = Flags.Design) + + cls._register_attribute(content_name) + + def _instantiate_object(self): + if not self.get("binary"): + self.set("binary", "ccncat") + + if self.get("contentName"): + self.set("arguments", self.get("contentName")) + + self.set("stdinFile", "") + + super(LinuxNS3DceCCNCat, self)._instantiate_object() + + @property + def _arguments(self): + args = ["-v", "add"] + + if self.get("uri"): + args.append(self.get("uri")) + if self.get("protocol"): + args.append(self.get("protocol")) + if self.get("host"): + args.append(self.get("host")) + if self.get("port"): + args.append(self.get("port")) + if self.get("ip"): + args.append(self.get("ip")) + + return ";".join(args) +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/linux/ns3/ccn/ns3ccndceapplication.html b/doc/sphinx/_build/html/_modules/nepi/resources/linux/ns3/ccn/ns3ccndceapplication.html new file mode 100644 index 00000000..86012dc2 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/linux/ns3/ccn/ns3ccndceapplication.html @@ -0,0 +1,198 @@ + + + + + + + + nepi.resources.linux.ns3.ccn.ns3ccndceapplication — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.linux.ns3.ccn.ns3ccndceapplication

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.resource import clsinit_copy, ResourceState
+from nepi.resources.ns3.ns3ccndceapplication import NS3BaseCCNDceApplication
+
+@clsinit_copy
+
[docs]class LinuxNS3CCNDceApplication(NS3BaseCCNDceApplication): + _rtype = "linux::ns3::dce::CCNApplication" + + @classmethod + def _register_attributes(cls): + sources = Attribute("sources", + "Path to tar.gz file with sources for the application execute in DCE. " + "Sources will be uploaded to ${SRC} and it is the responsibility of " + "the build instructions (in the build attribute) to copy the compiled " + "binaries to the ${BIN_DCE} directory", + flags = Flags.Design) + + build = Attribute("build", + "Instructions to compile sources DCE-compatible way. " + "Note that sources will be uploaded to ${SRC} and the " + "build instructions are responsible for copying the " + "binaries to the ${BIN_DCE} directory. ", + flags = Flags.Design) + + depends = Attribute("depends", + "Space-separated list of packages required to run the application", + flags = Flags.Design) + + files = Attribute("files", + "Semi-colon separated list of 'key=value' pairs to set as " + "DCE files (AddFile). The key should be a path to a local file " + "and the key is the path to be set in DCE for that file" , + flags = Flags.Design) + + stdinfile = Attribute("stdinFile", + "File to set as StdinFile. The value shoudl be either an empty " + "or a path to a local file ", + flags = Flags.Design) + + cls._register_attribute(sources) + cls._register_attribute(build) + cls._register_attribute(depends) + cls._register_attribute(files) + cls._register_attribute(stdinfile) + + def _instantiate_object(self): + command = [] + + # Install package dependencies required to run the binary + depends = self.get("depends") + if depends: + dcmd = self.simulation.install_dependencies(depends = depends) + if dcmd: + command.append(dcmd) + + # Upload sources to generate the binary + sources = self.get("sources") + if sources: + scmd = self.simulation.upload_extra_sources(sources = sources) + if scmd: + command.append(scmd) + + # Upload instructions to build the binary + build = self.get("build") + if build: + bcmd = self.simulation.build(build = build) + if bcmd: + command.append(bcmd) + + # Upload CCN files (e.g. repo) + files = self.get("files") + if files: + upload = [] + for file in map(str.strip, files.split(";")): + localpath, dcepath = files.split("=") + upload.append(localpath) + + sources = ";".join(upload) + fcmd = self.simulation.upload_extra_sources(sources = sources, + src_dir = self.simulation.app_home) + + if fcmd: + command.append(fcmd) + + if command: + deploy_command = ";".join(command) + prefix = "%d_deploy" % self.guid + self.simulation.execute_deploy_command(deploy_command, prefix=prefix) +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/linux/ns3/ccn/ns3ccnddceapplication.html b/doc/sphinx/_build/html/_modules/nepi/resources/linux/ns3/ccn/ns3ccnddceapplication.html new file mode 100644 index 00000000..5c91ab0f --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/linux/ns3/ccn/ns3ccnddceapplication.html @@ -0,0 +1,295 @@ + + + + + + + + nepi.resources.linux.ns3.ccn.ns3ccnddceapplication — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.linux.ns3.ccn.ns3ccnddceapplication

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.resource import clsinit_copy, ResourceState
+from nepi.resources.linux.ns3.ccn.ns3ccndceapplication import LinuxNS3CCNDceApplication
+
+import os
+
+@clsinit_copy
+
[docs]class LinuxNS3DceCCND(LinuxNS3CCNDceApplication): + _rtype = "linux::ns3::dce::CCND" + + @classmethod + def _register_attributes(cls): + debug = Attribute("debug", "Sets the CCND_DEBUG environmental variable. " + " Allowed values are : \n" + " 0 - no messages \n" + " 1 - basic messages (any non-zero value gets these) \n" + " 2 - interest messages \n" + " 4 - content messages \n" + " 8 - matching details \n" + " 16 - interest details \n" + " 32 - gory interest details \n" + " 64 - log occasional human-readable timestamps \n" + " 128 - face registration debugging \n" + " -1 - max logging \n" + " Or apply bitwise OR to these values to get combinations of them", + type = Types.Integer, + flags = Flags.Design) + + port = Attribute("port", "Sets the CCN_LOCAL_PORT environmental variable. " + "Defaults to 9695 ", + flags = Flags.Design) + + sockname = Attribute("sockname", + "Sets the CCN_LOCAL_SCOKNAME environmental variable. " + "Defaults to /tmp/.ccnd.sock", + flags = Flags.Design) + + capacity = Attribute("capacity", + "Sets the CCND_CAP environmental variable. " + "Capacity limit in terms of ContentObjects", + flags = Flags.Design) + + mtu = Attribute("mtu", "Sets the CCND_MTU environmental variable. ", + flags = Flags.Design) + + data_pause = Attribute("dataPauseMicrosec", + "Sets the CCND_DATA_PAUSE_MICROSEC environmental variable. ", + flags = Flags.Design) + + default_stale = Attribute("defaultTimeToStale", + "Sets the CCND_DEFAULT_TIME_TO_STALE environmental variable. ", + flags = Flags.Design) + + max_stale = Attribute("maxTimeToStale", + "Sets the CCND_MAX_TIME_TO_STALE environmental variable. ", + flags = Flags.Design) + + max_rte = Attribute("maxRteMicrosec", + "Sets the CCND_MAX_RTE_MICROSEC environmental variable. ", + flags = Flags.Design) + + keystore = Attribute("keyStoreDirectory", + "Sets the CCND_KEYSTORE_DIRECTORY environmental variable. ", + flags = Flags.Design) + + listen_on = Attribute("listenOn", + "Sets the CCND_LISTEN_ON environmental variable. ", + flags = Flags.Design) + + autoreg = Attribute("autoreg", + "Sets the CCND_AUTOREG environmental variable. ", + flags = Flags.Design) + + prefix = Attribute("prefix", + "Sets the CCND_PREFIX environmental variable. ", + flags = Flags.Design) + + cls._register_attribute(debug) + cls._register_attribute(port) + cls._register_attribute(sockname) + cls._register_attribute(capacity) + cls._register_attribute(mtu) + cls._register_attribute(data_pause) + cls._register_attribute(default_stale) + cls._register_attribute(max_stale) + cls._register_attribute(max_rte) + cls._register_attribute(keystore) + cls._register_attribute(listen_on) + cls._register_attribute(autoreg) + cls._register_attribute(prefix) + + @property +
[docs] def version(self): + return self._version +
+ def _instantiate_object(self): + if not self.get("depends"): + self.set("depends", self._dependencies) + + if not self.get("sources"): + self.set("sources", self._sources) + + sources = self.get("sources") + source = sources.split(" ")[0] + basename = os.path.basename(source) + self._version = ( basename.strip().replace(".tar.gz", "") + .replace(".tar","") + .replace(".gz","") + .replace(".zip","") ) + + if not self.get("build"): + self.set("build", self._build) + + if not self.get("binary"): + self.set("binary", "ccnd") + + if not self.get("environment"): + self.set("environment", self._environment) + + super(LinuxNS3DceCCND, self)._instantiate_object() + + @property + def _dependencies(self): + if self.simulation.node.use_rpm: + return ( " autoconf openssl-devel expat-devel libpcap-devel " + " ecryptfs-utils-devel libxml2-devel automake gawk " + " gcc gcc-c++ git pcre-devel make ") + elif self.simulation.node.use_deb: + return ( " autoconf libssl-dev libexpat1-dev libpcap-dev " + " libecryptfs0 libxml2-utils automake gawk gcc g++ " + " git-core pkg-config libpcre3-dev make ") + return "" + + @property + def _sources(self): + #return "http://www.ccnx.org/releases/ccnx-0.8.1.tar.gz" + return "http://www.ccnx.org/releases/ccnx-0.8.2.tar.gz" + + @property + def _build(self): + sources = self.get("sources") + source = sources.split(" ")[0] + tar = os.path.basename(source) + + return ( + # Evaluate if ccnx binaries are already installed + " ( " + " test -f ${BIN_DCE}/ccnd && " + " echo 'binaries found, nothing to do' " + " ) || " + # If not, untar and build + " ( " + " tar zxf ${SRC}/%(tar)s && " + " cd %(version)s && " + " INSTALL_BASE=${BIN_DCE}/.. ./configure && " + " make MORE_LDLIBS='-pie -rdynamic' && " + " make install && " + " cp ${BIN_DCE}/../bin/ccn* ${BIN_DCE} && " + " cd -" + " )") % ({ 'tar': tar, + 'version': self.version + }) + + @property + def _environment(self): + envs = dict({ + "debug": "CCND_DEBUG", + "port": "CCN_LOCAL_PORT", + "sockname" : "CCN_LOCAL_SOCKNAME", + "capacity" : "CCND_CAP", + "mtu" : "CCND_MTU", + "dataPauseMicrosec" : "CCND_DATA_PAUSE_MICROSEC", + "defaultTimeToStale" : "CCND_DEFAULT_TIME_TO_STALE", + "maxTimeToStale" : "CCND_MAX_TIME_TO_STALE", + "maxRteMicrosec" : "CCND_MAX_RTE_MICROSEC", + "keyStoreDirectory" : "CCND_KEYSTORE_DIRECTORY", + "listenOn" : "CCND_LISTEN_ON", + "autoreg" : "CCND_AUTOREG", + "prefix" : "CCND_PREFIX", + }) + + env = ";".join(map(lambda k: "%s=%s" % (envs.get(k), str(self.get(k))), + [k for k in envs.keys() if self.get(k)])) + + return env +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/linux/ns3/ccn/ns3ccnpeekdceapplication.html b/doc/sphinx/_build/html/_modules/nepi/resources/linux/ns3/ccn/ns3ccnpeekdceapplication.html new file mode 100644 index 00000000..04d2773c --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/linux/ns3/ccn/ns3ccnpeekdceapplication.html @@ -0,0 +1,136 @@ + + + + + + + + nepi.resources.linux.ns3.ccn.ns3ccnpeekdceapplication — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.linux.ns3.ccn.ns3ccnpeekdceapplication

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.resource import clsinit_copy, ResourceState
+from nepi.resources.linux.ns3.ccn.ns3ccndceapplication import LinuxNS3CCNDceApplication
+
+@clsinit_copy
+
[docs]class LinuxNS3DceCCNPeek(LinuxNS3CCNDceApplication): + _rtype = "linux::ns3::dce::CCNPeek" + + @classmethod + def _register_attributes(cls): + content_name = Attribute("contentName", + "Content name for the requested content object. ", + flags = Flags.Design) + + cls._register_attribute(content_name) + + def _instantiate_object(self): + if not self.get("binary"): + self.set("binary", "ccnpeek") + + if self.get("contentName"): + self.set("arguments", self.get("contentName")) + + self.set("stdinFile", "") + + super(LinuxNS3DceCCNPeek, self)._instantiate_object() +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/linux/ns3/ccn/ns3ccnpokedceapplication.html b/doc/sphinx/_build/html/_modules/nepi/resources/linux/ns3/ccn/ns3ccnpokedceapplication.html new file mode 100644 index 00000000..76a1455c --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/linux/ns3/ccn/ns3ccnpokedceapplication.html @@ -0,0 +1,155 @@ + + + + + + + + nepi.resources.linux.ns3.ccn.ns3ccnpokedceapplication — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.linux.ns3.ccn.ns3ccnpokedceapplication

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.resource import clsinit_copy, ResourceState
+from nepi.resources.linux.ns3.ccn.ns3ccndceapplication \
+        import LinuxNS3CCNDceApplication
+
+import os
+import tempfile
+
+@clsinit_copy
+
[docs]class LinuxNS3DceCCNPoke(LinuxNS3CCNDceApplication): + _rtype = "linux::ns3::dce::CCNPoke" + + @classmethod + def _register_attributes(cls): + content_name = Attribute("contentName", + "Content name for the requested content object. ", + flags = Flags.Design) + content = Attribute("content", + "Content to poke (as a text string). ", + flags = Flags.Design) + + cls._register_attribute(content_name) + cls._register_attribute(content) + + def _instantiate_object(self): + if not self.get("binary"): + self.set("binary", "ccnpoke") + + if self.get("contentName"): + self.set("arguments", self.get("contentName")) + + # Create temporary local file to store content + content = self.get("content") + f = tempfile.NamedTemporaryFile(delete=False) + f.write(content) + f.close() + + localpath = f.name + dcepath = os.path.join("/tmp", os.path.basename(localpath)) + + self.set("environment", "HOME=/root") + self.set("files", "%s=%s" % (localpath, dcepath)) + self.set("stdinFile", dcepath) + + super(LinuxNS3DceCCNPoke, self)._instantiate_object() +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/linux/ns3/ccn/ns3ccnrdceapplication.html b/doc/sphinx/_build/html/_modules/nepi/resources/linux/ns3/ccn/ns3ccnrdceapplication.html new file mode 100644 index 00000000..1d1f7d4b --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/linux/ns3/ccn/ns3ccnrdceapplication.html @@ -0,0 +1,319 @@ + + + + + + + + nepi.resources.linux.ns3.ccn.ns3ccnrdceapplication — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.linux.ns3.ccn.ns3ccnrdceapplication

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.resource import clsinit_copy, ResourceState 
+from nepi.resources.linux.ns3.ccn.ns3ccndceapplication import LinuxNS3CCNDceApplication
+
+@clsinit_copy
+
[docs]class LinuxNS3DceCCNR(LinuxNS3CCNDceApplication): + _rtype = "linux::ns3::dce::CCNR" + + @classmethod + def _register_attributes(cls): + max_fanout = Attribute("maxFanout", + "Sets the CCNR_BTREE_MAX_FANOUT environmental variable. ", + flags = Flags.Design) + + max_leaf_entries = Attribute("maxLeafEntries", + "Sets the CCNR_BTREE_MAX_LEAF_ENTRIES environmental variable. ", + flags = Flags.Design) + + max_node_bytes = Attribute("maxNodeBytes", + "Sets the CCNR_BTREE_MAX_NODE_BYTES environmental variable. ", + flags = Flags.Design) + + max_node_pool = Attribute("maxNodePool", + "Sets the CCNR_BTREE_MAX_NODE_POOL environmental variable. ", + flags = Flags.Design) + + content_cache = Attribute("contentCache", + "Sets the CCNR_CONTENT_CACHE environmental variable. ", + flags = Flags.Design) + + debug = Attribute("debug", + "Sets the CCNR_DEBUG environmental variable. " + "Logging level for ccnr. Defaults to WARNING.", + type = Types.Enumerate, + allowed = [ + "NONE", + "SEVERE", + "ERROR", + "WARNING", + "INFO", + "FINE, FINER, FINEST"], + flags = Flags.Design) + + directory = Attribute("directory", + "Sets the CCNR_DIRECTORY environmental variable. ", + flags = Flags.Design) + + global_prefix = Attribute("globalPrefix", + "Sets the CCNR_GLOBAL_PREFIX environmental variable. ", + flags = Flags.Design) + + listen_on = Attribute("listenOn", + "Sets the CCNR_LISTEN_ON environmental variable. ", + flags = Flags.Design) + + min_send_bufsize = Attribute("minSendBufsize", + "Sets the CCNR_MIN_SEND_BUFSIZE environmental variable. ", + flags = Flags.Design) + + proto = Attribute("proto", + "Sets the CCNR_PROTO environmental variable. ", + flags = Flags.Design) + + status_port = Attribute("statusPort", + "Sets the CCNR_STATUS_PORT environmental variable. ", + flags = Flags.Design) + + start_write_scope_limit = Attribute("startWriteScopeLimit", + "Sets the CCNR_START_WRITE_SCOPE_LIMIT environmental variable. ", + flags = Flags.Design) + + ccns_debug = Attribute("ccnsDebug", + "Sets the CCNS_DEBUG environmental variable. ", + flags = Flags.Design) + + ccns_enable = Attribute("ccnsEnable", + "Sets the CCNS_ENABLE environmental variable. ", + flags = Flags.Design) + + ccns_faux_error = Attribute("ccnsFauxError", + "Sets the CCNS_FAUX_ERROR environmental variable. ", + flags = Flags.Design) + + ccns_heartbeat_micros = Attribute("ccnsHeartBeatMicros", + "Sets the CCNS_HEART_BEAT_MICROS environmental variable. ", + flags = Flags.Design) + + ccns_max_compares_busy = Attribute("ccnsMaxComparesBusy", + "Sets the CCNS_MAX_COMPARES_BUSY environmental variable. ", + flags = Flags.Design) + + ccns_max_fetch_busy = Attribute("ccnsMaxFetchBusy", + "Sets the CCNS_MAX_FETCH_BUSY environmental variable. ", + flags = Flags.Design) + + ccns_node_fetch_lifetime = Attribute("ccnsNodeFetchLifetime", + "Sets the CCNS_NODE_FETCH_LIFETIME environmental variable. ", + flags = Flags.Design) + + ccns_note_err = Attribute("ccnsNoteErr", + "Sets the CCNS_NOTE_ERR environmental variable. ", + flags = Flags.Design) + + ccns_repo_store = Attribute("ccnsRepoStore", + "Sets the CCNS_REPO_STORE environmental variable. ", + flags = Flags.Design) + + ccns_root_advise_fresh = Attribute("ccnsRootAdviseFresh", + "Sets the CCNS_ROOT_ADVISE_FRESH environmental variable. ", + flags = Flags.Design) + + ccns_root_advise_lifetime = Attribute("ccnsRootAdviseLifetime", + "Sets the CCNS_ROOT_ADVISE_LIFETIME environmental variable. ", + flags = Flags.Design) + + ccns_stable_enabled = Attribute("ccnsStableEnabled", + "Sets the CCNS_STABLE_ENABLED environmental variable. ", + flags = Flags.Design) + + ccns_sync_scope = Attribute("ccnsSyncScope", + "Sets the CCNS_SYNC_SCOPE environmental variable. ", + flags = Flags.Design) + + repo_file = Attribute("repoFile1", + "The Repository uses $CCNR_DIRECTORY/repoFile1 for " + "persistent storage of CCN Content Objects", + flags = Flags.Design) + + cls._register_attribute(max_fanout) + cls._register_attribute(max_leaf_entries) + cls._register_attribute(max_node_bytes) + cls._register_attribute(max_node_pool) + cls._register_attribute(content_cache) + cls._register_attribute(debug) + cls._register_attribute(directory) + cls._register_attribute(global_prefix) + cls._register_attribute(listen_on) + cls._register_attribute(min_send_bufsize) + cls._register_attribute(proto) + cls._register_attribute(status_port) + cls._register_attribute(start_write_scope_limit) + cls._register_attribute(ccns_debug) + cls._register_attribute(ccns_enable) + cls._register_attribute(ccns_faux_error) + cls._register_attribute(ccns_heartbeat_micros) + cls._register_attribute(ccns_max_compares_busy) + cls._register_attribute(ccns_max_fetch_busy) + cls._register_attribute(ccns_node_fetch_lifetime) + cls._register_attribute(ccns_note_err) + cls._register_attribute(ccns_repo_store) + cls._register_attribute(ccns_root_advise_fresh) + cls._register_attribute(ccns_root_advise_lifetime) + cls._register_attribute(ccns_stable_enabled) + cls._register_attribute(ccns_sync_scope) + cls._register_attribute(repo_file) + + def _instantiate_object(self): + if not self.get("binary"): + self.set("binary", "ccnr") + + if not self.get("environment"): + self.set("environment", self._environment) + + repoFile1 = self.get("repoFile1") + if repoFile1: + env = "CCNR_DIRECTORY=/REPO/" + environment = self.get("environment") + if environment: + env += ";" + environment + self.set("environment", env) + self.set("files", "%s=/REPO/repoFile1" % repoFile1) + + super(LinuxNS3DceCCNR, self)._instantiate_object() + + @property + def _environment(self): + envs = dict({ + "maxFanout": "CCNR_BTREE_MAX_FANOUT", + "maxLeafEntries": "CCNR_BTREE_MAX_LEAF_ENTRIES", + "maxNodeBytes": "CCNR_BTREE_MAX_NODE_BYTES", + "maxNodePool": "CCNR_BTREE_MAX_NODE_POOL", + "contentCache": "CCNR_CONTENT_CACHE", + "debug": "CCNR_DEBUG", + "directory": "CCNR_DIRECTORY", + "globalPrefix": "CCNR_GLOBAL_PREFIX", + "listenOn": "CCNR_LISTEN_ON", + "minSendBufsize": "CCNR_MIN_SEND_BUFSIZE", + "proto": "CCNR_PROTO", + "statusPort": "CCNR_STATUS_PORT", + "startWriteScopeLimit": "CCNR_START_WRITE_SCOPE_LIMIT", + "ccnsDebug": "CCNS_DEBUG", + "ccnsEnable": "CCNS_ENABLE", + "ccnsFauxError": "CCNS_FAUX_ERROR", + "ccnsHeartBeatMicros": "CCNS_HEART_BEAT_MICROS", + "ccnsMaxComparesBusy": "CCNS_MAX_COMPARES_BUSY", + "ccnsMaxFetchBusy": "CCNS_MAX_FETCH_BUSY", + "ccnsNodeFetchLifetime": "CCNS_NODE_FETCH_LIFETIME", + "ccnsNoteErr": "CCNS_NOTE_ERR", + "ccnsRepoStore": "CCNS_REPO_STORE", + "ccnsRootAdviseFresh": "CCNS_ROOT_ADVISE_FRESH", + "ccnsRootAdviseLifetime": "CCNS_ROOT_ADVISE_LIFETIME", + "ccnsStableEnabled": "CCNS_STABLE_ENABLED", + "ccnsSyncScope": "CCNS_SYNC_SCOPE", + }) + + env = ";".join(map(lambda k: "%s=%s" % (envs.get(k), str(self.get(k))), + [k for k in envs.keys() if self.get(k)])) + + return env +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/linux/ns3/ccn/ns3fibentrydceapplication.html b/doc/sphinx/_build/html/_modules/nepi/resources/linux/ns3/ccn/ns3fibentrydceapplication.html new file mode 100644 index 00000000..b9cea6f5 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/linux/ns3/ccn/ns3fibentrydceapplication.html @@ -0,0 +1,196 @@ + + + + + + + + nepi.resources.linux.ns3.ccn.ns3fibentrydceapplication — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.linux.ns3.ccn.ns3fibentrydceapplication

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.resource import clsinit_copy, ResourceState
+from nepi.resources.linux.ns3.ccn.ns3ccndceapplication import LinuxNS3CCNDceApplication
+
+@clsinit_copy
+
[docs]class LinuxNS3DceFIBEntry(LinuxNS3CCNDceApplication): + _rtype = "linux::ns3::dce::FIBEntry" + + @classmethod + def _register_attributes(cls): + uri = Attribute("uri", + "URI prefix to match and route for this FIB entry", + default = "ccnx:/", + flags = Flags.Design) + + protocol = Attribute("protocol", + "Transport protocol used in network connection to peer " + "for this FIB entry. One of 'udp' or 'tcp'.", + type = Types.Enumerate, + default = "udp", + allowed = ["udp", "tcp"], + flags = Flags.Design) + + host = Attribute("host", + "Peer hostname used in network connection for this FIB entry. ", + flags = Flags.Design) + + port = Attribute("port", + "Peer port address used in network connection to peer " + "for this FIB entry.", + flags = Flags.Design) + + ip = Attribute("ip", + "Peer host public IP used in network connection for this FIB entry. ", + flags = Flags.Design) + + home = Attribute("home", "Sets HOME environmental variable. ", + default = "/root", + flags = Flags.Design) + + cls._register_attribute(uri) + cls._register_attribute(protocol) + cls._register_attribute(host) + cls._register_attribute(port) + cls._register_attribute(ip) + cls._register_attribute(home) + + def _instantiate_object(self): + if not self.get("binary"): + self.set("binary", "ccndc") + + if not self.get("arguments"): + self.set("arguments", self._arguments) + + if not self.get("environment"): + self.set("environment", self._environment) + + super(LinuxNS3DceFIBEntry, self)._instantiate_object() + + @property + def _environment(self): + envs = dict({ + "home": "HOME", + }) + + env = ";".join(map(lambda k: "%s=%s" % (envs.get(k), str(self.get(k))), + [k for k in envs.keys() if self.get(k)])) + + return env + + @property + def _arguments(self): + args = ["-v", "add"] + + if self.get("uri"): + args.append(self.get("uri")) + if self.get("protocol"): + args.append(self.get("protocol")) + if self.get("host"): + args.append(self.get("host")) + if self.get("port"): + args.append(self.get("port")) + if self.get("ip"): + args.append(self.get("ip")) + + return ";".join(args) +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/linux/ns3/fdudptunnel.html b/doc/sphinx/_build/html/_modules/nepi/resources/linux/ns3/fdudptunnel.html new file mode 100644 index 00000000..bbe45c4d --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/linux/ns3/fdudptunnel.html @@ -0,0 +1,473 @@ + + + + + + + + nepi.resources.linux.ns3.fdudptunnel — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.linux.ns3.fdudptunnel

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.resource import clsinit_copy, ResourceState
+from nepi.resources.linux.udptunnel import LinuxUdpTunnel
+from nepi.util.sshfuncs import ProcStatus
+from nepi.util.timefuncs import tnow, tdiffsec
+
+import base64
+import os
+import socket
+import time
+
+@clsinit_copy
+
[docs]class LinuxNs3FdUdpTunnel(LinuxUdpTunnel): + _rtype = "linux::ns3::FdUdpTunnel" + _help = "Constructs a tunnel between two Ns-3 FdNetdevices " \ + "located in remote Linux nodes using a UDP connection " + _platform = "linux::ns3" + + @classmethod + def _register_attributes(cls): + cipher = Attribute("cipher", + "Cipher to encript communication. " + "One of PLAIN, AES, Blowfish, DES, DES3. ", + default = None, + allowed = ["PLAIN", "AES", "Blowfish", "DES", "DES3"], + type = Types.Enumerate, + flags = Flags.Design) + + cipher_key = Attribute("cipherKey", + "Specify a symmetric encryption key with which to protect " + "packets across the tunnel. python-crypto must be installed " + "on the system." , + flags = Flags.Design) + + txqueuelen = Attribute("txQueueLen", + "Specifies the interface's transmission queue length. " + "Defaults to 1000. ", + type = Types.Integer, + flags = Flags.Design) + + bwlimit = Attribute("bwLimit", + "Specifies the interface's emulated bandwidth in bytes " + "per second.", + type = Types.Integer, + flags = Flags.Design) + + cls._register_attribute(cipher) + cls._register_attribute(cipher_key) + cls._register_attribute(txqueuelen) + cls._register_attribute(bwlimit) + + def __init__(self, ec, guid): + super(LinuxUdpTunnel, self).__init__(ec, guid) + self._home = "fd-udp-tunnel-%s" % self.guid + self._pids = dict() + self._fd1 = None + self._fd1node = None + self._fd2 = None + self._fd2node = None + self._pi = False + +
[docs] def log_message(self, msg): + self.get_endpoints() + return " guid %d - %s - %s - %s " % (self.guid, + self.node1.get("hostname"), + self.node2.get("hostname"), + msg) +
+
[docs] def get_endpoints(self): + """ Returns the list of RM that are endpoints to the tunnel + """ + if not self._fd2 or not self._fd1: + from nepi.resources.ns3.ns3fdnetdevice import NS3BaseFdNetDevice + devices = self.get_connected(NS3BaseFdNetDevice.get_rtype()) + if not devices or len(devices) != 2: + msg = "linux::ns3::TunTapFdLink must be connected to exactly one FdNetDevice" + self.error(msg) + raise RuntimeError, msg + + self._fd1 = devices[0] + self._fd2 = devices[1] + + simu = self._fd1.simulation + from nepi.resources.linux.node import LinuxNode + nodes = simu.get_connected(LinuxNode.get_rtype()) + self._fd1node = nodes[0] + + simu = self._fd2.simulation + from nepi.resources.linux.node import LinuxNode + nodes = simu.get_connected(LinuxNode.get_rtype()) + self._fd2node = nodes[0] + + if self._fd1node.get("hostname") == \ + self._fd2node.get("hostname"): + msg = "linux::ns3::FdUdpTunnel requires endpoints on different hosts" + self.error(msg) + raise RuntimeError, msg + + return [self._fd1, self._fd2] +
+ @property +
[docs] def pi(self): + return self._pi +
+ @property +
[docs] def endpoint1(self): + return self._fd1 +
+ @property +
[docs] def endpoint2(self): + return self._fd2 +
+ @property +
[docs] def node1(self): + return self._fd1node +
+ @property +
[docs] def node2(self): + return self._fd2node +
+
[docs] def endpoint_node(self, endpoint): + node = None + if endpoint == self.endpoint1: + node = self.node1 + else: + node = self.node2 + + return node +
+
[docs] def app_home(self, endpoint): + node = self.endpoint_node(endpoint) + return os.path.join(node.exp_home, self._home) +
+
[docs] def run_home(self, endpoint): + return os.path.join(self.app_home(endpoint), self.ec.run_id) +
+
[docs] def upload_sources(self, endpoint): + scripts = [] + + # vif-passfd python script + linux_passfd = os.path.join(os.path.dirname(__file__), + "..", + "scripts", + "fd-udp-connect.py") + + scripts.append(linux_passfd) + + # tunnel creation python script + tunchannel = os.path.join(os.path.dirname(__file__), + "..", + "scripts", + "tunchannel.py") + + scripts.append(tunchannel) + + # Upload scripts + scripts = ";".join(scripts) + + node = self.endpoint_node(endpoint) + node.upload(scripts, + os.path.join(node.src_dir), + overwrite = False) +
+
[docs] def endpoint_mkdir(self, endpoint): + node = self.endpoint_node(endpoint) + run_home = self.run_home(endpoint) + node.mkdir(run_home) +
+
[docs] def initiate_connection(self, endpoint, remote_endpoint): + cipher = self.get("cipher") + cipher_key = self.get("cipherKey") + bwlimit = self.get("bwLimit") + txqueuelen = self.get("txQueueLen") + + # Upload the tunnel creating script + self.upload_sources(endpoint) + + # Request an address to send the file descriptor to the ns-3 simulation + address = endpoint.recv_fd() + + # execute the tunnel creation script + node = self.endpoint_node(remote_endpoint) + port = self.initiate(endpoint, remote_endpoint, address, cipher, + cipher_key, bwlimit, txqueuelen) + + return port +
+
[docs] def establish_connection(self, endpoint, remote_endpoint, port): + self.establish(endpoint, remote_endpoint, port) +
+
[docs] def verify_connection(self, endpoint, remote_endpoint): + self.verify(endpoint) +
+
[docs] def terminate_connection(self, endpoint, remote_endpoint): + # Nothing to do + return +
+
[docs] def check_state_connection(self): + # Make sure the process is still running in background + # No execution errors occurred. Make sure the background + # process with the recorded pid is still running. + + node1 = self.endpoint_node(self.endpoint1) + node2 = self.endpoint_node(self.endpoint2) + run_home1 = self.run_home(self.endpoint1) + run_home2 = self.run_home(self.endpoint1) + (pid1, ppid1) = self._pids[endpoint1] + (pid2, ppid2) = self._pids[endpoint2] + + status1 = node1.status(pid1, ppid1) + status2 = node2.status(pid2, ppid2) + + if status1 == ProcStatus.FINISHED and \ + status2 == ProcStatus.FINISHED: + + # check if execution errors occurred + (out1, err1), proc1 = node1.check_errors(run_home1) + (out2, err2), proc2 = node2.check_errors(run_home2) + + if err1 or err2: + msg = "Error occurred in tunnel" + self.error(msg, err1, err2) + self.fail() + else: + self.set_stopped() +
+
[docs] def wait_local_port(self, endpoint): + """ Waits until the local_port file for the endpoint is generated, + and returns the port number + + """ + return self.wait_file(endpoint, "local_port") +
+
[docs] def wait_result(self, endpoint): + """ Waits until the return code file for the endpoint is generated + + """ + return self.wait_file(endpoint, "ret_file") +
+
[docs] def wait_file(self, endpoint, filename): + """ Waits until file on endpoint is generated """ + result = None + delay = 1.0 + + node = self.endpoint_node(endpoint) + run_home = self.run_home(endpoint) + + for i in xrange(20): + (out, err), proc = node.check_output(run_home, filename) + + if out: + result = out.strip() + break + else: + time.sleep(delay) + delay = delay * 1.5 + else: + msg = "Couldn't retrieve %s" % filename + self.error(msg, out, err) + raise RuntimeError, msg + + return result +
+
[docs] def initiate(self, endpoint, remote_endpoint, address, cipher, cipher_key, + bwlimit, txqueuelen): + + command = self._initiate_command(endpoint, remote_endpoint, + address, cipher, cipher_key, bwlimit, txqueuelen) + + node = self.endpoint_node(endpoint) + run_home = self.run_home(endpoint) + app_home = self.app_home(endpoint) + + # upload command to connect.sh script + shfile = os.path.join(app_home, "fd-udp-connect.sh") + node.upload_command(command, + shfile = shfile, + overwrite = False) + + # invoke connect script + cmd = "bash %s" % shfile + (out, err), proc = node.run(cmd, run_home) + + # check if execution errors occurred + msg = "Failed to connect endpoints " + + if proc.poll(): + self.error(msg, out, err) + raise RuntimeError, msg + + # Wait for pid file to be generated + pid, ppid = node.wait_pid(run_home) + + self._pids[endpoint] = (pid, ppid) + + # Check for error information on the remote machine + (out, err), proc = node.check_errors(run_home) + # Out is what was written in the stderr file + if err: + msg = " Failed to start command '%s' " % command + self.error(msg, out, err) + raise RuntimeError, msg + + port = self.wait_local_port(endpoint) + + return port +
+ def _initiate_command(self, endpoint, remote_endpoint, address, + cipher, cipher_key, bwlimit, txqueuelen): + local_node = self.endpoint_node(endpoint) + local_run_home = self.run_home(endpoint) + local_app_home = self.app_home(endpoint) + remote_node = self.endpoint_node(remote_endpoint) + + local_ip = local_node.get("ip") + remote_ip = remote_node.get("ip") + + local_port_file = os.path.join(local_run_home, "local_port") + remote_port_file = os.path.join(local_run_home, "remote_port") + ret_file = os.path.join(local_run_home, "ret_file") + + address = base64.b64encode(address) + + command = [""] + command.append("PYTHONPATH=$PYTHONPATH:${SRC}") + command.append("python ${SRC}/fd-udp-connect.py") + command.append("-a %s" % address) + command.append("-p %s" % local_port_file) + command.append("-P %s" % remote_port_file) + command.append("-o %s" % local_ip) + command.append("-O %s" % remote_ip) + command.append("-R %s" % ret_file) + command.append("-t %s" % "IFF_TAP") + if self.pi: + command.append("-n") + if cipher: + command.append("-c %s" % cipher) + if cipher_key: + command.append("-k %s " % cipher_key) + if txqueuelen: + command.append("-q %s " % txqueuelen) + if bwlimit: + command.append("-b %s " % bwlimit) + + command = " ".join(command) + command = self.replace_paths(command, node=local_node, + app_home=local_app_home, run_home=local_run_home) + + return command + +
[docs] def establish(self, endpoint, remote_endpoint, port): + node = self.endpoint_node(endpoint) + run_home = self.run_home(endpoint) + + # upload remote port number to file + remote_port = "%s\n" % port + node.upload(remote_port, + os.path.join(run_home, "remote_port"), + text = True, + overwrite = False) +
+
[docs] def verify(self, endpoint): + self.wait_result(endpoint) +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/linux/ns3/ns3client.html b/doc/sphinx/_build/html/_modules/nepi/resources/linux/ns3/ns3client.html new file mode 100644 index 00000000..af81026d --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/linux/ns3/ns3client.html @@ -0,0 +1,208 @@ + + + + + + + + nepi.resources.linux.ns3.ns3client — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.linux.ns3.ns3client

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+import base64
+import cPickle
+import errno
+import os
+import socket
+import time
+import weakref
+import threading
+
+from optparse import OptionParser, SUPPRESS_HELP
+
+from nepi.resources.ns3.ns3client import NS3Client
+from nepi.resources.ns3.ns3server import NS3WrapperMessage
+
+
[docs]class LinuxNS3Client(NS3Client): + def __init__(self, simulation): + super(LinuxNS3Client, self).__init__() + self._simulation = weakref.ref(simulation) + self._socket_lock = threading.Lock() + + @property +
[docs] def simulation(self): + return self._simulation() +
+
[docs] def send_msg(self, msg_type, *args, **kwargs): + msg = [msg_type, args, kwargs] + + def encode(item): + item = cPickle.dumps(item) + return base64.b64encode(item) + + encoded = "|".join(map(encode, msg)) + + with self._socket_lock: + if self.simulation.node.get("hostname") in ['localhost', '127.0.0.1']: + sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) + sock.connect(self.simulation.remote_socket) + sock.send("%s\n" % encoded) + reply = sock.recv(1024) + sock.close() + else: + command = ( "python -c 'import socket;" + "sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM);" + "sock.connect(\"%(socket_addr)s\");" + "msg = \"%(encoded_message)s\\n\";" + "sock.send(msg);" + "reply = sock.recv(1024);" + "sock.close();" + "print reply'") % { + "encoded_message": encoded, + "socket_addr": self.simulation.remote_socket, + } + + (reply, err), proc = self.simulation.node.execute(command, + with_lock = True) + + if (err and proc.poll()) or reply.strip() == "": + msg = (" Couldn't connect to remote socket %s - REPLY: %s " + "- ERROR: %s ") % ( + self.simulation.remote_socket, reply, err) + self.simulation.error(msg, reply, err) + raise RuntimeError(msg) + + reply = cPickle.loads(base64.b64decode(reply)) + + return reply +
+
[docs] def create(self, *args, **kwargs): + return self.send_msg(NS3WrapperMessage.CREATE, *args, **kwargs) +
+
[docs] def factory(self, *args, **kwargs): + return self.send_msg(NS3WrapperMessage.FACTORY, *args, **kwargs) +
+
[docs] def invoke(self, *args, **kwargs): + return self.send_msg(NS3WrapperMessage.INVOKE, *args, **kwargs) +
+
[docs] def set(self, *args, **kwargs): + return self.send_msg(NS3WrapperMessage.SET, *args, **kwargs) +
+
[docs] def get(self, *args, **kwargs): + return self.send_msg(NS3WrapperMessage.GET, *args, **kwargs) +
+
[docs] def flush(self, *args, **kwargs): + return self.send_msg(NS3WrapperMessage.FLUSH, *args, **kwargs) +
+
[docs] def start(self, *args, **kwargs): + return self.send_msg(NS3WrapperMessage.START, *args, **kwargs) +
+
[docs] def stop(self, *args, **kwargs): + return self.send_msg(NS3WrapperMessage.STOP, *args, **kwargs) +
+
[docs] def shutdown(self, *args, **kwargs): + try: + return self.send_msg(NS3WrapperMessage.SHUTDOWN, *args, **kwargs) + except: + pass + + return None +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/linux/ns3/ns3dceapplication.html b/doc/sphinx/_build/html/_modules/nepi/resources/linux/ns3/ns3dceapplication.html new file mode 100644 index 00000000..b5c8d333 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/linux/ns3/ns3dceapplication.html @@ -0,0 +1,170 @@ + + + + + + + + nepi.resources.linux.ns3.ns3dceapplication — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.linux.ns3.ns3dceapplication

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.resource import clsinit_copy, ResourceState
+from nepi.resources.ns3.ns3dceapplication import NS3BaseDceApplication
+
+@clsinit_copy
+
[docs]class LinuxNS3DceApplication(NS3BaseDceApplication): + _rtype = "linux::ns3::dce::Application" + + @classmethod + def _register_attributes(cls): + sources = Attribute("sources", + "Path to tar.gz file with sources for the application execute in DCE. " + "Sources will be uploaded to ${SRC} and it is the responsibility of " + "the build instructions (in the build attribute) to copy the compiled " + "binaries to the ${BIN_DCE} directory", + flags = Flags.Design) + + build = Attribute("build", + "Instructions to compile sources DCE-compatible way. " + "Note that sources will be uploaded to ${SRC} and the " + "build instructions are responsible for copying the " + "binaries to the ${BIN_DCE} directory. ", + flags = Flags.Design) + + depends = Attribute("depends", + "Space-separated list of packages required to run the application", + flags = Flags.Design) + + cls._register_attribute(sources) + cls._register_attribute(build) + cls._register_attribute(depends) + + def _instantiate_object(self): + command = [] + + # Install package dependencies required to run the binary + depends = self.get("depends") + if depends: + dcmd = self.simulation.install_dependencies(depends = depends) + if dcmd: + command.append(dcmd) + + # Upload sources to generate the binary + sources = self.get("sources") + if sources: + scmd = self.simulation.upload_extra_sources(sources = sources) + if scmd: + command.append(scmd) + + # Upload instructions to build the binary + build = self.get("build") + if build: + bcmd = self.simulation.build(build = build) + if bcmd: + command.append(bcmd) + + if command: + deploy_command = ";".join(command) + prefix = "%d_deploy" % self.guid + self.simulation.execute_deploy_command(deploy_command, prefix=prefix) +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/linux/ns3/ns3pingdceapplication.html b/doc/sphinx/_build/html/_modules/nepi/resources/linux/ns3/ns3pingdceapplication.html new file mode 100644 index 00000000..d4d6d766 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/linux/ns3/ns3pingdceapplication.html @@ -0,0 +1,345 @@ + + + + + + + + nepi.resources.linux.ns3.ns3pingdceapplication — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.linux.ns3.ns3pingdceapplication

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.resource import clsinit_copy, ResourceState
+from nepi.resources.linux.ns3.ns3dceapplication import LinuxNS3DceApplication
+
+@clsinit_copy
+
[docs]class LinuxDcePing(LinuxNS3DceApplication): + _rtype = "linux::ns3::dce::Ping" + + @classmethod + def _register_attributes(cls): + count = Attribute("count", + "Sets ping -c option. Determines the number of ECHO_REQUEST " + "packates to send before stopping.", + type = Types.Integer, + flags = Flags.Design) + + mark = Attribute("mark", + "Sets ping -m option. Uses 'mark' to tag outgoing packets. ", + flags = Flags.Design) + + interval = Attribute("interval", + "Sets ping -i option. Leaves interval seconds between " + "successive ECHO_REUQEST packets. ", + flags = Flags.Design) + + address = Attribute("address", + "Sets ping -I option. Sets ECHO_REQUEST packets souce address " + "to the specified interface address ", + flags = Flags.Design) + + preload = Attribute("preload", + "Sets ping -l option. Sends preload amount of packets " + "without waiting for a reply ", + flags = Flags.Design) + + numeric = Attribute("numeric", + "Sets ping -n option. Disables resolution of host addresses into " + "symbolic names. ", + type = Types.Bool, + default = False, + flags = Flags.Design) + + pattern = Attribute("pattern", + "Sets ping -p option. Species a up to 16 ''pad'' bytes to fill " + "out sent packets. ", + flags = Flags.Design) + + printtmp = Attribute("printTimestamp", + "Sets ping -D option. Prints timestamp befor each line as: " + "unix time + microseconds as in gettimeofday ", + type = Types.Bool, + default = False, + flags = Flags.Design) + + tos = Attribute("tos", + "Sets ping -Q option. Sets Quality of Service related bits in ICMP " + "datagrams. tos can be either a decimal or hexadecime number ", + flags = Flags.Design) + + quiet = Attribute("quiet", + "Sets ping -q option. Disables ping standard output ", + type = Types.Bool, + default = False, + flags = Flags.Design) + + rec_route = Attribute("recordRoute", + "Sets ping -R option. Includes the RECORD_ROUTE option in the " + "ECHO REQUEST packet and displays route buffer on the Disables " + "ping standard output.", + type = Types.Bool, + default = False, + flags = Flags.Design) + + route_bypass = Attribute("routeBypass", + "Sets ping -r option. Bypasses normal routing tables and sends " + "ECHO REQUEST packets directly yo a host on an attached interface. ", + type = Types.Bool, + default = False, + flags = Flags.Design) + + packetsize = Attribute("packetSize", + "Sets ping -s option. Specifies the number of data bytes to be " + "sent. Defaults to 56. ", + flags = Flags.Design) + + sendbuff = Attribute("sendBuff", + "Sets ping -S option. Specifies the number of packets to buffer. " + "Defaults to one. ", + flags = Flags.Design) + + ttl = Attribute("ttl", + "Sets ping -t option. Specifies the IP Time to Live for the " + "packets. ", + flags = Flags.Design) + + timestamp = Attribute("timestamp", + "Sets ping -T option. Sets special IP timestamp options. ", + flags = Flags.Design) + + hint = Attribute("hint", + "Sets ping -M option. Selects Path MTU Discovery strategy. ", + flags = Flags.Design) + + full_latency = Attribute("fullLatency", + "Sets ping -U option. Calculates round trip time taking into " + "account the full user-to-user latency instead of only the " + "network round trip time. ", + type = Types.Bool, + default = False, + flags = Flags.Design) + + verbose = Attribute("verbose", + "Sets ping -v option. Verbose output. ", + type = Types.Bool, + default = False, + flags = Flags.Design) + + flood = Attribute("flood", + "Sets ping -f option. Flood ping. ", + type = Types.Bool, + default = False, + flags = Flags.Design) + + deadline = Attribute("deadline", + "Sets ping -w option. Specify a timeout, in seconds, before ping " + "exits regardless of how many packets have been sent or received.", + flags = Flags.Design) + + timeout = Attribute("timeout", + "Sets ping -W option. Time to wait for a respone in seconds .", + flags = Flags.Design) + + target = Attribute("target", + "The host to ping .", + flags = Flags.Design) + + cls._register_attribute(count) + cls._register_attribute(mark) + cls._register_attribute(interval) + cls._register_attribute(address) + cls._register_attribute(preload) + cls._register_attribute(numeric) + cls._register_attribute(pattern) + cls._register_attribute(printtmp) + cls._register_attribute(tos) + cls._register_attribute(quiet) + cls._register_attribute(rec_route) + cls._register_attribute(route_bypass) + cls._register_attribute(packetsize) + cls._register_attribute(sendbuff) + cls._register_attribute(ttl) + cls._register_attribute(timestamp) + cls._register_attribute(hint) + cls._register_attribute(full_latency) + cls._register_attribute(verbose) + cls._register_attribute(flood) + cls._register_attribute(deadline) + cls._register_attribute(timeout) + cls._register_attribute(target) + + def _instantiate_object(self): + self.set("sources", self._sources) + self.set("build", self._build) + self.set("binary", "ping") + self.set("arguments", self._arguments) + + super(LinuxDcePing, self)._instantiate_object() + + @property + def _sources(self): + return "http://www.skbuff.net/iputils/iputils-s20101006.tar.bz2" + + @property + def _build(self): + return (" ( " + " test -f ${BIN_DCE}/ping && " + " echo 'binaries found, nothing to do' " + " ) || ( " + "tar xvjf ${SRC}/iputils-s20101006.tar.bz2 && " + "cd iputils-s20101006/ && " + "sed -i 's/CFLAGS=/CFLAGS+=/g' Makefile && " + "make CFLAGS=-fPIC LDFLAGS='-pie -rdynamic' ping && " + "cp ping ${BIN_DCE} && cd - " + " )" + ) + + @property + def _arguments(self): + args = [] + + if self.get("count"): + args.append("-c %s" % self.get("count")) + if self.get("mark"): + args.append("-m %s" % self.get("mark")) + if self.get("interval"): + args.append("-i %s" % self.get("interval")) + if self.get("address"): + args.append("-I %s" % self.get("address")) + if self.get("preload"): + args.append("-l %s" % self.get("preload")) + if self.get("numeric") == True: + args.append("-n") + if self.get("pattern"): + args.append("-p %s" % self.get("pattern")) + if self.get("tos"): + args.append("-Q %s" % self.get("tos")) + if self.get("quiet"): + args.append("-q %s" % self.get("quiet")) + if self.get("recordRoute") == True: + args.append("-R") + if self.get("routeBypass") == True: + args.append("-r") + if self.get("packetSize"): + args.append("-s %s" % self.get("packetSize")) + if self.get("sendBuff"): + args.append("-S %s" % self.get("sendBuff")) + if self.get("ttl"): + args.append("-t %s" % self.get("ttl")) + if self.get("timestamp"): + args.append("-T %s" % self.get("timestamp")) + if self.get("hint"): + args.append("-M %s" % self.get("hint")) + if self.get("fullLatency") == True: + args.append("-U") + if self.get("verbose") == True: + args.append("-v") + if self.get("flood") == True: + args.append("-f") + if self.get("deadline"): + args.append("-w %s" % self.get("deadline")) + if self.get("timeout"): + args.append("-W %s" % self.get("timeout")) + args.append(self.get("target")) + + return ";".join(args) +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/linux/ns3/ns3simulation.html b/doc/sphinx/_build/html/_modules/nepi/resources/linux/ns3/ns3simulation.html new file mode 100644 index 00000000..a7ecfa5c --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/linux/ns3/ns3simulation.html @@ -0,0 +1,827 @@ + + + + + + + + nepi.resources.linux.ns3.ns3simulation — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.linux.ns3.ns3simulation

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState, ResourceFactory
+from nepi.resources.linux.application import LinuxApplication
+from nepi.util.timefuncs import tnow, tdiffsec
+from nepi.resources.ns3.ns3simulation import NS3Simulation
+from nepi.resources.ns3.ns3wrapper import SIMULATOR_UUID, GLOBAL_VALUE_UUID, \
+        IPV4_GLOBAL_ROUTING_HELPER_UUID
+from nepi.resources.linux.ns3.ns3client import LinuxNS3Client
+
+import os
+import time
+import threading
+
+@clsinit_copy
+
[docs]class LinuxNS3Simulation(LinuxApplication, NS3Simulation): + _rtype = "linux::ns3::Simulation" + + @classmethod + def _register_attributes(cls): + impl_type = Attribute("simulatorImplementationType", + "The object class to use as the simulator implementation", + allowed = ["ns3::DefaultSimulatorImpl", "ns3::RealtimeSimulatorImpl"], + default = "ns3::DefaultSimulatorImpl", + type = Types.Enumerate, + flags = Flags.Design) + + sched_type = Attribute("schedulerType", + "The object class to use as the scheduler implementation", + allowed = ["ns3::MapScheduler", + "ns3::ListScheduler", + "ns3::HeapScheduler", + "ns3::MapScheduler", + "ns3::CalendarScheduler" + ], + default = "ns3::MapScheduler", + type = Types.Enumerate, + flags = Flags.Design) + + check_sum = Attribute("checksumEnabled", + "A global switch to enable all checksums for all protocols", + default = False, + type = Types.Bool, + flags = Flags.Design) + + ns_log = Attribute("nsLog", + "NS_LOG environment variable. " \ + " Will only generate output if ns-3 is compiled in DEBUG mode. ", + flags = Flags.Design) + + verbose = Attribute("verbose", + "True to output debugging info from the ns3 client-server communication", + type = Types.Bool, + flags = Flags.Design) + + enable_dump = Attribute("enableDump", + "Enable dumping the remote executed ns-3 commands to a script " + "in order to later reproduce and debug the experiment", + type = Types.Bool, + default = False, + flags = Flags.Design) + + build_mode = Attribute("buildMode", + "Mode used to build ns-3 with waf. One if: debug, release, oprimized ", + default = "optimized", + allowed = ["debug", "release", "optimized"], + type = Types.Enumerate, + flags = Flags.Design) + + ns3_version = Attribute("ns3Version", + "Version of ns-3 to install from nsam repo", + default = "ns-3.20", + #default = "ns-3-dev", + flags = Flags.Design) + + pybindgen_version = Attribute("pybindgenVersion", + "Version of pybindgen to install from bazar repo", + default = "868", + #default = "876", + flags = Flags.Design) + + dce_version = Attribute("dceVersion", + "Version of dce to install from nsam repo (tag branch for repo)", + #default = "dce-1.3", + default = "dce-dev", + flags = Flags.Design) + + populate_routing_tables = Attribute("populateRoutingTables", + "Invokes Ipv4GlobalRoutingHelper.PopulateRoutingTables() ", + default = False, + type = Types.Bool, + flags = Flags.Design) + + stoptime = Attribute("StopTime", + "Time at which the simulation will stop", + flags = Flags.Design) + + cls._register_attribute(impl_type) + cls._register_attribute(sched_type) + cls._register_attribute(check_sum) + cls._register_attribute(ns_log) + cls._register_attribute(enable_dump) + cls._register_attribute(verbose) + cls._register_attribute(build_mode) + cls._register_attribute(ns3_version) + cls._register_attribute(pybindgen_version) + cls._register_attribute(dce_version) + cls._register_attribute(populate_routing_tables) + cls._register_attribute(stoptime) + + def __init__(self, ec, guid): + LinuxApplication.__init__(self, ec, guid) + NS3Simulation.__init__(self) + + self._client = None + self._home = "ns3-simu-%s" % self.guid + self._socket_name = "ns3-%s.sock" % os.urandom(4).encode('hex') + self._enable_dce = None + self._dce_helper = None + + @property +
[docs] def socket_name(self): + return self._socket_name +
+ @property +
[docs] def remote_socket(self): + return os.path.join(self.run_home, self.socket_name) +
+
[docs] def trace(self, name, attr = TraceAttr.ALL, block = 512, offset = 0): + # stout needs to get flushed on the ns-3 server side, else we will + # get an empty stream. We try twice to retrieve the stream + # if we get empty stdout since the stream might not be + # flushed immediately. + if name.endswith("stdout"): + self._client.flush() + result = LinuxApplication.trace(self, name, attr, block, offset) + if result: + return result + # Let the stream be flushed + time.sleep(1) + + return LinuxApplication.trace(self, name, attr, block, offset) +
+
[docs] def upload_sources(self): + self.node.mkdir(os.path.join(self.node.src_dir, "ns3wrapper")) + + # upload ns3 wrapper python script + ns3_wrapper = os.path.join(os.path.dirname(__file__), "..", "..", "ns3", + "ns3wrapper.py") + + self.node.upload(ns3_wrapper, + os.path.join(self.node.src_dir, "ns3wrapper", "ns3wrapper.py"), + overwrite = False) + + # upload ns3 wrapper debug python script + ns3_wrapper_debug = os.path.join(os.path.dirname(__file__), "..", "..", "ns3", + "ns3wrapper_debug.py") + + self.node.upload(ns3_wrapper_debug, + os.path.join(self.node.src_dir, "ns3wrapper", "ns3wrapper_debug.py"), + overwrite = False) + + # upload ns3_server python script + ns3_server = os.path.join(os.path.dirname(__file__), "..", "..", "ns3", + "ns3server.py") + + self.node.upload(ns3_server, + os.path.join(self.node.src_dir, "ns3wrapper", "ns3server.py"), + overwrite = False) + + if self.node.use_rpm: + # upload pygccxml sources + pygccxml_tar = os.path.join(os.path.dirname(__file__), "dependencies", + "%s.tar.gz" % self.pygccxml_version) + + self.node.upload(pygccxml_tar, + os.path.join(self.node.src_dir, "%s.tar.gz" % self.pygccxml_version), + overwrite = False) + + # Upload user defined ns-3 sources + self.node.mkdir(os.path.join(self.node.src_dir, "ns-3")) + src_dir = os.path.join(self.node.src_dir, "ns-3") + + super(LinuxNS3Simulation, self).upload_sources(src_dir = src_dir) +
+
[docs] def upload_extra_sources(self, sources = None, src_dir = None): + return super(LinuxNS3Simulation, self).upload_sources( + sources = sources, + src_dir = src_dir) +
+
[docs] def upload_start_command(self): + command = self.get("command") + env = self.get("env") + + # We want to make sure the ccnd is running + # before the experiment starts. + # Run the command as a bash script in background, + # in the host ( but wait until the command has + # finished to continue ) + env = self.replace_paths(env) + command = self.replace_paths(command) + + shfile = os.path.join(self.app_home, "start.sh") + self.node.upload_command(command, + shfile = shfile, + env = env, + overwrite = True) + + # Run the ns3wrapper + self._run_in_background() + + # Wait until the remote socket is created + self.wait_remote_socket() +
+
[docs] def configure(self): + if self.has_changed("simulatorImplementationType"): + simu_type = self.get("simulatorImplementationType") + stype = self.create("StringValue", simu_type) + self.invoke(GLOBAL_VALUE_UUID, "Bind", "SimulatorImplementationType", stype) + + if self.has_changed("checksumEnabled"): + check_sum = self.get("checksumEnabled") + btrue = self.create("BooleanValue", check_sum) + self.invoke(GLOBAL_VALUE_UUID, "Bind", "ChecksumEnabled", btrue) + + if self.has_changed("schedulerType"): + sched_type = self.get("schedulerType") + stype = self.create("StringValue", sched_type) + self.invoke(GLOBAL_VALUE_UUID, "Bind", "SchedulerType", btrue) +
+
[docs] def do_deploy(self): + if not self.node or self.node.state < ResourceState.READY: + self.debug("---- RESCHEDULING DEPLOY ---- node state %s " % self.node.state ) + + # ccnd needs to wait until node is deployed and running + self.ec.schedule(self.reschedule_delay, self.deploy) + else: + if not self.get("command"): + self.set("command", self._start_command) + + if not self.get("depends"): + self.set("depends", self._dependencies) + + if self.get("sources"): + sources = self.get("sources") + source = sources.split(" ")[0] + basename = os.path.basename(source) + version = ( basename.strip().replace(".tar.gz", "") + .replace(".tar","") + .replace(".gz","") + .replace(".zip","") ) + + self.set("ns3Version", version) + self.set("sources", source) + + if not self.get("build"): + self.set("build", self._build) + + if not self.get("install"): + self.set("install", self._install) + + if not self.get("env"): + self.set("env", self._environment) + + self.do_discover() + self.do_provision() + + # Create client + self._client = LinuxNS3Client(self) + + self.configure() + + self.set_ready() +
+
[docs] def do_start(self): + """ Starts simulation execution + + """ + self.info("Starting") + + if self.state == ResourceState.READY: + if self.get("populateRoutingTables") == True: + self.invoke(IPV4_GLOBAL_ROUTING_HELPER_UUID, "PopulateRoutingTables") + + time = self.get("StopTime") + if time: + self._client.stop(time=time) + + self._client.start() + + self.set_started() + else: + msg = " Failed to execute command '%s'" % command + self.error(msg, out, err) + raise RuntimeError, msg +
+
[docs] def do_stop(self): + """ Stops simulation execution + + """ + if self.state == ResourceState.STARTED: + if not self.get("StopTime"): + self._client.stop() + self.set_stopped() +
+
[docs] def do_release(self): + self.info("Releasing resource") + + tear_down = self.get("tearDown") + if tear_down: + self.node.execute(tear_down) + + self.do_stop() + self._client.shutdown() + LinuxApplication.do_stop(self) + + super(LinuxApplication, self).do_release() +
+ @property +
[docs] def state(self): + super(LinuxApplication, self).state + + if self._state == ResourceState.STARTED: + try: + is_finished = self.invoke(SIMULATOR_UUID, "isFinished") + + if is_finished: + self.set_stopped() + except: + msg = "Simulator failed. Can not retrieve state" + out = "" + + import traceback + err = traceback.format_exc() + self.error(msg, out, err) + self.do_fail() + + return self._state +
+ @property +
[docs] def enable_dce(self): + if self._enable_dce is None: + from nepi.resources.ns3.ns3dceapplication import NS3BaseDceApplication + rclass = ResourceFactory.get_resource_type( + NS3BaseDceApplication.get_rtype()) + + self._enable_dce = False + for guid in self.ec.resources: + rm = self.ec.get_resource(guid) + if isinstance(rm, rclass): + self._enable_dce = True + + from nepi.resources.ns3.ns3dcehelper import NS3DceHelper + self._dce_helper = NS3DceHelper(self) + break + + return self._enable_dce +
+ @property +
[docs] def dce_helper(self): + return self._dce_helper +
+ @property + def _start_command(self): + command = [] + + command.append("PYTHONPATH=$PYTHONPATH:${SRC}/ns3wrapper/") + + command.append("python ${SRC}/ns3wrapper/ns3server.py -S %s" % \ + os.path.basename(self.remote_socket) ) + + ns_log = self.get("nsLog") + if ns_log: + command.append("-L '%s'" % ns_log) + + if self.get("enableDump"): + command.append("-D") + + if self.get("verbose"): + command.append("-v") + + command = " ".join(command) + return command + + @property + def _dependencies(self): + if self.node.use_rpm: + return ( " gcc gcc-c++ python python-devel mercurial bzr tcpdump socat gccxml unzip") + elif self.node.use_deb: + return ( " gcc g++ python python-dev mercurial bzr tcpdump socat gccxml python-pygccxml unzip") + return "" + + @property +
[docs] def ns3_repo(self): + return "http://code.nsnam.org" +
+ @property +
[docs] def pygccxml_version(self): + return "pygccxml-1.0.0" +
+ @property +
[docs] def dce_repo(self): + return "http://code.nsnam.org/ns-3-dce" + #eturn "http://code.nsnam.org/epmancini/ns-3-dce" +
+ @property +
[docs] def dce_version(self): + dce_version = self.get("dceVersion") + return dce_version or "dce-dev" +
+ @property +
[docs] def ns3_build_location(self): + location = "${BIN}/ns-3/%(ns3_version)s%(dce_version)s/%(build_mode)s/build" \ + % { + "ns3_version": self.get("ns3Version"), + "dce_version": "-%s" % self.get("dceVersion") \ + if self.enable_dce else "", + "build_mode": self.get("buildMode"), + } + + return location + +
+ @property +
[docs] def ns3_src_location(self): + location = "${SRC}/ns-3/%(ns3_version)s" \ + % { + "ns3_version": self.get("ns3Version"), + } + + return location +
+ @property +
[docs] def dce_src_location(self): + location = "${SRC}/ns-3-dce/%(dce_version)s" \ + % { + "dce_version": self.get("dceVersion"), + } + + return location +
+ @property + def _clone_ns3_command(self): + source = self.get("sources") + + if not source: + clone_ns3_cmd = "hg clone %(ns3_repo)s/%(ns3_version)s %(ns3_src)s" \ + % { + "ns3_version": self.get("ns3Version"), + "ns3_repo": self.ns3_repo, + "ns3_src": self.ns3_src_location, + } + else: + if source.find(".tar.gz") > -1: + clone_ns3_cmd = ( + "tar xzf ${SRC}/ns-3/%(basename)s " + " --strip-components=1 -C %(ns3_src)s" + ) % { + "basename": os.path.basename(source), + "ns3_src": self.ns3_src_location, + } + elif source.find(".tar") > -1: + clone_ns3_cmd = ( + "tar xf ${SRC}/ns-3/%(basename)s " + " --strip-components=1 -C %(ns3_src)s" + ) % { + "basename": os.path.basename(source), + "ns3_src": self.ns3_src_location, + } + elif source.find(".zip") > -1: + basename = os.path.basename(source) + bare_basename = basename.replace(".zip", "") + + clone_ns3_cmd = ( + "unzip ${SRC}/ns-3/%(basename)s && " + "mv ${SRC}/ns-3/%(bare_basename)s %(ns3_src)s" + ) % { + "bare_basename": basename_name, + "basename": basename, + "ns3_src": self.ns3_src_location, + } + + return clone_ns3_cmd + + @property + def _clone_dce_command(self): + clone_dce_cmd = " echo 'DCE will not be built' " + + if self.enable_dce: + dce_version = self.dce_version + dce_tag = "" + if dce_version != "dce-dev": + dce_tag = "-r %s" % dce_version + + clone_dce_cmd = ( + # DCE installation + # Test if dce is alredy cloned + " ( " + " ( " + " ( test -d %(dce_src)s ) " + " && echo 'dce binaries found, nothing to do'" + " ) " + " ) " + " || " + # Get dce source code + " ( " + " mkdir -p %(dce_src)s && " + " hg clone %(dce_repo)s %(dce_tag)s %(dce_src)s" + " ) " + ) % { + "dce_repo": self.dce_repo, + "dce_tag": dce_tag, + "dce_src": self.dce_src_location, + } + + return clone_dce_cmd + + @property + def _build(self): + # If the user defined local sources for ns-3, we uncompress the sources + # on the remote sources directory. Else we clone ns-3 from the official repo. + clone_ns3_cmd = self._clone_ns3_command + clone_dce_cmd = self._clone_dce_command + + ns3_build_cmd = ( + # NS3 installation + "( " + " ( " + # Test if ns-3 is alredy cloned + " ((( test -d %(ns3_src)s ) || " + " ( test -d ${NS3BINDINGS:='None'} && test -d ${NS3LIBRARIES:='None'})) " + " && echo 'ns-3 binaries found, nothing to do' )" + " ) " + " || " + # If not, install ns-3 and its dependencies + " ( " + # Install pygccxml + " ( " + " ( " + " python -c 'import pygccxml' && " + " echo 'pygccxml not found' " + " ) " + " || " + " ( " + " tar xf ${SRC}/%(pygccxml_version)s.tar.gz -C ${SRC} && " + " cd ${SRC}/%(pygccxml_version)s && " + " python setup.py build && " + " sudo -S python setup.py install " + " ) " + " ) " + # Install pybindgen + " && " + " ( " + " ( " + " test -d ${SRC}/pybindgen/%(pybindgen_version)s && " + " echo 'binaries found, nothing to do' " + " ) " + " || " + # If not, clone and build + " ( cd ${SRC} && " + " mkdir -p ${SRC}/pybindgen && " + " bzr checkout lp:pybindgen -r %(pybindgen_version)s ${SRC}/pybindgen/%(pybindgen_version)s && " + " cd ${SRC}/pybindgen/%(pybindgen_version)s && " + " ./waf configure && " + " ./waf " + " ) " + " ) " + " && " + # Get ns-3 source code + " ( " + " mkdir -p %(ns3_src)s && " + " %(clone_ns3_cmd)s " + " ) " + " ) " + ") " + " && " + "( " + " %(clone_dce_cmd)s " + ") " + ) % { + "ns3_src": self.ns3_src_location, + "pybindgen_version": self.get("pybindgenVersion"), + "pygccxml_version": self.pygccxml_version, + "clone_ns3_cmd": clone_ns3_cmd, + "clone_dce_cmd": clone_dce_cmd, + } + + return ns3_build_cmd + + @property + def _install_dce_command(self): + install_dce_cmd = " echo 'DCE will not be installed'" + + if self.enable_dce: + install_dce_cmd = ( + " ( " + " ((test -d %(ns3_build)s/bin_dce ) && " + " echo 'dce binaries found, nothing to do' )" + " ) " + " ||" + " ( " + # If not, copy build to dce + " cd %(dce_src)s && " + " rm -rf %(dce_src)s/build && " + " ./waf configure %(enable_opt)s --with-pybindgen=${SRC}/pybindgen/%(pybindgen_version)s " + " --prefix=%(ns3_build)s --with-ns3=%(ns3_build)s && " + " ./waf build && " + " ./waf install && " + " [ ! -e %(ns3_build)s/lib/python/site-packages/ns/dce.so ] && " + " mv %(ns3_build)s/lib*/python*/site-packages/ns/dce.so %(ns3_build)s/lib/python/site-packages/ns/ " + " )" + ) % { + "pybindgen_version": self.get("pybindgenVersion"), + "enable_opt": "--enable-opt" if self.get("buildMode") == "optimized" else "", + "ns3_build": self.ns3_build_location, + "dce_src": self.dce_src_location, + } + + return install_dce_cmd + + @property + def _install(self): + install_dce_cmd = self._install_dce_command + + install_ns3_cmd = ( + # Test if ns-3 is alredy installed + "(" + " ( " + " ( ( (test -d %(ns3_build)s/lib ) || " + " (test -d ${NS3BINDINGS:='None'} && test -d ${NS3LIBRARIES:='None'}) ) && " + " echo 'binaries found, nothing to do' )" + " ) " + " ||" + " ( " + # If not, copy ns-3 build to bin + " mkdir -p %(ns3_build)s && " + " cd %(ns3_src)s && " + " rm -rf %(ns3_src)s/build && " + " ./waf configure -d %(build_mode)s --with-pybindgen=${SRC}/pybindgen/%(pybindgen_version)s " + " --prefix=%(ns3_build)s && " + " ./waf build && " + " ./waf install && " + " mv %(ns3_build)s/lib*/python* %(ns3_build)s/lib/python " + " )" + ") " + " && " + "( " + " %(install_dce_cmd)s " + ") " + ) % { + "pybindgen_version": self.get("pybindgenVersion"), + "build_mode": self.get("buildMode"), + "install_dce_cmd": install_dce_cmd, + "ns3_build": self.ns3_build_location, + "ns3_src": self.ns3_src_location, + } + + return install_ns3_cmd + + @property + def _environment(self): + env = [] + env.append("PYTHONPATH=$PYTHONPATH:${NS3BINDINGS:=%(ns3_build)s/lib/python/site-packages}" % { + "ns3_build": self.ns3_build_location + }) + # If NS3LIBRARIES is defined and not empty, assign its value, + # if not assign ns3_build_home/lib/ to NS3LIBRARIES and LD_LIBARY_PATH + env.append("LD_LIBRARY_PATH=${NS3LIBRARIES:=%(ns3_build)s/lib}" % { + "ns3_build": self.ns3_build_location + }) + env.append("DCE_PATH=$NS3LIBRARIES/../bin_dce") + env.append("DCE_ROOT=$NS3LIBRARIES/..") + + return " ".join(env) + +
[docs] def replace_paths(self, command): + """ + Replace all special path tags with shell-escaped actual paths. + """ + return ( command + .replace("${USR}", self.node.usr_dir) + .replace("${LIB}", self.node.lib_dir) + .replace("${BIN}", self.node.bin_dir) + .replace("${SRC}", self.node.src_dir) + .replace("${SHARE}", self.node.share_dir) + .replace("${EXP}", self.node.exp_dir) + .replace("${EXP_HOME}", self.node.exp_home) + .replace("${APP_HOME}", self.app_home) + .replace("${RUN_HOME}", self.run_home) + .replace("${NODE_HOME}", self.node.node_home) + .replace("${HOME}", self.node.home_dir) + # If NS3LIBRARIES is defined and not empty, use that value, + # if not use ns3_build_home/lib/ + .replace("${BIN_DCE}", "${NS3LIBRARIES-%s/lib}/../bin_dce" % \ + self.ns3_build_location) + ) +
+
[docs] def valid_connection(self, guid): + # TODO: Validate! + return True +
+
[docs] def wait_remote_socket(self): + """ Waits until the remote socket is created + """ + command = " [ -e %s ] && echo 'DONE' " % self.remote_socket + + for i in xrange(200): + (out, err), proc = self.node.execute(command, retry = 1, + with_lock = True) + + if out.find("DONE") > -1: + break + else: + raise RuntimeError("Remote socket not found at %s" % \ + self.remote_socket) + +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/linux/ns3/tuntapfdlink.html b/doc/sphinx/_build/html/_modules/nepi/resources/linux/ns3/tuntapfdlink.html new file mode 100644 index 00000000..7ca4fe91 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/linux/ns3/tuntapfdlink.html @@ -0,0 +1,251 @@ + + + + + + + + nepi.resources.linux.ns3.tuntapfdlink — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.linux.ns3.tuntapfdlink

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+from nepi.execution.resource import ResourceState, clsinit_copy
+from nepi.resources.linux.application import LinuxApplication
+
+import base64
+import fcntl
+import os
+import socket
+import struct
+
+@clsinit_copy
+
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/linux/ping.html b/doc/sphinx/_build/html/_modules/nepi/resources/linux/ping.html new file mode 100644 index 00000000..e019c1eb --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/linux/ping.html @@ -0,0 +1,372 @@ + + + + + + + + nepi.resources.linux.ping — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.linux.ping

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.resource import clsinit_copy, ResourceState 
+from nepi.resources.linux.application import LinuxApplication
+from nepi.util.timefuncs import tnow
+
+import os
+
+@clsinit_copy
+
[docs]class LinuxPing(LinuxApplication): + _rtype = "linux::Ping" + + @classmethod + def _register_attributes(cls): + count = Attribute("count", + "Sets ping -c option. Determines the number of ECHO_REQUEST " + "packates to send before stopping.", + type = Types.Integer, + flags = Flags.Design) + + mark = Attribute("mark", + "Sets ping -m option. Uses 'mark' to tag outgoing packets. ", + flags = Flags.Design) + + interval = Attribute("interval", + "Sets ping -i option. Leaves interval seconds between " + "successive ECHO_REUQEST packets. ", + flags = Flags.Design) + + address = Attribute("address", + "Sets ping -I option. Sets ECHO_REQUEST packets souce address " + "to the specified interface address ", + flags = Flags.Design) + + preload = Attribute("preload", + "Sets ping -l option. Sends preload amount of packets " + "without waiting for a reply ", + flags = Flags.Design) + + numeric = Attribute("numeric", + "Sets ping -n option. Disables resolution of host addresses into " + "symbolic names. ", + type = Types.Bool, + default = False, + flags = Flags.Design) + + pattern = Attribute("pattern", + "Sets ping -p option. Species a up to 16 ''pad'' bytes to fill " + "out sent packets. ", + flags = Flags.Design) + + printtmp = Attribute("printTimestamp", + "Sets ping -D option. Prints timestamp befor each line as: " + "unix time + microseconds as in gettimeofday ", + type = Types.Bool, + default = False, + flags = Flags.Design) + + tos = Attribute("tos", + "Sets ping -Q option. Sets Quality of Service related bits in ICMP " + "datagrams. tos can be either a decimal or hexadecime number ", + flags = Flags.Design) + + quiet = Attribute("quiet", + "Sets ping -q option. Disables ping standard output ", + type = Types.Bool, + default = False, + flags = Flags.Design) + + rec_route = Attribute("recordRoute", + "Sets ping -R option. Includes the RECORD_ROUTE option in the " + "ECHO REQUEST packet and displays route buffer on the Disables " + "ping standard output.", + type = Types.Bool, + default = False, + flags = Flags.Design) + + route_bypass = Attribute("routeBypass", + "Sets ping -r option. Bypasses normal routing tables and sends " + "ECHO REQUEST packets directly yo a host on an attached interface. ", + type = Types.Bool, + default = False, + flags = Flags.Design) + + packetsize = Attribute("packetSize", + "Sets ping -s option. Specifies the number of data bytes to be " + "sent. Defaults to 56. ", + flags = Flags.Design) + + sendbuff = Attribute("sendBuff", + "Sets ping -S option. Specifies the number of packets to buffer. " + "Defaults to one. ", + flags = Flags.Design) + + ttl = Attribute("ttl", + "Sets ping -t option. Specifies the IP Time to Live for the " + "packets. ", + flags = Flags.Design) + + timestamp = Attribute("timestamp", + "Sets ping -T option. Sets special IP timestamp options. ", + flags = Flags.Design) + + hint = Attribute("hint", + "Sets ping -M option. Selects Path MTU Discovery strategy. ", + flags = Flags.Design) + + full_latency = Attribute("fullLatency", + "Sets ping -U option. Calculates round trip time taking into " + "account the full user-to-user latency instead of only the " + "network round trip time. ", + type = Types.Bool, + default = False, + flags = Flags.Design) + + verbose = Attribute("verbose", + "Sets ping -v option. Verbose output. ", + type = Types.Bool, + default = False, + flags = Flags.Design) + + flood = Attribute("flood", + "Sets ping -f option. Flood ping. ", + type = Types.Bool, + default = False, + flags = Flags.Design) + + deadline = Attribute("deadline", + "Sets ping -w option. Specify a timeout, in seconds, before ping " + "exits regardless of how many packets have been sent or received.", + flags = Flags.Design) + + timeout = Attribute("timeout", + "Sets ping -W option. Time to wait for a respone in seconds .", + flags = Flags.Design) + + target = Attribute("target", + "The host to ping .", + flags = Flags.Design) + + early_start = Attribute("earlyStart", + "Start ping as early as deployment. ", + type = Types.Bool, + default = False, + flags = Flags.Design) + + cls._register_attribute(count) + cls._register_attribute(mark) + cls._register_attribute(interval) + cls._register_attribute(address) + cls._register_attribute(preload) + cls._register_attribute(numeric) + cls._register_attribute(pattern) + cls._register_attribute(printtmp) + cls._register_attribute(tos) + cls._register_attribute(quiet) + cls._register_attribute(rec_route) + cls._register_attribute(route_bypass) + cls._register_attribute(packetsize) + cls._register_attribute(sendbuff) + cls._register_attribute(ttl) + cls._register_attribute(timestamp) + cls._register_attribute(hint) + cls._register_attribute(full_latency) + cls._register_attribute(verbose) + cls._register_attribute(flood) + cls._register_attribute(deadline) + cls._register_attribute(timeout) + cls._register_attribute(target) + cls._register_attribute(early_start) + + def __init__(self, ec, guid): + super(LinuxPing, self).__init__(ec, guid) + self._home = "ping-%s" % self.guid + +
[docs] def upload_start_command(self): + super(LinuxPing, self).upload_start_command() + + if self.get("earlyStart") == True: + self._run_in_background() +
+
[docs] def do_deploy(self): + if not self.get("command"): + self.set("command", self._start_command) + + super(LinuxPing, self).do_deploy() +
+
[docs] def do_start(self): + if self.get("earlyStart") == True: + if self.state == ResourceState.READY: + command = self.get("command") + self.info("Starting command '%s'" % command) + + self.set_started() + else: + msg = " Failed to execute command '%s'" % command + self.error(msg, out, err) + raise RuntimeError, msg + else: + super(LinuxPing, self).do_start() +
+ @property + def _start_command(self): + args = [] + + args.append("echo 'Starting PING to %s' ;" % self.get("target")) + + if self.get("printTimestamp") == True: + args.append("""echo "`date +'%Y%m%d%H%M%S'`";""") + + args.append("ping ") + + if self.get("count"): + args.append("-c %s" % self.get("count")) + if self.get("mark"): + args.append("-m %s" % self.get("mark")) + if self.get("interval"): + args.append("-i %s" % self.get("interval")) + if self.get("address"): + args.append("-I %s" % self.get("address")) + if self.get("preload"): + args.append("-l %s" % self.get("preload")) + if self.get("numeric") == True: + args.append("-n") + if self.get("pattern"): + args.append("-p %s" % self.get("pattern")) + if self.get("tos"): + args.append("-Q %s" % self.get("tos")) + if self.get("quiet"): + args.append("-q %s" % self.get("quiet")) + if self.get("recordRoute") == True: + args.append("-R") + if self.get("routeBypass") == True: + args.append("-r") + if self.get("packetSize"): + args.append("-s %s" % self.get("packetSize")) + if self.get("sendBuff"): + args.append("-S %s" % self.get("sendBuff")) + if self.get("ttl"): + args.append("-t %s" % self.get("ttl")) + if self.get("timestamp"): + args.append("-T %s" % self.get("timestamp")) + if self.get("hint"): + args.append("-M %s" % self.get("hint")) + if self.get("fullLatency") == True: + args.append("-U") + if self.get("verbose") == True: + args.append("-v") + if self.get("flood") == True: + args.append("-f") + if self.get("deadline"): + args.append("-w %s" % self.get("deadline")) + if self.get("timeout"): + args.append("-W %s" % self.get("timeout")) + args.append(self.get("target")) + + command = " ".join(args) + + return command + +
[docs] def valid_connection(self, guid): + # TODO: Validate! + return True +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/linux/route.html b/doc/sphinx/_build/html/_modules/nepi/resources/linux/route.html new file mode 100644 index 00000000..a55f75f9 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/linux/route.html @@ -0,0 +1,251 @@ + + + + + + + + nepi.resources.linux.route — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.linux.route

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.resource import clsinit_copy, ResourceState
+from nepi.resources.linux.application import LinuxApplication
+
+import os
+
+@clsinit_copy
+
[docs]class LinuxRoute(LinuxApplication): + _rtype = "linux::Route" + _help = "Adds a route to the host using iptools " + + @classmethod + def _register_attributes(cls): + network = Attribute("network", "Network address", flags=Flags.Design) + prefix = Attribute("prefix", "IP prefix length", flags=Flags.Design) + nexthop = Attribute("nexthop", "Nexthop IP", flags=Flags.Design) + + cls._register_attribute(network) + cls._register_attribute(prefix) + cls._register_attribute(nexthop) + + def __init__(self, ec, guid): + super(LinuxRoute, self).__init__(ec, guid) + self._home = "route-%s" % self.guid + self._device = None + + @property +
[docs] def device(self): + if not self._device: + from nepi.resources.linux.tap import LinuxTap + from nepi.resources.linux.tun import LinuxTun + from nepi.resources.linux.interface import LinuxInterface + tap = self.get_connected(LinuxTap.get_rtype()) + tun = self.get_connected(LinuxTun.get_rtype()) + interface = self.get_connected(LinuxInterface.get_rtype()) + if tap: self._device = tap[0] + elif tun: self._device = tun[0] + elif interface: self._device = interface[0] + else: + raise RuntimeError, "linux::Routes must be connected to a "\ + "linux::TAP, linux::TUN, or linux::Interface" + return self._device +
+ @property +
[docs] def node(self): + return self.device.node +
+
[docs] def upload_start_command(self): + # We want to make sure the route is configured + # before the deploy is over, so we execute the + # start script now and wait until it finishes. + command = self.get("command") + command = self.replace_paths(command) + + shfile = os.path.join(self.app_home, "start.sh") + self.node.run_and_wait(command, self.run_home, + shfile = shfile, + overwrite = True) +
+
[docs] def upload_sources(self): + # upload stop.sh script + stop_command = self.replace_paths(self._stop_command) + + self.node.upload(stop_command, + os.path.join(self.app_home, "stop.sh"), + text = True, + # Overwrite file every time. + # The stop.sh has the path to the socket, which should change + # on every experiment run. + overwrite = True) +
+
[docs] def do_deploy(self): + if not self.device or self.device.state < ResourceState.PROVISIONED: + self.ec.schedule(self.reschedule_delay, self.deploy) + else: + if not self.get("command"): + self.set("command", self._start_command) + + self.do_discover() + self.do_provision() + + self.set_ready() +
+
[docs] def do_start(self): + if self.state == ResourceState.READY: + command = self.get("command") + self.info("Starting command '%s'" % command) + + self.set_started() + else: + msg = " Failed to execute command '%s'" % command + self.error(msg, out, err) + raise RuntimeError, msg +
+
[docs] def do_stop(self): + command = self.get('command') or '' + + if self.state == ResourceState.STARTED: + self.info("Stopping command '%s'" % command) + + command = "bash %s" % os.path.join(self.app_home, "stop.sh") + (out, err), proc = self.execute_command(command, + blocking = True) + + if err: + msg = " Failed to stop command '%s' " % command + self.error(msg, out, err) + + self.set_stopped() +
+ @property + def _start_command(self): + network = self.get("network") + prefix = self.get("prefix") + nexthop = self.get("nexthop") + devicename = self.device.get("deviceName") + + command = [] + command.append("sudo -S ip route add %s/%s %s dev %s" % ( + self.get("network"), + self.get("prefix"), + "default" if not nexthop else "via %s" % nexthop, + devicename)) + + return " ".join(command) + + @property + def _stop_command(self): + network = self.get("network") + prefix = self.get("prefix") + nexthop = self.get("nexthop") + devicename = self.device.get("deviceName") + + command = [] + command.append("sudo -S ip route del %s/%s %s dev %s" % ( + self.get("network"), + self.get("prefix"), + "default" if not nexthop else "via %s" % nexthop, + devicename)) + + return " ".join(command) +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/linux/rpmfuncs.html b/doc/sphinx/_build/html/_modules/nepi/resources/linux/rpmfuncs.html new file mode 100644 index 00000000..4503d568 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/linux/rpmfuncs.html @@ -0,0 +1,161 @@ + + + + + + + + nepi.resources.linux.rpmfuncs — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.linux.rpmfuncs

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+RPM_FUSION_URL = 'http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm'
+RPM_FUSION_URL_F12 = 'http://download1.rpmfusion.org/free/fedora/releases/12/Everything/x86_64/os/rpmfusion-free-release-12-1.noarch.rpm'
+RPM_FUSION_URL_F14 = 'http://download1.rpmfusion.org/free/fedora/releases/14/Everything/x86_64/os/rpmfusion-free-release-14-0.4.noarch.rpm'
+
+
+# TODO: Investigate using http://nixos.org/nix/
+
+
[docs]def install_packages_command(os, packages): + if not isinstance(packages, list): + packages = [packages] + + cmd = install_rpmfusion_command(os) + if cmd: cmd += " ; " + cmd += " && ".join(map(lambda p: + " { rpm -q %(package)s || sudo -S yum -y install --nogpgcheck %(package)s ; } " % { + 'package': p}, packages)) + + #cmd = { rpm -q rpmfusion-free-release || sudo -s rpm -i ... ; } && { rpm -q vim || sudo yum -y install vim ; } && .. + return cmd +
+
[docs]def remove_packages_command(os, packages): + if not isinstance(packages, list): + packages = [packages] + + cmd = " && ".join(map(lambda p: + " { rpm -q %(package)s && sudo -S yum -y remove %(package)s ; } " % { + 'package': p}, packages)) + + #cmd = { rpm -q vim && sudo yum -y remove vim ; } && .. + return cmd +
+
[docs]def install_rpmfusion_command(os): + from nepi.resources.linux.node import OSType + + cmd = " { rpm -q rpmfusion-free-release || sudo -S rpm -i %(package)s ; } " + + if (os & OSType.FEDORA_8): + # RpmFusion for Fedora 8 is unmaintained + cmd = "" + elif (os & OSType.FEDORA_12): + # For f12 + cmd = cmd % {'package': RPM_FUSION_URL_F12} + elif (os & OSType.FEDORA_14): + # For f14 + cmd = cmd % {'package': RPM_FUSION_URL_F14} + else: + # For f14+ + cmd = cmd % {'package': RPM_FUSION_URL} + + return cmd +
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/linux/tap.html b/doc/sphinx/_build/html/_modules/nepi/resources/linux/tap.html new file mode 100644 index 00000000..a49c3306 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/linux/tap.html @@ -0,0 +1,710 @@ + + + + + + + + nepi.resources.linux.tap — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.linux.tap

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.resource import clsinit_copy, ResourceState
+from nepi.resources.linux.application import LinuxApplication
+from nepi.resources.linux.node import LinuxNode
+from nepi.util.timefuncs import tnow, tdiffsec
+
+import os
+import time
+
+PYTHON_VSYS_VERSION = "1.0"
+
+@clsinit_copy
+
[docs]class LinuxTap(LinuxApplication): + _rtype = "linux::Tap" + _help = "Creates a TAP device on a Linux host" + + IFF_TUN = 0x0001 + IFF_TAP = 0x0002 + + @classmethod + def _register_attributes(cls): + ip = Attribute("ip", "IPv4 Address", + flags = Flags.Design) + + mac = Attribute("mac", "MAC Address", + flags = Flags.Design) + + prefix = Attribute("prefix", "IPv4 network prefix", + flags = Flags.Design) + + mtu = Attribute("mtu", "Maximum transmition unit for device", + type = Types.Integer) + + devname = Attribute("deviceName", + "Name of the network interface (e.g. eth0, wlan0, etc)", + flags = Flags.NoWrite) + + up = Attribute("up", "Link up", default=True, + type = Types.Bool) + + pointopoint = Attribute("pointopoint", "Peer IP address", + flags = Flags.Design) + + txqueuelen = Attribute("txqueuelen", "Length of transmission queue", + flags = Flags.Design) + + txqueuelen = Attribute("txqueuelen", "Length of transmission queue", + flags = Flags.Design) + + gre_key = Attribute("greKey", + "GRE key to be used to configure GRE tunnel", + default = "1", + flags = Flags.Design) + + gre_remote = Attribute("greRemote", + "Public IP of remote endpoint for GRE tunnel", + flags = Flags.Design) + + pi = Attribute("pi", "Add PI (protocol information) header", + default = False, + type = Types.Bool) + + tear_down = Attribute("tearDown", + "Bash script to be executed before releasing the resource", + flags = Flags.Design) + + cls._register_attribute(ip) + cls._register_attribute(mac) + cls._register_attribute(prefix) + cls._register_attribute(mtu) + cls._register_attribute(devname) + cls._register_attribute(up) + cls._register_attribute(pointopoint) + cls._register_attribute(txqueuelen) + cls._register_attribute(gre_key) + cls._register_attribute(gre_remote) + cls._register_attribute(pi) + cls._register_attribute(tear_down) + + def __init__(self, ec, guid): + super(LinuxTap, self).__init__(ec, guid) + self._gre_enabled = None + self._vif_prefix = "tap" + self._vif_type = "IFF_TAP" + self._vif_type_flag = LinuxTap.IFF_TAP + self._home = "%s-%s" % (self.vif_prefix, self.guid) + + @property +
[docs] def node(self): + node = self.get_connected(LinuxNode.get_rtype()) + if node: return node[0] + raise RuntimeError, "linux::TAP/TUN devices must be connected to a linux::Node" +
+ @property +
[docs] def gre_enabled(self): + if self._gre_enabled is None: + from nepi.resources.linux.gretunnel import LinuxGRETunnel + gre = self.get_connected(LinuxGRETunnel.get_rtype()) + if gre: self._gre_enabled = True + + return self._gre_enabled +
+
[docs] def upload_sources(self): + scripts = [] + + # udp-connect python script + udp_connect = os.path.join(os.path.dirname(__file__), "scripts", + "linux-udp-connect.py") + + scripts.append(udp_connect) + + tap_create = os.path.join(os.path.dirname(__file__), "scripts", + "linux-tap-create.py") + + scripts.append(tap_create) + + tap_delete = os.path.join(os.path.dirname(__file__), "scripts", + "linux-tap-delete.py") + + scripts.append(tap_delete) + + # tunnel creation python script + tunchannel = os.path.join(os.path.dirname(__file__), "scripts", + "tunchannel.py") + + scripts.append(tunchannel) + + # Upload scripts + scripts = ";".join(scripts) + + self.node.upload(scripts, + os.path.join(self.node.src_dir), + overwrite = False) + + # upload stop.sh script + stop_command = self.replace_paths(self._stop_command) + + self.node.upload(stop_command, + os.path.join(self.app_home, "stop.sh"), + text = True, + # Overwrite file every time. + # The stop.sh has the path to the socket, which should change + # on every experiment run. + overwrite = True) +
+ def upload_start_command(self): + # If GRE mode is enabled, TAP creation is delayed until the + # tunnel is established + if not self.gre_enabled: + # We want to make sure the device is up and running + # before the deploy is over, so we execute the + # start script now and wait until it finishes. + command = self.get("command") + command = self.replace_paths(command) + + shfile = os.path.join(self.app_home, "start.sh") + self.node.run_and_wait(command, self.run_home, + shfile = shfile, + overwrite = True) + +
[docs] def upload_start_command(self): + # If GRE mode is enabled, TAP creation is delayed until the + # tunnel is established + if not self.gre_enabled: + # Overwrite file every time. + # The start.sh has the path to the socket, wich should change + # on every experiment run. + command = self.get("command") + + self.info("Uploading command '%s'" % command) + + # replace application specific paths in the command + command = self.replace_paths(command) + + # replace application specific paths in the environment + env = self.get("env") + env = env and self.replace_paths(env) + + shfile = os.path.join(self.app_home, "start.sh") + + self.node.upload_command(command, + shfile = shfile, + env = env, + overwrite = True) + + # We want to make sure the device is up and running + # before the deploy finishes, so we execute now the + # start script. We run it in background, because the + # TAP will live for as long as the process that + # created it is running, and wait until the TAP + # is created. + self._run_in_background() +
+
[docs] def do_deploy(self): + if not self.node or self.node.state < ResourceState.PROVISIONED: + self.ec.schedule(self.reschedule_delay, self.deploy) + else: + if self.gre_enabled: + self._vif_prefix = "gre" + self._home = "%s-%s" % (self.vif_prefix, self.guid) + + if not self.get("deviceName"): + self.set("deviceName", "%s%d" % (self.vif_prefix, self.guid)) + + if not self.get("command"): + self.set("command", self._start_command) + + if not self.get("depends"): + self.set("depends", self._dependencies) + + if not self.get("install"): + self.set("install", self._install) + + self.do_discover() + self.do_provision() + + self.set_ready() +
+
[docs] def do_start(self): + if self.state == ResourceState.READY: + command = self.get("command") + self.info("Starting command '%s'" % command) + + self.set_started() + else: + msg = " Failed to execute command '%s'" % command + self.error(msg, out, err) + raise RuntimeError, msg +
+
[docs] def do_stop(self): + command = self.get('command') or '' + + if self.state == ResourceState.STARTED: + self.info("Stopping command '%s'" % command) + + command = "bash %s" % os.path.join(self.app_home, "stop.sh") + (out, err), proc = self.execute_command(command, + blocking = True) + + if err: + msg = " Failed to stop command '%s' " % command + self.error(msg, out, err) + + self.set_stopped() +
+ @property +
[docs] def state(self): + state_check_delay = 0.5 + if self._state == ResourceState.STARTED and \ + tdiffsec(tnow(), self._last_state_check) > state_check_delay: + + if self.get("deviceName"): + (out, err), proc = self.node.execute("ifconfig") + + if out.strip().find(self.get("deviceName")) == -1: + # tap is not running is not running (socket not found) + self.set_stopped() + + self._last_state_check = tnow() + + return self._state +
+
[docs] def do_release(self): + # Node needs to wait until all associated RMs are released + # to be released + from nepi.resources.linux.tunnel import LinuxTunnel + rms = self.get_connected(LinuxTunnel.get_rtype()) + + for rm in rms: + if rm.state < ResourceState.STOPPED: + self.ec.schedule(self.reschedule_delay, self.release) + return + + super(LinuxTap, self).do_release() +
+
[docs] def gre_connect(self, remote_endpoint, connection_app_home, + connection_run_home): + gre_connect_command = self._gre_connect_command(remote_endpoint, + connection_app_home, connection_run_home) + + # upload command to connect.sh script + shfile = os.path.join(connection_app_home, "gre-connect.sh") + self.node.upload_command(gre_connect_command, + shfile = shfile, + overwrite = False) + + # invoke connect script + cmd = "bash %s" % shfile + (out, err), proc = self.node.run(cmd, connection_run_home, + pidfile = "gre_connect_pidfile", + stdout = "gre_connect_stdout", + stderr = "gre_connect_stderr", + ) + + # check if execution errors occurred + msg = " Failed to connect endpoints " + + if proc.poll() or err: + self.error(msg, out, err) + raise RuntimeError, msg + + # Wait for pid file to be generated + pid, ppid = self.node.wait_pid(connection_run_home, + pidfile = "gre_connect_pidfile") + + # If the process is not running, check for error information + # on the remote machine + if not pid or not ppid: + (out, err), proc = self.node.check_errors(connection_run_home, + stderr = "gre_connect_stderr") + + # Out is what was written in the stderr file + if err: + msg = " Failed to start command '%s' " % command + self.error(msg, out, err) + raise RuntimeError, msg + + return True +
+
[docs] def initiate_udp_connection(self, remote_endpoint, connection_app_home, + connection_run_home, cipher, cipher_key, bwlimit, txqueuelen): + port = self.udp_connect(remote_endpoint, connection_app_home, + connection_run_home, cipher, cipher_key, bwlimit, txqueuelen) + return port +
+
[docs] def udp_connect(self, remote_endpoint, connection_app_home, + connection_run_home, cipher, cipher_key, bwlimit, txqueuelen): + udp_connect_command = self._udp_connect_command( + remote_endpoint, connection_app_home, connection_run_home, + cipher, cipher_key, bwlimit, txqueuelen) + + # upload command to connect.sh script + shfile = os.path.join(connection_app_home, "udp-connect.sh") + self.node.upload_command(udp_connect_command, + shfile = shfile, + overwrite = False) + + # invoke connect script + cmd = "bash %s" % shfile + (out, err), proc = self.node.run(cmd, connection_run_home, + pidfile = "udp_connect_pidfile", + stdout = "udp_connect_stdout", + stderr = "udp_connect_stderr", + ) + + # check if execution errors occurred + msg = "Failed to connect endpoints " + + if proc.poll(): + self.error(msg, out, err) + raise RuntimeError, msg + + # Wait for pid file to be generated + self._pid, self._ppid = self.node.wait_pid( + connection_run_home, + pidfile = "udp_connect_pidfile") + + # If the process is not running, check for error information + # on the remote machine + if not self._pid or not self._ppid: + (out, err), proc = self.node.check_errors( + connection_run_home, + stderr = "udp_connect_stderr") + + # Out is what was written in the stderr file + if err: + msg = " Failed to start command '%s' " % command + self.error(msg, out, err) + raise RuntimeError, msg + + return self.wait_file(connection_run_home, "local_port") +
+
[docs] def establish_udp_connection(self, remote_endpoint, + connection_app_home, connection_run_home, port): + # upload remote port number to file + rem_port = "%s\n" % port + self.node.upload(rem_port, + os.path.join(connection_run_home, "remote_port"), + text = True, + overwrite = False) +
+
[docs] def verify_connection(self, remote_endpoint, + connection_app_home, connection_run_home): + + return self.wait_file(connection_run_home, "ret_file") +
+
[docs] def terminate_connection(self, remote_endpoint, + connection_app_home, connection_run_home): + if self._pid and self._ppid: + (out, err), proc = self.node.kill(self._pid, self._ppid, + sudo = True) + + # check if execution errors occurred + if proc.poll() and err: + msg = " Failed to Kill the Tap" + self.error(msg, out, err) + raise RuntimeError, msg +
+
[docs] def check_status(self): + return self.node.status(self._pid, self._ppid) +
+
[docs] def wait_file(self, home, filename): + """ Waits until file on endpoint is generated """ + result = None + delay = 1.0 + + for i in xrange(20): + (out, err), proc = self.node.check_output(home, filename) + if out: + result = out.strip() + break + else: + time.sleep(delay) + delay = delay * 1.5 + else: + msg = "Couldn't retrieve %s" % filename + self.error(msg, out, err) + raise RuntimeError, msg + + return result +
+ @property + def _start_command(self): + if self.gre_enabled: + command = [] + else: + command = ["sudo -S "] + command.append("PYTHONPATH=$PYTHONPATH:${SRC}") + command.append("python ${SRC}/linux-tap-create.py") + command.append("-t %s" % self.vif_type) + command.append("-a %s" % self.get("ip")) + command.append("-n %s" % self.get("prefix")) + command.append("-N %s " % self.get("deviceName")) + command.append("-S %s " % self.sock_name) + if self.get("pi"): + command.append("-p") + + return " ".join(command) + + @property + def _stop_command(self): + if self.gre_enabled: + command = self._stop_gre_command + else: + command = ["sudo -S "] + command.append("PYTHONPATH=$PYTHONPATH:${SRC}") + command.append("python ${SRC}/linux-tap-delete.py") + command.append("-N %s " % self.get("deviceName")) + command.append("-S %s " % self.sock_name) + command = " ".join(command) + + return command + + def _gre_connect_command(self, remote_endpoint, + connection_app_home, connecrion_app_home): + # Set the remote endpoint to (private) device IP + self.set("pointopoint", remote_endpoint.get("ip")) + ## public node IP + self.set("greRemote", remote_endpoint.node.get("ip")) + + # Generate GRE connect command + command = ["("] + command.append(self._stop_gre_command) + command.append(") ; (") + command.append(self._start_gre_command) + command.append(")") + + command = " ".join(command) + command = self.replace_paths(command) + + return command + + @property + def _start_gre_command(self): + command = [] + command.append("sudo -S modprobe ip_gre") + command.append("sudo -S ip tunnel add %s mode gre remote %s local %s ttl 255 csum key %s" % ( + self.get("deviceName"), + self.get("greRemote"), + self.node.get("ip"), + self.get("greKey") + )) + command.append("sudo -S ip addr add %s/%s peer %s/%s dev %s" % ( + self.get("ip"), + self.get("prefix"), + self.get("pointopoint"), + self.get("prefix"), + self.get("deviceName"), + )) + command.append("sudo -S ip link set %s up " % self.get("deviceName")) + + return ";".join(command) + + @property + def _stop_gre_command(self): + command = [] + command.append("sudo -S modprobe -r ip_gre") + command.append("sudo -S ip link set down dev %s" % ( + self.get("deviceName"), + )) + command.append("sudo -S ip link del dev %s" % ( + self.get("deviceName"), + )) + + return ";".join(command) + + def _udp_connect_command(self, remote_endpoint, + connection_app_home, connection_run_home, + cipher, cipher_key, bwlimit, txqueuelen): + + # Set the remote endpoint to the IP of the device + self.set("pointopoint", remote_endpoint.get("ip")) + + # Public IP of the remote NODE to stablish tunnel + remote_ip = remote_endpoint.node.get("ip") + local_ip = self.node.get("ip") + + local_port_file = os.path.join(connection_run_home, + "local_port") + + remote_port_file = os.path.join(connection_run_home, + "remote_port") + + ret_file = os.path.join(connection_run_home, + "ret_file") + + # Generate UDP connect command + # Use the start command to configure TAP with peer info + start_command = self._start_command + + command = [""] + # Use pl-vid-udp-connect.py to stablish the tunnel between endpoints + command.append("sudo -S") + command.append("PYTHONPATH=$PYTHONPATH:${SRC}") + command.append("python ${SRC}/linux-udp-connect.py") + command.append("-t %s" % self.vif_type) + command.append("-S %s " % self.sock_name) + command.append("-p %s " % local_port_file) + command.append("-P %s " % remote_port_file) + command.append("-o %s " % local_ip) + command.append("-O %s " % remote_ip) + command.append("-R %s " % ret_file) + if self.get("pi"): + command.append("-n") + if cipher: + command.append("-c %s " % cipher) + if cipher_key: + command.append("-k %s " % cipher_key) + if txqueuelen: + command.append("-q %s " % txqueuelen) + if bwlimit: + command.append("-b %s " % bwlimit) + + command = " ".join(command) + command = self.replace_paths(command) + + return command + + @property + def _dependencies(self): + return "mercurial make gcc" + + @property + def _install(self): + # Install python-vsys and python-passfd + install_passfd = ( " ( python -c 'import passfd' ) " + " || " + " ( " + " cd ${SRC} ; " + " hg clone http://nepi.inria.fr/code/python-passfd ; " + " cd python-passfd ; " + " make all ; " + " sudo -S make install " + " )" ) + + return install_passfd + + def valid_connection(self, guid): + # TODO: Validate! + return True + + @property +
[docs] def vif_type(self): + return self._vif_type +
+ @property +
[docs] def vif_type_flag(self): + return self._vif_type_flag +
+ @property +
[docs] def vif_prefix(self): + return self._vif_prefix +
+ @property +
[docs] def sock_name(self): + return os.path.join(self.run_home, "%s.sock" % self.vif_prefix) +
+
[docs] def valid_connection(self, guid): + # TODO: Validate! + return True +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/linux/tcpdump.html b/doc/sphinx/_build/html/_modules/nepi/resources/linux/tcpdump.html new file mode 100644 index 00000000..690d4808 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/linux/tcpdump.html @@ -0,0 +1,499 @@ + + + + + + + + nepi.resources.linux.tcpdump — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.linux.tcpdump

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.resource import clsinit_copy 
+from nepi.resources.linux.application import LinuxApplication
+from nepi.util.timefuncs import tnow
+
+import os
+
+@clsinit_copy
+
[docs]class LinuxTcpdump(LinuxApplication): + _rtype = "linux::Tcpdump" + + @classmethod + def _register_attributes(cls): + A = Attribute("A", + "Sets tcpdump -A option. " + "Prints each packet (minus its link level header) in ASCII.", + type = Types.Bool, + default = False, + flags = Flags.Design) + + b = Attribute("b", + "Sets tcpdump -b option. " + "Prints the AS number in BGP packets in ASDOT notation. ", + type = Types.Bool, + default = False, + flags = Flags.Design) + + B = Attribute("B", + "Sets tcpdump -B option. " + "Sets the operaing system capture buffer size in untils of " + "KiB (1024 bytes).", + flags = Flags.Design) + + c = Attribute("c", + "Sets tcpdump -c option. " + "Exists after receiving count packets.", + flags = Flags.Design) + + C = Attribute("C", + "Sets tcpdump -C option. " + "Before writing a raw packet to a savefile, check whether the " + "file is currently larger than file_size and, if so, close the " + "current savefile and open a new one. " + "Savefiles after the first savefile will have the name specified " + "with the -w with a number after it, starting at 1 and continuing " + "upward. ", + flags = Flags.Design) + + d = Attribute("d", + "Sets tcpdump -d option. " + "Dump the compiled packet-matching code in a human readable form " + "to standard output and stop.", + type = Types.Bool, + default = False, + flags = Flags.Design) + + dd = Attribute("dd", + "Sets tcpdump -dd option. " + "Dump packet-matching code as a C program fragment. ", + type = Types.Bool, + default = False, + flags = Flags.Design) + + ddd = Attribute("ddd", + "Sets tcpdump -ddd option. " + "Dump packet-matching code as decimal numbers " + "(preceded with a count).", + type = Types.Bool, + default = False, + flags = Flags.Design) + + D = Attribute("D", + "Sets tcpdump -D option. " + "Print the list of the network interfaces available on the system " + "and on which tcpdump can capture packets. ", + type = Types.Bool, + default = False, + flags = Flags.Design) + + e = Attribute("e", + "Sets tcpdump -e option. " + "Print the link-level header on each dump line.", + type = Types.Bool, + default = False, + flags = Flags.Design) + + F = Attribute("F", + "Sets tcpdump -F option. " + "Use file as input for the filter expression.", + flags = Flags.Design) + + G = Attribute("G", + "Sets tcpdump -G option. " + "If specified, rotates the dump file specified with the -w " + "option every rotate_seconds seconds. ", + type = Types.Bool, + default = False, + flags = Flags.Design) + + i = Attribute("i", + "Sets tcpdump -i option. " + "Listen on interface. If unspecified, tcpdump searches the " + "system interface list for the lowest numbered, configured " + "up interface (excluding loopback). ", + flags = Flags.Design) + + I = Attribute("I", + "Sets tcpdump -I option. " + "Put the interface in 'monitor mode'; this is supported only " + "on IEEE 802.11 Wi-Fi interfaces, and supported only on some " + "operating systems. ", + type = Types.Bool, + default = False, + flags = Flags.Design) + + j = Attribute("j", + "Sets tcpdump -j option. " + "Sets the time stamp type for the capture to tstamp_type. " + "The names to use for the time stamp types are given in " + "pcap-tstamp-type(7); not all the types listed there will " + "necessarily be valid for any given interface.", + flags = Flags.Design) + + K = Attribute("K", + "Sets tcpdump -K option. " + "Don't attempt to verify IP, TCP, or UDP checksums. ", + type = Types.Bool, + default = False, + flags = Flags.Design) + + l = Attribute("l", + "Sets tcpdump -l option. " + "Make stdout line buffered. ", + type = Types.Bool, + default = False, + flags = Flags.Design) + + U = Attribute("U", + "Sets tcpdump -U option. " + "Similar to -l in its behavior, but it will cause output to be " + "``packet-buffered'', so that the output is written to stdout " + "at the end of each packet. ", + type = Types.Bool, + default = False, + flags = Flags.Design) + + n = Attribute("n", + "Sets tcpdump -n option. " + "Don't convert addresses (i.e., host addresses, port numbers, " + "etc.) to names.", + type = Types.Bool, + default = False, + flags = Flags.Design) + + N = Attribute("N", + "Sets tcpdump -N option. " + "Don't print domain name qualification of host names. " + "E.g., if you give this flag then tcpdump will print ``nic'' " + "instead of ``nic.ddn.mil''.", + type = Types.Bool, + default = False, + flags = Flags.Design) + + S = Attribute("S", + "Sets tcpdump -S option. " + "Print absolute, rather than relative, TCP sequence numbers.", + type = Types.Bool, + default = False, + flags = Flags.Design) + + s = Attribute("s", + "Sets tcpdump -s option. " + "Snarf snaplen bytes of data from each packet rather than " + "the default of 65535 bytes. ", + flags = Flags.Design) + + T = Attribute("T", + "Sets tcpdump -T option. " + "Force packets selected by 'expression' to be interpreted the " + "specified type. Currently known types are aodv (Ad-hoc " + "On-demand Distance Vector protocol), cnfp (Cisco NetFlow " + "protocol), rpc (Remote Procedure Call), rtp (Real-Time " + "Applications protocol), rtcp (Real-Time Applications control " + "protocol), snmp (Simple Network Management Protocol), tftp " + "(Trivial File Transfer Protocol), vat (Visual Audio Tool), " + "and wb (distributed White Board).", + flags = Flags.Design) + + t = Attribute("t", + "Sets tcpdump -t option. " + "Don't print a timestamp on each dump line.", + type = Types.Bool, + default = False, + flags = Flags.Design) + + tt = Attribute("tt", + "Sets tcpdump -tt option. " + "Print an unformatted timestamp on each dump line. ", + type = Types.Bool, + default = False, + flags = Flags.Design) + + ttt = Attribute("ttt", + "Sets tcpdump -ttt option. " + "Print a delta (micro-second resolution) between current " + "and previous line on each dump line.", + type = Types.Bool, + default = False, + flags = Flags.Design) + + tttt = Attribute("tttt", + "Sets tcpdump -tttt option. " + "Print a timestamp in default format proceeded by date on " + "each dump line. ", + type = Types.Bool, + default = False, + flags = Flags.Design) + + ttttt = Attribute("ttttt", + "Sets tcpdump -ttttt option. " + "Print a delta (micro-second resolution) between current and " + "first line on each dump line.", + type = Types.Bool, + default = False, + flags = Flags.Design) + + v = Attribute("v", + "Sets tcpdump -v option. " + "When parsing and printing, produce (slightly more) " + "verbose output. ", + type = Types.Bool, + default = False, + flags = Flags.Design) + + vv = Attribute("vv", + "Sets tcpdump -vv option. " + "Even more verbose output. ", + type = Types.Bool, + default = False, + flags = Flags.Design) + + vvv = Attribute("vvv", + "Sets tcpdump -vv option. " + "Even more verbose output. ", + type = Types.Bool, + default = False, + flags = Flags.Design) + + w = Attribute("w", + "Sets tcpdump -w option. " + "Write the raw packets to file rather than parsing " + "and printing them out.", + type = Types.Bool, + default = False, + flags = Flags.Design) + + expression = Attribute("expression", + "selects which packets will be dumped.", + flags = Flags.Design) + + cls._register_attribute(A) + cls._register_attribute(b) + cls._register_attribute(B) + cls._register_attribute(c) + cls._register_attribute(C) + cls._register_attribute(d) + cls._register_attribute(dd) + cls._register_attribute(ddd) + cls._register_attribute(D) + cls._register_attribute(e) + cls._register_attribute(F) + cls._register_attribute(G) + cls._register_attribute(i) + cls._register_attribute(I) + cls._register_attribute(j) + cls._register_attribute(K) + cls._register_attribute(l) + cls._register_attribute(U) + cls._register_attribute(n) + cls._register_attribute(N) + cls._register_attribute(S) + cls._register_attribute(s) + cls._register_attribute(T) + cls._register_attribute(t) + cls._register_attribute(tt) + cls._register_attribute(ttt) + cls._register_attribute(tttt) + cls._register_attribute(ttttt) + cls._register_attribute(v) + cls._register_attribute(vv) + cls._register_attribute(vvv) + cls._register_attribute(w) + cls._register_attribute(expression) + + def __init__(self, ec, guid): + super(LinuxTcpdump, self).__init__(ec, guid) + self._home = "tcpdump-%s" % self.guid + self._sudo_kill = True + +
[docs] def do_deploy(self): + if not self.get("command"): + self.set("command", self._start_command) + + if not self.get("env"): + self.set("env", "PATH=$PATH:/usr/sbin/") + + if not self.get("depends"): + self.set("depends", "tcpdump") + + super(LinuxTcpdump, self).do_deploy() +
+ @property + def _start_command(self): + args = [] + args.append("sudo -S tcpdump") + if self.get("A") == True: + args.append("-A") + if self.get("b") == True: + args.append("-b") + if self.get("B"): + args.append("-B %s" % self.get("B")) + if self.get("c"): + args.append("-c %s" % self.get("c")) + if self.get("C"): + args.append("-C %s" % self.get("C")) + if self.get("d") == True: + args.append("-d") + if self.get("dd") == True: + args.append("-dd") + if self.get("ddd") == True: + args.append("-ddd") + if self.get("D") == True: + args.append("-D") + if self.get("e") == True: + args.append("-e") + if self.get("F"): + args.append("-F %s" % self.get("F")) + if self.get("G") == True: + args.append("-G") + if self.get("i"): + args.append("-i %s" % self.get("i")) + if self.get("I") == True: + args.append("-I") + if self.get("j"): + args.append("-j %s" % self.get("j")) + if self.get("K") == True: + args.append("-K") + if self.get("l") == True: + args.append("-l") + if self.get("U") == True: + args.append("-U") + if self.get("n") == True: + args.append("-n") + if self.get("N") == True: + args.append("-N") + if self.get("S") == True: + args.append("-S") + if self.get("s"): + args.append("-s %s" % self.get("s")) + if self.get("T"): + args.append("-T %s" % self.get("T")) + if self.get("t") == True: + args.append("-t") + if self.get("tt") == True: + args.append("-tt") + if self.get("ttt") == True: + args.append("-ttt") + if self.get("tttt") == True: + args.append("-tttt") + if self.get("ttttt") == True: + args.append("-ttttt") + if self.get("v") == True: + args.append("-v") + if self.get("vv") == True: + args.append("-vv") + if self.get("vvv") == True: + args.append("-vvv") + if self.get("w"): + args.append("-w %s" % self.get("w")) + if self.get("expression"): + args.append(self.get("expression")) + + command = " ".join(args) + + return command + +
[docs] def valid_connection(self, guid): + # TODO: Validate! + return True +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/linux/traceroute.html b/doc/sphinx/_build/html/_modules/nepi/resources/linux/traceroute.html new file mode 100644 index 00000000..21c71a3d --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/linux/traceroute.html @@ -0,0 +1,217 @@ + + + + + + + + nepi.resources.linux.traceroute — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.linux.traceroute

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.resource import clsinit_copy, ResourceState 
+from nepi.resources.linux.application import LinuxApplication
+from nepi.util.timefuncs import tnow
+
+import os
+import socket
+
+@clsinit_copy
+
[docs]class LinuxTraceroute(LinuxApplication): + _rtype = "linux::Traceroute" + + @classmethod + def _register_attributes(cls): + countinuous = Attribute("continuous", + "Run traceroute in a while loop", + type = Types.Bool, + default = False, + flags = Flags.Design) + + print_timestamp = Attribute("printTimestamp", + "Print timestamp before running traceroute", + type = Types.Bool, + default = False, + flags = Flags.Design) + + use_ip = Attribute("useIP", + "Use the IP address instead of the host domain name. " + "Useful for environments were dns resolution problems occur " + "frequently", + type = Types.Bool, + default = False, + flags = Flags.Design) + + target = Attribute("target", + "Traceroute target host (host that will be pinged)", + flags = Flags.Design) + + early_start = Attribute("earlyStart", + "Start ping as early as deployment. ", + type = Types.Bool, + default = False, + flags = Flags.Design) + + cls._register_attribute(countinuous) + cls._register_attribute(print_timestamp) + cls._register_attribute(use_ip) + cls._register_attribute(target) + cls._register_attribute(early_start) + + def __init__(self, ec, guid): + super(LinuxTraceroute, self).__init__(ec, guid) + self._home = "traceroute-%s" % self.guid + +
[docs] def upload_start_command(self): + super(LinuxTraceroute, self).upload_start_command() + + if self.get("earlyStart") == True: + self._run_in_background() +
+
[docs] def do_deploy(self): + if not self.get("command"): + self.set("command", self._start_command) + + if not self.get("depends"): + self.set("depends", "traceroute") + + super(LinuxTraceroute, self).do_deploy() +
+
[docs] def do_start(self): + if self.get("earlyStart") == True: + if self.state == ResourceState.READY: + command = self.get("command") + self.info("Starting command '%s'" % command) + + self.set_started() + else: + msg = " Failed to execute command '%s'" % command + self.error(msg, out, err) + raise RuntimeError, msg + else: + super(LinuxTraceroute, self).do_start() +
+ @property + def _start_command(self): + args = [] + if self.get("continuous") == True: + args.append("while true; do ") + if self.get("printTimestamp") == True: + args.append("""echo "`date +'%Y%m%d%H%M%S'`";""") + args.append("traceroute") + + target = self.get("target") + if self.get("useIP") == True: + target = socket.gethostbyname(target) + args.append(target) + + if self.get("continuous") == True: + args.append("; sleep 2 ; done ") + + command = " ".join(args) + + return command + +
[docs] def valid_connection(self, guid): + # TODO: Validate! + return True +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/linux/tun.html b/doc/sphinx/_build/html/_modules/nepi/resources/linux/tun.html new file mode 100644 index 00000000..f93671e8 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/linux/tun.html @@ -0,0 +1,127 @@ + + + + + + + + nepi.resources.linux.tun — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.linux.tun

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.resource import clsinit_copy
+from nepi.resources.linux.tap import LinuxTap
+
+import os
+
+@clsinit_copy
+
[docs]class LinuxTun(LinuxTap): + _rtype = "linux::Tun" + _help = "Creates a TUN device on a Linux host" + + def __init__(self, ec, guid): + super(LinuxTun, self).__init__(ec, guid) + self._vif_prefix = "tun" + self._vif_type = "IFF_TUN" + self._vif_type_flag = LinuxTap.IFF_TUN + self._home = "%s-%s" % (self.vif_prefix, self.guid) + +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/linux/tunnel.html b/doc/sphinx/_build/html/_modules/nepi/resources/linux/tunnel.html new file mode 100644 index 00000000..6efeb748 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/linux/tunnel.html @@ -0,0 +1,256 @@ + + + + + + + + nepi.resources.linux.tunnel — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.linux.tunnel

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.resource import clsinit_copy, ResourceState
+from nepi.resources.linux.application import LinuxApplication
+from nepi.util.timefuncs import tnow, tdiffsec
+
+import os
+import time
+
+state_check_delay = 0.5
+
+@clsinit_copy
+
[docs]class LinuxTunnel(LinuxApplication): + _rtype = "abstract::linux::Tunnel" + _help = "Constructs a tunnel between two Linux endpoints" + + def __init__(self, ec, guid): + super(LinuxTunnel, self).__init__(ec, guid) + self._home = "tunnel-%s" % self.guid + +
[docs] def log_message(self, msg): + return " guid %d - tunnel %s - %s - %s " % (self.guid, + self.endpoint1.node.get("hostname"), + self.endpoint2.node.get("hostname"), + msg) +
+
[docs] def get_endpoints(self): + """ Returns the list of RM that are endpoints to the tunnel + """ + raise NotImplementedError +
+ @property +
[docs] def endpoint1(self): + endpoints = self.get_endpoints() + if endpoints: return endpoints[0] + return None +
+ @property +
[docs] def endpoint2(self): + endpoints = self.get_endpoints() + if endpoints and len(endpoints) > 1: return endpoints[1] + return None +
+
[docs] def app_home(self, endpoint): + return os.path.join(endpoint.node.exp_home, self._home) +
+
[docs] def run_home(self, endpoint): + return os.path.join(self.app_home(endpoint), self.ec.run_id) +
+
[docs] def endpoint_mkdir(self, endpoint): + endpoint.node.mkdir(self.run_home(endpoint)) +
+
[docs] def initiate_connection(self, endpoint, remote_endpoint): + raise NotImplementedError +
+
[docs] def establish_connection(self, endpoint, remote_endpoint, data): + raise NotImplementedError +
+
[docs] def verify_connection(self, endpoint, remote_endpoint): + raise NotImplementedError +
+
[docs] def terminate_connection(self, endpoint, remote_endpoint): + raise NotImplementedError +
+
[docs] def check_state_connection(self, endpoint, remote_endpoint): + raise NotImplementedError +
+
[docs] def do_provision(self): + # create run dir for tunnel on each node + self.endpoint_mkdir(self.endpoint1) + self.endpoint_mkdir(self.endpoint2) + + self.debug("Initiate the connection") + # Start 2 step connection + # Initiate connection from endpoint 1 to endpoint 2 + data1 = self.initiate_connection(self.endpoint1, self.endpoint2) + + # Initiate connection from endpoint 2 to endpoint 1 + data2 = self.initiate_connection(self.endpoint2, self.endpoint1) + + self.debug("Establish the connection") + # Establish connection from endpoint 1 to endpoint 2 + self.establish_connection(self.endpoint1, self.endpoint2, data2) + + # Establish connection from endpoint 2 to endpoint 1 + self.establish_connection(self.endpoint2, self.endpoint1, data1) + + self.debug("Verify the connection") + # check if connection was successful on both sides + self.verify_connection(self.endpoint1, self.endpoint2) + self.verify_connection(self.endpoint2, self.endpoint1) + + self.info("Provisioning finished") + + self.set_provisioned() +
+
[docs] def do_deploy(self): + if (not self.endpoint1 or self.endpoint1.state < ResourceState.READY) or \ + (not self.endpoint2 or self.endpoint2.state < ResourceState.READY): + self.ec.schedule(self.reschedule_delay, self.deploy) + else: + self.do_discover() + self.do_provision() + + self.set_ready() +
+
[docs] def do_start(self): + if self.state == ResourceState.READY: + command = self.get("command") + self.info("Starting command '%s'" % command) + + self.set_started() + else: + msg = " Failed to execute command '%s'" % command + self.error(msg, out, err) + raise RuntimeError, msg +
+
[docs] def do_stop(self): + """ Stops application execution + """ + + if self.state == ResourceState.STARTED: + self.info("Stopping tunnel") + + self.terminate_connection(self.endpoint1, self.endpoint2) + self.terminate_connection(self.endpoint2, self.endpoint1) + + self.set_stopped() +
+ @property +
[docs] def state(self): + """ Returns the state of the application + """ + if self._state == ResourceState.STARTED: + # In order to avoid overwhelming the remote host and + # the local processor with too many ssh queries, the state is only + # requested every 'state_check_delay' seconds. + if tdiffsec(tnow(), self._last_state_check) > state_check_delay: + + self.check_state_connection() + + self._last_state_check = tnow() + + return self._state +
+
[docs] def valid_connection(self, guid): + # TODO: Validate! + return True +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/linux/udptest.html b/doc/sphinx/_build/html/_modules/nepi/resources/linux/udptest.html new file mode 100644 index 00000000..a896201e --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/linux/udptest.html @@ -0,0 +1,461 @@ + + + + + + + + nepi.resources.linux.udptest — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.linux.udptest

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.resource import clsinit_copy, ResourceState
+from nepi.resources.linux.application import LinuxApplication
+from nepi.util.timefuncs import tnow
+
+import os
+
+@clsinit_copy
+
[docs]class LinuxUdpTest(LinuxApplication): + """ Uses the hpcbench udptest tool to gather UDP measurements. + Measurements require two ends, a server and a client RM. + + http://hpcbench.sourceforge.net/ + """ + _rtype = "linux::UdpTest" + + @classmethod + def _register_attributes(cls): + s = Attribute("s", + "Runs in server mode. ", + type = Types.Bool, + default = False, + flags = Flags.Design) + + p = Attribute("p", + "Port to listen to in server mode, or to connect to in client mode. " + "Defaults to 5678. ", + type = Types.Integer, + flags = Flags.Design) + + a = Attribute("a", + "Client option. Perform UDP Round Trip Time (latency) ", + type = Types.Bool, + flags = Flags.Design) + + A = Attribute("A", + "Client option. " + "Message size for UDP RTT test. " + "UDP RTT (latency) test with specified message size.", + type = Types.Integer, + flags = Flags.Design) + + b = Attribute("b", + "Client option. " + "Client UDP buffer size in bytes. Using system default " + "value if not defined.", + type = Types.Integer, + flags = Flags.Design) + + B = Attribute("B", + "Client option. " + "Server UDP buffer size in bytes. The same as cleint's by default.", + type = Types.Integer, + flags = Flags.Design) + + c = Attribute("c", + "Client option. " + "CPU log option. Tracing system info during the test. " + "Only available when output is defined. ", + type = Types.Bool, + flags = Flags.Design) + + d = Attribute("d", + "Client option. " + "Data size of each read/write in bytes. The same as packet size " + "by default.", + type = Types.Integer, + flags = Flags.Design) + + e = Attribute("e", + "Client option. " + "Exponential test (data size of each sending increasing from 1 " + "byte to packet size). ", + type = Types.Bool, + flags = Flags.Design) + + g = Attribute("g", + "Client option. " + "UDP traffic generator (Keep sending data to a host). " + "Work without server's support.", + type = Types.Bool, + flags = Flags.Design) + + target = Attribute("target", + "Client option. " + "Hostname or IP address of UDP server. Must be specified.", + flags = Flags.Design) + + i = Attribute("i", + "Client option. " + "Bidirectional UDP throuhgput test. Default is unidirection " + "stream test. ", + type = Types.Bool, + flags = Flags.Design) + + l = Attribute("l", + "Client option. " + "UDP datagram (packet) size in bytes ( < udp-buffer-szie ). " + "1460 by default.", + type = Types.Integer, + flags = Flags.Design) + + m = Attribute("m", + "Client option. " + "Total message size in bytes. 1048576 by default.", + type = Types.Integer, + flags = Flags.Design) + + o = Attribute("o", + "Client option. " + "Output file name. ", + flags = Flags.Design) + + P = Attribute("P", + "Client option. " + "Write the plot file for gnuplot. Only enable when the output " + "is specified. ", + type = Types.Bool, + flags = Flags.Design) + + q = Attribute("q", + "Client option. " + "Define the TOS field of IP packets. " + "Six values can be used for this setting:\n" + " 1:(IPTOS)-Minimize delay\n" + " 2:(IPTOS)-Maximize throughput\n" + " 3:(DiffServ)-Class1 with low drop probability\n" + " 4:(DiffServ)-class1 with high drop probability\n" + " 5:(DiffServ)-Class4 with low drop probabiltiy\n" + " 6:(DiffServ)-Class4 with high drop probabiltiy\n" + "Write the plot file for gnuplot. Only enable when the output " + "is specified. ", + type = Types.Enumerate, + allowed = ["1", "2", "3", "4", "5", "6"], + flags = Flags.Design) + + r = Attribute("r", + "Client option. " + "Repetition of tests. 10 by default. ", + type = Types.Integer, + flags = Flags.Design) + + t = Attribute("t", + "Client option. " + "Test time constraint in seconds. 5 by default. ", + type = Types.Integer, + flags = Flags.Design) + + T = Attribute("T", + "Client option. " + "Throughput constraint for UDP generator or throughput " + "test. Unlimited by default. ", + type = Types.Integer, + flags = Flags.Design) + + continuous = Attribute("continuous", + "Run nping in a while loop", + type = Types.Bool, + default = False, + flags = Flags.Design) + + print_timestamp = Attribute("printTimestamp", + "Print timestamp before running nping", + type = Types.Bool, + default = False, + flags = Flags.Design) + + cls._register_attribute(s) + cls._register_attribute(p) + cls._register_attribute(a) + cls._register_attribute(A) + cls._register_attribute(b) + cls._register_attribute(B) + cls._register_attribute(c) + cls._register_attribute(d) + cls._register_attribute(e) + cls._register_attribute(g) + cls._register_attribute(target) + cls._register_attribute(g) + cls._register_attribute(i) + cls._register_attribute(l) + cls._register_attribute(m) + cls._register_attribute(o) + cls._register_attribute(P) + cls._register_attribute(q) + cls._register_attribute(r) + cls._register_attribute(t) + cls._register_attribute(T) + cls._register_attribute(continuous) + cls._register_attribute(print_timestamp) + + def __init__(self, ec, guid): + super(LinuxUdpTest, self).__init__(ec, guid) + self._home = "udptest-%s" % self.guid + +
[docs] def do_deploy(self): + if not self.get("command"): + self.set("command", self._start_command) + + if not self.get("sources"): + self.set("sources", self._sources) + + if not self.get("install"): + self.set("install", self._install) + + if not self.get("build"): + self.set("build", self._build) + + if not self.get("env"): + self.set("env", self._environment) + + if not self.get("depends"): + self.set("depends", self._depends) + + super(LinuxUdpTest, self).do_deploy() +
+
[docs] def upload_start_command(self): + super(LinuxUdpTest, self).upload_start_command() + + if self.get("s") == True: + # We want to make sure the server is running + # before the client starts. + # Run the command as a bash script in background, + # in the host ( but wait until the command has + # finished to continue ) + self._run_in_background() +
+
[docs] def do_start(self): + if self.get("s") == True: + # Server is already running + if self.state == ResourceState.READY: + command = self.get("command") + self.info("Starting command '%s'" % command) + + self.set_started() + else: + msg = " Failed to execute command '%s'" % command + self.error(msg, out, err) + raise RuntimeError, err + else: + super(LinuxUdpTest, self).do_start() +
+ @property + def _start_command(self): + args = [] + if self.get("continuous") == True: + args.append("while true; do ") + + if self.get("printTimestamp") == True: + args.append("""echo "`date +'%Y%m%d%H%M%S'`";""") + + if self.get("s") == True: + args.append("udpserver") + else: + args.append("udptest") + + if self.get("p"): + args.append("-p %d" % self.get("p")) + if self.get("a") == True: + args.append("-a") + if self.get("A"): + args.append("-A %d" % self.get("A")) + if self.get("b"): + args.append("-b %d" % self.get("b")) + if self.get("B"): + args.append("-B %d" % self.get("B")) + if self.get("c") == True: + args.append("-c") + if self.get("d"): + args.append("-d %d" % self.get("d")) + if self.get("e") == True: + args.append("-e") + if self.get("g") == True: + args.append("-g") + if self.get("target"): + args.append("-h %s" % self.get("target")) + if self.get("i") == True: + args.append("-i") + if self.get("l"): + args.append("-l %d" % self.get("l")) + if self.get("m"): + args.append("-m %d" % self.get("m")) + if self.get("o"): + args.append("-o %d" % self.get("o")) + if self.get("P"): + args.append("-P %d" % self.get("P")) + if self.get("q"): + args.append("-q %s" % self.get("q")) + if self.get("r"): + args.append("-r %d" % self.get("r")) + if self.get("t"): + args.append("-t %d" % self.get("t")) + if self.get("T"): + args.append("-T %d" % self.get("T")) + + if self.get("continuous") == True: + args.append("; done ") + + command = " ".join(args) + + return command + + @property + def _sources(self): + return "http://hpcbench.sourceforge.net/udp.tar.gz" + + @property + def _depends(self): + return "gcc make" + + @property + def _build(self): + sources = self.get("sources").split(" ")[0] + sources = os.path.basename(sources) + + return ( + # Evaluate if ccnx binaries are already installed + " ( " + " test -f ${BIN}/udptest && " + " echo 'binaries found, nothing to do' " + " ) || ( " + # If not, untar and build + " ( " + " mkdir -p ${SRC}/udptest && " + " tar xf ${SRC}/%(sources)s --strip-components=1 -C ${SRC}/udptest " + " ) && " + "cd ${SRC}/udptest && " + # Just execute and silence warnings... + " ( make ) " + " )") % ({ 'sources': sources, + }) + + @property + def _install(self): + return ( + # Evaluate if ccnx binaries are already installed + " ( " + " test -f ${BIN}/udptest && " + " echo 'binaries found, nothing to do' " + " ) || ( " + # If not, install + " mv ${SRC}/udptest ${BIN} " + " )") + + @property + def _environment(self): + return "PATH=$PATH:${BIN}/udptest" + +
[docs] def valid_connection(self, guid): + # TODO: Validate! + return True +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/linux/udptunnel.html b/doc/sphinx/_build/html/_modules/nepi/resources/linux/udptunnel.html new file mode 100644 index 00000000..38d28359 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/linux/udptunnel.html @@ -0,0 +1,245 @@ + + + + + + + + nepi.resources.linux.udptunnel — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.linux.udptunnel

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.resource import clsinit_copy, ResourceState
+from nepi.resources.linux.tunnel import LinuxTunnel
+from nepi.util.sshfuncs import ProcStatus
+from nepi.util.timefuncs import tnow, tdiffsec
+
+import os
+import socket
+import time
+
+@clsinit_copy
+
[docs]class LinuxUdpTunnel(LinuxTunnel): + _rtype = "linux::UdpTunnel" + _help = "Constructs a tunnel between two Linux endpoints using a UDP connection " + _platform = "linux" + + @classmethod + def _register_attributes(cls): + cipher = Attribute("cipher", + "Cipher to encript communication. " + "One of PLAIN, AES, Blowfish, DES, DES3. ", + default = None, + allowed = ["PLAIN", "AES", "Blowfish", "DES", "DES3"], + type = Types.Enumerate, + flags = Flags.Design) + + cipher_key = Attribute("cipherKey", + "Specify a symmetric encryption key with which to protect " + "packets across the tunnel. python-crypto must be installed " + "on the system." , + flags = Flags.Design) + + txqueuelen = Attribute("txQueueLen", + "Specifies the interface's transmission queue length. " + "Defaults to 1000. ", + type = Types.Integer, + flags = Flags.Design) + + bwlimit = Attribute("bwLimit", + "Specifies the interface's emulated bandwidth in bytes " + "per second.", + type = Types.Integer, + flags = Flags.Design) + + cls._register_attribute(cipher) + cls._register_attribute(cipher_key) + cls._register_attribute(txqueuelen) + cls._register_attribute(bwlimit) + + def __init__(self, ec, guid): + super(LinuxUdpTunnel, self).__init__(ec, guid) + self._home = "udp-tunnel-%s" % self.guid + self._pids = dict() + +
[docs] def log_message(self, msg): + return " guid %d - udptunnel %s - %s - %s " % (self.guid, + self.endpoint1.node.get("hostname"), + self.endpoint2.node.get("hostname"), + msg) +
+
[docs] def get_endpoints(self): + """ Returns the list of RM that are endpoints to the tunnel + """ + connected = [] + for guid in self.connections: + rm = self.ec.get_resource(guid) + if hasattr(rm, "initiate_udp_connection"): + connected.append(rm) + return connected +
+
[docs] def initiate_connection(self, endpoint, remote_endpoint): + cipher = self.get("cipher") + cipher_key = self.get("cipherKey") + bwlimit = self.get("bwLimit") + txqueuelen = self.get("txQueueLen") + connection_app_home = self.app_home(endpoint) + connection_run_home = self.run_home(endpoint) + + port = endpoint.initiate_udp_connection( + remote_endpoint, + connection_app_home, + connection_run_home, + cipher, cipher_key, bwlimit, txqueuelen) + + return port +
+
[docs] def establish_connection(self, endpoint, remote_endpoint, port): + connection_app_home = self.app_home(endpoint) + connection_run_home = self.run_home(endpoint) + + endpoint.establish_udp_connection(remote_endpoint, + connection_app_home, + connection_run_home, + port) +
+
[docs] def verify_connection(self, endpoint, remote_endpoint): + connection_app_home = self.app_home(endpoint) + connection_run_home = self.run_home(endpoint) + + endpoint.verify_connection(remote_endpoint, + connection_app_home, + connection_run_home) +
+
[docs] def terminate_connection(self, endpoint, remote_endpoint): + connection_app_home = self.app_home(endpoint) + connection_run_home = self.run_home(endpoint) + + endpoint.terminate_connection(remote_endpoint, + connection_app_home, + connection_run_home) +
+
[docs] def check_state_connection(self): + # Make sure the process is still running in background + # No execution errors occurred. Make sure the background + # process with the recorded pid is still running. + + status1 = self.endpoint1.check_status() + status2 = self.endpoint2.check_status() + + if status1 == ProcStatus.FINISHED and \ + status2 == ProcStatus.FINISHED: + + # check if execution errors occurred + (out1, err1), proc1 = self.endpoint1.node.check_errors( + self.run_home(self.endpoint1)) + + (out2, err2), proc2 = self.endpoint2.node.check_errors( + self.run_home(self.endpoint2)) + + if err1 or err2: + msg = "Error occurred in tunnel" + self.error(msg, err1, err2) + self.fail() + else: + self.set_stopped() +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/netns/netnsapplication.html b/doc/sphinx/_build/html/_modules/nepi/resources/netns/netnsapplication.html new file mode 100644 index 00000000..40d168ee --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/netns/netnsapplication.html @@ -0,0 +1,190 @@ + + + + + + + + nepi.resources.netns.netnsapplication — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.netns.netnsapplication

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.resources.netns.netnsbase import NetNSBase
+from nepi.execution.resource import clsinit_copy, ResourceState
+
+import shlex
+
+@clsinit_copy
+
[docs]class NetNSApplication(NetNSBase): + _rtype = "netns::Application" + + def __init__(self, ec, guid): + super(NetNSApplication, self).__init__(ec, guid) + self._traces = dict() + + @classmethod + def _register_attributes(cls): + command = Attribute("command", "Command to execute", flags=Flags.Design) + cls._register_attribute(command) + + @property +
[docs] def emulation(self): + return self.node.emulation +
+ @property +
[docs] def node(self): + from nepi.resources.netns.netnsnode import NetNSNode + node = self.get_connected(NetNSNode.get_rtype()) + + if not node: + msg = "Route not connected to Node!!" + self.error(msg) + raise RuntimeError, msg + + return node[0] +
+ @property + def _rms_to_wait(self): + return [self.node] + +
[docs] def do_start(self): + if self.emulation.state < ResourceState.STARTED: + self.debug("---- RESCHEDULING START ----" ) + self.ec.schedule(self.reschedule_delay, self.start) + else: + self._configure_traces() + + command = shlex.split(self.get("command")) + stdout = self._traces["stdout"] + stderr = self._traces["stderr"] + self._uuid = self.emulation.invoke(self.node.uuid, + "Popen", command, stdout = stdout, + stderr = stderr) + + super(NetNSApplication, self).do_start() + self._start_time = self.emulation.start_time +
+ def _configure_traces(self): + stdout = "%s/%d.stdout" % (self.emulation.run_home, self.guid) + stderr = "%s/%d.stderr" % (self.emulation.run_home, self.guid) + self._trace_filename["stdout"] = stdout + self._trace_filename["stderr"] = stderr + self._traces["stdout"] = self.emulation.create("open", stdout, "w") + self._traces["stderr"] = self.emulation.create("open", stderr, "w") + + @property +
[docs] def state(self): + if self._state == ResourceState.STARTED: + retcode = self.emulation.invoke(self.uuid, "poll") + + if retcode is not None: + if retcode == 0: + self.set_stopped() + else: + out = "" + msg = " Failed to execute command '%s'" % self.get("command") + err = self.trace("stderr") + self.error(msg, out, err) + self.do_fail() + + return self._state +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/netns/netnsbase.html b/doc/sphinx/_build/html/_modules/nepi/resources/netns/netnsbase.html new file mode 100644 index 00000000..575244d3 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/netns/netnsbase.html @@ -0,0 +1,230 @@ + + + + + + + + nepi.resources.netns.netnsbase — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.netns.netnsbase

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.execution.attribute import Flags
+from nepi.execution.trace import TraceAttr
+
+@clsinit_copy
+
[docs]class NetNSBase(ResourceManager): + _rtype = "abstract::netns::Object" + _platform = "netns" + + def __init__(self, ec, guid): + super(NetNSBase, self).__init__(ec, guid) + self._uuid = None + self._connected = set() + self._trace_filename = dict() + + @property +
[docs] def connected(self): + return self._connected +
+ @property +
[docs] def uuid(self): + return self._uuid +
+
[docs] def trace(self, name, attr = TraceAttr.ALL, block = 512, offset = 0): + filename = self._trace_filename.get(name) + if not filename: + self.error("Can not resolve trace %s. Did you enabled it?" % name) + return "" + + return self.emulation.trace(filename, attr, block, offset) +
+ @property + def _rms_to_wait(self): + """ Returns the collection of RMs that this RM needs to + wait for before start + + This method should be overriden to wait for other + objects to be deployed before proceeding with the deployment + + """ + raise RuntimeError, "No dependencies defined!" + + def _instantiate_object(self): + pass + + def _wait_rms(self): + rms = set() + for rm in self._rms_to_wait: + if rm is not None: + rms.add(rm) + + """ Returns True if dependent RMs are not yer READY, False otherwise""" + for rm in rms: + if rm.state < ResourceState.READY: + return True + return False + +
[docs] def do_provision(self): + self._instantiate_object() + + self.info("Provisioning finished") + + super(NetNSBase, self).do_provision() +
+
[docs] def do_deploy(self): + if self._wait_rms(): + self.debug("---- RESCHEDULING DEPLOY ----" ) + self.ec.schedule(self.reschedule_delay, self.deploy) + else: + self.do_discover() + self.do_provision() + + self.set_ready() +
+
[docs] def do_start(self): + if self.state == ResourceState.READY: + # No need to do anything, emulation.Run() will start every object + self.info("Starting") + self.set_started() + else: + msg = " Failed " + self.error(msg, out, err) + raise RuntimeError, msg +
+
[docs] def do_stop(self): + if self.state == ResourceState.STARTED: + # No need to do anything, emulation.Destroy() will stop every object + self.set_stopped() +
+ @property +
[docs] def state(self): + return self._state +
+
[docs] def get(self, name): + #flags = Flags.NoWrite | Flags.NoRead | Flags.Design + flags = Flags.Design + if self._state in [ResourceState.READY, ResourceState.STARTED] \ + and not self.has_flag(name, flags): + return self.emulation.emu_get(self.uuid, name) + + value = super(NetNSBase, self).get(name) + return value +
+
[docs] def set(self, name, value): + flags = Flags.Design + if (self._state > ResourceState.NEW and \ + self.has_flag(name, Flags.Design)) or \ + self.has_flag(name, Flags.NoWrite): + out = err = "" + msg = " Cannot change Design only attribue %s" % name + self.error(msg, out, err) + return + + if self._state in [ResourceState.READY, ResourceState.STARTED]: + self.emulation.emu_set(self.uuid, name, value) + + value = super(NetNSBase, self).set(name, value) + + return value +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/netns/netnsclient.html b/doc/sphinx/_build/html/_modules/nepi/resources/netns/netnsclient.html new file mode 100644 index 00000000..42ff64a3 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/netns/netnsclient.html @@ -0,0 +1,132 @@ + + + + + + + + nepi.resources.netns.netnsclient — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.netns.netnsclient

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+
[docs]class NetNSClient(object): + """ Common Interface for NS3 client classes """ + def __init__(self): + super(NetNSClient, self).__init__() + +
[docs] def create(self, *args, **kwargs): + pass +
+
[docs] def invoke(self, *args, **kwargs): + pass +
+
[docs] def set(self, *args, **kwargs): + pass +
+
[docs] def get(self, *args, **kwargs): + pass +
+
[docs] def flush(self, *args, **kwargs): + pass +
+
[docs] def shutdown(self, *args, **kwargs): + pass +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/netns/netnsemulation.html b/doc/sphinx/_build/html/_modules/nepi/resources/netns/netnsemulation.html new file mode 100644 index 00000000..6905f11c --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/netns/netnsemulation.html @@ -0,0 +1,132 @@ + + + + + + + + nepi.resources.netns.netnsemulation — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.netns.netnsemulation

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+
[docs]class NetNSEmulation(object): + @property +
[docs] def client(self): + return self._client +
+
[docs] def create(self, *args, **kwargs): + return self.client.create(*args, **kwargs) +
+
[docs] def invoke(self, *args, **kwargs): + return self.client.invoke(*args, **kwargs) +
+
[docs] def emu_set(self, *args, **kwargs): + return self.client.set(*args, **kwargs) +
+
[docs] def emu_get(self, *args, **kwargs): + return self.client.get(*args, **kwargs) +
+
[docs] def flush(self, *args, **kwargs): + return self.client.flush(*args, **kwargs) +
+
[docs] def shutdown(self, *args, **kwargs): + return self.client.shutdown(*args, **kwargs) +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/netns/netnsinterface.html b/doc/sphinx/_build/html/_modules/nepi/resources/netns/netnsinterface.html new file mode 100644 index 00000000..5d06bce2 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/netns/netnsinterface.html @@ -0,0 +1,117 @@ + + + + + + + + nepi.resources.netns.netnsinterface — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.netns.netnsinterface

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.resource import clsinit_copy
+from nepi.resources.netns.netnsbase import NetNSBase
+
+@clsinit_copy
+
[docs]class NetNSInterface(NetNSBase): + _rtype = "asbtract::netns::NodeInterface" +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/netns/netnsipv4address.html b/doc/sphinx/_build/html/_modules/nepi/resources/netns/netnsipv4address.html new file mode 100644 index 00000000..cf672dff --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/netns/netnsipv4address.html @@ -0,0 +1,153 @@ + + + + + + + + nepi.resources.netns.netnsipv4address — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.netns.netnsipv4address

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.resource import clsinit_copy
+from nepi.resources.netns.netnsbase import NetNSBase
+
+@clsinit_copy
+
[docs]class NetNSIPv4Address(NetNSBase): + _rtype = "netns::IPv4Address" + + @classmethod + def _register_attributes(cls): + ip = Attribute("ip", "IPv4 address", flags=Flags.Design) + prefix = Attribute("prefix", "IPv4 prefix", flags=Flags.Design) + + cls._register_attribute(ip) + cls._register_attribute(prefix) + + @property +
[docs] def emulation(self): + return self.node.emulation +
+ @property +
[docs] def node(self): + return self.interface.node +
+ @property +
[docs] def interface(self): + from nepi.resources.netns.netnsinterface import NetNSInterface + interface = self.get_connected(NetNSInterface.get_rtype()) + + if not interface: + msg = "IPv4Address not connected to Interface!!" + self.error(msg) + raise RuntimeError, msg + + return interface[0] +
+ @property + def _rms_to_wait(self): + return [self.interface] + + def _instantiate_object(self): + self._uuid = self.emulation.invoke(self.interface.uuid, "add_v4_address", + self.get("ip"), self.get("prefix")) +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/netns/netnsnode.html b/doc/sphinx/_build/html/_modules/nepi/resources/netns/netnsnode.html new file mode 100644 index 00000000..6fd67736 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/netns/netnsnode.html @@ -0,0 +1,137 @@ + + + + + + + + nepi.resources.netns.netnsnode — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.netns.netnsnode

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.resource import clsinit_copy
+from nepi.resources.netns.netnsbase import NetNSBase
+
+@clsinit_copy
+
[docs]class NetNSNode(NetNSBase): + _rtype = "netns::Node" + + @property +
[docs] def emulation(self): + from nepi.resources.netns.netnsemulation import NetNSEmulation + + for guid in self.connections: + rm = self.ec.get_resource(guid) + if isinstance(rm, NetNSEmulation): + return rm + + msg = "Node not connected to Emulation" + self.error(msg) + raise RuntimeError, msg +
+ @property + def _rms_to_wait(self): + return [self.emulation] + + def _instantiate_object(self): + self._uuid = self.emulation.create("Node") +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/netns/netnsnodeinterface.html b/doc/sphinx/_build/html/_modules/nepi/resources/netns/netnsnodeinterface.html new file mode 100644 index 00000000..dc017fe7 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/netns/netnsnodeinterface.html @@ -0,0 +1,157 @@ + + + + + + + + nepi.resources.netns.netnsnodeinterface — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.netns.netnsnodeinterface

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.resource import clsinit_copy
+from nepi.resources.netns.netnsinterface import NetNSInterface
+
+@clsinit_copy
+
[docs]class NetNSNodeInterface(NetNSInterface): + _rtype = "netns::NodeInterface" + + @classmethod + def _register_attributes(cls): + up = Attribute("up", "Interface up", + default = True, + type = Types.Bool) + + cls._register_attribute(up) + + @property +
[docs] def emulation(self): + return self.node.emulation +
+ @property +
[docs] def node(self): + from nepi.resources.netns.netnsnode import NetNSNode + node = self.get_connected(NetNSNode.get_rtype()) + + if not node: + msg = "Route not connected to Node!!" + self.error(msg) + raise RuntimeError, msg + + return node[0] +
+ @property +
[docs] def switch(self): + from nepi.resources.netns.netnsswitch import NetNSSwitch + switch = self.get_connected(NetNSSwitch.get_rtype()) + if switch: return switch[0] + return None +
+ @property + def _rms_to_wait(self): + return [self.node, self.switch] + + def _instantiate_object(self): + self._uuid = self.emulation.invoke(self.node.uuid, "add_if") + self.emulation.invoke(self.switch.uuid, "connect", self.uuid) + self.emulation.emu_set(self.uuid, "up", self.get("up")) +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/netns/netnsroute.html b/doc/sphinx/_build/html/_modules/nepi/resources/netns/netnsroute.html new file mode 100644 index 00000000..4b4554cc --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/netns/netnsroute.html @@ -0,0 +1,152 @@ + + + + + + + + nepi.resources.netns.netnsroute — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.netns.netnsroute

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.resource import clsinit_copy
+from nepi.resources.netns.netnsbase import NetNSBase
+
+@clsinit_copy
+
[docs]class NetNSIPv4Route(NetNSBase): + _rtype = "netns::IPv4Route" + + @classmethod + def _register_attributes(cls): + network = Attribute("network", "Network address", flags=Flags.Design) + prefix = Attribute("prefix", "IP prefix length", flags=Flags.Design) + nexthop = Attribute("nexthop", "Nexthop IP", flags=Flags.Design) + + cls._register_attribute(network) + cls._register_attribute(prefix) + cls._register_attribute(nexthop) + + @property +
[docs] def emulation(self): + return self.node.emulation +
+ @property +
[docs] def node(self): + from nepi.resources.netns.netnsnode import NetNSNode + node = self.get_connected(NetNSNode.get_rtype()) + + if not node: + msg = "Route not connected to Node!!" + self.error(msg) + raise RuntimeError, msg + + return node[0] +
+ @property + def _rms_to_wait(self): + return [self.node] + + def _instantiate_object(self): + self._uuid = self.emulation.invoke(self.device.uuid, "add_route", + prefix=self.get("network"), prefix_len=self.get("prefix"), + nexthop=self.get("nexthop")) +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/netns/netnsserver.html b/doc/sphinx/_build/html/_modules/nepi/resources/netns/netnsserver.html new file mode 100644 index 00000000..c09bfeb0 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/netns/netnsserver.html @@ -0,0 +1,307 @@ + + + + + + + + nepi.resources.netns.netnsserver — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.netns.netnsserver

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+import base64
+import cPickle
+import errno
+import logging
+import os
+import socket
+import sys
+
+from optparse import OptionParser, SUPPRESS_HELP
+
+from netnswrapper import NetNSWrapper
+
+
[docs]class NetNSWrapperMessage: + CREATE = "CREATE" + INVOKE = "INVOKE" + SET = "SET" + GET = "GET" + FLUSH = "FLUSH" + SHUTDOWN = "SHUTDOWN" +
+
[docs]def handle_message(wrapper, msg_type, args, kwargs): + if msg_type == NetNSWrapperMessage.SHUTDOWN: + wrapper.shutdown() + + return "BYEBYE" + + if msg_type == NetNSWrapperMessage.CREATE: + clazzname = args.pop(0) + + return wrapper.create(clazzname, *args) + + if msg_type == NetNSWrapperMessage.INVOKE: + uuid = args.pop(0) + operation = args.pop(0) + + return wrapper.invoke(uuid, operation, *args, **kwargs) + + if msg_type == NetNSWrapperMessage.GET: + uuid = args.pop(0) + name = args.pop(0) + + return wrapper.get(uuid, name) + + if msg_type == NetNSWrapperMessage.SET: + uuid = args.pop(0) + name = args.pop(0) + value = args.pop(0) + + return wrapper.set(uuid, name, value) + + if msg_type == NetNSWrapperMessage.FLUSH: + # Forces flushing output and error streams. + # NS-3 output will stay unflushed until the program exits or + # explicit invocation flush is done + sys.stdout.flush() + sys.stderr.flush() + + wrapper.logger.debug("FLUSHED") + + return "FLUSHED" +
+
[docs]def create_socket(socket_name): + sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) + sock.bind(socket_name) + return sock +
+
[docs]def recv_msg(conn): + msg = [] + chunk = '' + + while '\n' not in chunk: + try: + chunk = conn.recv(1024) + except (OSError, socket.error), e: + if e[0] != errno.EINTR: + raise + # Ignore eintr errors + continue + + if chunk: + msg.append(chunk) + else: + # empty chunk = EOF + break + + msg = ''.join(msg).strip() + + # The message is formatted as follows: + # MESSAGE_TYPE|args|kwargs + # + # where MESSAGE_TYPE, args and kwargs are pickld and enoded in base64 + + def decode(item): + item = base64.b64decode(item).rstrip() + return cPickle.loads(item) + + decoded = map(decode, msg.split("|")) + + # decoded message + dmsg_type = decoded.pop(0) + dargs = list(decoded.pop(0)) # transforming touple into list + dkwargs = decoded.pop(0) + + return (dmsg_type, dargs, dkwargs) +
+
[docs]def send_reply(conn, reply): + encoded = base64.b64encode(cPickle.dumps(reply)) + conn.send("%s\n" % encoded) +
+
[docs]def get_options(): + usage = ("usage: %prog -S <socket-name> -D <enable-dump> -v ") + + parser = OptionParser(usage = usage) + + parser.add_option("-S", "--socket-name", dest="socket_name", + help = "Name for the unix socket used to interact with this process", + default = "tap.sock", type="str") + + parser.add_option("-D", "--enable-dump", dest="enable_dump", + help = "Enable dumping the remote executed commands to a script " + "in order to later reproduce and debug the experiment", + action = "store_true", + default = False) + + parser.add_option("-v", "--verbose", + help="Print debug output", + action="store_true", + dest="verbose", default=False) + + (options, args) = parser.parse_args() + + return (options.socket_name, options.verbose, options.enable_dump) +
+
[docs]def run_server(socket_name, level = logging.INFO, + enable_dump = False): + + ###### wrapper instantiation + if level == logging.DEBUG: + from syslog import LOG_DEBUG + import netns + netns.environ.set_log_level(LOG_DEBUG) + + wrapper = NetNSWrapper(loglevel=level, enable_dump = enable_dump) + + wrapper.logger.info("STARTING...") + + # create unix socket to receive instructions + sock = create_socket(socket_name) + sock.listen(0) + + # wait for messages to arrive and process them + stop = False + + while not stop: + conn, addr = sock.accept() + conn.settimeout(5) + + try: + (msg_type, args, kwargs) = recv_msg(conn) + except socket.timeout, e: + # Ingore time-out + continue + + if not msg_type: + # Ignore - connection lost + break + + if msg_type == NetNSWrapperMessage.SHUTDOWN: + stop = True + + try: + reply = handle_message(wrapper, msg_type, args, kwargs) + except: + import traceback + err = traceback.format_exc() + wrapper.logger.error(err) + raise + + try: + send_reply(conn, reply) + except socket.error: + break + + wrapper.logger.info("EXITING...") +
+if __name__ == '__main__': + + (socket_name, verbose, enable_dump) = get_options() + + ## configure logging + FORMAT = "%(asctime)s %(name)s %(levelname)-4s %(message)s" + level = logging.DEBUG if verbose else logging.INFO + + logging.basicConfig(format = FORMAT, level = level) + + ## Run the server + run_server(socket_name, level, enable_dump) +
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/netns/netnsswitch.html b/doc/sphinx/_build/html/_modules/nepi/resources/netns/netnsswitch.html new file mode 100644 index 00000000..eabd651c --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/netns/netnsswitch.html @@ -0,0 +1,153 @@ + + + + + + + + nepi.resources.netns.netnsswitch — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.netns.netnsswitch

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.resource import clsinit_copy
+from nepi.resources.netns.netnsbase import NetNSBase
+
+@clsinit_copy
+
[docs]class NetNSSwitch(NetNSBase): + _rtype = "netns::Switch" + + @classmethod + def _register_attributes(cls): + up = Attribute("up", "Switch up", + default = True, + type = Types.Bool) + + cls._register_attribute(up) + + @property +
[docs] def emulation(self): + return self.node.emulation +
+ @property +
[docs] def node(self): + return self.interface.node +
+ @property +
[docs] def interface(self): + from nepi.resources.netns.netnsinterface import NetNSInterface + interface = self.get_connected(NetNSInterface.get_rtype()) + + if not interface: + msg = "Switch not connected to any Interface!!" + self.error(msg) + raise RuntimeError, msg + + return interface[0] +
+ @property + def _rms_to_wait(self): + return [self.emulation] + + def _instantiate_object(self): + self._uuid = self.emulation.create("Switch") + self.emulation.emu_set(self.uuid, "up", self.get("up")) +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/netns/netnswrapper.html b/doc/sphinx/_build/html/_modules/nepi/resources/netns/netnswrapper.html new file mode 100644 index 00000000..74dc3173 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/netns/netnswrapper.html @@ -0,0 +1,280 @@ + + + + + + + + nepi.resources.netns.netnswrapper — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.netns.netnswrapper

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+import logging
+import time
+import os
+import sys
+import uuid
+
+
[docs]class NetNSWrapper(object): + def __init__(self, loglevel = logging.INFO, enable_dump = False): + super(NetNSWrapper, self).__init__() + # holds reference to all C++ objects and variables in the simulation + self._objects = dict() + + # Logging + self._logger = logging.getLogger("netnswrapper") + self._logger.setLevel(loglevel) + + # Object to dump instructions to reproduce and debug experiment + from netnswrapper_debug import NetNSWrapperDebuger + self._debuger = NetNSWrapperDebuger(enabled = enable_dump) + + @property +
[docs] def debuger(self): + return self._debuger +
+ @property +
[docs] def logger(self): + return self._logger +
+
[docs] def make_uuid(self): + return "uuid%s" % uuid.uuid4() +
+
[docs] def get_object(self, uuid): + return self._objects.get(uuid) +
+
[docs] def create(self, clazzname, *args): + """ This method should be used to construct netns objects """ + import netns + + if clazzname not in ['open'] and not hasattr(netns, clazzname): + msg = "Type %s not supported" % (clazzname) + self.logger.error(msg) + + uuid = self.make_uuid() + + ### DEBUG + self.logger.debug("CREATE %s( %s )" % (clazzname, str(args))) + + self.debuger.dump_create(uuid, clazzname, args) + ######## + + if clazzname == "open": + path = args[0] + mode = args[1] + obj = open(path, mode) + else: + clazz = getattr(netns, clazzname) + + # arguments starting with 'uuid' identify ns-3 C++ + # objects and must be replaced by the actual object + realargs = self.replace_args(args) + + obj = clazz(*realargs) + + self._objects[uuid] = obj + + ### DEBUG + self.logger.debug("RET CREATE ( uuid %s ) %s = %s( %s )" % (str(uuid), + str(obj), clazzname, str(args))) + ######## + + return uuid +
+
[docs] def invoke(self, uuid, operation, *args, **kwargs): + newuuid = self.make_uuid() + + ### DEBUG + self.logger.debug("INVOKE %s -> %s( %s, %s ) " % ( + uuid, operation, str(args), str(kwargs))) + + self.debuger.dump_invoke(newuuid, uuid, operation, args, kwargs) + ######## + + obj = self.get_object(uuid) + + method = getattr(obj, operation) + + # arguments starting with 'uuid' identify netns + # objects and must be replaced by the actual object + realargs = self.replace_args(args) + realkwargs = self.replace_kwargs(kwargs) + + result = method(*realargs, **realkwargs) + + # If the result is an object (not a base value), + # then keep track of the object a return the object + # reference (newuuid) + if not (result is None or type(result) in [ + bool, float, long, str, int]): + self._objects[newuuid] = result + result = newuuid + + ### DEBUG + self.logger.debug("RET INVOKE %s%s = %s -> %s(%s, %s) " % ( + "(uuid %s) " % str(newuuid) if newuuid else "", str(result), uuid, + operation, str(args), str(kwargs))) + ######## + + return result +
+
[docs] def set(self, uuid, name, value): + ### DEBUG + self.logger.debug("SET %s %s %s" % (uuid, name, str(value))) + + self.debuger.dump_set(uuid, name, value) + ######## + + obj = self.get_object(uuid) + setattr(obj, name, value) + + ### DEBUG + self.logger.debug("RET SET %s = %s -> set(%s, %s)" % (str(value), uuid, name, + str(value))) + ######## + + return value +
+
[docs] def get(self, uuid, name): + ### DEBUG + self.logger.debug("GET %s %s" % (uuid, name)) + + self.debuger.dump_get(uuid, name) + ######## + + obj = self.get_object(uuid) + result = getattr(obj, name) + + ### DEBUG + self.logger.debug("RET GET %s = %s -> get(%s)" % (str(result), uuid, name)) + ######## + + return result +
+
[docs] def shutdown(self): + ### DEBUG + self.debuger.dump_shutdown() + ######## + + ### FLUSH PIPES + sys.stdout.flush() + sys.stderr.flush() + + ### RELEASE OBJECTS + del self._objects + + ### DEBUG + self.logger.debug("SHUTDOWN") + ######## +
+
[docs] def replace_args(self, args): + realargs = [self.get_object(arg) if \ + str(arg).startswith("uuid") else arg for arg in args] + + return realargs +
+
[docs] def replace_kwargs(self, kwargs): + realkwargs = dict([(k, self.get_object(v) \ + if str(v).startswith("uuid") else v) \ + for k,v in kwargs.iteritems()]) + + return realkwargs +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/netns/netnswrapper_debug.html b/doc/sphinx/_build/html/_modules/nepi/resources/netns/netnswrapper_debug.html new file mode 100644 index 00000000..e6af9c76 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/netns/netnswrapper_debug.html @@ -0,0 +1,251 @@ + + + + + + + + nepi.resources.netns.netnswrapper_debug — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.netns.netnswrapper_debug

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+
+############ METHODS DEBUG NETNSWRAPPER EXECUTION
+##
+## The netnswrapper works in ditributed mode, receiving instructions from
+## a remote client. This makes it very hard to debug scripting errors 
+## in the client side. To simplify error debugging, when set to debug mode,
+## the ns3wrapper dumps every executed line to a script that can be then
+## executed locally to reproduce and debug the experiment.
+##
+###########################################################################
+
+import logging
+
+
[docs]class NetNSWrapperDebuger(object): + def __init__(self, enabled): + super(NetNSWrapperDebuger, self).__init__() + self._enabled = enabled + self._script_path = "debug.py" + + self.dump_header() + + @property +
[docs] def enabled(self): + return self._enabled +
+ @property +
[docs] def script_path(self): + return self._script_path +
+
[docs] def dump_to_script(self, command): + f = open(self.script_path, "a") + f.write("%s" % command) + f.close() +
+
[docs] def dump_header(self): + if not self.enabled: + return + + header = """ +from netnswrapper import NetNSWrapper + +wrapper = NS3Wrapper() + +""" + self.dump_to_script(header) +
+
[docs] def dump_factory(self, uuid, type_name, kwargs): + if not self.enabled: + return + + command = ("kwargs = %(kwargs)s\n" + "%(uuid)s = wrapper.factory(%(type_name)s, **kwargs)\n\n" + ) % dict({ + "uuid": self.format_value(uuid), + "type_name": self.format_value(type_name), + "kwargs": self.format_kwargs(kwargs) + }) + + self.dump_to_script(command) +
+
[docs] def dump_create(self, uuid, clazzname, args): + if not self.enabled: + return + + command = ("args = %(args)s\n" + "%(uuid)s = wrapper.create(%(clazzname)s, *args)\n\n" + ) % dict({ + "uuid": self.format_value(uuid), + "clazzname": self.format_value(clazzname), + "args": self.format_args(args), + }) + + self.dump_to_script(command) +
+
[docs] def dump_invoke(self, newuuid, uuid, operation, args, kwargs): + if not self.enabled: + return + + command = ("args = %(args)s\n" + "kwargs = %(kwargs)s\n" + "%(newuuid)s = wrapper.invoke(%(uuid)s, %(operation)s, *args, **kwargs)\n\n" + ) % dict({ + "newuuid": self.format_value(newuuid) if newuuid else "nothing", + "uuid": self.format_value(uuid), + "operation": self.format_value(operation), + "args": self.format_args(args), + "kwargs": self.format_kwargs(kwargs), + }) + + self.dump_to_script(command) +
+
[docs] def dump_set(self, uuid, name, value): + if not self.enabled: + return + + command = ("wrapper.set(%(uuid)s, %(name)s, %(value)s)\n\n" + ) % dict({ + "uuid": self.format_value(uuid), + "name": self.format_value(name), + "value": self.format_value(value), + }) + + self.dump_to_script(command) +
+
[docs] def dump_get(self, uuid, name): + if not self.enabled: + return + + command = ("wrapper.get(%(uuid)s, %(name)s)\n\n" + ) % dict({ + "uuid": self.format_value(uuid), + "name": self.format_value(name), + }) + + self.dump_to_script(command) +
+
[docs] def dump_shutdown(self): + if not self.enabled: + return + + command = "wrapper.shutdown()\n\n" + self.dump_to_script(command) +
+
[docs] def format_value(self, value): + if isinstance(value, str) and value.startswith("uuid"): + return value.replace("-", "") + + import pprint + return pprint.pformat(value) +
+
[docs] def format_args(self, args): + fargs = map(self.format_value, args) + return "[%s]" % ",".join(fargs) +
+
[docs] def format_kwargs(self, kwargs): + fkwargs = map(lambda (k,w): + "%s: %s" % (self.format_value(k), self.format_value(w)), + kwargs.iteritems()) + + return "dict({%s})" % ",".join(fkwargs) +
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/aarf_wifi_manager.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/aarf_wifi_manager.html new file mode 100644 index 00000000..74f31e76 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/aarf_wifi_manager.html @@ -0,0 +1,268 @@ + + + + + + + + nepi.resources.ns3.classes.aarf_wifi_manager — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.aarf_wifi_manager

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3wifiremotestationmanager import NS3BaseWifiRemoteStationManager 
+
+@clsinit_copy
+
[docs]class NS3AarfWifiManager(NS3BaseWifiRemoteStationManager): + _rtype = "ns3::AarfWifiManager" + + @classmethod + def _register_attributes(cls): + + attr_successk = Attribute("SuccessK", + "Multiplication factor for the success threshold in the AARF algorithm.", + type = Types.Double, + default = "2", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_successk) + + attr_timerk = Attribute("TimerK", + "Multiplication factor for the timer threshold in the AARF algorithm.", + type = Types.Double, + default = "2", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_timerk) + + attr_maxsuccessthreshold = Attribute("MaxSuccessThreshold", + "Maximum value of the success threshold in the AARF algorithm.", + type = Types.Integer, + default = "60", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxsuccessthreshold) + + attr_mintimerthreshold = Attribute("MinTimerThreshold", + "The minimum value for the \'timer\' threshold in the AARF algorithm.", + type = Types.Integer, + default = "15", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_mintimerthreshold) + + attr_minsuccessthreshold = Attribute("MinSuccessThreshold", + "The minimum value for the success threshold in the AARF algorithm.", + type = Types.Integer, + default = "10", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_minsuccessthreshold) + + attr_islowlatency = Attribute("IsLowLatency", + "If true, we attempt to modelize a so-called low-latency device: a device where decisions about tx parameters can be made on a per-packet basis and feedback about the transmission of each packet is obtained before sending the next. Otherwise, we modelize a high-latency device, that is a device where we cannot update our decision about tx parameters after every packet transmission.", + type = Types.Bool, + default = "True", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_islowlatency) + + attr_maxssrc = Attribute("MaxSsrc", + "The maximum number of retransmission attempts for an RTS. This value will not have any effect on some rate control algorithms.", + type = Types.Integer, + default = "7", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxssrc) + + attr_maxslrc = Attribute("MaxSlrc", + "The maximum number of retransmission attempts for a DATA packet. This value will not have any effect on some rate control algorithms.", + type = Types.Integer, + default = "7", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxslrc) + + attr_rtsctsthreshold = Attribute("RtsCtsThreshold", + "If the size of the data packet + LLC header + MAC header + FCS trailer is bigger than this value, we use an RTS/CTS handshake before sending the data, as per IEEE Std. 802.11-2012, Section 9.3.5. This value will not have any effect on some rate control algorithms.", + type = Types.Integer, + default = "2346", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_rtsctsthreshold) + + attr_fragmentationthreshold = Attribute("FragmentationThreshold", + "If the size of the data packet + LLC header + MAC header + FCS trailer is biggerthan this value, we fragment it such that the size of the fragments are equal or smaller than this value, as per IEEE Std. 802.11-2012, Section 9.5. This value will not have any effect on some rate control algorithms.", + type = Types.Integer, + default = "2346", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_fragmentationthreshold) + + attr_nonunicastmode = Attribute("NonUnicastMode", + "Wifi mode used for non-unicast transmissions.", + type = Types.String, + default = "Invalid-WifiMode", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_nonunicastmode) + + attr_defaulttxpowerlevel = Attribute("DefaultTxPowerLevel", + "Default power level to be used for transmissions. This is the power level that is used by all those WifiManagers that do notimplement TX power control.", + type = Types.Integer, + default = "0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_defaulttxpowerlevel) + + + + @classmethod + def _register_traces(cls): + + mactxrtsfailed = Trace("MacTxRtsFailed", "The transmission of a RTS by the MAC layer has failed") + + cls._register_trace(mactxrtsfailed) + + mactxdatafailed = Trace("MacTxDataFailed", "The transmission of a data packet by the MAC layer has failed") + + cls._register_trace(mactxdatafailed) + + mactxfinalrtsfailed = Trace("MacTxFinalRtsFailed", "The transmission of a RTS has exceeded the maximum number of attempts") + + cls._register_trace(mactxfinalrtsfailed) + + mactxfinaldatafailed = Trace("MacTxFinalDataFailed", "The transmission of a data packet has exceeded the maximum number of attempts") + + cls._register_trace(mactxfinaldatafailed) + + + + def __init__(self, ec, guid): + super(NS3AarfWifiManager, self).__init__(ec, guid) + self._home = "ns3-aarf-wifi-manager-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/aarfcd_wifi_manager.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/aarfcd_wifi_manager.html new file mode 100644 index 00000000..171bd476 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/aarfcd_wifi_manager.html @@ -0,0 +1,308 @@ + + + + + + + + nepi.resources.ns3.classes.aarfcd_wifi_manager — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.aarfcd_wifi_manager

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3wifiremotestationmanager import NS3BaseWifiRemoteStationManager 
+
+@clsinit_copy
+
[docs]class NS3AarfcdWifiManager(NS3BaseWifiRemoteStationManager): + _rtype = "ns3::AarfcdWifiManager" + + @classmethod + def _register_attributes(cls): + + attr_successk = Attribute("SuccessK", + "Multiplication factor for the success threshold in the AARF algorithm.", + type = Types.Double, + default = "2", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_successk) + + attr_timerk = Attribute("TimerK", + "Multiplication factor for the timer threshold in the AARF algorithm.", + type = Types.Double, + default = "2", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_timerk) + + attr_maxsuccessthreshold = Attribute("MaxSuccessThreshold", + "Maximum value of the success threshold in the AARF algorithm.", + type = Types.Integer, + default = "60", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxsuccessthreshold) + + attr_mintimerthreshold = Attribute("MinTimerThreshold", + "The minimum value for the \'timer\' threshold in the AARF algorithm.", + type = Types.Integer, + default = "15", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_mintimerthreshold) + + attr_minsuccessthreshold = Attribute("MinSuccessThreshold", + "The minimum value for the success threshold in the AARF algorithm.", + type = Types.Integer, + default = "10", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_minsuccessthreshold) + + attr_minrtswnd = Attribute("MinRtsWnd", + "Minimum value for Rts window of Aarf-CD", + type = Types.Integer, + default = "1", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_minrtswnd) + + attr_maxrtswnd = Attribute("MaxRtsWnd", + "Maximum value for Rts window of Aarf-CD", + type = Types.Integer, + default = "40", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxrtswnd) + + attr_turnoffrtsafterratedecrease = Attribute("TurnOffRtsAfterRateDecrease", + "If true the RTS mechanism will be turned off when the rate will be decreased", + type = Types.Bool, + default = "True", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_turnoffrtsafterratedecrease) + + attr_turnonrtsafterrateincrease = Attribute("TurnOnRtsAfterRateIncrease", + "If true the RTS mechanism will be turned on when the rate will be increased", + type = Types.Bool, + default = "True", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_turnonrtsafterrateincrease) + + attr_islowlatency = Attribute("IsLowLatency", + "If true, we attempt to modelize a so-called low-latency device: a device where decisions about tx parameters can be made on a per-packet basis and feedback about the transmission of each packet is obtained before sending the next. Otherwise, we modelize a high-latency device, that is a device where we cannot update our decision about tx parameters after every packet transmission.", + type = Types.Bool, + default = "True", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_islowlatency) + + attr_maxssrc = Attribute("MaxSsrc", + "The maximum number of retransmission attempts for an RTS. This value will not have any effect on some rate control algorithms.", + type = Types.Integer, + default = "7", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxssrc) + + attr_maxslrc = Attribute("MaxSlrc", + "The maximum number of retransmission attempts for a DATA packet. This value will not have any effect on some rate control algorithms.", + type = Types.Integer, + default = "7", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxslrc) + + attr_rtsctsthreshold = Attribute("RtsCtsThreshold", + "If the size of the data packet + LLC header + MAC header + FCS trailer is bigger than this value, we use an RTS/CTS handshake before sending the data, as per IEEE Std. 802.11-2012, Section 9.3.5. This value will not have any effect on some rate control algorithms.", + type = Types.Integer, + default = "2346", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_rtsctsthreshold) + + attr_fragmentationthreshold = Attribute("FragmentationThreshold", + "If the size of the data packet + LLC header + MAC header + FCS trailer is biggerthan this value, we fragment it such that the size of the fragments are equal or smaller than this value, as per IEEE Std. 802.11-2012, Section 9.5. This value will not have any effect on some rate control algorithms.", + type = Types.Integer, + default = "2346", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_fragmentationthreshold) + + attr_nonunicastmode = Attribute("NonUnicastMode", + "Wifi mode used for non-unicast transmissions.", + type = Types.String, + default = "Invalid-WifiMode", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_nonunicastmode) + + attr_defaulttxpowerlevel = Attribute("DefaultTxPowerLevel", + "Default power level to be used for transmissions. This is the power level that is used by all those WifiManagers that do notimplement TX power control.", + type = Types.Integer, + default = "0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_defaulttxpowerlevel) + + + + @classmethod + def _register_traces(cls): + + mactxrtsfailed = Trace("MacTxRtsFailed", "The transmission of a RTS by the MAC layer has failed") + + cls._register_trace(mactxrtsfailed) + + mactxdatafailed = Trace("MacTxDataFailed", "The transmission of a data packet by the MAC layer has failed") + + cls._register_trace(mactxdatafailed) + + mactxfinalrtsfailed = Trace("MacTxFinalRtsFailed", "The transmission of a RTS has exceeded the maximum number of attempts") + + cls._register_trace(mactxfinalrtsfailed) + + mactxfinaldatafailed = Trace("MacTxFinalDataFailed", "The transmission of a data packet has exceeded the maximum number of attempts") + + cls._register_trace(mactxfinaldatafailed) + + + + def __init__(self, ec, guid): + super(NS3AarfcdWifiManager, self).__init__(ec, guid) + self._home = "ns3-aarfcd-wifi-manager-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/adhoc_wifi_mac.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/adhoc_wifi_mac.html new file mode 100644 index 00000000..87e71c70 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/adhoc_wifi_mac.html @@ -0,0 +1,300 @@ + + + + + + + + nepi.resources.ns3.classes.adhoc_wifi_mac — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.adhoc_wifi_mac

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3wifimac import NS3BaseWifiMac 
+
+@clsinit_copy
+
[docs]class NS3AdhocWifiMac(NS3BaseWifiMac): + _rtype = "ns3::AdhocWifiMac" + + @classmethod + def _register_attributes(cls): + + attr_qossupported = Attribute("QosSupported", + "This Boolean attribute is set to enable 802.11e/WMM-style QoS support at this STA", + type = Types.Bool, + default = "False", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_qossupported) + + attr_htsupported = Attribute("HtSupported", + "This Boolean attribute is set to enable 802.11n support at this STA", + type = Types.Bool, + default = "False", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_htsupported) + + attr_ctstoselfsupported = Attribute("CtsToSelfSupported", + "Use CTS to Self when using a rate that is not in the basic set rate", + type = Types.Bool, + default = "False", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_ctstoselfsupported) + + attr_ctstimeout = Attribute("CtsTimeout", + "When this timeout expires, the RTS/CTS handshake has failed.", + type = Types.String, + default = "+75000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_ctstimeout) + + attr_acktimeout = Attribute("AckTimeout", + "When this timeout expires, the DATA/ACK handshake has failed.", + type = Types.String, + default = "+75000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_acktimeout) + + attr_basicblockacktimeout = Attribute("BasicBlockAckTimeout", + "When this timeout expires, the BASIC_BLOCK_ACK_REQ/BASIC_BLOCK_ACK handshake has failed.", + type = Types.String, + default = "+281000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_basicblockacktimeout) + + attr_compressedblockacktimeout = Attribute("CompressedBlockAckTimeout", + "When this timeout expires, the COMPRESSED_BLOCK_ACK_REQ/COMPRESSED_BLOCK_ACK handshake has failed.", + type = Types.String, + default = "+107000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_compressedblockacktimeout) + + attr_sifs = Attribute("Sifs", + "The value of the SIFS constant.", + type = Types.String, + default = "+16000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_sifs) + + attr_eifsnodifs = Attribute("EifsNoDifs", + "The value of EIFS-DIFS", + type = Types.String, + default = "+60000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_eifsnodifs) + + attr_slot = Attribute("Slot", + "The duration of a Slot.", + type = Types.String, + default = "+9000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_slot) + + attr_pifs = Attribute("Pifs", + "The value of the PIFS constant.", + type = Types.String, + default = "+25000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_pifs) + + attr_rifs = Attribute("Rifs", + "The value of the RIFS constant.", + type = Types.String, + default = "+2000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_rifs) + + attr_maxpropagationdelay = Attribute("MaxPropagationDelay", + "The maximum propagation delay. Unused for now.", + type = Types.String, + default = "+3333.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxpropagationdelay) + + attr_ssid = Attribute("Ssid", + "The ssid we want to belong to.", + type = Types.String, + default = "default", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_ssid) + + + + @classmethod + def _register_traces(cls): + + txokheader = Trace("TxOkHeader", "The header of successfully transmitted packet") + + cls._register_trace(txokheader) + + txerrheader = Trace("TxErrHeader", "The header of unsuccessfully transmitted packet") + + cls._register_trace(txerrheader) + + mactx = Trace("MacTx", "A packet has been received from higher layers and is being processed in preparation for queueing for transmission.") + + cls._register_trace(mactx) + + mactxdrop = Trace("MacTxDrop", "A packet has been dropped in the MAC layer before being queued for transmission.") + + cls._register_trace(mactxdrop) + + macpromiscrx = Trace("MacPromiscRx", "A packet has been received by this device, has been passed up from the physical layer and is being forwarded up the local protocol stack. This is a promiscuous trace,") + + cls._register_trace(macpromiscrx) + + macrx = Trace("MacRx", "A packet has been received by this device, has been passed up from the physical layer and is being forwarded up the local protocol stack. This is a non-promiscuous trace,") + + cls._register_trace(macrx) + + macrxdrop = Trace("MacRxDrop", "A packet has been dropped in the MAC layer after it has been passed up from the physical layer.") + + cls._register_trace(macrxdrop) + + + + def __init__(self, ec, guid): + super(NS3AdhocWifiMac, self).__init__(ec, guid) + self._home = "ns3-adhoc-wifi-mac-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/aloha_noack_net_device.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/aloha_noack_net_device.html new file mode 100644 index 00000000..92e63c07 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/aloha_noack_net_device.html @@ -0,0 +1,168 @@ + + + + + + + + nepi.resources.ns3.classes.aloha_noack_net_device — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.aloha_noack_net_device

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3netdevice import NS3BaseNetDevice 
+
+@clsinit_copy
+
[docs]class NS3AlohaNoackNetDevice(NS3BaseNetDevice): + _rtype = "ns3::AlohaNoackNetDevice" + + @classmethod + def _register_attributes(cls): + + attr_address = Attribute("Address", + "The MAC address of this device.", + type = Types.String, + default = "12:34:56:78:90:12", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_address) + + attr_mtu = Attribute("Mtu", + "The Maximum Transmission Unit", + type = Types.Integer, + default = "1500", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_mtu) + + + + @classmethod + def _register_traces(cls): + + mactx = Trace("MacTx", "Trace source indicating a packet has arrived for transmission by this device") + + cls._register_trace(mactx) + + mactxdrop = Trace("MacTxDrop", "Trace source indicating a packet has been dropped by the device before transmission") + + cls._register_trace(mactxdrop) + + macpromiscrx = Trace("MacPromiscRx", "A packet has been received by this device, has been passed up from the physical layer and is being forwarded up the local protocol stack. This is a promiscuous trace,") + + cls._register_trace(macpromiscrx) + + macrx = Trace("MacRx", "A packet has been received by this device, has been passed up from the physical layer and is being forwarded up the local protocol stack. This is a non-promiscuous trace,") + + cls._register_trace(macrx) + + + + def __init__(self, ec, guid): + super(NS3AlohaNoackNetDevice, self).__init__(ec, guid) + self._home = "ns3-aloha-noack-net-device-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/amrr_wifi_manager.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/amrr_wifi_manager.html new file mode 100644 index 00000000..24d667cd --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/amrr_wifi_manager.html @@ -0,0 +1,268 @@ + + + + + + + + nepi.resources.ns3.classes.amrr_wifi_manager — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.amrr_wifi_manager

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3wifiremotestationmanager import NS3BaseWifiRemoteStationManager 
+
+@clsinit_copy
+
[docs]class NS3AmrrWifiManager(NS3BaseWifiRemoteStationManager): + _rtype = "ns3::AmrrWifiManager" + + @classmethod + def _register_attributes(cls): + + attr_updateperiod = Attribute("UpdatePeriod", + "The interval between decisions about rate control changes", + type = Types.String, + default = "+1000000000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_updateperiod) + + attr_failureratio = Attribute("FailureRatio", + "Ratio of minimum erroneous transmissions needed to switch to a lower rate", + type = Types.Double, + default = "0.333333", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_failureratio) + + attr_successratio = Attribute("SuccessRatio", + "Ratio of maximum erroneous transmissions needed to switch to a higher rate", + type = Types.Double, + default = "0.1", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_successratio) + + attr_maxsuccessthreshold = Attribute("MaxSuccessThreshold", + "Maximum number of consecutive success periods needed to switch to a higher rate", + type = Types.Integer, + default = "10", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxsuccessthreshold) + + attr_minsuccessthreshold = Attribute("MinSuccessThreshold", + "Minimum number of consecutive success periods needed to switch to a higher rate", + type = Types.Integer, + default = "1", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_minsuccessthreshold) + + attr_islowlatency = Attribute("IsLowLatency", + "If true, we attempt to modelize a so-called low-latency device: a device where decisions about tx parameters can be made on a per-packet basis and feedback about the transmission of each packet is obtained before sending the next. Otherwise, we modelize a high-latency device, that is a device where we cannot update our decision about tx parameters after every packet transmission.", + type = Types.Bool, + default = "True", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_islowlatency) + + attr_maxssrc = Attribute("MaxSsrc", + "The maximum number of retransmission attempts for an RTS. This value will not have any effect on some rate control algorithms.", + type = Types.Integer, + default = "7", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxssrc) + + attr_maxslrc = Attribute("MaxSlrc", + "The maximum number of retransmission attempts for a DATA packet. This value will not have any effect on some rate control algorithms.", + type = Types.Integer, + default = "7", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxslrc) + + attr_rtsctsthreshold = Attribute("RtsCtsThreshold", + "If the size of the data packet + LLC header + MAC header + FCS trailer is bigger than this value, we use an RTS/CTS handshake before sending the data, as per IEEE Std. 802.11-2012, Section 9.3.5. This value will not have any effect on some rate control algorithms.", + type = Types.Integer, + default = "2346", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_rtsctsthreshold) + + attr_fragmentationthreshold = Attribute("FragmentationThreshold", + "If the size of the data packet + LLC header + MAC header + FCS trailer is biggerthan this value, we fragment it such that the size of the fragments are equal or smaller than this value, as per IEEE Std. 802.11-2012, Section 9.5. This value will not have any effect on some rate control algorithms.", + type = Types.Integer, + default = "2346", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_fragmentationthreshold) + + attr_nonunicastmode = Attribute("NonUnicastMode", + "Wifi mode used for non-unicast transmissions.", + type = Types.String, + default = "Invalid-WifiMode", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_nonunicastmode) + + attr_defaulttxpowerlevel = Attribute("DefaultTxPowerLevel", + "Default power level to be used for transmissions. This is the power level that is used by all those WifiManagers that do notimplement TX power control.", + type = Types.Integer, + default = "0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_defaulttxpowerlevel) + + + + @classmethod + def _register_traces(cls): + + mactxrtsfailed = Trace("MacTxRtsFailed", "The transmission of a RTS by the MAC layer has failed") + + cls._register_trace(mactxrtsfailed) + + mactxdatafailed = Trace("MacTxDataFailed", "The transmission of a data packet by the MAC layer has failed") + + cls._register_trace(mactxdatafailed) + + mactxfinalrtsfailed = Trace("MacTxFinalRtsFailed", "The transmission of a RTS has exceeded the maximum number of attempts") + + cls._register_trace(mactxfinalrtsfailed) + + mactxfinaldatafailed = Trace("MacTxFinalDataFailed", "The transmission of a data packet has exceeded the maximum number of attempts") + + cls._register_trace(mactxfinaldatafailed) + + + + def __init__(self, ec, guid): + super(NS3AmrrWifiManager, self).__init__(ec, guid) + self._home = "ns3-amrr-wifi-manager-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/ap_wifi_mac.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/ap_wifi_mac.html new file mode 100644 index 00000000..745cddc4 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/ap_wifi_mac.html @@ -0,0 +1,340 @@ + + + + + + + + nepi.resources.ns3.classes.ap_wifi_mac — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.ap_wifi_mac

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3wifimac import NS3BaseWifiMac 
+
+@clsinit_copy
+
[docs]class NS3ApWifiMac(NS3BaseWifiMac): + _rtype = "ns3::ApWifiMac" + + @classmethod + def _register_attributes(cls): + + attr_beaconinterval = Attribute("BeaconInterval", + "Delay between two beacons", + type = Types.String, + default = "+102400000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_beaconinterval) + + attr_beaconjitter = Attribute("BeaconJitter", + "A uniform random variable to cause the initial beacon starting time (after simulation time 0) to be distributed between 0 and the BeaconInterval.", + type = Types.String, + default = "ns3::UniformRandomVariable", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_beaconjitter) + + attr_enablebeaconjitter = Attribute("EnableBeaconJitter", + "If beacons are enabled, whether to jitter the initial send event.", + type = Types.Bool, + default = "False", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_enablebeaconjitter) + + attr_beacongeneration = Attribute("BeaconGeneration", + "Whether or not beacons are generated.", + type = Types.Bool, + default = "True", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_beacongeneration) + + attr_qossupported = Attribute("QosSupported", + "This Boolean attribute is set to enable 802.11e/WMM-style QoS support at this STA", + type = Types.Bool, + default = "False", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_qossupported) + + attr_htsupported = Attribute("HtSupported", + "This Boolean attribute is set to enable 802.11n support at this STA", + type = Types.Bool, + default = "False", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_htsupported) + + attr_ctstoselfsupported = Attribute("CtsToSelfSupported", + "Use CTS to Self when using a rate that is not in the basic set rate", + type = Types.Bool, + default = "False", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_ctstoselfsupported) + + attr_ctstimeout = Attribute("CtsTimeout", + "When this timeout expires, the RTS/CTS handshake has failed.", + type = Types.String, + default = "+75000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_ctstimeout) + + attr_acktimeout = Attribute("AckTimeout", + "When this timeout expires, the DATA/ACK handshake has failed.", + type = Types.String, + default = "+75000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_acktimeout) + + attr_basicblockacktimeout = Attribute("BasicBlockAckTimeout", + "When this timeout expires, the BASIC_BLOCK_ACK_REQ/BASIC_BLOCK_ACK handshake has failed.", + type = Types.String, + default = "+281000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_basicblockacktimeout) + + attr_compressedblockacktimeout = Attribute("CompressedBlockAckTimeout", + "When this timeout expires, the COMPRESSED_BLOCK_ACK_REQ/COMPRESSED_BLOCK_ACK handshake has failed.", + type = Types.String, + default = "+107000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_compressedblockacktimeout) + + attr_sifs = Attribute("Sifs", + "The value of the SIFS constant.", + type = Types.String, + default = "+16000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_sifs) + + attr_eifsnodifs = Attribute("EifsNoDifs", + "The value of EIFS-DIFS", + type = Types.String, + default = "+60000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_eifsnodifs) + + attr_slot = Attribute("Slot", + "The duration of a Slot.", + type = Types.String, + default = "+9000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_slot) + + attr_pifs = Attribute("Pifs", + "The value of the PIFS constant.", + type = Types.String, + default = "+25000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_pifs) + + attr_rifs = Attribute("Rifs", + "The value of the RIFS constant.", + type = Types.String, + default = "+2000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_rifs) + + attr_maxpropagationdelay = Attribute("MaxPropagationDelay", + "The maximum propagation delay. Unused for now.", + type = Types.String, + default = "+3333.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxpropagationdelay) + + attr_ssid = Attribute("Ssid", + "The ssid we want to belong to.", + type = Types.String, + default = "default", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_ssid) + + + + @classmethod + def _register_traces(cls): + + txokheader = Trace("TxOkHeader", "The header of successfully transmitted packet") + + cls._register_trace(txokheader) + + txerrheader = Trace("TxErrHeader", "The header of unsuccessfully transmitted packet") + + cls._register_trace(txerrheader) + + mactx = Trace("MacTx", "A packet has been received from higher layers and is being processed in preparation for queueing for transmission.") + + cls._register_trace(mactx) + + mactxdrop = Trace("MacTxDrop", "A packet has been dropped in the MAC layer before being queued for transmission.") + + cls._register_trace(mactxdrop) + + macpromiscrx = Trace("MacPromiscRx", "A packet has been received by this device, has been passed up from the physical layer and is being forwarded up the local protocol stack. This is a promiscuous trace,") + + cls._register_trace(macpromiscrx) + + macrx = Trace("MacRx", "A packet has been received by this device, has been passed up from the physical layer and is being forwarded up the local protocol stack. This is a non-promiscuous trace,") + + cls._register_trace(macrx) + + macrxdrop = Trace("MacRxDrop", "A packet has been dropped in the MAC layer after it has been passed up from the physical layer.") + + cls._register_trace(macrxdrop) + + + + def __init__(self, ec, guid): + super(NS3ApWifiMac, self).__init__(ec, guid) + self._home = "ns3-ap-wifi-mac-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/arf_wifi_manager.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/arf_wifi_manager.html new file mode 100644 index 00000000..7985d569 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/arf_wifi_manager.html @@ -0,0 +1,238 @@ + + + + + + + + nepi.resources.ns3.classes.arf_wifi_manager — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.arf_wifi_manager

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3wifiremotestationmanager import NS3BaseWifiRemoteStationManager 
+
+@clsinit_copy
+
[docs]class NS3ArfWifiManager(NS3BaseWifiRemoteStationManager): + _rtype = "ns3::ArfWifiManager" + + @classmethod + def _register_attributes(cls): + + attr_timerthreshold = Attribute("TimerThreshold", + "The \'timer\' threshold in the ARF algorithm.", + type = Types.Integer, + default = "15", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_timerthreshold) + + attr_successthreshold = Attribute("SuccessThreshold", + "The minimum number of sucessfull transmissions to try a new rate.", + type = Types.Integer, + default = "10", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_successthreshold) + + attr_islowlatency = Attribute("IsLowLatency", + "If true, we attempt to modelize a so-called low-latency device: a device where decisions about tx parameters can be made on a per-packet basis and feedback about the transmission of each packet is obtained before sending the next. Otherwise, we modelize a high-latency device, that is a device where we cannot update our decision about tx parameters after every packet transmission.", + type = Types.Bool, + default = "True", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_islowlatency) + + attr_maxssrc = Attribute("MaxSsrc", + "The maximum number of retransmission attempts for an RTS. This value will not have any effect on some rate control algorithms.", + type = Types.Integer, + default = "7", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxssrc) + + attr_maxslrc = Attribute("MaxSlrc", + "The maximum number of retransmission attempts for a DATA packet. This value will not have any effect on some rate control algorithms.", + type = Types.Integer, + default = "7", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxslrc) + + attr_rtsctsthreshold = Attribute("RtsCtsThreshold", + "If the size of the data packet + LLC header + MAC header + FCS trailer is bigger than this value, we use an RTS/CTS handshake before sending the data, as per IEEE Std. 802.11-2012, Section 9.3.5. This value will not have any effect on some rate control algorithms.", + type = Types.Integer, + default = "2346", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_rtsctsthreshold) + + attr_fragmentationthreshold = Attribute("FragmentationThreshold", + "If the size of the data packet + LLC header + MAC header + FCS trailer is biggerthan this value, we fragment it such that the size of the fragments are equal or smaller than this value, as per IEEE Std. 802.11-2012, Section 9.5. This value will not have any effect on some rate control algorithms.", + type = Types.Integer, + default = "2346", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_fragmentationthreshold) + + attr_nonunicastmode = Attribute("NonUnicastMode", + "Wifi mode used for non-unicast transmissions.", + type = Types.String, + default = "Invalid-WifiMode", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_nonunicastmode) + + attr_defaulttxpowerlevel = Attribute("DefaultTxPowerLevel", + "Default power level to be used for transmissions. This is the power level that is used by all those WifiManagers that do notimplement TX power control.", + type = Types.Integer, + default = "0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_defaulttxpowerlevel) + + + + @classmethod + def _register_traces(cls): + + mactxrtsfailed = Trace("MacTxRtsFailed", "The transmission of a RTS by the MAC layer has failed") + + cls._register_trace(mactxrtsfailed) + + mactxdatafailed = Trace("MacTxDataFailed", "The transmission of a data packet by the MAC layer has failed") + + cls._register_trace(mactxdatafailed) + + mactxfinalrtsfailed = Trace("MacTxFinalRtsFailed", "The transmission of a RTS has exceeded the maximum number of attempts") + + cls._register_trace(mactxfinalrtsfailed) + + mactxfinaldatafailed = Trace("MacTxFinalDataFailed", "The transmission of a data packet has exceeded the maximum number of attempts") + + cls._register_trace(mactxfinaldatafailed) + + + + def __init__(self, ec, guid): + super(NS3ArfWifiManager, self).__init__(ec, guid) + self._home = "ns3-arf-wifi-manager-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/arp_l3protocol.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/arp_l3protocol.html new file mode 100644 index 00000000..7eb70fe4 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/arp_l3protocol.html @@ -0,0 +1,146 @@ + + + + + + + + nepi.resources.ns3.classes.arp_l3protocol — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.arp_l3protocol

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3arpl3protocol import NS3BaseArpL3Protocol 
+
+@clsinit_copy
+
[docs]class NS3ArpL3Protocol(NS3BaseArpL3Protocol): + _rtype = "ns3::ArpL3Protocol" + + @classmethod + def _register_attributes(cls): + + attr_requestjitter = Attribute("RequestJitter", + "The jitter in ms a node is allowed to wait before sending an ARP request. Some jitter aims to prevent collisions. By default, the model will wait for a duration in ms defined by a uniform random-variable between 0 and RequestJitter", + type = Types.String, + default = "ns3::UniformRandomVariable[Min=0.0|Max=10.0]", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_requestjitter) + + + + @classmethod + def _register_traces(cls): + + drop = Trace("Drop", "Packet dropped because not enough room in pending queue for a specific cache entry.") + + cls._register_trace(drop) + + + + def __init__(self, ec, guid): + super(NS3ArpL3Protocol, self).__init__(ec, guid) + self._home = "ns3-arp-l3protocol-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/base_station_net_device.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/base_station_net_device.html new file mode 100644 index 00000000..72e712ce --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/base_station_net_device.html @@ -0,0 +1,260 @@ + + + + + + + + nepi.resources.ns3.classes.base_station_net_device — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.base_station_net_device

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3netdevice import NS3BaseNetDevice 
+
+@clsinit_copy
+
[docs]class NS3BaseStationNetDevice(NS3BaseNetDevice): + _rtype = "ns3::BaseStationNetDevice" + + @classmethod + def _register_attributes(cls): + + attr_initialranginterval = Attribute("InitialRangInterval", + "Time between Initial Ranging regions assigned by the BS. Maximum is 2s", + type = Types.String, + default = "+50000000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_initialranginterval) + + attr_dcdinterval = Attribute("DcdInterval", + "Time between transmission of DCD messages. Maximum value is 10s.", + type = Types.String, + default = "+3000000000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_dcdinterval) + + attr_ucdinterval = Attribute("UcdInterval", + "Time between transmission of UCD messages. Maximum value is 10s.", + type = Types.String, + default = "+3000000000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_ucdinterval) + + attr_intervalt8 = Attribute("IntervalT8", + "Wait for DSA/DSC Acknowledge timeout. Maximum 300ms.", + type = Types.String, + default = "+50000000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_intervalt8) + + attr_rangreqoppsize = Attribute("RangReqOppSize", + "The ranging opportunity size in symbols", + type = Types.Integer, + default = "8", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_rangreqoppsize) + + attr_bwreqoppsize = Attribute("BwReqOppSize", + "The bandwidth request opportunity size in symbols", + type = Types.Integer, + default = "2", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_bwreqoppsize) + + attr_maxrangcorrectionretries = Attribute("MaxRangCorrectionRetries", + "Number of retries on contention Ranging Requests", + type = Types.Integer, + default = "16", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxrangcorrectionretries) + + attr_mtu = Attribute("Mtu", + "The MAC-level Maximum Transmission Unit", + type = Types.Integer, + default = "1400", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_mtu) + + attr_rtg = Attribute("RTG", + "receive/transmit transition gap.", + type = Types.Integer, + default = "0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_rtg) + + attr_ttg = Attribute("TTG", + "transmit/receive transition gap.", + type = Types.Integer, + default = "0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_ttg) + + + + @classmethod + def _register_traces(cls): + + bstx = Trace("BSTx", "A packet has been received from higher layers and is being processed in preparation for queueing for transmission.") + + cls._register_trace(bstx) + + bstxdrop = Trace("BSTxDrop", "A packet has been dropped in the MAC layer before being queued for transmission.") + + cls._register_trace(bstxdrop) + + bspromiscrx = Trace("BSPromiscRx", "A packet has been received by this device, has been passed up from the physical layer and is being forwarded up the local protocol stack. This is a promiscuous trace,") + + cls._register_trace(bspromiscrx) + + bsrx = Trace("BSRx", "A packet has been received by this device, has been passed up from the physical layer and is being forwarded up the local protocol stack. This is a non-promiscuous trace,") + + cls._register_trace(bsrx) + + bsrxdrop = Trace("BSRxDrop", "A packet has been dropped in the MAC layer after it has been passed up from the physical layer.") + + cls._register_trace(bsrxdrop) + + rx = Trace("Rx", "Receive trace") + + cls._register_trace(rx) + + tx = Trace("Tx", "Transmit trace") + + cls._register_trace(tx) + + + + def __init__(self, ec, guid): + super(NS3BaseStationNetDevice, self).__init__(ec, guid) + self._home = "ns3-base-station-net-device-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/binary_error_model.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/binary_error_model.html new file mode 100644 index 00000000..3c6de282 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/binary_error_model.html @@ -0,0 +1,141 @@ + + + + + + + + nepi.resources.ns3.classes.binary_error_model — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.binary_error_model

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3errormodel import NS3BaseErrorModel 
+
+@clsinit_copy
+
[docs]class NS3BinaryErrorModel(NS3BaseErrorModel): + _rtype = "ns3::BinaryErrorModel" + + @classmethod + def _register_attributes(cls): + + attr_isenabled = Attribute("IsEnabled", + "Whether this ErrorModel is enabled or not.", + type = Types.Bool, + default = "True", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_isenabled) + + + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3BinaryErrorModel, self).__init__(ec, guid) + self._home = "ns3-binary-error-model-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/binary_error_sixlow_model.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/binary_error_sixlow_model.html new file mode 100644 index 00000000..c31a7e7d --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/binary_error_sixlow_model.html @@ -0,0 +1,141 @@ + + + + + + + + nepi.resources.ns3.classes.binary_error_sixlow_model — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.binary_error_sixlow_model

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3errormodel import NS3BaseErrorModel 
+
+@clsinit_copy
+
[docs]class NS3BinaryErrorSixlowModel(NS3BaseErrorModel): + _rtype = "ns3::BinaryErrorSixlowModel" + + @classmethod + def _register_attributes(cls): + + attr_isenabled = Attribute("IsEnabled", + "Whether this ErrorModel is enabled or not.", + type = Types.Bool, + default = "True", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_isenabled) + + + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3BinaryErrorSixlowModel, self).__init__(ec, guid) + self._home = "ns3-binary-error-sixlow-model-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/bridge_channel.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/bridge_channel.html new file mode 100644 index 00000000..0477b2f7 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/bridge_channel.html @@ -0,0 +1,141 @@ + + + + + + + + nepi.resources.ns3.classes.bridge_channel — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.bridge_channel

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3channel import NS3BaseChannel 
+
+@clsinit_copy
+
[docs]class NS3BridgeChannel(NS3BaseChannel): + _rtype = "ns3::BridgeChannel" + + @classmethod + def _register_attributes(cls): + + attr_id = Attribute("Id", + "The id (unique integer) of this Channel.", + type = Types.Integer, + default = "0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.NoWrite) + + cls._register_attribute(attr_id) + + + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3BridgeChannel, self).__init__(ec, guid) + self._home = "ns3-bridge-channel-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/bridge_net_device.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/bridge_net_device.html new file mode 100644 index 00000000..ad5f76f9 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/bridge_net_device.html @@ -0,0 +1,161 @@ + + + + + + + + nepi.resources.ns3.classes.bridge_net_device — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.bridge_net_device

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3netdevice import NS3BaseNetDevice 
+
+@clsinit_copy
+
[docs]class NS3BridgeNetDevice(NS3BaseNetDevice): + _rtype = "ns3::BridgeNetDevice" + + @classmethod + def _register_attributes(cls): + + attr_mtu = Attribute("Mtu", + "The MAC-level Maximum Transmission Unit", + type = Types.Integer, + default = "1500", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_mtu) + + attr_enablelearning = Attribute("EnableLearning", + "Enable the learning mode of the Learning Bridge", + type = Types.Bool, + default = "True", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_enablelearning) + + attr_expirationtime = Attribute("ExpirationTime", + "Time it takes for learned MAC state entry to expire.", + type = Types.String, + default = "+300000000000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_expirationtime) + + + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3BridgeNetDevice, self).__init__(ec, guid) + self._home = "ns3-bridge-net-device-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/bulk_send_application.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/bulk_send_application.html new file mode 100644 index 00000000..ecefa443 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/bulk_send_application.html @@ -0,0 +1,196 @@ + + + + + + + + nepi.resources.ns3.classes.bulk_send_application — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.bulk_send_application

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3application import NS3BaseApplication 
+
+@clsinit_copy
+
[docs]class NS3BulkSendApplication(NS3BaseApplication): + _rtype = "ns3::BulkSendApplication" + + @classmethod + def _register_attributes(cls): + + attr_sendsize = Attribute("SendSize", + "The amount of data to send each time.", + type = Types.Integer, + default = "512", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_sendsize) + + attr_remote = Attribute("Remote", + "The address of the destination", + type = Types.String, + default = "00-00-00", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_remote) + + attr_maxbytes = Attribute("MaxBytes", + "The total number of bytes to send. Once these bytes are sent, no data is sent again. The value zero means that there is no limit.", + type = Types.Integer, + default = "0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxbytes) + + attr_protocol = Attribute("Protocol", + "The type of protocol to use.", + type = Types.String, + default = "ns3::TcpSocketFactory", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_protocol) + + attr_starttime = Attribute("StartTime", + "Time at which the application will start", + type = Types.String, + default = "+0.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_starttime) + + attr_stoptime = Attribute("StopTime", + "Time at which the application will stop", + type = Types.String, + default = "+0.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_stoptime) + + + + @classmethod + def _register_traces(cls): + + tx = Trace("Tx", "A new packet is created and is sent") + + cls._register_trace(tx) + + + + def __init__(self, ec, guid): + super(NS3BulkSendApplication, self).__init__(ec, guid) + self._home = "ns3-bulk-send-application-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/burst_error_model.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/burst_error_model.html new file mode 100644 index 00000000..a26a704e --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/burst_error_model.html @@ -0,0 +1,171 @@ + + + + + + + + nepi.resources.ns3.classes.burst_error_model — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.burst_error_model

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3errormodel import NS3BaseErrorModel 
+
+@clsinit_copy
+
[docs]class NS3BurstErrorModel(NS3BaseErrorModel): + _rtype = "ns3::BurstErrorModel" + + @classmethod + def _register_attributes(cls): + + attr_errorrate = Attribute("ErrorRate", + "The burst error event.", + type = Types.Double, + default = "0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_errorrate) + + attr_burststart = Attribute("BurstStart", + "The decision variable attached to this error model.", + type = Types.String, + default = "ns3::UniformRandomVariable[Min=0.0|Max=1.0]", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_burststart) + + attr_burstsize = Attribute("BurstSize", + "The number of packets being corrupted at one drop.", + type = Types.String, + default = "ns3::UniformRandomVariable[Min=1|Max=4]", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_burstsize) + + attr_isenabled = Attribute("IsEnabled", + "Whether this ErrorModel is enabled or not.", + type = Types.Bool, + default = "True", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_isenabled) + + + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3BurstErrorModel, self).__init__(ec, guid) + self._home = "ns3-burst-error-model-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/cara_wifi_manager.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/cara_wifi_manager.html new file mode 100644 index 00000000..36191fdb --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/cara_wifi_manager.html @@ -0,0 +1,258 @@ + + + + + + + + nepi.resources.ns3.classes.cara_wifi_manager — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.cara_wifi_manager

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3wifiremotestationmanager import NS3BaseWifiRemoteStationManager 
+
+@clsinit_copy
+
[docs]class NS3CaraWifiManager(NS3BaseWifiRemoteStationManager): + _rtype = "ns3::CaraWifiManager" + + @classmethod + def _register_attributes(cls): + + attr_probethreshold = Attribute("ProbeThreshold", + "The number of consecutive transmissions failure to activate the RTS probe.", + type = Types.Integer, + default = "1", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_probethreshold) + + attr_failurethreshold = Attribute("FailureThreshold", + "The number of consecutive transmissions failure to decrease the rate.", + type = Types.Integer, + default = "2", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_failurethreshold) + + attr_successthreshold = Attribute("SuccessThreshold", + "The minimum number of sucessfull transmissions to try a new rate.", + type = Types.Integer, + default = "10", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_successthreshold) + + attr_timeout = Attribute("Timeout", + "The \'timer\' in the CARA algorithm", + type = Types.Integer, + default = "15", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_timeout) + + attr_islowlatency = Attribute("IsLowLatency", + "If true, we attempt to modelize a so-called low-latency device: a device where decisions about tx parameters can be made on a per-packet basis and feedback about the transmission of each packet is obtained before sending the next. Otherwise, we modelize a high-latency device, that is a device where we cannot update our decision about tx parameters after every packet transmission.", + type = Types.Bool, + default = "True", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_islowlatency) + + attr_maxssrc = Attribute("MaxSsrc", + "The maximum number of retransmission attempts for an RTS. This value will not have any effect on some rate control algorithms.", + type = Types.Integer, + default = "7", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxssrc) + + attr_maxslrc = Attribute("MaxSlrc", + "The maximum number of retransmission attempts for a DATA packet. This value will not have any effect on some rate control algorithms.", + type = Types.Integer, + default = "7", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxslrc) + + attr_rtsctsthreshold = Attribute("RtsCtsThreshold", + "If the size of the data packet + LLC header + MAC header + FCS trailer is bigger than this value, we use an RTS/CTS handshake before sending the data, as per IEEE Std. 802.11-2012, Section 9.3.5. This value will not have any effect on some rate control algorithms.", + type = Types.Integer, + default = "2346", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_rtsctsthreshold) + + attr_fragmentationthreshold = Attribute("FragmentationThreshold", + "If the size of the data packet + LLC header + MAC header + FCS trailer is biggerthan this value, we fragment it such that the size of the fragments are equal or smaller than this value, as per IEEE Std. 802.11-2012, Section 9.5. This value will not have any effect on some rate control algorithms.", + type = Types.Integer, + default = "2346", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_fragmentationthreshold) + + attr_nonunicastmode = Attribute("NonUnicastMode", + "Wifi mode used for non-unicast transmissions.", + type = Types.String, + default = "Invalid-WifiMode", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_nonunicastmode) + + attr_defaulttxpowerlevel = Attribute("DefaultTxPowerLevel", + "Default power level to be used for transmissions. This is the power level that is used by all those WifiManagers that do notimplement TX power control.", + type = Types.Integer, + default = "0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_defaulttxpowerlevel) + + + + @classmethod + def _register_traces(cls): + + mactxrtsfailed = Trace("MacTxRtsFailed", "The transmission of a RTS by the MAC layer has failed") + + cls._register_trace(mactxrtsfailed) + + mactxdatafailed = Trace("MacTxDataFailed", "The transmission of a data packet by the MAC layer has failed") + + cls._register_trace(mactxdatafailed) + + mactxfinalrtsfailed = Trace("MacTxFinalRtsFailed", "The transmission of a RTS has exceeded the maximum number of attempts") + + cls._register_trace(mactxfinalrtsfailed) + + mactxfinaldatafailed = Trace("MacTxFinalDataFailed", "The transmission of a data packet has exceeded the maximum number of attempts") + + cls._register_trace(mactxfinaldatafailed) + + + + def __init__(self, ec, guid): + super(NS3CaraWifiManager, self).__init__(ec, guid) + self._home = "ns3-cara-wifi-manager-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/constant_acceleration_mobility_model.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/constant_acceleration_mobility_model.html new file mode 100644 index 00000000..409cdba1 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/constant_acceleration_mobility_model.html @@ -0,0 +1,156 @@ + + + + + + + + nepi.resources.ns3.classes.constant_acceleration_mobility_model — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.constant_acceleration_mobility_model

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3mobilitymodel import NS3BaseMobilityModel 
+
+@clsinit_copy
+
[docs]class NS3ConstantAccelerationMobilityModel(NS3BaseMobilityModel): + _rtype = "ns3::ConstantAccelerationMobilityModel" + + @classmethod + def _register_attributes(cls): + + attr_position = Attribute("Position", + "The current position of the mobility model.", + type = Types.String, + default = "0:0:0", + allowed = None, + range = None, + flags = Flags.Reserved) + + cls._register_attribute(attr_position) + + attr_velocity = Attribute("Velocity", + "The current velocity of the mobility model.", + type = Types.String, + default = "0:0:0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.NoWrite) + + cls._register_attribute(attr_velocity) + + + + @classmethod + def _register_traces(cls): + + coursechange = Trace("CourseChange", "The value of the position and/or velocity vector changed") + + cls._register_trace(coursechange) + + + + def __init__(self, ec, guid): + super(NS3ConstantAccelerationMobilityModel, self).__init__(ec, guid) + self._home = "ns3-constant-acceleration-mobility-model-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/constant_position_mobility_model.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/constant_position_mobility_model.html new file mode 100644 index 00000000..b45b8b94 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/constant_position_mobility_model.html @@ -0,0 +1,156 @@ + + + + + + + + nepi.resources.ns3.classes.constant_position_mobility_model — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.constant_position_mobility_model

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3mobilitymodel import NS3BaseMobilityModel 
+
+@clsinit_copy
+
[docs]class NS3ConstantPositionMobilityModel(NS3BaseMobilityModel): + _rtype = "ns3::ConstantPositionMobilityModel" + + @classmethod + def _register_attributes(cls): + + attr_position = Attribute("Position", + "The current position of the mobility model.", + type = Types.String, + default = "0:0:0", + allowed = None, + range = None, + flags = Flags.Reserved) + + cls._register_attribute(attr_position) + + attr_velocity = Attribute("Velocity", + "The current velocity of the mobility model.", + type = Types.String, + default = "0:0:0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.NoWrite) + + cls._register_attribute(attr_velocity) + + + + @classmethod + def _register_traces(cls): + + coursechange = Trace("CourseChange", "The value of the position and/or velocity vector changed") + + cls._register_trace(coursechange) + + + + def __init__(self, ec, guid): + super(NS3ConstantPositionMobilityModel, self).__init__(ec, guid) + self._home = "ns3-constant-position-mobility-model-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/constant_rate_wifi_manager.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/constant_rate_wifi_manager.html new file mode 100644 index 00000000..5fd39789 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/constant_rate_wifi_manager.html @@ -0,0 +1,238 @@ + + + + + + + + nepi.resources.ns3.classes.constant_rate_wifi_manager — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.constant_rate_wifi_manager

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3wifiremotestationmanager import NS3BaseWifiRemoteStationManager 
+
+@clsinit_copy
+
[docs]class NS3ConstantRateWifiManager(NS3BaseWifiRemoteStationManager): + _rtype = "ns3::ConstantRateWifiManager" + + @classmethod + def _register_attributes(cls): + + attr_datamode = Attribute("DataMode", + "The transmission mode to use for every data packet transmission", + type = Types.String, + default = "OfdmRate6Mbps", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_datamode) + + attr_controlmode = Attribute("ControlMode", + "The transmission mode to use for every control packet transmission.", + type = Types.String, + default = "OfdmRate6Mbps", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_controlmode) + + attr_islowlatency = Attribute("IsLowLatency", + "If true, we attempt to modelize a so-called low-latency device: a device where decisions about tx parameters can be made on a per-packet basis and feedback about the transmission of each packet is obtained before sending the next. Otherwise, we modelize a high-latency device, that is a device where we cannot update our decision about tx parameters after every packet transmission.", + type = Types.Bool, + default = "True", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_islowlatency) + + attr_maxssrc = Attribute("MaxSsrc", + "The maximum number of retransmission attempts for an RTS. This value will not have any effect on some rate control algorithms.", + type = Types.Integer, + default = "7", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxssrc) + + attr_maxslrc = Attribute("MaxSlrc", + "The maximum number of retransmission attempts for a DATA packet. This value will not have any effect on some rate control algorithms.", + type = Types.Integer, + default = "7", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxslrc) + + attr_rtsctsthreshold = Attribute("RtsCtsThreshold", + "If the size of the data packet + LLC header + MAC header + FCS trailer is bigger than this value, we use an RTS/CTS handshake before sending the data, as per IEEE Std. 802.11-2012, Section 9.3.5. This value will not have any effect on some rate control algorithms.", + type = Types.Integer, + default = "2346", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_rtsctsthreshold) + + attr_fragmentationthreshold = Attribute("FragmentationThreshold", + "If the size of the data packet + LLC header + MAC header + FCS trailer is biggerthan this value, we fragment it such that the size of the fragments are equal or smaller than this value, as per IEEE Std. 802.11-2012, Section 9.5. This value will not have any effect on some rate control algorithms.", + type = Types.Integer, + default = "2346", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_fragmentationthreshold) + + attr_nonunicastmode = Attribute("NonUnicastMode", + "Wifi mode used for non-unicast transmissions.", + type = Types.String, + default = "Invalid-WifiMode", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_nonunicastmode) + + attr_defaulttxpowerlevel = Attribute("DefaultTxPowerLevel", + "Default power level to be used for transmissions. This is the power level that is used by all those WifiManagers that do notimplement TX power control.", + type = Types.Integer, + default = "0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_defaulttxpowerlevel) + + + + @classmethod + def _register_traces(cls): + + mactxrtsfailed = Trace("MacTxRtsFailed", "The transmission of a RTS by the MAC layer has failed") + + cls._register_trace(mactxrtsfailed) + + mactxdatafailed = Trace("MacTxDataFailed", "The transmission of a data packet by the MAC layer has failed") + + cls._register_trace(mactxdatafailed) + + mactxfinalrtsfailed = Trace("MacTxFinalRtsFailed", "The transmission of a RTS has exceeded the maximum number of attempts") + + cls._register_trace(mactxfinalrtsfailed) + + mactxfinaldatafailed = Trace("MacTxFinalDataFailed", "The transmission of a data packet has exceeded the maximum number of attempts") + + cls._register_trace(mactxfinaldatafailed) + + + + def __init__(self, ec, guid): + super(NS3ConstantRateWifiManager, self).__init__(ec, guid) + self._home = "ns3-constant-rate-wifi-manager-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/constant_speed_propagation_delay_model.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/constant_speed_propagation_delay_model.html new file mode 100644 index 00000000..a2c6d187 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/constant_speed_propagation_delay_model.html @@ -0,0 +1,141 @@ + + + + + + + + nepi.resources.ns3.classes.constant_speed_propagation_delay_model — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.constant_speed_propagation_delay_model

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3propagationdelaymodel import NS3BasePropagationDelayModel 
+
+@clsinit_copy
+
[docs]class NS3ConstantSpeedPropagationDelayModel(NS3BasePropagationDelayModel): + _rtype = "ns3::ConstantSpeedPropagationDelayModel" + + @classmethod + def _register_attributes(cls): + + attr_speed = Attribute("Speed", + "The speed (m/s)", + type = Types.Double, + default = "3e+08", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_speed) + + + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3ConstantSpeedPropagationDelayModel, self).__init__(ec, guid) + self._home = "ns3-constant-speed-propagation-delay-model-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/constant_velocity_mobility_model.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/constant_velocity_mobility_model.html new file mode 100644 index 00000000..45650da0 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/constant_velocity_mobility_model.html @@ -0,0 +1,156 @@ + + + + + + + + nepi.resources.ns3.classes.constant_velocity_mobility_model — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.constant_velocity_mobility_model

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3mobilitymodel import NS3BaseMobilityModel 
+
+@clsinit_copy
+
[docs]class NS3ConstantVelocityMobilityModel(NS3BaseMobilityModel): + _rtype = "ns3::ConstantVelocityMobilityModel" + + @classmethod + def _register_attributes(cls): + + attr_position = Attribute("Position", + "The current position of the mobility model.", + type = Types.String, + default = "0:0:0", + allowed = None, + range = None, + flags = Flags.Reserved) + + cls._register_attribute(attr_position) + + attr_velocity = Attribute("Velocity", + "The current velocity of the mobility model.", + type = Types.String, + default = "0:0:0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.NoWrite) + + cls._register_attribute(attr_velocity) + + + + @classmethod + def _register_traces(cls): + + coursechange = Trace("CourseChange", "The value of the position and/or velocity vector changed") + + cls._register_trace(coursechange) + + + + def __init__(self, ec, guid): + super(NS3ConstantVelocityMobilityModel, self).__init__(ec, guid) + self._home = "ns3-constant-velocity-mobility-model-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/cost231propagation_loss_model.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/cost231propagation_loss_model.html new file mode 100644 index 00000000..c4c78c5a --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/cost231propagation_loss_model.html @@ -0,0 +1,181 @@ + + + + + + + + nepi.resources.ns3.classes.cost231propagation_loss_model — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.cost231propagation_loss_model

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3propagationlossmodel import NS3BasePropagationLossModel 
+
+@clsinit_copy
+
[docs]class NS3Cost231PropagationLossModel(NS3BasePropagationLossModel): + _rtype = "ns3::Cost231PropagationLossModel" + + @classmethod + def _register_attributes(cls): + + attr_lambda = Attribute("Lambda", + "The wavelength (default is 2.3 GHz at 300 000 km/s).", + type = Types.Double, + default = "0.130435", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_lambda) + + attr_frequency = Attribute("Frequency", + "The Frequency (default is 2.3 GHz).", + type = Types.Double, + default = "2.3e+09", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_frequency) + + attr_bsantennaheight = Attribute("BSAntennaHeight", + " BS Antenna Height (default is 50m).", + type = Types.Double, + default = "50", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_bsantennaheight) + + attr_ssantennaheight = Attribute("SSAntennaHeight", + " SS Antenna Height (default is 3m).", + type = Types.Double, + default = "3", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_ssantennaheight) + + attr_mindistance = Attribute("MinDistance", + "The distance under which the propagation model refuses to give results (m) ", + type = Types.Double, + default = "0.5", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_mindistance) + + + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3Cost231PropagationLossModel, self).__init__(ec, guid) + self._home = "ns3-cost231propagation-loss-model-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/csma_channel.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/csma_channel.html new file mode 100644 index 00000000..9f64900b --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/csma_channel.html @@ -0,0 +1,161 @@ + + + + + + + + nepi.resources.ns3.classes.csma_channel — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.csma_channel

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3channel import NS3BaseChannel 
+
+@clsinit_copy
+
[docs]class NS3CsmaChannel(NS3BaseChannel): + _rtype = "ns3::CsmaChannel" + + @classmethod + def _register_attributes(cls): + + attr_datarate = Attribute("DataRate", + "The transmission data rate to be provided to devices connected to the channel", + type = Types.String, + default = "4294967295bps", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_datarate) + + attr_delay = Attribute("Delay", + "Transmission delay through the channel", + type = Types.String, + default = "+0.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_delay) + + attr_id = Attribute("Id", + "The id (unique integer) of this Channel.", + type = Types.Integer, + default = "0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.NoWrite) + + cls._register_attribute(attr_id) + + + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3CsmaChannel, self).__init__(ec, guid) + self._home = "ns3-csma-channel-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/csma_net_device.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/csma_net_device.html new file mode 100644 index 00000000..5670af2b --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/csma_net_device.html @@ -0,0 +1,220 @@ + + + + + + + + nepi.resources.ns3.classes.csma_net_device — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.csma_net_device

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3netdevice import NS3BaseNetDevice 
+
+@clsinit_copy
+
[docs]class NS3CsmaNetDevice(NS3BaseNetDevice): + _rtype = "ns3::CsmaNetDevice" + + @classmethod + def _register_attributes(cls): + + attr_address = Attribute("Address", + "The MAC address of this device.", + type = Types.String, + default = "ff:ff:ff:ff:ff:ff", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_address) + + attr_mtu = Attribute("Mtu", + "The MAC-level Maximum Transmission Unit", + type = Types.Integer, + default = "1500", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_mtu) + + attr_sendenable = Attribute("SendEnable", + "Enable or disable the transmitter section of the device.", + type = Types.Bool, + default = "True", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_sendenable) + + attr_receiveenable = Attribute("ReceiveEnable", + "Enable or disable the receiver section of the device.", + type = Types.Bool, + default = "True", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_receiveenable) + + + + @classmethod + def _register_traces(cls): + + mactx = Trace("MacTx", "Trace source indicating a packet has arrived for transmission by this device") + + cls._register_trace(mactx) + + mactxdrop = Trace("MacTxDrop", "Trace source indicating a packet has been dropped by the device before transmission") + + cls._register_trace(mactxdrop) + + macpromiscrx = Trace("MacPromiscRx", "A packet has been received by this device, has been passed up from the physical layer and is being forwarded up the local protocol stack. This is a promiscuous trace,") + + cls._register_trace(macpromiscrx) + + macrx = Trace("MacRx", "A packet has been received by this device, has been passed up from the physical layer and is being forwarded up the local protocol stack. This is a non-promiscuous trace,") + + cls._register_trace(macrx) + + mactxbackoff = Trace("MacTxBackoff", "Trace source indicating a packet has been delayed by the CSMA backoff process") + + cls._register_trace(mactxbackoff) + + phytxbegin = Trace("PhyTxBegin", "Trace source indicating a packet has begun transmitting over the channel") + + cls._register_trace(phytxbegin) + + phytxend = Trace("PhyTxEnd", "Trace source indicating a packet has been completely transmitted over the channel") + + cls._register_trace(phytxend) + + phytxdrop = Trace("PhyTxDrop", "Trace source indicating a packet has been dropped by the device during transmission") + + cls._register_trace(phytxdrop) + + phyrxend = Trace("PhyRxEnd", "Trace source indicating a packet has been completely received by the device") + + cls._register_trace(phyrxend) + + phyrxdrop = Trace("PhyRxDrop", "Trace source indicating a packet has been dropped by the device during reception") + + cls._register_trace(phyrxdrop) + + sniffer = Trace("Sniffer", "Trace source simulating a non-promiscuous packet sniffer attached to the device") + + cls._register_trace(sniffer) + + promiscsniffer = Trace("PromiscSniffer", "Trace source simulating a promiscuous packet sniffer attached to the device") + + cls._register_trace(promiscsniffer) + + + + def __init__(self, ec, guid): + super(NS3CsmaNetDevice, self).__init__(ec, guid) + self._home = "ns3-csma-net-device-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/drop_tail_queue.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/drop_tail_queue.html new file mode 100644 index 00000000..bad4da12 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/drop_tail_queue.html @@ -0,0 +1,164 @@ + + + + + + + + nepi.resources.ns3.classes.drop_tail_queue — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.drop_tail_queue

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3queue import NS3BaseQueue 
+
+@clsinit_copy
+
[docs]class NS3DropTailQueue(NS3BaseQueue): + _rtype = "ns3::DropTailQueue" + + @classmethod + def _register_attributes(cls): + + attr_maxpackets = Attribute("MaxPackets", + "The maximum number of packets accepted by this DropTailQueue.", + type = Types.Integer, + default = "100", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxpackets) + + attr_maxbytes = Attribute("MaxBytes", + "The maximum number of bytes accepted by this DropTailQueue.", + type = Types.Integer, + default = "6553500", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxbytes) + + + + @classmethod + def _register_traces(cls): + + enqueue = Trace("Enqueue", "Enqueue a packet in the queue.") + + cls._register_trace(enqueue) + + dequeue = Trace("Dequeue", "Dequeue a packet from the queue.") + + cls._register_trace(dequeue) + + drop = Trace("Drop", "Drop a packet stored in the queue.") + + cls._register_trace(drop) + + + + def __init__(self, ec, guid): + super(NS3DropTailQueue, self).__init__(ec, guid) + self._home = "ns3-drop-tail-queue-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/dsrdsr_routing.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/dsrdsr_routing.html new file mode 100644 index 00000000..624d037c --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/dsrdsr_routing.html @@ -0,0 +1,540 @@ + + + + + + + + nepi.resources.ns3.classes.dsrdsr_routing — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.dsrdsr_routing

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3base import NS3Base
+
+@clsinit_copy
+
[docs]class NS3dsrDsrRouting(NS3Base): + _rtype = "ns3::dsr::DsrRouting" + + @classmethod + def _register_attributes(cls): + + attr_maxsendbufflen = Attribute("MaxSendBuffLen", + "Maximum number of packets that can be stored in send buffer.", + type = Types.Integer, + default = "64", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxsendbufflen) + + attr_maxsendbufftime = Attribute("MaxSendBuffTime", + "Maximum time packets can be queued in the send buffer .", + type = Types.String, + default = "+30000000000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxsendbufftime) + + attr_maxmaintlen = Attribute("MaxMaintLen", + "Maximum number of packets that can be stored in maintenance buffer.", + type = Types.Integer, + default = "50", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxmaintlen) + + attr_maxmainttime = Attribute("MaxMaintTime", + "Maximum time packets can be queued in maintenance buffer.", + type = Types.String, + default = "+30000000000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxmainttime) + + attr_maxcachelen = Attribute("MaxCacheLen", + "Maximum number of route entries that can be stored in route cache.", + type = Types.Integer, + default = "64", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxcachelen) + + attr_routecachetimeout = Attribute("RouteCacheTimeout", + "Maximum time the route cache can be queued in route cache.", + type = Types.String, + default = "+300000000000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_routecachetimeout) + + attr_maxentrieseachdst = Attribute("MaxEntriesEachDst", + "Maximum number of route entries for a single destination to respond.", + type = Types.Integer, + default = "20", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxentrieseachdst) + + attr_sendbuffinterval = Attribute("SendBuffInterval", + "How often to check send buffer for packet with route.", + type = Types.String, + default = "+500000000000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_sendbuffinterval) + + attr_nodetraversaltime = Attribute("NodeTraversalTime", + "The time it takes to traverse two neighboring nodes.", + type = Types.String, + default = "+40000000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_nodetraversaltime) + + attr_rreqretries = Attribute("RreqRetries", + "Maximum number of retransmissions for request discovery of a route.", + type = Types.Integer, + default = "16", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_rreqretries) + + attr_maintenanceretries = Attribute("MaintenanceRetries", + "Maximum number of retransmissions for data packets from maintenance buffer.", + type = Types.Integer, + default = "2", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maintenanceretries) + + attr_requesttablesize = Attribute("RequestTableSize", + "Maximum number of request entries in the request table, set this as the number of nodes in the simulation.", + type = Types.Integer, + default = "64", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_requesttablesize) + + attr_requestidsize = Attribute("RequestIdSize", + "Maximum number of request source Ids in the request table.", + type = Types.Integer, + default = "16", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_requestidsize) + + attr_uniquerequestidsize = Attribute("UniqueRequestIdSize", + "Maximum number of request Ids in the request table for a single destination.", + type = Types.Integer, + default = "256", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_uniquerequestidsize) + + attr_nonproprequesttimeout = Attribute("NonPropRequestTimeout", + "The timeout value for non-propagation request.", + type = Types.String, + default = "+30000000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_nonproprequesttimeout) + + attr_discoveryhoplimit = Attribute("DiscoveryHopLimit", + "The max discovery hop limit for route requests.", + type = Types.Integer, + default = "255", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_discoveryhoplimit) + + attr_maxsalvagecount = Attribute("MaxSalvageCount", + "The max salvage count for a single data packet.", + type = Types.Integer, + default = "15", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxsalvagecount) + + attr_blacklisttimeout = Attribute("BlacklistTimeout", + "The time for a neighbor to stay in blacklist.", + type = Types.String, + default = "+3000000000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_blacklisttimeout) + + attr_gratreplyholdoff = Attribute("GratReplyHoldoff", + "The time for gratuitous reply entry to expire.", + type = Types.String, + default = "+1000000000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_gratreplyholdoff) + + attr_broadcastjitter = Attribute("BroadcastJitter", + "The jitter time to avoid collision for broadcast packets.", + type = Types.Integer, + default = "10", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_broadcastjitter) + + attr_linkacktimeout = Attribute("LinkAckTimeout", + "The time a packet in maintenance buffer wait for link acknowledgment.", + type = Types.String, + default = "+100000000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_linkacktimeout) + + attr_trylinkacks = Attribute("TryLinkAcks", + "The number of link acknowledgment to use.", + type = Types.Integer, + default = "1", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_trylinkacks) + + attr_passiveacktimeout = Attribute("PassiveAckTimeout", + "The time a packet in maintenance buffer wait for passive acknowledgment.", + type = Types.String, + default = "+100000000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_passiveacktimeout) + + attr_trypassiveacks = Attribute("TryPassiveAcks", + "The number of passive acknowledgment to use.", + type = Types.Integer, + default = "1", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_trypassiveacks) + + attr_requestperiod = Attribute("RequestPeriod", + "The base time interval between route requests.", + type = Types.String, + default = "+500000000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_requestperiod) + + attr_maxrequestperiod = Attribute("MaxRequestPeriod", + "The max time interval between route requests.", + type = Types.String, + default = "+10000000000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxrequestperiod) + + attr_grareplytablesize = Attribute("GraReplyTableSize", + "The gratuitous reply table size.", + type = Types.Integer, + default = "64", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_grareplytablesize) + + attr_cachetype = Attribute("CacheType", + "Use Link Cache or use Path Cache", + type = Types.String, + default = "LinkCache", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_cachetype) + + attr_stabilitydecrfactor = Attribute("StabilityDecrFactor", + "The stability decrease factor for link cache", + type = Types.Integer, + default = "2", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_stabilitydecrfactor) + + attr_stabilityincrfactor = Attribute("StabilityIncrFactor", + "The stability increase factor for link cache", + type = Types.Integer, + default = "4", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_stabilityincrfactor) + + attr_initstability = Attribute("InitStability", + "The initial stability factor for link cache", + type = Types.String, + default = "+25000000000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_initstability) + + attr_minlifetime = Attribute("MinLifeTime", + "The minimal life time for link cache", + type = Types.String, + default = "+1000000000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_minlifetime) + + attr_useextends = Attribute("UseExtends", + "The extension time for link cache", + type = Types.String, + default = "+120000000000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_useextends) + + attr_enablesubroute = Attribute("EnableSubRoute", + "Enables saving of sub route when receiving route error messages, only available when using path route cache", + type = Types.Bool, + default = "True", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_enablesubroute) + + attr_retransincr = Attribute("RetransIncr", + "The increase time for retransmission timer when facing network congestion", + type = Types.String, + default = "+20000000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_retransincr) + + attr_maxnetworkqueuesize = Attribute("MaxNetworkQueueSize", + "The max number of packet to save in the network queue.", + type = Types.Integer, + default = "400", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxnetworkqueuesize) + + attr_maxnetworkqueuedelay = Attribute("MaxNetworkQueueDelay", + "The max time for a packet to stay in the network queue.", + type = Types.String, + default = "+30000000000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxnetworkqueuedelay) + + attr_numpriorityqueues = Attribute("NumPriorityQueues", + "The max number of packet to save in the network queue.", + type = Types.Integer, + default = "2", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_numpriorityqueues) + + attr_linkacknowledgment = Attribute("LinkAcknowledgment", + "Enable Link layer acknowledgment mechanism", + type = Types.Bool, + default = "True", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_linkacknowledgment) + + attr_protocolnumber = Attribute("ProtocolNumber", + "The Ip protocol number.", + type = Types.Integer, + default = "0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_protocolnumber) + + + + @classmethod + def _register_traces(cls): + + tx = Trace("Tx", "Send DSR packet.") + + cls._register_trace(tx) + + drop = Trace("Drop", "Drop DSR packet") + + cls._register_trace(drop) + + + + def __init__(self, ec, guid): + super(NS3dsrDsrRouting, self).__init__(ec, guid) + self._home = "ns3-dsr-dsr-routing-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/emu_net_device.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/emu_net_device.html new file mode 100644 index 00000000..e205dcc3 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/emu_net_device.html @@ -0,0 +1,216 @@ + + + + + + + + nepi.resources.ns3.classes.emu_net_device — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.emu_net_device

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3netdevice import NS3BaseNetDevice 
+
+@clsinit_copy
+
[docs]class NS3EmuNetDevice(NS3BaseNetDevice): + _rtype = "ns3::EmuNetDevice" + + @classmethod + def _register_attributes(cls): + + attr_mtu = Attribute("Mtu", + "The MAC-level Maximum Transmission Unit", + type = Types.Integer, + default = "0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_mtu) + + attr_address = Attribute("Address", + "The ns-3 MAC address of this (virtual) device.", + type = Types.String, + default = "ff:ff:ff:ff:ff:ff", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_address) + + attr_devicename = Attribute("DeviceName", + "The name of the underlying real device (e.g. eth1).", + type = Types.String, + default = "eth1", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_devicename) + + attr_start = Attribute("Start", + "The simulation time at which to spin up the device thread.", + type = Types.String, + default = "+0.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_start) + + attr_stop = Attribute("Stop", + "The simulation time at which to tear down the device thread.", + type = Types.String, + default = "+0.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_stop) + + attr_rxqueuesize = Attribute("RxQueueSize", + "Maximum size of the read queue. This value limits number of packets that have been read from the network into a memory buffer but have not yet been processed by the simulator.", + type = Types.Integer, + default = "1000", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_rxqueuesize) + + + + @classmethod + def _register_traces(cls): + + mactx = Trace("MacTx", "Trace source indicating a packet has arrived for transmission by this device") + + cls._register_trace(mactx) + + mactxdrop = Trace("MacTxDrop", "Trace source indicating a packet has been dropped by the device before transmission") + + cls._register_trace(mactxdrop) + + macpromiscrx = Trace("MacPromiscRx", "A packet has been received by this device, has been passed up from the physical layer and is being forwarded up the local protocol stack. This is a promiscuous trace,") + + cls._register_trace(macpromiscrx) + + macrx = Trace("MacRx", "A packet has been received by this device, has been passed up from the physical layer and is being forwarded up the local protocol stack. This is a non-promiscuous trace,") + + cls._register_trace(macrx) + + sniffer = Trace("Sniffer", "Trace source simulating a non-promiscuous packet sniffer attached to the device") + + cls._register_trace(sniffer) + + promiscsniffer = Trace("PromiscSniffer", "Trace source simulating a promiscuous packet sniffer attached to the device") + + cls._register_trace(promiscsniffer) + + + + def __init__(self, ec, guid): + super(NS3EmuNetDevice, self).__init__(ec, guid) + self._home = "ns3-emu-net-device-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/error_channel.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/error_channel.html new file mode 100644 index 00000000..ad325985 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/error_channel.html @@ -0,0 +1,141 @@ + + + + + + + + nepi.resources.ns3.classes.error_channel — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.error_channel

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3channel import NS3BaseChannel 
+
+@clsinit_copy
+
[docs]class NS3ErrorChannel(NS3BaseChannel): + _rtype = "ns3::ErrorChannel" + + @classmethod + def _register_attributes(cls): + + attr_id = Attribute("Id", + "The id (unique integer) of this Channel.", + type = Types.Integer, + default = "0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.NoWrite) + + cls._register_attribute(attr_id) + + + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3ErrorChannel, self).__init__(ec, guid) + self._home = "ns3-error-channel-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/error_channel_sixlow.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/error_channel_sixlow.html new file mode 100644 index 00000000..bb9ca4fd --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/error_channel_sixlow.html @@ -0,0 +1,141 @@ + + + + + + + + nepi.resources.ns3.classes.error_channel_sixlow — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.error_channel_sixlow

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3channel import NS3BaseChannel 
+
+@clsinit_copy
+
[docs]class NS3ErrorChannelSixlow(NS3BaseChannel): + _rtype = "ns3::ErrorChannelSixlow" + + @classmethod + def _register_attributes(cls): + + attr_id = Attribute("Id", + "The id (unique integer) of this Channel.", + type = Types.Integer, + default = "0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.NoWrite) + + cls._register_attribute(attr_id) + + + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3ErrorChannelSixlow, self).__init__(ec, guid) + self._home = "ns3-error-channel-sixlow-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/error_net_device.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/error_net_device.html new file mode 100644 index 00000000..8a3f20c5 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/error_net_device.html @@ -0,0 +1,135 @@ + + + + + + + + nepi.resources.ns3.classes.error_net_device — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.error_net_device

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3netdevice import NS3BaseNetDevice 
+
+@clsinit_copy
+
[docs]class NS3ErrorNetDevice(NS3BaseNetDevice): + _rtype = "ns3::ErrorNetDevice" + + @classmethod + def _register_attributes(cls): + pass + + @classmethod + def _register_traces(cls): + + phyrxdrop = Trace("PhyRxDrop", "Trace source indicating a packet has been dropped by the device during reception") + + cls._register_trace(phyrxdrop) + + + + def __init__(self, ec, guid): + super(NS3ErrorNetDevice, self).__init__(ec, guid) + self._home = "ns3-error-net-device-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/fd_net_device.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/fd_net_device.html new file mode 100644 index 00000000..53f07363 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/fd_net_device.html @@ -0,0 +1,206 @@ + + + + + + + + nepi.resources.ns3.classes.fd_net_device — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.fd_net_device

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3fdnetdevice import NS3BaseFdNetDevice 
+
+@clsinit_copy
+
[docs]class NS3FdNetDevice(NS3BaseFdNetDevice): + _rtype = "ns3::FdNetDevice" + + @classmethod + def _register_attributes(cls): + + attr_address = Attribute("Address", + "The MAC address of this device.", + type = Types.String, + default = "ff:ff:ff:ff:ff:ff", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_address) + + attr_start = Attribute("Start", + "The simulation time at which to spin up the device thread.", + type = Types.String, + default = "+0.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_start) + + attr_stop = Attribute("Stop", + "The simulation time at which to tear down the device thread.", + type = Types.String, + default = "+0.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_stop) + + attr_encapsulationmode = Attribute("EncapsulationMode", + "The link-layer encapsulation type to use.", + type = Types.Enumerate, + default = "Dix", + allowed = ["Dix","Llc","DixPi"], + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_encapsulationmode) + + attr_rxqueuesize = Attribute("RxQueueSize", + "Maximum size of the read queue. This value limits number of packets that have been read from the network into a memory buffer but have not yet been processed by the simulator.", + type = Types.Integer, + default = "1000", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_rxqueuesize) + + + + @classmethod + def _register_traces(cls): + + mactx = Trace("MacTx", "Trace source indicating a packet has arrived for transmission by this device") + + cls._register_trace(mactx) + + mactxdrop = Trace("MacTxDrop", "Trace source indicating a packet has been dropped by the device before transmission") + + cls._register_trace(mactxdrop) + + macpromiscrx = Trace("MacPromiscRx", "A packet has been received by this device, has been passed up from the physical layer and is being forwarded up the local protocol stack. This is a promiscuous trace,") + + cls._register_trace(macpromiscrx) + + macrx = Trace("MacRx", "A packet has been received by this device, has been passed up from the physical layer and is being forwarded up the local protocol stack. This is a non-promiscuous trace,") + + cls._register_trace(macrx) + + sniffer = Trace("Sniffer", "Trace source simulating a non-promiscuous packet sniffer attached to the device") + + cls._register_trace(sniffer) + + promiscsniffer = Trace("PromiscSniffer", "Trace source simulating a promiscuous packet sniffer attached to the device") + + cls._register_trace(promiscsniffer) + + + + def __init__(self, ec, guid): + super(NS3FdNetDevice, self).__init__(ec, guid) + self._home = "ns3-fd-net-device-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/fixed_rss_loss_model.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/fixed_rss_loss_model.html new file mode 100644 index 00000000..4fb94ab4 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/fixed_rss_loss_model.html @@ -0,0 +1,141 @@ + + + + + + + + nepi.resources.ns3.classes.fixed_rss_loss_model — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.fixed_rss_loss_model

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3propagationlossmodel import NS3BasePropagationLossModel 
+
+@clsinit_copy
+
[docs]class NS3FixedRssLossModel(NS3BasePropagationLossModel): + _rtype = "ns3::FixedRssLossModel" + + @classmethod + def _register_attributes(cls): + + attr_rss = Attribute("Rss", + "The fixed receiver Rss.", + type = Types.Double, + default = "-150", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_rss) + + + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3FixedRssLossModel, self).__init__(ec, guid) + self._home = "ns3-fixed-rss-loss-model-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/friis_propagation_loss_model.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/friis_propagation_loss_model.html new file mode 100644 index 00000000..abf162de --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/friis_propagation_loss_model.html @@ -0,0 +1,161 @@ + + + + + + + + nepi.resources.ns3.classes.friis_propagation_loss_model — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.friis_propagation_loss_model

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3propagationlossmodel import NS3BasePropagationLossModel 
+
+@clsinit_copy
+
[docs]class NS3FriisPropagationLossModel(NS3BasePropagationLossModel): + _rtype = "ns3::FriisPropagationLossModel" + + @classmethod + def _register_attributes(cls): + + attr_frequency = Attribute("Frequency", + "The carrier frequency (in Hz) at which propagation occurs (default is 5.15 GHz).", + type = Types.Double, + default = "5.15e+09", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_frequency) + + attr_systemloss = Attribute("SystemLoss", + "The system loss", + type = Types.Double, + default = "1", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_systemloss) + + attr_minloss = Attribute("MinLoss", + "The minimum value (dB) of the total loss, used at short ranges. Note: ", + type = Types.Double, + default = "0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_minloss) + + + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3FriisPropagationLossModel, self).__init__(ec, guid) + self._home = "ns3-friis-propagation-loss-model-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/gauss_markov_mobility_model.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/gauss_markov_mobility_model.html new file mode 100644 index 00000000..ed9bcb2d --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/gauss_markov_mobility_model.html @@ -0,0 +1,246 @@ + + + + + + + + nepi.resources.ns3.classes.gauss_markov_mobility_model — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.gauss_markov_mobility_model

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3mobilitymodel import NS3BaseMobilityModel 
+
+@clsinit_copy
+
[docs]class NS3GaussMarkovMobilityModel(NS3BaseMobilityModel): + _rtype = "ns3::GaussMarkovMobilityModel" + + @classmethod + def _register_attributes(cls): + + attr_bounds = Attribute("Bounds", + "Bounds of the area to cruise.", + type = Types.String, + default = "-100|100|-100|100|0|100", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_bounds) + + attr_timestep = Attribute("TimeStep", + "Change current direction and speed after moving for this time.", + type = Types.String, + default = "+1000000000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_timestep) + + attr_alpha = Attribute("Alpha", + "A constant representing the tunable parameter in the Gauss-Markov model.", + type = Types.Double, + default = "1", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_alpha) + + attr_meanvelocity = Attribute("MeanVelocity", + "A random variable used to assign the average velocity.", + type = Types.String, + default = "ns3::UniformRandomVariable[Min=0.0|Max=1.0]", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_meanvelocity) + + attr_meandirection = Attribute("MeanDirection", + "A random variable used to assign the average direction.", + type = Types.String, + default = "ns3::UniformRandomVariable[Min=0.0|Max=6.283185307]", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_meandirection) + + attr_meanpitch = Attribute("MeanPitch", + "A random variable used to assign the average pitch.", + type = Types.String, + default = "ns3::ConstantRandomVariable[Constant=0.0]", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_meanpitch) + + attr_normalvelocity = Attribute("NormalVelocity", + "A gaussian random variable used to calculate the next velocity value.", + type = Types.String, + default = "ns3::NormalRandomVariable[Mean=0.0|Variance=1.0|Bound=10.0]", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_normalvelocity) + + attr_normaldirection = Attribute("NormalDirection", + "A gaussian random variable used to calculate the next direction value.", + type = Types.String, + default = "ns3::NormalRandomVariable[Mean=0.0|Variance=1.0|Bound=10.0]", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_normaldirection) + + attr_normalpitch = Attribute("NormalPitch", + "A gaussian random variable used to calculate the next pitch value.", + type = Types.String, + default = "ns3::NormalRandomVariable[Mean=0.0|Variance=1.0|Bound=10.0]", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_normalpitch) + + attr_position = Attribute("Position", + "The current position of the mobility model.", + type = Types.String, + default = "0:0:0", + allowed = None, + range = None, + flags = Flags.Reserved) + + cls._register_attribute(attr_position) + + attr_velocity = Attribute("Velocity", + "The current velocity of the mobility model.", + type = Types.String, + default = "0:0:0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.NoWrite) + + cls._register_attribute(attr_velocity) + + + + @classmethod + def _register_traces(cls): + + coursechange = Trace("CourseChange", "The value of the position and/or velocity vector changed") + + cls._register_trace(coursechange) + + + + def __init__(self, ec, guid): + super(NS3GaussMarkovMobilityModel, self).__init__(ec, guid) + self._home = "ns3-gauss-markov-mobility-model-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/hierarchical_mobility_model.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/hierarchical_mobility_model.html new file mode 100644 index 00000000..a6c94cab --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/hierarchical_mobility_model.html @@ -0,0 +1,156 @@ + + + + + + + + nepi.resources.ns3.classes.hierarchical_mobility_model — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.hierarchical_mobility_model

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3mobilitymodel import NS3BaseMobilityModel 
+
+@clsinit_copy
+
[docs]class NS3HierarchicalMobilityModel(NS3BaseMobilityModel): + _rtype = "ns3::HierarchicalMobilityModel" + + @classmethod + def _register_attributes(cls): + + attr_position = Attribute("Position", + "The current position of the mobility model.", + type = Types.String, + default = "0:0:0", + allowed = None, + range = None, + flags = Flags.Reserved) + + cls._register_attribute(attr_position) + + attr_velocity = Attribute("Velocity", + "The current velocity of the mobility model.", + type = Types.String, + default = "0:0:0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.NoWrite) + + cls._register_attribute(attr_velocity) + + + + @classmethod + def _register_traces(cls): + + coursechange = Trace("CourseChange", "The value of the position and/or velocity vector changed") + + cls._register_trace(coursechange) + + + + def __init__(self, ec, guid): + super(NS3HierarchicalMobilityModel, self).__init__(ec, guid) + self._home = "ns3-hierarchical-mobility-model-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/hybrid_buildings_propagation_loss_model.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/hybrid_buildings_propagation_loss_model.html new file mode 100644 index 00000000..df1a68c1 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/hybrid_buildings_propagation_loss_model.html @@ -0,0 +1,181 @@ + + + + + + + + nepi.resources.ns3.classes.hybrid_buildings_propagation_loss_model — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.hybrid_buildings_propagation_loss_model

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3propagationlossmodel import NS3BasePropagationLossModel 
+
+@clsinit_copy
+
[docs]class NS3HybridBuildingsPropagationLossModel(NS3BasePropagationLossModel): + _rtype = "ns3::HybridBuildingsPropagationLossModel" + + @classmethod + def _register_attributes(cls): + + attr_los2nlosthr = Attribute("Los2NlosThr", + " Threshold from LoS to NLoS in ITU 1411 [m].", + type = Types.Double, + default = "200", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_los2nlosthr) + + attr_shadowsigmaoutdoor = Attribute("ShadowSigmaOutdoor", + "Standard deviation of the normal distribution used for calculate the shadowing for outdoor nodes", + type = Types.Double, + default = "7", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_shadowsigmaoutdoor) + + attr_shadowsigmaindoor = Attribute("ShadowSigmaIndoor", + "Standard deviation of the normal distribution used for calculate the shadowing for indoor nodes ", + type = Types.Double, + default = "8", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_shadowsigmaindoor) + + attr_shadowsigmaextwalls = Attribute("ShadowSigmaExtWalls", + "Standard deviation of the normal distribution used for calculate the shadowing due to ext walls ", + type = Types.Double, + default = "5", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_shadowsigmaextwalls) + + attr_internalwallloss = Attribute("InternalWallLoss", + "Additional loss for each internal wall [dB]", + type = Types.Double, + default = "5", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_internalwallloss) + + + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3HybridBuildingsPropagationLossModel, self).__init__(ec, guid) + self._home = "ns3-hybrid-buildings-propagation-loss-model-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/icmpv4l4protocol.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/icmpv4l4protocol.html new file mode 100644 index 00000000..8bf1f9ed --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/icmpv4l4protocol.html @@ -0,0 +1,141 @@ + + + + + + + + nepi.resources.ns3.classes.icmpv4l4protocol — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.icmpv4l4protocol

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3icmpv4l4protocol import NS3BaseIcmpv4L4Protocol 
+
+@clsinit_copy
+
[docs]class NS3Icmpv4L4Protocol(NS3BaseIcmpv4L4Protocol): + _rtype = "ns3::Icmpv4L4Protocol" + + @classmethod + def _register_attributes(cls): + + attr_protocolnumber = Attribute("ProtocolNumber", + "The Ip protocol number.", + type = Types.Integer, + default = "0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_protocolnumber) + + + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3Icmpv4L4Protocol, self).__init__(ec, guid) + self._home = "ns3-icmpv4l4protocol-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/icmpv6l4protocol.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/icmpv6l4protocol.html new file mode 100644 index 00000000..951fec48 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/icmpv6l4protocol.html @@ -0,0 +1,161 @@ + + + + + + + + nepi.resources.ns3.classes.icmpv6l4protocol — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.icmpv6l4protocol

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3base import NS3Base
+
+@clsinit_copy
+
[docs]class NS3Icmpv6L4Protocol(NS3Base): + _rtype = "ns3::Icmpv6L4Protocol" + + @classmethod + def _register_attributes(cls): + + attr_dad = Attribute("DAD", + "Always do DAD check.", + type = Types.Bool, + default = "True", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_dad) + + attr_solicitationjitter = Attribute("SolicitationJitter", + "The jitter in ms a node is allowed to wait before sending any solicitation . Some jitter aims to prevent collisions. By default, the model will wait for a duration in ms defined by a uniform random-variable between 0 and SolicitationJitter", + type = Types.String, + default = "ns3::UniformRandomVariable[Min=0.0|Max=10.0]", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_solicitationjitter) + + attr_protocolnumber = Attribute("ProtocolNumber", + "The Ip protocol number.", + type = Types.Integer, + default = "0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_protocolnumber) + + + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3Icmpv6L4Protocol, self).__init__(ec, guid) + self._home = "ns3-icmpv6l4protocol-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/ideal_wifi_manager.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/ideal_wifi_manager.html new file mode 100644 index 00000000..f23b5f70 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/ideal_wifi_manager.html @@ -0,0 +1,228 @@ + + + + + + + + nepi.resources.ns3.classes.ideal_wifi_manager — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.ideal_wifi_manager

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3wifiremotestationmanager import NS3BaseWifiRemoteStationManager 
+
+@clsinit_copy
+
[docs]class NS3IdealWifiManager(NS3BaseWifiRemoteStationManager): + _rtype = "ns3::IdealWifiManager" + + @classmethod + def _register_attributes(cls): + + attr_berthreshold = Attribute("BerThreshold", + "The maximum Bit Error Rate acceptable at any transmission mode", + type = Types.Double, + default = "1e-05", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_berthreshold) + + attr_islowlatency = Attribute("IsLowLatency", + "If true, we attempt to modelize a so-called low-latency device: a device where decisions about tx parameters can be made on a per-packet basis and feedback about the transmission of each packet is obtained before sending the next. Otherwise, we modelize a high-latency device, that is a device where we cannot update our decision about tx parameters after every packet transmission.", + type = Types.Bool, + default = "True", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_islowlatency) + + attr_maxssrc = Attribute("MaxSsrc", + "The maximum number of retransmission attempts for an RTS. This value will not have any effect on some rate control algorithms.", + type = Types.Integer, + default = "7", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxssrc) + + attr_maxslrc = Attribute("MaxSlrc", + "The maximum number of retransmission attempts for a DATA packet. This value will not have any effect on some rate control algorithms.", + type = Types.Integer, + default = "7", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxslrc) + + attr_rtsctsthreshold = Attribute("RtsCtsThreshold", + "If the size of the data packet + LLC header + MAC header + FCS trailer is bigger than this value, we use an RTS/CTS handshake before sending the data, as per IEEE Std. 802.11-2012, Section 9.3.5. This value will not have any effect on some rate control algorithms.", + type = Types.Integer, + default = "2346", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_rtsctsthreshold) + + attr_fragmentationthreshold = Attribute("FragmentationThreshold", + "If the size of the data packet + LLC header + MAC header + FCS trailer is biggerthan this value, we fragment it such that the size of the fragments are equal or smaller than this value, as per IEEE Std. 802.11-2012, Section 9.5. This value will not have any effect on some rate control algorithms.", + type = Types.Integer, + default = "2346", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_fragmentationthreshold) + + attr_nonunicastmode = Attribute("NonUnicastMode", + "Wifi mode used for non-unicast transmissions.", + type = Types.String, + default = "Invalid-WifiMode", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_nonunicastmode) + + attr_defaulttxpowerlevel = Attribute("DefaultTxPowerLevel", + "Default power level to be used for transmissions. This is the power level that is used by all those WifiManagers that do notimplement TX power control.", + type = Types.Integer, + default = "0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_defaulttxpowerlevel) + + + + @classmethod + def _register_traces(cls): + + mactxrtsfailed = Trace("MacTxRtsFailed", "The transmission of a RTS by the MAC layer has failed") + + cls._register_trace(mactxrtsfailed) + + mactxdatafailed = Trace("MacTxDataFailed", "The transmission of a data packet by the MAC layer has failed") + + cls._register_trace(mactxdatafailed) + + mactxfinalrtsfailed = Trace("MacTxFinalRtsFailed", "The transmission of a RTS has exceeded the maximum number of attempts") + + cls._register_trace(mactxfinalrtsfailed) + + mactxfinaldatafailed = Trace("MacTxFinalDataFailed", "The transmission of a data packet has exceeded the maximum number of attempts") + + cls._register_trace(mactxfinaldatafailed) + + + + def __init__(self, ec, guid): + super(NS3IdealWifiManager, self).__init__(ec, guid) + self._home = "ns3-ideal-wifi-manager-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/ipv4l3protocol.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/ipv4l3protocol.html new file mode 100644 index 00000000..1b4d4845 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/ipv4l3protocol.html @@ -0,0 +1,206 @@ + + + + + + + + nepi.resources.ns3.classes.ipv4l3protocol — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.ipv4l3protocol

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3ipv4l3protocol import NS3BaseIpv4L3Protocol 
+
+@clsinit_copy
+
[docs]class NS3Ipv4L3Protocol(NS3BaseIpv4L3Protocol): + _rtype = "ns3::Ipv4L3Protocol" + + @classmethod + def _register_attributes(cls): + + attr_defaulttos = Attribute("DefaultTos", + "The TOS value set by default on all outgoing packets generated on this node.", + type = Types.Integer, + default = "0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_defaulttos) + + attr_defaultttl = Attribute("DefaultTtl", + "The TTL value set by default on all outgoing packets generated on this node.", + type = Types.Integer, + default = "64", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_defaultttl) + + attr_fragmentexpirationtimeout = Attribute("FragmentExpirationTimeout", + "When this timeout expires, the fragments will be cleared from the buffer.", + type = Types.String, + default = "+30000000000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_fragmentexpirationtimeout) + + attr_ipforward = Attribute("IpForward", + "Globally enable or disable IP forwarding for all current and future Ipv4 devices.", + type = Types.Bool, + default = "True", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_ipforward) + + attr_weakesmodel = Attribute("WeakEsModel", + "RFC1122 term for whether host accepts datagram with a dest. address on another interface", + type = Types.Bool, + default = "True", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_weakesmodel) + + + + @classmethod + def _register_traces(cls): + + tx = Trace("Tx", "Send ipv4 packet to outgoing interface.") + + cls._register_trace(tx) + + rx = Trace("Rx", "Receive ipv4 packet from incoming interface.") + + cls._register_trace(rx) + + drop = Trace("Drop", "Drop ipv4 packet") + + cls._register_trace(drop) + + sendoutgoing = Trace("SendOutgoing", "A newly-generated packet by this node is about to be queued for transmission") + + cls._register_trace(sendoutgoing) + + unicastforward = Trace("UnicastForward", "A unicast IPv4 packet was received by this node and is being forwarded to another node") + + cls._register_trace(unicastforward) + + localdeliver = Trace("LocalDeliver", "An IPv4 packet was received by/for this node, and it is being forward up the stack") + + cls._register_trace(localdeliver) + + + + def __init__(self, ec, guid): + super(NS3Ipv4L3Protocol, self).__init__(ec, guid) + self._home = "ns3-ipv4l3protocol-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/itu_r1411los_propagation_loss_model.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/itu_r1411los_propagation_loss_model.html new file mode 100644 index 00000000..dff139d4 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/itu_r1411los_propagation_loss_model.html @@ -0,0 +1,130 @@ + + + + + + + + nepi.resources.ns3.classes.itu_r1411los_propagation_loss_model — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.itu_r1411los_propagation_loss_model

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3propagationlossmodel import NS3BasePropagationLossModel 
+
+@clsinit_copy
+
[docs]class NS3ItuR1411LosPropagationLossModel(NS3BasePropagationLossModel): + _rtype = "ns3::ItuR1411LosPropagationLossModel" + + @classmethod + def _register_attributes(cls): + pass + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3ItuR1411LosPropagationLossModel, self).__init__(ec, guid) + self._home = "ns3-itu-r1411los-propagation-loss-model-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/itu_r1411nlos_over_rooftop_propagation_loss_model.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/itu_r1411nlos_over_rooftop_propagation_loss_model.html new file mode 100644 index 00000000..afc6ba30 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/itu_r1411nlos_over_rooftop_propagation_loss_model.html @@ -0,0 +1,201 @@ + + + + + + + + nepi.resources.ns3.classes.itu_r1411nlos_over_rooftop_propagation_loss_model — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.itu_r1411nlos_over_rooftop_propagation_loss_model

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3propagationlossmodel import NS3BasePropagationLossModel 
+
+@clsinit_copy
+
[docs]class NS3ItuR1411NlosOverRooftopPropagationLossModel(NS3BasePropagationLossModel): + _rtype = "ns3::ItuR1411NlosOverRooftopPropagationLossModel" + + @classmethod + def _register_attributes(cls): + + attr_environment = Attribute("Environment", + "Environment Scenario", + type = Types.Enumerate, + default = "Urban", + allowed = ["Urban","SubUrban","OpenAreas"], + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_environment) + + attr_citysize = Attribute("CitySize", + "Dimension of the city", + type = Types.Enumerate, + default = "Large", + allowed = ["Small","Medium","Large"], + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_citysize) + + attr_rooftoplevel = Attribute("RooftopLevel", + "The height of the rooftop level in meters", + type = Types.Double, + default = "20", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_rooftoplevel) + + attr_streetsorientation = Attribute("StreetsOrientation", + "The orientation of streets in degrees [0,90] with respect to the direction of propagation", + type = Types.Double, + default = "45", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_streetsorientation) + + attr_streetswidth = Attribute("StreetsWidth", + "The width of streets", + type = Types.Double, + default = "20", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_streetswidth) + + attr_buildingsextend = Attribute("BuildingsExtend", + "The distance over which the buildings extend", + type = Types.Double, + default = "80", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_buildingsextend) + + attr_buildingseparation = Attribute("BuildingSeparation", + "The separation between buildings", + type = Types.Double, + default = "50", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_buildingseparation) + + + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3ItuR1411NlosOverRooftopPropagationLossModel, self).__init__(ec, guid) + self._home = "ns3-itu-r1411nlos-over-rooftop-propagation-loss-model-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/jakes_propagation_loss_model.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/jakes_propagation_loss_model.html new file mode 100644 index 00000000..7848615f --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/jakes_propagation_loss_model.html @@ -0,0 +1,130 @@ + + + + + + + + nepi.resources.ns3.classes.jakes_propagation_loss_model — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.jakes_propagation_loss_model

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3propagationlossmodel import NS3BasePropagationLossModel 
+
+@clsinit_copy
+
[docs]class NS3JakesPropagationLossModel(NS3BasePropagationLossModel): + _rtype = "ns3::JakesPropagationLossModel" + + @classmethod + def _register_attributes(cls): + pass + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3JakesPropagationLossModel, self).__init__(ec, guid) + self._home = "ns3-jakes-propagation-loss-model-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/kun2600mhz_propagation_loss_model.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/kun2600mhz_propagation_loss_model.html new file mode 100644 index 00000000..8d1f117f --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/kun2600mhz_propagation_loss_model.html @@ -0,0 +1,130 @@ + + + + + + + + nepi.resources.ns3.classes.kun2600mhz_propagation_loss_model — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.kun2600mhz_propagation_loss_model

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3propagationlossmodel import NS3BasePropagationLossModel 
+
+@clsinit_copy
+
[docs]class NS3Kun2600MhzPropagationLossModel(NS3BasePropagationLossModel): + _rtype = "ns3::Kun2600MhzPropagationLossModel" + + @classmethod + def _register_attributes(cls): + pass + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3Kun2600MhzPropagationLossModel, self).__init__(ec, guid) + self._home = "ns3-kun2600mhz-propagation-loss-model-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/list_error_model.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/list_error_model.html new file mode 100644 index 00000000..eaa1c9e5 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/list_error_model.html @@ -0,0 +1,141 @@ + + + + + + + + nepi.resources.ns3.classes.list_error_model — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.list_error_model

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3errormodel import NS3BaseErrorModel 
+
+@clsinit_copy
+
[docs]class NS3ListErrorModel(NS3BaseErrorModel): + _rtype = "ns3::ListErrorModel" + + @classmethod + def _register_attributes(cls): + + attr_isenabled = Attribute("IsEnabled", + "Whether this ErrorModel is enabled or not.", + type = Types.Bool, + default = "True", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_isenabled) + + + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3ListErrorModel, self).__init__(ec, guid) + self._home = "ns3-list-error-model-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/log_distance_propagation_loss_model.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/log_distance_propagation_loss_model.html new file mode 100644 index 00000000..aa34c047 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/log_distance_propagation_loss_model.html @@ -0,0 +1,161 @@ + + + + + + + + nepi.resources.ns3.classes.log_distance_propagation_loss_model — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.log_distance_propagation_loss_model

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3propagationlossmodel import NS3BasePropagationLossModel 
+
+@clsinit_copy
+
[docs]class NS3LogDistancePropagationLossModel(NS3BasePropagationLossModel): + _rtype = "ns3::LogDistancePropagationLossModel" + + @classmethod + def _register_attributes(cls): + + attr_exponent = Attribute("Exponent", + "The exponent of the Path Loss propagation model", + type = Types.Double, + default = "3", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_exponent) + + attr_referencedistance = Attribute("ReferenceDistance", + "The distance at which the reference loss is calculated (m)", + type = Types.Double, + default = "1", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_referencedistance) + + attr_referenceloss = Attribute("ReferenceLoss", + "The reference loss at reference distance (dB). (Default is Friis at 1m with 5.15 GHz)", + type = Types.Double, + default = "46.6777", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_referenceloss) + + + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3LogDistancePropagationLossModel, self).__init__(ec, guid) + self._home = "ns3-log-distance-propagation-loss-model-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/loopback_net_device.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/loopback_net_device.html new file mode 100644 index 00000000..fb9b40ca --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/loopback_net_device.html @@ -0,0 +1,130 @@ + + + + + + + + nepi.resources.ns3.classes.loopback_net_device — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.loopback_net_device

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3netdevice import NS3BaseNetDevice 
+
+@clsinit_copy
+
[docs]class NS3LoopbackNetDevice(NS3BaseNetDevice): + _rtype = "ns3::LoopbackNetDevice" + + @classmethod + def _register_attributes(cls): + pass + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3LoopbackNetDevice, self).__init__(ec, guid) + self._home = "ns3-loopback-net-device-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/lr_wpan_net_device.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/lr_wpan_net_device.html new file mode 100644 index 00000000..f85e8a87 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/lr_wpan_net_device.html @@ -0,0 +1,141 @@ + + + + + + + + nepi.resources.ns3.classes.lr_wpan_net_device — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.lr_wpan_net_device

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3netdevice import NS3BaseNetDevice 
+
+@clsinit_copy
+
[docs]class NS3LrWpanNetDevice(NS3BaseNetDevice): + _rtype = "ns3::LrWpanNetDevice" + + @classmethod + def _register_attributes(cls): + + attr_useacks = Attribute("UseAcks", + "Request acknowledgments for data frames.", + type = Types.Bool, + default = "True", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_useacks) + + + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3LrWpanNetDevice, self).__init__(ec, guid) + self._home = "ns3-lr-wpan-net-device-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/lte_enb_net_device.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/lte_enb_net_device.html new file mode 100644 index 00000000..61bab79f --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/lte_enb_net_device.html @@ -0,0 +1,211 @@ + + + + + + + + nepi.resources.ns3.classes.lte_enb_net_device — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.lte_enb_net_device

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3netdevice import NS3BaseNetDevice 
+
+@clsinit_copy
+
[docs]class NS3LteEnbNetDevice(NS3BaseNetDevice): + _rtype = "ns3::LteEnbNetDevice" + + @classmethod + def _register_attributes(cls): + + attr_ulbandwidth = Attribute("UlBandwidth", + "Uplink Transmission Bandwidth Configuration in number of Resource Blocks", + type = Types.Integer, + default = "25", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_ulbandwidth) + + attr_dlbandwidth = Attribute("DlBandwidth", + "Downlink Transmission Bandwidth Configuration in number of Resource Blocks", + type = Types.Integer, + default = "25", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_dlbandwidth) + + attr_cellid = Attribute("CellId", + "Cell Identifier", + type = Types.Integer, + default = "0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_cellid) + + attr_dlearfcn = Attribute("DlEarfcn", + "Downlink E-UTRA Absolute Radio Frequency Channel Number (EARFCN) as per 3GPP 36.101 Section 5.7.3. ", + type = Types.Integer, + default = "100", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_dlearfcn) + + attr_ulearfcn = Attribute("UlEarfcn", + "Uplink E-UTRA Absolute Radio Frequency Channel Number (EARFCN) as per 3GPP 36.101 Section 5.7.3. ", + type = Types.Integer, + default = "18100", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_ulearfcn) + + attr_csgid = Attribute("CsgId", + "The Closed Subscriber Group (CSG) identity that this eNodeB belongs to", + type = Types.Integer, + default = "0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_csgid) + + attr_csgindication = Attribute("CsgIndication", + "If true, only UEs which are members of the CSG (i.e. same CSG ID) can gain access to the eNodeB, therefore enforcing closed access mode. Otherwise, the eNodeB operates as a non-CSG cell and implements open access mode.", + type = Types.Bool, + default = "False", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_csgindication) + + attr_mtu = Attribute("Mtu", + "The MAC-level Maximum Transmission Unit", + type = Types.Integer, + default = "30000", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_mtu) + + + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3LteEnbNetDevice, self).__init__(ec, guid) + self._home = "ns3-lte-enb-net-device-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/lte_simple_net_device.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/lte_simple_net_device.html new file mode 100644 index 00000000..69e64841 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/lte_simple_net_device.html @@ -0,0 +1,135 @@ + + + + + + + + nepi.resources.ns3.classes.lte_simple_net_device — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.lte_simple_net_device

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3netdevice import NS3BaseNetDevice 
+
+@clsinit_copy
+
[docs]class NS3LteSimpleNetDevice(NS3BaseNetDevice): + _rtype = "ns3::LteSimpleNetDevice" + + @classmethod + def _register_attributes(cls): + pass + + @classmethod + def _register_traces(cls): + + phyrxdrop = Trace("PhyRxDrop", "Trace source indicating a packet has been dropped by the device during reception") + + cls._register_trace(phyrxdrop) + + + + def __init__(self, ec, guid): + super(NS3LteSimpleNetDevice, self).__init__(ec, guid) + self._home = "ns3-lte-simple-net-device-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/lte_ue_net_device.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/lte_ue_net_device.html new file mode 100644 index 00000000..2ed03a61 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/lte_ue_net_device.html @@ -0,0 +1,171 @@ + + + + + + + + nepi.resources.ns3.classes.lte_ue_net_device — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.lte_ue_net_device

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3netdevice import NS3BaseNetDevice 
+
+@clsinit_copy
+
[docs]class NS3LteUeNetDevice(NS3BaseNetDevice): + _rtype = "ns3::LteUeNetDevice" + + @classmethod + def _register_attributes(cls): + + attr_imsi = Attribute("Imsi", + "International Mobile Subscriber Identity assigned to this UE", + type = Types.Integer, + default = "0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_imsi) + + attr_dlearfcn = Attribute("DlEarfcn", + "Downlink E-UTRA Absolute Radio Frequency Channel Number (EARFCN) as per 3GPP 36.101 Section 5.7.3. ", + type = Types.Integer, + default = "100", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_dlearfcn) + + attr_csgid = Attribute("CsgId", + "The Closed Subscriber Group (CSG) identity that this UE is associated with, i.e., giving the UE access to cells which belong to this particular CSG. This restriction only applies to initial cell selection and EPC-enabled simulation. This does not revoke the UE\'s access to non-CSG cells. ", + type = Types.Integer, + default = "0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_csgid) + + attr_mtu = Attribute("Mtu", + "The MAC-level Maximum Transmission Unit", + type = Types.Integer, + default = "30000", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_mtu) + + + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3LteUeNetDevice, self).__init__(ec, guid) + self._home = "ns3-lte-ue-net-device-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/matrix_propagation_loss_model.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/matrix_propagation_loss_model.html new file mode 100644 index 00000000..91e9fbe2 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/matrix_propagation_loss_model.html @@ -0,0 +1,141 @@ + + + + + + + + nepi.resources.ns3.classes.matrix_propagation_loss_model — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.matrix_propagation_loss_model

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3propagationlossmodel import NS3BasePropagationLossModel 
+
+@clsinit_copy
+
[docs]class NS3MatrixPropagationLossModel(NS3BasePropagationLossModel): + _rtype = "ns3::MatrixPropagationLossModel" + + @classmethod + def _register_attributes(cls): + + attr_defaultloss = Attribute("DefaultLoss", + "The default value for propagation loss, dB.", + type = Types.Double, + default = "1.79769e+308", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_defaultloss) + + + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3MatrixPropagationLossModel, self).__init__(ec, guid) + self._home = "ns3-matrix-propagation-loss-model-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/mesh_point_device.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/mesh_point_device.html new file mode 100644 index 00000000..aae79d55 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/mesh_point_device.html @@ -0,0 +1,141 @@ + + + + + + + + nepi.resources.ns3.classes.mesh_point_device — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.mesh_point_device

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3netdevice import NS3BaseNetDevice 
+
+@clsinit_copy
+
[docs]class NS3MeshPointDevice(NS3BaseNetDevice): + _rtype = "ns3::MeshPointDevice" + + @classmethod + def _register_attributes(cls): + + attr_mtu = Attribute("Mtu", + "The MAC-level Maximum Transmission Unit", + type = Types.Integer, + default = "65535", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_mtu) + + + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3MeshPointDevice, self).__init__(ec, guid) + self._home = "ns3-mesh-point-device-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/mesh_wifi_interface_mac.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/mesh_wifi_interface_mac.html new file mode 100644 index 00000000..87af1d64 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/mesh_wifi_interface_mac.html @@ -0,0 +1,330 @@ + + + + + + + + nepi.resources.ns3.classes.mesh_wifi_interface_mac — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.mesh_wifi_interface_mac

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3wifimac import NS3BaseWifiMac 
+
+@clsinit_copy
+
[docs]class NS3MeshWifiInterfaceMac(NS3BaseWifiMac): + _rtype = "ns3::MeshWifiInterfaceMac" + + @classmethod + def _register_attributes(cls): + + attr_beaconinterval = Attribute("BeaconInterval", + "Beacon Interval", + type = Types.String, + default = "+500000000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_beaconinterval) + + attr_randomstart = Attribute("RandomStart", + "Window when beacon generating starts (uniform random) in seconds", + type = Types.String, + default = "+500000000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_randomstart) + + attr_beacongeneration = Attribute("BeaconGeneration", + "Enable/Disable Beaconing.", + type = Types.Bool, + default = "True", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_beacongeneration) + + attr_qossupported = Attribute("QosSupported", + "This Boolean attribute is set to enable 802.11e/WMM-style QoS support at this STA", + type = Types.Bool, + default = "False", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_qossupported) + + attr_htsupported = Attribute("HtSupported", + "This Boolean attribute is set to enable 802.11n support at this STA", + type = Types.Bool, + default = "False", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_htsupported) + + attr_ctstoselfsupported = Attribute("CtsToSelfSupported", + "Use CTS to Self when using a rate that is not in the basic set rate", + type = Types.Bool, + default = "False", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_ctstoselfsupported) + + attr_ctstimeout = Attribute("CtsTimeout", + "When this timeout expires, the RTS/CTS handshake has failed.", + type = Types.String, + default = "+75000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_ctstimeout) + + attr_acktimeout = Attribute("AckTimeout", + "When this timeout expires, the DATA/ACK handshake has failed.", + type = Types.String, + default = "+75000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_acktimeout) + + attr_basicblockacktimeout = Attribute("BasicBlockAckTimeout", + "When this timeout expires, the BASIC_BLOCK_ACK_REQ/BASIC_BLOCK_ACK handshake has failed.", + type = Types.String, + default = "+281000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_basicblockacktimeout) + + attr_compressedblockacktimeout = Attribute("CompressedBlockAckTimeout", + "When this timeout expires, the COMPRESSED_BLOCK_ACK_REQ/COMPRESSED_BLOCK_ACK handshake has failed.", + type = Types.String, + default = "+107000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_compressedblockacktimeout) + + attr_sifs = Attribute("Sifs", + "The value of the SIFS constant.", + type = Types.String, + default = "+16000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_sifs) + + attr_eifsnodifs = Attribute("EifsNoDifs", + "The value of EIFS-DIFS", + type = Types.String, + default = "+60000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_eifsnodifs) + + attr_slot = Attribute("Slot", + "The duration of a Slot.", + type = Types.String, + default = "+9000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_slot) + + attr_pifs = Attribute("Pifs", + "The value of the PIFS constant.", + type = Types.String, + default = "+25000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_pifs) + + attr_rifs = Attribute("Rifs", + "The value of the RIFS constant.", + type = Types.String, + default = "+2000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_rifs) + + attr_maxpropagationdelay = Attribute("MaxPropagationDelay", + "The maximum propagation delay. Unused for now.", + type = Types.String, + default = "+3333.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxpropagationdelay) + + attr_ssid = Attribute("Ssid", + "The ssid we want to belong to.", + type = Types.String, + default = "default", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_ssid) + + + + @classmethod + def _register_traces(cls): + + txokheader = Trace("TxOkHeader", "The header of successfully transmitted packet") + + cls._register_trace(txokheader) + + txerrheader = Trace("TxErrHeader", "The header of unsuccessfully transmitted packet") + + cls._register_trace(txerrheader) + + mactx = Trace("MacTx", "A packet has been received from higher layers and is being processed in preparation for queueing for transmission.") + + cls._register_trace(mactx) + + mactxdrop = Trace("MacTxDrop", "A packet has been dropped in the MAC layer before being queued for transmission.") + + cls._register_trace(mactxdrop) + + macpromiscrx = Trace("MacPromiscRx", "A packet has been received by this device, has been passed up from the physical layer and is being forwarded up the local protocol stack. This is a promiscuous trace,") + + cls._register_trace(macpromiscrx) + + macrx = Trace("MacRx", "A packet has been received by this device, has been passed up from the physical layer and is being forwarded up the local protocol stack. This is a non-promiscuous trace,") + + cls._register_trace(macrx) + + macrxdrop = Trace("MacRxDrop", "A packet has been dropped in the MAC layer after it has been passed up from the physical layer.") + + cls._register_trace(macrxdrop) + + + + def __init__(self, ec, guid): + super(NS3MeshWifiInterfaceMac, self).__init__(ec, guid) + self._home = "ns3-mesh-wifi-interface-mac-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/minstrel_wifi_manager.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/minstrel_wifi_manager.html new file mode 100644 index 00000000..2c01269a --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/minstrel_wifi_manager.html @@ -0,0 +1,268 @@ + + + + + + + + nepi.resources.ns3.classes.minstrel_wifi_manager — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.minstrel_wifi_manager

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3wifiremotestationmanager import NS3BaseWifiRemoteStationManager 
+
+@clsinit_copy
+
[docs]class NS3MinstrelWifiManager(NS3BaseWifiRemoteStationManager): + _rtype = "ns3::MinstrelWifiManager" + + @classmethod + def _register_attributes(cls): + + attr_updatestatistics = Attribute("UpdateStatistics", + "The interval between updating statistics table ", + type = Types.String, + default = "+100000000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_updatestatistics) + + attr_lookaroundrate = Attribute("LookAroundRate", + "the percentage to try other rates", + type = Types.Double, + default = "10", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_lookaroundrate) + + attr_ewma = Attribute("EWMA", + "EWMA level", + type = Types.Double, + default = "75", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_ewma) + + attr_samplecolumn = Attribute("SampleColumn", + "The number of columns used for sampling", + type = Types.Double, + default = "10", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_samplecolumn) + + attr_packetlength = Attribute("PacketLength", + "The packet length used for calculating mode TxTime", + type = Types.Double, + default = "1200", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_packetlength) + + attr_islowlatency = Attribute("IsLowLatency", + "If true, we attempt to modelize a so-called low-latency device: a device where decisions about tx parameters can be made on a per-packet basis and feedback about the transmission of each packet is obtained before sending the next. Otherwise, we modelize a high-latency device, that is a device where we cannot update our decision about tx parameters after every packet transmission.", + type = Types.Bool, + default = "True", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_islowlatency) + + attr_maxssrc = Attribute("MaxSsrc", + "The maximum number of retransmission attempts for an RTS. This value will not have any effect on some rate control algorithms.", + type = Types.Integer, + default = "7", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxssrc) + + attr_maxslrc = Attribute("MaxSlrc", + "The maximum number of retransmission attempts for a DATA packet. This value will not have any effect on some rate control algorithms.", + type = Types.Integer, + default = "7", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxslrc) + + attr_rtsctsthreshold = Attribute("RtsCtsThreshold", + "If the size of the data packet + LLC header + MAC header + FCS trailer is bigger than this value, we use an RTS/CTS handshake before sending the data, as per IEEE Std. 802.11-2012, Section 9.3.5. This value will not have any effect on some rate control algorithms.", + type = Types.Integer, + default = "2346", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_rtsctsthreshold) + + attr_fragmentationthreshold = Attribute("FragmentationThreshold", + "If the size of the data packet + LLC header + MAC header + FCS trailer is biggerthan this value, we fragment it such that the size of the fragments are equal or smaller than this value, as per IEEE Std. 802.11-2012, Section 9.5. This value will not have any effect on some rate control algorithms.", + type = Types.Integer, + default = "2346", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_fragmentationthreshold) + + attr_nonunicastmode = Attribute("NonUnicastMode", + "Wifi mode used for non-unicast transmissions.", + type = Types.String, + default = "Invalid-WifiMode", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_nonunicastmode) + + attr_defaulttxpowerlevel = Attribute("DefaultTxPowerLevel", + "Default power level to be used for transmissions. This is the power level that is used by all those WifiManagers that do notimplement TX power control.", + type = Types.Integer, + default = "0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_defaulttxpowerlevel) + + + + @classmethod + def _register_traces(cls): + + mactxrtsfailed = Trace("MacTxRtsFailed", "The transmission of a RTS by the MAC layer has failed") + + cls._register_trace(mactxrtsfailed) + + mactxdatafailed = Trace("MacTxDataFailed", "The transmission of a data packet by the MAC layer has failed") + + cls._register_trace(mactxdatafailed) + + mactxfinalrtsfailed = Trace("MacTxFinalRtsFailed", "The transmission of a RTS has exceeded the maximum number of attempts") + + cls._register_trace(mactxfinalrtsfailed) + + mactxfinaldatafailed = Trace("MacTxFinalDataFailed", "The transmission of a data packet has exceeded the maximum number of attempts") + + cls._register_trace(mactxfinaldatafailed) + + + + def __init__(self, ec, guid): + super(NS3MinstrelWifiManager, self).__init__(ec, guid) + self._home = "ns3-minstrel-wifi-manager-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/multi_model_spectrum_channel.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/multi_model_spectrum_channel.html new file mode 100644 index 00000000..c80bd72b --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/multi_model_spectrum_channel.html @@ -0,0 +1,156 @@ + + + + + + + + nepi.resources.ns3.classes.multi_model_spectrum_channel — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.multi_model_spectrum_channel

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3channel import NS3BaseChannel 
+
+@clsinit_copy
+
[docs]class NS3MultiModelSpectrumChannel(NS3BaseChannel): + _rtype = "ns3::MultiModelSpectrumChannel" + + @classmethod + def _register_attributes(cls): + + attr_maxlossdb = Attribute("MaxLossDb", + "If a single-frequency PropagationLossModel is used, this value represents the maximum loss in dB for which transmissions will be passed to the receiving PHY. Signals for which the PropagationLossModel returns a loss bigger than this value will not be propagated to the receiver. This parameter is to be used to reduce the computational load by not propagating signals that are far beyond the interference range. Note that the default value corresponds to considering all signals for reception. Tune this value with care. ", + type = Types.Double, + default = "1e+09", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxlossdb) + + attr_id = Attribute("Id", + "The id (unique integer) of this Channel.", + type = Types.Integer, + default = "0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.NoWrite) + + cls._register_attribute(attr_id) + + + + @classmethod + def _register_traces(cls): + + pathloss = Trace("PathLoss", "This trace is fired whenever a new path loss value is calculated. The first and second parameters to the trace are pointers respectively to the TX and RX SpectrumPhy instances, whereas the third parameters is the loss value in dB. Note that the loss value reported by this trace is the single-frequency loss value obtained by evaluating only the TX and RX AntennaModels and the PropagationLossModel. In particular, note that SpectrumPropagationLossModel (even if present) is never used to evaluate the loss value reported in this trace. ") + + cls._register_trace(pathloss) + + + + def __init__(self, ec, guid): + super(NS3MultiModelSpectrumChannel, self).__init__(ec, guid) + self._home = "ns3-multi-model-spectrum-channel-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/nakagami_propagation_loss_model.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/nakagami_propagation_loss_model.html new file mode 100644 index 00000000..17d6e92e --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/nakagami_propagation_loss_model.html @@ -0,0 +1,201 @@ + + + + + + + + nepi.resources.ns3.classes.nakagami_propagation_loss_model — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.nakagami_propagation_loss_model

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3propagationlossmodel import NS3BasePropagationLossModel 
+
+@clsinit_copy
+
[docs]class NS3NakagamiPropagationLossModel(NS3BasePropagationLossModel): + _rtype = "ns3::NakagamiPropagationLossModel" + + @classmethod + def _register_attributes(cls): + + attr_distance1 = Attribute("Distance1", + "Beginning of the second distance field. Default is 80m.", + type = Types.Double, + default = "80", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_distance1) + + attr_distance2 = Attribute("Distance2", + "Beginning of the third distance field. Default is 200m.", + type = Types.Double, + default = "200", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_distance2) + + attr_m0 = Attribute("m0", + "m0 for distances smaller than Distance1. Default is 1.5.", + type = Types.Double, + default = "1.5", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_m0) + + attr_m1 = Attribute("m1", + "m1 for distances smaller than Distance2. Default is 0.75.", + type = Types.Double, + default = "0.75", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_m1) + + attr_m2 = Attribute("m2", + "m2 for distances greater than Distance2. Default is 0.75.", + type = Types.Double, + default = "0.75", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_m2) + + attr_erlangrv = Attribute("ErlangRv", + "Access to the underlying ErlangRandomVariable", + type = Types.String, + default = "ns3::ErlangRandomVariable", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_erlangrv) + + attr_gammarv = Attribute("GammaRv", + "Access to the underlying GammaRandomVariable", + type = Types.String, + default = "ns3::GammaRandomVariable", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_gammarv) + + + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3NakagamiPropagationLossModel, self).__init__(ec, guid) + self._home = "ns3-nakagami-propagation-loss-model-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/nist_error_rate_model.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/nist_error_rate_model.html new file mode 100644 index 00000000..d6924009 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/nist_error_rate_model.html @@ -0,0 +1,130 @@ + + + + + + + + nepi.resources.ns3.classes.nist_error_rate_model — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.nist_error_rate_model

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3errorratemodel import NS3BaseErrorRateModel 
+
+@clsinit_copy
+
[docs]class NS3NistErrorRateModel(NS3BaseErrorRateModel): + _rtype = "ns3::NistErrorRateModel" + + @classmethod + def _register_attributes(cls): + pass + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3NistErrorRateModel, self).__init__(ec, guid) + self._home = "ns3-nist-error-rate-model-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/node.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/node.html new file mode 100644 index 00000000..dfc75d30 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/node.html @@ -0,0 +1,151 @@ + + + + + + + + nepi.resources.ns3.classes.node — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.node

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3node import NS3BaseNode 
+
+@clsinit_copy
+
[docs]class NS3Node(NS3BaseNode): + _rtype = "ns3::Node" + + @classmethod + def _register_attributes(cls): + + attr_id = Attribute("Id", + "The id (unique integer) of this Node.", + type = Types.Integer, + default = "0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.NoWrite) + + cls._register_attribute(attr_id) + + attr_systemid = Attribute("SystemId", + "The systemId of this node: a unique integer used for parallel simulations.", + type = Types.Integer, + default = "0", + allowed = None, + range = None, + flags = Flags.Reserved) + + cls._register_attribute(attr_systemid) + + + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3Node, self).__init__(ec, guid) + self._home = "ns3-node-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/non_communicating_net_device.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/non_communicating_net_device.html new file mode 100644 index 00000000..40302c41 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/non_communicating_net_device.html @@ -0,0 +1,130 @@ + + + + + + + + nepi.resources.ns3.classes.non_communicating_net_device — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.non_communicating_net_device

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3netdevice import NS3BaseNetDevice 
+
+@clsinit_copy
+
[docs]class NS3NonCommunicatingNetDevice(NS3BaseNetDevice): + _rtype = "ns3::NonCommunicatingNetDevice" + + @classmethod + def _register_attributes(cls): + pass + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3NonCommunicatingNetDevice, self).__init__(ec, guid) + self._home = "ns3-non-communicating-net-device-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/ocb_wifi_mac.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/ocb_wifi_mac.html new file mode 100644 index 00000000..fe0ad5f4 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/ocb_wifi_mac.html @@ -0,0 +1,300 @@ + + + + + + + + nepi.resources.ns3.classes.ocb_wifi_mac — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.ocb_wifi_mac

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3wifimac import NS3BaseWifiMac 
+
+@clsinit_copy
+
[docs]class NS3OcbWifiMac(NS3BaseWifiMac): + _rtype = "ns3::OcbWifiMac" + + @classmethod + def _register_attributes(cls): + + attr_qossupported = Attribute("QosSupported", + "This Boolean attribute is set to enable 802.11e/WMM-style QoS support at this STA", + type = Types.Bool, + default = "False", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_qossupported) + + attr_htsupported = Attribute("HtSupported", + "This Boolean attribute is set to enable 802.11n support at this STA", + type = Types.Bool, + default = "False", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_htsupported) + + attr_ctstoselfsupported = Attribute("CtsToSelfSupported", + "Use CTS to Self when using a rate that is not in the basic set rate", + type = Types.Bool, + default = "False", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_ctstoselfsupported) + + attr_ctstimeout = Attribute("CtsTimeout", + "When this timeout expires, the RTS/CTS handshake has failed.", + type = Types.String, + default = "+75000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_ctstimeout) + + attr_acktimeout = Attribute("AckTimeout", + "When this timeout expires, the DATA/ACK handshake has failed.", + type = Types.String, + default = "+75000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_acktimeout) + + attr_basicblockacktimeout = Attribute("BasicBlockAckTimeout", + "When this timeout expires, the BASIC_BLOCK_ACK_REQ/BASIC_BLOCK_ACK handshake has failed.", + type = Types.String, + default = "+281000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_basicblockacktimeout) + + attr_compressedblockacktimeout = Attribute("CompressedBlockAckTimeout", + "When this timeout expires, the COMPRESSED_BLOCK_ACK_REQ/COMPRESSED_BLOCK_ACK handshake has failed.", + type = Types.String, + default = "+107000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_compressedblockacktimeout) + + attr_sifs = Attribute("Sifs", + "The value of the SIFS constant.", + type = Types.String, + default = "+16000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_sifs) + + attr_eifsnodifs = Attribute("EifsNoDifs", + "The value of EIFS-DIFS", + type = Types.String, + default = "+60000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_eifsnodifs) + + attr_slot = Attribute("Slot", + "The duration of a Slot.", + type = Types.String, + default = "+9000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_slot) + + attr_pifs = Attribute("Pifs", + "The value of the PIFS constant.", + type = Types.String, + default = "+25000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_pifs) + + attr_rifs = Attribute("Rifs", + "The value of the RIFS constant.", + type = Types.String, + default = "+2000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_rifs) + + attr_maxpropagationdelay = Attribute("MaxPropagationDelay", + "The maximum propagation delay. Unused for now.", + type = Types.String, + default = "+3333.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxpropagationdelay) + + attr_ssid = Attribute("Ssid", + "The ssid we want to belong to.", + type = Types.String, + default = "default", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_ssid) + + + + @classmethod + def _register_traces(cls): + + txokheader = Trace("TxOkHeader", "The header of successfully transmitted packet") + + cls._register_trace(txokheader) + + txerrheader = Trace("TxErrHeader", "The header of unsuccessfully transmitted packet") + + cls._register_trace(txerrheader) + + mactx = Trace("MacTx", "A packet has been received from higher layers and is being processed in preparation for queueing for transmission.") + + cls._register_trace(mactx) + + mactxdrop = Trace("MacTxDrop", "A packet has been dropped in the MAC layer before being queued for transmission.") + + cls._register_trace(mactxdrop) + + macpromiscrx = Trace("MacPromiscRx", "A packet has been received by this device, has been passed up from the physical layer and is being forwarded up the local protocol stack. This is a promiscuous trace,") + + cls._register_trace(macpromiscrx) + + macrx = Trace("MacRx", "A packet has been received by this device, has been passed up from the physical layer and is being forwarded up the local protocol stack. This is a non-promiscuous trace,") + + cls._register_trace(macrx) + + macrxdrop = Trace("MacRxDrop", "A packet has been dropped in the MAC layer after it has been passed up from the physical layer.") + + cls._register_trace(macrxdrop) + + + + def __init__(self, ec, guid): + super(NS3OcbWifiMac, self).__init__(ec, guid) + self._home = "ns3-ocb-wifi-mac-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/oh_buildings_propagation_loss_model.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/oh_buildings_propagation_loss_model.html new file mode 100644 index 00000000..ceaa4abb --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/oh_buildings_propagation_loss_model.html @@ -0,0 +1,171 @@ + + + + + + + + nepi.resources.ns3.classes.oh_buildings_propagation_loss_model — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.oh_buildings_propagation_loss_model

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3propagationlossmodel import NS3BasePropagationLossModel 
+
+@clsinit_copy
+
[docs]class NS3OhBuildingsPropagationLossModel(NS3BasePropagationLossModel): + _rtype = "ns3::OhBuildingsPropagationLossModel" + + @classmethod + def _register_attributes(cls): + + attr_shadowsigmaoutdoor = Attribute("ShadowSigmaOutdoor", + "Standard deviation of the normal distribution used for calculate the shadowing for outdoor nodes", + type = Types.Double, + default = "7", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_shadowsigmaoutdoor) + + attr_shadowsigmaindoor = Attribute("ShadowSigmaIndoor", + "Standard deviation of the normal distribution used for calculate the shadowing for indoor nodes ", + type = Types.Double, + default = "8", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_shadowsigmaindoor) + + attr_shadowsigmaextwalls = Attribute("ShadowSigmaExtWalls", + "Standard deviation of the normal distribution used for calculate the shadowing due to ext walls ", + type = Types.Double, + default = "5", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_shadowsigmaextwalls) + + attr_internalwallloss = Attribute("InternalWallLoss", + "Additional loss for each internal wall [dB]", + type = Types.Double, + default = "5", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_internalwallloss) + + + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3OhBuildingsPropagationLossModel, self).__init__(ec, guid) + self._home = "ns3-oh-buildings-propagation-loss-model-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/okumura_hata_propagation_loss_model.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/okumura_hata_propagation_loss_model.html new file mode 100644 index 00000000..6426f914 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/okumura_hata_propagation_loss_model.html @@ -0,0 +1,161 @@ + + + + + + + + nepi.resources.ns3.classes.okumura_hata_propagation_loss_model — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.okumura_hata_propagation_loss_model

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3propagationlossmodel import NS3BasePropagationLossModel 
+
+@clsinit_copy
+
[docs]class NS3OkumuraHataPropagationLossModel(NS3BasePropagationLossModel): + _rtype = "ns3::OkumuraHataPropagationLossModel" + + @classmethod + def _register_attributes(cls): + + attr_frequency = Attribute("Frequency", + "The propagation frequency in Hz", + type = Types.Double, + default = "2.16e+09", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_frequency) + + attr_environment = Attribute("Environment", + "Environment Scenario", + type = Types.Enumerate, + default = "Urban", + allowed = ["Urban","SubUrban","OpenAreas"], + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_environment) + + attr_citysize = Attribute("CitySize", + "Dimension of the city", + type = Types.Enumerate, + default = "Large", + allowed = ["Small","Medium","Large"], + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_citysize) + + + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3OkumuraHataPropagationLossModel, self).__init__(ec, guid) + self._home = "ns3-okumura-hata-propagation-loss-model-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/on_off_application.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/on_off_application.html new file mode 100644 index 00000000..d077a617 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/on_off_application.html @@ -0,0 +1,226 @@ + + + + + + + + nepi.resources.ns3.classes.on_off_application — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.on_off_application

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3application import NS3BaseApplication 
+
+@clsinit_copy
+
[docs]class NS3OnOffApplication(NS3BaseApplication): + _rtype = "ns3::OnOffApplication" + + @classmethod + def _register_attributes(cls): + + attr_datarate = Attribute("DataRate", + "The data rate in on state.", + type = Types.String, + default = "500000bps", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_datarate) + + attr_packetsize = Attribute("PacketSize", + "The size of packets sent in on state", + type = Types.Integer, + default = "512", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_packetsize) + + attr_remote = Attribute("Remote", + "The address of the destination", + type = Types.String, + default = "00-00-00", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_remote) + + attr_ontime = Attribute("OnTime", + "A RandomVariableStream used to pick the duration of the \'On\' state.", + type = Types.String, + default = "ns3::ConstantRandomVariable[Constant=1.0]", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_ontime) + + attr_offtime = Attribute("OffTime", + "A RandomVariableStream used to pick the duration of the \'Off\' state.", + type = Types.String, + default = "ns3::ConstantRandomVariable[Constant=1.0]", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_offtime) + + attr_maxbytes = Attribute("MaxBytes", + "The total number of bytes to send. Once these bytes are sent, no packet is sent again, even in on state. The value zero means that there is no limit.", + type = Types.Integer, + default = "0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxbytes) + + attr_protocol = Attribute("Protocol", + "The type of protocol to use.", + type = Types.String, + default = "ns3::UdpSocketFactory", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_protocol) + + attr_starttime = Attribute("StartTime", + "Time at which the application will start", + type = Types.String, + default = "+0.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_starttime) + + attr_stoptime = Attribute("StopTime", + "Time at which the application will stop", + type = Types.String, + default = "+0.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_stoptime) + + + + @classmethod + def _register_traces(cls): + + tx = Trace("Tx", "A new packet is created and is sent") + + cls._register_trace(tx) + + + + def __init__(self, ec, guid): + super(NS3OnOffApplication, self).__init__(ec, guid) + self._home = "ns3-on-off-application-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/onoe_wifi_manager.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/onoe_wifi_manager.html new file mode 100644 index 00000000..5a657309 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/onoe_wifi_manager.html @@ -0,0 +1,248 @@ + + + + + + + + nepi.resources.ns3.classes.onoe_wifi_manager — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.onoe_wifi_manager

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3wifiremotestationmanager import NS3BaseWifiRemoteStationManager 
+
+@clsinit_copy
+
[docs]class NS3OnoeWifiManager(NS3BaseWifiRemoteStationManager): + _rtype = "ns3::OnoeWifiManager" + + @classmethod + def _register_attributes(cls): + + attr_updateperiod = Attribute("UpdatePeriod", + "The interval between decisions about rate control changes", + type = Types.String, + default = "+1000000000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_updateperiod) + + attr_raisethreshold = Attribute("RaiseThreshold", + "Attempt to raise the rate if we hit that threshold", + type = Types.Integer, + default = "10", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_raisethreshold) + + attr_addcreditthreshold = Attribute("AddCreditThreshold", + "Add credit threshold", + type = Types.Integer, + default = "10", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_addcreditthreshold) + + attr_islowlatency = Attribute("IsLowLatency", + "If true, we attempt to modelize a so-called low-latency device: a device where decisions about tx parameters can be made on a per-packet basis and feedback about the transmission of each packet is obtained before sending the next. Otherwise, we modelize a high-latency device, that is a device where we cannot update our decision about tx parameters after every packet transmission.", + type = Types.Bool, + default = "True", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_islowlatency) + + attr_maxssrc = Attribute("MaxSsrc", + "The maximum number of retransmission attempts for an RTS. This value will not have any effect on some rate control algorithms.", + type = Types.Integer, + default = "7", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxssrc) + + attr_maxslrc = Attribute("MaxSlrc", + "The maximum number of retransmission attempts for a DATA packet. This value will not have any effect on some rate control algorithms.", + type = Types.Integer, + default = "7", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxslrc) + + attr_rtsctsthreshold = Attribute("RtsCtsThreshold", + "If the size of the data packet + LLC header + MAC header + FCS trailer is bigger than this value, we use an RTS/CTS handshake before sending the data, as per IEEE Std. 802.11-2012, Section 9.3.5. This value will not have any effect on some rate control algorithms.", + type = Types.Integer, + default = "2346", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_rtsctsthreshold) + + attr_fragmentationthreshold = Attribute("FragmentationThreshold", + "If the size of the data packet + LLC header + MAC header + FCS trailer is biggerthan this value, we fragment it such that the size of the fragments are equal or smaller than this value, as per IEEE Std. 802.11-2012, Section 9.5. This value will not have any effect on some rate control algorithms.", + type = Types.Integer, + default = "2346", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_fragmentationthreshold) + + attr_nonunicastmode = Attribute("NonUnicastMode", + "Wifi mode used for non-unicast transmissions.", + type = Types.String, + default = "Invalid-WifiMode", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_nonunicastmode) + + attr_defaulttxpowerlevel = Attribute("DefaultTxPowerLevel", + "Default power level to be used for transmissions. This is the power level that is used by all those WifiManagers that do notimplement TX power control.", + type = Types.Integer, + default = "0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_defaulttxpowerlevel) + + + + @classmethod + def _register_traces(cls): + + mactxrtsfailed = Trace("MacTxRtsFailed", "The transmission of a RTS by the MAC layer has failed") + + cls._register_trace(mactxrtsfailed) + + mactxdatafailed = Trace("MacTxDataFailed", "The transmission of a data packet by the MAC layer has failed") + + cls._register_trace(mactxdatafailed) + + mactxfinalrtsfailed = Trace("MacTxFinalRtsFailed", "The transmission of a RTS has exceeded the maximum number of attempts") + + cls._register_trace(mactxfinalrtsfailed) + + mactxfinaldatafailed = Trace("MacTxFinalDataFailed", "The transmission of a data packet has exceeded the maximum number of attempts") + + cls._register_trace(mactxfinaldatafailed) + + + + def __init__(self, ec, guid): + super(NS3OnoeWifiManager, self).__init__(ec, guid) + self._home = "ns3-onoe-wifi-manager-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/packet_sink.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/packet_sink.html new file mode 100644 index 00000000..06afb05a --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/packet_sink.html @@ -0,0 +1,176 @@ + + + + + + + + nepi.resources.ns3.classes.packet_sink — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.packet_sink

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3application import NS3BaseApplication 
+
+@clsinit_copy
+
[docs]class NS3PacketSink(NS3BaseApplication): + _rtype = "ns3::PacketSink" + + @classmethod + def _register_attributes(cls): + + attr_local = Attribute("Local", + "The Address on which to Bind the rx socket.", + type = Types.String, + default = "00-00-00", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_local) + + attr_protocol = Attribute("Protocol", + "The type id of the protocol to use for the rx socket.", + type = Types.String, + default = "ns3::UdpSocketFactory", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_protocol) + + attr_starttime = Attribute("StartTime", + "Time at which the application will start", + type = Types.String, + default = "+0.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_starttime) + + attr_stoptime = Attribute("StopTime", + "Time at which the application will stop", + type = Types.String, + default = "+0.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_stoptime) + + + + @classmethod + def _register_traces(cls): + + rx = Trace("Rx", "A packet has been received") + + cls._register_trace(rx) + + + + def __init__(self, ec, guid): + super(NS3PacketSink, self).__init__(ec, guid) + self._home = "ns3-packet-sink-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/ping6.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/ping6.html new file mode 100644 index 00000000..7800ecfa --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/ping6.html @@ -0,0 +1,201 @@ + + + + + + + + nepi.resources.ns3.classes.ping6 — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.ping6

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3application import NS3BaseApplication 
+
+@clsinit_copy
+
[docs]class NS3Ping6(NS3BaseApplication): + _rtype = "ns3::Ping6" + + @classmethod + def _register_attributes(cls): + + attr_maxpackets = Attribute("MaxPackets", + "The maximum number of packets the application will send", + type = Types.Integer, + default = "100", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxpackets) + + attr_interval = Attribute("Interval", + "The time to wait between packets", + type = Types.String, + default = "+1000000000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_interval) + + attr_remoteipv6 = Attribute("RemoteIpv6", + "The Ipv6Address of the outbound packets", + type = Types.String, + default = "::", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_remoteipv6) + + attr_localipv6 = Attribute("LocalIpv6", + "Local Ipv6Address of the sender", + type = Types.String, + default = "::", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_localipv6) + + attr_packetsize = Attribute("PacketSize", + "Size of packets generated", + type = Types.Integer, + default = "100", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_packetsize) + + attr_starttime = Attribute("StartTime", + "Time at which the application will start", + type = Types.String, + default = "+0.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_starttime) + + attr_stoptime = Attribute("StopTime", + "Time at which the application will stop", + type = Types.String, + default = "+0.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_stoptime) + + + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3Ping6, self).__init__(ec, guid) + self._home = "ns3-ping6-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/point_to_point_channel.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/point_to_point_channel.html new file mode 100644 index 00000000..9633c160 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/point_to_point_channel.html @@ -0,0 +1,156 @@ + + + + + + + + nepi.resources.ns3.classes.point_to_point_channel — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.point_to_point_channel

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3channel import NS3BaseChannel 
+
+@clsinit_copy
+
[docs]class NS3PointToPointChannel(NS3BaseChannel): + _rtype = "ns3::PointToPointChannel" + + @classmethod + def _register_attributes(cls): + + attr_delay = Attribute("Delay", + "Transmission delay through the channel", + type = Types.String, + default = "+0.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_delay) + + attr_id = Attribute("Id", + "The id (unique integer) of this Channel.", + type = Types.Integer, + default = "0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.NoWrite) + + cls._register_attribute(attr_id) + + + + @classmethod + def _register_traces(cls): + + txrxpointtopoint = Trace("TxRxPointToPoint", "Trace source indicating transmission of packet from the PointToPointChannel, used by the Animation interface.") + + cls._register_trace(txrxpointtopoint) + + + + def __init__(self, ec, guid): + super(NS3PointToPointChannel, self).__init__(ec, guid) + self._home = "ns3-point-to-point-channel-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/point_to_point_net_device.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/point_to_point_net_device.html new file mode 100644 index 00000000..b03bacfe --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/point_to_point_net_device.html @@ -0,0 +1,216 @@ + + + + + + + + nepi.resources.ns3.classes.point_to_point_net_device — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.point_to_point_net_device

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3netdevice import NS3BaseNetDevice 
+
+@clsinit_copy
+
[docs]class NS3PointToPointNetDevice(NS3BaseNetDevice): + _rtype = "ns3::PointToPointNetDevice" + + @classmethod + def _register_attributes(cls): + + attr_mtu = Attribute("Mtu", + "The MAC-level Maximum Transmission Unit", + type = Types.Integer, + default = "1500", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_mtu) + + attr_address = Attribute("Address", + "The MAC address of this device.", + type = Types.String, + default = "ff:ff:ff:ff:ff:ff", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_address) + + attr_datarate = Attribute("DataRate", + "The default data rate for point to point links", + type = Types.String, + default = "32768bps", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_datarate) + + attr_interframegap = Attribute("InterframeGap", + "The time to wait between packet (frame) transmissions", + type = Types.String, + default = "+0.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_interframegap) + + + + @classmethod + def _register_traces(cls): + + mactx = Trace("MacTx", "Trace source indicating a packet has arrived for transmission by this device") + + cls._register_trace(mactx) + + mactxdrop = Trace("MacTxDrop", "Trace source indicating a packet has been dropped by the device before transmission") + + cls._register_trace(mactxdrop) + + macpromiscrx = Trace("MacPromiscRx", "A packet has been received by this device, has been passed up from the physical layer and is being forwarded up the local protocol stack. This is a promiscuous trace,") + + cls._register_trace(macpromiscrx) + + macrx = Trace("MacRx", "A packet has been received by this device, has been passed up from the physical layer and is being forwarded up the local protocol stack. This is a non-promiscuous trace,") + + cls._register_trace(macrx) + + phytxbegin = Trace("PhyTxBegin", "Trace source indicating a packet has begun transmitting over the channel") + + cls._register_trace(phytxbegin) + + phytxend = Trace("PhyTxEnd", "Trace source indicating a packet has been completely transmitted over the channel") + + cls._register_trace(phytxend) + + phytxdrop = Trace("PhyTxDrop", "Trace source indicating a packet has been dropped by the device during transmission") + + cls._register_trace(phytxdrop) + + phyrxend = Trace("PhyRxEnd", "Trace source indicating a packet has been completely received by the device") + + cls._register_trace(phyrxend) + + phyrxdrop = Trace("PhyRxDrop", "Trace source indicating a packet has been dropped by the device during reception") + + cls._register_trace(phyrxdrop) + + sniffer = Trace("Sniffer", "Trace source simulating a non-promiscuous packet sniffer attached to the device") + + cls._register_trace(sniffer) + + promiscsniffer = Trace("PromiscSniffer", "Trace source simulating a promiscuous packet sniffer attached to the device") + + cls._register_trace(promiscsniffer) + + + + def __init__(self, ec, guid): + super(NS3PointToPointNetDevice, self).__init__(ec, guid) + self._home = "ns3-point-to-point-net-device-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/point_to_point_remote_channel.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/point_to_point_remote_channel.html new file mode 100644 index 00000000..06166e88 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/point_to_point_remote_channel.html @@ -0,0 +1,156 @@ + + + + + + + + nepi.resources.ns3.classes.point_to_point_remote_channel — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.point_to_point_remote_channel

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3channel import NS3BaseChannel 
+
+@clsinit_copy
+
[docs]class NS3PointToPointRemoteChannel(NS3BaseChannel): + _rtype = "ns3::PointToPointRemoteChannel" + + @classmethod + def _register_attributes(cls): + + attr_delay = Attribute("Delay", + "Transmission delay through the channel", + type = Types.String, + default = "+0.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_delay) + + attr_id = Attribute("Id", + "The id (unique integer) of this Channel.", + type = Types.Integer, + default = "0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.NoWrite) + + cls._register_attribute(attr_id) + + + + @classmethod + def _register_traces(cls): + + txrxpointtopoint = Trace("TxRxPointToPoint", "Trace source indicating transmission of packet from the PointToPointChannel, used by the Animation interface.") + + cls._register_trace(txrxpointtopoint) + + + + def __init__(self, ec, guid): + super(NS3PointToPointRemoteChannel, self).__init__(ec, guid) + self._home = "ns3-point-to-point-remote-channel-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/radvd.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/radvd.html new file mode 100644 index 00000000..0aa42df4 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/radvd.html @@ -0,0 +1,161 @@ + + + + + + + + nepi.resources.ns3.classes.radvd — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.radvd

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3application import NS3BaseApplication 
+
+@clsinit_copy
+
[docs]class NS3Radvd(NS3BaseApplication): + _rtype = "ns3::Radvd" + + @classmethod + def _register_attributes(cls): + + attr_advertisementjitter = Attribute("AdvertisementJitter", + "Uniform variable to provide jitter between min and max values of AdvInterval", + type = Types.String, + default = "ns3::UniformRandomVariable", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_advertisementjitter) + + attr_starttime = Attribute("StartTime", + "Time at which the application will start", + type = Types.String, + default = "+0.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_starttime) + + attr_stoptime = Attribute("StopTime", + "Time at which the application will stop", + type = Types.String, + default = "+0.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_stoptime) + + + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3Radvd, self).__init__(ec, guid) + self._home = "ns3-radvd-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/random_direction2d_mobility_model.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/random_direction2d_mobility_model.html new file mode 100644 index 00000000..22efa324 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/random_direction2d_mobility_model.html @@ -0,0 +1,186 @@ + + + + + + + + nepi.resources.ns3.classes.random_direction2d_mobility_model — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.random_direction2d_mobility_model

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3mobilitymodel import NS3BaseMobilityModel 
+
+@clsinit_copy
+
[docs]class NS3RandomDirection2dMobilityModel(NS3BaseMobilityModel): + _rtype = "ns3::RandomDirection2dMobilityModel" + + @classmethod + def _register_attributes(cls): + + attr_bounds = Attribute("Bounds", + "The 2d bounding area", + type = Types.String, + default = "-100|100|-100|100", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_bounds) + + attr_speed = Attribute("Speed", + "A random variable to control the speed (m/s).", + type = Types.String, + default = "ns3::UniformRandomVariable[Min=1.0|Max=2.0]", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_speed) + + attr_pause = Attribute("Pause", + "A random variable to control the pause (s).", + type = Types.String, + default = "ns3::ConstantRandomVariable[Constant=2.0]", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_pause) + + attr_position = Attribute("Position", + "The current position of the mobility model.", + type = Types.String, + default = "0:0:0", + allowed = None, + range = None, + flags = Flags.Reserved) + + cls._register_attribute(attr_position) + + attr_velocity = Attribute("Velocity", + "The current velocity of the mobility model.", + type = Types.String, + default = "0:0:0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.NoWrite) + + cls._register_attribute(attr_velocity) + + + + @classmethod + def _register_traces(cls): + + coursechange = Trace("CourseChange", "The value of the position and/or velocity vector changed") + + cls._register_trace(coursechange) + + + + def __init__(self, ec, guid): + super(NS3RandomDirection2dMobilityModel, self).__init__(ec, guid) + self._home = "ns3-random-direction2d-mobility-model-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/random_propagation_delay_model.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/random_propagation_delay_model.html new file mode 100644 index 00000000..013f9fd8 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/random_propagation_delay_model.html @@ -0,0 +1,141 @@ + + + + + + + + nepi.resources.ns3.classes.random_propagation_delay_model — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.random_propagation_delay_model

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3propagationdelaymodel import NS3BasePropagationDelayModel 
+
+@clsinit_copy
+
[docs]class NS3RandomPropagationDelayModel(NS3BasePropagationDelayModel): + _rtype = "ns3::RandomPropagationDelayModel" + + @classmethod + def _register_attributes(cls): + + attr_variable = Attribute("Variable", + "The random variable which generates random delays (s).", + type = Types.String, + default = "ns3::UniformRandomVariable", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_variable) + + + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3RandomPropagationDelayModel, self).__init__(ec, guid) + self._home = "ns3-random-propagation-delay-model-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/random_propagation_loss_model.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/random_propagation_loss_model.html new file mode 100644 index 00000000..67dfe0f8 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/random_propagation_loss_model.html @@ -0,0 +1,141 @@ + + + + + + + + nepi.resources.ns3.classes.random_propagation_loss_model — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.random_propagation_loss_model

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3propagationlossmodel import NS3BasePropagationLossModel 
+
+@clsinit_copy
+
[docs]class NS3RandomPropagationLossModel(NS3BasePropagationLossModel): + _rtype = "ns3::RandomPropagationLossModel" + + @classmethod + def _register_attributes(cls): + + attr_variable = Attribute("Variable", + "The random variable used to pick a loss everytime CalcRxPower is invoked.", + type = Types.String, + default = "ns3::ConstantRandomVariable[Constant=1.0]", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_variable) + + + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3RandomPropagationLossModel, self).__init__(ec, guid) + self._home = "ns3-random-propagation-loss-model-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/random_walk2d_mobility_model.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/random_walk2d_mobility_model.html new file mode 100644 index 00000000..2baf6a81 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/random_walk2d_mobility_model.html @@ -0,0 +1,216 @@ + + + + + + + + nepi.resources.ns3.classes.random_walk2d_mobility_model — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.random_walk2d_mobility_model

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3mobilitymodel import NS3BaseMobilityModel 
+
+@clsinit_copy
+
[docs]class NS3RandomWalk2dMobilityModel(NS3BaseMobilityModel): + _rtype = "ns3::RandomWalk2dMobilityModel" + + @classmethod + def _register_attributes(cls): + + attr_bounds = Attribute("Bounds", + "Bounds of the area to cruise.", + type = Types.String, + default = "0|100|0|100", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_bounds) + + attr_time = Attribute("Time", + "Change current direction and speed after moving for this delay.", + type = Types.String, + default = "+1000000000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_time) + + attr_distance = Attribute("Distance", + "Change current direction and speed after moving for this distance.", + type = Types.Double, + default = "1", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_distance) + + attr_mode = Attribute("Mode", + "The mode indicates the condition used to change the current speed and direction", + type = Types.Enumerate, + default = "Distance", + allowed = ["Distance","Time"], + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_mode) + + attr_direction = Attribute("Direction", + "A random variable used to pick the direction (gradients).", + type = Types.String, + default = "ns3::UniformRandomVariable[Min=0.0|Max=6.283184]", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_direction) + + attr_speed = Attribute("Speed", + "A random variable used to pick the speed (m/s).", + type = Types.String, + default = "ns3::UniformRandomVariable[Min=2.0|Max=4.0]", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_speed) + + attr_position = Attribute("Position", + "The current position of the mobility model.", + type = Types.String, + default = "0:0:0", + allowed = None, + range = None, + flags = Flags.Reserved) + + cls._register_attribute(attr_position) + + attr_velocity = Attribute("Velocity", + "The current velocity of the mobility model.", + type = Types.String, + default = "0:0:0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.NoWrite) + + cls._register_attribute(attr_velocity) + + + + @classmethod + def _register_traces(cls): + + coursechange = Trace("CourseChange", "The value of the position and/or velocity vector changed") + + cls._register_trace(coursechange) + + + + def __init__(self, ec, guid): + super(NS3RandomWalk2dMobilityModel, self).__init__(ec, guid) + self._home = "ns3-random-walk2d-mobility-model-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/random_waypoint_mobility_model.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/random_waypoint_mobility_model.html new file mode 100644 index 00000000..c2549aeb --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/random_waypoint_mobility_model.html @@ -0,0 +1,176 @@ + + + + + + + + nepi.resources.ns3.classes.random_waypoint_mobility_model — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.random_waypoint_mobility_model

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3mobilitymodel import NS3BaseMobilityModel 
+
+@clsinit_copy
+
[docs]class NS3RandomWaypointMobilityModel(NS3BaseMobilityModel): + _rtype = "ns3::RandomWaypointMobilityModel" + + @classmethod + def _register_attributes(cls): + + attr_speed = Attribute("Speed", + "A random variable used to pick the speed of a random waypoint model.", + type = Types.String, + default = "ns3::UniformRandomVariable[Min=0.3|Max=0.7]", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_speed) + + attr_pause = Attribute("Pause", + "A random variable used to pick the pause of a random waypoint model.", + type = Types.String, + default = "ns3::ConstantRandomVariable[Constant=2.0]", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_pause) + + attr_position = Attribute("Position", + "The current position of the mobility model.", + type = Types.String, + default = "0:0:0", + allowed = None, + range = None, + flags = Flags.Reserved) + + cls._register_attribute(attr_position) + + attr_velocity = Attribute("Velocity", + "The current velocity of the mobility model.", + type = Types.String, + default = "0:0:0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.NoWrite) + + cls._register_attribute(attr_velocity) + + + + @classmethod + def _register_traces(cls): + + coursechange = Trace("CourseChange", "The value of the position and/or velocity vector changed") + + cls._register_trace(coursechange) + + + + def __init__(self, ec, guid): + super(NS3RandomWaypointMobilityModel, self).__init__(ec, guid) + self._home = "ns3-random-waypoint-mobility-model-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/range_propagation_loss_model.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/range_propagation_loss_model.html new file mode 100644 index 00000000..12a038c1 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/range_propagation_loss_model.html @@ -0,0 +1,141 @@ + + + + + + + + nepi.resources.ns3.classes.range_propagation_loss_model — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.range_propagation_loss_model

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3propagationlossmodel import NS3BasePropagationLossModel 
+
+@clsinit_copy
+
[docs]class NS3RangePropagationLossModel(NS3BasePropagationLossModel): + _rtype = "ns3::RangePropagationLossModel" + + @classmethod + def _register_attributes(cls): + + attr_maxrange = Attribute("MaxRange", + "Maximum Transmission Range (meters)", + type = Types.Double, + default = "250", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxrange) + + + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3RangePropagationLossModel, self).__init__(ec, guid) + self._home = "ns3-range-propagation-loss-model-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/rate_error_model.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/rate_error_model.html new file mode 100644 index 00000000..df1f4f9f --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/rate_error_model.html @@ -0,0 +1,171 @@ + + + + + + + + nepi.resources.ns3.classes.rate_error_model — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.rate_error_model

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3errormodel import NS3BaseErrorModel 
+
+@clsinit_copy
+
[docs]class NS3RateErrorModel(NS3BaseErrorModel): + _rtype = "ns3::RateErrorModel" + + @classmethod + def _register_attributes(cls): + + attr_errorunit = Attribute("ErrorUnit", + "The error unit", + type = Types.Enumerate, + default = "ERROR_UNIT_BYTE", + allowed = ["ERROR_UNIT_BIT","ERROR_UNIT_BYTE","ERROR_UNIT_PACKET"], + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_errorunit) + + attr_errorrate = Attribute("ErrorRate", + "The error rate.", + type = Types.Double, + default = "0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_errorrate) + + attr_ranvar = Attribute("RanVar", + "The decision variable attached to this error model.", + type = Types.String, + default = "ns3::UniformRandomVariable[Min=0.0|Max=1.0]", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_ranvar) + + attr_isenabled = Attribute("IsEnabled", + "Whether this ErrorModel is enabled or not.", + type = Types.Bool, + default = "True", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_isenabled) + + + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3RateErrorModel, self).__init__(ec, guid) + self._home = "ns3-rate-error-model-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/receive_list_error_model.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/receive_list_error_model.html new file mode 100644 index 00000000..dcf10c00 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/receive_list_error_model.html @@ -0,0 +1,141 @@ + + + + + + + + nepi.resources.ns3.classes.receive_list_error_model — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.receive_list_error_model

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3errormodel import NS3BaseErrorModel 
+
+@clsinit_copy
+
[docs]class NS3ReceiveListErrorModel(NS3BaseErrorModel): + _rtype = "ns3::ReceiveListErrorModel" + + @classmethod + def _register_attributes(cls): + + attr_isenabled = Attribute("IsEnabled", + "Whether this ErrorModel is enabled or not.", + type = Types.Bool, + default = "True", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_isenabled) + + + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3ReceiveListErrorModel, self).__init__(ec, guid) + self._home = "ns3-receive-list-error-model-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/red_queue.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/red_queue.html new file mode 100644 index 00000000..1a49a0f9 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/red_queue.html @@ -0,0 +1,264 @@ + + + + + + + + nepi.resources.ns3.classes.red_queue — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.red_queue

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3queue import NS3BaseQueue 
+
+@clsinit_copy
+
[docs]class NS3RedQueue(NS3BaseQueue): + _rtype = "ns3::RedQueue" + + @classmethod + def _register_attributes(cls): + + attr_meanpktsize = Attribute("MeanPktSize", + "Average of packet size", + type = Types.Integer, + default = "500", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_meanpktsize) + + attr_idlepktsize = Attribute("IdlePktSize", + "Average packet size used during idle times. Used when m_cautions = 3", + type = Types.Integer, + default = "0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_idlepktsize) + + attr_wait = Attribute("Wait", + "True for waiting between dropped packets", + type = Types.Bool, + default = "True", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_wait) + + attr_gentle = Attribute("Gentle", + "True to increases dropping probability slowly when average queue exceeds maxthresh", + type = Types.Bool, + default = "True", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_gentle) + + attr_minth = Attribute("MinTh", + "Minimum average length threshold in packets/bytes", + type = Types.Double, + default = "5", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_minth) + + attr_maxth = Attribute("MaxTh", + "Maximum average length threshold in packets/bytes", + type = Types.Double, + default = "15", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxth) + + attr_queuelimit = Attribute("QueueLimit", + "Queue limit in bytes/packets", + type = Types.Integer, + default = "25", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_queuelimit) + + attr_qw = Attribute("QW", + "Queue weight related to the exponential weighted moving average (EWMA)", + type = Types.Double, + default = "0.002", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_qw) + + attr_linterm = Attribute("LInterm", + "The maximum probability of dropping a packet", + type = Types.Double, + default = "50", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_linterm) + + attr_ns1compat = Attribute("Ns1Compat", + "NS-1 compatibility", + type = Types.Bool, + default = "False", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_ns1compat) + + attr_linkbandwidth = Attribute("LinkBandwidth", + "The RED link bandwidth", + type = Types.String, + default = "1500000bps", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_linkbandwidth) + + attr_linkdelay = Attribute("LinkDelay", + "The RED link delay", + type = Types.String, + default = "+20000000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_linkdelay) + + + + @classmethod + def _register_traces(cls): + + enqueue = Trace("Enqueue", "Enqueue a packet in the queue.") + + cls._register_trace(enqueue) + + dequeue = Trace("Dequeue", "Dequeue a packet from the queue.") + + cls._register_trace(dequeue) + + drop = Trace("Drop", "Drop a packet stored in the queue.") + + cls._register_trace(drop) + + + + def __init__(self, ec, guid): + super(NS3RedQueue, self).__init__(ec, guid) + self._home = "ns3-red-queue-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/rraa_wifi_manager.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/rraa_wifi_manager.html new file mode 100644 index 00000000..68fa6daf --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/rraa_wifi_manager.html @@ -0,0 +1,458 @@ + + + + + + + + nepi.resources.ns3.classes.rraa_wifi_manager — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.rraa_wifi_manager

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3wifiremotestationmanager import NS3BaseWifiRemoteStationManager 
+
+@clsinit_copy
+
[docs]class NS3RraaWifiManager(NS3BaseWifiRemoteStationManager): + _rtype = "ns3::RraaWifiManager" + + @classmethod + def _register_attributes(cls): + + attr_basic = Attribute("Basic", + "If true the RRAA-BASIC algorithm will be used, otherwise the RRAA wil be used", + type = Types.Bool, + default = "False", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_basic) + + attr_timeout = Attribute("Timeout", + "Timeout for the RRAA BASIC loss estimaton block (s)", + type = Types.String, + default = "+50000000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_timeout) + + attr_ewndfor54mbps = Attribute("ewndFor54mbps", + "ewnd parameter for 54 Mbs data mode", + type = Types.Integer, + default = "40", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_ewndfor54mbps) + + attr_ewndfor48mbps = Attribute("ewndFor48mbps", + "ewnd parameter for 48 Mbs data mode", + type = Types.Integer, + default = "40", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_ewndfor48mbps) + + attr_ewndfor36mbps = Attribute("ewndFor36mbps", + "ewnd parameter for 36 Mbs data mode", + type = Types.Integer, + default = "40", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_ewndfor36mbps) + + attr_ewndfor24mbps = Attribute("ewndFor24mbps", + "ewnd parameter for 24 Mbs data mode", + type = Types.Integer, + default = "40", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_ewndfor24mbps) + + attr_ewndfor18mbps = Attribute("ewndFor18mbps", + "ewnd parameter for 18 Mbs data mode", + type = Types.Integer, + default = "20", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_ewndfor18mbps) + + attr_ewndfor12mbps = Attribute("ewndFor12mbps", + "ewnd parameter for 12 Mbs data mode", + type = Types.Integer, + default = "20", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_ewndfor12mbps) + + attr_ewndfor9mbps = Attribute("ewndFor9mbps", + "ewnd parameter for 9 Mbs data mode", + type = Types.Integer, + default = "10", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_ewndfor9mbps) + + attr_ewndfor6mbps = Attribute("ewndFor6mbps", + "ewnd parameter for 6 Mbs data mode", + type = Types.Integer, + default = "6", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_ewndfor6mbps) + + attr_porifor48mbps = Attribute("poriFor48mbps", + "Pori parameter for 48 Mbs data mode", + type = Types.Double, + default = "0.047", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_porifor48mbps) + + attr_porifor36mbps = Attribute("poriFor36mbps", + "Pori parameter for 36 Mbs data mode", + type = Types.Double, + default = "0.115", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_porifor36mbps) + + attr_porifor24mbps = Attribute("poriFor24mbps", + "Pori parameter for 24 Mbs data mode", + type = Types.Double, + default = "0.1681", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_porifor24mbps) + + attr_porifor18mbps = Attribute("poriFor18mbps", + "Pori parameter for 18 Mbs data mode", + type = Types.Double, + default = "0.1325", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_porifor18mbps) + + attr_porifor12mbps = Attribute("poriFor12mbps", + "Pori parameter for 12 Mbs data mode", + type = Types.Double, + default = "0.1861", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_porifor12mbps) + + attr_porifor9mbps = Attribute("poriFor9mbps", + "Pori parameter for 9 Mbs data mode", + type = Types.Double, + default = "0.1434", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_porifor9mbps) + + attr_porifor6mbps = Attribute("poriFor6mbps", + "Pori parameter for 6 Mbs data mode", + type = Types.Double, + default = "0.5", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_porifor6mbps) + + attr_pmtlfor54mbps = Attribute("pmtlFor54mbps", + "Pmtl parameter for 54 Mbs data mode", + type = Types.Double, + default = "0.094", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_pmtlfor54mbps) + + attr_pmtlfor48mbps = Attribute("pmtlFor48mbps", + "Pmtl parameter for 48 Mbs data mode", + type = Types.Double, + default = "0.23", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_pmtlfor48mbps) + + attr_pmtlfor36mbps = Attribute("pmtlFor36mbps", + "Pmtl parameter for 36 Mbs data mode", + type = Types.Double, + default = "0.3363", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_pmtlfor36mbps) + + attr_pmtlfor24mbps = Attribute("pmtlFor24mbps", + "Pmtl parameter for 24 Mbs data mode", + type = Types.Double, + default = "0.265", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_pmtlfor24mbps) + + attr_pmtlfor18mbps = Attribute("pmtlFor18mbps", + "Pmtl parameter for 18 Mbs data mode", + type = Types.Double, + default = "0.3722", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_pmtlfor18mbps) + + attr_pmtlfor12mbps = Attribute("pmtlFor12mbps", + "Pmtl parameter for 12 Mbs data mode", + type = Types.Double, + default = "0.2868", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_pmtlfor12mbps) + + attr_pmtlfor9mbps = Attribute("pmtlFor9mbps", + "Pmtl parameter for 9 Mbs data mode", + type = Types.Double, + default = "0.3932", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_pmtlfor9mbps) + + attr_islowlatency = Attribute("IsLowLatency", + "If true, we attempt to modelize a so-called low-latency device: a device where decisions about tx parameters can be made on a per-packet basis and feedback about the transmission of each packet is obtained before sending the next. Otherwise, we modelize a high-latency device, that is a device where we cannot update our decision about tx parameters after every packet transmission.", + type = Types.Bool, + default = "True", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_islowlatency) + + attr_maxssrc = Attribute("MaxSsrc", + "The maximum number of retransmission attempts for an RTS. This value will not have any effect on some rate control algorithms.", + type = Types.Integer, + default = "7", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxssrc) + + attr_maxslrc = Attribute("MaxSlrc", + "The maximum number of retransmission attempts for a DATA packet. This value will not have any effect on some rate control algorithms.", + type = Types.Integer, + default = "7", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxslrc) + + attr_rtsctsthreshold = Attribute("RtsCtsThreshold", + "If the size of the data packet + LLC header + MAC header + FCS trailer is bigger than this value, we use an RTS/CTS handshake before sending the data, as per IEEE Std. 802.11-2012, Section 9.3.5. This value will not have any effect on some rate control algorithms.", + type = Types.Integer, + default = "2346", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_rtsctsthreshold) + + attr_fragmentationthreshold = Attribute("FragmentationThreshold", + "If the size of the data packet + LLC header + MAC header + FCS trailer is biggerthan this value, we fragment it such that the size of the fragments are equal or smaller than this value, as per IEEE Std. 802.11-2012, Section 9.5. This value will not have any effect on some rate control algorithms.", + type = Types.Integer, + default = "2346", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_fragmentationthreshold) + + attr_nonunicastmode = Attribute("NonUnicastMode", + "Wifi mode used for non-unicast transmissions.", + type = Types.String, + default = "Invalid-WifiMode", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_nonunicastmode) + + attr_defaulttxpowerlevel = Attribute("DefaultTxPowerLevel", + "Default power level to be used for transmissions. This is the power level that is used by all those WifiManagers that do notimplement TX power control.", + type = Types.Integer, + default = "0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_defaulttxpowerlevel) + + + + @classmethod + def _register_traces(cls): + + mactxrtsfailed = Trace("MacTxRtsFailed", "The transmission of a RTS by the MAC layer has failed") + + cls._register_trace(mactxrtsfailed) + + mactxdatafailed = Trace("MacTxDataFailed", "The transmission of a data packet by the MAC layer has failed") + + cls._register_trace(mactxdatafailed) + + mactxfinalrtsfailed = Trace("MacTxFinalRtsFailed", "The transmission of a RTS has exceeded the maximum number of attempts") + + cls._register_trace(mactxfinalrtsfailed) + + mactxfinaldatafailed = Trace("MacTxFinalDataFailed", "The transmission of a data packet has exceeded the maximum number of attempts") + + cls._register_trace(mactxfinaldatafailed) + + + + def __init__(self, ec, guid): + super(NS3RraaWifiManager, self).__init__(ec, guid) + self._home = "ns3-rraa-wifi-manager-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/simple_channel.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/simple_channel.html new file mode 100644 index 00000000..afa2fd81 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/simple_channel.html @@ -0,0 +1,141 @@ + + + + + + + + nepi.resources.ns3.classes.simple_channel — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.simple_channel

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3channel import NS3BaseChannel 
+
+@clsinit_copy
+
[docs]class NS3SimpleChannel(NS3BaseChannel): + _rtype = "ns3::SimpleChannel" + + @classmethod + def _register_attributes(cls): + + attr_id = Attribute("Id", + "The id (unique integer) of this Channel.", + type = Types.Integer, + default = "0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.NoWrite) + + cls._register_attribute(attr_id) + + + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3SimpleChannel, self).__init__(ec, guid) + self._home = "ns3-simple-channel-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/simple_net_device.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/simple_net_device.html new file mode 100644 index 00000000..da4586bb --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/simple_net_device.html @@ -0,0 +1,135 @@ + + + + + + + + nepi.resources.ns3.classes.simple_net_device — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.simple_net_device

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3netdevice import NS3BaseNetDevice 
+
+@clsinit_copy
+
[docs]class NS3SimpleNetDevice(NS3BaseNetDevice): + _rtype = "ns3::SimpleNetDevice" + + @classmethod + def _register_attributes(cls): + pass + + @classmethod + def _register_traces(cls): + + phyrxdrop = Trace("PhyRxDrop", "Trace source indicating a packet has been dropped by the device during reception") + + cls._register_trace(phyrxdrop) + + + + def __init__(self, ec, guid): + super(NS3SimpleNetDevice, self).__init__(ec, guid) + self._home = "ns3-simple-net-device-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/single_model_spectrum_channel.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/single_model_spectrum_channel.html new file mode 100644 index 00000000..7570e780 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/single_model_spectrum_channel.html @@ -0,0 +1,156 @@ + + + + + + + + nepi.resources.ns3.classes.single_model_spectrum_channel — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.single_model_spectrum_channel

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3channel import NS3BaseChannel 
+
+@clsinit_copy
+
[docs]class NS3SingleModelSpectrumChannel(NS3BaseChannel): + _rtype = "ns3::SingleModelSpectrumChannel" + + @classmethod + def _register_attributes(cls): + + attr_maxlossdb = Attribute("MaxLossDb", + "If a single-frequency PropagationLossModel is used, this value represents the maximum loss in dB for which transmissions will be passed to the receiving PHY. Signals for which the PropagationLossModel returns a loss bigger than this value will not be propagated to the receiver. This parameter is to be used to reduce the computational load by not propagating signals that are far beyond the interference range. Note that the default value corresponds to considering all signals for reception. Tune this value with care. ", + type = Types.Double, + default = "1e+09", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxlossdb) + + attr_id = Attribute("Id", + "The id (unique integer) of this Channel.", + type = Types.Integer, + default = "0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.NoWrite) + + cls._register_attribute(attr_id) + + + + @classmethod + def _register_traces(cls): + + pathloss = Trace("PathLoss", "This trace is fired whenever a new path loss value is calculated. The first and second parameters to the trace are pointers respectively to the TX and RX SpectrumPhy instances, whereas the third parameters is the loss value in dB. Note that the loss value reported by this trace is the single-frequency loss value obtained by evaluating only the TX and RX AntennaModels and the PropagationLossModel. In particular, note that SpectrumPropagationLossModel (even if present) is never used to evaluate the loss value reported in this trace. ") + + cls._register_trace(pathloss) + + + + def __init__(self, ec, guid): + super(NS3SingleModelSpectrumChannel, self).__init__(ec, guid) + self._home = "ns3-single-model-spectrum-channel-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/six_low_pan_net_device.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/six_low_pan_net_device.html new file mode 100644 index 00000000..d4be2bb4 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/six_low_pan_net_device.html @@ -0,0 +1,214 @@ + + + + + + + + nepi.resources.ns3.classes.six_low_pan_net_device — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.six_low_pan_net_device

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3netdevice import NS3BaseNetDevice 
+
+@clsinit_copy
+
[docs]class NS3SixLowPanNetDevice(NS3BaseNetDevice): + _rtype = "ns3::SixLowPanNetDevice" + + @classmethod + def _register_attributes(cls): + + attr_rfc6282 = Attribute("Rfc6282", + "Use RFC6282 (IPHC) if true, RFC4944 (HC1) otherwise.", + type = Types.Bool, + default = "True", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_rfc6282) + + attr_omitudpchecksum = Attribute("OmitUdpChecksum", + "Omit the UDP checksum in IPHC compression.", + type = Types.Bool, + default = "True", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_omitudpchecksum) + + attr_fragmentreassemblylistsize = Attribute("FragmentReassemblyListSize", + "The maximum size of the reassembly buffer (in packets). Zero meaning infinite.", + type = Types.Integer, + default = "0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_fragmentreassemblylistsize) + + attr_fragmentexpirationtimeout = Attribute("FragmentExpirationTimeout", + "When this timeout expires, the fragments will be cleared from the buffer.", + type = Types.String, + default = "+60000000000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_fragmentexpirationtimeout) + + attr_compressionthreshold = Attribute("CompressionThreshold", + "The minimum MAC layer payload size.", + type = Types.Integer, + default = "0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_compressionthreshold) + + attr_forceethertype = Attribute("ForceEtherType", + "Force a specific EtherType in L2 frames.", + type = Types.Bool, + default = "False", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_forceethertype) + + attr_ethertype = Attribute("EtherType", + "The specific EtherType to be used in L2 frames.", + type = Types.Integer, + default = "65535", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_ethertype) + + + + @classmethod + def _register_traces(cls): + + tx = Trace("Tx", "Send - packet (including 6LoWPAN header), SixLoWPanNetDevice Ptr, interface index.") + + cls._register_trace(tx) + + rx = Trace("Rx", "Receive - packet (including 6LoWPAN header), SixLoWPanNetDevice Ptr, interface index.") + + cls._register_trace(rx) + + drop = Trace("Drop", "Drop - DropReason, packet (including 6LoWPAN header), SixLoWPanNetDevice Ptr, interface index.") + + cls._register_trace(drop) + + + + def __init__(self, ec, guid): + super(NS3SixLowPanNetDevice, self).__init__(ec, guid) + self._home = "ns3-six-low-pan-net-device-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/sta_wifi_mac.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/sta_wifi_mac.html new file mode 100644 index 00000000..d695e43f --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/sta_wifi_mac.html @@ -0,0 +1,348 @@ + + + + + + + + nepi.resources.ns3.classes.sta_wifi_mac — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.sta_wifi_mac

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3wifimac import NS3BaseWifiMac 
+
+@clsinit_copy
+
[docs]class NS3StaWifiMac(NS3BaseWifiMac): + _rtype = "ns3::StaWifiMac" + + @classmethod + def _register_attributes(cls): + + attr_proberequesttimeout = Attribute("ProbeRequestTimeout", + "The interval between two consecutive probe request attempts.", + type = Types.String, + default = "+50000000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_proberequesttimeout) + + attr_assocrequesttimeout = Attribute("AssocRequestTimeout", + "The interval between two consecutive assoc request attempts.", + type = Types.String, + default = "+500000000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_assocrequesttimeout) + + attr_maxmissedbeacons = Attribute("MaxMissedBeacons", + "Number of beacons which much be consecutively missed before we attempt to restart association.", + type = Types.Integer, + default = "10", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxmissedbeacons) + + attr_activeprobing = Attribute("ActiveProbing", + "If true, we send probe requests. If false, we don\'t. NOTE: if more than one STA in your simulation is using active probing, you should enable it at a different simulation time for each STA, otherwise all the STAs will start sending probes at the same time resulting in collisions. See bug 1060 for more info.", + type = Types.Bool, + default = "False", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_activeprobing) + + attr_qossupported = Attribute("QosSupported", + "This Boolean attribute is set to enable 802.11e/WMM-style QoS support at this STA", + type = Types.Bool, + default = "False", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_qossupported) + + attr_htsupported = Attribute("HtSupported", + "This Boolean attribute is set to enable 802.11n support at this STA", + type = Types.Bool, + default = "False", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_htsupported) + + attr_ctstoselfsupported = Attribute("CtsToSelfSupported", + "Use CTS to Self when using a rate that is not in the basic set rate", + type = Types.Bool, + default = "False", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_ctstoselfsupported) + + attr_ctstimeout = Attribute("CtsTimeout", + "When this timeout expires, the RTS/CTS handshake has failed.", + type = Types.String, + default = "+75000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_ctstimeout) + + attr_acktimeout = Attribute("AckTimeout", + "When this timeout expires, the DATA/ACK handshake has failed.", + type = Types.String, + default = "+75000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_acktimeout) + + attr_basicblockacktimeout = Attribute("BasicBlockAckTimeout", + "When this timeout expires, the BASIC_BLOCK_ACK_REQ/BASIC_BLOCK_ACK handshake has failed.", + type = Types.String, + default = "+281000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_basicblockacktimeout) + + attr_compressedblockacktimeout = Attribute("CompressedBlockAckTimeout", + "When this timeout expires, the COMPRESSED_BLOCK_ACK_REQ/COMPRESSED_BLOCK_ACK handshake has failed.", + type = Types.String, + default = "+107000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_compressedblockacktimeout) + + attr_sifs = Attribute("Sifs", + "The value of the SIFS constant.", + type = Types.String, + default = "+16000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_sifs) + + attr_eifsnodifs = Attribute("EifsNoDifs", + "The value of EIFS-DIFS", + type = Types.String, + default = "+60000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_eifsnodifs) + + attr_slot = Attribute("Slot", + "The duration of a Slot.", + type = Types.String, + default = "+9000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_slot) + + attr_pifs = Attribute("Pifs", + "The value of the PIFS constant.", + type = Types.String, + default = "+25000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_pifs) + + attr_rifs = Attribute("Rifs", + "The value of the RIFS constant.", + type = Types.String, + default = "+2000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_rifs) + + attr_maxpropagationdelay = Attribute("MaxPropagationDelay", + "The maximum propagation delay. Unused for now.", + type = Types.String, + default = "+3333.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxpropagationdelay) + + attr_ssid = Attribute("Ssid", + "The ssid we want to belong to.", + type = Types.String, + default = "default", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_ssid) + + + + @classmethod + def _register_traces(cls): + + assoc = Trace("Assoc", "Associated with an access point.") + + cls._register_trace(assoc) + + deassoc = Trace("DeAssoc", "Association with an access point lost.") + + cls._register_trace(deassoc) + + txokheader = Trace("TxOkHeader", "The header of successfully transmitted packet") + + cls._register_trace(txokheader) + + txerrheader = Trace("TxErrHeader", "The header of unsuccessfully transmitted packet") + + cls._register_trace(txerrheader) + + mactx = Trace("MacTx", "A packet has been received from higher layers and is being processed in preparation for queueing for transmission.") + + cls._register_trace(mactx) + + mactxdrop = Trace("MacTxDrop", "A packet has been dropped in the MAC layer before being queued for transmission.") + + cls._register_trace(mactxdrop) + + macpromiscrx = Trace("MacPromiscRx", "A packet has been received by this device, has been passed up from the physical layer and is being forwarded up the local protocol stack. This is a promiscuous trace,") + + cls._register_trace(macpromiscrx) + + macrx = Trace("MacRx", "A packet has been received by this device, has been passed up from the physical layer and is being forwarded up the local protocol stack. This is a non-promiscuous trace,") + + cls._register_trace(macrx) + + macrxdrop = Trace("MacRxDrop", "A packet has been dropped in the MAC layer after it has been passed up from the physical layer.") + + cls._register_trace(macrxdrop) + + + + def __init__(self, ec, guid): + super(NS3StaWifiMac, self).__init__(ec, guid) + self._home = "ns3-sta-wifi-mac-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/steady_state_random_waypoint_mobility_model.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/steady_state_random_waypoint_mobility_model.html new file mode 100644 index 00000000..03aaaedc --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/steady_state_random_waypoint_mobility_model.html @@ -0,0 +1,246 @@ + + + + + + + + nepi.resources.ns3.classes.steady_state_random_waypoint_mobility_model — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.steady_state_random_waypoint_mobility_model

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3mobilitymodel import NS3BaseMobilityModel 
+
+@clsinit_copy
+
[docs]class NS3SteadyStateRandomWaypointMobilityModel(NS3BaseMobilityModel): + _rtype = "ns3::SteadyStateRandomWaypointMobilityModel" + + @classmethod + def _register_attributes(cls): + + attr_minspeed = Attribute("MinSpeed", + "Minimum speed value, [m/s]", + type = Types.Double, + default = "0.3", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_minspeed) + + attr_maxspeed = Attribute("MaxSpeed", + "Maximum speed value, [m/s]", + type = Types.Double, + default = "0.7", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxspeed) + + attr_minpause = Attribute("MinPause", + "Minimum pause value, [s]", + type = Types.Double, + default = "0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_minpause) + + attr_maxpause = Attribute("MaxPause", + "Maximum pause value, [s]", + type = Types.Double, + default = "0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxpause) + + attr_minx = Attribute("MinX", + "Minimum X value of traveling region, [m]", + type = Types.Double, + default = "1", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_minx) + + attr_maxx = Attribute("MaxX", + "Maximum X value of traveling region, [m]", + type = Types.Double, + default = "1", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxx) + + attr_miny = Attribute("MinY", + "Minimum Y value of traveling region, [m]", + type = Types.Double, + default = "1", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_miny) + + attr_maxy = Attribute("MaxY", + "Maximum Y value of traveling region, [m]", + type = Types.Double, + default = "1", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxy) + + attr_z = Attribute("Z", + "Z value of traveling region (fixed), [m]", + type = Types.Double, + default = "0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_z) + + attr_position = Attribute("Position", + "The current position of the mobility model.", + type = Types.String, + default = "0:0:0", + allowed = None, + range = None, + flags = Flags.Reserved) + + cls._register_attribute(attr_position) + + attr_velocity = Attribute("Velocity", + "The current velocity of the mobility model.", + type = Types.String, + default = "0:0:0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.NoWrite) + + cls._register_attribute(attr_velocity) + + + + @classmethod + def _register_traces(cls): + + coursechange = Trace("CourseChange", "The value of the position and/or velocity vector changed") + + cls._register_trace(coursechange) + + + + def __init__(self, ec, guid): + super(NS3SteadyStateRandomWaypointMobilityModel, self).__init__(ec, guid) + self._home = "ns3-steady-state-random-waypoint-mobility-model-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/subscriber_station_net_device.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/subscriber_station_net_device.html new file mode 100644 index 00000000..45bace14 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/subscriber_station_net_device.html @@ -0,0 +1,306 @@ + + + + + + + + nepi.resources.ns3.classes.subscriber_station_net_device — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.subscriber_station_net_device

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3netdevice import NS3BaseNetDevice 
+
+@clsinit_copy
+
[docs]class NS3SubscriberStationNetDevice(NS3BaseNetDevice): + _rtype = "ns3::SubscriberStationNetDevice" + + @classmethod + def _register_attributes(cls): + + attr_lostdlmapinterval = Attribute("LostDlMapInterval", + "Time since last received DL-MAP message before downlink synchronization is considered lost. Maximum is 600ms", + type = Types.String, + default = "+500000000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_lostdlmapinterval) + + attr_lostulmapinterval = Attribute("LostUlMapInterval", + "Time since last received UL-MAP before uplink synchronization is considered lost, maximum is 600.", + type = Types.String, + default = "+500000000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_lostulmapinterval) + + attr_maxdcdinterval = Attribute("MaxDcdInterval", + "Maximum time between transmission of DCD messages. Maximum is 10s", + type = Types.String, + default = "+10000000000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxdcdinterval) + + attr_maxucdinterval = Attribute("MaxUcdInterval", + "Maximum time between transmission of UCD messages. Maximum is 10s", + type = Types.String, + default = "+10000000000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxucdinterval) + + attr_intervalt1 = Attribute("IntervalT1", + "Wait for DCD timeout. Maximum is 5*maxDcdInterval", + type = Types.String, + default = "+50000000000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_intervalt1) + + attr_intervalt2 = Attribute("IntervalT2", + "Wait for broadcast ranging timeout, i.e., wait for initial ranging opportunity. Maximum is 5*Ranging interval", + type = Types.String, + default = "+10000000000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_intervalt2) + + attr_intervalt3 = Attribute("IntervalT3", + "ranging Response reception timeout following the transmission of a ranging request. Maximum is 200ms", + type = Types.String, + default = "+200000000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_intervalt3) + + attr_intervalt7 = Attribute("IntervalT7", + "wait for DSA/DSC/DSD Response timeout. Maximum is 1s", + type = Types.String, + default = "+100000000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_intervalt7) + + attr_intervalt12 = Attribute("IntervalT12", + "Wait for UCD descriptor.Maximum is 5*MaxUcdInterval", + type = Types.String, + default = "+10000000000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_intervalt12) + + attr_intervalt20 = Attribute("IntervalT20", + "Time the SS searches for preambles on a given channel. Minimum is 2 MAC frames", + type = Types.String, + default = "+500000000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_intervalt20) + + attr_intervalt21 = Attribute("IntervalT21", + "time the SS searches for (decodable) DL-MAP on a given channel", + type = Types.String, + default = "+10000000000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_intervalt21) + + attr_maxcontentionrangingretries = Attribute("MaxContentionRangingRetries", + "Number of retries on contention Ranging Requests", + type = Types.Integer, + default = "16", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxcontentionrangingretries) + + attr_mtu = Attribute("Mtu", + "The MAC-level Maximum Transmission Unit", + type = Types.Integer, + default = "1400", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_mtu) + + attr_rtg = Attribute("RTG", + "receive/transmit transition gap.", + type = Types.Integer, + default = "0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_rtg) + + attr_ttg = Attribute("TTG", + "transmit/receive transition gap.", + type = Types.Integer, + default = "0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_ttg) + + + + @classmethod + def _register_traces(cls): + + sstxdrop = Trace("SSTxDrop", "A packet has been dropped in the MAC layer before being queued for transmission.") + + cls._register_trace(sstxdrop) + + sspromiscrx = Trace("SSPromiscRx", "A packet has been received by this device, has been passed up from the physical layer and is being forwarded up the local protocol stack. This is a promiscuous trace,") + + cls._register_trace(sspromiscrx) + + ssrx = Trace("SSRx", "A packet has been received by this device, has been passed up from the physical layer and is being forwarded up the local protocol stack. This is a non-promiscuous trace,") + + cls._register_trace(ssrx) + + ssrxdrop = Trace("SSRxDrop", "A packet has been dropped in the MAC layer after it has been passed up from the physical layer.") + + cls._register_trace(ssrxdrop) + + rx = Trace("Rx", "Receive trace") + + cls._register_trace(rx) + + tx = Trace("Tx", "Transmit trace") + + cls._register_trace(tx) + + + + def __init__(self, ec, guid): + super(NS3SubscriberStationNetDevice, self).__init__(ec, guid) + self._home = "ns3-subscriber-station-net-device-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/tap_bridge.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/tap_bridge.html new file mode 100644 index 00000000..0f26c6be --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/tap_bridge.html @@ -0,0 +1,211 @@ + + + + + + + + nepi.resources.ns3.classes.tap_bridge — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.tap_bridge

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3netdevice import NS3BaseNetDevice 
+
+@clsinit_copy
+
[docs]class NS3TapBridge(NS3BaseNetDevice): + _rtype = "ns3::TapBridge" + + @classmethod + def _register_attributes(cls): + + attr_mtu = Attribute("Mtu", + "The MAC-level Maximum Transmission Unit", + type = Types.Integer, + default = "0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_mtu) + + attr_devicename = Attribute("DeviceName", + "The name of the tap device to create.", + type = Types.String, + default = "", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_devicename) + + attr_gateway = Attribute("Gateway", + "The IP address of the default gateway to assign to the host machine, when in ConfigureLocal mode.", + type = Types.String, + default = "255.255.255.255", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_gateway) + + attr_ipaddress = Attribute("IpAddress", + "The IP address to assign to the tap device, when in ConfigureLocal mode. This address will override the discovered IP address of the simulated device.", + type = Types.String, + default = "255.255.255.255", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_ipaddress) + + attr_macaddress = Attribute("MacAddress", + "The MAC address to assign to the tap device, when in ConfigureLocal mode. This address will override the discovered MAC address of the simulated device.", + type = Types.String, + default = "ff:ff:ff:ff:ff:ff", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_macaddress) + + attr_netmask = Attribute("Netmask", + "The network mask to assign to the tap device, when in ConfigureLocal mode. This address will override the discovered MAC address of the simulated device.", + type = Types.String, + default = "255.255.255.255", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_netmask) + + attr_start = Attribute("Start", + "The simulation time at which to spin up the tap device read thread.", + type = Types.String, + default = "+0.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_start) + + attr_stop = Attribute("Stop", + "The simulation time at which to tear down the tap device read thread.", + type = Types.String, + default = "+0.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_stop) + + + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3TapBridge, self).__init__(ec, guid) + self._home = "ns3-tap-bridge-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/tcp_l4protocol.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/tcp_l4protocol.html new file mode 100644 index 00000000..27e51dbd --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/tcp_l4protocol.html @@ -0,0 +1,161 @@ + + + + + + + + nepi.resources.ns3.classes.tcp_l4protocol — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.tcp_l4protocol

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3base import NS3Base
+
+@clsinit_copy
+
[docs]class NS3TcpL4Protocol(NS3Base): + _rtype = "ns3::TcpL4Protocol" + + @classmethod + def _register_attributes(cls): + + attr_rttestimatortype = Attribute("RttEstimatorType", + "Type of RttEstimator objects.", + type = Types.String, + default = "ns3::RttMeanDeviation", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_rttestimatortype) + + attr_sockettype = Attribute("SocketType", + "Socket type of TCP objects.", + type = Types.String, + default = "ns3::TcpNewReno", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_sockettype) + + attr_protocolnumber = Attribute("ProtocolNumber", + "The Ip protocol number.", + type = Types.Integer, + default = "0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_protocolnumber) + + + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3TcpL4Protocol, self).__init__(ec, guid) + self._home = "ns3-tcp-l4protocol-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/three_log_distance_propagation_loss_model.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/three_log_distance_propagation_loss_model.html new file mode 100644 index 00000000..458f0bbe --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/three_log_distance_propagation_loss_model.html @@ -0,0 +1,201 @@ + + + + + + + + nepi.resources.ns3.classes.three_log_distance_propagation_loss_model — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.three_log_distance_propagation_loss_model

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3propagationlossmodel import NS3BasePropagationLossModel 
+
+@clsinit_copy
+
[docs]class NS3ThreeLogDistancePropagationLossModel(NS3BasePropagationLossModel): + _rtype = "ns3::ThreeLogDistancePropagationLossModel" + + @classmethod + def _register_attributes(cls): + + attr_distance0 = Attribute("Distance0", + "Beginning of the first (near) distance field", + type = Types.Double, + default = "1", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_distance0) + + attr_distance1 = Attribute("Distance1", + "Beginning of the second (middle) distance field.", + type = Types.Double, + default = "200", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_distance1) + + attr_distance2 = Attribute("Distance2", + "Beginning of the third (far) distance field.", + type = Types.Double, + default = "500", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_distance2) + + attr_exponent0 = Attribute("Exponent0", + "The exponent for the first field.", + type = Types.Double, + default = "1.9", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_exponent0) + + attr_exponent1 = Attribute("Exponent1", + "The exponent for the second field.", + type = Types.Double, + default = "3.8", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_exponent1) + + attr_exponent2 = Attribute("Exponent2", + "The exponent for the third field.", + type = Types.Double, + default = "3.8", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_exponent2) + + attr_referenceloss = Attribute("ReferenceLoss", + "The reference loss at distance d0 (dB). (Default is Friis at 1m with 5.15 GHz)", + type = Types.Double, + default = "46.6777", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_referenceloss) + + + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3ThreeLogDistancePropagationLossModel, self).__init__(ec, guid) + self._home = "ns3-three-log-distance-propagation-loss-model-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/two_ray_ground_propagation_loss_model.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/two_ray_ground_propagation_loss_model.html new file mode 100644 index 00000000..3a34d749 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/two_ray_ground_propagation_loss_model.html @@ -0,0 +1,171 @@ + + + + + + + + nepi.resources.ns3.classes.two_ray_ground_propagation_loss_model — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.two_ray_ground_propagation_loss_model

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3propagationlossmodel import NS3BasePropagationLossModel 
+
+@clsinit_copy
+
[docs]class NS3TwoRayGroundPropagationLossModel(NS3BasePropagationLossModel): + _rtype = "ns3::TwoRayGroundPropagationLossModel" + + @classmethod + def _register_attributes(cls): + + attr_frequency = Attribute("Frequency", + "The carrier frequency (in Hz) at which propagation occurs (default is 5.15 GHz).", + type = Types.Double, + default = "5.15e+09", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_frequency) + + attr_systemloss = Attribute("SystemLoss", + "The system loss", + type = Types.Double, + default = "1", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_systemloss) + + attr_mindistance = Attribute("MinDistance", + "The distance under which the propagation model refuses to give results (m)", + type = Types.Double, + default = "0.5", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_mindistance) + + attr_heightabovez = Attribute("HeightAboveZ", + "The height of the antenna (m) above the node\'s Z coordinate", + type = Types.Double, + default = "0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_heightabovez) + + + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3TwoRayGroundPropagationLossModel, self).__init__(ec, guid) + self._home = "ns3-two-ray-ground-propagation-loss-model-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/uan_channel.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/uan_channel.html new file mode 100644 index 00000000..4e17dfd4 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/uan_channel.html @@ -0,0 +1,141 @@ + + + + + + + + nepi.resources.ns3.classes.uan_channel — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.uan_channel

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3channel import NS3BaseChannel 
+
+@clsinit_copy
+
[docs]class NS3UanChannel(NS3BaseChannel): + _rtype = "ns3::UanChannel" + + @classmethod + def _register_attributes(cls): + + attr_id = Attribute("Id", + "The id (unique integer) of this Channel.", + type = Types.Integer, + default = "0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.NoWrite) + + cls._register_attribute(attr_id) + + + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3UanChannel, self).__init__(ec, guid) + self._home = "ns3-uan-channel-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/udp_client.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/udp_client.html new file mode 100644 index 00000000..a86a67d3 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/udp_client.html @@ -0,0 +1,201 @@ + + + + + + + + nepi.resources.ns3.classes.udp_client — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.udp_client

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3application import NS3BaseApplication 
+
+@clsinit_copy
+
[docs]class NS3UdpClient(NS3BaseApplication): + _rtype = "ns3::UdpClient" + + @classmethod + def _register_attributes(cls): + + attr_maxpackets = Attribute("MaxPackets", + "The maximum number of packets the application will send", + type = Types.Integer, + default = "100", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxpackets) + + attr_interval = Attribute("Interval", + "The time to wait between packets", + type = Types.String, + default = "+1000000000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_interval) + + attr_remoteaddress = Attribute("RemoteAddress", + "The destination Address of the outbound packets", + type = Types.String, + default = "00-00-00", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_remoteaddress) + + attr_remoteport = Attribute("RemotePort", + "The destination port of the outbound packets", + type = Types.Integer, + default = "100", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_remoteport) + + attr_packetsize = Attribute("PacketSize", + "Size of packets generated. The minimum packet size is 12 bytes which is the size of the header carrying the sequence number and the time stamp.", + type = Types.Integer, + default = "1024", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_packetsize) + + attr_starttime = Attribute("StartTime", + "Time at which the application will start", + type = Types.String, + default = "+0.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_starttime) + + attr_stoptime = Attribute("StopTime", + "Time at which the application will stop", + type = Types.String, + default = "+0.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_stoptime) + + + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3UdpClient, self).__init__(ec, guid) + self._home = "ns3-udp-client-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/udp_echo_client.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/udp_echo_client.html new file mode 100644 index 00000000..245eb6d0 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/udp_echo_client.html @@ -0,0 +1,206 @@ + + + + + + + + nepi.resources.ns3.classes.udp_echo_client — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.udp_echo_client

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3application import NS3BaseApplication 
+
+@clsinit_copy
+
[docs]class NS3UdpEchoClient(NS3BaseApplication): + _rtype = "ns3::UdpEchoClient" + + @classmethod + def _register_attributes(cls): + + attr_maxpackets = Attribute("MaxPackets", + "The maximum number of packets the application will send", + type = Types.Integer, + default = "100", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxpackets) + + attr_interval = Attribute("Interval", + "The time to wait between packets", + type = Types.String, + default = "+1000000000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_interval) + + attr_remoteaddress = Attribute("RemoteAddress", + "The destination Address of the outbound packets", + type = Types.String, + default = "00-00-00", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_remoteaddress) + + attr_remoteport = Attribute("RemotePort", + "The destination port of the outbound packets", + type = Types.Integer, + default = "0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_remoteport) + + attr_packetsize = Attribute("PacketSize", + "Size of echo data in outbound packets", + type = Types.Integer, + default = "100", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_packetsize) + + attr_starttime = Attribute("StartTime", + "Time at which the application will start", + type = Types.String, + default = "+0.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_starttime) + + attr_stoptime = Attribute("StopTime", + "Time at which the application will stop", + type = Types.String, + default = "+0.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_stoptime) + + + + @classmethod + def _register_traces(cls): + + tx = Trace("Tx", "A new packet is created and is sent") + + cls._register_trace(tx) + + + + def __init__(self, ec, guid): + super(NS3UdpEchoClient, self).__init__(ec, guid) + self._home = "ns3-udp-echo-client-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/udp_echo_server.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/udp_echo_server.html new file mode 100644 index 00000000..582ce26d --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/udp_echo_server.html @@ -0,0 +1,161 @@ + + + + + + + + nepi.resources.ns3.classes.udp_echo_server — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.udp_echo_server

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3application import NS3BaseApplication 
+
+@clsinit_copy
+
[docs]class NS3UdpEchoServer(NS3BaseApplication): + _rtype = "ns3::UdpEchoServer" + + @classmethod + def _register_attributes(cls): + + attr_port = Attribute("Port", + "Port on which we listen for incoming packets.", + type = Types.Integer, + default = "9", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_port) + + attr_starttime = Attribute("StartTime", + "Time at which the application will start", + type = Types.String, + default = "+0.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_starttime) + + attr_stoptime = Attribute("StopTime", + "Time at which the application will stop", + type = Types.String, + default = "+0.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_stoptime) + + + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3UdpEchoServer, self).__init__(ec, guid) + self._home = "ns3-udp-echo-server-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/udp_l4protocol.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/udp_l4protocol.html new file mode 100644 index 00000000..9a2086a8 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/udp_l4protocol.html @@ -0,0 +1,141 @@ + + + + + + + + nepi.resources.ns3.classes.udp_l4protocol — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.udp_l4protocol

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3base import NS3Base
+
+@clsinit_copy
+
[docs]class NS3UdpL4Protocol(NS3Base): + _rtype = "ns3::UdpL4Protocol" + + @classmethod + def _register_attributes(cls): + + attr_protocolnumber = Attribute("ProtocolNumber", + "The Ip protocol number.", + type = Types.Integer, + default = "0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_protocolnumber) + + + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3UdpL4Protocol, self).__init__(ec, guid) + self._home = "ns3-udp-l4protocol-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/udp_server.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/udp_server.html new file mode 100644 index 00000000..8688d338 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/udp_server.html @@ -0,0 +1,171 @@ + + + + + + + + nepi.resources.ns3.classes.udp_server — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.udp_server

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3application import NS3BaseApplication 
+
+@clsinit_copy
+
[docs]class NS3UdpServer(NS3BaseApplication): + _rtype = "ns3::UdpServer" + + @classmethod + def _register_attributes(cls): + + attr_port = Attribute("Port", + "Port on which we listen for incoming packets.", + type = Types.Integer, + default = "100", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_port) + + attr_packetwindowsize = Attribute("PacketWindowSize", + "The size of the window used to compute the packet loss. This value should be a multiple of 8.", + type = Types.Integer, + default = "32", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_packetwindowsize) + + attr_starttime = Attribute("StartTime", + "Time at which the application will start", + type = Types.String, + default = "+0.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_starttime) + + attr_stoptime = Attribute("StopTime", + "Time at which the application will stop", + type = Types.String, + default = "+0.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_stoptime) + + + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3UdpServer, self).__init__(ec, guid) + self._home = "ns3-udp-server-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/udp_trace_client.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/udp_trace_client.html new file mode 100644 index 00000000..266ecd7d --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/udp_trace_client.html @@ -0,0 +1,181 @@ + + + + + + + + nepi.resources.ns3.classes.udp_trace_client — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.udp_trace_client

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3application import NS3BaseApplication 
+
+@clsinit_copy
+
[docs]class NS3UdpTraceClient(NS3BaseApplication): + _rtype = "ns3::UdpTraceClient" + + @classmethod + def _register_attributes(cls): + + attr_remoteaddress = Attribute("RemoteAddress", + "The destination Address of the outbound packets", + type = Types.String, + default = "00-00-00", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_remoteaddress) + + attr_remoteport = Attribute("RemotePort", + "The destination port of the outbound packets", + type = Types.Integer, + default = "100", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_remoteport) + + attr_maxpacketsize = Attribute("MaxPacketSize", + "The maximum size of a packet (including the SeqTsHeader, 12 bytes).", + type = Types.Integer, + default = "1024", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_maxpacketsize) + + attr_starttime = Attribute("StartTime", + "Time at which the application will start", + type = Types.String, + default = "+0.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_starttime) + + attr_stoptime = Attribute("StopTime", + "Time at which the application will stop", + type = Types.String, + default = "+0.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_stoptime) + + + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3UdpTraceClient, self).__init__(ec, guid) + self._home = "ns3-udp-trace-client-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/v4ping.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/v4ping.html new file mode 100644 index 00000000..3dd63cd5 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/v4ping.html @@ -0,0 +1,196 @@ + + + + + + + + nepi.resources.ns3.classes.v4ping — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.v4ping

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3application import NS3BaseApplication 
+
+@clsinit_copy
+
[docs]class NS3V4Ping(NS3BaseApplication): + _rtype = "ns3::V4Ping" + + @classmethod + def _register_attributes(cls): + + attr_remote = Attribute("Remote", + "The address of the machine we want to ping.", + type = Types.String, + default = "102.102.102.102", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_remote) + + attr_verbose = Attribute("Verbose", + "Produce usual output.", + type = Types.Bool, + default = "False", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_verbose) + + attr_interval = Attribute("Interval", + "Wait interval seconds between sending each packet.", + type = Types.String, + default = "+1000000000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_interval) + + attr_size = Attribute("Size", + "The number of data bytes to be sent, real packet will be 8 (ICMP) + 20 (IP) bytes longer.", + type = Types.Integer, + default = "56", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_size) + + attr_starttime = Attribute("StartTime", + "Time at which the application will start", + type = Types.String, + default = "+0.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_starttime) + + attr_stoptime = Attribute("StopTime", + "Time at which the application will stop", + type = Types.String, + default = "+0.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_stoptime) + + + + @classmethod + def _register_traces(cls): + + rtt = Trace("Rtt", "The rtt calculated by the ping.") + + cls._register_trace(rtt) + + + + def __init__(self, ec, guid): + super(NS3V4Ping, self).__init__(ec, guid) + self._home = "ns3-v4ping-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/virtual_net_device.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/virtual_net_device.html new file mode 100644 index 00000000..82adaa9a --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/virtual_net_device.html @@ -0,0 +1,162 @@ + + + + + + + + nepi.resources.ns3.classes.virtual_net_device — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.virtual_net_device

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3netdevice import NS3BaseNetDevice 
+
+@clsinit_copy
+
[docs]class NS3VirtualNetDevice(NS3BaseNetDevice): + _rtype = "ns3::VirtualNetDevice" + + @classmethod + def _register_attributes(cls): + + attr_mtu = Attribute("Mtu", + "The MAC-level Maximum Transmission Unit", + type = Types.Integer, + default = "1500", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_mtu) + + + + @classmethod + def _register_traces(cls): + + mactx = Trace("MacTx", "Trace source indicating a packet has arrived for transmission by this device") + + cls._register_trace(mactx) + + macpromiscrx = Trace("MacPromiscRx", "A packet has been received by this device, has been passed up from the physical layer and is being forwarded up the local protocol stack. This is a promiscuous trace,") + + cls._register_trace(macpromiscrx) + + macrx = Trace("MacRx", "A packet has been received by this device, has been passed up from the physical layer and is being forwarded up the local protocol stack. This is a non-promiscuous trace,") + + cls._register_trace(macrx) + + sniffer = Trace("Sniffer", "Trace source simulating a non-promiscuous packet sniffer attached to the device") + + cls._register_trace(sniffer) + + promiscsniffer = Trace("PromiscSniffer", "Trace source simulating a promiscuous packet sniffer attached to the device") + + cls._register_trace(promiscsniffer) + + + + def __init__(self, ec, guid): + super(NS3VirtualNetDevice, self).__init__(ec, guid) + self._home = "ns3-virtual-net-device-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/waypoint_mobility_model.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/waypoint_mobility_model.html new file mode 100644 index 00000000..54460890 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/waypoint_mobility_model.html @@ -0,0 +1,186 @@ + + + + + + + + nepi.resources.ns3.classes.waypoint_mobility_model — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.waypoint_mobility_model

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3mobilitymodel import NS3BaseMobilityModel 
+
+@clsinit_copy
+
[docs]class NS3WaypointMobilityModel(NS3BaseMobilityModel): + _rtype = "ns3::WaypointMobilityModel" + + @classmethod + def _register_attributes(cls): + + attr_waypointsleft = Attribute("WaypointsLeft", + "The number of waypoints remaining.", + type = Types.Integer, + default = "0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.NoWrite) + + cls._register_attribute(attr_waypointsleft) + + attr_lazynotify = Attribute("LazyNotify", + "Only call NotifyCourseChange when position is calculated.", + type = Types.Bool, + default = "False", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_lazynotify) + + attr_initialpositioniswaypoint = Attribute("InitialPositionIsWaypoint", + "Calling SetPosition with no waypoints creates a waypoint.", + type = Types.Bool, + default = "False", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_initialpositioniswaypoint) + + attr_position = Attribute("Position", + "The current position of the mobility model.", + type = Types.String, + default = "0:0:0", + allowed = None, + range = None, + flags = Flags.Reserved) + + cls._register_attribute(attr_position) + + attr_velocity = Attribute("Velocity", + "The current velocity of the mobility model.", + type = Types.String, + default = "0:0:0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.NoWrite) + + cls._register_attribute(attr_velocity) + + + + @classmethod + def _register_traces(cls): + + coursechange = Trace("CourseChange", "The value of the position and/or velocity vector changed") + + cls._register_trace(coursechange) + + + + def __init__(self, ec, guid): + super(NS3WaypointMobilityModel, self).__init__(ec, guid) + self._home = "ns3-waypoint-mobility-model-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/wifi_net_device.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/wifi_net_device.html new file mode 100644 index 00000000..86375c83 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/wifi_net_device.html @@ -0,0 +1,141 @@ + + + + + + + + nepi.resources.ns3.classes.wifi_net_device — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.wifi_net_device

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3wifinetdevice import NS3BaseWifiNetDevice 
+
+@clsinit_copy
+
[docs]class NS3WifiNetDevice(NS3BaseWifiNetDevice): + _rtype = "ns3::WifiNetDevice" + + @classmethod + def _register_attributes(cls): + + attr_mtu = Attribute("Mtu", + "The MAC-level Maximum Transmission Unit", + type = Types.Integer, + default = "2296", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_mtu) + + + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3WifiNetDevice, self).__init__(ec, guid) + self._home = "ns3-wifi-net-device-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/yans_error_rate_model.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/yans_error_rate_model.html new file mode 100644 index 00000000..f4c77474 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/yans_error_rate_model.html @@ -0,0 +1,130 @@ + + + + + + + + nepi.resources.ns3.classes.yans_error_rate_model — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.yans_error_rate_model

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3errorratemodel import NS3BaseErrorRateModel 
+
+@clsinit_copy
+
[docs]class NS3YansErrorRateModel(NS3BaseErrorRateModel): + _rtype = "ns3::YansErrorRateModel" + + @classmethod + def _register_attributes(cls): + pass + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3YansErrorRateModel, self).__init__(ec, guid) + self._home = "ns3-yans-error-rate-model-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/yans_wifi_channel.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/yans_wifi_channel.html new file mode 100644 index 00000000..658f1b87 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/yans_wifi_channel.html @@ -0,0 +1,141 @@ + + + + + + + + nepi.resources.ns3.classes.yans_wifi_channel — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.yans_wifi_channel

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3wifichannel import NS3BaseWifiChannel 
+
+@clsinit_copy
+
[docs]class NS3YansWifiChannel(NS3BaseWifiChannel): + _rtype = "ns3::YansWifiChannel" + + @classmethod + def _register_attributes(cls): + + attr_id = Attribute("Id", + "The id (unique integer) of this Channel.", + type = Types.Integer, + default = "0", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.NoWrite) + + cls._register_attribute(attr_id) + + + + @classmethod + def _register_traces(cls): + pass + + def __init__(self, ec, guid): + super(NS3YansWifiChannel, self).__init__(ec, guid) + self._home = "ns3-yans-wifi-channel-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/yans_wifi_phy.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/yans_wifi_phy.html new file mode 100644 index 00000000..6cb03971 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/classes/yans_wifi_phy.html @@ -0,0 +1,344 @@ + + + + + + + + nepi.resources.ns3.classes.yans_wifi_phy — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.classes.yans_wifi_phy

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.ns3.ns3wifiphy import NS3BaseWifiPhy 
+
+@clsinit_copy
+
[docs]class NS3YansWifiPhy(NS3BaseWifiPhy): + _rtype = "ns3::YansWifiPhy" + + @classmethod + def _register_attributes(cls): + + attr_energydetectionthreshold = Attribute("EnergyDetectionThreshold", + "The energy of a received signal should be higher than this threshold (dbm) to allow the PHY layer to detect the signal.", + type = Types.Double, + default = "-96", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_energydetectionthreshold) + + attr_ccamode1threshold = Attribute("CcaMode1Threshold", + "The energy of a received signal should be higher than this threshold (dbm) to allow the PHY layer to declare CCA BUSY state", + type = Types.Double, + default = "-99", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_ccamode1threshold) + + attr_txgain = Attribute("TxGain", + "Transmission gain (dB).", + type = Types.Double, + default = "1", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_txgain) + + attr_rxgain = Attribute("RxGain", + "Reception gain (dB).", + type = Types.Double, + default = "1", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_rxgain) + + attr_txpowerlevels = Attribute("TxPowerLevels", + "Number of transmission power levels available between TxPowerStart and TxPowerEnd included.", + type = Types.Integer, + default = "1", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_txpowerlevels) + + attr_txpowerend = Attribute("TxPowerEnd", + "Maximum available transmission level (dbm).", + type = Types.Double, + default = "16.0206", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_txpowerend) + + attr_txpowerstart = Attribute("TxPowerStart", + "Minimum available transmission level (dbm).", + type = Types.Double, + default = "16.0206", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_txpowerstart) + + attr_rxnoisefigure = Attribute("RxNoiseFigure", + "Loss (dB) in the Signal-to-Noise-Ratio due to non-idealities in the receiver. According to Wikipedia (http://en.wikipedia.org/wiki/Noise_figure), this is \"the difference in decibels (dB) between the noise output of the actual receiver to the noise output of an ideal receiver with the same overall gain and bandwidth when the receivers are connected to sources at the standard noise temperature T0 (usually 290 K)\". For", + type = Types.Double, + default = "7", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_rxnoisefigure) + + attr_channelswitchdelay = Attribute("ChannelSwitchDelay", + "Delay between two short frames transmitted on different frequencies.", + type = Types.String, + default = "+250000.0ns", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_channelswitchdelay) + + attr_channelnumber = Attribute("ChannelNumber", + "Channel center frequency = Channel starting frequency + 5 MHz * nch", + type = Types.Integer, + default = "1", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_channelnumber) + + attr_frequency = Attribute("Frequency", + "The operating frequency.", + type = Types.Integer, + default = "2407", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_frequency) + + attr_transmitters = Attribute("Transmitters", + "The number of transmitters.", + type = Types.Integer, + default = "1", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_transmitters) + + attr_recievers = Attribute("Recievers", + "The number of recievers.", + type = Types.Integer, + default = "1", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_recievers) + + attr_shortguardenabled = Attribute("ShortGuardEnabled", + "Whether or not short guard interval is enabled.", + type = Types.Bool, + default = "False", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_shortguardenabled) + + attr_ldpcenabled = Attribute("LdpcEnabled", + "Whether or not LDPC is enabled.", + type = Types.Bool, + default = "False", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_ldpcenabled) + + attr_stbcenabled = Attribute("STBCEnabled", + "Whether or not STBC is enabled.", + type = Types.Bool, + default = "False", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_stbcenabled) + + attr_greenfieldenabled = Attribute("GreenfieldEnabled", + "Whether or not STBC is enabled.", + type = Types.Bool, + default = "False", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_greenfieldenabled) + + attr_channelbonding = Attribute("ChannelBonding", + "Whether 20MHz or 40MHz.", + type = Types.Bool, + default = "False", + allowed = None, + range = None, + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(attr_channelbonding) + + + + @classmethod + def _register_traces(cls): + + phytxbegin = Trace("PhyTxBegin", "Trace source indicating a packet has begun transmitting over the channel medium") + + cls._register_trace(phytxbegin) + + phytxend = Trace("PhyTxEnd", "Trace source indicating a packet has been completely transmitted over the channel. NOTE: the only official WifiPhy implementation available to this date (YansWifiPhy) never fires this trace source.") + + cls._register_trace(phytxend) + + phytxdrop = Trace("PhyTxDrop", "Trace source indicating a packet has been dropped by the device during transmission") + + cls._register_trace(phytxdrop) + + phyrxbegin = Trace("PhyRxBegin", "Trace source indicating a packet has begun being received from the channel medium by the device") + + cls._register_trace(phyrxbegin) + + phyrxend = Trace("PhyRxEnd", "Trace source indicating a packet has been completely received from the channel medium by the device") + + cls._register_trace(phyrxend) + + phyrxdrop = Trace("PhyRxDrop", "Trace source indicating a packet has been dropped by the device during reception") + + cls._register_trace(phyrxdrop) + + monitorsnifferrx = Trace("MonitorSnifferRx", "Trace source simulating a wifi device in monitor mode sniffing all received frames") + + cls._register_trace(monitorsnifferrx) + + monitorsniffertx = Trace("MonitorSnifferTx", "Trace source simulating the capability of a wifi device in monitor mode to sniff all frames being transmitted") + + cls._register_trace(monitorsniffertx) + + + + def __init__(self, ec, guid): + super(NS3YansWifiPhy, self).__init__(ec, guid) + self._home = "ns3-yans-wifi-phy-%s" % self.guid
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3application.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3application.html new file mode 100644 index 00000000..755f4783 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3application.html @@ -0,0 +1,181 @@ + + + + + + + + nepi.resources.ns3.ns3application — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.ns3application

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.resource import clsinit_copy, ResourceState
+from nepi.resources.ns3.ns3base import NS3Base
+
+@clsinit_copy
+
[docs]class NS3BaseApplication(NS3Base): + _rtype = "abstract::ns3::Application" + + def __init__(self, ec, guid): + super(NS3BaseApplication, self).__init__(ec, guid) + self._node = None + + @property +
[docs] def node(self): + if not self._node: + from nepi.resources.ns3.ns3node import NS3BaseNode + nodes = self.get_connected(NS3BaseNode.get_rtype()) + + if not nodes: + msg = "Application not connected to node" + self.error(msg) + raise RuntimeError, msg + + self._node = nodes[0] + + return self._node +
+ @property + def _rms_to_wait(self): + rms = set() + rms.add(self.node) + return rms + + def _connect_object(self): + node = self.node + if node.uuid not in self.connected: + self.simulation.invoke(node.uuid, "AddApplication", self.uuid) + self._connected.add(node.uuid) + +
[docs] def do_stop(self): + if self.state == ResourceState.STARTED: + # No need to do anything, simulation.Destroy() will stop every object + self.info("Stopping command '%s'" % command) + self.simulation.invoke(self.uuid, "Stop") + self.set_stopped() +
+
[docs] def do_start(self): + if self.simulation.state < ResourceState.STARTED: + self.debug("---- RESCHEDULING START ----" ) + self.ec.schedule(self.reschedule_delay, self.start) + else: + super(NS3BaseApplication, self).do_start() + self._start_time = self.simulation.start_time +
+ @property +
[docs] def state(self): + if self._state == ResourceState.STARTED: + try: + is_running = self.simulation.invoke(self.uuid, "isAppRunning") + + if not is_running: + self.set_stopped() + except: + msg = "Application failed. Can not retrieve state" + out = "" + + import traceback + err = traceback.format_exc() + self.error(msg, out, err) + self.do_fail() + + return self._state +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3arpl3protocol.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3arpl3protocol.html new file mode 100644 index 00000000..ad7db8ed --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3arpl3protocol.html @@ -0,0 +1,137 @@ + + + + + + + + nepi.resources.ns3.ns3arpl3protocol — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.ns3arpl3protocol

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.resource import clsinit_copy
+from nepi.resources.ns3.ns3base import NS3Base
+
+@clsinit_copy
+
[docs]class NS3BaseArpL3Protocol(NS3Base): + _rtype = "abstract::ns3::ArpL3Protocol" + + @property +
[docs] def node(self): + from nepi.resources.ns3.ns3node import NS3BaseNode + nodes = self.get_connected(NS3BaseNode.get_rtype()) + + if not nodes: + msg = "ArpL3Protocol not connected to node" + self.error(msg) + raise RuntimeError, msg + + return nodes[0] +
+ @property + def _rms_to_wait(self): + rms = set() + rms.add(self.simulation) + return rms + + def _connect_object(self): + pass
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3base.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3base.html new file mode 100644 index 00000000..dd54a0c9 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3base.html @@ -0,0 +1,257 @@ + + + + + + + + nepi.resources.ns3.ns3base — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.ns3base

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.execution.attribute import Flags
+from nepi.execution.trace import TraceAttr
+
+@clsinit_copy
+
[docs]class NS3Base(ResourceManager): + _rtype = "abstract::ns3::Object" + _platform = "ns3" + + def __init__(self, ec, guid): + super(NS3Base, self).__init__(ec, guid) + self._uuid = None + self._connected = set() + self._trace_filename = dict() + self._node = None + + @property +
[docs] def connected(self): + return self._connected +
+ @property +
[docs] def uuid(self): + return self._uuid +
+ @property +
[docs] def simulation(self): + return self.node.simulation +
+ @property +
[docs] def node(self): + if not self._node: + from nepi.resources.ns3.ns3node import NS3BaseNode + nodes = self.get_connected(NS3BaseNode.get_rtype()) + if nodes: self._node = nodes[0] + + return self._node +
+
[docs] def trace(self, name, attr = TraceAttr.ALL, block = 512, offset = 0): + filename = self._trace_filename.get(name) + if not filename: + self.error("Can not resolve trace %s. Did you enabled it?" % name) + return "" + + return self.simulation.trace(filename, attr, block, offset) +
+ @property + def _rms_to_wait(self): + """ Returns the collection of ns-3 RMs that this RM needs to + wait for before start + + This method should be overriden to wait for other ns-3 + objects to be deployed before proceeding with the deployment + + """ + rms = set() + node = self.node + if node: rms.add(node) + return rms + + def _instantiate_object(self): + if self.uuid: + return + + kwargs = dict() + for attr in self._attrs.values(): + if not ( attr.has_flag(Flags.Construct) and attr.has_changed ): + continue + + kwargs[attr.name] = attr._value + + self._uuid = self.simulation.factory(self.get_rtype(), **kwargs) + + def _configure_object(self): + pass + + def _connect_object(self): + node = self.node + if node and node.uuid not in self.connected: + self.simulation.invoke(node.uuid, "AggregateObject", self.uuid) + self._connected.add(node.uuid) + + def _wait_rms(self): + """ Returns True if dependent RMs are not yer READY, False otherwise""" + for rm in self._rms_to_wait: + if rm.state < ResourceState.READY: + return True + return False + +
[docs] def do_provision(self): + self._instantiate_object() + self._connect_object() + self._configure_object() + + self.info("Provisioning finished") + + super(NS3Base, self).do_provision() +
+
[docs] def do_deploy(self): + if self._wait_rms(): + self.debug("---- RESCHEDULING DEPLOY ----" ) + self.ec.schedule(self.reschedule_delay, self.deploy) + else: + self.do_discover() + self.do_provision() + + self.set_ready() +
+
[docs] def do_start(self): + if self.state == ResourceState.READY: + # No need to do anything, simulation.Run() will start every object + self.info("Starting") + self.set_started() + else: + msg = "Failed" + self.error(msg, out, err) + raise RuntimeError, msg +
+
[docs] def do_stop(self): + if self.state == ResourceState.STARTED: + # No need to do anything, simulation.Destroy() will stop every object + self.info("Stopping") + self.set_stopped() +
+ @property +
[docs] def state(self): + return self._state +
+
[docs] def get(self, name): + if self.state in [ResourceState.READY, ResourceState.STARTED] and \ + self.has_flag(name, Flags.Reserved) and \ + not self.has_flag(name, Flags.NoRead): + return self.simulation.ns3_get(self.uuid, name) + else: + value = super(NS3Base, self).get(name) + + return value +
+
[docs] def set(self, name, value): + if self.state in [ResourceState.READY, ResourceState.STARTED] and \ + self.has_flag(name, Flags.Reserved) and \ + not (self.has_flag(Flags.NoWrite) or self.has_flag(name, Flags.Design)): + self.simulation.ns3_set(self.uuid, name, value) + + value = super(NS3Base, self).set(name, value) + + return value +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3ccndceapplication.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3ccndceapplication.html new file mode 100644 index 00000000..273de635 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3ccndceapplication.html @@ -0,0 +1,212 @@ + + + + + + + + nepi.resources.ns3.ns3ccndceapplication — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.ns3ccndceapplication

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.resource import clsinit_copy, ResourceState
+from nepi.resources.ns3.ns3dceapplication import NS3BaseDceApplication
+
+import os
+import threading
+
+@clsinit_copy
+
[docs]class NS3BaseCCNDceApplication(NS3BaseDceApplication): + _rtype = "abstract::ns3::CCNDceApplication" + + # Lock used to synchronize usage of CcnClientHelper + ccn_client_lock = threading.Lock() + _ccn_client_helper_uuid = None + + @property +
[docs] def ccn_client_helper_uuid(self): + if not self._ccn_client_helper_uuid: + self._ccn_client_helper_uuid = self.simulation.create("CcnClientHelper") + return self._ccn_client_helper_uuid +
+ def _instantiate_object(self): + pass + + def _connect_object(self): + node = self.node + if node.uuid not in self.connected: + self._connected.add(node.uuid) + + # Preventing concurrent access to the DceApplicationHelper + # from different DceApplication RMs + with self.ccn_client_lock: + self.simulation.invoke( + self.ccn_client_helper_uuid, + "ResetArguments") + + self.simulation.invoke( + self.ccn_client_helper_uuid, + "ResetEnvironment") + + self.simulation.invoke( + self.ccn_client_helper_uuid, + "SetBinary", self.get("binary")) + + self.simulation.invoke( + self.ccn_client_helper_uuid, + "SetStackSize", self.get("stackSize")) + + arguments = self.get("arguments") + if arguments: + for arg in map(str.strip, arguments.split(";")): + self.simulation.invoke( + self.ccn_client_helper_uuid, + "AddArgument", arg) + + environment = self.get("environment") + if environment: + for env in map(str.strip, environment.split(";")): + key, val = env.split("=") + self.simulation.invoke( + self.ccn_client_helper_uuid, + "AddEnvironment", key, val) + + if self.has_attribute("files"): + files = self.get("files") + if files: + for file in map(str.strip, files.split(";")): + remotepath, dcepath = file.split("=") + localpath = os.path.join(self.simulation.app_home, + os.path.basename(remotepath)) + self.simulation.invoke( + self.ccn_client_helper_uuid, + "AddFile", localpath, dcepath) + + if self.has_attribute("stdinFile"): + stdinfile = self.get("stdinFile") + if stdinfile: + # stdinfile might be an empty text that should be set as + # stdin + self.simulation.invoke( + self.ccn_client_helper_uuid, + "SetStdinFile", stdinfile) + + apps_uuid = self.simulation.invoke( + self.ccn_client_helper_uuid, + "InstallInNode", self.node.uuid) + + """ + container_uuid = self.simulation.create("NodeContainer") + self.simulation.invoke(container_uuid, "Add", self.node.uuid) + apps_uuid = self.simulation.invoke( + self.ccn_client_helper_uuid, + "Install", container_uuid) + """ + + self._uuid = self.simulation.invoke(apps_uuid, "Get", 0) + + if self.has_changed("StartTime"): + self.simulation.ns3_set(self.uuid, "StartTime", self.get("StartTime")) + + if self.has_changed("StopTime"): + self.simulation.ns3_set(self.uuid, "StopTime", self.get("StopTime")) +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3channel.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3channel.html new file mode 100644 index 00000000..cc8246d0 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3channel.html @@ -0,0 +1,141 @@ + + + + + + + + nepi.resources.ns3.ns3channel — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.ns3channel

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.resource import clsinit_copy
+from nepi.resources.ns3.ns3base import NS3Base
+
+@clsinit_copy
+
[docs]class NS3BaseChannel(NS3Base): + _rtype = "abstract::ns3::Channel" + + @property +
[docs] def simulation(self): + return self.devices[0].node.simulation +
+ @property +
[docs] def devices(self): + from nepi.resources.ns3.ns3netdevice import NS3BaseNetDevice + devices = self.get_connected(NS3BaseNetDevice.get_rtype()) + + if not devices: + msg = "Channel not connected to devices" + self.error(msg) + raise RuntimeError, msg + + return devices +
+ @property + def _rms_to_wait(self): + rms = set() + rms.add(self.simulation) + return rms + + def _connect_object(self): + pass +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3client.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3client.html new file mode 100644 index 00000000..7e94ddcc --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3client.html @@ -0,0 +1,141 @@ + + + + + + + + nepi.resources.ns3.ns3client — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.ns3client

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+
[docs]class NS3Client(object): + """ Common Interface for NS3 client classes """ + def __init__(self): + super(NS3Client, self).__init__() + +
[docs] def create(self, *args, **kwargs): + pass +
+
[docs] def factory(self, *args, **kwargs): + pass +
+
[docs] def invoke(self, *args, **kwargs): + pass +
+
[docs] def set(self, *args, **kwargs): + pass +
+
[docs] def get(self, *args, **kwargs): + pass +
+
[docs] def flush(self, *args, **kwargs): + pass +
+
[docs] def start(self, *args, **kwargs): + pass +
+
[docs] def stop(self, *args, **kwargs): + pass +
+
[docs] def shutdown(self, *args, **kwargs): + pass +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3dceapplication.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3dceapplication.html new file mode 100644 index 00000000..87795b99 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3dceapplication.html @@ -0,0 +1,272 @@ + + + + + + + + nepi.resources.ns3.ns3dceapplication — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.ns3dceapplication

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.resource import clsinit_copy, ResourceState
+from nepi.resources.ns3.ns3application import NS3BaseApplication
+from nepi.execution.trace import TraceAttr
+
+from nepi.resources.ns3.ns3wrapper import SIMULATOR_UUID
+
+import os
+import time
+import threading
+        
+@clsinit_copy
+
[docs]class NS3BaseDceApplication(NS3BaseApplication): + _rtype = "abstract::ns3::DceApplication" + + @classmethod + def _register_attributes(cls): + binary = Attribute("binary", + "Name of binary to execute", + flags = Flags.Design) + + stack_size = Attribute("stackSize", + "Stack Size for DCE", + type = Types.Integer, + default = 1<<20, + flags = Flags.Design) + + arguments = Attribute("arguments", + "Semi-colon separated list of arguments for the application", + flags = Flags.Design) + + environment = Attribute("environment", + "Semi-colon separated list of 'key=value' pairs to set as " + "DCE environment variables.", + flags = Flags.Design) + + use_dlm = Attribute("useDlmLoader", + "Use ns3::DlmLoaderFactory as library loader", + type = Types.Bool, + flags = Flags.Design) + + starttime = Attribute("StartTime", + "Time at which the application will start", + default = "+0.0ns", + flags = Flags.Reserved | Flags.Construct) + + stoptime = Attribute("StopTime", + "Time at which the application will stop", + default = "+0.0ns", + flags = Flags.Reserved | Flags.Construct) + + cls._register_attribute(binary) + cls._register_attribute(stack_size) + cls._register_attribute(arguments) + cls._register_attribute(environment) + cls._register_attribute(use_dlm) + cls._register_attribute(stoptime) + cls._register_attribute(starttime) + + def __init__(self, ec, guid): + super(NS3BaseDceApplication, self).__init__(ec, guid) + self._pid = None + + @property +
[docs] def pid(self): + return self._pid +
+ def _instantiate_object(self): + pass + + def _connect_object(self): + node = self.node + if node.uuid not in self.connected: + self._connected.add(node.uuid) + + # Preventing concurrent access to the DceApplicationHelper + # from different DceApplication RMs + dce_helper = self.simulation.dce_helper + + with dce_helper.dce_application_lock: + dce_app_uuid = dce_helper.dce_application_uuid + + self.simulation.invoke(dce_app_uuid, "ResetArguments") + + self.simulation.invoke(dce_app_uuid, "ResetEnvironment") + + self.simulation.invoke(dce_app_uuid, + "SetBinary", self.get("binary")) + + self.simulation.invoke(dce_app_uuid, + "SetStackSize", self.get("stackSize")) + + arguments = self.get("arguments") + if arguments: + for arg in map(str.strip, arguments.split(";")): + self.simulation.invoke(dce_app_uuid, + "AddArgument", arg) + + environment = self.get("environment") + if environment: + for env in map(str.strip, environment.split(";")): + key, val = env.split("=") + self.simulation.invoke(dce_app_uuid, + "AddEnvironment", key, val) + + apps_uuid = self.simulation.invoke(dce_app_uuid, + "InstallInNode", self.node.uuid) + + self._uuid = self.simulation.invoke(apps_uuid, "Get", 0) + + if self.has_changed("StartTime"): + self.simulation.ns3_set(self.uuid, "StartTime", self.get("StartTime")) + + if self.has_changed("StopTime"): + self.simulation.ns3_set(self.uuid, "StopTime", self.get("StopTime")) + +
[docs] def do_stop(self): + if self.state == ResourceState.STARTED: + # No need to do anything, simulation.Destroy() will stop every object + self.info("Stopping command '%s'" % command) + self.simulation.invoke(self.uuid, "Stop") + self.set_stopped() +
+
[docs] def do_start(self): + if self.simulation.state < ResourceState.STARTED: + self.debug("---- RESCHEDULING START ----" ) + self.ec.schedule(self.reschedule_delay, self.start) + else: + is_app_started = self.simulation.invoke(self.uuid, "isAppStarted") + + if is_app_started or self.simulation.state > ResourceState.STARTED: + super(NS3BaseApplication, self).do_start() + self._start_time = self.simulation.start_time + else: + # Reschedule until dce application is actually started + self.debug("---- RESCHEDULING START ----" ) + self.ec.schedule(self.reschedule_delay, self.start) +
+
[docs] def trace(self, name, attr = TraceAttr.ALL, block = 512, offset = 0): + self._configure_traces() + return super(NS3BaseDceApplication, self).trace(name, attr = attr, + block = block, offset = offset) +
+ def _configure_traces(self): + if self.pid is not None: + return + + # Using lock to prevent concurrent access to the DceApplicationHelper + # from different DceApplication RMs + dce_helper = self.simulation.dce_helper + + with dce_helper.dce_application_lock: + dce_app_uuid = dce_helper.dce_application_uuid + + self._pid = self.simulation.invoke(dce_app_uuid, + "GetPid", self.uuid) + + node_id = self.node.node_id + self._trace_filename["stdout"] = "files-%s/var/log/%s/stdout" % (node_id, self.pid) + self._trace_filename["stderr"] = "files-%s/var/log/%s/stderr" % (node_id, self.pid) + self._trace_filename["status"] = "files-%s/var/log/%s/status" % (node_id, self.pid) + self._trace_filename["cmdline"] = "files-%s/var/log/%s/cmdline" % (node_id, self.pid) +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3dcehelper.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3dcehelper.html new file mode 100644 index 00000000..6c104f30 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3dcehelper.html @@ -0,0 +1,149 @@ + + + + + + + + nepi.resources.ns3.ns3dcehelper — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.ns3dcehelper

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+import os
+import time
+import threading
+        
+
[docs]class NS3DceHelper(object): + def __init__(self, simulation): + self.simulation = simulation + + # Lock used to synchronize usage of DceManagerHelper + self._dce_manager_lock = threading.Lock() + # Lock used to synchronize usage of DceApplicationHelper + self._dce_application_lock = threading.Lock() + + self._dce_manager_uuid = None + self._dce_application_uuid = None + + @property +
[docs] def dce_manager_uuid(self): + if not self._dce_manager_uuid: + self._dce_manager_uuid = \ + self.simulation.create("DceManagerHelper") + + return self._dce_manager_uuid +
+ @property +
[docs] def dce_application_uuid(self): + if not self._dce_application_uuid: + self._dce_application_uuid = \ + self.simulation.create("DceApplicationHelper") + + return self._dce_application_uuid +
+ @property +
[docs] def dce_manager_lock(self): + return self._dce_manager_lock +
+ @property +
[docs] def dce_application_lock(self): + return self._dce_application_lock +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3errormodel.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3errormodel.html new file mode 100644 index 00000000..08e27212 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3errormodel.html @@ -0,0 +1,140 @@ + + + + + + + + nepi.resources.ns3.ns3errormodel — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.ns3errormodel

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.resource import clsinit_copy
+from nepi.resources.ns3.ns3base import NS3Base
+
+@clsinit_copy
+
[docs]class NS3BaseErrorModel(NS3Base): + _rtype = "abstract::ns3::ErrorModel" + + @property +
[docs] def device(self): + from nepi.resources.ns3.ns3netdevice import NS3BaseNetDevice + devices = self.get_connected(NS3BaseNetDevice.get_rtype()) + + if not devices: + msg = "ErrorModel not connected to device" + self.error(msg) + raise RuntimeError, msg + + return devices[0] +
+ @property + def _rms_to_wait(self): + rms = set() + rms.add(self.device) + return rms + + def _connect_object(self): + device = self.device + if device.uuid not in self.connected: + self.simulation.invoke(device.uuid, "SetReceiveErrorModel", self.uuid) + self._connected.add(device.uuid) +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3errorratemodel.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3errorratemodel.html new file mode 100644 index 00000000..7a81fc4c --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3errorratemodel.html @@ -0,0 +1,144 @@ + + + + + + + + nepi.resources.ns3.ns3errorratemodel — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.ns3errorratemodel

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.resource import clsinit_copy
+from nepi.resources.ns3.ns3base import NS3Base
+
+@clsinit_copy
+
[docs]class NS3BaseErrorRateModel(NS3Base): + _rtype = "abstract::ns3::ErrorRateModel" + + @property +
[docs] def node(self): + return self.phy.node +
+ @property +
[docs] def phy(self): + from nepi.resources.ns3.ns3wifiphy import NS3BaseWifiPhy + phys = self.get_connected(NS3BaseWifiPhy.get_rtype()) + + if not phys: + msg = "ErrorRateModel not connected to phy" + self.error(msg) + raise RuntimeError, msg + + return phys[0] +
+ @property + def _rms_to_wait(self): + rms = set() + rms.add(self.phy) + return rms + + def _connect_object(self): + phy = self.phy + if phy.uuid not in self.connected: + self.simulation.invoke(phy.uuid, "SetErrorRateModel", self.uuid) + self._connected.add(phy.uuid) +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3fdnetdevice.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3fdnetdevice.html new file mode 100644 index 00000000..d220680b --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3fdnetdevice.html @@ -0,0 +1,149 @@ + + + + + + + + nepi.resources.ns3.ns3fdnetdevice — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.ns3fdnetdevice

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.resource import clsinit_copy
+from nepi.resources.ns3.ns3netdevice import NS3BaseNetDevice
+
+@clsinit_copy
+
[docs]class NS3BaseFdNetDevice(NS3BaseNetDevice): + _rtype = "abstract::ns3::FdNetDevice" + + @property + def _rms_to_wait(self): + rms = set([self.node]) + return rms + + def _configure_mac_address(self): + # The wifimac is the one responsible for + # configuring the MAC address + pass + + def _connect_object(self): + node = self.node + if node and node.uuid not in self.connected: + self.simulation.invoke(node.uuid, "AddDevice", self.uuid) + self._connected.add(node.uuid) + + def _instantiate_object(self): + """ just validate that the simulator is in real time + mode, otherwise it is not going to work + """ + + mode = self.simulation.get("simulatorImplementationType") + if mode != "ns3::RealtimeSimulatorImpl": + msg = "The simulation must run in real time!!" + self.error(msg) + raise RuntimeError, msg + + super(NS3BaseFdNetDevice, self)._instantiate_object() + +
[docs] def recv_fd(self): + address = self.simulation.invoke(self.uuid, "recvFD") + return address +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3icmpv4l4protocol.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3icmpv4l4protocol.html new file mode 100644 index 00000000..08b9cac6 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3icmpv4l4protocol.html @@ -0,0 +1,134 @@ + + + + + + + + nepi.resources.ns3.ns3icmpv4l4protocol — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.ns3icmpv4l4protocol

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.resource import clsinit_copy
+from nepi.resources.ns3.ns3base import NS3Base
+
+@clsinit_copy
+
[docs]class NS3BaseIcmpv4L4Protocol(NS3Base): + _rtype = "abstract::ns3::Icmpv4L4Protocol" + + @property +
[docs] def node(self): + from nepi.resources.ns3.ns3node import NS3BaseNode + nodes = self.get_connected(NS3BaseNode.get_rtype()) + + if not nodes: + msg = "Icmp4L4Protocol not connected to node" + self.error(msg) + raise RuntimeError, msg + + return nodes[0] +
+ @property + def _rms_to_wait(self): + rms = set() + rms.add(self.node) + return rms +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3ipv4l3protocol.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3ipv4l3protocol.html new file mode 100644 index 00000000..af335aaf --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3ipv4l3protocol.html @@ -0,0 +1,157 @@ + + + + + + + + nepi.resources.ns3.ns3ipv4l3protocol — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.ns3ipv4l3protocol

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.resource import clsinit_copy
+from nepi.resources.ns3.ns3base import NS3Base
+
+@clsinit_copy
+
[docs]class NS3BaseIpv4L3Protocol(NS3Base): + _rtype = "abstract::ns3::Ipv4L3Protocol" + + def __init__(self, ec, guid): + super(NS3BaseIpv4L3Protocol, self).__init__(ec, guid) + self.list_routing_uuid = None + self.static_routing_uuid = None + self.global_routing_uuid = None + + @property +
[docs] def node(self): + from nepi.resources.ns3.ns3node import NS3BaseNode + nodes = self.get_connected(NS3BaseNode.get_rtype()) + + if not nodes: + msg = "Ipv4L3Protocol not connected to node" + self.error(msg) + raise RuntimeError, msg + + return nodes[0] +
+ @property + def _rms_to_wait(self): + rms = set() + rms.add(self.simulation) + return rms + + def _configure_object(self): + simulation = self.simulation + + self.list_routing_uuid = simulation.create("Ipv4ListRouting") + simulation.invoke(self.uuid, "SetRoutingProtocol", self.list_routing_uuid) + + self.static_routing_uuid = simulation.create("Ipv4StaticRouting") + simulation.invoke(self.list_routing_uuid, "AddRoutingProtocol", + self.static_routing_uuid, 0) + + self.global_routing_uuid = simulation.create("Ipv4GlobalRouting") + simulation.invoke(self.list_routing_uuid, "AddRoutingProtocol", + self.global_routing_uuid, -10) + + def _connect_object(self): + pass
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3mobilitymodel.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3mobilitymodel.html new file mode 100644 index 00000000..63b72b4b --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3mobilitymodel.html @@ -0,0 +1,135 @@ + + + + + + + + nepi.resources.ns3.ns3mobilitymodel — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.ns3mobilitymodel

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.resource import clsinit_copy
+from nepi.resources.ns3.ns3base import NS3Base
+
+# TODO: 
+#       - mobility.SetPositionAllocator ("ns3::GridPositionAllocator",
+#       - set hook for Position - SetPosition(Vector)
+
+@clsinit_copy
+
[docs]class NS3BaseMobilityModel(NS3Base): + _rtype = "abstract::ns3::MobilityModel" + + def _configure_object(self): + # Set initial position + position = self.get("Position") + if position: + self.simulation.ns3_set(self.uuid, "Position", position) + + @property + def _rms_to_wait(self): + rms = set() + rms.add(self.simulation) + return rms + + def _connect_object(self): + pass
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3netdevice.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3netdevice.html new file mode 100644 index 00000000..51630fad --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3netdevice.html @@ -0,0 +1,313 @@ + + + + + + + + nepi.resources.ns3.ns3netdevice — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.ns3netdevice

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags
+from nepi.execution.resource import clsinit_copy
+from nepi.execution.trace import Trace
+from nepi.resources.ns3.ns3base import NS3Base
+
+import ipaddr
+
+@clsinit_copy
+
[docs]class NS3BaseNetDevice(NS3Base): + _rtype = "abstract::ns3::NetDevice" + + @classmethod + def _register_attributes(cls): + mac = Attribute("mac", "MAC address for device", + flags = Flags.Design) + + ip = Attribute("ip", "IP address for device", + flags = Flags.Design) + + prefix = Attribute("prefix", "Network prefix for device", + flags = Flags.Design) + + cls._register_attribute(mac) + cls._register_attribute(ip) + cls._register_attribute(prefix) + + @classmethod + def _register_traces(cls): + pcap = Trace("pcap", "Dump traffic sniffed on the network device in Pcap format") + promisc_pcap = Trace("promiscPcap", "Dump traffic sniffed in promiscuous mode on the network device in Pcap format") + ascii = Trace("ascii", "Dump traffic sniffed on the network device in Ascii format") + + cls._register_trace(pcap) + cls._register_trace(promisc_pcap) + cls._register_trace(ascii) + + def __init__(self, ec, guid): + super(NS3BaseNetDevice, self).__init__(ec, guid) + self._ascii_helper_uuid = None + self._device_helper_uuid = None + + @property +
[docs] def node(self): + from nepi.resources.ns3.ns3node import NS3BaseNode + nodes = self.get_connected(NS3BaseNode.get_rtype()) + + if not nodes: + msg = "Device not connected to node" + self.error(msg) + raise RuntimeError, msg + + return nodes[0] +
+ @property +
[docs] def channel(self): + from nepi.resources.ns3.ns3channel import NS3BaseChannel + channels = self.get_connected(NS3BaseChannel.get_rtype()) + + if not channels: + msg = "Device not connected to channel" + self.error(msg) + raise RuntimeError, msg + + return channels[0] +
+ @property +
[docs] def queue(self): + from nepi.resources.ns3.ns3queue import NS3BaseQueue + queue = self.get_connected(NS3BaseQueue.get_rtype()) + + if not queue: + msg = "Device not connected to queue" + self.error(msg) + raise RuntimeError, msg + + return queue[0] +
+ @property +
[docs] def ascii_helper_uuid(self): + if not self._ascii_helper_uuid: + self._ascii_helper_uuid = self.simulation.create("AsciiTraceHelper") + return self._ascii_helper_uuid +
+ @property +
[docs] def device_helper_uuid(self): + if not self._device_helper_uuid: + rtype = self.get_rtype() + if rtype == "ns3::PointToPointNetDevice": + classname = "PointToPointHelper" + elif rtype == "ns3::CsmaNetDevice": + classname = "CsmaHelper" + elif rtype == "ns3::EmuNetDevice": + classname = "EmuHelper" + elif rtype == "ns3::FdNetDevice": + classname = "FdNetDeviceHelper" + elif rtype in [ "ns3::BaseStationNetDevice", "SubscriberStationNetDevice" ]: + classname = "WimaxHelper" + elif rtype == "ns3::WifiNetDevice": + classname = "YansWifiPhyHelper" + elif rtype == "ns3::FdNetDevice": + classname = "FdNetDeviceHelper" + + self._device_helper_uuid = self.simulation.create(classname) + + return self._device_helper_uuid +
+ @property + def _rms_to_wait(self): + rms = set([self.node, self.channel]) + return rms + + def _configure_object(self): + # Set Mac + self._configure_mac_address() + + # Set IP address + self._configure_ip_address() + + # Enable traces + self._configure_traces() + + def _configure_mac_address(self): + mac = self.get("mac") + if mac: + mac_uuid = self.simulation.create("Mac48Address", mac) + else: + mac_uuid = self.simulation.invoke("singleton::Mac48Address", "Allocate") + + self.simulation.invoke(self.uuid, "SetAddress", mac_uuid) + + def _configure_ip_address(self): + ip = self.get("ip") + prefix = self.get("prefix") + + i = ipaddr.IPAddress(ip) + if i.version == 4: + # IPv4 + ipv4 = self.node.ipv4 + ifindex_uuid = self.simulation.invoke(ipv4.uuid, "AddInterface", + self.uuid) + ipv4_addr_uuid = self.simulation.create("Ipv4Address", ip) + ipv4_mask_uuid = self.simulation.create("Ipv4Mask", "/%s" % str(prefix)) + inaddr_uuid = self.simulation.create("Ipv4InterfaceAddress", + ipv4_addr_uuid, ipv4_mask_uuid) + self.simulation.invoke(ipv4.uuid, "AddAddress", ifindex_uuid, + inaddr_uuid) + self.simulation.invoke(ipv4.uuid, "SetMetric", ifindex_uuid, 1) + self.simulation.invoke(ipv4.uuid, "SetUp", ifindex_uuid) + else: + # IPv6 + # TODO! + pass + + def _configure_traces(self): + if self.trace_enabled("pcap"): + helper_uuid = self.device_helper_uuid + + filename = "trace-pcap-netdev-%d.pcap" % self.guid + self._trace_filename["pcap"] = filename + + filepath = self.simulation.trace_filepath(filename) + + self.simulation.invoke(helper_uuid, "EnablePcap", filepath, + self.uuid, promiscuous = False, explicitFilename = True) + + if self.trace_enabled("promiscPcap"): + helper_uuid = self.device_helper_uuid + + filename = "trace-promisc-pcap-netdev-%d.pcap" % self.guid + self._trace_filename["promiscPcap"] = filename + + filepath = self.simulation.trace_filepath(filename) + + self.simulation.invoke(helper_uuid, "EnablePcap", filepath, + self.uuid, promiscuous = True, explicitFilename = True) + + if self.trace_enabled("ascii"): + helper_uuid = self.device_helper_uuid + ascii_helper_uuid = self.ascii_helper_uuid + + filename = "trace-ascii-netdev-%d.tr" % self.guid + self._trace_filename["ascii"] = filename + + filepath = self.simulation.trace_filepath(filename) + stream_uuid = self.simulation.invoke(ascii_helper_uuid, + "CreateFileStream", filepath) + self.simulation.invoke(helper_uuid, "EnableAscii", stream_uuid, + self.uuid) + + def _connect_object(self): + node = self.node + if node and node.uuid not in self.connected: + self.simulation.invoke(node.uuid, "AddDevice", self.uuid) + self._connected.add(node.uuid) + + channel = self.channel + if channel and channel.uuid not in self.connected: + self.simulation.invoke(self.uuid, "Attach", channel.uuid) + self._connected.add(channel.uuid) + + # Verify that the device has a queue. If no queue is added a segfault + # error occurs + queue = self.queue +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3node.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3node.html new file mode 100644 index 00000000..af6fefa7 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3node.html @@ -0,0 +1,285 @@ + + + + + + + + nepi.resources.ns3.ns3node — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.ns3node

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.resource import clsinit_copy
+from nepi.resources.ns3.ns3base import NS3Base
+
+@clsinit_copy
+
[docs]class NS3BaseNode(NS3Base): + _rtype = "abstract::ns3::Node" + + def __init__(self, ec, guid): + super(NS3BaseNode, self).__init__(ec, guid) + self._simulation = None + self._node_id = None + self._ipv4 = None + self._arp = None + self._mobility = None + self._devices = None + self._dceapplications = None + + @classmethod + def _register_attributes(cls): + enablestack = Attribute("enableStack", + "Install network stack in Node, including: ARP, " + "IP4, ICMP, UDP and TCP ", + type = Types.Bool, + default = False, + flags = Flags.Design) + + cls._register_attribute(enablestack) + + @property +
[docs] def simulation(self): + if not self._simulation: + from nepi.resources.ns3.ns3simulation import NS3Simulation + for guid in self.connections: + rm = self.ec.get_resource(guid) + if isinstance(rm, NS3Simulation): + self._simulation = rm + + if not self._simulation: + msg = "Node not connected to simulation" + self.error(msg) + raise RuntimeError, msg + + return self._simulation +
+ @property +
[docs] def ipv4(self): + if not self._ipv4: + from nepi.resources.ns3.ns3ipv4l3protocol import NS3BaseIpv4L3Protocol + ipv4s = self.get_connected(NS3BaseIpv4L3Protocol.get_rtype()) + if ipv4s: + self._ipv4 = ipv4s[0] + + return self._ipv4 +
+ @property +
[docs] def arp(self): + if not self._arp: + from nepi.resources.ns3.ns3arpl3protocol import NS3BaseArpL3Protocol + arps = self.get_connected(NS3BaseArpL3Protocol.get_rtype()) + if arps: + self._arp = arps[0] + + return self._arp +
+ @property +
[docs] def mobility(self): + if not self._mobility: + from nepi.resources.ns3.ns3mobilitymodel import NS3BaseMobilityModel + mobility = self.get_connected(NS3BaseMobilityModel.get_rtype()) + if mobility: + self._mobility = mobility[0] + + return self._mobility +
+ @property +
[docs] def devices(self): + if not self._devices: + from nepi.resources.ns3.ns3netdevice import NS3BaseNetDevice + devices = self.get_connected(NS3BaseNetDevice.get_rtype()) + + if not devices: + msg = "Node not connected to devices" + self.error(msg) + raise RuntimeError, msg + + self._devices = devices + + return self._devices +
+ @property +
[docs] def node_id(self): + return self._node_id +
+ @property +
[docs] def dceapplications(self): + if not self._dceapplications: + from nepi.resources.ns3.ns3dceapplication import NS3BaseDceApplication + self._dceapplications = self.get_connected(NS3BaseDceApplication.get_rtype()) + + return self._dceapplications +
+ @property + def _rms_to_wait(self): + rms = set([self.simulation]) + + if self.ipv4: + rms.add(self.ipv4) + + if self.arp: + rms.add(self.arp) + + if self.mobility: + rms.add(self.mobility) + + return rms + + def _configure_object(self): + if self.get("enableStack"): + uuid_stack_helper = self.simulation.create("InternetStackHelper") + self.simulation.invoke(uuid_stack_helper, "Install", self.uuid) + + # Retrieve IPV4 object + ipv4_uuid = self.simulation.invoke(self.uuid, "retrieveObject", + "ns3::Ipv4L3Protocol") + + # Add IPv4 RM to the node + ipv4 = self.ec.register_resource("ns3::Ipv4L3Protocol") + self.ec.register_connection(self.guid, ipv4) + ipv4rm = self.ec.get_resource(ipv4) + ipv4rm._uuid = ipv4_uuid + ipv4rm.set_started() + else: + ### node.AggregateObject(PacketSocketFactory()) + uuid_packet_socket_factory = self.simulation.create("PacketSocketFactory") + self.simulation.invoke(self.uuid, "AggregateObject", uuid_packet_socket_factory) + + self._node_id = self.simulation.invoke(self.uuid, "GetId") + + dceapplications = self.dceapplications + if dceapplications: + self._add_dce(dceapplications) + + def _connect_object(self): + if not self.get("enableStack"): + ipv4 = self.ipv4 + if ipv4: + self.simulation.invoke(self.uuid, "AggregateObject", ipv4.uuid) + self._connected.add(ipv4.uuid) + ipv4._connected.add(self.uuid) + + arp = self.arp + if arp: + self.simulation.invoke(self.uuid, "AggregateObject", arp.uuid) + self._connected.add(arp.uuid) + arp._connected.add(self.uuid) + + mobility = self.mobility + if mobility: + self.simulation.invoke(self.uuid, "AggregateObject", mobility.uuid) + self._connected.add(mobility.uuid) + mobility._connected.add(self.uuid) + + def _add_dce(self, dceapplications): + dceapp = dceapplications[0] + + container_uuid = self.simulation.create("NodeContainer") + self.simulation.invoke(container_uuid, "Add", self.uuid) + + dce_helper = self.simulation.dce_helper + + with dce_helper.dce_manager_lock: + dce_manager_uuid = dce_helper.dce_manager_uuid + + self.simulation.invoke(dce_manager_uuid, "Install", container_uuid) +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3pipechanel.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3pipechanel.html new file mode 100644 index 00000000..6ebc43de --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3pipechanel.html @@ -0,0 +1,171 @@ + + + + + + + + nepi.resources.ns3.ns3pipechanel — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.ns3pipechanel

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.resource import clsinit_copy
+from nepi.resources.ns3.ns3base import NS3Base
+
+import socket
+
+@clsinit_copy
+
[docs]class NS3BasePipeChannel(NS3Base): + """ Interconnects two FdNetDevices with a PIPE + """ + _rtype = "ns3::PipeChannel" + + def __init__(self, ec, guid): + super(NS3BasePipeChannel, self).__init__(ec, guid) + self._devices = None + + @property +
[docs] def devices(self): + if not self._devices: + from nepi.resources.ns3.ns3fdnetdevice import NS3BaseFdNetDevice + devices = self.get_connected(NS3BaseFdNetDevice.get_rtype()) + if not devices or len(devices) != 2: + msg = "PipeChannel must be connected to exactly to two FdNetDevices" + self.error(msg) + raise RuntimeError, msg + + self._devices = devices + + return self._devices +
+ @property +
[docs] def node(self): + return self.devices[0].node +
+ @property + def _rms_to_wait(self): + rms = set(self.devices) + return rms + + def _instantiate_object(self): + """ The pipe channel does not really exists as an ns-3 object. + Do nothing. + """ + pass + + def _connect_object(self): + dev1 = self.devices[0] + dev2 = self.devices[1] + + if dev1.uuid not in self.connected and dev2.uuid not in self.connected: + (s0, s1) = socket.socketpair(socket.AF_UNIX, socket.SOCK_STREAM, 0) + + dev1.send_fd(s0) + + self._connected.add(dev1.uuid) + dev1._connected.add(self.uuid) + + dev2.send_fd(s1) + + self._connected.add(dev2.uuid) + dev2._connected.add(self.uuid) +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3propagationdelaymodel.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3propagationdelaymodel.html new file mode 100644 index 00000000..885465e0 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3propagationdelaymodel.html @@ -0,0 +1,144 @@ + + + + + + + + nepi.resources.ns3.ns3propagationdelaymodel — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.ns3propagationdelaymodel

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.resource import clsinit_copy
+from nepi.resources.ns3.ns3base import NS3Base
+
+@clsinit_copy
+
[docs]class NS3BasePropagationDelayModel(NS3Base): + _rtype = "abstract::ns3::PropagationDelayModel" + + @property +
[docs] def simulation(self): + return self.channel.simulation +
+ @property +
[docs] def channel(self): + from nepi.resources.ns3.ns3wifichannel import NS3BaseWifiChannel + channels = self.get_connected(NS3BaseWifiChannel.get_rtype()) + + if not channels: + msg = "PropagationDelayModel not connected to channel" + self.error(msg) + raise RuntimeError, msg + + return channels[0] +
+ @property + def _rms_to_wait(self): + others = set() + others.add(self.channel) + return others + + def _connect_object(self): + channel = self.channel + if channel.uuid not in self.connected: + self.simulation.invoke(channel.uuid, "SetPropagationDelayModel", self.uuid) + self._connected.add(channel.uuid) +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3propagationlossmodel.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3propagationlossmodel.html new file mode 100644 index 00000000..8ded8355 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3propagationlossmodel.html @@ -0,0 +1,144 @@ + + + + + + + + nepi.resources.ns3.ns3propagationlossmodel — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.ns3propagationlossmodel

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.resource import clsinit_copy
+from nepi.resources.ns3.ns3base import NS3Base
+
+@clsinit_copy
+
[docs]class NS3BasePropagationLossModel(NS3Base): + _rtype = "ns3::PropagationLossModel" + + @property +
[docs] def simulation(self): + return self.channel.simulation +
+ @property +
[docs] def channel(self): + from nepi.resources.ns3.ns3wifichannel import NS3BaseWifiChannel + channels = self.get_connected(NS3BaseWifiChannel.get_rtype()) + + if not channels: + msg = "PropagationLossModel not connected to channel" + self.error(msg) + raise RuntimeError, msg + + return channels[0] +
+ @property + def _rms_to_wait(self): + others = set() + others.add(self.channel) + return others + + def _connect_object(self): + channel = self.channel + if channel.uuid not in self.connected: + self.simulation.invoke(channel.uuid, "SetPropagationLossModel", self.uuid) + self._connected.add(channel.uuid) +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3queue.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3queue.html new file mode 100644 index 00000000..b61b1174 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3queue.html @@ -0,0 +1,145 @@ + + + + + + + + nepi.resources.ns3.ns3queue — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.ns3queue

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.resource import clsinit_copy
+from nepi.resources.ns3.ns3base import NS3Base
+
+@clsinit_copy
+
[docs]class NS3BaseQueue(NS3Base): + _rtype = "abstract::ns3::Queue" + + @property +
[docs] def device(self): + from nepi.resources.ns3.ns3netdevice import NS3BaseNetDevice + devices = self.get_connected(NS3BaseNetDevice.get_rtype()) + + if not devices: + msg = "Queue not connected to device" + self.error(msg, out, err) + raise RuntimeError, msg + + return devices[0] +
+ @property +
[docs] def node(self): + return self.device.node +
+ @property + def _rms_to_wait(self): + rms = set() + rms.add(self.device) + return rms + + def _connect_object(self): + device = self.device + if device.uuid not in self.connected: + self.simulation.invoke(device.uuid, "SetQueue", self.uuid) + self._connected.add(device.uuid) + device._connected.add(self.uuid) +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3route.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3route.html new file mode 100644 index 00000000..0364fb10 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3route.html @@ -0,0 +1,183 @@ + + + + + + + + nepi.resources.ns3.ns3route — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.ns3route

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags
+from nepi.execution.resource import clsinit_copy
+from nepi.execution.trace import Trace
+from nepi.resources.ns3.ns3base import NS3Base
+
+import ipaddr
+
+@clsinit_copy
+
[docs]class NS3Route(NS3Base): + _rtype = "ns3::Route" + + @classmethod + def _register_attributes(cls): + network = Attribute("network", "Destination network address", + flags = Flags.Design) + + prefix = Attribute("prefix", "Network prefix for the network", + flags = Flags.Design) + + nexthop = Attribute("nexthop", "Address of next hop in the route", + flags = Flags.Design) + + cls._register_attribute(network) + cls._register_attribute(prefix) + cls._register_attribute(nexthop) + + def __init__(self, ec, guid): + super(NS3Route, self).__init__(ec, guid) + + @property +
[docs] def node(self): + from nepi.resources.ns3.ns3node import NS3BaseNode + nodes = self.get_connected(NS3BaseNode.get_rtype()) + + if not nodes: + msg = "Device not connected to node" + self.error(msg) + raise RuntimeError, msg + + return nodes[0] +
+ @property + def _rms_to_wait(self): + # Wait for all network devices connected to the node to be ready + # before configuring the routes, else the route might refer to a + # non yet existing interface + + rms = set() + rms.update(self.node.devices) + return rms + + def _instantiate_object(self): + pass + + def _configure_object(self): + network = self.get("network") + prefix = self.get("prefix") + nexthop = self.get("nexthop") + ipv4_uuid = self.node.ipv4.uuid + + ret = self.simulation.invoke(ipv4_uuid, "addStaticRoute", network, + prefix, nexthop) + + if not ret: + msg = "Could not configure route %s/%s hop: %s" % (network, prefix, + nexthop) + self.error(msg) + raise RuntimeError, msg + + def _connect_object(self): + node = self.node + if node and node.uuid not in self.connected: + self._connected.add(node.uuid) +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3server.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3server.html new file mode 100644 index 00000000..bd8e1598 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3server.html @@ -0,0 +1,349 @@ + + + + + + + + nepi.resources.ns3.ns3server — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.ns3server

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+import base64
+import cPickle
+import errno
+import logging
+import os
+import socket
+import sys
+
+from optparse import OptionParser, SUPPRESS_HELP
+
+from ns3wrapper import NS3Wrapper
+
+
[docs]class NS3WrapperMessage: + CREATE = "CREATE" + FACTORY = "FACTORY" + INVOKE = "INVOKE" + SET = "SET" + GET = "GET" + FLUSH = "FLUSH" + START = "START" + STOP = "STOP" + SHUTDOWN = "SHUTDOWN" +
+
[docs]def handle_message(ns3_wrapper, msg_type, args, kwargs): + if msg_type == NS3WrapperMessage.SHUTDOWN: + ns3_wrapper.shutdown() + + return "BYEBYE" + + if msg_type == NS3WrapperMessage.STOP: + time = kwargs.get("time") + + ns3_wrapper.stop(time=time) + + return "STOPPED" + + if msg_type == NS3WrapperMessage.START: + ns3_wrapper.start() + + return "STARTED" + + if msg_type == NS3WrapperMessage.CREATE: + clazzname = args.pop(0) + + return ns3_wrapper.create(clazzname, *args) + + if msg_type == NS3WrapperMessage.FACTORY: + type_name = args.pop(0) + + return ns3_wrapper.factory(type_name, **kwargs) + + if msg_type == NS3WrapperMessage.INVOKE: + uuid = args.pop(0) + operation = args.pop(0) + + return ns3_wrapper.invoke(uuid, operation, *args, **kwargs) + + if msg_type == NS3WrapperMessage.GET: + uuid = args.pop(0) + name = args.pop(0) + + return ns3_wrapper.get(uuid, name) + + if msg_type == NS3WrapperMessage.SET: + uuid = args.pop(0) + name = args.pop(0) + value = args.pop(0) + + return ns3_wrapper.set(uuid, name, value) + + if msg_type == NS3WrapperMessage.FLUSH: + # Forces flushing output and error streams. + # NS-3 output will stay unflushed until the program exits or + # explicit invocation flush is done + sys.stdout.flush() + sys.stderr.flush() + + ns3_wrapper.logger.debug("FLUSHED") + + return "FLUSHED" +
+
[docs]def open_socket(socket_name): + sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) + sock.bind(socket_name) + return sock +
+
[docs]def close_socket(sock): + try: + sock.close() + except: + pass +
+
[docs]def recv_msg(conn): + msg = [] + chunk = '' + + while '\n' not in chunk: + try: + chunk = conn.recv(1024) + except (OSError, socket.error), e: + if e[0] != errno.EINTR: + raise + # Ignore eintr errors + continue + + if chunk: + msg.append(chunk) + else: + # empty chunk = EOF + break + + msg = ''.join(msg).strip() + + # The message is formatted as follows: + # MESSAGE_TYPE|args|kwargs + # + # where MESSAGE_TYPE, args and kwargs are pickld and enoded in base64 + + def decode(item): + item = base64.b64decode(item).rstrip() + return cPickle.loads(item) + + decoded = map(decode, msg.split("|")) + + # decoded message + dmsg_type = decoded.pop(0) + dargs = list(decoded.pop(0)) # transforming touple into list + dkwargs = decoded.pop(0) + + return (dmsg_type, dargs, dkwargs) +
+
[docs]def send_reply(conn, reply): + encoded = base64.b64encode(cPickle.dumps(reply)) + conn.send("%s\n" % encoded) +
+
[docs]def get_options(): + usage = ("usage: %prog -S <socket-name> -L <ns-log> -D <enable-dump> -v ") + + parser = OptionParser(usage = usage) + + parser.add_option("-S", "--socket-name", dest="socket_name", + help = "Name for the unix socket used to interact with this process", + default = "tap.sock", type="str") + + parser.add_option("-L", "--ns-log", dest="ns_log", + help = "NS_LOG environmental variable to be set", + default = "", type="str") + + parser.add_option("-D", "--enable-dump", dest="enable_dump", + help = "Enable dumping the remote executed ns-3 commands to a script " + "in order to later reproduce and debug the experiment", + action = "store_true", + default = False) + + parser.add_option("-v", "--verbose", + help="Print debug output", + action="store_true", + dest="verbose", default=False) + + (options, args) = parser.parse_args() + + return (options.socket_name, options.verbose, options.ns_log, + options.enable_dump) +
+
[docs]def run_server(socket_name, level = logging.INFO, ns_log = None, + enable_dump = False): + + # Sets NS_LOG environmental variable for NS debugging + if ns_log: + os.environ["NS_LOG"] = ns_log + + ###### ns-3 wrapper instantiation + + ns3_wrapper = NS3Wrapper(loglevel=level, enable_dump = enable_dump) + + ns3_wrapper.logger.info("STARTING...") + + # create unix socket to receive instructions + sock = open_socket(socket_name) + sock.listen(0) + + # wait for messages to arrive and process them + stop = False + + while not stop: + conn, addr = sock.accept() + conn.settimeout(30) + + try: + (msg_type, args, kwargs) = recv_msg(conn) + except socket.timeout, e: + # Ingore time-out + close_socket(conn) + continue + + if not msg_type: + # Ignore - connection lost + close_socket(conn) + continue + + if msg_type == NS3WrapperMessage.SHUTDOWN: + stop = True + + try: + reply = handle_message(ns3_wrapper, msg_type, args, kwargs) + except: + import traceback + err = traceback.format_exc() + ns3_wrapper.logger.error(err) + close_socket(conn) + raise + + try: + send_reply(conn, reply) + except socket.error: + import traceback + err = traceback.format_exc() + ns3_wrapper.logger.error(err) + close_socket(conn) + raise + + close_socket(conn) + + close_socket(sock) + + ns3_wrapper.logger.info("EXITING...") +
+if __name__ == '__main__': + + (socket_name, verbose, ns_log, enable_dump) = get_options() + + ## configure logging + FORMAT = "%(asctime)s %(name)s %(levelname)-4s %(message)s" + level = logging.DEBUG if verbose else logging.INFO + + logging.basicConfig(format = FORMAT, level = level) + + ## Run the server + run_server(socket_name, level, ns_log, enable_dump) +
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3simulation.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3simulation.html new file mode 100644 index 00000000..49eaeec5 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3simulation.html @@ -0,0 +1,141 @@ + + + + + + + + nepi.resources.ns3.ns3simulation — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.ns3simulation

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+
[docs]class NS3Simulation(object): + @property +
[docs] def client(self): + return self._client +
+
[docs] def create(self, *args, **kwargs): + return self.client.create(*args, **kwargs) +
+
[docs] def factory(self, *args, **kwargs): + return self.client.factory(*args, **kwargs) +
+
[docs] def invoke(self, *args, **kwargs): + return self.client.invoke(*args, **kwargs) +
+
[docs] def ns3_set(self, *args, **kwargs): + return self.client.set(*args, **kwargs) +
+
[docs] def ns3_get(self, *args, **kwargs): + return self.client.get(*args, **kwargs) +
+
[docs] def flush(self, *args, **kwargs): + return self.client.flush(*args, **kwargs) +
+
[docs] def start(self, *args, **kwargs): + return self.client.start(*args, **kwargs) +
+
[docs] def stop(self, *args, **kwargs): + return self.client.stop(*args, **kwargs) +
+
[docs] def shutdown(self, *args, **kwargs): + return self.client.shutdown(*args, **kwargs) +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3wifichannel.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3wifichannel.html new file mode 100644 index 00000000..48b899fa --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3wifichannel.html @@ -0,0 +1,141 @@ + + + + + + + + nepi.resources.ns3.ns3wifichannel — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.ns3wifichannel

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.resource import clsinit_copy
+from nepi.resources.ns3.ns3base import NS3Base
+
+@clsinit_copy
+
[docs]class NS3BaseWifiChannel(NS3Base): + _rtype = "abstract::ns3::WifiChannel" + + @property +
[docs] def simulation(self): + return self.phys[0].device.node.simulation +
+ @property +
[docs] def phys(self): + from nepi.resources.ns3.ns3wifiphy import NS3BaseWifiPhy + phys = self.get_connected(NS3BaseWifiPhy.get_rtype()) + + if not phys: + msg = "Channel not connected to phy" + self.error(msg) + raise RuntimeError, msg + + return phys +
+ @property + def _rms_to_wait(self): + rms = set() + rms.add(self.simulation) + return rms + + def _connect_object(self): + pass +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3wifimac.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3wifimac.html new file mode 100644 index 00000000..3cc758e8 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3wifimac.html @@ -0,0 +1,169 @@ + + + + + + + + nepi.resources.ns3.ns3wifimac — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.ns3wifimac

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.resource import clsinit_copy
+from nepi.resources.ns3.ns3base import NS3Base
+from nepi.resources.ns3.ns3wifinetdevice import WIFI_STANDARDS
+
+@clsinit_copy
+
[docs]class NS3BaseWifiMac(NS3Base): + _rtype = "abstract::ns3::WifiMac" + + @classmethod + def _register_attributes(cls): + standard = Attribute("Standard", "Wireless standard", + default = "WIFI_PHY_STANDARD_80211a", + allowed = WIFI_STANDARDS.keys(), + type = Types.Enumerate, + flags = Flags.Design) + + cls._register_attribute(standard) + + @property +
[docs] def node(self): + return self.device.node +
+ @property +
[docs] def device(self): + from nepi.resources.ns3.ns3wifinetdevice import NS3BaseWifiNetDevice + devices = self.get_connected(NS3BaseWifiNetDevice.get_rtype()) + + if not devices: + msg = "WifiMac not connected to device" + self.error(msg) + raise RuntimeError, msg + + return devices[0] +
+ @property + def _rms_to_wait(self): + rms = set() + rms.add(self.device) + return rms + + def _connect_object(self): + device = self.device + if device.uuid not in self.connected: + self._connected.add(device.uuid) + + self.simulation.invoke(device.uuid, "SetMac", self.uuid) + + standard = self.get("Standard") + self.simulation.invoke(self.uuid, "ConfigureStandard", WIFI_STANDARDS[standard]) + + # Delayed configuration of MAC address + mac = device.get("mac") + if mac: + mac_uuid = self.simulation.create("Mac48Address", mac) + else: + mac_uuid = self.simulation.invoke("singleton::Mac48Address", "Allocate") + + self.simulation.invoke(self.uuid, "SetAddress", mac_uuid) +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3wifinetdevice.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3wifinetdevice.html new file mode 100644 index 00000000..9dc4d7c4 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3wifinetdevice.html @@ -0,0 +1,144 @@ + + + + + + + + nepi.resources.ns3.ns3wifinetdevice — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.ns3wifinetdevice

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.resource import clsinit_copy
+from nepi.resources.ns3.ns3netdevice import NS3BaseNetDevice
+
+WIFI_STANDARDS = dict({
+    "WIFI_PHY_STANDARD_holland": 5,
+    "WIFI_PHY_STANDARD_80211p_SCH": 7,
+    "WIFI_PHY_STANDARD_80211_5Mhz": 4,
+    "WIFI_PHY_UNKNOWN": 8,
+    "WIFI_PHY_STANDARD_80211_10Mhz": 3,
+    "WIFI_PHY_STANDARD_80211g": 2,
+    "WIFI_PHY_STANDARD_80211p_CCH": 6,
+    "WIFI_PHY_STANDARD_80211a": 0,
+    "WIFI_PHY_STANDARD_80211b": 1
+})
+
+@clsinit_copy
+
[docs]class NS3BaseWifiNetDevice(NS3BaseNetDevice): + _rtype = "abstract::ns3::WifiNetDevice" + + @property + def _rms_to_wait(self): + rms = set([self.node]) + return rms + + def _configure_mac_address(self): + # The wifimac is the one responsible for + # configuring the MAC address + pass + + def _connect_object(self): + node = self.node + if node and node.uuid not in self.connected: + self.simulation.invoke(node.uuid, "AddDevice", self.uuid) + self._connected.add(node.uuid) +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3wifiphy.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3wifiphy.html new file mode 100644 index 00000000..acff23b2 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3wifiphy.html @@ -0,0 +1,178 @@ + + + + + + + + nepi.resources.ns3.ns3wifiphy — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.ns3wifiphy

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.resource import clsinit_copy
+from nepi.resources.ns3.ns3base import NS3Base
+from nepi.resources.ns3.ns3wifinetdevice import WIFI_STANDARDS
+
+@clsinit_copy
+
[docs]class NS3BaseWifiPhy(NS3Base): + _rtype = "abstract::ns3::WifiPhy" + + @classmethod + def _register_attributes(cls): + standard = Attribute("Standard", "Wireless standard", + default = "WIFI_PHY_STANDARD_80211a", + allowed = WIFI_STANDARDS.keys(), + type = Types.Enumerate, + flags = Flags.Design) + + cls._register_attribute(standard) + + @property +
[docs] def node(self): + return self.device.node +
+ @property +
[docs] def device(self): + from nepi.resources.ns3.ns3wifinetdevice import NS3BaseWifiNetDevice + devices = self.get_connected(NS3BaseWifiNetDevice.get_rtype()) + + if not devices: + msg = "WifiPhy not connected to device" + self.error(msg) + raise RuntimeError, msg + + return devices[0] +
+ @property +
[docs] def channel(self): + from nepi.resources.ns3.ns3wifichannel import NS3BaseWifiChannel + channels = self.get_connected(NS3BaseWifiChannel.get_rtype()) + + if not channels: + msg = "WifiPhy not connected to channel" + self.error(msg) + raise RuntimeError, msg + + return channels[0] +
+ @property + def _rms_to_wait(self): + rms = set() + rms.add(self.device) + return rms + + def _connect_object(self): + device = self.device + if device.uuid not in self.connected: + self._connected.add(device.uuid) + + self.simulation.invoke(self.uuid, "SetMobility", self.node.uuid) + + standard = self.get("Standard") + self.simulation.invoke(self.uuid, "ConfigureStandard", WIFI_STANDARDS[standard]) + + self.simulation.invoke(self.uuid, "SetDevice", device.uuid) + + self.simulation.invoke(self.uuid, "SetChannel", self.channel.uuid) + + self.simulation.invoke(device.uuid, "SetPhy", self.uuid) +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3wifiremotestationmanager.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3wifiremotestationmanager.html new file mode 100644 index 00000000..edb85a3f --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3wifiremotestationmanager.html @@ -0,0 +1,145 @@ + + + + + + + + nepi.resources.ns3.ns3wifiremotestationmanager — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.ns3wifiremotestationmanager

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.resource import clsinit_copy
+from nepi.resources.ns3.ns3base import NS3Base
+from nepi.resources.ns3.ns3netdevice import NS3BaseNetDevice
+
+@clsinit_copy
+
[docs]class NS3BaseWifiRemoteStationManager(NS3Base): + _rtype = "abstract::ns3::WifiRemoteStationManager" + + @property +
[docs] def node(self): + return self.device.node +
+ @property +
[docs] def device(self): + from nepi.resources.ns3.ns3wifinetdevice import NS3BaseWifiNetDevice + devices = self.get_connected(NS3BaseWifiNetDevice.get_rtype()) + + if not devices: + msg = "WifiRemoteStationManager not connected to device" + self.error(msg) + raise RuntimeError, msg + + return devices[0] +
+ @property + def _rms_to_wait(self): + rms = set() + rms.add(self.device) + return rms + + def _connect_object(self): + device = self.device + if device.uuid not in self.connected: + self.simulation.invoke(device.uuid, "SetRemoteStationManager", self.uuid) + self._connected.add(device.uuid) +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3wrapper.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3wrapper.html new file mode 100644 index 00000000..6a5723b3 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3wrapper.html @@ -0,0 +1,795 @@ + + + + + + + + nepi.resources.ns3.ns3wrapper — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.ns3wrapper

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+import logging
+import os
+import sys
+import threading
+import time
+import uuid
+
+SINGLETON = "singleton::"
+SIMULATOR_UUID = "singleton::Simulator"
+CONFIG_UUID = "singleton::Config"
+GLOBAL_VALUE_UUID = "singleton::GlobalValue"
+IPV4_GLOBAL_ROUTING_HELPER_UUID = "singleton::Ipv4GlobalRoutingHelper"
+
+
[docs]def load_ns3_libraries(): + import ctypes + import re + + libdir = os.environ.get("NS3LIBRARIES") + + # Load the ns-3 modules shared libraries + if libdir: + files = os.listdir(libdir) + regex = re.compile("(.*\.so)$") + libs = [m.group(1) for filename in files for m in [regex.search(filename)] if m] + + initial_size = len(libs) + # Try to load the libraries in the right order by trial and error. + # Loop until all libraries are loaded. + while len(libs) > 0: + for lib in libs: + libfile = os.path.join(libdir, lib) + try: + ctypes.CDLL(libfile, ctypes.RTLD_GLOBAL) + libs.remove(lib) + except: + #import traceback + #err = traceback.format_exc() + #print err + pass + + # if did not load any libraries in the last iteration break + # to prevent infinit loop + if initial_size == len(libs): + raise RuntimeError("Imposible to load shared libraries %s" % str(libs)) + initial_size = len(libs) +
+
[docs]def load_ns3_module(): + load_ns3_libraries() + + # import the python bindings for the ns-3 modules + bindings = os.environ.get("NS3BINDINGS") + if bindings: + sys.path.append(bindings) + + import pkgutil + import imp + import ns + + # create a Python module to add all ns3 classes + ns3mod = imp.new_module("ns3") + sys.modules["ns3"] = ns3mod + + for importer, modname, ispkg in pkgutil.iter_modules(ns.__path__): + if modname in [ "visualizer" ]: + continue + + fullmodname = "ns.%s" % modname + module = __import__(fullmodname, globals(), locals(), ['*']) + + for sattr in dir(module): + if sattr.startswith("_"): + continue + + attr = getattr(module, sattr) + + # netanim.Config and lte.Config singleton overrides ns3::Config + if sattr == "Config" and modname in ['netanim', 'lte']: + sattr = "%s.%s" % (modname, sattr) + + setattr(ns3mod, sattr, attr) + + return ns3mod +
+
[docs]class NS3Wrapper(object): + def __init__(self, loglevel = logging.INFO, enable_dump = False): + super(NS3Wrapper, self).__init__() + # Thread used to run the simulation + self._simulation_thread = None + self._condition = None + + # True if Simulator::Run was invoked + self._started = False + + # holds reference to all C++ objects and variables in the simulation + self._objects = dict() + + # Logging + self._logger = logging.getLogger("ns3wrapper") + self._logger.setLevel(loglevel) + + ## NOTE that the reason to create a handler to the ns3 module, + # that is re-loaded each time a ns-3 wrapper is instantiated, + # is that else each unit test for the ns3wrapper class would need + # a separate file. Several ns3wrappers would be created in the + # same unit test (single process), leading to inchorences in the + # state of ns-3 global objects + # + # Handler to ns3 classes + self._ns3 = None + + # Collection of allowed ns3 classes + self._allowed_types = None + + # Object to dump instructions to reproduce and debug experiment + from ns3wrapper_debug import NS3WrapperDebuger + self._debuger = NS3WrapperDebuger(enabled = enable_dump) + + @property +
[docs] def debuger(self): + return self._debuger +
+ @property +
[docs] def ns3(self): + if not self._ns3: + # load ns-3 libraries and bindings + self._ns3 = load_ns3_module() + + return self._ns3 +
+ @property +
[docs] def allowed_types(self): + if not self._allowed_types: + self._allowed_types = set() + type_id = self.ns3.TypeId() + + tid_count = type_id.GetRegisteredN() + base = type_id.LookupByName("ns3::Object") + + for i in xrange(tid_count): + tid = type_id.GetRegistered(i) + + if tid.MustHideFromDocumentation() or \ + not tid.HasConstructor() or \ + not tid.IsChildOf(base): + continue + + type_name = tid.GetName() + self._allowed_types.add(type_name) + + return self._allowed_types +
+ @property +
[docs] def logger(self): + return self._logger +
+ @property +
[docs] def is_running(self): + return self.is_started and not self.ns3.Simulator.IsFinished() +
+ @property +
[docs] def is_started(self): + if not self._started: + now = self.ns3.Simulator.Now() + if not now.IsZero(): + self._started = True + + return self._started +
+ @property +
[docs] def is_finished(self): + return self.ns3.Simulator.IsFinished() +
+
[docs] def make_uuid(self): + return "uuid%s" % uuid.uuid4() +
+
[docs] def get_object(self, uuid): + return self._objects.get(uuid) +
+
[docs] def factory(self, type_name, **kwargs): + """ This method should be used to construct ns-3 objects + that have a TypeId and related introspection information """ + + if type_name not in self.allowed_types: + msg = "Type %s not supported" % (type_name) + self.logger.error(msg) + + uuid = self.make_uuid() + + ### DEBUG + self.logger.debug("FACTORY %s( %s )" % (type_name, str(kwargs))) + + ### DUMP + self.debuger.dump_factory(uuid, type_name, kwargs) + + factory = self.ns3.ObjectFactory() + factory.SetTypeId(type_name) + + for name, value in kwargs.iteritems(): + ns3_value = self._attr_from_string_to_ns3_value(type_name, name, value) + factory.Set(name, ns3_value) + + obj = factory.Create() + + self._objects[uuid] = obj + + ### DEBUG + self.logger.debug("RET FACTORY ( uuid %s ) %s = %s( %s )" % ( + str(uuid), str(obj), type_name, str(kwargs))) + + return uuid +
+
[docs] def create(self, clazzname, *args): + """ This method should be used to construct ns-3 objects that + do not have a TypeId (e.g. Values) """ + + if not hasattr(self.ns3, clazzname): + msg = "Type %s not supported" % (clazzname) + self.logger.error(msg) + + uuid = self.make_uuid() + + ### DEBUG + self.logger.debug("CREATE %s( %s )" % (clazzname, str(args))) + + ### DUMP + self.debuger.dump_create(uuid, clazzname, args) + + clazz = getattr(self.ns3, clazzname) + + # arguments starting with 'uuid' identify ns-3 C++ + # objects and must be replaced by the actual object + realargs = self.replace_args(args) + + obj = clazz(*realargs) + + self._objects[uuid] = obj + + ### DEBUG + self.logger.debug("RET CREATE ( uuid %s ) %s = %s( %s )" % (str(uuid), + str(obj), clazzname, str(args))) + + return uuid +
+
[docs] def invoke(self, uuid, operation, *args, **kwargs): + ### DEBUG + self.logger.debug("INVOKE %s -> %s( %s, %s ) " % ( + uuid, operation, str(args), str(kwargs))) + ######## + + result = None + newuuid = None + + if operation == "isRunning": + result = self.is_running + + elif operation == "isStarted": + result = self.is_started + + elif operation == "isFinished": + result = self.is_finished + + elif operation == "isAppRunning": + result = self._is_app_running(uuid) + + elif operation == "isAppStarted": + result = self._is_app_started(uuid) + + elif operation == "recvFD": + ### passFD operation binds to a different random socket + ### en every execution, so the socket name that could be + ### dumped to the debug script using dump_invoke is + ### not be valid accross debug executions. + result = self._recv_fd(uuid, *args, **kwargs) + + elif operation == "addStaticRoute": + result = self._add_static_route(uuid, *args) + + ### DUMP - result is static, so will be dumped as plain text + self.debuger.dump_invoke(result, uuid, operation, args, kwargs) + + elif operation == "retrieveObject": + result = self._retrieve_object(uuid, *args, **kwargs) + + ### DUMP - result is static, so will be dumped as plain text + self.debuger.dump_invoke(result, uuid, operation, args, kwargs) + + else: + newuuid = self.make_uuid() + + ### DUMP - result is a uuid that encoded an dynamically generated + ### object + self.debuger.dump_invoke(newuuid, uuid, operation, args, kwargs) + + if uuid.startswith(SINGLETON): + obj = self._singleton(uuid) + else: + obj = self.get_object(uuid) + + method = getattr(obj, operation) + + # arguments starting with 'uuid' identify ns-3 C++ + # objects and must be replaced by the actual object + realargs = self.replace_args(args) + realkwargs = self.replace_kwargs(kwargs) + + result = method(*realargs, **realkwargs) + + # If the result is an object (not a base value), + # then keep track of the object a return the object + # reference (newuuid) + if not (result is None or type(result) in [ + bool, float, long, str, int]): + self._objects[newuuid] = result + result = newuuid + + ### DEBUG + self.logger.debug("RET INVOKE %s%s = %s -> %s(%s, %s) " % ( + "(uuid %s) " % str(newuuid) if newuuid else "", str(result), uuid, + operation, str(args), str(kwargs))) + ######## + + return result +
+ def _set_attr(self, obj, name, ns3_value): + obj.SetAttribute(name, ns3_value) + +
[docs] def set(self, uuid, name, value): + ### DEBUG + self.logger.debug("SET %s %s %s" % (uuid, name, str(value))) + + ### DUMP + self.debuger.dump_set(uuid, name, value) + + obj = self.get_object(uuid) + type_name = obj.GetInstanceTypeId().GetName() + ns3_value = self._attr_from_string_to_ns3_value(type_name, name, value) + + # If the Simulation thread is not running, + # then there will be no thread-safety problems + # in changing the value of an attribute directly. + # However, if the simulation is running we need + # to set the value by scheduling an event, else + # we risk to corrupt the state of the + # simulation. + + event_executed = [False] + + if self.is_running: + # schedule the event in the Simulator + self._schedule_event(self._condition, event_executed, + self._set_attr, obj, name, ns3_value) + + if not event_executed[0]: + self._set_attr(obj, name, ns3_value) + + ### DEBUG + self.logger.debug("RET SET %s = %s -> set(%s, %s)" % (str(value), uuid, name, + str(value))) + + return value +
+ def _get_attr(self, obj, name, ns3_value): + obj.GetAttribute(name, ns3_value) + +
[docs] def get(self, uuid, name): + ### DEBUG + self.logger.debug("GET %s %s" % (uuid, name)) + + ### DUMP + self.debuger.dump_get(uuid, name) + + obj = self.get_object(uuid) + type_name = obj.GetInstanceTypeId().GetName() + ns3_value = self._create_attr_ns3_value(type_name, name) + + event_executed = [False] + + if self.is_running: + # schedule the event in the Simulator + self._schedule_event(self._condition, event_executed, + self._get_attr, obj, name, ns3_value) + + if not event_executed[0]: + self._get_attr(obj, name, ns3_value) + + result = self._attr_from_ns3_value_to_string(type_name, name, ns3_value) + + ### DEBUG + self.logger.debug("RET GET %s = %s -> get(%s)" % (str(result), uuid, name)) + + return result +
+
[docs] def start(self): + ### DUMP + self.debuger.dump_start() + + # Launch the simulator thread and Start the + # simulator in that thread + self._condition = threading.Condition() + self._simulator_thread = threading.Thread( + target = self._simulator_run, + args = [self._condition]) + self._simulator_thread.setDaemon(True) + self._simulator_thread.start() + + ### DEBUG + self.logger.debug("START") +
+
[docs] def stop(self, time = None): + ### DUMP + self.debuger.dump_stop(time=time) + + if time is None: + self.ns3.Simulator.Stop() + else: + self.ns3.Simulator.Stop(self.ns3.Time(time)) + + ### DEBUG + self.logger.debug("STOP time=%s" % str(time)) +
+
[docs] def shutdown(self): + ### DUMP + self.debuger.dump_shutdown() + + while not self.ns3.Simulator.IsFinished(): + #self.logger.debug("Waiting for simulation to finish") + time.sleep(0.5) + + if self._simulator_thread: + self._simulator_thread.join() + + self.ns3.Simulator.Destroy() + + # Remove all references to ns-3 objects + self._objects.clear() + + sys.stdout.flush() + sys.stderr.flush() + + ### DEBUG + self.logger.debug("SHUTDOWN") +
+ def _simulator_run(self, condition): + # Run simulation + self.ns3.Simulator.Run() + # Signal condition to indicate simulation ended and + # notify waiting threads + condition.acquire() + condition.notifyAll() + condition.release() + + def _schedule_event(self, condition, event_executed, func, *args): + """ Schedules event on running simulation, and wait until + event is executed""" + + def execute_event(contextId, condition, event_executed, func, *args): + try: + func(*args) + event_executed[0] = True + finally: + # notify condition indicating event was executed + condition.acquire() + condition.notifyAll() + condition.release() + + # contextId is defined as general context + contextId = long(0xffffffff) + + # delay 0 means that the event is expected to execute inmediately + delay = self.ns3.Seconds(0) + + # Mark event as not executed + event_executed[0] = False + + condition.acquire() + try: + self.ns3.Simulator.ScheduleWithContext(contextId, delay, execute_event, + condition, event_executed, func, *args) + if not self.ns3.Simulator.IsFinished(): + condition.wait() + finally: + condition.release() + + def _create_attr_ns3_value(self, type_name, name): + TypeId = self.ns3.TypeId() + tid = TypeId.LookupByName(type_name) + info = TypeId.AttributeInformation() + if not tid.LookupAttributeByName(name, info): + msg = "TypeId %s has no attribute %s" % (type_name, name) + self.logger.error(msg) + + checker = info.checker + ns3_value = checker.Create() + return ns3_value + + def _attr_from_ns3_value_to_string(self, type_name, name, ns3_value): + TypeId = self.ns3.TypeId() + tid = TypeId.LookupByName(type_name) + info = TypeId.AttributeInformation() + if not tid.LookupAttributeByName(name, info): + msg = "TypeId %s has no attribute %s" % (type_name, name) + self.logger.error(msg) + + checker = info.checker + value = ns3_value.SerializeToString(checker) + + type_name = checker.GetValueTypeName() + if type_name in ["ns3::UintegerValue", "ns3::IntegerValue"]: + return int(value) + if type_name == "ns3::DoubleValue": + return float(value) + if type_name == "ns3::BooleanValue": + return value == "true" + + return value + + def _attr_from_string_to_ns3_value(self, type_name, name, value): + TypeId = self.ns3.TypeId() + tid = TypeId.LookupByName(type_name) + info = TypeId.AttributeInformation() + if not tid.LookupAttributeByName(name, info): + msg = "TypeId %s has no attribute %s" % (type_name, name) + self.logger.error(msg) + + str_value = str(value) + if isinstance(value, bool): + str_value = str_value.lower() + + checker = info.checker + ns3_value = checker.Create() + ns3_value.DeserializeFromString(str_value, checker) + return ns3_value + + # singletons are identified as "ns3::ClassName" + def _singleton(self, ident): + if not ident.startswith(SINGLETON): + return None + + clazzname = ident[ident.find("::")+2:] + if not hasattr(self.ns3, clazzname): + msg = "Type %s not supported" % (clazzname) + self.logger.error(msg) + + return getattr(self.ns3, clazzname) + + # replace uuids and singleton references for the real objects +
[docs] def replace_args(self, args): + realargs = [self.get_object(arg) if \ + str(arg).startswith("uuid") else arg for arg in args] + + realargs = [self._singleton(arg) if \ + str(arg).startswith(SINGLETON) else arg for arg in realargs] + + return realargs + + # replace uuids and singleton references for the real objects
+
[docs] def replace_kwargs(self, kwargs): + realkwargs = dict([(k, self.get_object(v) \ + if str(v).startswith("uuid") else v) \ + for k,v in kwargs.iteritems()]) + + realkwargs = dict([(k, self._singleton(v) \ + if str(v).startswith(SINGLETON) else v )\ + for k, v in realkwargs.iteritems()]) + + return realkwargs +
+ def _is_app_running(self, uuid): + now = self.ns3.Simulator.Now() + if now.IsZero(): + return False + + if self.ns3.Simulator.IsFinished(): + return False + + app = self.get_object(uuid) + stop_time_value = self.ns3.TimeValue() + app.GetAttribute("StopTime", stop_time_value) + stop_time = stop_time_value.Get() + + start_time_value = self.ns3.TimeValue() + app.GetAttribute("StartTime", start_time_value) + start_time = start_time_value.Get() + + if now.Compare(start_time) >= 0: + if stop_time.IsZero() or now.Compare(stop_time) < 0: + return True + + return False + + def _is_app_started(self, uuid): + return self._is_app_running(uuid) or self.is_finished + + def _add_static_route(self, ipv4_uuid, network, prefix, nexthop): + ipv4 = self.get_object(ipv4_uuid) + + list_routing = ipv4.GetRoutingProtocol() + (static_routing, priority) = list_routing.GetRoutingProtocol(0) + + ifindex = self._find_ifindex(ipv4, nexthop) + if ifindex == -1: + return False + + nexthop = self.ns3.Ipv4Address(nexthop) + + if network in ["0.0.0.0", "0", None]: + # Default route: 0.0.0.0/0 + static_routing.SetDefaultRoute(nexthop, ifindex) + else: + mask = self.ns3.Ipv4Mask("/%s" % prefix) + network = self.ns3.Ipv4Address(network) + + if prefix == 32: + # Host route: x.y.z.w/32 + static_routing.AddHostRouteTo(network, nexthop, ifindex) + else: + # Network route: x.y.z.w/n + static_routing.AddNetworkRouteTo(network, mask, nexthop, + ifindex) + return True + + def _find_ifindex(self, ipv4, nexthop): + ifindex = -1 + + nexthop = self.ns3.Ipv4Address(nexthop) + + # For all the interfaces registered with the ipv4 object, find + # the one that matches the network of the nexthop + nifaces = ipv4.GetNInterfaces() + for ifidx in xrange(nifaces): + iface = ipv4.GetInterface(ifidx) + naddress = iface.GetNAddresses() + for addridx in xrange(naddress): + ifaddr = iface.GetAddress(addridx) + ifmask = ifaddr.GetMask() + + ifindex = ipv4.GetInterfaceForPrefix(nexthop, ifmask) + + if ifindex == ifidx: + return ifindex + return ifindex + + def _retrieve_object(self, uuid, typeid, search = False): + obj = self.get_object(uuid) + + type_id = self.ns3.TypeId() + tid = type_id.LookupByName(typeid) + nobj = obj.GetObject(tid) + + newuuid = None + if search: + # search object + for ouuid, oobj in self._objects.iteritems(): + if nobj == oobj: + newuuid = ouuid + break + else: + newuuid = self.make_uuid() + self._objects[newuuid] = nobj + + return newuuid + + def _recv_fd(self, uuid): + """ Waits on a local address to receive a file descriptor + from a local process. The file descriptor is associated + to a FdNetDevice to stablish communication between the + simulation and what ever process writes on that file descriptor + """ + + def recvfd(sock, fdnd): + (fd, msg) = passfd.recvfd(sock) + # Store a reference to the endpoint to keep the socket alive + fdnd.SetFileDescriptor(fd) + + import passfd + import socket + sock = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM) + sock.bind("") + address = sock.getsockname() + + fdnd = self.get_object(uuid) + t = threading.Thread(target=recvfd, args=(sock,fdnd)) + t.start() + + return address +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3wrapper_debug.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3wrapper_debug.html new file mode 100644 index 00000000..fe27b391 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/ns3wrapper_debug.html @@ -0,0 +1,271 @@ + + + + + + + + nepi.resources.ns3.ns3wrapper_debug — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.ns3wrapper_debug

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+
+############ METHODS DEBUG NS3WRAPPER EXECUTION
+##
+## The ns3wrapper works in ditributed mode, receiving instructions from
+## a remote client. This makes it very hard to debug scripting errors 
+## in the client side. To simplify error debugging, when set to debug mode,
+## the ns3wrapper dumps every executed line to a script that can be then
+## executed locally to reproduce and debug the experiment.
+##
+###########################################################################
+
+import logging
+
+SINGLETON = "singleton::"
+
+
[docs]class NS3WrapperDebuger(object): + def __init__(self, enabled): + super(NS3WrapperDebuger, self).__init__() + self._enabled = enabled + self._script_path = "debug.py" + + self.dump_header() + + @property +
[docs] def enabled(self): + return self._enabled +
+ @property +
[docs] def script_path(self): + return self._script_path +
+
[docs] def dump_to_script(self, command): + f = open(self.script_path, "a") + f.write("%s" % command) + f.close() +
+
[docs] def dump_header(self): + if not self.enabled: + return + + header = """ +from ns3wrapper import NS3Wrapper + +wrapper = NS3Wrapper() + +""" + self.dump_to_script(header) +
+
[docs] def dump_factory(self, uuid, type_name, kwargs): + if not self.enabled: + return + + command = ("kwargs = %(kwargs)s\n" + "%(uuid)s = wrapper.factory(%(type_name)s, **kwargs)\n\n" + ) % dict({ + "uuid": self.format_value(uuid), + "type_name": self.format_value(type_name), + "kwargs": self.format_kwargs(kwargs) + }) + + self.dump_to_script(command) +
+
[docs] def dump_create(self, uuid, clazzname, args): + if not self.enabled: + return + + command = ("args = %(args)s\n" + "%(uuid)s = wrapper.create(%(clazzname)s, *args)\n\n" + ) % dict({ + "uuid": self.format_value(uuid), + "clazzname": self.format_value(clazzname), + "args": self.format_args(args), + }) + + self.dump_to_script(command) +
+
[docs] def dump_invoke(self, newuuid, uuid, operation, args, kwargs): + if not self.enabled: + return + + command = ("args = %(args)s\n" + "kwargs = %(kwargs)s\n" + "%(newuuid)s = wrapper.invoke(%(uuid)s, %(operation)s, *args, **kwargs)\n\n" + ) % dict({ + "newuuid": self.format_value(newuuid) if newuuid else "nothing", + "uuid": self.format_value(uuid), + "operation": self.format_value(operation), + "args": self.format_args(args), + "kwargs": self.format_kwargs(kwargs), + }) + + self.dump_to_script(command) +
+
[docs] def dump_set(self, uuid, name, value): + if not self.enabled: + return + + command = ("wrapper.set(%(uuid)s, %(name)s, %(value)s)\n\n" + ) % dict({ + "uuid": self.format_value(uuid), + "name": self.format_value(name), + "value": self.format_value(value), + }) + + self.dump_to_script(command) +
+
[docs] def dump_get(self, uuid, name): + if not self.enabled: + return + + command = ("wrapper.get(%(uuid)s, %(name)s)\n\n" + ) % dict({ + "uuid": self.format_value(uuid), + "name": self.format_value(name), + }) + + self.dump_to_script(command) +
+
[docs] def dump_start(self): + if not self.enabled: + return + + command = "wrapper.start()\n\n" + self.dump_to_script(command) +
+
[docs] def dump_stop(self, time = None): + if not self.enabled: + return + + command = ("wrapper.stop(time=%(time)s)\n\n" + ) % dict({ + "time": self.format_value(time) if time else "None", + }) + + self.dump_to_script(command) +
+
[docs] def dump_shutdown(self): + if not self.enabled: + return + + command = "wrapper.shutdown()\n\n" + self.dump_to_script(command) +
+
[docs] def format_value(self, value): + if isinstance(value, str) and value.startswith("uuid"): + return value.replace("-", "") + + import pprint + return pprint.pformat(value) +
+
[docs] def format_args(self, args): + fargs = map(self.format_value, args) + return "[%s]" % ",".join(fargs) +
+
[docs] def format_kwargs(self, kwargs): + fkwargs = map(lambda (k,w): + "%s: %s" % (self.format_value(k), self.format_value(w)), + kwargs.iteritems()) + + return "dict({%s})" % ",".join(fkwargs) +
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/ns3/resource_manager_generator.html b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/resource_manager_generator.html new file mode 100644 index 00000000..b47fabae --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/ns3/resource_manager_generator.html @@ -0,0 +1,330 @@ + + + + + + + + nepi.resources.ns3.resource_manager_generator — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.ns3.resource_manager_generator

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+#
+# Instructions to automatically generate ns-3 ResourceManagers
+# 
+# Configure the ns-3 enviorment (e.g.):
+#
+#  export PYTHONPATH=~/.nepi/nepi-usr/bin/ns-3/ns-3.20/optimized/build/lib/python/site-packages
+#  export LD_LIBRARY_PATH=~/.nepi/nepi-usr/bin/ns-3/ns-3.20/optimized/build/lib
+#
+# Run the RM generator:
+#
+#  PYTHONPATH=$PYTHONPATH:~/repos/nepi/src python src/nepi/resources/ns3/resource_manager_generator.py
+#
+
+# Force the load of ns3 libraries
+from nepi.resources.ns3.ns3wrapper import load_ns3_module
+
+import os
+import re
+
+adapted_types = ["ns3::Node",
+        "ns3::Icmpv4L4Protocol",
+        "ns3::ArpL3Protocol",
+        "ns3::Ipv4L3Protocol",
+        "ns3::PropagationLossModel",
+        "ns3::MobilityModel",
+        "ns3::PropagationDelayModel",
+        "ns3::WifiRemoteStationManager",
+        "ns3::WifiNetDevice",
+        "ns3::WifiChannel",
+        "ns3::WifiPhy",
+        "ns3::WifiMac",
+        "ns3::ErrorModel",
+        "ns3::ErrorRateModel",
+        "ns3::Application", 
+        "ns3::FdNetDevice",
+        #"ns3::DceApplication", 
+        "ns3::NetDevice",
+        "ns3::Channel",
+        "ns3::Queue"]
+
+base_types = ["ns3::IpL4Protocol"]
+
+
[docs]def select_base_class(ns3, tid): + base_class_import = None + base_class = None + + rtype = tid.GetName() + + type_id = ns3.TypeId() + + for type_name in adapted_types: + tid_base = type_id.LookupByName(type_name) + if type_name == rtype or tid.IsChildOf(tid_base): + base_class = "NS3Base" + type_name.replace("ns3::", "") + base_module = "ns3" + type_name.replace("ns3::", "").lower() + base_class_import = "from nepi.resources.ns3.%s import %s " % ( + base_module, base_class) + return (base_class_import, base_class) + + base_class_import = "from nepi.resources.ns3.ns3base import NS3Base" + base_class = "NS3Base" + + for type_name in base_types: + tid_base = type_id.LookupByName(type_name) + if type_name == rtype or tid.IsChildOf(tid_base): + return (base_class_import, base_class) + + return (None, None) +
+
[docs]def create_ns3_rms(): + ns3 = load_ns3_module() + + type_id = ns3.TypeId() + + tid_count = type_id.GetRegisteredN() + base = type_id.LookupByName("ns3::Object") + + # Create a .py file using the ns-3 RM template for each ns-3 TypeId + for i in xrange(tid_count): + tid = type_id.GetRegistered(i) + + (base_class_import, base_class) = select_base_class(ns3, tid) + if not base_class: + continue + + if tid.MustHideFromDocumentation() or \ + not tid.HasConstructor() or \ + not tid.IsChildOf(base): + continue + + attributes = template_attributes(ns3, tid) + traces = template_traces(ns3, tid) + ptid = tid + while ptid.HasParent(): + ptid = ptid.GetParent() + attributes += template_attributes(ns3, ptid) + traces += template_traces(ns3, ptid) + + attributes = "\n" + attributes if attributes else "pass" + traces = "\n" + traces if traces else "pass" + + category = tid.GetGroupName() + + rtype = tid.GetName() + classname = rtype.replace("ns3::", "NS3").replace("::","") + uncamm_rtype = re.sub('([a-z])([A-Z])', r'\1-\2', rtype).lower() + short_rtype = uncamm_rtype.replace("::","-") + + d = os.path.dirname(os.path.realpath(__file__)) + ftemp = open(os.path.join(d, "templates", "resource_manager_template.txt"), "r") + template = ftemp.read() + ftemp.close() + + template = template. \ + replace("<CLASS_NAME>", classname). \ + replace("<RTYPE>", rtype). \ + replace("<ATTRIBUTES>", attributes). \ + replace("<TRACES>", traces). \ + replace("<BASE_CLASS_IMPORT>", base_class_import). \ + replace("<BASE_CLASS>", base_class). \ + replace("<SHORT-RTYPE>", short_rtype) + + fname = uncamm_rtype.replace('ns3::', ''). \ + replace('::', ''). \ + replace("-","_").lower() + ".py" + + f = open(os.path.join(d, "classes", fname), "w") + print os.path.join(d, fname) + print template + f.write(template) + f.close() +
+
[docs]def template_attributes(ns3, tid): + d = os.path.dirname(os.path.realpath(__file__)) + ftemp = open(os.path.join(d, "templates", "attribute_template.txt"), "r") + template = ftemp.read() + ftemp.close() + + attributes = "" + + attr_count = tid.GetAttributeN() + for i in xrange(attr_count): + attr_info = tid.GetAttribute(i) + if not attr_info.accessor.HasGetter(): + continue + + attr_flags = "Flags.Reserved" + flags = attr_info.flags + if (flags & ns3.TypeId.ATTR_CONSTRUCT) == ns3.TypeId.ATTR_CONSTRUCT: + attr_flags += " | Flags.Construct" + else: + if (flags & ns3.TypeId.ATTR_GET) != ns3.TypeId.ATTR_GET: + attr_flags += " | Flags.NoRead" + elif (flags & ns3.TypeId.ATTR_SET) != ns3.TypeId.ATTR_SET: + attr_flags += " | Flags.NoWrite" + + attr_name = attr_info.name + checker = attr_info.checker + attr_help = attr_info.help.replace('"', '\\"').replace("'", "\\'") + value = attr_info.initialValue + attr_value = value.SerializeToString(checker) + attr_allowed = "None" + attr_range = "None" + attr_type = "Types.String" + + if isinstance(value, ns3.ObjectVectorValue): + continue + elif isinstance(value, ns3.PointerValue): + continue + elif isinstance(value, ns3.WaypointValue): + continue + elif isinstance(value, ns3.BooleanValue): + attr_type = "Types.Bool" + attr_value = "True" if attr_value == "true" else "False" + elif isinstance(value, ns3.EnumValue): + attr_type = "Types.Enumerate" + allowed = checker.GetUnderlyingTypeInformation().split("|") + attr_allowed = "[%s]" % ",".join(map(lambda x: "\"%s\"" % x, allowed)) + elif isinstance(value, ns3.DoubleValue): + attr_type = "Types.Double" + # TODO: range + elif isinstance(value, ns3.UintegerValue): + attr_type = "Types.Integer" + # TODO: range + + attr_id = "attr_" + attr_name.lower().replace("-", "_") + attributes += template.replace("<ATTR_ID>", attr_id) \ + .replace("<ATTR_NAME>", attr_name) \ + .replace("<ATTR_HELP>", attr_help) \ + .replace("<ATTR_TYPE>", attr_type) \ + .replace("<ATTR_DEFAULT>", attr_value) \ + .replace("<ATTR_ALLOWED>", attr_allowed) \ + .replace("<ATTR_RANGE>", attr_range) \ + .replace("<ATTR_FLAGS>", attr_flags) + + return attributes +
+
[docs]def template_traces(ns3, tid): + d = os.path.dirname(os.path.realpath(__file__)) + ftemp = open(os.path.join(d, "templates", "trace_template.txt"), "r") + template = ftemp.read() + ftemp.close() + + traces = "" + + trace_count = tid.GetTraceSourceN() + for i in xrange(trace_count): + trace_info = tid.GetTraceSource(i) + trace_name = trace_info.name + trace_help = trace_info.help.replace('"', '\\"').replace("'", "\\'") + + trace_id = trace_name.lower() + traces += template.replace("<TRACE_ID>", trace_id) \ + .replace("<TRACE_NAME>", trace_name) \ + .replace("<TRACE_HELP>", trace_help) + + return traces +
+if __name__ == "__main__": + create_ns3_rms() +
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/omf/application.html b/doc/sphinx/_build/html/_modules/nepi/resources/omf/application.html new file mode 100644 index 00000000..d5e68655 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/omf/application.html @@ -0,0 +1,510 @@ + + + + + + + + nepi.resources.omf.application — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.omf.application

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+#         Julien Tribino <julien.tribino@inria.fr>
+
+import os
+
+from nepi.util.timefuncs import tnow
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.execution.trace import Trace, TraceAttr
+from nepi.execution.attribute import Attribute, Flags 
+from nepi.resources.omf.omf_resource import ResourceGateway, OMFResource
+from nepi.resources.omf.node import OMFNode, confirmation_counter, reschedule_check
+from nepi.resources.omf.omf_api_factory import OMFAPIFactory
+
+from nepi.util import sshfuncs
+
+@clsinit_copy
+
[docs]class OMFApplication(OMFResource): + """ + .. class:: Class Args : + + :param ec: The Experiment controller + :type ec: ExperimentController + :param guid: guid of the RM + :type guid: int + + """ + _rtype = "omf::Application" + _authorized_connections = ["omf::Node", "wilabt::sfa::Node"] + + @classmethod + def _register_attributes(cls): + """ Register the attributes of an OMF application + + """ + command = Attribute("command", "Command to execute") + env = Attribute("env", "Environnement variable of the application") + + # For OMF 5: + appid = Attribute("appid", "Name of the application") + stdin = Attribute("stdin", "Input of the application", default = "") + sources = Attribute("sources", "Sources of the application", + flags = Flags.Design) + sshuser = Attribute("sshUser", "user to connect with ssh", + flags = Flags.Design) + sshkey = Attribute("sshKey", "key to use for ssh", + flags = Flags.Design) + + cls._register_attribute(appid) + cls._register_attribute(command) + cls._register_attribute(env) + cls._register_attribute(stdin) + cls._register_attribute(sources) + cls._register_attribute(sshuser) + cls._register_attribute(sshkey) + + def __init__(self, ec, guid): + """ + :param ec: The Experiment controller + :type ec: ExperimentController + :param guid: guid of the RM + :type guid: int + :param creds: Credentials to communicate with the rm (XmppClient for OMF) + :type creds: dict + + """ + super(OMFApplication, self).__init__(ec, guid) + + self.set('command', "") + self.set('appid', "") + self._path= "" + self._args = "" + self.set('env', "") + + self._node = None + + self._omf_api = None + self._topic_app = None + self.create_id = None + self._create_cnt = 0 + self._start_cnt = 0 + self.release_id = None + self._release_cnt = 0 + + # For performance tests + self.begin_deploy_time = None + self.begin_start_time = None + self.begin_release_time = None + self.dperf = True + self.sperf = True + self.rperf = True + + self.add_set_hook() + + def _init_command(self): + comm = self.get('command').split(' ') + self._path= comm[0] + if len(comm)>1: + self._args = ' '.join(comm[1:]) + + @property +
[docs] def exp_id(self): + return self.ec.exp_id +
+ @property +
[docs] def node(self): + rm_list = self.get_connected(OMFNode.get_rtype()) + if rm_list: return rm_list[0] + return None +
+
[docs] def stdin_hook(self, old_value, new_value): + """ Set a hook to the stdin attribute in order to send a message at each time + the value of this parameter is changed. Used ofr OMF 5.4 only + + """ + self._omf_api.send_stdin(self.node.get('hostname'), new_value, self.get('appid')) + return new_value +
+
[docs] def add_set_hook(self): + """ Initialize the hooks for OMF 5.4 only + + """ + attr = self._attrs["stdin"] + attr.set_hook = self.stdin_hook +
+
[docs] def valid_connection(self, guid): + """ Check if the connection with the guid in parameter is possible. + Only meaningful connections are allowed. + + :param guid: Guid of RM it will be connected + :type guid: int + :rtype: Boolean + + """ + rm = self.ec.get_resource(guid) + if rm.get_rtype() not in self._authorized_connections: + msg = ("Connection between %s %s and %s %s refused: " + "An Application can be connected only to a Node" ) % \ + (self.get_rtype(), self._guid, rm.get_rtype(), guid) + self.debug(msg) + + return False + + elif len(self.connections) != 0 : + msg = ("Connection between %s %s and %s %s refused: " + "This Application is already connected" ) % \ + (self.get_rtype(), self._guid, rm.get_rtype(), guid) + self.debug(msg) + + return False + + else : + msg = "Connection between %s %s and %s %s accepted" % ( + self.get_rtype(), self._guid, rm.get_rtype(), guid) + self.debug(msg) + + return True +
+
[docs] def do_deploy(self): + """ Deploy the RM. It means nothing special for an application + for now (later it will be upload sources, ...) + It becomes DEPLOYED after the topic for the application has been created + + """ + if not self.node or self.node.state < ResourceState.READY: + self.debug("---- RESCHEDULING DEPLOY ---- node state %s " + % self.node.state ) + self.ec.schedule(self.reschedule_delay, self.deploy) + return + + ## For performance test + if self.dperf: + self.begin_deploy_time = tnow() + self.dperf = False + + self._init_command() + + self.set('xmppUser',self.node.get('xmppUser')) + self.set('xmppServer',self.node.get('xmppServer')) + self.set('xmppPort',self.node.get('xmppPort')) + self.set('xmppPassword',self.node.get('xmppPassword')) + self.set('version',self.node.get('version')) + + if not self.get('xmppServer'): + msg = "XmppServer is not initialzed. XMPP Connections impossible" + self.error(msg) + raise RuntimeError, msg + + if not (self.get('xmppUser') or self.get('xmppPort') + or self.get('xmppPassword')): + msg = "Credentials are not all initialzed. Default values will be used" + self.warn(msg) + + if not self.get('command') : + msg = "Application's Command is not initialized" + self.error(msg) + raise RuntimeError, msg + + if not self._omf_api : + self._omf_api = OMFAPIFactory.get_api(self.get('version'), + self.get('xmppServer'), self.get('xmppUser'), self.get('xmppPort'), + self.get('xmppPassword'), exp_id = self.exp_id) + + if self.get('version') == "5": + + self.begin_deploy_time = tnow() + + if self.get('sources'): + gateway = ResourceGateway.AMtoGateway[self.get('xmppServer')] + user = self.get('sshUser') or self.get('xmppUser') + dst = user + "@"+ gateway + ":" + (out, err), proc = sshfuncs.rcopy(self.get('sources'), dst) + else : + # For OMF 6 : + if not self.create_id: + props = {} + if self.get('command'): + props['application:binary_path'] = self.get('command') + props['application:hrn'] = self.get('command') + props['application:membership'] = self._topic_app + props['application:type'] = "application" + + self.create_id = os.urandom(16).encode('hex') + self._omf_api.frcp_create( self.create_id, self.node.get('hostname'), "application", props = props) + + if self._create_cnt > confirmation_counter: + msg = "Couldn't retrieve the confirmation of the creation" + self.error(msg) + raise RuntimeError, msg + + uid = self.check_deploy(self.create_id) + if not uid: + self._create_cnt +=1 + self.ec.schedule(reschedule_check, self.deploy) + return + + self._topic_app = uid + self._omf_api.enroll_topic(self._topic_app) + + super(OMFApplication, self).do_deploy() +
+
[docs] def check_deploy(self, cid): + """ Check, through the mail box in the parser, + if the confirmation of the creation has been received + + :param cid: the id of the original message + :type guid: string + + """ + uid = self._omf_api.check_mailbox("create", cid) + if uid : + return uid + return False +
+
[docs] def trace(self, name, attr = TraceAttr.ALL, block = 512, offset = 0): + self.info("Retrieving '%s' trace %s " % (name, attr)) + if name == 'stdout' : + suffix = '.out' + elif name == 'stderr' : + suffix = '.err' + else : + suffix = '.misc' + + trace_path = '/tmp/'+ self._topic_app + suffix + + if attr == TraceAttr.PATH: + return trace_path + + if attr == TraceAttr.ALL: + try: + f = open(trace_path ,'r') + except IOError: + print "File with traces has not been found" + return False + out = f.read() + f.close() + return out + +
+
[docs] def do_start(self): + """ Start the RM. It means : Send Xmpp Message Using OMF protocol + to execute the application. + + """ + ## For performance test + if self.sperf: + self.begin_start_time = tnow() + self.sperf = False + + if not self.get('env'): + self.set('env', " ") + + if self.get('version') == "5": + self.begin_start_time = tnow() + # Some information to check the command for OMF5 + msg = " " + self.get_rtype() + " ( Guid : " + str(self._guid) +") : " + \ + self.get('appid') + " : " + self._path + " : " + \ + self._args + " : " + self.get('env') + self.debug(msg) + + self._omf_api.execute(self.node.get('hostname'),self.get('appid'), \ + self._args, self._path, self.get('env')) + else: + #For OMF 6 + if self._start_cnt == 0: + props = {} + props['state'] = "running" + + guards = {} + guards['type'] = "application" + guards['name'] = self.get('command') + + self._omf_api.frcp_configure(self._topic_app, props = props, guards = guards ) + + if self._start_cnt > confirmation_counter: + msg = "Couldn't retrieve the confirmation that the application started" + self.error(msg) + raise RuntimeError, msg + + res = self.check_start(self._topic_app) + if not res: + self._start_cnt +=1 + self.ec.schedule(reschedule_check, self.start) + return + + super(OMFApplication, self).do_start() +
+
[docs] def check_start(self, uid): + """ Check, through the mail box in the parser, + if the confirmation of the start has been received + + :param uid: the id of the original message + :type guid: string + + """ + res = self._omf_api.check_mailbox("started", uid) + if res : + return True + return False +
+
[docs] def do_stop(self): + """ Stop the RM. It means : Send Xmpp Message Using OMF protocol to + kill the application. + State is set to STOPPED after the message is sent. + + """ + + + if self.get('version') == 5: + self._omf_api.exit(self.node.get('hostname'),self.get('appid')) + super(OMFApplication, self).do_stop() +
+
[docs] def check_release(self, cid): + """ Check, through the mail box in the parser, + if the confirmation of the release has been received + + :param cid: the id of the original message + :type guid: string + + """ + res = self._omf_api.check_mailbox("release", cid) + if res : + return res + return False +
+
[docs] def do_release(self): + """ Clean the RM at the end of the experiment and release the API. + + """ + ## For performance test + if self.rperf: + self.begin_release_time = tnow() + self.rperf = False + + if self._omf_api: + if self.get('version') == "6" and self._topic_app: + if not self.release_id: + self.release_id = os.urandom(16).encode('hex') + self._omf_api.frcp_release( self.release_id, self.node.get('hostname'),self._topic_app, res_id=self._topic_app) + + if self._release_cnt < confirmation_counter: + cid = self.check_release(self.release_id) + if not cid: + self._release_cnt +=1 + self.ec.schedule(reschedule_check, self.release) + return + else: + msg = "Couldn't retrieve the confirmation of the release" + self.error(msg) + + # Remove the stdout and stderr of the application + try: + os.remove('/tmp/'+self._topic_app +'.out') + os.remove('/tmp/'+self._topic_app +'.err') + except OSError: + pass + + OMFAPIFactory.release_api(self.get('version'), + self.get('xmppServer'), self.get('xmppUser'), self.get('xmppPort'), + self.get('xmppPassword'), exp_id = self.exp_id) + + super(OMFApplication, self).do_release() +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/omf/channel.html b/doc/sphinx/_build/html/_modules/nepi/resources/omf/channel.html new file mode 100644 index 00000000..6ee1dc46 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/omf/channel.html @@ -0,0 +1,291 @@ + + + + + + + + nepi.resources.omf.channel — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.omf.channel

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+#         Julien Tribino <julien.tribino@inria.fr>
+
+from nepi.util.timefuncs import tnow
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.execution.attribute import Attribute, Flags 
+
+from nepi.resources.omf.omf_resource import ResourceGateway, OMFResource
+from nepi.resources.omf.omf_api_factory import OMFAPIFactory
+
+
+@clsinit_copy
+
[docs]class OMFChannel(OMFResource): + """ + .. class:: Class Args : + + :param ec: The Experiment controller + :type ec: ExperimentController + :param guid: guid of the RM + :type guid: int + :param creds: Credentials to communicate with the rm (XmppClient for OMF) + :type creds: dict + + """ + _rtype = "omf::Channel" + _authorized_connections = ["omf::WifiInterface", "omf::Node"] + + ChannelToFreq = dict({ + "1" : "2412", + "2" : "2417", + "3" : "2422", + "4" : "2427", + "5" : "2432", + "6" : "2437", + "7" : "2442", + "8" : "2447", + "9" : "2452", + "10" : "2457", + "11" : "2462", + "12" : "2467", + "13" : "2472", + }) + + @classmethod + def _register_attributes(cls): + """Register the attributes of an OMF channel + + """ + channel = Attribute("channel", "Name of the application") + cls._register_attribute(channel) + + def __init__(self, ec, guid): + """ + :param ec: The Experiment controller + :type ec: ExperimentController + :param guid: guid of the RM + :type guid: int + + """ + super(OMFChannel, self).__init__(ec, guid) + + self._nodes_guid = list() + self.frequency = None + + self._omf_api = None + + # For performance tests + self.perf = True + self.begin_deploy_time = None + + + @property +
[docs] def exp_id(self): + return self.ec.exp_id +
+
[docs] def valid_connection(self, guid): + """ Check if the connection with the guid in parameter is possible. + Only meaningful connections are allowed. + + :param guid: Guid of the current RM + :type guid: int + :rtype: Boolean + + """ + rm = self.ec.get_resource(guid) + if rm.get_rtype() in self._authorized_connections: + msg = "Connection between %s %s and %s %s accepted" % ( + self.get_rtype(), self._guid, rm.get_rtype(), guid) + self.debug(msg) + return True + msg = "Connection between %s %s and %s %s refused" % ( + self.get_rtype(), self._guid, rm.get_rtype(), guid) + self.debug(msg) + return False +
+ def _get_target(self, conn_set): + """ + Get the couples (host, interface) that uses this channel + + :param conn_set: Connections of the current Guid + :type conn_set: set + :rtype: list + :return: self._nodes_guid + + """ + res = [] + for elt in conn_set: + rm_iface = self.ec.get_resource(elt) + for conn in rm_iface.connections: + rm_node = self.ec.get_resource(conn) + if rm_node.get_rtype() == "omf::Node" and rm_node.get('hostname'): + if rm_iface.state < ResourceState.PROVISIONED or \ + rm_node.state < ResourceState.READY: + return "reschedule" + couple = [rm_node.get('hostname'), rm_iface.alias] + res.append(couple) + return res + +
[docs] def get_frequency(self, channel): + """ Returns the frequency of a specific channel number + + """ + return OMFChannel.ChannelToFreq[channel] +
+
[docs] def do_deploy(self): + """ Deploy the RM. It means : Get the xmpp client and send messages + using OMF 5.4 or 6 protocol to configure the channel. + + """ + + ## For performance test + if self.perf: + self.begin_deploy_time = tnow() + self.perf = False + + if not self.get('channel'): + msg = "Channel's value is not initialized" + self.error(msg) + raise RuntimeError, msg + + if self.get('version') == "6": + self.frequency = self.get_frequency(self.get('channel')) + super(OMFChannel, self).do_deploy() + return + + if not self.get('xmppServer'): + msg = "XmppServer is not initialzed. XMPP Connections impossible" + self.error(msg) + raise RuntimeError, msg + + if not (self.get('xmppUser') or self.get('xmppPort') + or self.get('xmppPassword')): + msg = "Credentials are not all initialzed. Default values will be used" + self.warn(msg) + + if not self._omf_api : + self._omf_api = OMFAPIFactory.get_api(self.get('version'), + self.get('xmppServer'), self.get('xmppUser'), self.get('xmppPort'), + self.get('xmppPassword'), exp_id = self.exp_id) + + self._nodes_guid = self._get_target(self._connections) + + if self._nodes_guid == "reschedule" : + self.ec.schedule("1s", self.deploy) + else: + for couple in self._nodes_guid: + attrval = self.get('channel') + attrname = "net/%s/%s" % (couple[1], 'channel') + self._omf_api.configure(couple[0], attrname, attrval) + + super(OMFChannel, self).do_deploy() +
+
[docs] def do_release(self): + """ Clean the RM at the end of the experiment and release the API + + """ + if self._omf_api : + OMFAPIFactory.release_api(self.get('version'), + self.get('xmppServer'), self.get('xmppUser'), self.get('xmppPort'), + self.get('xmppPassword'), exp_id = self.exp_id) + + super(OMFChannel, self).do_release() +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/omf/interface.html b/doc/sphinx/_build/html/_modules/nepi/resources/omf/interface.html new file mode 100644 index 00000000..2d6f044c --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/omf/interface.html @@ -0,0 +1,430 @@ + + + + + + + + nepi.resources.omf.interface — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.omf.interface

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+#         Julien Tribino <julien.tribino@inria.fr>
+
+import os, time
+from nepi.util.timefuncs import tnow
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.execution.attribute import Attribute, Flags 
+
+from nepi.resources.omf.node import OMFNode, confirmation_counter, reschedule_check
+from nepi.resources.omf.omf_resource import ResourceGateway, OMFResource
+from nepi.resources.omf.channel import OMFChannel
+from nepi.resources.omf.omf_api_factory import OMFAPIFactory
+
+@clsinit_copy
+
[docs]class OMFWifiInterface(OMFResource): + """ + .. class:: Class Args : + + :param ec: The Experiment controller + :type ec: ExperimentController + :param guid: guid of the RM + :type guid: int + + """ + _rtype = "omf::WifiInterface" + _authorized_connections = ["omf::Node" , "omf::Channel", "wilabt::sfa::Node"] + + @classmethod + def _register_attributes(cls): + """Register the attributes of an OMF interface + + """ + name = Attribute("name","Alias of the interface : wlan0, wlan1, ..", default = "wlan0") + mode = Attribute("mode","Mode of the interface") + hw_mode = Attribute("hw_mode","Choose between : a, b, g, n") + essid = Attribute("essid","Essid of the interface") + ip = Attribute("ip","IP of the interface") + cls._register_attribute(name) + cls._register_attribute(mode) + cls._register_attribute(hw_mode) + cls._register_attribute(essid) + cls._register_attribute(ip) + + def __init__(self, ec, guid): + """ + :param ec: The Experiment controller + :type ec: ExperimentController + :param guid: guid of the RM + :type guid: int + :param creds: Credentials to communicate with the rm (XmppClient for OMF) + :type creds: dict + + """ + super(OMFWifiInterface, self).__init__(ec, guid) + + self._conf = False + self.alias = None + self._type = None + + self.create_id = None + self._create_cnt = 0 + self.release_id = None + self._release_cnt = 0 + self._topic_iface = None + self._omf_api = None + self._type = "" + + # For performance tests + self.perf = True + self.begin_deploy_time = None + +
[docs] def valid_connection(self, guid): + """ Check if the connection with the guid in parameter is possible. + Only meaningful connections are allowed. + + :param guid: Guid of the current RM + :type guid: int + :rtype: Boolean + + """ + rm = self.ec.get_resource(guid) + if rm.get_rtype() in self._authorized_connections: + msg = "Connection between %s %s and %s %s accepted" % \ + (self.get_rtype(), self._guid, rm.get_rtype(), guid) + self.debug(msg) + return True + + msg = "Connection between %s %s and %s %s refused" % \ + (self.get_rtype(), self._guid, rm.get_rtype(), guid) + self.debug(msg) + return False +
+ @property +
[docs] def exp_id(self): + return self.ec.exp_id +
+ @property +
[docs] def node(self): + rm_list = self.get_connected(OMFNode.get_rtype()) + if rm_list: return rm_list[0] + return None +
+ @property +
[docs] def channel(self): + rm_list = self.get_connected(OMFChannel.get_rtype()) + if rm_list: return rm_list[0] + return None +
+
[docs] def configure_iface(self): + """ Configure the interface without the ip + + """ + if self.node.state < ResourceState.READY: + self.ec.schedule(self.reschedule_delay, self.deploy) + return False + + for attrname in ["mode", "type", "essid"]: + if attrname == "type" : + attrval = self._type + else : + attrval = self.get(attrname) + attrname = "net/%s/%s" % (self.alias, attrname) + self._omf_api.configure(self.node.get('hostname'), attrname, + attrval) + + super(OMFWifiInterface, self).do_provision() + return True +
+
[docs] def configure_ip(self): + """ Configure the ip of the interface + + .. note : The ip is separated from the others parameters to avoid + CELL ID shraing problem. By putting th ip at the end of the configuration, + each node use the same channel and can then share the same CELL ID. + In the second case, the channel is defined at the end and the node don't + share a common CELL ID and can not communicate. + + """ + if self.channel.state < ResourceState.READY: + self.ec.schedule(self.reschedule_delay, self.deploy) + return False + + attrval = self.get("ip") + if '/' in attrval: + attrval,mask = attrval.split('/') + attrname = "net/%s/%s" % (self.alias, "ip") + self._omf_api.configure(self.node.get('hostname'), attrname, + attrval) + return True + +
+
[docs] def configure_on_omf5(self): + """ Method to configure the wifi interface when OMF 5.4 is used. + + """ + + self._type = self.get('hw_mode') + if self.get('name') == "wlan0" or "eth0": + self.alias = "w0" + else: + self.alias = "w1" + res = False + if self.state < ResourceState.PROVISIONED: + if self._conf == False: + self._conf = self.configure_iface() + if self._conf == True: + res = self.configure_ip() + return res +
+
[docs] def check_deploy(self, cid): + """ Check, through the mail box in the parser, + if the confirmation of the creation has been received + + :param cid: the id of the original message + :type guid: string + + """ + uid = self._omf_api.check_mailbox("create", cid) + if uid : + return uid + return False +
+
[docs] def do_deploy(self): + """ Deploy the RM. It means : Get the xmpp client and send messages + using OMF 5.4 or 6 protocol to configure the interface. + + """ + if not self.node or self.node.state < ResourceState.READY: + self.debug("---- RESCHEDULING DEPLOY ---- node state %s " + % self.node.state ) + self.ec.schedule(self.reschedule_delay, self.deploy) + return + + if not self.channel or self.channel.state < ResourceState.READY: + self.debug("---- RESCHEDULING DEPLOY ---- channel state %s " + % self.channel.state ) + self.ec.schedule(self.reschedule_delay, self.deploy) + return + + ## For performance test + if self.perf: + self.begin_deploy_time = tnow() + self.perf = False + + self.set('xmppUser',self.node.get('xmppUser')) + self.set('xmppServer',self.node.get('xmppServer')) + self.set('xmppPort',self.node.get('xmppPort')) + self.set('xmppPassword',self.node.get('xmppPassword')) + self.set('version',self.node.get('version')) + + if not self.get('xmppServer'): + msg = "XmppServer is not initialzed. XMPP Connections impossible" + self.error(msg) + raise RuntimeError, msg + + if not (self.get('xmppUser') or self.get('xmppPort') + or self.get('xmppPassword')): + msg = "Credentials are not all initialzed. Default values will be used" + self.warn(msg) + + if not self._omf_api : + self._omf_api = OMFAPIFactory.get_api(self.get('version'), + self.get('xmppServer'), self.get('xmppUser'), self.get('xmppPort'), + self.get('xmppPassword'), exp_id = self.exp_id) + + if not (self.get('name')): + msg = "Interface's name is not initialized" + self.error(msg) + raise RuntimeError, msg + + if not (self.get('mode') and self.get('essid') \ + and self.get('hw_mode') and self.get('ip')): + msg = "Interface's variable are not initialized" + self.error(msg) + raise RuntimeError, msg + + if self.get('version') == "5": + res = self.configure_on_omf5() + + else : + res = self.configure_on_omf6() + + if res: + super(OMFWifiInterface, self).do_deploy() +
+
[docs] def configure_on_omf6(self): + """ Method to configure the wifi interface when OMF 6 is used. + + """ + if not self.create_id : + props = {} + props['wlan:if_name'] = self.get('name') + props['wlan:mode'] = { + "mode": self.get('mode'), + "hw_mode" : self.get('hw_mode'), + "channel" : self.channel.get('channel'), + "essid" : self.get('essid'), + "ip_addr" : self.get('ip'), + "frequency" : self.channel.frequency, + "phy" : "%0%" + } + props['wlan:hrn'] = self.get('name') + props['wlan:type'] = "wlan" + + self.create_id = os.urandom(16).encode('hex') + self._omf_api.frcp_create( self.create_id, self.node.get('hostname'), "wlan", props = props) + + if self._create_cnt > confirmation_counter: + msg = "Couldn't retrieve the confirmation of the creation" + self.error(msg) + raise RuntimeError, msg + + uid = self.check_deploy(self.create_id) + if not uid: + self._create_cnt +=1 + self.ec.schedule(reschedule_check, self.deploy) + return False + + self._topic_iface = uid + self._omf_api.enroll_topic(self._topic_iface) + return True +
+
[docs] def check_release(self, cid): + """ Check, through the mail box in the parser, + if the confirmation of the release has been received + + :param cid: the id of the original message + :type guid: string + + """ + res = self._omf_api.check_mailbox("release", cid) + if res : + return res + return False +
+
[docs] def do_release(self): + """ Clean the RM at the end of the experiment and release the API + + """ + if self._omf_api: + if self.get('version') == "6" and self._topic_iface : + if not self.release_id: + self.release_id = os.urandom(16).encode('hex') + self._omf_api.frcp_release( self.release_id, self.node.get('hostname'),self._topic_iface, res_id=self._topic_iface) + + if self._release_cnt < confirmation_counter: + cid = self.check_release(self.release_id) + if not cid: + self._release_cnt +=1 + self.ec.schedule(reschedule_check, self.release) + return + else: + msg = "Couldn't retrieve the confirmation of the release" + self.error(msg) + + + OMFAPIFactory.release_api(self.get('version'), + self.get('xmppServer'), self.get('xmppUser'), self.get('xmppPort'), + self.get('xmppPassword'), exp_id = self.exp_id) + + super(OMFWifiInterface, self).do_release() +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/omf/messages_5_4.html b/doc/sphinx/_build/html/_modules/nepi/resources/omf/messages_5_4.html new file mode 100644 index 00000000..96c65136 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/omf/messages_5_4.html @@ -0,0 +1,345 @@ + + + + + + + + nepi.resources.omf.messages_5_4 — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.omf.messages_5_4

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+#         Julien Tribino <julien.tribino@inria.fr>
+
+from xml.etree import cElementTree as ET
+
+
[docs]class MessageHandler(): + """ + .. class:: Class Args : + + :param sliceid: Slice Name (= Xmpp Slice) + :type expid: str + :param expid: Experiment ID (= Xmpp User) + :type expid: str + + .. note:: + + This class is used only for OMF 5.4 Protocol and is going to become unused + + """ + + def __init__(self, sliceid, expid ): + """ + + :param sliceid: Slice Name (= Xmpp Slice) + :type expid: str + :param expid: Experiment ID (= Xmpp User) + :type expid: str + + """ + self._slice_id = sliceid + self._exp_id = expid + + + def _id_element(self, parent, markup): + """ Insert a markup element with an id + + :param parent: Parent element in an XML point of view + :type parent: ElementTree Element + :param markup: Name of the markup + :type markup: str + + """ + elt = ET.SubElement(parent, markup) + elt.set("id", "\'omf-payload\'") + return elt + + def _attr_element(self, parent, markup, text): + """ Insert a markup element with a text (value) + + :param parent: Parent element in an XML point of view + :type parent: ElementTree Element + :param markup: Name of the markup + :type markup: str + :param text: Value of the markup element + :type text: str + + """ + elt = ET.SubElement(parent, markup) + elt.text = text + return elt + +
[docs] def execute_function(self, target, appid, cmdlineargs, path, env): + """ Build an Execute Message + + :param target: Hrn of the target node (ex : omf.plexus.wlab17) + :type target: str + :param appid: Application id + :type appid: str + :param cmdlineargs: Arguments of the application + :type cmdlineargs: str + :param path: Path of the application + :type path: str + :param env: Environment variables + :type env: str + + """ + payload = ET.Element("omf-message") + execute = self._id_element(payload,"EXECUTE") + env = self._attr_element(execute, "ENV", env) + sliceid = self._attr_element(execute,"SLICEID",self._slice_id) + expid = self._attr_element(execute,"EXPID",self._exp_id) + target = self._attr_element(execute,"TARGET",target) + appid = self._attr_element(execute,"APPID",appid) + cmdlineargs = self._attr_element(execute,"CMDLINEARGS",cmdlineargs) + path = self._attr_element(execute,"PATH",path) + return payload +
+
[docs] def stdin_function(self, target, value, appid): + """ Build an Execute Message + + :param value: parameter that go in the stdin + :type value: str + :param target: Hrn of the target node (ex : omf.plexus.wlab17) + :type target: str + :param appid: Application id + :type appid: str + + """ + payload = ET.Element("omf-message") + stdin = self._id_element(payload,"STDIN") + value = self._attr_element(stdin,"VALUE",value) + sliceid = self._attr_element(stdin,"SLICEID",self._slice_id) + expid = self._attr_element(stdin,"EXPID",self._exp_id) + target = self._attr_element(stdin,"TARGET",target) + appid = self._attr_element(stdin,"APPID",appid) + return payload +
+
[docs] def exit_function(self, target, appid): + """ Build an Exit Message + + :param target: Hrn of the target node (ex : omf.plexus.wlab17) + :type target: str + :param appid: Application id (ex : vlc#1) + :type appid: str + + """ + payload = ET.Element("omf-message") + execute = self._id_element(payload,"EXIT") + sliceid = self._attr_element(execute,"SLICEID",self._slice_id) + expid = self._attr_element(execute,"EXPID",self._exp_id) + target = self._attr_element(execute,"TARGET",target) + appid = self._attr_element(execute,"APPID",appid) + return payload +
+
[docs] def configure_function(self, target, value, path): + """ Build a Configure Message + + :param target: Hrn of the target node (ex : omf.plexus.wlab17) + :type target: str + :param value: guid of the RM + :type value: int + :param path: Path of the element to configure (ex : net/w0/channel) + :type path: dict + + """ + payload = ET.Element("omf-message") + config = self._id_element(payload, "CONFIGURE") + sliceid = self._attr_element(config,"SLICEID",self._slice_id) + expid = self._attr_element(config,"EXPID",self._exp_id) + target = self._attr_element(config,"TARGET",target) + value = self._attr_element(config,"VALUE",value) + path = self._attr_element(config,"PATH",path) + return payload +
+
[docs] def log_function(self,level, logger, level_name, data): + """ Build a Log Message + + :param level: Level of logging + :type level: str + :param logger: Element publishing the log + :type logger: str + :param level_name: Name of the level (ex : INFO) + :type level_name: str + :param data: Content to publish + :type data: str + + """ + payload = ET.Element("omf-message") + log = self._id_element(payload, "LOGGING") + level = self._attr_element(log,"LEVEL",level) + sliceid = self._attr_element(log,"SLICEID",self._slice_id) + logger = self._attr_element(log,"LOGGER",logger) + expid = self._attr_element(log,"EXPID",self._exp_id) + level_name = self._attr_element(log,"LEVEL_NAME",level_name) + data = self._attr_element(log,"DATA",data) + return payload +
+
[docs] def alias_function(self, name, target): + """ Build an Alias Message + + :param name: Name of the new alias + :type name: str + :param target: Hrn of the target node (ex : omf.plexus.wlab17) + :type target: str + + """ + payload = ET.Element("omf-message") + alias = self._id_element(payload,"ALIAS") + sliceid = self._attr_element(alias,"SLICEID",self._slice_id) + expid = self._attr_element(alias,"EXPID",self._exp_id) + name = self._attr_element(alias,"NAME",name) + target = self._attr_element(alias,"TARGET",target) + return payload +
+
[docs] def enroll_function(self, enrollkey, image, index, target ): + """ Build an Enroll Message + + :param enrollkey: Type of enrollment (= 1) + :type enrollkey: str + :param image: Image (= * when all the nodes are concerned) + :type image: str + :param index: Index (= 1 in general) + :type index: str + :param target: Hrn of the target node (ex : omf.plexus.wlab17) + :type target: str + + """ + payload = ET.Element("omf-message") + enroll = self._id_element(payload,"ENROLL") + enrollkey = self._attr_element(enroll,"ENROLLKEY",enrollkey) + sliceid = self._attr_element(enroll,"SLICEID",self._slice_id) + image = self._attr_element(enroll,"IMAGE",image) + expid = self._attr_element(enroll,"EXPID",self._exp_id) + index = self._attr_element(enroll,"INDEX",index) + target = self._attr_element(enroll,"TARGET",target) + return payload +
+
[docs] def noop_function(self,target): + """ Build a Noop Message + + :param target: Hrn of the target node (ex : omf.plexus.wlab17) + :type target: str + + """ + payload = ET.Element("omf-message") + noop = self._id_element(payload,"NOOP") + sliceid = self._attr_element(noop,"SLICEID",self._slice_id) + expid = self._attr_element(noop,"EXPID",self._exp_id) + target = self._attr_element(noop,"TARGET",target) + return payload +
+
[docs] def newexp_function(self, experimentid, address): + """ Build a NewExp Message + + :param experimentid: Id of the new experiment + :type experimentid: str + :param address: Adress of the destination set of nodes + :type address: str + + """ + payload = ET.Element("omf-message") + newexp = self._id_element(payload,"EXPERIMENT_NEW") + experimentid = self._attr_element(newexp,"EXPERIMENT_ID",experimentid) + sliceid = self._attr_element(newexp,"SLICEID",self._slice_id) + expid = self._attr_element(newexp,"EXPID",self._exp_id) + address = self._attr_element(newexp,"ADDRESS",address) + return payload +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/omf/messages_6.html b/doc/sphinx/_build/html/_modules/nepi/resources/omf/messages_6.html new file mode 100644 index 00000000..6e54de86 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/omf/messages_6.html @@ -0,0 +1,343 @@ + + + + + + + + nepi.resources.omf.messages_6 — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.omf.messages_6

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+#         Julien Tribino <julien.tribino@inria.fr>
+
+from xml.etree import cElementTree as ET
+
+
[docs]class MessageHandler(): + """ + .. class:: Class Args : + + :param sliceid: Slice Name (= Xmpp Slice) + :type expid: str + :param expid: Experiment ID (= Xmpp User) + :type expid: str + + .. note:: + + This class is used only for OMF 5.4 Protocol and is going to become unused + + """ + + def __init__(self): + """ + + """ + pass + + def _type_element(self, type_elt, xmlns, msg_id): + """ Insert a markup element with an id + + """ + elt = ET.Element(type_elt) + elt.set("xmlns", xmlns) + elt.set("mid", msg_id) + return elt + + + + def _attr_element(self, parent, markup, text, type_key=None, type_value = None): + """ Insert a markup element with a text (value) + + :param parent: Parent element in an XML point of view + :type parent: ElementTree Element + :param markup: Name of the markup + :type markup: str + :param text: Value of the markup element + :type text: str + + """ + elt = ET.SubElement(parent, markup) + if type_key and type_value: + elt.set(type_key, type_value) + elt.text = text + return elt + + def _id_element(self, parent, markup, key, value): + """ Insert a markup element with a text (value) + + :param parent: Parent element in an XML point of view + :type parent: ElementTree Element + :param markup: Name of the markup + :type markup: str + :param text: Value of the markup element + :type text: str + + """ + elt = ET.SubElement(parent, markup) + elt.set(key, value) + return elt + +
[docs] def create_function(self, msg_id, src, rtype, timestamp, props = None, guards = None): + """ Build a create message + + :param msg_id: Id of the message + :type msg_id: str + :param src: Src node that send the message (jabber source) + :type src: str + :param rtype: Type of the object + :type rtype: str + :param timestamp: Unix Timestamp + :type timestamp: str + :param props: List of properties + :type props: list + :param guards: list of guards (assertions for properties) + :type guards: list + """ + payload = self._type_element("create", "http://schema.mytestbed.net/omf/6.0/protocol", msg_id ) + self._attr_element(payload,"src",src) + self._attr_element(payload,"ts",timestamp) + self._attr_element(payload,"rtype",rtype) + + if props : + if rtype == "application" : + properties = self._id_element(payload,"props","xmlns:application", + "http://schema.mytestbed.net/omf/6.0/protocol/application") + elif rtype == "wlan" : + properties = self._id_element(payload,"props","xmlns:wlan", + "http://schema.mytestbed.net/omf/6.0/protocol/wlan") + else: + properties = self._attr_element(payload,"props","") + + for prop in props.keys(): + if isinstance(props[prop],str): + self._attr_element(properties,prop,props[prop],type_key="type", type_value = "string") + elif isinstance(props[prop],dict): + key = self._attr_element(properties,prop,"",type_key="type", type_value = "hash") + for comp in props[prop].keys(): + self._attr_element(key,comp,props[prop][comp],type_key="type", type_value = "string") + + if guards : + guardians = self._attr_element(payload,"guard","") + for guard in guards.keys(): + self._attr_element(guardians,guard,guards[guard],type_key="type", type_value = "string") + + return payload +
+
[docs] def configure_function(self, msg_id, src, timestamp, props = None, guards = None): + """ Build a configure message + + :param msg_id: Id of the message + :type msg_id: str + :param src: Src node that send the message (jabber source) + :type src: str + :param timestamp: Unix Timestamp + :type timestamp: str + :param props: List of properties + :type props: list + :param guards: list of guards (assertions for properties) + :type guards: list + """ + payload = self._type_element("configure", "http://schema.mytestbed.net/omf/6.0/protocol", msg_id ) + self._attr_element(payload,"src",src) + self._attr_element(payload,"ts",timestamp) + + if props : + properties = self._attr_element(payload,"props","") + for prop in props.keys(): + self._attr_element(properties,prop,props[prop],type_key="type", type_value = "symbol") + + if guards : + guardians = self._attr_element(payload,"guard","") + for guard in guards.keys(): + self._attr_element(guardians,guard,guards[guard],type_key="type", type_value = "string") + + return payload +
+
[docs] def request_function(self, msg_id, src, timestamp, props = None, guards = None): + """ Build a request message + + :param msg_id: Id of the message + :type msg_id: str + :param src: Src node that send the message (jabber source) + :type src: str + :param timestamp: Unix Timestamp + :type timestamp: str + :param props: List of properties + :type props: list + :param guards: list of guards (assertions for properties) + :type guards: list + """ + payload = self._type_element("request", "http://schema.mytestbed.net/omf/6.0/protocol", msg_id ) + self._attr_element(payload,"src",src) + self._attr_element(payload,"ts",timestamp) + + if props : + properties = self._attr_element(payload,"props","") + for prop in props.keys(): + self._attr_element(properties,prop,props[prop]) + + if guards : + guardians = self._attr_element(payload,"guard","") + for guard in guards.keys(): + self._attr_element(guardians,guard,guards[guard]) + return payload + +# For now, we don't need the inform message since it is ht RC that send them. + +# def inform_function(self, msg_id, src, timestamp, cid, itype): +# """ Build an inform message + +# :param msg_id: Id of the message +# :type msg_id: str +# :param src: Src node that send the message (jabber source) +# :type src: str +# :param rtype: Type of the object +# :type rtype: str +# :param timestamp: Unix Timestamp +# :type timestamp: str +# :param cid: Id of the orignial message +# :type cid: str +# :param itype: type of the object created +# :type itype: str +# """ + +# payload = self._type_element("inform", "http://schema.mytestbed.net/omf/6.0/protocol", msg_id ) +# sliceid = self._attr_element(payload,"src",src) +# expid = self._attr_element(config,"ts",timestamp) +# target = self._attr_element(config,"cid",cid) +# value = self._attr_element(config,"itype",value) +# path = self._attr_element(config,"properties",path) +# return payload +
+
[docs] def release_function(self, msg_id, src, timestamp, res_id = None, props = None, guards = None): + """ Build a release message + + :param msg_id: Id of the message + :type msg_id: str + :param src: Src node that send the message (jabber source) + :type src: str + :param timestamp: Unix Timestamp + :type timestamp: str + :param res_id: Id of the release resource + :type res_id: str + :param props: List of properties + :type props: list + :param guards: list of guards (assertions for properties) + :type guards: list + """ + payload = self._type_element("release", "http://schema.mytestbed.net/omf/6.0/protocol", msg_id ) + self._attr_element(payload,"src",src) + self._attr_element(payload,"ts",timestamp) + if res_id : + self._attr_element(payload,"res_id",res_id) + + if props : + properties = self._id_element(payload,"props","xmlns:frcp", + "http://schema.mytestbed.net/omf/6.0/protocol") + for prop in props.keys(): + self._attr_element(properties,prop,props[prop]) + + if guards : + guardians = self._attr_element(payload,"guard","") + for guard in guards.keys(): + self._attr_element(guardians,guard,guards[guard]) + + return payload +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/omf/node.html b/doc/sphinx/_build/html/_modules/nepi/resources/omf/node.html new file mode 100644 index 00000000..8648767c --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/omf/node.html @@ -0,0 +1,267 @@ + + + + + + + + nepi.resources.omf.node — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.omf.node

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+#         Julien Tribino <julien.tribino@inria.fr>
+
+from nepi.util.timefuncs import tnow
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.execution.attribute import Attribute, Flags 
+from nepi.resources.omf.omf_resource import ResourceGateway, OMFResource
+from nepi.resources.omf.omf_api_factory import OMFAPIFactory
+
+import time
+
+reschedule_check = "1s"
+confirmation_counter = 3600
+
+@clsinit_copy
+
[docs]class OMFNode(OMFResource): + """ + .. class:: Class Args : + + :param ec: The Experiment controller + :type ec: ExperimentController + :param guid: guid of the RM + :type guid: int + :param creds: Credentials to communicate with the rm (XmppClient for OMF) + :type creds: dict + + """ + _rtype = "omf::Node" + _authorized_connections = ["omf::Application" , "omf::WifiInterface"] + + @classmethod + def _register_attributes(cls): + """Register the attributes of an OMF Node + + """ + hostname = Attribute("hostname", "Hostname of the machine") + + cls._register_attribute(hostname) + + # XXX: We don't necessary need to have the credentials at the + # moment we create the RM + def __init__(self, ec, guid): + """ + :param ec: The Experiment controller + :type ec: ExperimentController + :param guid: guid of the RM + :type guid: int + + """ + super(OMFNode, self).__init__(ec, guid) + + self._omf_api = None + + # For performance tests + self.perf = True + self.begin_deploy_time = None + + + @property +
[docs] def exp_id(self): + return self.ec.exp_id +
+
[docs] def valid_connection(self, guid): + """ Check if the connection with the guid in parameter is possible. + Only meaningful connections are allowed. + + :param guid: Guid of the current RM + :type guid: int + :rtype: Boolean + + """ + rm = self.ec.get_resource(guid) + if rm.get_rtype() in self._authorized_connections: + msg = "Connection between %s %s and %s %s accepted" % ( + self.get_rtype(), self._guid, rm.get_rtype(), guid) + self.debug(msg) + return True + + msg = "Connection between %s %s and %s %s refused" % ( + self.get_rtype(), self._guid, rm.get_rtype(), guid) + self.error(msg) + + return False +
+
[docs] def do_deploy(self): + """ Deploy the RM. It means : Send Xmpp Message Using OMF protocol + to enroll the node into the experiment. + + """ + ## For performance test + if self.perf: + self.begin_deploy_time = tnow() + self.perf = False + + if not self.get('xmppServer'): + msg = "XmppServer is not initialzed. XMPP Connections impossible" + self.error(msg) + raise RuntimeError, msg + + if not self.get('version'): + msg = "Version of OMF is not indicated" + self.error(msg) + raise RuntimeError, msg + + if not (self.get('xmppUser') or self.get('xmppPort') + or self.get('xmppPassword')): + msg = "Credentials are not all initialzed. Default values will be used" + self.warn(msg) + + if not self._omf_api : + self._omf_api = OMFAPIFactory.get_api(self.get('version'), + self.get('xmppServer'), self.get('xmppUser'), self.get('xmppPort'), + self.get('xmppPassword'), exp_id = self.exp_id) + + if not self.get('hostname') : + msg = "Hostname's value is not initialized" + self.error(msg) + raise RuntimeError, msg + + if self.get('version') == "5": + self._omf_api.enroll_host(self.get('hostname')) + else: + self._omf_api.enroll_topic(self.get('hostname')) + + super(OMFNode, self).do_deploy() +
+
[docs] def do_release(self): + """ Clean the RM at the end of the experiment by unenrolling + the node from the topic + + """ + from nepi.resources.omf.application import OMFApplication + rm_list = self.get_connected(OMFApplication.get_rtype()) + if rm_list: + for rm in rm_list: + if rm.state < ResourceState.RELEASED: + self.ec.schedule(self.reschedule_delay, self.release) + return + + from nepi.resources.omf.interface import OMFWifiInterface + rm_list = self.get_connected(OMFWifiInterface.get_rtype()) + if rm_list: + for rm in rm_list: + if rm.state < ResourceState.RELEASED: + self.ec.schedule(self.reschedule_delay, self.release) + return + + if self._omf_api: + if self.get('version') == "5": + self._omf_api.release(self.get('hostname')) + else: + self._omf_api.unenroll_topic(self.get('hostname')) + + OMFAPIFactory.release_api(self.get('version'), + self.get('xmppServer'), self.get('xmppUser'), self.get('xmppPort'), + self.get('xmppPassword'), exp_id = self.exp_id) + + super(OMFNode, self).do_release() +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/omf/omf5_api.html b/doc/sphinx/_build/html/_modules/nepi/resources/omf/omf5_api.html new file mode 100644 index 00000000..fae34e80 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/omf/omf5_api.html @@ -0,0 +1,402 @@ + + + + + + + + nepi.resources.omf.omf5_api — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.omf.omf5_api

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+#         Julien Tribino <julien.tribino@inria.fr>
+
+import ssl
+import sys
+import time
+
+from nepi.util.logger import Logger
+
+from nepi.resources.omf.omf_client import OMFClient
+from nepi.resources.omf.messages_5_4 import MessageHandler
+
+
[docs]class OMF5API(Logger): + """ + .. class:: Class Args : + + :param host: Xmpp Server + :type host: str + :param slice: Xmpp Slice + :type slice: str + :param port: Xmpp Port + :type port: str + :param password: Xmpp password + :type password: str + :param xmpp_root: Root of the Xmpp Topic Architecture + :type xmpp_root: str + + .. note:: + + This class is the implementation of an OMF 5.4 API. + Since the version 5.4.1, the Topic Architecture start with OMF_5.4 + instead of OMF used for OMF5.3 + + """ + def __init__(self, host, slice, port, password, xmpp_root = None, + exp_id = None): + """ + :param host: Xmpp Server + :type host: str + :param slice: Xmpp Slice + :type slice: str + :param port: Xmpp Port + :type port: str + :param password: Xmpp password + :type password: str + :param xmpp_root: Root of the Xmpp Topic Architecture + :type xmpp_root: str + + """ + super(OMF5API, self).__init__("OMF5API") + self._exp_id = exp_id + self._user = "%s-%s" % (slice, self._exp_id) + self._slice = slice + self._host = host + self._port = port + self._password = password + self._hostnames = [] + self._xmpp_root = xmpp_root or "OMF_5.4" + + # OMF xmpp client + self._client = None + + # message handler + self._message = None + + if sys.version_info < (3, 0): + reload(sys) + sys.setdefaultencoding('utf8') + + # instantiate the xmpp client + self._init_client() + + # register xmpp nodes for the experiment + self._enroll_experiment() + self._enroll_newexperiment() + + # register xmpp logger for the experiment + self._enroll_logger() + + def _init_client(self): + """ Initialize XMPP Client + + """ + jid = "%s@%s" % (self._user, self._host) + xmpp = OMFClient(jid, self._password) + # PROTOCOL_SSLv3 required for compatibility with OpenFire + xmpp.ssl_version = ssl.PROTOCOL_SSLv3 + + if xmpp.connect((self._host, self._port)): + xmpp.process(block=False) + while not xmpp.ready: + time.sleep(1) + self._client = xmpp + self._message = MessageHandler(self._slice, self._user) + else: + msg = "Unable to connect to the XMPP server." + self.error(msg) + raise RuntimeError(msg) + + def _enroll_experiment(self): + """ Create and Subscribe to the Session Topic + + """ + xmpp_node = self._exp_session_id + self._client.create(xmpp_node) + #print "Create experiment sesion id topics !!" + self._client.subscribe(xmpp_node) + #print "Subscribe to experiment sesion id topics !!" + + + def _enroll_newexperiment(self): + """ Publish New Experiment Message + + """ + address = "/%s/%s/%s/%s" % (self._host, self._xmpp_root, self._slice, + self._user) + #print address + payload = self._message.newexp_function(self._user, address) + slice_sid = "/%s/%s" % (self._xmpp_root, self._slice) + self._client.publish(payload, slice_sid) + + def _enroll_logger(self): + """ Create and Subscribe to the Logger Topic + + """ + xmpp_node = self._logger_session_id + self._client.create(xmpp_node) + self._client.subscribe(xmpp_node) + + payload = self._message.log_function("2", + "nodeHandler::NodeHandler", + "INFO", + "OMF Experiment Controller 5.4 (git 529a626)") + self._client.publish(payload, xmpp_node) + + def _host_session_id(self, hostname): + """ Return the Topic Name as /xmpp_root/slice/user/hostname + + :param hostname: Full hrn of the node + :type hostname: str + + """ + return "/%s/%s/%s/%s" % (self._xmpp_root, self._slice, self._user, + hostname) + + def _host_resource_id(self, hostname): + """ Return the Topic Name as /xmpp_root/slice/resources/hostname + + :param hostname: Full hrn of the node + :type hostname: str + + """ + return "/%s/%s/resources/%s" % (self._xmpp_root, self._slice, hostname) + + @property + def _exp_session_id(self): + """ Return the Topic Name as /xmpp_root/slice/user + + """ + return "/%s/%s/%s" % (self._xmpp_root, self._slice, self._user) + + @property + def _logger_session_id(self): + """ Return the Topic Name as /xmpp_root/slice/LOGGER + + """ + return "/%s/%s/%s/LOGGER" % (self._xmpp_root, self._slice, self._user) + +
[docs] def delete(self, hostname): + """ Delete the topic corresponding to the hostname for this session + + :param hostname: Full hrn of the node + :type hostname: str + + """ + if not hostname in self._hostnames: + return + + self._hostnames.remove(hostname) + + xmpp_node = self._host_session_id(hostname) + self._client.delete(xmpp_node) +
+
[docs] def enroll_host(self, hostname): + """ Create and Subscribe to the session topic and the resources + corresponding to the hostname + + :param hostname: Full hrn of the node + :type hostname: str + + """ + if hostname in self._hostnames: + return + + self._hostnames.append(hostname) + + xmpp_node = self._host_session_id(hostname) + self._client.create(xmpp_node) + self._client.subscribe(xmpp_node) + + xmpp_node = self._host_resource_id(hostname) + self._client.subscribe(xmpp_node) + + payload = self._message.enroll_function("1", "*", "1", hostname) + self._client.publish(payload, xmpp_node) +
+
[docs] def configure(self, hostname, attribute, value): + """ Configure attribute on the node + + :param hostname: Full hrn of the node + :type hostname: str + :param attribute: Attribute that need to be configured ( + often written as /net/wX/attribute, with X the interface number) + :type attribute: str + :param value: Value of the attribute + :type value: str + + """ + payload = self._message.configure_function(hostname, value, attribute) + xmpp_node = self._host_session_id(hostname) + self._client.publish(payload, xmpp_node) + +
+
[docs] def send_stdin(self, hostname, value, app_id): + """ Send to the stdin of the application the value + + :param hostname: Full hrn of the node + :type hostname: str + :param appid: Application Id (Any id that represents in a unique + way the application) + :type appid: str + :param value: parameter to execute in the stdin of the application + :type value: str + + """ + payload = self._message.stdin_function(hostname, value, app_id) + xmpp_node = self._host_session_id(hostname) + self._client.publish(payload, xmpp_node) + +
+
[docs] def execute(self, hostname, app_id, arguments, path, env): + """ Execute command on the node + + :param hostname: Full hrn of the node + :type hostname: str + :param app_id: Application Id (Any id that represents in a unique + way the application) + :type app_id: str + :param arguments: Arguments of the application + :type arguments: str + :param path: Path of the application + :type path: str + :param env: Environnement values for the application + :type env: str + + """ + payload = self._message.execute_function(hostname, app_id, arguments, + path, env) + xmpp_node = self._host_session_id(hostname) + self._client.publish(payload, xmpp_node) +
+
[docs] def exit(self, hostname, app_id): + """ Kill an application started with OMF + + :param hostname: Full hrn of the node + :type hostname: str + :param app_id: Application Id of the application you want to stop + :type app_id: str + + """ + payload = self._message.exit_function(hostname, app_id) + xmpp_node = self._host_session_id(hostname) + self._client.publish(payload, xmpp_node) +
+
[docs] def release(self, hostname): + """ Delete the session and logger topics. Then disconnect + + """ + if hostname in self._hostnames: + self.delete(hostname) +
+
[docs] def disconnect(self) : + """ Delete the session and logger topics. Then disconnect + + """ + self._client.delete(self._exp_session_id) + self._client.delete(self._logger_session_id) + + time.sleep(1) + + # Wait the send queue to be empty before disconnect + self._client.disconnect(wait=True) + msg = " Disconnected from XMPP Server" + self.debug(msg) +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/omf/omf6_api.html b/doc/sphinx/_build/html/_modules/nepi/resources/omf/omf6_api.html new file mode 100644 index 00000000..4e069bfa --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/omf/omf6_api.html @@ -0,0 +1,351 @@ + + + + + + + + nepi.resources.omf.omf6_api — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.omf.omf6_api

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+#         Julien Tribino <julien.tribino@inria.fr>
+
+import ssl
+import sys
+import time
+
+from nepi.util.timefuncs import tsformat 
+import os
+
+from nepi.util.logger import Logger
+
+from nepi.resources.omf.omf_client import OMFClient
+from nepi.resources.omf.messages_6 import MessageHandler
+
+
[docs]class OMF6API(Logger): + """ + .. class:: Class Args : + + :param server: Xmpp Server + :type server: str + :param user: Xmpp User + :type user: str + :param port: Xmpp Port + :type port: str + :param password: Xmpp password + :type password: str + :param xmpp_root: Root of the Xmpp Topic Architecture + :type xmpp_root: str + + .. note:: + + This class is the implementation of an OMF 5.4 API. + Since the version 5.4.1, the Topic Architecture start with OMF_5.4 + instead of OMF used for OMF5.3 + + """ + def __init__(self, server, user = "nepi", port="5222", password="1234", + exp_id = None): + """ + :param server: Xmpp Server + :type server: str + :param user: Xmpp User + :type user: str + :param port: Xmpp Port + :type port: str + :param password: Xmpp password + :type password: str + :param xmpp_root: Root of the Xmpp Topic Architecture + :type xmpp_root: str + + """ + super(OMF6API, self).__init__("OMF6API") + self._exp_id = exp_id + self._user = user # name of the machine that run Nepi + self._server = server # name of the xmpp server + self._port = port # port of the xmpp server + self._password = password # password to connect to xmpp + self._jid = "%s-%s@%s" % (self._user, self._exp_id, self._server) + self._src = "xmpp://" + self._jid + + self._topics = [] + + # OMF xmpp client + self._client = None + + # message handler + self._message = None + + if sys.version_info < (3, 0): + reload(sys) + sys.setdefaultencoding('utf8') + + # instantiate the xmpp client + self._init_client() + + # register nepi topic + self._enroll_nepi() + + + def _init_client(self): + """ Initialize XMPP Client + + """ + xmpp = OMFClient(self._jid, self._password) + # PROTOCOL_SSLv3 required for compatibility with OpenFire + xmpp.ssl_version = ssl.PROTOCOL_SSLv3 + + if xmpp.connect((self._server, self._port)): + xmpp.process(block=False) + self.check_ready(xmpp) + self._client = xmpp + self._message = MessageHandler() + else: + msg = "Unable to connect to the XMPP server." + self.error(msg) + raise RuntimeError(msg) + +
[docs] def check_ready(self, xmpp): + delay = 1.0 + for i in xrange(15): + if xmpp.ready: + break + else: + time.sleep(delay) + delay = delay * 1.5 + else: + msg = "XMPP Client is not ready after long time" + self.error(msg) + raise RuntimeError, msg +
+ @property + def _nepi_topic(self): + """ Return the name of the session topic + + """ + msg = "nepi-" + self._exp_id + self.debug(msg) + return msg + + def _enroll_nepi(self): + """ Create and Subscribe to the session Topic + + """ + nepi_topic = self._nepi_topic + self._client.create(nepi_topic) + self._client.subscribe(nepi_topic) + + +
[docs] def create_and_enroll_topic(self, topic): + """ Create and Subscribe to the session topic and the resources + corresponding to the hostname + + :param hostname: Full hrn of the node + :type hostname: str + + """ + if topic in self._topics: + return + + self._topics.append(topic) + + self._client.create(topic) + self._client.subscribe(topic) + +
+
[docs] def enroll_topic(self, topic): + """ Create and Subscribe to the session topic and the resources + corresponding to the hostname + + """ + if topic in self._topics: + return + + self._topics.append(topic) + self._client.subscribe(topic) + +
+
[docs] def frcp_inform(self, topic, cid, itype): + """ Publish an inform message + + """ + msg_id = os.urandom(16).encode('hex') + timestamp = tsformat() + payload = self._message.inform_function(msg_id, self._src, timestamp, props = props ,guards = guards) + + self._client.publish(payload, xmpp_node) +
+
[docs] def frcp_configure(self, topic, props = None, guards = None ): + """ Publish a configure message + + """ + msg_id = os.urandom(16).encode('hex') + timestamp = tsformat() + payload = self._message.configure_function(msg_id, self._src, timestamp ,props = props ,guards = guards) + self._client.publish(payload, topic) + +
+
[docs] def frcp_create(self, msg_id, topic, rtype, props = None, guards = None ): + """ Publish a create message + + """ + timestamp = tsformat() + payload = self._message.create_function(msg_id, self._src, rtype, timestamp , props = props ,guards = guards) + self._client.publish(payload, topic) + +
+
[docs] def frcp_request(self, topic, props = None, guards = None ): + """ Execute command on the node + + """ + msg_id = os.urandom(16).encode('hex') + timestamp = tsformat() + payload = self._message.request_function(msg_id, self._src, timestamp, props = props ,guards = guards) + self._client.publish(payload, xmpp_node) +
+
[docs] def frcp_release(self, msg_id, parent, child, res_id = None, props = None, guards = None ): + """ Publish a release message + + """ + timestamp = tsformat() + payload = self._message.release_function(msg_id, self._src, timestamp, res_id = res_id, props = props ,guards = guards) + self._client.publish(payload, parent) + + if child in self._topics: + self._topics.remove(child) + + self._client.unsubscribe(child) + #self._client.delete(child) +
+
[docs] def check_mailbox(self, itype, attr): + """ Check the mail box + + :param itype: type of mail + :type itype: str + :param attr: value wanted + :type attr: str + + """ + return self._client.check_mailbox(itype, attr) +
+
[docs] def unenroll_topic(self, topic): + """ Create and Subscribe to the session topic and the resources + corresponding to the hostname + + """ + if topic in self._topics: + self._topics.remove(topic) + self._client.unsubscribe(topic) +
+
[docs] def disconnect(self) : + """ Delete the session and logger topics. Then disconnect + + """ + # To receive the last messages + time.sleep(2) + + self._client.delete(self._nepi_topic) + + # Wait the send queue to be empty before disconnect + self._client.disconnect(wait=True) + msg = " Disconnected from XMPP Server" + self.debug(msg) +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/omf/omf6_parser.html b/doc/sphinx/_build/html/_modules/nepi/resources/omf/omf6_parser.html new file mode 100644 index 00000000..4f79178b --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/omf/omf6_parser.html @@ -0,0 +1,382 @@ + + + + + + + + nepi.resources.omf.omf6_parser — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.omf.omf6_parser

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+#         Julien Tribino <julien.tribino@inria.fr>
+
+from nepi.util.logger import Logger
+
+import os
+import traceback
+import xml.etree.ElementTree as ET
+
+# inherit from BaseXmpp and XMLstream classes
+
[docs]class OMF6Parser(Logger): + """ + .. class:: Class Args : + + :param jid: Jabber Id (= Xmpp Slice + Date) + :type jid: str + :param password: Jabber Password (= Xmpp Password) + :type password: str + + .. note:: + + This class is an XMPP Client with customized method + + """ + + def __init__(self): + """ + + :param jid: Jabber Id (= Xmpp Slice + Date) + :type jid: str + :param password: Jabber Password (= Xmpp Password) + :type password: str + + + """ + super(OMF6Parser, self).__init__("OMF6API") + self.mailbox={} + self.traces={} + self.trace='NULL' + + self.init_mailbox() + + +
[docs] def init_mailbox(self): + self.mailbox['create'] = [] + self.mailbox['started'] = [] + self.mailbox['release'] = [] +
+ def _check_for_tag(self, root, namespaces, tag): + """ Check if an element markup is in the ElementTree + + :param root: Root of the tree + :type root: ElementTree Element + :param namespaces: Namespaces of the element + :type namespaces: str + :param tag: Tag that will search in the tree + :type tag: str + + """ + for element in root.iter(namespaces+tag): + if element.text: + return element.text + else : + return None + + def _check_for_props(self, root, namespaces): + """ Check if an element markup is in the ElementTree + + :param root: Root of the tree + :type root: ElementTree Element + :param namespaces: Namespaces of the element + :type namespaces: str + + """ + props = {} + for properties in root.iter(namespaces+'props'): + for element in properties.iter(): + if element.tag and element.text: + props[element.tag] = element.text + return props + + def _check_for_membership(self, root, namespaces): + """ Check if an element markup is in the ElementTree + + :param root: Root of the tree + :type root: ElementTree Element + :param namespaces: Namespaces of the element + :type namespaces: str + + """ + for element in root.iter(namespaces+'membership'): + for elt in element.iter(namespaces+'it'): + ##XXX : change + return elt.text + + + def _check_output(self, root, namespaces): + """ Check the significative element in the answer and display it + + :param root: Root of the tree + :type root: ElementTree Element + :param namespaces: Namespaces of the tree + :type namespaces: str + + """ + fields = ["TARGET", "REASON", "PATH", "APPID", "VALUE"] + response = "" + for elt in fields: + msg = self._check_for_tag(root, namespaces, elt) + if msg is not None: + response = response + " " + msg.text + " :" + deb = self._check_for_tag(root, namespaces, "MESSAGE") + if deb is not None: + msg = response + " " + deb.text + self.debug(msg) + else : + self.info(response) + + + def _inform_creation_ok(self, root, namespaces): + """ Parse and Display CREATION OK message + + """ + #ET.dump(root) + uid = self._check_for_tag(root, namespaces, "uid") + cid = self._check_for_tag(root, namespaces, "cid") + member = self._check_for_membership(root, namespaces) + binary_path = self._check_for_tag(root, namespaces, "binary_path") + msg = "CREATION OK -- " + if binary_path : + msg = msg + "The resource : '"+binary_path + else : + msg = msg + "The interface" + if uid : + msg = msg + "' is listening to the topics : '"+ uid + if member : + msg = msg + "' and '"+ member +"'" + if cid: + self.info(msg) + self.mailbox['create'].append([cid, uid ]) + + def _inform_creation_failed(self, root, namespaces): + """ Parse and Display CREATION FAILED message + + """ + reason = self._check_for_tag(root, namespaces, "reason") + cid = self._check_for_tag(root, namespaces, "cid") + msg = "CREATION FAILED - The reason : "+reason + if cid: + self.error(msg) + self.mailbox['create'].append([cid, uid ]) + + def _inform_status(self, root, namespaces): + """ Parse and Display STATUS message + + """ + props = self._check_for_props(root, namespaces) + uid = self._check_for_tag(root, namespaces, "uid") + event = self._check_for_tag(root, namespaces, "event") + + log = "STATUS -- " + for elt in props.keys(): + ns, tag = elt.split('}') + if tag == "it": + log = log + "membership : " + props[elt]+" -- " + elif tag == "event": + self.mailbox['started'].append(uid) + log = log + "event : " + props[elt]+" -- " + elif tag == "msg": + if event == "STDOUT" : + filename = os.path.join("/tmp", "%s.out" % uid) + f = open(filename,'a+') + # XXX: Adding fake \n for visual formatting + msg = props[elt] # + "\n" + f.write(msg) + f.close() + elif event == "STDERR" : + filename = os.path.join("/tmp", "%s.err" % uid) + f = open(filename,'a+') + # XXX: Adding fake \n for visual formatting + msg = props[elt] # + "\n" + f.write(msg) + f.close() + log = log + tag +" : " + props[elt]+" -- " + else: + log = log + tag +" : " + props[elt]+" -- " + log = log + " STATUS " + self.info(log) + + def _inform_released(self, root, namespaces): + """ Parse and Display RELEASED message + + """ + #ET.dump(root) + parent_id = self._check_for_tag(root, namespaces, "src") + child_id = self._check_for_tag(root, namespaces, "res_id") + cid = self._check_for_tag(root, namespaces, "cid") + if cid : + msg = "RELEASED - The resource : '"+child_id+ \ + "' has been released by : '"+ parent_id + self.info(msg) + self.mailbox['release'].append(cid) + + def _inform_error(self, root, namespaces): + """ Parse and Display ERROR message + + """ + reason = self._check_for_tag(root, namespaces, "reason") + msg = "The reason : "+reason + self.error(msg) + + def _inform_warn(self, root, namespaces): + """ Parse and Display WARN message + + """ + reason = self._check_for_tag(root, namespaces, "reason") + msg = "The reason : "+reason + self.warn(msg) + + def _parse_inform(self, root, namespaces): + """ Check the significative element in the answer + Then Parse it and display using specific method + + :param root: Root of the tree + :type root: ElementTree Element + :param namespaces: Namespaces of the tree + :type namespaces: str + + """ + itype = self._check_for_tag(root, namespaces, "itype") + if itype : + method_name = '_inform_'+ itype.replace('.', '_').lower() + method = getattr(self, method_name) + if method : + method(root, namespaces) + else : + msg = "There is no method to parse the response of the type " + itype + self.info(msg) + return + + +
[docs] def check_mailbox(self, itype, attr): + """ Check the mail box + + :param itype: type of mail + :type itype: str + :param attr: value wanted + :type attr: str + + """ + if itype == "create": + for res in self.mailbox[itype]: + binary, uid = res + if binary == attr: + self.mailbox[itype].remove(res) + return uid + else : + for res in self.mailbox[itype]: + if attr == res: + self.mailbox[itype].remove(res) + return res + +
+
[docs] def handle(self, iq): + """ Check the mail box + + :param iq: message received + :type itype: iq + """ + namespaces = "{http://schema.mytestbed.net/omf/6.0/protocol}" + for i in iq['pubsub_event']['items']: + root = ET.fromstring(str(i)) + #ET.dump(root) + self._parse_inform(root, namespaces) +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/omf/omf_api_factory.html b/doc/sphinx/_build/html/_modules/nepi/resources/omf/omf_api_factory.html new file mode 100644 index 00000000..3e59d3b6 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/omf/omf_api_factory.html @@ -0,0 +1,230 @@ + + + + + + + + nepi.resources.omf.omf_api_factory — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.omf.omf_api_factory

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+#         Julien Tribino <julien.tribino@inria.fr>
+
+
+import time
+import hashlib
+import threading
+
+from nepi.resources.omf.omf5_api import OMF5API
+from nepi.resources.omf.omf6_api import OMF6API
+
+
[docs]class OMFAPIFactory(object): + """ + .. note:: + + It allows the different RM to use the same xmpp client if they use + the same credentials. For the moment, it is focused on XMPP. + + """ + # use lock to avoid concurrent access to the Api list at the same times by 2 + # different threads + lock = threading.Lock() + _apis = dict() + + @classmethod +
[docs] def get_api(cls, version, server, user, port, password, exp_id = None): + """ Get an OMF Api + + :param version: OMF Version. Either 5 or 6 + :type version: str + :param server: Xmpp Server Adress + :type server: str + :param user: Xmpp User + :type user: str + :param port: Xmpp Port (Default : 5222) + :type port: str + :param password: Xmpp Password + :type password: str + :param exp_id: Id of the experiment + :type exp_id: str + + """ + if version and user and server and port and password: + key = cls._make_key(version, server, user, port, password, exp_id) + cls.lock.acquire() + if key in cls._apis: + #print "Api Counter : " + str(cls._apis[key]['cnt']) + cls._apis[key]['cnt'] += 1 + cls.lock.release() + return cls._apis[key]['api'] + else : + omf_api = cls.create_api(version, server, user, port, password, exp_id) + cls.lock.release() + return omf_api + return None +
+ @classmethod +
[docs] def create_api(cls, version, server, user, port, password, exp_id): + """ Create an OMF API if this one doesn't exist yet with this credentials + + :param version: OMF Version. Either 5 or 6 + :type version: str + :param server: Xmpp Server Adress + :type server: str + :param user: Xmpp User + :type user: str + :param port: Xmpp Port (Default : 5222) + :type port: str + :param password: Xmpp Password + :type password: str + :param exp_id: Id of the experiment + :type exp_id: str + + """ + key = cls._make_key(version, server, user, port, password, exp_id) + if version == "5": + omf_api = OMF5API(server, user, port, password, exp_id = exp_id) + else : + omf_api = OMF6API(server, user = user, port = port, password = password, exp_id = exp_id) + cls._apis[key] = {} + cls._apis[key]['api'] = omf_api + cls._apis[key]['cnt'] = 1 + return omf_api +
+ @classmethod +
[docs] def release_api(cls, version, server, user, port, password, exp_id = None): + """ Release an OMF API with this credentials + + :param version: OMF Version. Either 5 or 6 + :type version: str + :param server: Xmpp Server Adress + :type server: str + :param user: Xmpp User + :type user: str + :param port: Xmpp Port (Default : 5222) + :type port: str + :param password: Xmpp Password + :type password: str + :param exp_id: Id of the experiment + :type exp_id: str + + """ + if version and user and server and port and password: + key = cls._make_key(version, server, user, port, password, exp_id) + if key in cls._apis: + cls._apis[key]['cnt'] -= 1 + #print "Api Counter : " + str(cls._apis[key]['cnt']) + if cls._apis[key]['cnt'] == 0: + omf_api = cls._apis[key]['api'] + omf_api.disconnect() + del cls._apis[key] +
+ @classmethod + def _make_key(cls, *args): + """ Hash the credentials in order to create a key + + :param args: list of arguments used to create the hash (server, user, port, ...) + :type args: list + + """ + skey = "".join(map(str, args)) + return hashlib.md5(skey).hexdigest() +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/omf/omf_client.html b/doc/sphinx/_build/html/_modules/nepi/resources/omf/omf_client.html new file mode 100644 index 00000000..52922bc5 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/omf/omf_client.html @@ -0,0 +1,449 @@ + + + + + + + + nepi.resources.omf.omf_client — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.omf.omf_client

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+#         Julien Tribino <julien.tribino@inria.fr>
+
+from nepi.util.logger import Logger
+from nepi.resources.omf.omf6_parser import OMF6Parser
+try:
+    import sleekxmpp
+    from sleekxmpp.exceptions import IqError, IqTimeout
+    class BaseOMFClient(sleekxmpp.ClientXMPP):
+        pass
+except ImportError:
+    msg = ("SleekXMPP is not installed. Without this library "
+          "you will be not able to use OMF Resources "
+          "if you want to install SleekXmpp: \n"
+          " git clone -b develop git://github.com/fritzy/SleekXMPP.git \n"
+          " cd SleekXMPP \n"
+          " sudo python setup.py install\n")
+
+    logger = Logger("BaseOMFClient")
+    logger.debug(msg)
+
+
[docs] class BaseOMFClient(object): + pass +
+import traceback +import xml.etree.ElementTree as ET + +# inherit from BaseXmpp and XMLstream classes +
[docs]class OMFClient(BaseOMFClient, Logger): + """ + .. class:: Class Args : + + :param jid: Jabber Id (= Xmpp Slice + Date) + :type jid: str + :param password: Jabber Password (= Xmpp Password) + :type password: str + + .. note:: + + This class is an XMPP Client with customized method + + """ + + def __init__(self, jid, password): + """ + + :param jid: Jabber Id (= Xmpp Slice + Date) + :type jid: str + :param password: Jabber Password (= Xmpp Password) + :type password: str + + + """ + Logger.__init__(self, "OMFClient") + + sleekxmpp.ClientXMPP.__init__(self, jid, password) + self._ready = False + self._registered = False + self._server = None + self._parser = None + + self.register_plugin('xep_0077') # In-band registration + self.register_plugin('xep_0030') + self.register_plugin('xep_0059') + self.register_plugin('xep_0060') # PubSub + + self.add_event_handler("session_start", self.start) + self.add_event_handler("register", self.register) + self.add_event_handler("pubsub_publish", self.handle_omf_message) + + #Init the parser + self._init_parser() + + def _init_parser(self): + """ Init the parser depending on the OMF Version + + """ + self._parser = OMF6Parser() + + @property +
[docs] def ready(self): + """ Check if the client is ready + + """ + return self._ready +
+
[docs] def start(self, event): + """ Send presence to the Xmppp Server. This function is called directly by the sleekXmpp library + + """ + self.send_presence() + self._ready = True + self._server = "pubsub.%s" % self.boundjid.domain +
+
[docs] def register(self, iq): + """ Register to the Xmppp Server. This function is called directly by the sleekXmpp library + + """ + if self._registered: + msg = " %s already registered!" % self.boundjid + self.info(msg) + return + + resp = self.Iq() + resp['type'] = 'set' + resp['register']['username'] = self.boundjid.user + resp['register']['password'] = self.password + + try: + resp.send(now=True) + msg = " Account created for %s!" % self.boundjid + self.info(msg) + self._registered = True + except IqError as e: + msg = " Could not register account: %s" % e.iq['error']['text'] + self.error(msg) + except IqTimeout: + msg = " No response from server." + self.error(msg) +
+
[docs] def unregister(self): + """ Unregister from the Xmppp Server. + + """ + try: + self.plugin['xep_0077'].cancel_registration( + ifrom=self.boundjid.full) + msg = " Account unregistered for %s!" % self.boundjid + self.info(msg) + except IqError as e: + msg = " Could not unregister account: %s" % e.iq['error']['text'] + self.error(msg) + except IqTimeout: + msg = " No response from server." + self.error(msg) +
+
[docs] def nodes(self): + """ Get all the nodes of the Xmppp Server. + + """ + try: + result = self['xep_0060'].get_nodes(self._server) + for item in result['disco_items']['items']: + msg = ' - %s' % str(item) + self.debug(msg) + return result + except: + error = traceback.format_exc() + msg = 'Could not retrieve node list.\ntraceback:\n%s' % error + self.error(msg) +
+
[docs] def subscriptions(self): + """ Get all the subscriptions of the Xmppp Server. + + """ + try: + result = self['xep_0060'].get_subscriptions(self._server) + #self.boundjid.full) + for node in result['node']: + msg = ' - %s' % str(node) + self.debug(msg) + return result + except: + error = traceback.format_exc() + msg = ' Could not retrieve subscriptions.\ntraceback:\n%s' % error + self.error(msg) +
+
[docs] def create(self, node): + """ Create the topic corresponding to the node + + :param node: Name of the topic, corresponding to the node (ex : omf.plexus.wlab17) + :type node: str + + """ + msg = " Create Topic : " + node + self.info(msg) + + config = self['xep_0004'].makeForm('submit') + config.add_field(var='pubsub#node_type', value='leaf') + config.add_field(var='pubsub#notify_retract', value='0') + config.add_field(var='pubsub#publish_model', value='open') + config.add_field(var='pubsub#persist_items', value='1') + config.add_field(var='pubsub#max_items', value='1') + config.add_field(var='pubsub#title', value=node) + + try: + self['xep_0060'].create_node(self._server, node, config = config) + except: + #error = traceback.format_exc() + #msg = ' Could not create topic: %s\ntraceback:\n%s' % (node, error) + msg = 'Could not create the topic : '+node+' . Maybe the topic already exists' + self.error(msg) +
+
[docs] def delete(self, node): + """ Delete the topic corresponding to the node + + :param node: Name of the topic, corresponding to the node (ex : omf.plexus.wlab17) + :type node: str + + """ + # To check if the queue are well empty at the end + #print " length of the queue : " + str(self.send_queue.qsize()) + #print " length of the queue : " + str(self.event_queue.qsize()) + try: + self['xep_0060'].delete_node(self._server, node) + msg = ' Deleted node: %s' % node + self.info(msg) + except: + #error = traceback.format_exc() + #msg = ' Could not delete topic: %s\ntraceback:\n%s' % (node, error) + msg = 'Could not delete the topic : '+node+' . Maybe It is not the owner of the topic' + self.error(msg) +
+
[docs] def publish(self, data, node): + """ Publish the data to the corresponding topic + + :param data: Data that will be published + :type data: str + :param node: Name of the topic + :type node: str + + """ + + msg = " Publish to Topic : " + node + self.info(msg) + try: + result = self['xep_0060'].publish(self._server,node,payload=data) + # id = result['pubsub']['publish']['item']['id'] + # print('Published at item id: %s' % id) + except: + error = traceback.format_exc() + msg = ' Could not publish to: %s\ntraceback:\n%s' % (node, error) + self.error(msg) +
+
[docs] def get(self, data): + """ Get the item + + :param data: data from which the items will be get back + :type data: str + + + """ + try: + result = self['xep_0060'].get_item(self._server, self.boundjid, + data) + for item in result['pubsub']['items']['substanzas']: + msg = 'Retrieved item %s: %s' % (item['id'], tostring(item['payload'])) + self.debug(msg) + except: + error = traceback.format_exc() + msg = ' Could not retrieve item %s from topic %s\ntraceback:\n%s' \ + % (data, self.boundjid, error) + self.error(msg) +
+
[docs] def retract(self, data): + """ Retract the item + + :param data: data from which the item will be retracted + :type data: str + + """ + try: + result = self['xep_0060'].retract(self._server, self.boundjid, data) + msg = ' Retracted item %s from topic %s' % (data, self.boundjid) + self.debug(msg) + except: + error = traceback.format_exc() + msg = 'Could not retract item %s from topic %s\ntraceback:\n%s' \ + % (data, self.boundjid, error) + self.error(msg) +
+
[docs] def purge(self): + """ Purge the information in the server + + """ + try: + result = self['xep_0060'].purge(self._server, self.boundjid) + msg = ' Purged all items from topic %s' % self.boundjid + self.debug(msg) + except: + error = traceback.format_exc() + msg = ' Could not purge items from topic %s\ntraceback:\n%s' \ + % (self.boundjid, error) + self.error(msg) +
+
[docs] def subscribe(self, node): + """ Subscribe to a topic + + :param node: Name of the topic + :type node: str + + """ + try: + result = self['xep_0060'].subscribe(self._server, node) + msg = ' Subscribed %s to topic %s' \ + % (self.boundjid.user, node) + #self.info(msg) + self.debug(msg) + except: + error = traceback.format_exc() + msg = ' Could not subscribe %s to topic %s\ntraceback:\n%s' \ + % (self.boundjid.bare, node, error) + self.error(msg) +
+
[docs] def unsubscribe(self, node): + """ Unsubscribe to a topic + + :param node: Name of the topic + :type node: str + + """ + try: + result = self['xep_0060'].unsubscribe(self._server, node) + msg = ' Unsubscribed %s from topic %s' % (self.boundjid.bare, node) + self.debug(msg) + except: + error = traceback.format_exc() + msg = ' Could not unsubscribe %s from topic %s\ntraceback:\n%s' \ + % (self.boundjid.bare, node, error) + self.error(msg) +
+
[docs] def check_mailbox(self, itype, attr): + """ Check the mail box + + :param itype: type of mail + :type itype: str + :param attr: value wanted + :type attr: str + + """ + return self._parser.check_mailbox(itype, attr) + +
+
[docs] def handle_omf_message(self, iq): + """ Handle published/received message + + :param iq: Stanzas that is currently published/received + :type iq: Iq Stanza + + """ + self._parser.handle(iq) +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/omf/omf_resource.html b/doc/sphinx/_build/html/_modules/nepi/resources/omf/omf_resource.html new file mode 100644 index 00000000..d88f1218 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/omf/omf_resource.html @@ -0,0 +1,167 @@ + + + + + + + + nepi.resources.omf.omf_resource — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.omf.omf_resource

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Julien Tribino <julien.tribino@inria.fr>
+#         Lucia Guevgeozian <lucia.guevgeozian_odizzio@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+
+
+
[docs]class ResourceGateway: + """ + Dictionary used to set OMF gateway depending on Testbed information. + """ + #XXX: A.Q. COMMENT: This looks a bit hardcoded + # SHOULDN'T THIS BE IN A SEPARATED FILE RATHER THAN IN THE + # BASE CLASS FOR ALL OMF RESOURCES? + TestbedtoGateway = dict({ + "wilabt" : "ops.wilab2.ilabt.iminds.be", + "nitos" : "nitlab.inf.uth.gr", + "nicta" : "??.??.??", + }) + + AMtoGateway = dict({ + "am.wilab2.ilabt.iminds.be" : "ops.wilab2.ilabt.iminds.be", + "nitlab.inf.uth.gr" : "nitlab.inf.uth.gr", + "nicta" : "??.??.??", + }) +
+@clsinit_copy +
[docs]class OMFResource(ResourceManager): + """ + Generic resource gathering XMPP credential information and common methods + for OMF nodes, channels, applications, etc. + """ + _rtype = "abstract::omf::Resource" + _platform = "omf" + + @classmethod + def _register_attributes(cls): + + xmppServer = Attribute("xmppServer", "Xmpp Server", + flags = Flags.Credential) + xmppUser = Attribute("xmppUser","Name of the Xmpp User/Slice", + flags = Flags.Credential) + xmppPort = Attribute("xmppPort", "Xmpp Port", + flags = Flags.Credential) + xmppPassword = Attribute("xmppPassword", "Xmpp Password", + flags = Flags.Credential) + version = Attribute("version", "Version of OMF : Either 5 or 6", + default = "6", ) + + cls._register_attribute(xmppUser) + cls._register_attribute(xmppServer) + cls._register_attribute(xmppPort) + cls._register_attribute(xmppPassword) + cls._register_attribute(version) + + def __init__(self, ec, guid): + super(OMFResource, self).__init__(ec, guid) + pass +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/omf/wilabt_node.html b/doc/sphinx/_build/html/_modules/nepi/resources/omf/wilabt_node.html new file mode 100644 index 00000000..ff95e487 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/omf/wilabt_node.html @@ -0,0 +1,559 @@ + + + + + + + + nepi.resources.omf.wilabt_node — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.omf.wilabt_node

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Lucia Guevgeozian <lucia.guevgeozian_odizzio@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState 
+from nepi.resources.omf.node import OMFNode
+from nepi.util.sfaapi import SFAAPIFactory 
+from nepi.util.execfuncs import lexec
+from nepi.util import sshfuncs
+
+from random import randint
+import time
+import re
+import weakref
+import socket
+import threading
+import datetime
+
+@clsinit_copy
+
[docs]class WilabtSfaNode(OMFNode): + _rtype = "wilabt::sfa::Node" + _help = "Controls a Wilabt host accessible using a SSH key " \ + "and provisioned using SFA" + _platform = "omf" + + @classmethod + def _register_attributes(cls): + + username = Attribute("username", "Local account username", + flags = Flags.Credential) + + identity = Attribute("identity", "SSH identity file", + flags = Flags.Credential) + + server_key = Attribute("serverKey", "Server public key", + flags = Flags.Design) + + sfa_user = Attribute("sfauser", "SFA user", + flags = Flags.Credential) + + sfa_private_key = Attribute("sfaPrivateKey", "SFA path to the private key \ + used to generate the user credential", + flags = Flags.Credential) + + slicename = Attribute("slicename", "SFA slice for the experiment", + flags = Flags.Credential) + + gateway_user = Attribute("gatewayUser", "Gateway account username", + flags = Flags.Design) + + gateway = Attribute("gateway", "Hostname of the gateway machine", + flags = Flags.Design) + + host = Attribute("host", "Name of the physical machine", + flags = Flags.Design) + + disk_image = Attribute("disk_image", "Specify a specific disk image for a node", + flags = Flags.Design) + + cls._register_attribute(username) + cls._register_attribute(identity) + cls._register_attribute(server_key) + cls._register_attribute(sfa_user) + cls._register_attribute(sfa_private_key) + cls._register_attribute(slicename) + cls._register_attribute(gateway_user) + cls._register_attribute(gateway) + cls._register_attribute(host) + cls._register_attribute(disk_image) + + def __init__(self, ec, guid): + super(WilabtSfaNode, self).__init__(ec, guid) + + self._ecobj = weakref.ref(ec) + self._sfaapi = None + self._node_to_provision = None + self._slicenode = False + self._host = False + self._username = None + + def _skip_provision(self): + sfa_user = self.get("sfauser") + if not sfa_user: + return True + else: return False + + @property +
[docs] def sfaapi(self): + """ + Property to instanciate the SFA API based in sfi client. + For each SFA method called this instance is used. + """ + if not self._sfaapi: + sfa_user = self.get("sfauser") + sfa_sm = "http://www.wilab2.ilabt.iminds.be:12369/protogeni/xmlrpc/am/3.0" + sfa_auth = '.'.join(sfa_user.split('.')[:2]) + sfa_registry = "http://sfa3.planet-lab.eu:12345/" + sfa_private_key = self.get("sfaPrivateKey") + batch = True + + _sfaapi = SFAAPIFactory.get_api(sfa_user, sfa_auth, + sfa_registry, sfa_sm, sfa_private_key, self._ecobj(), batch, WilabtSfaNode._rtype) + + if not _sfaapi: + self.fail_sfaapi() + + self._sfaapi = weakref.ref(_sfaapi) + + return self._sfaapi() +
+
[docs] def do_discover(self): + """ + Based on the attributes defined by the user, discover the suitable + node for provision. + """ + nodes = self.sfaapi.get_resources_hrn() + + host = self._get_host() + if host: + # the user specified one particular node to be provisioned + self._host = True + host_hrn = nodes[host] + + # check that the node is not blacklisted or being provisioned + # by other RM + if not self._blacklisted(host_hrn): + if not self._reserved(host_hrn): + if self._check_if_in_slice([host_hrn]): + self.debug("Node already in slice %s" % host_hrn) + self._slicenode = True + host = host + '.wilab2.ilabt.iminds.be' + self.set('host', host) + self._node_to_provision = host_hrn + super(WilabtSfaNode, self).do_discover() +
+
[docs] def do_provision(self): + """ + Add node to user's slice and verifing that the node is functioning + correctly. Check ssh, omf rc running, hostname, file system. + """ + provision_ok = False + ssh_ok = False + proc_ok = False + timeout = 300 + + while not provision_ok: + node = self._node_to_provision + #if self._slicenode: + # self._delete_from_slice() + # self.debug("Waiting 480 sec for re-adding to slice") + # time.sleep(480) # Timout for the testbed to allow a new reservation + self._add_node_to_slice(node) + t = 0 + while not self._check_if_in_slice([node]) and t < timeout \ + and not self._ecobj().abort: + t = t + 5 + time.sleep(t) + self.debug("Waiting 5 sec for resources to be added") + continue + + if not self._check_if_in_slice([node]): + self.debug("Couldn't add node %s to slice" % node) + self.fail_node_not_available(node) + + self._get_username() + ssh_ok = self._check_ssh_loop() + + if not ssh_ok: + # the timeout was reach without establishing ssh connection + # the node is blacklisted, and a new + # node to provision is discovered + self._blacklist_node(node) + self.do_discover() + continue + + # check /proc directory is mounted (ssh_ok = True) + # file system is not read only, hostname is correct + # and omf_rc process is up + else: + if not self._check_fs(): + self.do_discover() + continue + if not self._check_omfrc(): + self.do_discover() + continue + if not self._check_hostname(): + self.do_discover() + continue + + else: + provision_ok = True + if not self.get('host'): + self._set_host_attr(node) + self.info(" Node provisioned ") + + super(WilabtSfaNode, self).do_provision() +
+
[docs] def do_deploy(self): + if self.state == ResourceState.NEW: + self.info("Deploying w-iLab.t node") + self.do_discover() + self.do_provision() + super(WilabtSfaNode, self).do_deploy() +
+
[docs] def do_release(self): + super(WilabtSfaNode, self).do_release() + if self.state == ResourceState.RELEASED and not self._skip_provision(): + self.debug(" Releasing SFA API ") + self.sfaapi.release() +
+ def _blacklisted(self, host_hrn): + """ + Check in the SFA API that the node is not in the blacklist. + """ + if self.sfaapi.blacklisted(host_hrn): + self.fail_node_not_available(host_hrn) + return False + + def _reserved(self, host_hrn): + """ + Check in the SFA API that the node is not in the reserved + list. + """ + if self.sfaapi.reserved(host_hrn): + self.fail_node_not_available(host_hrn) + return False + + def _get_username(self): + """ + Get the username for login in to the nodes from RSpec. + Wilabt username is not made out of any convention, it + has to be retrived from the manifest RSpec. + """ + slicename = self.get("slicename") + if self._username is None: + slice_info = self.sfaapi.get_slice_resources(slicename) + username = slice_info['resource'][0]['services'][0]['login'][0]['username'] + self.set('username', username) + self.debug("Retriving username information from RSpec %s" % username) + self._username = username + + def _check_ssh_loop(self): + """ + Check that the ssh login is possible. In wilabt is done + through the gateway because is private testbed. + """ + t = 0 + timeout = 1200 + ssh_ok = False + while t < timeout and not ssh_ok: + cmd = 'echo \'GOOD NODE\'' + ((out, err), proc) = self.execute(cmd) + if out.find("GOOD NODE") < 0: + self.debug( "No SSH connection, waiting 20s" ) + t = t + 20 + time.sleep(20) + continue + else: + self.debug( "SSH OK" ) + ssh_ok = True + continue + return ssh_ok + + def _check_fs(self): + """ + Check file system, /proc well mounted. + """ + cmd = 'mount |grep proc' + ((out, err), proc) = self.execute(cmd) + if out.find("/proc type proc") < 0: + self.warning(" Corrupted file system ") + self._blacklist_node(node) + return False + return True + + def _check_omfrc(self): + """ + Check that OMF 6 resource controller is running. + """ + cmd = 'ps aux|grep omf' + ((out, err), proc) = self.execute(cmd) + if out.find("/usr/local/rvm/gems/ruby-1.9.3-p286@omf/bin/omf_rc") < 0: + return False + return True + + def _check_hostname(self): + """ + Check that the hostname in the image is not set to localhost. + """ + cmd = 'hostname' + ((out, err), proc) = self.execute(cmd) + if 'localhost' in out.lower(): + return False + else: + self.set('hostname', out.strip()) + return True + +
[docs] def execute(self, command, + sudo = False, + env = None, + tty = False, + forward_x11 = False, + retry = 3, + connect_timeout = 30, + strict_host_checking = False, + persistent = True, + blocking = True, + ): + """ Notice that this invocation will block until the + execution finishes. If this is not the desired behavior, + use 'run' instead.""" + (out, err), proc = sshfuncs.rexec( + command, + host = self.get("host"), + user = self.get("username"), + port = 22, + gwuser = self.get("gatewayUser"), + gw = self.get("gateway"), + agent = True, + sudo = sudo, + identity = self.get("identity"), + server_key = self.get("serverKey"), + env = env, + tty = tty, + forward_x11 = forward_x11, + retry = retry, + connect_timeout = connect_timeout, + persistent = persistent, + blocking = blocking, + strict_host_checking = strict_host_checking + ) + + return (out, err), proc + +
+ def _add_node_to_slice(self, host_hrn): + """ + Add node to slice, using SFA API. Actually Wilabt testbed + doesn't allow adding nodes, in fact in the API there is method + to group all the nodes instanciated as WilabtSfaNodes and the + Allocate and Provision is done with the last call at + sfaapi.add_resource_to_slice_batch. + """ + self.info(" Adding node to slice ") + slicename = self.get("slicename") + disk_image = self.get("disk_image") + if disk_image is not None: + properties = {'disk_image': disk_image} + else: properties = None + #properties = None + self.sfaapi.add_resource_to_slice_batch(slicename, host_hrn, properties=properties) + + def _delete_from_slice(self): + """ + Delete every node from slice, using SFA API. + Wilabt doesn't allow to remove one sliver so this method + remove every slice from the slice. + """ + + self.warning(" Deleting all slivers from slice ") + slicename = self.get("slicename") + self.sfaapi.remove_all_from_slice(slicename) + + def _get_host(self): + """ + Get the attribute hostname. + """ + host = self.get("host") + if host: + return host + else: + return None + + def _set_host_attr(self, node): + """ + Query SFAAPI for the hostname of a certain host hrn and sets the + attribute hostname, it will over write the previous value. + """ + hosts_hrn = self.sfaapi.get_resources_hrn() + for host, hrn in hosts_hrn.iteritems(): + if hrn == node: + host = host + '.wilab2.ilabt.iminds.be' + self.set("host", host) + + def _check_if_in_slice(self, hosts_hrn): + """ + Check using SFA API if any host hrn from hosts_hrn is in the user's + slice. + """ + slicename = self.get("slicename") + slice_nodes = self.sfaapi.get_slice_resources(slicename)['resource'] + if slice_nodes: + if len(slice_nodes[0]['services']) != 0: + slice_nodes_hrn = self.sfaapi.get_resources_hrn(slice_nodes).values() + else: slice_nodes_hrn = [] + nodes_inslice = list(set(hosts_hrn) & set(slice_nodes_hrn)) + return nodes_inslice + + def _blacklist_node(self, host_hrn): + """ + Add mal functioning node to blacklist (in SFA API). + """ + self.warning(" Blacklisting malfunctioning node ") + self.sfaapi.blacklist_resource(host_hrn) + if not self._host: + self.set('host', None) + else: + self.set('host', host_hrn.split('.').pop()) + + def _put_node_in_provision(self, host_hrn): + """ + Add node to the list of nodes being provisioned, in order for other RMs + to not try to provision the same one again. + """ + self.sfaapi.reserve_resource(host_hrn) + + def _get_ip(self, host): + """ + Query cache for the IP of a node with certain hostname + """ + try: + ip = sshfuncs.gethostbyname(host) + except: + # Fail while trying to find the IP + return None + return ip + +
[docs] def fail_discovery(self): + msg = "Discovery failed. No candidates found for node" + self.error(msg) + raise RuntimeError, msg +
+
[docs] def fail_node_not_alive(self, host=None): + msg = "Node %s not alive" % host + raise RuntimeError, msg +
+
[docs] def fail_node_not_available(self, host): + msg = "Some nodes not available for provisioning" + raise RuntimeError, msg +
+
[docs] def fail_not_enough_nodes(self): + msg = "Not enough nodes available for provisioning" + raise RuntimeError, msg +
+
[docs] def fail_sfaapi(self): + msg = "Failing while trying to instanciate the SFA API." + raise RuntimeError, msg +
+
[docs] def valid_connection(self, guid): + # TODO: Validate! + return True +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/planetlab/node.html b/doc/sphinx/_build/html/_modules/nepi/resources/planetlab/node.html new file mode 100644 index 00000000..7b867949 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/planetlab/node.html @@ -0,0 +1,775 @@ + + + + + + + + nepi.resources.planetlab.node — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.planetlab.node

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+#         Lucia Guevgeozian <lucia.guevgeozian_odizzio@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState 
+from nepi.resources.linux.node import LinuxNode
+from nepi.resources.planetlab.plcapi import PLCAPIFactory 
+from nepi.util.execfuncs import lexec
+from nepi.util import sshfuncs
+
+from random import randint
+import re
+import os
+import time
+import socket
+import threading
+import datetime
+import weakref
+
+@clsinit_copy
+
[docs]class PlanetlabNode(LinuxNode): + _rtype = "planetlab::Node" + _help = "Controls a PlanetLab host accessible using a SSH key " \ + "associated to a PlanetLab user account" + _platform = "planetlab" + + lock = threading.Lock() + + @classmethod + def _register_attributes(cls): + ip = Attribute("ip", "PlanetLab host public IP address", + flags = Flags.Design) + + pl_url = Attribute("plcApiUrl", "URL of PlanetLab PLCAPI host \ + (e.g. www.planet-lab.eu or www.planet-lab.org) ", + default = "www.planet-lab.eu", + flags = Flags.Credential) + + pl_ptn = Attribute("plcApiPattern", "PLC API service regexp pattern \ + (e.g. https://%(hostname)s:443/PLCAPI/ ) ", + default = "https://%(hostname)s:443/PLCAPI/", + flags = Flags.Design) + + pl_user = Attribute("pluser", "PlanetLab account user, as the one to \ + authenticate in the website) ", + flags = Flags.Credential) + + pl_password = Attribute("plpassword", + "PlanetLab account password, as \ + the one to authenticate in the website) ", + flags = Flags.Credential) + + city = Attribute("city", "Constrain location (city) during resource \ + discovery. May use wildcards.", + flags = Flags.Filter) + + country = Attribute("country", "Constrain location (country) during \ + resource discovery. May use wildcards.", + flags = Flags.Filter) + + region = Attribute("region", "Constrain location (region) during \ + resource discovery. May use wildcards.", + flags = Flags.Filter) + + architecture = Attribute("architecture", "Constrain architecture \ + during resource discovery.", + type = Types.Enumerate, + allowed = ["x86_64", + "i386"], + flags = Flags.Filter) + + operating_system = Attribute("operatingSystem", "Constrain operating \ + system during resource discovery.", + type = Types.Enumerate, + allowed = ["f8", + "f12", + "f14", + "centos", + "other"], + flags = Flags.Filter) + + min_reliability = Attribute("minReliability", "Constrain reliability \ + while picking PlanetLab nodes. Specifies a lower \ + acceptable bound.", + type = Types.Double, + range = (1, 100), + flags = Flags.Filter) + + max_reliability = Attribute("maxReliability", "Constrain reliability \ + while picking PlanetLab nodes. Specifies an upper \ + acceptable bound.", + type = Types.Double, + range = (1, 100), + flags = Flags.Filter) + + min_bandwidth = Attribute("minBandwidth", "Constrain available \ + bandwidth while picking PlanetLab nodes. \ + Specifies a lower acceptable bound.", + type = Types.Double, + range = (0, 2**31), + flags = Flags.Filter) + + max_bandwidth = Attribute("maxBandwidth", "Constrain available \ + bandwidth while picking PlanetLab nodes. \ + Specifies an upper acceptable bound.", + type = Types.Double, + range = (0, 2**31), + flags = Flags.Filter) + + min_load = Attribute("minLoad", "Constrain node load average while \ + picking PlanetLab nodes. Specifies a lower acceptable \ + bound.", + type = Types.Double, + range = (0, 2**31), + flags = Flags.Filter) + + max_load = Attribute("maxLoad", "Constrain node load average while \ + picking PlanetLab nodes. Specifies an upper acceptable \ + bound.", + type = Types.Double, + range = (0, 2**31), + flags = Flags.Filter) + + min_cpu = Attribute("minCpu", "Constrain available cpu time while \ + picking PlanetLab nodes. Specifies a lower acceptable \ + bound.", + type = Types.Double, + range = (0, 100), + flags = Flags.Filter) + + max_cpu = Attribute("maxCpu", "Constrain available cpu time while \ + picking PlanetLab nodes. Specifies an upper acceptable \ + bound.", + type = Types.Double, + range = (0, 100), + flags = Flags.Filter) + + timeframe = Attribute("timeframe", "Past time period in which to check\ + information about the node. Values are year,month, \ + week, latest", + default = "week", + type = Types.Enumerate, + allowed = ["latest", + "week", + "month", + "year"], + flags = Flags.Filter) + + plblacklist = Attribute("persist_blacklist", "Take into account the file plblacklist \ + in the user's home directory under .nepi directory. This file \ + contains a list of PL nodes to blacklist, and at the end \ + of the experiment execution the new blacklisted nodes are added.", + type = Types.Bool, + default = False, + flags = Flags.Global) + + cls._register_attribute(ip) + cls._register_attribute(pl_url) + cls._register_attribute(pl_ptn) + cls._register_attribute(pl_user) + cls._register_attribute(pl_password) + cls._register_attribute(city) + cls._register_attribute(country) + cls._register_attribute(region) + cls._register_attribute(architecture) + cls._register_attribute(operating_system) + cls._register_attribute(min_reliability) + cls._register_attribute(max_reliability) + cls._register_attribute(min_bandwidth) + cls._register_attribute(max_bandwidth) + cls._register_attribute(min_load) + cls._register_attribute(max_load) + cls._register_attribute(min_cpu) + cls._register_attribute(max_cpu) + cls._register_attribute(timeframe) + cls._register_attribute(plblacklist) + + def __init__(self, ec, guid): + super(PlanetlabNode, self).__init__(ec, guid) + + self._ecobj = weakref.ref(ec) + self._plapi = None + self._node_to_provision = None + self._slicenode = False + self._hostname = False + + if self.get("gateway") or self.get("gatewayUser"): + self.set("gateway", None) + self.set("gatewayUser", None) + + # Blacklist file + nepi_home = os.path.join(os.path.expanduser("~"), ".nepi") + plblacklist_file = os.path.join(nepi_home, "plblacklist.txt") + if not os.path.exists(plblacklist_file): + if os.path.isdir(nepi_home): + open(plblacklist_file, 'w').close() + else: + os.makedirs(nepi_home) + open(plblacklist_file, 'w').close() + + def _skip_provision(self): + pl_user = self.get("pluser") + pl_pass = self.get("plpassword") + if not pl_user and not pl_pass: + return True + else: return False + + @property +
[docs] def plapi(self): + if not self._plapi: + pl_user = self.get("pluser") + pl_pass = self.get("plpassword") + pl_url = self.get("plcApiUrl") + pl_ptn = self.get("plcApiPattern") + _plapi = PLCAPIFactory.get_api(pl_user, pl_pass, pl_url, + pl_ptn, self._ecobj()) + + if not _plapi: + self.fail_plapi() + + self._plapi = weakref.ref(_plapi) + + return self._plapi() +
+
[docs] def do_discover(self): + """ + Based on the attributes defined by the user, discover the suitable + nodes for provision. + """ + if self._skip_provision(): + super(PlanetlabNode, self).do_discover() + return + + hostname = self._get_hostname() + if hostname: + # the user specified one particular node to be provisioned + self._hostname = True + node_id = self._get_nodes_id({'hostname':hostname}) + node_id = node_id.pop()['node_id'] + + # check that the node is not blacklisted or being provisioned + # by other RM + with PlanetlabNode.lock: + plist = self.plapi.reserved() + blist = self.plapi.blacklisted() + if node_id not in blist and node_id not in plist: + + # check that is really alive, by performing ping + ping_ok = self._do_ping(node_id) + if not ping_ok: + self._blacklist_node(node_id) + self.fail_node_not_alive(hostname) + else: + if self._check_if_in_slice([node_id]): + self._slicenode = True + self._put_node_in_provision(node_id) + self._node_to_provision = node_id + else: + self.fail_node_not_available(hostname) + super(PlanetlabNode, self).do_discover() + + else: + # the user specifies constraints based on attributes, zero, one or + # more nodes can match these constraints + nodes = self._filter_based_on_attributes() + + # nodes that are already part of user's slice have the priority to + # provisioned + nodes_inslice = self._check_if_in_slice(nodes) + nodes_not_inslice = list(set(nodes) - set(nodes_inslice)) + + node_id = None + if nodes_inslice: + node_id = self._choose_random_node(nodes_inslice) + self._slicenode = True + + if not node_id: + # Either there were no matching nodes in the user's slice, or + # the nodes in the slice were blacklisted or being provisioned + # by other RM. Note nodes_not_inslice is never empty + node_id = self._choose_random_node(nodes_not_inslice) + self._slicenode = False + + if node_id: + self._node_to_provision = node_id + try: + self._set_hostname_attr(node_id) + self.info(" Selected node to provision ") + super(PlanetlabNode, self).do_discover() + except: + with PlanetlabNode.lock: + self._blacklist_node(node_id) + self.do_discover() + else: + self.fail_not_enough_nodes() +
+
[docs] def do_provision(self): + """ + Add node to user's slice after verifing that the node is functioning + correctly + """ + if self._skip_provision(): + super(PlanetlabNode, self).do_provision() + return + + provision_ok = False + ssh_ok = False + proc_ok = False + timeout = 1800 + + while not provision_ok: + node = self._node_to_provision + if not self._slicenode: + self._add_node_to_slice(node) + if self._check_if_in_slice([node]): + self.debug( "Node added to slice" ) + else: + self.warning(" Could not add to slice ") + with PlanetlabNode.lock: + self._blacklist_node(node) + self.do_discover() + continue + + # check ssh connection + t = 0 + while t < timeout and not ssh_ok: + + cmd = 'echo \'GOOD NODE\'' + ((out, err), proc) = self.execute(cmd) + if out.find("GOOD NODE") < 0: + self.debug( "No SSH connection, waiting 60s" ) + t = t + 60 + time.sleep(60) + continue + else: + self.debug( "SSH OK" ) + ssh_ok = True + continue + else: + cmd = 'echo \'GOOD NODE\'' + ((out, err), proc) = self.execute(cmd) + if not out.find("GOOD NODE") < 0: + ssh_ok = True + + if not ssh_ok: + # the timeout was reach without establishing ssh connection + # the node is blacklisted, deleted from the slice, and a new + # node to provision is discovered + with PlanetlabNode.lock: + self.warning(" Could not SSH login ") + self._blacklist_node(node) + #self._delete_node_from_slice(node) + self.do_discover() + continue + + # check /proc directory is mounted (ssh_ok = True) + # and file system is not read only + else: + cmd = 'mount |grep proc' + ((out1, err1), proc1) = self.execute(cmd) + cmd = 'touch /tmp/tmpfile; rm /tmp/tmpfile' + ((out2, err2), proc2) = self.execute(cmd) + if out1.find("/proc type proc") < 0 or \ + "Read-only file system".lower() in err2.lower(): + with PlanetlabNode.lock: + self.warning(" Corrupted file system ") + self._blacklist_node(node) + #self._delete_node_from_slice(node) + self.do_discover() + continue + + else: + provision_ok = True + if not self.get('hostname'): + self._set_hostname_attr(node) + # set IP attribute + ip = self._get_ip(node) + self.set("ip", ip) + self.info(" Node provisioned ") + + super(PlanetlabNode, self).do_provision() +
+
[docs] def do_release(self): + super(PlanetlabNode, self).do_release() + if self.state == ResourceState.RELEASED and not self._skip_provision(): + self.debug(" Releasing PLC API ") + self.plapi.release() +
+ def _filter_based_on_attributes(self): + """ + Retrive the list of nodes ids that match user's constraints + """ + # Map user's defined attributes with tagnames of PlanetLab + timeframe = self.get("timeframe")[0] + attr_to_tags = { + 'city' : 'city', + 'country' : 'country', + 'region' : 'region', + 'architecture' : 'arch', + 'operatingSystem' : 'fcdistro', + 'minReliability' : 'reliability%s' % timeframe, + 'maxReliability' : 'reliability%s' % timeframe, + 'minBandwidth' : 'bw%s' % timeframe, + 'maxBandwidth' : 'bw%s' % timeframe, + 'minLoad' : 'load%s' % timeframe, + 'maxLoad' : 'load%s' % timeframe, + 'minCpu' : 'cpu%s' % timeframe, + 'maxCpu' : 'cpu%s' % timeframe, + } + + nodes_id = [] + filters = {} + + for attr_name, attr_obj in self._attrs.iteritems(): + attr_value = self.get(attr_name) + + if attr_value is not None and attr_obj.has_flag(Flags.Filter) and \ + attr_name != 'timeframe': + + attr_tag = attr_to_tags[attr_name] + filters['tagname'] = attr_tag + + # filter nodes by fixed constraints e.g. operating system + if not 'min' in attr_name and not 'max' in attr_name: + filters['value'] = attr_value + nodes_id = self._filter_by_fixed_attr(filters, nodes_id) + + # filter nodes by range constraints e.g. max bandwidth + elif ('min' or 'max') in attr_name: + nodes_id = self._filter_by_range_attr(attr_name, attr_value, filters, nodes_id) + + if not filters: + nodes = self._get_nodes_id() + for node in nodes: + nodes_id.append(node['node_id']) + return nodes_id + + def _filter_by_fixed_attr(self, filters, nodes_id): + """ + Query PLCAPI for nodes ids matching fixed attributes defined by the + user + """ + node_tags = self.plapi.get_node_tags(filters) + if node_tags is not None: + + if len(nodes_id) == 0: + # first attribute being matched + for node_tag in node_tags: + nodes_id.append(node_tag['node_id']) + else: + # remove the nodes ids that don't match the new attribute + # that is being match + + nodes_id_tmp = [] + for node_tag in node_tags: + if node_tag['node_id'] in nodes_id: + nodes_id_tmp.append(node_tag['node_id']) + + if len(nodes_id_tmp): + nodes_id = set(nodes_id) & set(nodes_id_tmp) + else: + # no node from before match the new constraint + self.fail_discovery() + else: + # no nodes match the filter applied + self.fail_discovery() + + return nodes_id + + def _filter_by_range_attr(self, attr_name, attr_value, filters, nodes_id): + """ + Query PLCAPI for nodes ids matching attributes defined in a certain + range, by the user + """ + node_tags = self.plapi.get_node_tags(filters) + if node_tags: + + if len(nodes_id) == 0: + # first attribute being matched + for node_tag in node_tags: + + # check that matches the min or max restriction + if 'min' in attr_name and node_tag['value'] != 'n/a' and \ + float(node_tag['value']) > attr_value: + nodes_id.append(node_tag['node_id']) + + elif 'max' in attr_name and node_tag['value'] != 'n/a' and \ + float(node_tag['value']) < attr_value: + nodes_id.append(node_tag['node_id']) + else: + + # remove the nodes ids that don't match the new attribute + # that is being match + nodes_id_tmp = [] + for node_tag in node_tags: + + # check that matches the min or max restriction and was a + # matching previous filters + if 'min' in attr_name and node_tag['value'] != 'n/a' and \ + float(node_tag['value']) > attr_value and \ + node_tag['node_id'] in nodes_id: + nodes_id_tmp.append(node_tag['node_id']) + + elif 'max' in attr_name and node_tag['value'] != 'n/a' and \ + float(node_tag['value']) < attr_value and \ + node_tag['node_id'] in nodes_id: + nodes_id_tmp.append(node_tag['node_id']) + + if len(nodes_id_tmp): + nodes_id = set(nodes_id) & set(nodes_id_tmp) + else: + # no node from before match the new constraint + self.fail_discovery() + + else: #TODO CHECK + # no nodes match the filter applied + self.fail_discovery() + + return nodes_id + + def _choose_random_node(self, nodes): + """ + From the possible nodes for provision, choose randomly to decrese the + probability of different RMs choosing the same node for provision + """ + size = len(nodes) + while size: + size = size - 1 + index = randint(0, size) + node_id = nodes[index] + nodes[index] = nodes[size] + + # check the node is not blacklisted or being provision by other RM + # and perform ping to check that is really alive + with PlanetlabNode.lock: + + blist = self.plapi.blacklisted() + plist = self.plapi.reserved() + if node_id not in blist and node_id not in plist: + ping_ok = self._do_ping(node_id) + if not ping_ok: + self._set_hostname_attr(node_id) + self.warning(" Node not responding PING ") + self._blacklist_node(node_id) + else: + # discovered node for provision, added to provision list + self._put_node_in_provision(node_id) + return node_id + + def _get_nodes_id(self, filters=None): + return self.plapi.get_nodes(filters, fields=['node_id']) + + def _add_node_to_slice(self, node_id): + self.info(" Adding node to slice ") + slicename = self.get("username") + with PlanetlabNode.lock: + slice_nodes = self.plapi.get_slice_nodes(slicename) + self.debug(" Previous slice nodes %s " % slice_nodes) + slice_nodes.append(node_id) + self.plapi.add_slice_nodes(slicename, slice_nodes) + + def _delete_node_from_slice(self, node): + self.warning(" Deleting node from slice ") + slicename = self.get("username") + self.plapi.delete_slice_node(slicename, [node]) + + def _get_hostname(self): + hostname = self.get("hostname") + if hostname: + return hostname + ip = self.get("ip") + if ip: + hostname = socket.gethostbyaddr(ip)[0] + self.set('hostname', hostname) + return hostname + else: + return None + + def _set_hostname_attr(self, node): + """ + Query PLCAPI for the hostname of a certain node id and sets the + attribute hostname, it will over write the previous value + """ + hostname = self.plapi.get_nodes(node, ['hostname']) + self.set("hostname", hostname[0]['hostname']) + + def _check_if_in_slice(self, nodes_id): + """ + Query PLCAPI to find out if any node id from nodes_id is in the user's + slice + """ + slicename = self.get("username") + slice_nodes = self.plapi.get_slice_nodes(slicename) + nodes_inslice = list(set(nodes_id) & set(slice_nodes)) + return nodes_inslice + + def _do_ping(self, node_id): + """ + Perform ping command on node's IP matching node id + """ + ping_ok = False + ip = self._get_ip(node_id) + if ip: + command = "ping -c4 %s" % ip + (out, err) = lexec(command) + + m = re.search("(\d+)% packet loss", str(out)) + if m and int(m.groups()[0]) < 50: + ping_ok = True + + return ping_ok + + def _blacklist_node(self, node): + """ + Add node mal functioning node to blacklist + """ + self.warning(" Blacklisting malfunctioning node ") + self.plapi.blacklist_host(node) + if not self._hostname: + self.set('hostname', None) + + def _put_node_in_provision(self, node): + """ + Add node to the list of nodes being provisioned, in order for other RMs + to not try to provision the same one again + """ + self.plapi.reserve_host(node) + + def _get_ip(self, node_id): + """ + Query PLCAPI for the IP of a node with certain node id + """ + hostname = self.get("hostname") or \ + self.plapi.get_nodes(node_id, ['hostname'])[0]['hostname'] + try: + ip = sshfuncs.gethostbyname(hostname) + except: + # Fail while trying to find the IP + return None + return ip + +
[docs] def fail_discovery(self): + msg = "Discovery failed. No candidates found for node" + self.error(msg) + raise RuntimeError, msg +
+
[docs] def fail_node_not_alive(self, hostname=None): + msg = "Node %s not alive" % hostname + raise RuntimeError, msg +
+
[docs] def fail_node_not_available(self, hostname): + msg = "Node %s not available for provisioning" % hostname + raise RuntimeError, msg +
+
[docs] def fail_not_enough_nodes(self): + msg = "Not enough nodes available for provisioning" + raise RuntimeError, msg +
+
[docs] def fail_plapi(self): + msg = "Failing while trying to instanciate the PLC API.\nSet the" + \ + " attributes pluser and plpassword." + raise RuntimeError, msg +
+
[docs] def valid_connection(self, guid): + # TODO: Validate! + return True +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/planetlab/ns3/fdudptunnel.html b/doc/sphinx/_build/html/_modules/nepi/resources/planetlab/ns3/fdudptunnel.html new file mode 100644 index 00000000..a0543e36 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/planetlab/ns3/fdudptunnel.html @@ -0,0 +1,164 @@ + + + + + + + + nepi.resources.planetlab.ns3.fdudptunnel — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.planetlab.ns3.fdudptunnel

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.resource import clsinit_copy, ResourceState
+from nepi.resources.linux.ns3.fdudptunnel import LinuxNs3FdUdpTunnel
+from nepi.util.sshfuncs import ProcStatus
+from nepi.util.timefuncs import tnow, tdiffsec
+
+import base64
+import os
+import socket
+import time
+
+@clsinit_copy
+
[docs]class PlanetlabNs3FdUdpTunnel(LinuxNs3FdUdpTunnel): + _rtype = "planetlab::ns3::FdUdpTunnel" + _help = "Constructs a tunnel between two Ns-3 FdNetdevices " \ + "located in remote PlanetLab nodes using a UDP connection " + _platform = "planetlab::ns3" + +
[docs] def get_endpoints(self): + """ Returns the list of RM that are endpoints to the tunnel + """ + if not self._fd2 or not self._fd1: + from nepi.resources.ns3.ns3fdnetdevice import NS3BaseFdNetDevice + devices = self.get_connected(NS3BaseFdNetDevice.get_rtype()) + if not devices or len(devices) != 2: + msg = "Tunnel must be connected to exactly two FdNetDevices" + self.error(msg) + raise RuntimeError, msg + + self._fd1 = devices[0] + self._fd2 = devices[1] + self._pi = True + + # Set PI headers on + self._fd1.set("EncapsulationMode", "DixPi") + self._fd2.set("EncapsulationMode", "DixPi") + + simu = self._fd1.simulation + from nepi.resources.linux.node import LinuxNode + nodes = simu.get_connected(LinuxNode.get_rtype()) + self._fd1node = nodes[0] + + simu = self._fd2.simulation + from nepi.resources.linux.node import LinuxNode + nodes = simu.get_connected(LinuxNode.get_rtype()) + self._fd2node = nodes[0] + + if self._fd1node.get("hostname") == \ + self._fd2node.get("hostname"): + msg = "Tunnel requires endpoints on different hosts" + self.error(msg) + raise RuntimeError, msg + + return [self._fd1, self._fd2] +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/planetlab/ns3/tuntapfdlink.html b/doc/sphinx/_build/html/_modules/nepi/resources/planetlab/ns3/tuntapfdlink.html new file mode 100644 index 00000000..ffbc91c3 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/planetlab/ns3/tuntapfdlink.html @@ -0,0 +1,183 @@ + + + + + + + + nepi.resources.planetlab.ns3.tuntapfdlink — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.planetlab.ns3.tuntapfdlink

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2014 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.resource import ResourceState, clsinit_copy
+from nepi.resources.linux.ns3.tuntapfdlink import LinuxTunTapFdLink
+
+import base64
+import fcntl
+import os
+import socket
+import struct
+
+@clsinit_copy
+
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/planetlab/openvswitch/ovs.html b/doc/sphinx/_build/html/_modules/nepi/resources/planetlab/openvswitch/ovs.html new file mode 100644 index 00000000..a1198604 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/planetlab/openvswitch/ovs.html @@ -0,0 +1,406 @@ + + + + + + + + nepi.resources.planetlab.openvswitch.ovs — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.planetlab.openvswitch.ovs

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Authors: Alina Quereilhac <alina.quereilhac@inria.fr>
+#         Alexandros Kouvakas <alexandros.kouvakas@inria.fr>
+#         Julien Tribino <julien.tribino@inria.fr>
+
+
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.execution.attribute import Attribute, Flags
+from nepi.resources.planetlab.node import PlanetlabNode        
+from nepi.resources.linux.application import LinuxApplication
+import os
+
+@clsinit_copy                    
+
[docs]class PlanetlabOVSSwitch(LinuxApplication): + """ + .. class:: Class Args : + + :param ec: The Experiment controller + :type ec: ExperimentController + :param guid: guid of the RM + :type guid: int + + """ + + _rtype = "planetlab::OVSSwitch" + _help = "Runs an OpenVSwitch on a PlanetLab host" + _platform = "planetlab" + + _authorized_connections = ["planetlab::Node", "planetla::OVSPort", "linux::Node"] + + @classmethod + def _register_attributes(cls): + """ Register the attributes of OVSSwitch RM + + """ + bridge_name = Attribute("bridge_name", + "Name of the switch/bridge", + flags = Flags.Design) + virtual_ip_pref = Attribute("virtual_ip_pref", + "Virtual IP/PREFIX of the switch", + flags = Flags.Design) + controller_ip = Attribute("controller_ip", + "IP of the controller", + flags = Flags.Design) + controller_port = Attribute("controller_port", + "Port of the controller", + flags = Flags.Design) + + cls._register_attribute(bridge_name) + cls._register_attribute(virtual_ip_pref) + cls._register_attribute(controller_ip) + cls._register_attribute(controller_port) + + def __init__(self, ec, guid): + """ + :param ec: The Experiment controller + :type ec: ExperimentController + :param guid: guid of the RM + :type guid: int + + """ + super(PlanetlabOVSSwitch, self).__init__(ec, guid) + self._home = "ovsswitch-%s" % self.guid + self._node = None + + @property +
[docs] def node(self): + """ Node wthat run the switch + """ + if not self._node: + nodes = self.get_connected(PlanetlabNode.get_rtype()) + if not nodes or len(nodes) != 1: + msg = "PlanetlabOVSSwitch must be connected to exactly one PlanetlabNode" + #self.error(msg) + raise RuntimeError, msg + + self._node = nodes[0] + + return self._node +
+
[docs] def valid_connection(self, guid): + """ Check if the connection with the guid in parameter is possible. Only meaningful connections are allowed. + + :param guid: Guid of the current RM + :type guid: int + :rtype: Boolean + + """ + rm = self.ec.get_resource(guid) + if rm.get_rtype() not in self._authorized_connections: + return False + return True +
+
[docs] def do_provision(self): + self.node.mkdir(self.run_home) + + self.check_sliver_ovs() + self.servers_on() + self.create_bridge() + self.assign_controller() + self.ovs_status() + + self.set_provisioned() +
+
[docs] def do_deploy(self): + """ Deploy the OVS Switch : Turn on the server, create the bridges + and assign the controller + """ + + if not self.node or self.node.state < ResourceState.READY: + self.debug("---- RESCHEDULING DEPLOY ---- node state %s " % self.node.state) + self.ec.schedule(self.reschedule_delay, self.deploy) + else: + self.do_discover() + self.do_provision() + + self.set_ready() +
+
[docs] def check_sliver_ovs(self): + """ Check if sliver-ovs exists. If it does not exist, the execution is stopped + """ + command = "compgen -c | grep sliver-ovs" + shfile = os.path.join(self.app_home, "check_ovs_cmd.sh") + try: + self.node.run_and_wait(command, self.run_home, + shfile=shfile, + sudo = True, + pidfile="check_ovs_cmd_pidfile", + ecodefile="check_ovs_cmd_exitcode", + stdout="check_ovs_cmd_stdout", + stderr="check_ovs_cmd_stderr") + except RuntimeError: + msg = "Command sliver-ovs does not exist on the VM" + self.debug(msg) + raise RuntimeError, msg +
+
[docs] def servers_on(self): + """ Start the openvswitch servers and check it + """ + # Make sure the server is not running + command = "sliver-ovs del-bridge %s; sliver-ovs stop" % self.get('bridge_name') + shfile = os.path.join(self.app_home, "clean.sh") + self.node.run_and_wait(command, self.run_home, + shfile=shfile, + sudo=True, + raise_on_error=False, + pidfile="clean_pidfile", + ecodefile="clean_exitcode", + stdout="clean_stdout", + stderr="clean_stderr") + + # start the server + command = "sliver-ovs start" + shfile = os.path.join(self.app_home, "start.sh") + try: + self.node.run_and_wait(command, self.run_home, + shfile=shfile, + sudo=True, + pidfile="start_pidfile", + ecodefile="start_exitcode", + stdout="start_stdout", + stderr="start_stderr") + except RuntimeError: + msg = "Failed to start ovs-server on VM" + self.debug(msg) + raise RuntimeError, msg + + command = "ps -A | grep ovsdb-server" + shfile = os.path.join(self.app_home, "ovsdb_status.sh") + try: + self.node.run_and_wait(command, self.run_home, + shfile=shfile, + sudo=True, + pidfile="ovsdb_status_pidfile", + ecodefile="ovsdb_status_exitcode", + stdout="ovsdb_status_stdout", + stderr="ovsdb_status_stderr") + except RuntimeError: + msg = "ovsdb-server not running on VM" + self.debug(msg) + raise RuntimeError, msg + + self.info("Server OVS Started...") +
+
[docs] def create_bridge(self): + """ Create the bridge/switch and check error during SSH connection + """ + # TODO: Check if previous bridge exist and delete them. Use ovs-vsctl list-br + # TODO: Add check for virtual_ip belonging to vsys_tag + if not (self.get("bridge_name") and self.get("virtual_ip_pref")): + msg = "No assignment in one or both attributes" + self.error(msg) + raise AttributeError, msg + + command = "sliver-ovs create-bridge '%s' '%s'" % ( + self.get("bridge_name"), + self.get("virtual_ip_pref")) + + shfile = os.path.join(self.app_home, "bridge_create.sh") + try: + self.node.run_and_wait(command, self.run_home, + shfile=shfile, + sudo=True, + pidfile="bridge_create_pidfile", + ecodefile="bridge_create_exitcode", + stdout="bridge_create_stdout", + stderr="bridge_create_stderr") + except RuntimeError: + msg = "No such pltap netdev\novs-appctl: ovs-vswitchd: server returned an error" + self.debug(msg) + raise RuntimeError, msg + + self.info(" Bridge %s Created and Assigned to %s" %\ + (self.get("bridge_name"), self.get("virtual_ip_pref")) ) +
+
[docs] def assign_controller(self): + """ Set the controller IP + """ + + if not (self.get("controller_ip") and self.get("controller_port")): + return + + """ + if not (self.get("controller_ip") and self.get("controller_port")): + msg = "No assignment in one or both attributes" + self.error(msg) + raise AttributeError, msg + """ + command = "ovs-vsctl set-controller %s tcp:%s:%s" % \ + (self.get("bridge_name"), + self.get("controller_ip"), + self.get("controller_port")) + + shfile = os.path.join(self.app_home, "set_controller.sh") + try: + self.node.run_and_wait(command, self.run_home, + shfile=shfile, + sudo=True, + pidfile="set_controller_pidfile", + ecodefile="set_controller_exitcode", + stdout="set_controller_stdout", + stderr="set_controller_stderr") + except RuntimeError: + msg = "SSH connection in the method assign_controller" + self.debug(msg) + raise RuntimeError, msg + + self.info("Controller assigned to the bridge %s" % self.get("bridge_name")) +
+
[docs] def ovs_status(self): + """ Print the status of the bridge + """ + command = "sliver-ovs show | tail -n +2" + shfile = os.path.join(self.app_home, "ovs_status.sh") + try: + self.node.run_and_wait(command, self.run_home, + shfile=shfile, + sudo=True, + pidfile="ovs_status_pidfile", + ecodefile="ovs_status_exitcode", + stdout="ovs_status_stdout", + stderr="ovs_status_stderr") + except RuntimeError: + msg = "Error when checking the status of the OpenVswitch" + self.debug(msg) + raise RuntimeError, msg +
+
[docs] def do_release(self): + """ Delete the bridge and close the server. + + .. note : It need to wait for the others RM (OVSPort and OVSTunnel) + to be released before releasing itself + + """ + + from nepi.resources.planetlab.openvswitch.ovsport import PlanetlabOVSPort + rms = self.get_connected(PlanetlabOVSPort.get_rtype()) + + for rm in rms: + if rm.state < ResourceState.RELEASED: + self.ec.schedule(self.reschedule_delay, self.release) + return + + msg = "Deleting the bridge %s" % self.get('bridge_name') + self.info(msg) + + command = "sliver-ovs del-bridge %s; sliver-ovs stop" % self.get('bridge_name') + shfile = os.path.join(self.app_home, "stop.sh") + + self.node.run_and_wait(command, self.run_home, + shfile=shfile, + sudo=True, + pidfile="stop_pidfile", + ecodefile="stop_exitcode", + stdout="stop_stdout", + stderr="stop_stderr") + + super(PlanetlabOVSSwitch, self).do_release() +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/planetlab/openvswitch/ovsport.html b/doc/sphinx/_build/html/_modules/nepi/resources/planetlab/openvswitch/ovsport.html new file mode 100644 index 00000000..3ef19467 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/planetlab/openvswitch/ovsport.html @@ -0,0 +1,384 @@ + + + + + + + + nepi.resources.planetlab.openvswitch.ovsport — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.planetlab.openvswitch.ovsport

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Authors: Alina Quereilhac <alina.quereilhac@inria.fr>
+#         Alexandros Kouvakas <alexandros.kouvakas@inria.fr>
+#         Julien Tribino <julien.tribino@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.planetlab.openvswitch.ovs import PlanetlabOVSSwitch        
+from nepi.resources.planetlab.node import PlanetlabNode        
+from nepi.resources.linux.application import LinuxApplication
+
+import os
+
+@clsinit_copy                 
+
[docs]class PlanetlabOVSPort(LinuxApplication): + """ + .. class:: Class Args : + + :param ec: The Experiment controller + :type ec: ExperimentController + :param guid: guid of the RM + :type guid: int + + """ + + _rtype = "planetlab::OVSPort" + _help = "Runs an OpenVSwitch on a PlanetLab host" + _platform = "planetlab" + + _authorized_connections = ["planetlab::OVSSwitch", "linux::UdpTunnel", "linux::Tunnel"] + + @classmethod + def _register_attributes(cls): + """ Register the attributes of OVSPort RM + + """ + port_name = Attribute("port_name", "Name of the port", + flags = Flags.Design) + ip = Attribute("ip", "IP of the endpoint. This is the attribute " + "you should use to establish a tunnel or a remote " + "connection between endpoint", + flags = Flags.Design) + network = Attribute("network", "Network used by the port", + flags = Flags.Design) + + cls._register_attribute(port_name) + cls._register_attribute(ip) + cls._register_attribute(network) + + def __init__(self, ec, guid): + """ + :param ec: The Experiment controller + :type ec: ExperimentController + :param guid: guid of the RM + :type guid: int + + """ + super(PlanetlabOVSPort, self).__init__(ec, guid) + self._home = "ovsport-%s" % self.guid + self._port_number = None + + @property +
[docs] def node(self): + """ Node that run the switch and the ports + """ + return self.ovsswitch.node +
+ @property +
[docs] def ovsswitch(self): + """ Switch where the port is created + """ + ovsswitch = self.get_connected(PlanetlabOVSSwitch.get_rtype()) + if ovsswitch: return ovsswitch[0] + return None +
+ @property +
[docs] def port_number(self): + return self._port_number +
+
[docs] def valid_connection(self, guid): + """ Check if the connection is available. + + :param guid: Guid of the current RM + :type guid: int + :rtype: Boolean + + """ + rm = self.ec.get_resource(guid) + if rm.get_rtype() not in self._authorized_connections: + return False + + return True +
+
[docs] def create_port(self): + """ Create the desired port + """ + msg = "Creating the port %s" % self.get('port_name') + self.debug(msg) + + if not self.get('port_name'): + msg = "The port name is not assigned" + self.error(msg) + raise AttributeError, msg + + if not self.ovsswitch: + msg = "The OVSwitch RM is not running" + self.error(msg) + raise AttributeError, msg + + command = "sliver-ovs create-port %s %s" % ( + self.ovsswitch.get('bridge_name'), + self.get('port_name')) + + shfile = os.path.join(self.app_home, "create_port.sh") + try: + self.node.run_and_wait(command, self.run_home, + shfile=shfile, + sudo = True, + stderr="port_stdout", + stdout="port_stderr", + pidfile="port_pidfile", + ecodefile="port_exitcode") + except RuntimeError: + msg = "Could not create ovs-port" + self.debug(msg) + raise RuntimeError, msg + + self.info("Created port %s on switch %s" % ( + self.get('port_name'), + self.ovsswitch.get('bridge_name'))) +
+
[docs] def initiate_udp_connection(self, remote_endpoint, connection_app_home, + connection_run_home, cipher, cipher_key, bwlimit, txqueuelen): + """ Get the local_endpoint of the port + """ + msg = "Discovering the port number for %s" % self.get('port_name') + self.info(msg) + + command = "sliver-ovs get-local-endpoint %s" % self.get('port_name') + + shfile = os.path.join(connection_app_home, "get_port.sh") + (out, err), proc = self.node.run_and_wait(command, connection_run_home, + shfile=shfile, + sudo=True, + overwrite = True, + pidfile="get_port_pidfile", + ecodefile="get_port_exitcode", + stdout="get_port_stdout", + stderr="get_port_stderr") + + if err != "": + msg = "Error retrieving the local endpoint of the port" + self.error(msg) + raise RuntimeError, msg + + if out: + self._port_number = out.strip() + + self.info("The number of the %s is %s" % (self.get('port_name'), + self.port_number)) + + # Must set a routing rule in the ovs client nodes so they know + # that the LAN can be found through the switch + if remote_endpoint.is_rm_instance("planetlab::Tap"): + self._vroute = self.ec.register_resource("planetlab::Vroute") + self.ec.set(self._vroute, "action", "add") + self.ec.set(self._vroute, "prefix", remote_endpoint.get("prefix")) + self.ec.set(self._vroute, "nexthop", remote_endpoint.get("pointopoint")) + self.ec.set(self._vroute, "network", self.get("network")) + + self.ec.register_connection(self._vroute, remote_endpoint.guid) + self.ec.deploy(guids=[self._vroute], group = self.deployment_group) + + # For debugging + msg = "Route for the tap configured" + self.debug(msg) + + return self.port_number +
+
[docs] def establish_udp_connection(self, remote_endpoint, + connection_app_home, + connection_run_home, + port): + remote_ip = remote_endpoint.node.get("ip") + command = self._establish_connection_command(port, remote_ip) + + shfile = os.path.join(connection_app_home, "connect_port.sh") + (out, err), proc = self.node.run_and_wait(command, connection_run_home, + shfile=shfile, + sudo=True, + overwrite = True, + pidfile="connect_port_pidfile", + ecodefile="connect_port_exitcode", + stdout="connect_port_stdout", + stderr="connect_port_stderr") + + # For debugging + msg = "Connection on port configured" + self.debug(msg) +
+ def _establish_connection_command(self, port, remote_ip): + """ Script to create the connection from a switch to a + remote endpoint + """ + local_port_name = self.get('port_name') + + command = ["sliver-ovs"] + command.append("set-remote-endpoint") + command.append(local_port_name) + command.append(remote_ip) + command.append(port) + command = " ".join(command) + command = self.replace_paths(command) + return command + +
[docs] def verify_connection(self, remote_endpoint, connection_app_home, + connection_run_home): + self.ovsswitch.ovs_status() +
+
[docs] def terminate_connection(self, endpoint, connection_app_home, + connection_run_home): + return True +
+
[docs] def check_status(self): + return self.node.status(self._pid, self._ppid) +
+
[docs] def do_provision(self): + self.node.mkdir(self.run_home) + + self.create_port() + end_ip = self.ovsswitch.get('virtual_ip_pref').split('/') + self.set("ip", end_ip[0]) + + #Check the status of the OVS Switch + self.ovsswitch.ovs_status() + + self.set_provisioned() +
+
[docs] def do_deploy(self): + """ Deploy the OVS port after the OVS Switch + """ + if not self.ovsswitch or self.ovsswitch.state < ResourceState.READY: + self.debug("---- RESCHEDULING DEPLOY ---- OVSwitch state %s " % self.ovsswitch.state ) + self.ec.schedule(self.reschedule_delay, self.deploy) + else: + self.do_discover() + self.do_provision() + + self.set_ready() +
+
[docs] def do_release(self): + """ Delete the port on the OVSwitch. It needs to wait for the tunnel + to be released. + """ + from nepi.resources.linux.udptunnel import LinuxUdpTunnel + rm = self.get_connected(LinuxUdpTunnel.get_rtype()) + + if rm and rm[0].state < ResourceState.STOPPED: + self.ec.schedule(self.reschedule_delay, self.release) + return + + msg = "Deleting the port %s" % self.get('port_name') + self.info(msg) + + command = "sliver-ovs del_port %s" % self.get('port_name') + + shfile = os.path.join(self.app_home, "stop.sh") + self.node.run_and_wait(command, self.run_home, + shfile=shfile, + sudo=True, + pidfile="stop_pidfile", + ecodefile="stop_exitcode", + stdout="stop_stdout", + stderr="stop_stderr") + + super(PlanetlabOVSPort, self).do_release() +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/planetlab/plcapi.html b/doc/sphinx/_build/html/_modules/nepi/resources/planetlab/plcapi.html new file mode 100644 index 00000000..0a560cba --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/planetlab/plcapi.html @@ -0,0 +1,676 @@ + + + + + + + + nepi.resources.planetlab.plcapi — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.planetlab.plcapi

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+import functools
+import hashlib
+import socket
+import os
+import time
+import threading
+import xmlrpclib
+
+def _retry(fn):
+    def rv(*p, **kw):
+        for x in xrange(5):
+            try:
+                return fn(*p, **kw)
+            except (socket.error, IOError, OSError):
+                time.sleep(x*5+5)
+        else:
+            return fn (*p, **kw)
+    return rv
+
+
[docs]class PLCAPI(object): + + _expected_methods = set( + ['AddNodeTag', 'AddConfFile', 'DeletePersonTag', 'AddNodeType', + 'DeleteBootState', 'SliceListNames', 'DeleteKey','SliceGetTicket', + 'SliceUsersList', 'SliceUpdate', 'GetNodeGroups', 'SliceCreate', + 'GetNetworkMethods', 'GetNodeFlavour', 'DeleteNode', 'BootNotifyOwners', + 'AddPersonKey', 'AddNode', 'UpdateNodeGroup', 'GetAddressTypes', + 'AddIlink', 'DeleteNetworkType', 'GetInitScripts', 'GenerateNodeConfFile', + 'AddSite', 'BindObjectToPeer', 'SliceListUserSlices', 'GetPeers', + 'AddPeer', 'DeletePeer', 'AddRole', 'DeleteRole', 'SetPersonPrimarySite', + 'AddSiteAddress', 'SliceDelete', 'NotifyPersons', 'GetKeyTypes', + 'GetConfFiles', 'GetIlinks', 'AddTagType', 'GetNodes', 'DeleteNodeTag', + 'DeleteSliceFromNodesWhitelist', 'UpdateAddress', 'ResetPassword', + 'AddSliceToNodesWhitelist', 'AddRoleToTagType', 'AddLeases', + 'GetAddresses', 'AddInitScript', 'RebootNode', 'GetPCUTypes', + 'RefreshPeer', 'GetBootMedium', 'UpdateKey', 'UpdatePCU', 'GetSession', + 'AddInterfaceTag', 'UpdatePCUType', 'GetInterfaces', 'SliceExtendedInfo', + 'SliceNodesList', 'DeleteRoleFromTagType', 'DeleteSlice', 'GetSites', + 'DeleteMessage', 'GetSliceFamily', 'GetPlcRelease', 'UpdateTagType', + 'AddSliceInstantiation', 'ResolveSlices', 'GetSlices', + 'DeleteRoleFromPerson', 'GetSessions', 'UpdatePeer', 'VerifyPerson', + 'GetPersonTags', 'DeleteKeyType', 'AddSlice', 'SliceUserAdd', + 'DeleteSession', 'GetMessages', 'DeletePCU', 'GetPeerData', + 'DeletePersonFromSite', 'DeleteTagType', 'GetPCUs', 'UpdateLeases', + 'AddMessage', 'DeletePCUProtocolType', 'DeleteInterfaceTag', + 'AddPersonToSite', 'GetSlivers', 'SliceNodesDel', + 'DeleteAddressTypeFromAddress', 'AddNodeGroup', 'GetSliceTags', + 'DeleteSite', 'GetSiteTags', 'UpdateMessage', 'DeleteSliceFromNodes', + 'SliceRenew', 'UpdatePCUProtocolType', 'DeleteSiteTag', + 'GetPCUProtocolTypes', 'GetEvents', 'GetSliceTicket', 'AddPersonTag', + 'BootGetNodeDetails', 'DeleteInterface', 'DeleteNodeGroup', + 'AddPCUProtocolType', 'BootCheckAuthentication', 'AddSiteTag', + 'AddAddressTypeToAddress', 'DeleteConfFile', 'DeleteInitScript', + 'DeletePerson', 'DeleteIlink', 'DeleteAddressType', 'AddBootState', + 'AuthCheck', 'NotifySupport', 'GetSliceInstantiations', 'AddPCUType', + 'AddPCU', 'AddSession', 'GetEventObjects', 'UpdateSiteTag', + 'UpdateNodeTag', 'AddPerson', 'BlacklistKey', 'UpdateInitScript', + 'AddSliceToNodes', 'RebootNodeWithPCU', 'GetNodeTags', 'GetSliceKeys', + 'GetSliceSshKeys', 'AddNetworkMethod', 'SliceNodesAdd', + 'DeletePersonFromSlice', 'ReportRunlevel', 'GetNetworkTypes', + 'UpdateSite', 'DeleteConfFileFromNodeGroup', 'UpdateNode', + 'DeleteSliceInstantiation', 'DeleteSliceTag', 'BootUpdateNode', + 'UpdatePerson', 'UpdateConfFile', 'SliceUserDel', 'DeleteLeases', + 'AddConfFileToNodeGroup', 'UpdatePersonTag', 'DeleteConfFileFromNode', + 'AddPersonToSlice', 'UnBindObjectFromPeer', 'AddNodeToPCU', + 'GetLeaseGranularity', 'DeletePCUType', 'GetTagTypes', 'GetNodeTypes', + 'UpdateInterfaceTag', 'GetRoles', 'UpdateSlice', 'UpdateSliceTag', + 'AddSliceTag', 'AddNetworkType', 'AddInterface', 'AddAddressType', + 'AddRoleToPerson', 'DeleteNodeType', 'GetLeases', 'UpdateInterface', + 'SliceInfo', 'DeleteAddress', 'SliceTicketGet', 'GetPersons', + 'GetWhitelist', 'AddKeyType', 'UpdateAddressType', 'GetPeerName', + 'DeleteNetworkMethod', 'UpdateIlink', 'AddConfFileToNode', 'GetKeys', + 'DeleteNodeFromPCU', 'GetInterfaceTags', 'GetBootStates', + 'SetInterfaceSens', 'SetNodeLoadm', 'GetInterfaceRate', 'GetNodeLoadw', + 'SetInterfaceKey', 'GetNodeSlices', 'GetNodeLoadm', 'SetSliceVref', + 'GetInterfaceIwpriv', 'SetNodeLoadw', 'SetNodeSerial', + 'GetNodePlainBootstrapfs', 'SetNodeMEMw', 'GetNodeResponse', + 'SetInterfaceRate', 'SetSliceInitscript', 'SetNodeFcdistro', + 'GetNodeLoady', 'SetNodeArch', 'SetNodeKargs', 'SetNodeMEMm', + 'SetNodeBWy', 'SetNodeBWw', 'SetInterfaceSecurityMode', 'SetNodeBWm', + 'SetNodeASType', 'GetNodeKargs', 'GetPersonColumnconf', + 'GetNodeResponsem', 'GetNodeCPUy', 'GetNodeCramfs', 'SetNodeSlicesw', + 'SetPersonColumnconf', 'SetNodeSlicesy', 'GetNodeCPUw', 'GetNodeBWy', + 'GetNodeCPUm', 'GetInterfaceDriver', 'GetNodeLoad', 'GetInterfaceMode', + 'GetNodeSerial', 'SetNodeSlicesm', 'SetNodeLoady', 'GetNodeReliabilityw', + 'SetSliceFcdistro', 'GetNodeReliabilityy', 'SetInterfaceEssid', + 'SetSliceInitscriptCode', 'GetNodeExtensions', 'GetSliceOmfControl', + 'SetNodeCity', 'SetInterfaceIfname', 'SetNodeHrn', 'SetNodeNoHangcheck', + 'GetNodeNoHangcheck', 'GetSliceFcdistro', 'SetNodeCountry', + 'SetNodeKvariant', 'GetNodeKvariant', 'GetNodeMEMy', 'SetInterfaceIwpriv', + 'GetNodeMEMw', 'SetInterfaceBackdoor', 'GetInterfaceFreq', + 'SetInterfaceChannel', 'SetInterfaceNw', 'GetPersonShowconf', + 'GetSliceInitscriptCode', 'SetNodeMEM', 'GetInterfaceEssid', 'GetNodeMEMm', + 'SetInterfaceMode', 'SetInterfaceIwconfig', 'GetNodeSlicesm', 'GetNodeBWm', + 'SetNodePlainBootstrapfs', 'SetNodeRegion', 'SetNodeCPU', 'GetNodeSlicesw', + 'SetNodeBW', 'SetNodeSlices', 'SetNodeCramfs', 'GetNodeSlicesy', + 'GetInterfaceKey', 'GetSliceInitscript', 'SetNodeCPUm', 'SetSliceArch', + 'SetNodeLoad', 'SetNodeResponse', 'GetSliceSliverHMAC', 'GetNodeBWw', + 'GetNodeRegion', 'SetNodeMEMy', 'GetNodeASType', 'SetNodePldistro', + 'GetSliceArch', 'GetNodeCountry', 'SetSliceOmfControl', 'GetNodeHrn', + 'GetNodeCity', 'SetInterfaceAlias', 'GetNodeBW', 'GetNodePldistro', + 'GetSlicePldistro', 'SetNodeASNumber', 'GetSliceHmac', 'SetSliceHmac', + 'GetNodeMEM', 'GetNodeASNumber', 'GetInterfaceAlias', 'GetSliceVref', + 'GetNodeArch', 'GetSliceSshKey', 'GetInterfaceKey4', 'GetInterfaceKey2', + 'GetInterfaceKey3', 'GetInterfaceKey1', 'GetInterfaceBackdoor', + 'GetInterfaceIfname', 'SetSliceSliverHMAC', 'SetNodeReliability', + 'GetNodeCPU', 'SetPersonShowconf', 'SetNodeExtensions', 'SetNodeCPUy', + 'SetNodeCPUw', 'GetNodeResponsew', 'SetNodeResponsey', 'GetInterfaceSens', + 'SetNodeResponsew', 'GetNodeResponsey', 'GetNodeReliability', + 'GetNodeReliabilitym', 'SetNodeResponsem', 'SetInterfaceDriver', + 'GetInterfaceSecurityMode', 'SetNodeDeployment', 'SetNodeReliabilitym', + 'GetNodeFcdistro', 'SetInterfaceFreq', 'GetInterfaceNw', + 'SetNodeReliabilityy', 'SetNodeReliabilityw', 'GetInterfaceIwconfig', + 'SetSlicePldistro', 'SetSliceSshKey', 'GetNodeDeployment', + 'GetInterfaceChannel', 'SetInterfaceKey2', 'SetInterfaceKey3', + 'SetInterfaceKey1', 'SetInterfaceKey4']) + + _required_methods = set() + + def __init__(self, username, password, hostname, urlpattern, ec, proxy, session_key = None, + local_peer = "PLE"): + + self._blacklist = set() + self._reserved = set() + self._nodes_cache = None + self._already_cached = False + self._ecobj = ec + self.count = 1 + + if session_key is not None: + self.auth = dict(AuthMethod='session', session=session_key) + elif username is not None and password is not None: + self.auth = dict(AuthMethod='password', Username=username, AuthString=password) + else: + self.auth = dict(AuthMethod='anonymous') + + self._local_peer = local_peer + self._url = urlpattern % {'hostname':hostname} + + if (proxy is not None): + import urllib2 + class HTTPSProxyTransport(xmlrpclib.Transport): + def __init__(self, proxy, use_datetime=0): + opener = urllib2.build_opener(urllib2.ProxyHandler({"https" : proxy})) + xmlrpclib.Transport.__init__(self, use_datetime) + self.opener = opener + + def request(self, host, handler, request_body, verbose=0): + req = urllib2.Request('https://%s%s' % (host, handler), request_body) + req.add_header('User-agent', self.user_agent) + self.verbose = verbose + return self.parse_response(self.opener.open(req)) + + self._proxy_transport = lambda : HTTPSProxyTransport(proxy) + else: + self._proxy_transport = lambda : None + + self.threadlocal = threading.local() + + # Load blacklist from file + if self._ecobj.get_global('planetlab::Node', 'persist_blacklist'): + self._set_blacklist() + + @property +
[docs] def api(self): + # Cannot reuse same proxy in all threads, py2.7 is not threadsafe + return xmlrpclib.ServerProxy( + self._url , + transport = self._proxy_transport(), + allow_none = True) +
+ @property +
[docs] def mcapi(self): + try: + return self.threadlocal.mc + except AttributeError: + return self.api +
+
[docs] def test(self): + # TODO: Use nepi utils Logger instead of warning!! + import warnings + + # validate XMLRPC server checking supported API calls + methods = set(_retry(self.mcapi.system.listMethods)()) + if self._required_methods - methods: + warnings.warn("Unsupported REQUIRED methods: %s" % ( + ", ".join(sorted(self._required_methods - methods)), ) ) + return False + + if self._expected_methods - methods: + warnings.warn("Unsupported EXPECTED methods: %s" % ( + ", ".join(sorted(self._expected_methods - methods)), ) ) + + try: + # test authorization + network_types = _retry(self.mcapi.GetNetworkTypes)(self.auth) + except (xmlrpclib.ProtocolError, xmlrpclib.Fault),e: + warnings.warn(str(e)) + + return True +
+ def _set_blacklist(self): + nepi_home = os.path.join(os.path.expanduser("~"), ".nepi") + plblacklist_file = os.path.join(nepi_home, "plblacklist.txt") + with open(plblacklist_file, 'r') as f: + hosts_tobl = f.read().splitlines() + if hosts_tobl: + nodes_id = self.get_nodes(hosts_tobl, ['node_id']) + for node_id in nodes_id: + self._blacklist.add(node_id['node_id']) + + @property +
[docs] def network_types(self): + try: + return self._network_types + except AttributeError: + self._network_types = _retry(self.mcapi.GetNetworkTypes)(self.auth) + return self._network_types +
+ @property +
[docs] def peer_map(self): + try: + return self._peer_map + except AttributeError: + peers = _retry(self.mcapi.GetPeers)(self.auth, {}, ['shortname','peername','peer_id']) + + self._peer_map = dict( + (peer['shortname'], peer['peer_id']) + for peer in peers + ) + + self._peer_map.update( + (peer['peername'], peer['peer_id']) + for peer in peers + ) + + self._peer_map.update( + (peer['peer_id'], peer['shortname']) + for peer in peers + ) + + self._peer_map[None] = self._local_peer + return self._peer_map +
+
[docs] def get_node_flavour(self, node): + """ + Returns detailed information on a given node's flavour, + i.e. its base installation. + + This depends on the global PLC settings in the PLC_FLAVOUR area, + optionnally overridden by any of the following tags if set on that node: + 'arch', 'pldistro', 'fcdistro', 'deployment', 'extensions' + + Params: + + * node : int or string + - int, Node identifier + - string, Fully qualified hostname + + Returns: + + struct + * extensions : array of string, extensions to add to the base install + * fcdistro : string, the fcdistro this node should be based upon + * nodefamily : string, the nodefamily this node should be based upon + * plain : boolean, use plain bootstrapfs image if set (for tests) + """ + if not isinstance(node, (str, int, long)): + raise ValueError, "Node must be either a non-unicode string or an int" + return _retry(self.mcapi.GetNodeFlavour)(self.auth, node) +
+
[docs] def get_nodes(self, node_id_or_name = None, fields = None, **kw): + """ + Returns an array of structs containing details about nodes. + If node_id_or_name is specified and is an array of node identifiers + or hostnames, or the filters keyword argument with struct of node + attributes, or node attributes by keyword argument, + only nodes matching the filter will be returned. + + If fields is specified, only the specified details will be returned. + NOTE that if fields is unspecified, the complete set of native fields are + returned, which DOES NOT include tags at this time. + + Some fields may only be viewed by admins. + + Special params: + + fields: an optional list of fields to retrieve. The default is all. + + filters: an optional mapping with custom filters, which is the only + way to support complex filters like negation and numeric comparisons. + + peer: a string (or sequence of strings) with the name(s) of peers + to filter - or None for local nodes. + """ + if fields is not None: + fieldstuple = (fields,) + else: + fieldstuple = () + + if node_id_or_name is not None: + return _retry(self.mcapi.GetNodes)(self.auth, node_id_or_name, *fieldstuple) + else: + filters = kw.pop('filters',{}) + + if 'peer' in kw: + peer = kw.pop('peer') + + name_to_id = self.peer_map.get + + if hasattr(peer, '__iter__'): + # we can't mix local and external nodes, so + # split and re-issue recursively in that case + if None in peer or self._local_peer in peer: + if None in peer: + peer.remove(None) + + if self._local_peer in peer: + peer.remove(self._local_peer) + + return ( + self.get_nodes(node_id_or_name, fields, + filters = filters, peer=peer, **kw) + \ + self.get_nodes(node_id_or_name, fields, + filters = filters, peer=None, **kw) + ) + else: + peer_filter = map(name_to_id, peer) + + elif peer is None or peer == self._local_peer: + peer_filter = None + else: + peer_filter = name_to_id(peer) + + filters['peer_id'] = peer_filter + + filters.update(kw) + + if not filters and not fieldstuple: + if not self._nodes_cache and not self._already_cached: + self._already_cached = True + self._nodes_cache = _retry(self.mcapi.GetNodes)(self.auth) + elif not self._nodes_cache: + while not self._nodes_cache: + time.sleep(10) + return self._nodes_cache + + return _retry(self.mcapi.GetNodes)(self.auth, filters, *fieldstuple) +
+
[docs] def get_node_tags(self, node_tag_id = None, fields = None, **kw): + if fields is not None: + fieldstuple = (fields,) + else: + fieldstuple = () + + if node_tag_id is not None: + return _retry(self.mcapi.GetNodeTags)(self.auth, node_tag_id, + *fieldstuple) + else: + filters = kw.pop('filters',{}) + filters.update(kw) + return _retry(self.mcapi.GetNodeTags)(self.auth, filters, + *fieldstuple) +
+
[docs] def get_slice_tags(self, slice_tag_id = None, fields = None, **kw): + if fields is not None: + fieldstuple = (fields,) + else: + fieldstuple = () + + if slice_tag_id is not None: + return _retry(self.mcapi.GetSliceTags)(self.auth, slice_tag_id, + *fieldstuple) + else: + filters = kw.pop('filters',{}) + filters.update(kw) + return _retry(self.mcapi.GetSliceTags)(self.auth, filters, + *fieldstuple) +
+
[docs] def get_interfaces(self, interface_id_or_ip = None, fields = None, **kw): + if fields is not None: + fieldstuple = (fields,) + else: + fieldstuple = () + + if interface_id_or_ip is not None: + return _retry(self.mcapi.GetInterfaces)(self.auth, + interface_id_or_ip, *fieldstuple) + else: + filters = kw.pop('filters',{}) + filters.update(kw) + return _retry(self.mcapi.GetInterfaces)(self.auth, filters, + *fieldstuple) +
+
[docs] def get_slices(self, slice_id_or_name = None, fields = None, **kw): + if fields is not None: + fieldstuple = (fields,) + else: + fieldstuple = () + + if slice_id_or_name is not None: + return _retry(self.mcapi.GetSlices)(self.auth, slice_id_or_name, + *fieldstuple) + else: + filters = kw.pop('filters',{}) + filters.update(kw) + return _retry(self.mcapi.GetSlices)(self.auth, filters, + *fieldstuple) +
+
[docs] def update_slice(self, slice_id_or_name, **kw): + return _retry(self.mcapi.UpdateSlice)(self.auth, slice_id_or_name, kw) +
+
[docs] def delete_slice_node(self, slice_id_or_name, node_id_or_hostname): + return _retry(self.mcapi.DeleteSliceFromNodes)(self.auth, slice_id_or_name, node_id_or_hostname) +
+
[docs] def start_multicall(self): + self.threadlocal.mc = xmlrpclib.MultiCall(self.mcapi) +
+
[docs] def finish_multicall(self): + mc = self.threadlocal.mc + del self.threadlocal.mc + return _retry(mc)() +
+
[docs] def get_slice_nodes(self, slicename): + return self.get_slices(slicename, ['node_ids'])[0]['node_ids'] +
+
[docs] def add_slice_nodes(self, slicename, nodes): + self.update_slice(slicename, nodes=nodes) +
+
[docs] def get_node_info(self, node_id): + self.start_multicall() + info = self.get_nodes(node_id) + tags = self.get_node_tags(node_id=node_id, fields=('tagname','value')) + info, tags = self.finish_multicall() + return info, tags +
+
[docs] def get_slice_id(self, slicename): + slice_id = None + slices = self.get_slices(slicename, fields=('slice_id',)) + if slices: + slice_id = slices[0]['slice_id'] + + # If it wasn't found, don't remember this failure, keep trying + return slice_id +
+
[docs] def get_slice_vnet_sys_tag(self, slicename): + slicetags = self.get_slice_tags( + name = slicename, + tagname = 'vsys_vnet', + fields=('value',)) + + if slicetags: + return slicetags[0]['value'] + else: + return None +
+
[docs] def blacklist_host(self, node_id): + self._blacklist.add(node_id) +
+
[docs] def blacklisted(self): + return self._blacklist +
+
[docs] def unblacklist_host(self, node_id): + del self._blacklist[node_id] +
+
[docs] def reserve_host(self, node_id): + self._reserved.add(node_id) +
+
[docs] def reserved(self): + return self._reserved +
+
[docs] def unreserve_host(self, node_id): + del self._reserved[node_id] +
+
[docs] def release(self): + self.count -= 1 + if self.count == 0: + blacklist = self._blacklist + self._blacklist = set() + self._reserved = set() + if self._ecobj.get_global('PlanetlabNode', 'persist_blacklist'): + if blacklist: + to_blacklist = list() + hostnames = self.get_nodes(list(blacklist), ['hostname']) + for hostname in hostnames: + to_blacklist.append(hostname['hostname']) + + nepi_home = os.path.join(os.path.expanduser("~"), ".nepi") + plblacklist_file = os.path.join(nepi_home, "plblacklist.txt") + + with open(plblacklist_file, 'w') as f: + for host in to_blacklist: + f.write("%s\n" % host) + +
+
[docs]class PLCAPIFactory(object): + """ + .. note:: + + It allows PlanetLab RMs sharing a same slice, to use a same plcapi instance, + and to sincronize blacklisted and reserved hosts. + + """ + # use lock to avoid concurrent access to the Api list at the same times by 2 different threads + _lock = threading.Lock() + _apis = dict() + + @classmethod +
[docs] def get_api(cls, pl_user, pl_pass, pl_host, + pl_ptn, ec, proxy = None): + """ Get existing PLCAPI instance + + :param pl_user: Planelab user name (used for web login) + :type pl_user: str + :param pl_pass: Planetlab password (used for web login) + :type pl_pass: str + :param pl_host: Planetlab registry host (e.g. "www.planet-lab.eu") + :type pl_host: str + :param pl_ptn: XMLRPC service pattern (e.g. https://%(hostname)s:443/PLCAPI/) + :type pl_ptn: str + :param proxy: Proxy service url + :type pl_ptn: str + """ + if pl_user and pl_pass and pl_host: + key = cls._make_key(pl_user, pl_host) + with cls._lock: + api = cls._apis.get(key) + if not api: + api = cls.create_api(pl_user, pl_pass, pl_host, pl_ptn, ec, proxy) + else: + api.count += 1 + return api + return None +
+ @classmethod +
[docs] def create_api(cls, pl_user, pl_pass, pl_host, + pl_ptn, ec, proxy = None): + """ Create an PLCAPI instance + + :param pl_user: Planelab user name (used for web login) + :type pl_user: str + :param pl_pass: Planetlab password (used for web login) + :type pl_pass: str + :param pl_host: Planetlab registry host (e.g. "www.planet-lab.eu") + :type pl_host: str + :param pl_ptn: XMLRPC service pattern (e.g. https://%(hostname)s:443/PLCAPI/) + :type pl_ptn: str + :param proxy: Proxy service url + :type pl_ptn: str + """ + api = PLCAPI(username = pl_user, password = pl_pass, hostname = pl_host, + urlpattern = pl_ptn, ec = ec, proxy = proxy) + key = cls._make_key(pl_user, pl_host) + cls._apis[key] = api + return api +
+ @classmethod + def _make_key(cls, *args): + """ Hash the credentials in order to create a key + + :param args: list of arguments used to create the hash (user, host, port, ...) + :type args: list of args + + """ + skey = "".join(map(str, args)) + return hashlib.md5(skey).hexdigest() +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/planetlab/sfa_node.html b/doc/sphinx/_build/html/_modules/nepi/resources/planetlab/sfa_node.html new file mode 100644 index 00000000..772422c1 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/planetlab/sfa_node.html @@ -0,0 +1,762 @@ + + + + + + + + nepi.resources.planetlab.sfa_node — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.planetlab.sfa_node

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Lucia Guevgeozian <lucia.guevgeozian_odizzio@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.resource import ResourceManager, clsinit_copy, \
+        ResourceState
+from nepi.resources.linux.node import LinuxNode
+from nepi.util.sfaapi import SFAAPIFactory 
+from nepi.util.execfuncs import lexec
+from nepi.util import sshfuncs
+
+from random import randint
+import re
+import os
+import weakref
+import time
+import socket
+import threading
+import datetime
+
+@clsinit_copy
+
[docs]class PlanetlabSfaNode(LinuxNode): + _rtype = "planetlab::sfa::Node" + _help = "Controls a PlanetLab host accessible using a SSH key " \ + "and provisioned using SFA" + _platform = "planetlab" + + @classmethod + def _register_attributes(cls): + + sfa_user = Attribute("sfauser", "SFA user", + flags = Flags.Credential) + + sfa_private_key = Attribute("sfaPrivateKey", "SFA path to the private key \ + used to generate the user credential") + + city = Attribute("city", "Constrain location (city) during resource \ + discovery. May use wildcards.", + flags = Flags.Filter) + + country = Attribute("country", "Constrain location (country) during \ + resource discovery. May use wildcards.", + flags = Flags.Filter) + + region = Attribute("region", "Constrain location (region) during \ + resource discovery. May use wildcards.", + flags = Flags.Filter) + + architecture = Attribute("architecture", "Constrain architecture \ + during resource discovery.", + type = Types.Enumerate, + allowed = ["x86_64", + "i386"], + flags = Flags.Filter) + + operating_system = Attribute("operatingSystem", "Constrain operating \ + system during resource discovery.", + type = Types.Enumerate, + allowed = ["f8", + "f12", + "f14", + "centos", + "other"], + flags = Flags.Filter) + + min_reliability = Attribute("minReliability", "Constrain reliability \ + while picking PlanetLab nodes. Specifies a lower \ + acceptable bound.", + type = Types.Double, + range = (1, 100), + flags = Flags.Filter) + + max_reliability = Attribute("maxReliability", "Constrain reliability \ + while picking PlanetLab nodes. Specifies an upper \ + acceptable bound.", + type = Types.Double, + range = (1, 100), + flags = Flags.Filter) + + min_bandwidth = Attribute("minBandwidth", "Constrain available \ + bandwidth while picking PlanetLab nodes. \ + Specifies a lower acceptable bound.", + type = Types.Double, + range = (0, 2**31), + flags = Flags.Filter) + + max_bandwidth = Attribute("maxBandwidth", "Constrain available \ + bandwidth while picking PlanetLab nodes. \ + Specifies an upper acceptable bound.", + type = Types.Double, + range = (0, 2**31), + flags = Flags.Filter) + + min_load = Attribute("minLoad", "Constrain node load average while \ + picking PlanetLab nodes. Specifies a lower acceptable \ + bound.", + type = Types.Double, + range = (0, 2**31), + flags = Flags.Filter) + + max_load = Attribute("maxLoad", "Constrain node load average while \ + picking PlanetLab nodes. Specifies an upper acceptable \ + bound.", + type = Types.Double, + range = (0, 2**31), + flags = Flags.Filter) + + min_cpu = Attribute("minCpu", "Constrain available cpu time while \ + picking PlanetLab nodes. Specifies a lower acceptable \ + bound.", + type = Types.Double, + range = (0, 100), + flags = Flags.Filter) + + max_cpu = Attribute("maxCpu", "Constrain available cpu time while \ + picking PlanetLab nodes. Specifies an upper acceptable \ + bound.", + type = Types.Double, + range = (0, 100), + flags = Flags.Filter) + + timeframe = Attribute("timeframe", "Past time period in which to check\ + information about the node. Values are year,month, \ + week, latest", + default = "week", + type = Types.Enumerate, + allowed = ["latest", + "week", + "month", + "year"], + flags = Flags.Filter) + + plblacklist = Attribute("persist_blacklist", "Take into account the file plblacklist \ + in the user's home directory under .nepi directory. This file \ + contains a list of PL nodes to blacklist, and at the end \ + of the experiment execution the new blacklisted nodes are added.", + type = Types.Bool, + default = False, + flags = Flags.Global) + + cls._register_attribute(sfa_user) + cls._register_attribute(sfa_private_key) + cls._register_attribute(city) + cls._register_attribute(country) + cls._register_attribute(region) + cls._register_attribute(architecture) + cls._register_attribute(operating_system) + cls._register_attribute(min_reliability) + cls._register_attribute(max_reliability) + cls._register_attribute(min_bandwidth) + cls._register_attribute(max_bandwidth) + cls._register_attribute(min_load) + cls._register_attribute(max_load) + cls._register_attribute(min_cpu) + cls._register_attribute(max_cpu) + cls._register_attribute(timeframe) + cls._register_attribute(plblacklist) + + def __init__(self, ec, guid): + super(PlanetlabSfaNode, self).__init__(ec, guid) + + self._ecobj = weakref.ref(ec) + self._sfaapi = None + self._node_to_provision = None + self._slicenode = False + self._hostname = False + + if self.get("gateway") or self.get("gatewayUser"): + self.set("gateway", None) + self.set("gatewayUser", None) + + # Blacklist file for PL nodes + nepi_home = os.path.join(os.path.expanduser("~"), ".nepi") + plblacklist_file = os.path.join(nepi_home, "plblacklist.txt") + if not os.path.exists(plblacklist_file): + if os.path.isdir(nepi_home): + open(plblacklist_file, 'w').close() + else: + os.makedirs(nepi_home) + open(plblacklist_file, 'w').close() + + def _skip_provision(self): + sfa_user = self.get("sfauser") + if not sfa_user: + return True + else: return False + + @property +
[docs] def sfaapi(self): + """ + Property to instanciate the SFA API based in sfi client. + For each SFA method called this instance is used. + """ + if not self._sfaapi: + sfa_user = self.get("sfauser") + sfa_sm = "http://sfa3.planet-lab.eu:12346/" + sfa_auth = '.'.join(sfa_user.split('.')[:2]) + sfa_registry = "http://sfa3.planet-lab.eu:12345/" + sfa_private_key = self.get("sfaPrivateKey") + + _sfaapi = SFAAPIFactory.get_api(sfa_user, sfa_auth, + sfa_registry, sfa_sm, sfa_private_key, self._ecobj()) + + if not _sfaapi: + self.fail_sfaapi() + + self._sfaapi = weakref.ref(_sfaapi) + + return self._sfaapi() +
+
[docs] def do_discover(self): + """ + Based on the attributes defined by the user, discover the suitable + nodes for provision. + """ + if self._skip_provision(): + super(PlanetlabSfaNode, self).do_discover() + return + + nodes = self.sfaapi.get_resources_hrn() + + hostname = self._get_hostname() + if hostname: + # the user specified one particular node to be provisioned + self._hostname = True + host_hrn = nodes[hostname] + + # check that the node is not blacklisted or being provisioned + # by other RM + if not self._blacklisted(host_hrn) and not self._reserved(host_hrn): + # Node in reservation + ping_ok = self._do_ping(hostname) + if not ping_ok: + self._blacklist_node(host_hrn) + self.fail_node_not_alive(hostname) + else: + if self._check_if_in_slice([host_hrn]): + self.debug("The node %s is already in the slice" % hostname) + self._slicenode = True + self._node_to_provision = host_hrn + else: + self.fail_node_not_available(hostname) + super(PlanetlabSfaNode, self).do_discover() + + else: + hosts_hrn = nodes.values() + nodes_inslice = self._check_if_in_slice(hosts_hrn) + nodes_not_inslice = list(set(hosts_hrn) - set(nodes_inslice)) + host_hrn = None + if nodes_inslice: + host_hrn = self._choose_random_node(nodes, nodes_inslice) + self._slicenode = True + + if not host_hrn: + # Either there were no matching nodes in the user's slice, or + # the nodes in the slice were blacklisted or being provisioned + # by other RM. Note nodes_not_inslice is never empty + host_hrn = self._choose_random_node(nodes, nodes_not_inslice) + self._slicenode = False + + if host_hrn: + self._node_to_provision = host_hrn + try: + self._set_hostname_attr(host_hrn) + self.info(" Selected node to provision ") + super(PlanetlabSfaNode, self).do_discover() + except: + self._blacklist_node(host_hrn) + self.do_discover() + else: + self.fail_not_enough_nodes() +
+ def _blacklisted(self, host_hrn): + """ + Check in the SFA API that the node is not in the blacklist. + """ + if self.sfaapi.blacklisted(host_hrn): + return True + return False + + def _reserved(self, host_hrn): + """ + Check in the SFA API that the node is not in the reserved + list. + """ + if self.sfaapi.reserved(host_hrn): + return True + return False + +
[docs] def do_provision(self): + """ + Add node to user's slice and verifing that the node is functioning + correctly. Check ssh, file system. + """ + if self._skip_provision(): + super(PlanetlabSfaNode, self).do_provision() + return + + provision_ok = False + ssh_ok = False + proc_ok = False + timeout = 1800 + + while not provision_ok: + node = self._node_to_provision + if not self._slicenode: + self._add_node_to_slice(node) + + # check ssh connection + t = 0 + while t < timeout and not ssh_ok: + + cmd = 'echo \'GOOD NODE\'' + ((out, err), proc) = self.execute(cmd) + if out.find("GOOD NODE") < 0: + self.debug( "No SSH connection, waiting 60s" ) + t = t + 60 + time.sleep(60) + continue + else: + self.debug( "SSH OK" ) + ssh_ok = True + continue + else: + cmd = 'echo \'GOOD NODE\'' + ((out, err), proc) = self.execute(cmd) + if not out.find("GOOD NODE") < 0: + ssh_ok = True + + if not ssh_ok: + # the timeout was reach without establishing ssh connection + # the node is blacklisted, deleted from the slice, and a new + # node to provision is discovered + self.warning(" Could not SSH login ") + self._blacklist_node(node) + self.do_discover() + continue + + # check /proc directory is mounted (ssh_ok = True) + # and file system is not read only + else: + cmd = 'mount |grep proc' + ((out1, err1), proc1) = self.execute(cmd) + cmd = 'touch /tmp/tmpfile; rm /tmp/tmpfile' + ((out2, err2), proc2) = self.execute(cmd) + if out1.find("/proc type proc") < 0 or \ + "Read-only file system".lower() in err2.lower(): + self.warning(" Corrupted file system ") + self._blacklist_node(node) + self.do_discover() + continue + + else: + provision_ok = True + if not self.get('hostname'): + self._set_hostname_attr(node) + self.info(" Node provisioned ") + + super(PlanetlabSfaNode, self).do_provision() +
+
[docs] def do_release(self): + super(PlanetlabSfaNode, self).do_release() + if self.state == ResourceState.RELEASED and not self._skip_provision(): + self.debug(" Releasing SFA API ") + self.sfaapi.release() + +# def _filter_based_on_attributes(self): +# """ +# Retrive the list of nodes hrn that match user's constraints +# """ +# # Map user's defined attributes with tagnames of PlanetLab +# timeframe = self.get("timeframe")[0] +# attr_to_tags = { +# 'city' : 'city', +# 'country' : 'country', +# 'region' : 'region', +# 'architecture' : 'arch', +# 'operatingSystem' : 'fcdistro', +# 'minReliability' : 'reliability%s' % timeframe, +# 'maxReliability' : 'reliability%s' % timeframe, +# 'minBandwidth' : 'bw%s' % timeframe, +# 'maxBandwidth' : 'bw%s' % timeframe, +# 'minLoad' : 'load%s' % timeframe, +# 'maxLoad' : 'load%s' % timeframe, +# 'minCpu' : 'cpu%s' % timeframe, +# 'maxCpu' : 'cpu%s' % timeframe, +# } +# +# nodes_hrn = [] +# filters = {} +# +# for attr_name, attr_obj in self._attrs.iteritems(): +# attr_value = self.get(attr_name) +# +# if attr_value is not None and attr_obj.has_flag(Flags.Filter) and \ +# attr_name != 'timeframe': +# +# attr_tag = attr_to_tags[attr_name] +# filters['tagname'] = attr_tag +# +# # filter nodes by fixed constraints e.g. operating system +# if not 'min' in attr_name and not 'max' in attr_name: +# filters['value'] = attr_value +# nodes_hrn = self._filter_by_fixed_attr(filters, nodes_hrn) +# +# # filter nodes by range constraints e.g. max bandwidth +# elif ('min' or 'max') in attr_name: +# nodes_hrn = self._filter_by_range_attr(attr_name, attr_value, filters, nodes_hrn) +# +# if not filters: +# nodes = self.sfaapi.get_resources_hrn() +# for node in nodes: +# nodes_hrn.append(node[node.key()]) +# return nodes_hrn +# +# def _filter_by_fixed_attr(self, filters, nodes_hrn): +# """ +# Query SFA API for nodes matching fixed attributes defined by the +# user +# """ +# pass +## node_tags = self.sfaapi.get_resources_tags(filters) +## if node_tags is not None: +## +## if len(nodes_id) == 0: +## # first attribute being matched +## for node_tag in node_tags: +## nodes_id.append(node_tag['node_id']) +## else: +## # remove the nodes ids that don't match the new attribute +## # that is being match +## +## nodes_id_tmp = [] +## for node_tag in node_tags: +## if node_tag['node_id'] in nodes_id: +## nodes_id_tmp.append(node_tag['node_id']) +## +## if len(nodes_id_tmp): +## nodes_id = set(nodes_id) & set(nodes_id_tmp) +## else: +## # no node from before match the new constraint +## self.fail_discovery() +## else: +## # no nodes match the filter applied +## self.fail_discovery() +## +## return nodes_id +# +# def _filter_by_range_attr(self, attr_name, attr_value, filters, nodes_id): +# """ +# Query PLCAPI for nodes ids matching attributes defined in a certain +# range, by the user +# """ +# pass +## node_tags = self.plapi.get_node_tags(filters) +## if node_tags: +## +## if len(nodes_id) == 0: +## # first attribute being matched +## for node_tag in node_tags: +## +## # check that matches the min or max restriction +## if 'min' in attr_name and node_tag['value'] != 'n/a' and \ +## float(node_tag['value']) > attr_value: +## nodes_id.append(node_tag['node_id']) +## +## elif 'max' in attr_name and node_tag['value'] != 'n/a' and \ +## float(node_tag['value']) < attr_value: +## nodes_id.append(node_tag['node_id']) +## else: +## +## # remove the nodes ids that don't match the new attribute +## # that is being match +## nodes_id_tmp = [] +## for node_tag in node_tags: +## +## # check that matches the min or max restriction and was a +## # matching previous filters +## if 'min' in attr_name and node_tag['value'] != 'n/a' and \ +## float(node_tag['value']) > attr_value and \ +## node_tag['node_id'] in nodes_id: +## nodes_id_tmp.append(node_tag['node_id']) +## +## elif 'max' in attr_name and node_tag['value'] != 'n/a' and \ +## float(node_tag['value']) < attr_value and \ +## node_tag['node_id'] in nodes_id: +## nodes_id_tmp.append(node_tag['node_id']) +## +## if len(nodes_id_tmp): +## nodes_id = set(nodes_id) & set(nodes_id_tmp) +## else: +## # no node from before match the new constraint +## self.fail_discovery() +## +## else: #TODO CHECK +## # no nodes match the filter applied +## self.fail_discovery() +## +## return nodes_id +
+ def _choose_random_node(self, nodes, hosts_hrn): + """ + From the possible nodes for provision, choose randomly to decrese the + probability of different RMs choosing the same node for provision + """ + size = len(hosts_hrn) + while size: + size = size - 1 + index = randint(0, size) + host_hrn = hosts_hrn[index] + hosts_hrn[index] = hosts_hrn[size] + + # check the node is not blacklisted or being provision by other RM + # and perform ping to check that is really alive + if not self._blacklisted(host_hrn): + if not self._reserved(host_hrn): + print self.sfaapi._reserved ,self.guid + for hostname, hrn in nodes.iteritems(): + if host_hrn == hrn: + print 'hostname' ,hostname + ping_ok = self._do_ping(hostname) + + if not ping_ok: + self._set_hostname_attr(hostname) + self.warning(" Node not responding PING ") + self._blacklist_node(host_hrn) + else: + # discovered node for provision, added to provision list + self._node_to_provision = host_hrn + return host_hrn + +# def _get_nodes_id(self, filters=None): +# return self.plapi.get_nodes(filters, fields=['node_id']) +# + def _add_node_to_slice(self, host_hrn): + """ + Add node to slice, using SFA API. + """ + self.info(" Adding node to slice ") + slicename = self.get("username").replace('_', '.') + slicename = 'ple.' + slicename + self.sfaapi.add_resource_to_slice(slicename, host_hrn) + + def _delete_from_slice(self): + """ + Delete every node from slice, using SFA API. + Sfi client doesn't work for particular node urns. + """ + self.warning(" Deleting node from slice ") + slicename = self.get("username").replace('_', '.') + slicename = 'ple.' + slicename + self.sfaapi.remove_all_from_slice(slicename) + + def _get_hostname(self): + """ + Get the attribute hostname. + """ + hostname = self.get("hostname") + if hostname: + return hostname + else: + return None + + def _set_hostname_attr(self, node): + """ + Query SFAAPI for the hostname of a certain host hrn and sets the + attribute hostname, it will over write the previous value. + """ + hosts_hrn = self.sfaapi.get_resources_hrn() + for hostname, hrn in hosts_hrn.iteritems(): + if hrn == node: + self.set("hostname", hostname) + + def _check_if_in_slice(self, hosts_hrn): + """ + Check using SFA API if any host hrn from hosts_hrn is in the user's + slice. + """ + slicename = self.get("username").replace('_', '.') + slicename = 'ple.' + slicename + slice_nodes = self.sfaapi.get_slice_resources(slicename)['resource'] + if slice_nodes: + slice_nodes_hrn = self.sfaapi.get_resources_hrn(slice_nodes).values() + else: slice_nodes_hrn = [] + nodes_inslice = list(set(hosts_hrn) & set(slice_nodes_hrn)) + return nodes_inslice + + def _do_ping(self, hostname): + """ + Perform ping command on node's IP matching hostname. + """ + ping_ok = False + ip = self._get_ip(hostname) + if ip: + command = "ping -c4 %s" % ip + (out, err) = lexec(command) + + m = re.search("(\d+)% packet loss", str(out)) + if m and int(m.groups()[0]) < 50: + ping_ok = True + + return ping_ok + + def _blacklist_node(self, host_hrn): + """ + Add mal functioning node to blacklist (in SFA API). + """ + self.warning(" Blacklisting malfunctioning node ") + self.sfaapi.blacklist_resource(host_hrn) + if not self._hostname: + self.set('hostname', None) + + def _reserve(self, host_hrn): + """ + Add node to the list of nodes being provisioned, in order for other RMs + to not try to provision the same one again. + """ + self.sfaapi.reserve_resource(host_hrn) + + def _get_ip(self, hostname): + """ + Query cache for the IP of a node with certain hostname + """ + try: + ip = sshfuncs.gethostbyname(hostname) + except: + # Fail while trying to find the IP + return None + return ip + +
[docs] def fail_discovery(self): + msg = "Discovery failed. No candidates found for node" + self.error(msg) + raise RuntimeError, msg +
+
[docs] def fail_node_not_alive(self, hostname=None): + msg = "Node %s not alive" % hostname + raise RuntimeError, msg +
+
[docs] def fail_node_not_available(self, hostname): + msg = "Node %s not available for provisioning" % hostname + raise RuntimeError, msg +
+
[docs] def fail_not_enough_nodes(self): + msg = "Not enough nodes available for provisioning" + raise RuntimeError, msg +
+
[docs] def fail_sfaapi(self): + msg = "Failing while trying to instanciate the SFA API.\nSet the" + \ + " attributes sfauser and sfaPrivateKey." + raise RuntimeError, msg +
+
[docs] def valid_connection(self, guid): + # TODO: Validate! + return True +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/planetlab/tap.html b/doc/sphinx/_build/html/_modules/nepi/resources/planetlab/tap.html new file mode 100644 index 00000000..9b0791ce --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/planetlab/tap.html @@ -0,0 +1,413 @@ + + + + + + + + nepi.resources.planetlab.tap — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.planetlab.tap

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.resource import clsinit_copy, ResourceState 
+from nepi.resources.linux.tap import LinuxTap
+from nepi.resources.planetlab.node import PlanetlabNode
+from nepi.util.timefuncs import tnow, tdiffsec
+
+import os
+import time
+
+PYTHON_VSYS_VERSION = "1.0"
+
+@clsinit_copy
+
[docs]class PlanetlabTap(LinuxTap): + _rtype = "planetlab::Tap" + _help = "Creates a TAP device on a PlanetLab host" + _platform = "planetlab" + + @classmethod + def _register_attributes(cls): + snat = Attribute("snat", "Set SNAT=1", + type = Types.Bool, + flags = Flags.Design) + + cls._register_attribute(snat) + + def __init__(self, ec, guid): + super(PlanetlabTap, self).__init__(ec, guid) + self._home = "tap-%s" % self.guid + self._gre_enabled = False + + @property +
[docs] def node(self): + node = self.get_connected(PlanetlabNode.get_rtype()) + if node: return node[0] + raise RuntimeError, "TAP/TUN devices must be connected to Node" +
+
[docs] def upload_sources(self): + scripts = [] + + # vif-creation python script + pl_vif_create = os.path.join(os.path.dirname(__file__), "scripts", + "pl-vif-create.py") + + scripts.append(pl_vif_create) + + # vif-up python script + pl_vif_up = os.path.join(os.path.dirname(__file__), "scripts", + "pl-vif-up.py") + + scripts.append(pl_vif_up) + + # vif-down python script + pl_vif_down = os.path.join(os.path.dirname(__file__), "scripts", + "pl-vif-down.py") + + scripts.append(pl_vif_down) + + # udp-connect python script + udp_connect = os.path.join(os.path.dirname(__file__), + "..", + "linux", + "scripts", + "linux-udp-connect.py") + + scripts.append(udp_connect) + + # tunnel creation python script + tunchannel = os.path.join(os.path.dirname(__file__), + "..", + "linux", + "scripts", + "tunchannel.py") + + scripts.append(tunchannel) + + # Upload scripts + scripts = ";".join(scripts) + + self.node.upload(scripts, + os.path.join(self.node.src_dir), + overwrite = False) + + # upload stop.sh script + stop_command = self.replace_paths(self._stop_command) + + self.node.upload_command(stop_command, + shfile = os.path.join(self.app_home, "stop.sh"), + # Overwrite file every time. + # The stop.sh has the path to the socket, which should change + # on every experiment run. + overwrite = True) +
+
[docs] def upload_start_command(self): + super(PlanetlabTap, self).upload_start_command() + + # Planetlab TAPs always add a PI header + self.set("pi", True) + + if not self.gre_enabled: + # After creating the TAP, the pl-vif-create.py script + # will write the name of the TAP to a file. We wait until + # we can read the interface name from the file. + vif_name = self.wait_vif_name() + self.set("deviceName", vif_name) +
+
[docs] def wait_vif_name(self, exec_run_home = None): + """ Waits until the vif_name file for the command is generated, + and returns the vif_name for the device """ + vif_name = None + delay = 0.5 + + # The vif_name file will be created in the tap-home, while the + # current execution home might be elsewhere to check for errors + # (e.g. could be a tunnel-home) + if not exec_run_home: + exec_run_home = self.run_home + + for i in xrange(20): + (out, err), proc = self.node.check_output(self.run_home, "vif_name") + + if proc.poll() > 0: + (out, err), proc = self.node.check_errors(exec_run_home) + + if err.strip(): + raise RuntimeError, err + + if out: + vif_name = out.strip() + break + else: + time.sleep(delay) + delay = delay * 1.5 + else: + msg = "Couldn't retrieve vif_name" + self.error(msg, out, err) + raise RuntimeError, msg + + return vif_name +
+
[docs] def gre_connect(self, remote_endpoint, connection_app_home, + connection_run_home): + super(PlanetlabTap, self).gre_connect(remote_endpoint, + connection_app_home, connection_run_home) + # After creating the TAP, the pl-vif-create.py script + # will write the name of the TAP to a file. We wait until + # we can read the interface name from the file. + vif_name = self.wait_vif_name(exec_run_home = connection_run_home) + self.set("deviceName", vif_name) + + return True +
+ def _gre_connect_command(self, remote_endpoint, connection_app_home, + connection_run_home): + # Set the remote endpoint, (private) IP of the device + self.set("pointopoint", remote_endpoint.get("ip")) + # Public IP of the node + self.set("greRemote", remote_endpoint.node.get("ip")) + + # Generate GRE connect command + + # Use vif_down command to first kill existing TAP in GRE mode + vif_down_command = self._vif_down_command + + # Use pl-vif-up.py script to configure TAP with peer info + vif_up_command = self._vif_up_command + + command = ["("] + command.append(vif_down_command) + command.append(") ; (") + command.append(vif_up_command) + command.append(")") + + command = " ".join(command) + command = self.replace_paths(command) + + return command + + @property + def _start_command(self): + if self.gre_enabled: + command = [] + else: + command = ["sudo -S python ${SRC}/pl-vif-create.py"] + + command.append("-t %s" % self.vif_type) + command.append("-a %s" % self.get("ip")) + command.append("-n %s" % self.get("prefix")) + command.append("-f %s " % self.vif_name_file) + command.append("-S %s " % self.sock_name) + + if self.get("snat") == True: + command.append("-s") + + if self.get("pointopoint"): + command.append("-p %s" % self.get("pointopoint")) + + if self.get("txqueuelen"): + command.append("-q %s" % self.get("txqueuelen")) + + return " ".join(command) + + @property + def _stop_command(self): + if self.gre_enabled: + command = self._vif_down_command + else: + command = ["sudo -S "] + command.append("PYTHONPATH=$PYTHONPATH:${SRC}") + command.append("python ${SRC}/pl-vif-down.py") + command.append("-S %s " % self.sock_name) + command = " ".join(command) + + return command + + @property + def _vif_up_command(self): + if self.gre_enabled: + device_name = "%s" % self.guid + else: + device_name = self.get("deviceName") + + # Use pl-vif-up.py script to configure TAP + command = ["sudo -S "] + command.append("PYTHONPATH=$PYTHONPATH:${SRC}") + command.append("python ${SRC}/pl-vif-up.py") + command.append("-u %s" % self.node.get("username")) + command.append("-N %s" % device_name) + command.append("-t %s" % self.vif_type) + command.append("-a %s" % self.get("ip")) + command.append("-n %s" % self.get("prefix")) + + if self.get("snat") == True: + command.append("-s") + + if self.get("pointopoint"): + command.append("-p %s" % self.get("pointopoint")) + + if self.get("txqueuelen"): + command.append("-q %s" % self.get("txqueuelen")) + + if self.gre_enabled: + command.append("-g %s" % self.get("greKey")) + command.append("-G %s" % self.get("greRemote")) + + command.append("-f %s " % self.vif_name_file) + + return " ".join(command) + + @property + def _vif_down_command(self): + if self.gre_enabled: + device_name = "%s" % self.guid + else: + device_name = self.get("deviceName") + + command = ["sudo -S "] + command.append("PYTHONPATH=$PYTHONPATH:${SRC}") + command.append("python ${SRC}/pl-vif-down.py") + command.append("-N %s " % device_name) + + if self.gre_enabled: + command.append("-u %s" % self.node.get("username")) + command.append("-t %s" % self.vif_type) + command.append("-D") + + return " ".join(command) + + @property +
[docs] def vif_name_file(self): + return os.path.join(self.run_home, "vif_name") +
+ @property + def _install(self): + # Install python-vsys and python-passfd + install_vsys = ( " ( " + " python -c 'import vsys, os; vsys.__version__ == \"%(version)s\" or os._exit(1)' " + " ) " + " || " + " ( " + " cd ${SRC} ; " + " hg clone http://nepi.inria.fr/code/python-vsys ; " + " cd python-vsys ; " + " make all ; " + " sudo -S make install " + " )" ) % ({ + "version": PYTHON_VSYS_VERSION + }) + + install_passfd = ( " ( python -c 'import passfd' ) " + " || " + " ( " + " cd ${SRC} ; " + " hg clone http://nepi.inria.fr/code/python-passfd ; " + " cd python-passfd ; " + " make all ; " + " sudo -S make install " + " )" ) + + return "%s ; %s" % ( install_vsys, install_passfd ) + +
[docs] def valid_connection(self, guid): + # TODO: Validate! + return True +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/planetlab/tun.html b/doc/sphinx/_build/html/_modules/nepi/resources/planetlab/tun.html new file mode 100644 index 00000000..c77c0bb3 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/planetlab/tun.html @@ -0,0 +1,129 @@ + + + + + + + + nepi.resources.planetlab.tun — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.planetlab.tun

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.resource import clsinit_copy
+from nepi.resources.planetlab.tap import PlanetlabTap
+from nepi.resources.linux.tap import LinuxTap
+
+import os
+
+@clsinit_copy
+
[docs]class PlanetlabTun(PlanetlabTap): + _rtype = "planetlab::Tun" + _help = "Creates a TUN device on a PlanetLab host" + _platform = "planetlab" + + def __init__(self, ec, guid): + super(PlanetlabTun, self).__init__(ec, guid) + self._vif_prefix = "tun" + self._vif_type = "IFF_TUN" + self._vif_type_flag = LinuxTap.IFF_TUN + self._home = "%s-%s" % (self.vif_prefix, self.guid) + +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/resources/planetlab/vroute.html b/doc/sphinx/_build/html/_modules/nepi/resources/planetlab/vroute.html new file mode 100644 index 00000000..e75ef011 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/resources/planetlab/vroute.html @@ -0,0 +1,276 @@ + + + + + + + + nepi.resources.planetlab.vroute — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.resources.planetlab.vroute

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.execution.attribute import Attribute, Flags, Types
+from nepi.execution.resource import clsinit_copy, ResourceState 
+from nepi.resources.linux.application import LinuxApplication
+from nepi.resources.planetlab.node import PlanetlabNode
+from nepi.resources.planetlab.tap import PlanetlabTap
+from nepi.util.timefuncs import tnow, tdiffsec
+
+import os
+import time
+
+PYTHON_VSYS_VERSION = "1.0"
+
+@clsinit_copy
+
[docs]class PlanetlabVroute(LinuxApplication): + _rtype = "planetlab::Vroute" + _help = "Creates a Vroute on a PlanetLab host" + _platform = "planetlab" + + @classmethod + def _register_attributes(cls): + action = Attribute("action", "Either add or del", + allowed = ["add", "del"], + default = "add", + flags = Flags.Design) + + prefix = Attribute("prefix", "IPv4 Prefix", + flags = Flags.Design) + + nexthop = Attribute("nexthop", "IPv4 Address of the next hop", + flags = Flags.Design) + + network = Attribute("network", "IPv4 Network Address", + flags = Flags.Design) + + cls._register_attribute(action) + cls._register_attribute(prefix) + cls._register_attribute(nexthop) + cls._register_attribute(network) + + def __init__(self, ec, guid): + super(PlanetlabVroute, self).__init__(ec, guid) + self._home = "vroute-%s" % self.guid + + @property +
[docs] def tap(self): + tap = self.get_connected(PlanetlabTap.get_rtype()) + if tap: return tap[0] + return None +
+ @property +
[docs] def node(self): + node = self.tap.get_connected(PlanetlabNode.get_rtype()) + if node: return node[0] + return None +
+
[docs] def upload_sources(self): + # upload vif-creation python script + pl_vroute = os.path.join(os.path.dirname(__file__), + "scripts", + "pl-vroute.py") + + self.node.upload(pl_vroute, + os.path.join(self.node.src_dir, "pl-vroute.py"), + overwrite = False) + + # upload stop.sh script + stop_command = self.replace_paths(self._stop_command) + self.node.upload(stop_command, + os.path.join(self.app_home, "stop.sh"), + text = True, + # Overwrite file every time. + # The stop.sh has the path to the socket, wich should change + # on every experiment run. + overwrite = True) +
+
[docs] def upload_start_command(self): + # Overwrite file every time. + # The stop.sh has the path to the socket, wich should change + # on every experiment run. + command = self.get("command") + shfile = os.path.join(self.app_home, "start.sh") + self.node.run_and_wait(command, self.run_home, + shfile=shfile, + overwrite=True) +
+
[docs] def do_deploy(self): + if not self.tap or self.tap.state < ResourceState.PROVISIONED: + self.ec.schedule(self.reschedule_delay, self.deploy) + else: + if not self.get("command"): + self.set("command", self._start_command) + + self.do_discover() + self.do_provision() + + self.debug("----- READY ---- ") + self.set_ready() +
+
[docs] def do_start(self): + if self.state == ResourceState.READY: + command = self.get("command") + self.info("Starting command '%s'" % command) + + # Vroute started during deployment + self.set_started() + else: + msg = " Failed to execute command '%s'" % command + self.error(msg, out, err) + raise RuntimeError, msg +
+
[docs] def do_stop(self): + + command = self.get('command') or '' + + if self.state == ResourceState.STARTED: + self.info("Stopping command '%s'" % self._stop_command) + + command = "bash %s" % os.path.join(self.app_home, "stop.sh") + (out, err), proc = self.execute_command(command, + blocking = True) + + self.set_stopped() +
+
[docs] def do_release(self): + # Node needs to wait until all associated RMs are released + # to be released + if not self.get("tearDown"): + self.set("tearDown", self._tear_down_command()) + + super(PlanetlabVroute, self).do_release() +
+ def _tear_down_command(self): + if self.get("action") == "del": + return + + return self._stop_command + + @property + def _start_command(self): + command = ["sudo -S python ${SRC}/pl-vroute.py"] + command.append("-a %s" % self.get("action")) + command.append("-n %s" % self.get("network")) + command.append("-p %s" % self.get("prefix")) + command.append("-g %s" % self.tap.get("pointopoint")) + command.append("-f %s" % self.tap.get("deviceName")) + command = " ".join(command) + + command = self.replace_paths(command) + return command + + @property + def _stop_command(self): + command = ["sudo -S python ${SRC}/pl-vroute.py"] + command.append("-a %s" % "del") + command.append("-n %s" % self.get("network")) + command.append("-p %s" % self.get("prefix")) + command.append("-g %s" % self.get("nexthop")) + command.append("-f %s" % self.tap.get("deviceName")) + command = " ".join(command) + + command = self.replace_paths(command) + return command + +
[docs] def valid_connection(self, guid): + # TODO: Validate! + return True +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/util/environ.html b/doc/sphinx/_build/html/_modules/nepi/util/environ.html new file mode 100644 index 00000000..1544b5a7 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/util/environ.html @@ -0,0 +1,293 @@ + + + + + + + + nepi.util.environ — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.util.environ

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+#         Martin Ferrari <martin.ferrari@inria.fr>
+
+
+
+import ctypes
+import imp
+import sys
+
+import os, os.path, re, signal, shutil, socket, subprocess, tempfile
+
+__all__ =  ["python", "ssh_path"]
+__all__ += ["rsh", "tcpdump_path", "sshd_path"]
+__all__ += ["execute", "backticks"]
+
+
+# Unittest from Python 2.6 doesn't have these decorators
+def _bannerwrap(f, text):
+    name = f.__name__
+    def banner(*args, **kwargs):
+        sys.stderr.write("*** WARNING: Skipping test %s: `%s'\n" %
+                (name, text))
+        return None
+    return banner
+
+def skip(text):
+    return lambda f: _bannerwrap(f, text)
+
+def skipUnless(cond, text):
+    return (lambda f: _bannerwrap(f, text)) if not cond else lambda f: f
+
+def skipIf(cond, text):
+    return (lambda f: _bannerwrap(f, text)) if cond else lambda f: f
+
+def find_bin(name, extra_path = None):
+    search = []
+    if "PATH" in os.environ:
+        search += os.environ["PATH"].split(":")
+    for pref in ("/", "/usr/", "/usr/local/"):
+        for d in ("bin", "sbin"):
+            search.append(pref + d)
+    if extra_path:
+        search += extra_path
+
+    for d in search:
+            try:
+                os.stat(d + "/" + name)
+                return d + "/" + name
+            except OSError, e:
+                if e.errno != os.errno.ENOENT:
+                    raise
+    return None
+
+def find_bin_or_die(name, extra_path = None):
+    r = find_bin(name)
+    if not r:
+        raise RuntimeError(("Cannot find `%s' command, impossible to " +
+                "continue.") % name)
+    return r
+
+def find_bin(name, extra_path = None):
+    search = []
+    if "PATH" in os.environ:
+        search += os.environ["PATH"].split(":")
+    for pref in ("/", "/usr/", "/usr/local/"):
+        for d in ("bin", "sbin"):
+            search.append(pref + d)
+    if extra_path:
+        search += extra_path
+
+    for d in search:
+            try:
+                os.stat(d + "/" + name)
+                return d + "/" + name
+            except OSError, e:
+                if e.errno != os.errno.ENOENT:
+                    raise
+    return None
+
+ssh_path = find_bin_or_die("ssh")
+python_path = find_bin_or_die("python")
+
+# Optional tools
+rsh_path = find_bin("rsh")
+tcpdump_path = find_bin("tcpdump")
+sshd_path = find_bin("sshd")
+
+
[docs]def execute(cmd): + # FIXME: create a global debug variable + #print "[pid %d]" % os.getpid(), " ".join(cmd) + null = open("/dev/null", "r+") + p = subprocess.Popen(cmd, stdout = null, stderr = subprocess.PIPE) + out, err = p.communicate() + if p.returncode != 0: + raise RuntimeError("Error executing `%s': %s" % (" ".join(cmd), err)) +
+
[docs]def backticks(cmd): + p = subprocess.Popen(cmd, stdout = subprocess.PIPE, + stderr = subprocess.PIPE) + out, err = p.communicate() + if p.returncode != 0: + raise RuntimeError("Error executing `%s': %s" % (" ".join(cmd), err)) + return out + + +# SSH stuff +
+def gen_ssh_keypair(filename): + ssh_keygen = nepi.util.environ.find_bin_or_die("ssh-keygen") + args = [ssh_keygen, '-q', '-N', '', '-f', filename] + assert subprocess.Popen(args).wait() == 0 + return filename, "%s.pub" % filename + +def add_key_to_agent(filename): + ssh_add = nepi.util.environ.find_bin_or_die("ssh-add") + args = [ssh_add, filename] + null = file("/dev/null", "w") + assert subprocess.Popen(args, stderr = null).wait() == 0 + null.close() + +def get_free_port(): + s = socket.socket() + s.bind(("127.0.0.1", 0)) + port = s.getsockname()[1] + return port + +_SSH_CONF = """ListenAddress 127.0.0.1:%d +Protocol 2 +HostKey %s +UsePrivilegeSeparation no +PubkeyAuthentication yes +PasswordAuthentication no +AuthorizedKeysFile %s +UsePAM no +AllowAgentForwarding yes +PermitRootLogin yes +StrictModes no +PermitUserEnvironment yes +""" + +def gen_sshd_config(filename, port, server_key, auth_keys): + conf = open(filename, "w") + text = _SSH_CONF % (port, server_key, auth_keys) + conf.write(text) + conf.close() + return filename + +def gen_auth_keys(pubkey, output, environ): + #opts = ['from="127.0.0.1/32"'] # fails in stupid yans setup + opts = [] + for k, v in environ.items(): + opts.append('environment="%s=%s"' % (k, v)) + + lines = file(pubkey).readlines() + pubkey = lines[0].split()[0:2] + out = file(output, "w") + out.write("%s %s %s\n" % (",".join(opts), pubkey[0], pubkey[1])) + out.close() + return output + +def start_ssh_agent(): + ssh_agent = nepi.util.environ.find_bin_or_die("ssh-agent") + proc = subprocess.Popen([ssh_agent], stdout = subprocess.PIPE) + (out, foo) = proc.communicate() + assert proc.returncode == 0 + d = {} + for l in out.split("\n"): + match = re.search("^(\w+)=([^ ;]+);.*", l) + if not match: + continue + k, v = match.groups() + os.environ[k] = v + d[k] = v + return d + +def stop_ssh_agent(data): + # No need to gather the pid, ssh-agent knows how to kill itself; after we + # had set up the environment + ssh_agent = nepi.util.environ.find_bin_or_die("ssh-agent") + null = file("/dev/null", "w") + proc = subprocess.Popen([ssh_agent, "-k"], stdout = null) + null.close() + assert proc.wait() == 0 + for k in data: + del os.environ[k] +
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/util/execfuncs.html b/doc/sphinx/_build/html/_modules/nepi/util/execfuncs.html new file mode 100644 index 00000000..7cfccc92 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/util/execfuncs.html @@ -0,0 +1,356 @@ + + + + + + + + nepi.util.execfuncs — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.util.execfuncs

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.util.sshfuncs import ProcStatus, STDOUT, log, shell_escape
+
+import logging
+import shlex
+import subprocess
+
+
[docs]def lexec(command, + user = None, + sudo = False, + env = None): + """ + Executes a local command, returns ((stdout,stderr),process) + """ + if env: + export = '' + for envkey, envval in env.iteritems(): + export += '%s=%s ' % (envkey, envval) + command = "%s %s" % (export, command) + + if sudo: + command = "sudo %s" % command + + # XXX: Doing 'su user' blocks waiting for a password on stdin + #elif user: + # command = "su %s ; %s " % (user, command) + + proc = subprocess.Popen(command, + shell = True, + stdout = subprocess.PIPE, + stderr = subprocess.PIPE) + + out = err = "" + log_msg = "lexec - command %s " % command + + try: + out, err = proc.communicate() + log(log_msg, logging.DEBUG, out, err) + except: + log(log_msg, logging.ERROR, out, err) + raise + + return ((out, err), proc) +
+
[docs]def lcopy(source, dest, recursive = False): + """ + Copies from/to localy. + """ + + args = ["cp"] + if recursive: + args.append("-r") + + if isinstance(source, list): + args.extend(source) + else: + args.append(source) + + if isinstance(dest, list): + args.extend(dest) + else: + args.append(dest) + + proc = subprocess.Popen(args, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + + out = err = "" + command = " ".join(args) + log_msg = " lcopy - command %s " % command + + try: + out, err = proc.communicate() + log(log_msg, logging.DEBUG, out, err) + except: + log(log_msg, logging.ERROR, out, err) + raise + + return ((out, err), proc) +
+
[docs]def lspawn(command, pidfile, + stdout = '/dev/null', + stderr = STDOUT, + stdin = '/dev/null', + home = None, + create_home = False, + sudo = False, + user = None): + """ + Spawn a local command such that it will continue working asynchronously. + + Parameters: + command: the command to run - it should be a single line. + + pidfile: path of a (ideally unique to this task) pidfile for tracking the process. + + stdout: path of a file to redirect standard output to - must be a string. + Defaults to /dev/null + stderr: path of a file to redirect standard error to - string or the special STDOUT value + to redirect to the same file stdout was redirected to. Defaults to STDOUT. + stdin: path of a file with input to be piped into the command's standard input + + home: path of a folder to use as working directory - should exist, unless you specify create_home + + create_home: if True, the home folder will be created first with mkdir -p + + sudo: whether the command needs to be executed as root + + Returns: + (stdout, stderr), process + + Of the spawning process, which only captures errors at spawning time. + Usually only useful for diagnostics. + """ + # Start process in a "daemonized" way, using nohup and heavy + # stdin/out redirection to avoid connection issues + if stderr is STDOUT: + stderr = '&1' + else: + stderr = ' ' + stderr + + daemon_command = '{ { %(command)s > %(stdout)s 2>%(stderr)s < %(stdin)s & } ; echo $! 1 > %(pidfile)s ; }' % { + 'command' : command, + 'pidfile' : shell_escape(pidfile), + 'stdout' : stdout, + 'stderr' : stderr, + 'stdin' : stdin, + } + + cmd = "%(create)s%(gohome)s rm -f %(pidfile)s ; %(sudo)s bash -c %(command)s " % { + 'command' : shell_escape(daemon_command), + 'sudo' : 'sudo -S' if sudo else '', + 'pidfile' : shell_escape(pidfile), + 'gohome' : 'cd %s ; ' % (shell_escape(home),) if home else '', + 'create' : 'mkdir -p %s ; ' % (shell_escape(home),) if create_home else '', + } + + (out,err), proc = lexec(cmd) + + if proc.wait(): + raise RuntimeError, "Failed to set up application on host %s: %s %s" % (host, out,err,) + + return ((out,err), proc) +
+
[docs]def lgetpid(pidfile): + """ + Check the pidfile of a process spawned with remote_spawn. + + Parameters: + pidfile: the pidfile passed to remote_span + + Returns: + + A (pid, ppid) tuple useful for calling remote_status and remote_kill, + or None if the pidfile isn't valid yet (maybe the process is still starting). + """ + + (out,err), proc = lexec("cat %s" % pidfile ) + + if proc.wait(): + return None + + if out: + try: + return map(int,out.strip().split(' ',1)) + except: + # Ignore, many ways to fail that don't matter that much + return None +
+
[docs]def lstatus(pid, ppid): + """ + Check the status of a process spawned with remote_spawn. + + Parameters: + pid/ppid: pid and parent-pid of the spawned process. See remote_check_pid + + Returns: + + One of NOT_STARTED, RUNNING, FINISHED + """ + + (out,err), proc = lexec( + # Check only by pid. pid+ppid does not always work (especially with sudo) + " (( ps --pid %(pid)d -o pid | grep -c %(pid)d && echo 'wait') || echo 'done' ) | tail -n 1" % { + 'ppid' : ppid, + 'pid' : pid, + }) + + if proc.wait(): + return ProcStatus.NOT_STARTED + + status = False + if out: + status = (out.strip() == 'wait') + else: + return ProcStatus.NOT_STARTED + + return ProcStatus.RUNNING if status else ProcStatus.FINISHED +
+
[docs]def lkill(pid, ppid, sudo = False): + """ + Kill a process spawned with lspawn. + + First tries a SIGTERM, and if the process does not end in 10 seconds, + it sends a SIGKILL. + + Parameters: + pid/ppid: pid and parent-pid of the spawned process. See remote_check_pid + + sudo: whether the command was run with sudo - careful killing like this. + + Returns: + + Nothing, should have killed the process + """ + + subkill = "$(ps --ppid %(pid)d -o pid h)" % { 'pid' : pid } + cmd = """ +SUBKILL="%(subkill)s" ; +%(sudo)s kill -- -%(pid)d $SUBKILL || /bin/true +%(sudo)s kill %(pid)d $SUBKILL || /bin/true +for x in 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 ; do + sleep 0.2 + if [ `ps --pid %(pid)d -o pid | grep -c %(pid)d` == '0' ]; then + break + else + %(sudo)s kill -- -%(pid)d $SUBKILL || /bin/true + %(sudo)s kill %(pid)d $SUBKILL || /bin/true + fi + sleep 1.8 +done +if [ `ps --pid %(pid)d -o pid | grep -c %(pid)d` != '0' ]; then + %(sudo)s kill -9 -- -%(pid)d $SUBKILL || /bin/true + %(sudo)s kill -9 %(pid)d $SUBKILL || /bin/true +fi +""" + if nowait: + cmd = "( %s ) >/dev/null 2>/dev/null </dev/null &" % (cmd,) + + (out,err),proc = lexec( + cmd % { + 'ppid' : ppid, + 'pid' : pid, + 'sudo' : 'sudo -S' if sudo else '', + 'subkill' : subkill, + }) + +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/util/guid.html b/doc/sphinx/_build/html/_modules/nepi/util/guid.html new file mode 100644 index 00000000..3c9b96d6 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/util/guid.html @@ -0,0 +1,123 @@ + + + + + + + + nepi.util.guid — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.util.guid

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+# FIXME: This class is not thread-safe. 
+# Should it be made thread-safe?
+
[docs]class GuidGenerator(object): + def __init__(self): + self._last_guid = 0 + +
[docs] def next(self, guid = None): + if guid == None: + guid = self._last_guid + 1 + + self._last_guid = self._last_guid if guid <= self._last_guid else guid + + return guid +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/util/logger.html b/doc/sphinx/_build/html/_modules/nepi/util/logger.html new file mode 100644 index 00000000..ebcb7ba1 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/util/logger.html @@ -0,0 +1,145 @@ + + + + + + + + nepi.util.logger — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.util.logger

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+import logging
+
+
[docs]class Logger(object): + def __init__(self, logger_component): + self._logger = logging.getLogger(logger_component) + +
[docs] def debug(self, msg, out = None, err = None): + self.log(msg, logging.DEBUG, out, err) +
+
[docs] def error(self, msg, out = None, err = None): + self.log(msg, logging.ERROR, out, err) +
+
[docs] def warning(self, msg, out = None, err = None): + self.log(msg, logging.WARNING, out, err) +
+
[docs] def info(self, msg, out = None, err = None): + self.log(msg, logging.INFO, out, err) +
+
[docs] def log(self, msg, level, out = None, err = None): + if out: + msg += " - OUT: %s " % out + + if err: + msg += " - ERROR: %s " % err + + msg = self.log_message(msg) + + self.logger.log(level, msg) +
+
[docs] def log_message(self, msg): + return msg +
+ @property +
[docs] def logger(self): + return self._logger
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/util/manifoldapi.html b/doc/sphinx/_build/html/_modules/nepi/util/manifoldapi.html new file mode 100644 index 00000000..51245ad1 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/util/manifoldapi.html @@ -0,0 +1,361 @@ + + + + + + + + nepi.util.manifoldapi — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.util.manifoldapi

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Lucia Guevgeozian Odizzio <lucia.guevgeozian_odizzio@inria.fr>
+
+import xmlrpclib
+import hashlib
+import threading
+
+
+
[docs]class MANIFOLDAPI(object): + """ + API to query different data platforms as SFA, TopHat, OML Central Server, + using Manifold Framework, the backend of MySlice. + """ + def __init__(self, username, password, hostname, urlpattern): + + self.auth_pwd = dict(AuthMethod='password', Username=username, + AuthString=password) + self._url = urlpattern % {'hostname':hostname} + self.lock = threading.Lock() + self.auth = self.get_session_key() + + @property +
[docs] def api(self): + return xmlrpclib.Server(self._url, allow_none = True) +
+
[docs] def get_session_key(self): + """ + Retrieves the session key, in order to use the same session for + queries. + """ + query = {'timestamp' : 'now', 'object': 'local:session', + 'filters' : [], 'fields' : [], 'action' : 'create'} + + session = self.api.forward(self.auth_pwd, query) + + if not session['value']: + msg = "Can not authenticate in Manifold API" + raise RuntimeError, msg + + session_key = session['value'][0]['session'] + return dict(AuthMethod='session', session=session_key) +
+
[docs] def get_resource_info(self, filters=None, fields=None): + """ + Create and execute the Manifold API Query to get the resources + according fields and filters. + :param filters: resource's constraints for the experiment + :type filters: dict + :param fields: desire fields in the result of the query + :type fields: list + """ + query = {'action' : 'get', 'object' : 'resource'} + + if filters: + filters = self._map_attr_to_resource_filters(filters) + + qfilters = list() + for filtername, filtervalue in filters.iteritems(): + newfilter = [filtername, "==", filtervalue] + qfilters.append(newfilter) + + query['filters'] = qfilters + + if fields: + fields = self._check_valid_fields(fields) + + if fields: + query['fields'] = fields + + return self.api.forward(self.auth, query)['value'] +
+
[docs] def get_resource_urn(self, filters=None): + """ + Retrieves the resources urn of the resources matching filters. + """ + return self.get_resource_info(filters, 'urn') +
+
[docs] def get_slice_resources(self, slicename): + """ + Retrieves resources attached to user's slice. + return value: list of resources' urn + """ + result = [] + query = {'action' : 'get', 'object' : 'resource', + 'filters' : [['slice','==', slicename]], + 'fields' : ['urn']} + + with self.lock: + value = self.api.forward(self.auth, query)['value'] + + for resource in value: + result.append(resource['urn']) + + return result +
+
[docs] def add_resource_to_slice(self, slicename, resource_urn): + """ + Add resource to user's slice. The query needs to specify the new + resource plus the previous resources already in the slice. + """ + resources = self.get_slice_resources(slicename) + resources.append(resource_urn) + + urn_list = list() + for r in resources: + urn_dict = dict() + urn_dict['urn'] = r + urn_list.append(urn_dict) + + query = {'action' : 'update', 'object' : 'slice', + 'filters' : [['slice_hrn','==', slicename]], + 'params' : {'resource' : urn_list}} + + with self.lock: + self.api.forward(self.auth, query) + + resources = self.get_slice_resources(slicename) + if resource_urn in resources: + return True + else: + msg = "Failed while trying to add %s to slice" % resource_urn + print msg + # check how to do warning + return False +
+
[docs] def remove_resource_from_slice(self, slicename, resource_urn): + """ + Remove resource from user's slice. The query needs to specify the list + of previous resources in the slice without the one to be remove. + """ + resources = self.get_slice_resources(slicename) + resources.remove(resource_urn) + + urn_list = list() + for r in resources: + urn_dict = dict() + urn_dict['urn'] = r + urn_list.append(urn_dict) + + query = {'action' : 'update', 'object' : 'slice', + 'filters' : [['slice_hrn','==', slicename]], + 'params' : {'resource' : urn_list}} + + with self.lock: + self.api.forward(self.auth, query) + + resources = self.get_slice_resources(slicename) + if resource_urn not in resources: + return True + else: + msg = "Failed while trying to remove %s to slice" % resource_urn + # check how to do warning + return False +
+ def _get_metadata(self): + """ + This method is useful to retrive metadata from different platforms + in order to update fields and possible filters. + """ + query = {'action' : 'get', 'object' : 'local:object', + 'filters' : [['table','=','resource']]} + + res = self.api.forward(self.auth, query) + + valid_fields = list() + for i in res['value'][0]['column']: + valid_fields.append(i['name']) + + return valid_fields + + def _map_attr_to_resource_filters(self, filters): + """ + Depending on the object used for the Manifold query, the filters and + fields can change its sintaxis. A resource field in a slice object + query adds 'resource.' to the field. Other changes don't follow any + particular convention. + """ + #TODO: find out useful filters + attr_to_filter = { + 'hostname' : 'hostname', + 'longitude' : 'longitude', + 'latitude' : 'latitude', + 'network' : 'network', + 'component_id' : 'component_id' + } + + mapped_filters = dict() + for filtername, filtervalue in filters.iteritems(): + if attr_to_filter[filtername]: + new_filtername = attr_to_filter[filtername] + mapped_filters[new_filtername] = filtervalue + + return mapped_filters + + def _check_valid_fields(self, fields): + """ + The fields can be a predefine set, define in the Manifold metadata. + """ + valid_fields = self._get_metadata() + + if not isinstance(fields, list): + fields = [fields] + + for field in fields: + if field not in valid_fields: + fields.remove(field) + #self.warning(" Invalid Manifold field or filter ") + + return fields + +
+
[docs]class MANIFOLDAPIFactory(object): + """ + API Factory to manage a map of MANIFOLDAPI instances as key-value pairs, it + instanciate a single instance per key. The key represents the same SFA, + MF (ManiFold) credentials. + """ + + _lock = threading.Lock() + _apis = dict() + + @classmethod +
[docs] def get_api(cls, username, password, + #hostname = "manifold.pl.sophia.inria.fr", + hostname ="test.myslice.info", + urlpattern = "http://%(hostname)s:7080"): + """ + :param username: Manifold user (also used for MySlice web login) + :type username: str + :param password: Manifold password (also used for MySlice web login) + :type password: str + :param hostname: Hostname of the Manifold API to query SFA, TopHat, etc + :type hostname: str + :param urlpattern: Url of the Manifold API to query SFA, TopHat, etc + :type urlpattern: str + """ + + if username and password: + key = cls.make_key(username, password) + with cls._lock: + api = cls._apis.get(key) + + if not api: + api = MANIFOLDAPI(username, password, hostname, urlpattern) + cls._apis[key] = api + + return api + + return None +
+ @classmethod +
[docs] def make_key(cls, *args): + skey = "".join(map(str, args)) + return hashlib.md5(skey).hexdigest() +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/util/netgraph.html b/doc/sphinx/_build/html/_modules/nepi/util/netgraph.html new file mode 100644 index 00000000..c1c5ad87 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/util/netgraph.html @@ -0,0 +1,434 @@ + + + + + + + + nepi.util.netgraph — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.util.netgraph

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+import ipaddr
+import networkx
+import math
+import random
+
+
[docs]class TopologyType: + LINEAR = "linear" + LADDER = "ladder" + MESH = "mesh" + TREE = "tree" + STAR = "star" + ADHOC = "adhoc" + +## TODO: +## - AQ: Add support for hypergraphs (to be able to add hyper edges to +## model CSMA or wireless networks) +
+
[docs]class NetGraph(object): + """ NetGraph represents a network topology. + Network graphs are internally using the networkx library. + + """ + + def __init__(self, **kwargs): + """ A graph can be generated using a specified pattern + (LADDER, MESH, TREE, etc), or provided as an argument. + + :param topology: Undirected graph to use as internal representation + :type topology: networkx.Graph + + :param topo_type: One of TopologyType.{LINEAR,LADDER,MESH,TREE,STAR} + used to automatically generate the topology graph. + :type topo_type: TopologyType + + :param node_count: Number of nodes in the topology to be generated. + :type node_count: int + + :param branches: Number of branches (arms) for the STAR topology. + :type branches: int + + + :param assign_ips: Automatically assign IP addresses to each node. + :type assign_ips: bool + + :param network: Base network segment for IP address assignment. + :type network: str + + :param prefix: Base network prefix for IP address assignment. + :type prefix: int + + :param version: IP version for IP address assignment. + :type version: int + + :param assign_st: Select source and target nodes on the graph. + :type assign_st: bool + + :param sources_targets: dictionary with the list of sources (key = + "sources") and list of targets (key = "targets") if defined, ignore + assign_st + :type sources_targets: dictionary of lists + + :param leaf_source: if True, random sources will be selected only + from leaf nodes. + :type leaf_source: bool + + NOTE: Only point-to-point like network topologies are supported for now. + (Wireless and Ethernet networks were several nodes share the same + edge (hyperedge) can not be modeled for the moment). + + """ + self._topology = kwargs.get("topology") + self._topo_type = kwargs.get("topo_type", TopologyType.ADHOC) + + if not self.topology: + if kwargs.get("node_count"): + node_count = kwargs["node_count"] + branches = kwargs.get("branches") + + self._topology = self.generate_topology(self.topo_type, + node_count, branches = branches) + else: + self._topology = networkx.Graph() + + if kwargs.get("assign_ips"): + network = kwargs.get("network", "10.0.0.0") + prefix = kwargs.get("prefix", 8) + version = kwargs.get("version", 4) + + self.assign_p2p_ips(network = network, prefix = prefix, + version = version) + + sources_targets = kwargs.get("sources_targets") + if sources_targets: + [self.set_source(n) for n in sources_targets["sources"]] + [self.set_target(n) for n in sources_targets["targets"]] + elif kwargs.get("assign_st"): + self.select_target_zero() + self.select_random_source(is_leaf = kwargs.get("leaf_source")) + + @property +
[docs] def topology(self): + return self._topology +
+ @property +
[docs] def topo_type(self): + return self._topo_type +
+ @property +
[docs] def order(self): + return self.topology.order() +
+
[docs] def nodes(self): + return self.topology.nodes() +
+
[docs] def edges(self): + return self.topology.edges() +
+
[docs] def generate_topology(self, topo_type, node_count, branches = None): + if topo_type == TopologyType.LADDER: + total_nodes = node_count/2 + graph = networkx.ladder_graph(total_nodes) + + elif topo_type == TopologyType.LINEAR: + graph = networkx.path_graph(node_count) + + elif topo_type == TopologyType.MESH: + graph = networkx.complete_graph(node_count) + + elif topo_type == TopologyType.TREE: + h = math.log(node_count + 1)/math.log(2) - 1 + graph = networkx.balanced_tree(2, h) + + elif topo_type == TopologyType.STAR: + graph = networkx.Graph() + graph.add_node(0) + + nodesinbranch = (node_count - 1)/ BRANCHES + c = 1 + + for i in xrange(BRANCHES): + prev = 0 + for n in xrange(1, nodesinbranch + 1): + graph.add_node(c) + graph.add_edge(prev, c) + prev = c + c += 1 + + return graph +
+
[docs] def add_node(self, nid): + if nid not in self.topology: + self.topology.add_node(nid) +
+
[docs] def add_edge(self, nid1, nid2): + self.add_node(nid1) + self.add_node( nid2) + + if nid1 not in self.topology[nid2]: + self.topology.add_edge(nid2, nid1) +
+
[docs] def annotate_node_ip(self, nid, ip): + if "ips" not in self.topology.node[nid]: + self.topology.node[nid]["ips"] = list() + + self.topology.node[nid]["ips"].append(ip) +
+
[docs] def node_ip_annotations(self, nid): + return self.topology.node[nid].get("ips", []) +
+
[docs] def annotate_node(self, nid, name, value): + if not isinstance(value, str) and not isinstance(value, int) and \ + not isinstance(value, float) and not isinstance(value, bool): + raise RuntimeError, "Non-serializable annotation" + + self.topology.node[nid][name] = value +
+
[docs] def node_annotation(self, nid, name): + return self.topology.node[nid].get(name) +
+
[docs] def node_annotations(self, nid): + return self.topology.node[nid].keys() +
+
[docs] def del_node_annotation(self, nid, name): + del self.topology.node[nid][name] +
+
[docs] def annotate_edge(self, nid1, nid2, name, value): + if not isinstance(value, str) and not isinstance(value, int) and \ + not isinstance(value, float) and not isinstance(value, bool): + raise RuntimeError, "Non-serializable annotation" + + self.topology.edge[nid1][nid2][name] = value +
+
[docs] def annotate_edge_net(self, nid1, nid2, ip1, ip2, mask, network, + prefixlen): + self.topology.edge[nid1][nid2]["net"] = dict() + self.topology.edge[nid1][nid2]["net"][nid1] = ip1 + self.topology.edge[nid1][nid2]["net"][nid2] = ip2 + self.topology.edge[nid1][nid2]["net"]["mask"] = mask + self.topology.edge[nid1][nid2]["net"]["network"] = network + self.topology.edge[nid1][nid2]["net"]["prefix"] = prefixlen +
+
[docs] def edge_net_annotation(self, nid1, nid2): + return self.topology.edge[nid1][nid2].get("net", dict()) +
+
[docs] def edge_annotation(self, nid1, nid2, name): + return self.topology.edge[nid1][nid2].get(name) +
+
[docs] def edge_annotations(self, nid1, nid2): + return self.topology.edge[nid1][nid2].keys() +
+
[docs] def del_edge_annotation(self, nid1, nid2, name): + del self.topology.edge[nid1][nid2][name] +
+
[docs] def assign_p2p_ips(self, network = "10.0.0.0", prefix = 8, version = 4): + """ Assign IP addresses to each end of each edge of the network graph, + computing all the point to point subnets and addresses in the network + representation. + + :param network: Base network address used for subnetting. + :type network: str + + :param prefix: Prefix for the base network address used for subnetting. + :type prefixt: int + + :param version: IP version (either 4 or 6). + :type version: int + + """ + if networkx.number_connected_components(self.topology) > 1: + raise RuntimeError("Disconnected graph!!") + + # Assign IP addresses to host + netblock = "%s/%d" % (network, prefix) + if version == 4: + net = ipaddr.IPv4Network(netblock) + new_prefix = 30 + elif version == 6: + net = ipaddr.IPv6Network(netblock) + new_prefix = 30 + else: + raise RuntimeError, "Invalid IP version %d" % version + + ## Clear all previusly assigned IPs + for nid in self.topology.nodes(): + self.topology.node[nid]["ips"] = list() + + ## Generate and assign new IPs + sub_itr = net.iter_subnets(new_prefix = new_prefix) + + for nid1, nid2 in self.topology.edges(): + #### Compute subnets for each link + + # get a subnet of base_add with prefix /30 + subnet = sub_itr.next() + mask = subnet.netmask.exploded + network = subnet.network.exploded + prefixlen = subnet.prefixlen + + # get host addresses in that subnet + i = subnet.iterhosts() + addr1 = i.next() + addr2 = i.next() + + ip1 = addr1.exploded + ip2 = addr2.exploded + self.annotate_edge_net(nid1, nid2, ip1, ip2, mask, network, + prefixlen) + + self.annotate_node_ip(nid1, ip1) + self.annotate_node_ip(nid2, ip2) +
+
[docs] def get_p2p_info(self, nid1, nid2): + net = self.topology.edge[nid1][nid2]["net"] + return ( net[nid1], net[nid2], net["mask"], net["network"], + net["prefixlen"] ) +
+
[docs] def set_source(self, nid): + self.topology.node[nid]["source"] = True +
+
[docs] def is_source(self, nid): + return self.topology.node[nid].get("source") +
+
[docs] def set_target(self, nid): + self.topology.node[nid]["target"] = True +
+
[docs] def is_target(self, nid): + return self.topology.node[nid].get("target") +
+
[docs] def targets(self): + """ Returns the nodes that are targets """ + return [nid for nid in self.topology.nodes() \ + if self.topology.node[nid].get("target")] +
+
[docs] def sources(self): + """ Returns the nodes that are sources """ + return [nid for nid in self.topology.nodes() \ + if self.topology.node[nid].get("source")] +
+
[docs] def select_target_zero(self): + """ Mark the node 0 as target + """ + nid = 0 if 0 in self.topology.nodes() else "0" + self.set_target(nid) +
+
[docs] def select_random_source(self, **kwargs): + """ Mark a random node as source. + """ + + # The ladder is a special case because is not symmetric. + if self.topo_type == TopologyType.LADDER: + total_nodes = self.order/2 + leaf1 = total_nodes + leaf2 = total_nodes - 1 + leaves = [leaf1, leaf2] + source = leaves.pop(random.randint(0, len(leaves) - 1)) + else: + # options must not be already sources or targets + options = [ k for k,v in self.topology.degree().iteritems() \ + if (not kwargs.get("is_leaf") or v == 1) \ + and not self.topology.node[k].get("source") \ + and not self.topology.node[k].get("target")] + source = options.pop(random.randint(0, len(options) - 1)) + + self.set_source(source) +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/util/parallel.html b/doc/sphinx/_build/html/_modules/nepi/util/parallel.html new file mode 100644 index 00000000..24b06927 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/util/parallel.html @@ -0,0 +1,255 @@ + + + + + + + + nepi.util.parallel — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.util.parallel

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Claudio Freire <claudio-daniel.freire@inria.fr>
+#         Alina Quereilhac <alina.quereilhac@inria.fr>
+#
+
+import threading
+import Queue
+import traceback
+import sys
+import os
+
+N_PROCS = None
+
+
[docs]class WorkerThread(threading.Thread): +
[docs] class QUIT: + pass +
+
[docs] def run(self): + while True: + task = self.queue.get() + + if task is self.QUIT: + self.queue.task_done() + break + + try: + try: + callable, args, kwargs = task + rv = callable(*args, **kwargs) + + if self.rvqueue is not None: + self.rvqueue.put(rv) + finally: + self.queue.task_done() + except: + traceback.print_exc(file = sys.stderr) + self.delayed_exceptions.append(sys.exc_info()) +
+
[docs] def attach(self, queue, rvqueue, delayed_exceptions): + self.queue = queue + self.rvqueue = rvqueue + self.delayed_exceptions = delayed_exceptions +
+
[docs] def quit(self): + self.queue.put(self.QUIT) +
+
[docs]class ParallelRun(object): + def __init__(self, maxthreads = None, maxqueue = None, results = True): + self.maxqueue = maxqueue + self.maxthreads = maxthreads + + self.queue = Queue.Queue(self.maxqueue or 0) + + self.delayed_exceptions = [] + + if results: + self.rvqueue = Queue.Queue() + else: + self.rvqueue = None + + self.initialize_workers() + +
[docs] def initialize_workers(self): + global N_PROCS + + maxthreads = self.maxthreads + + # Compute maximum number of threads allowed by the system + if maxthreads is None: + if N_PROCS is None: + try: + f = open("/proc/cpuinfo") + try: + N_PROCS = sum("processor" in l for l in f) + finally: + f.close() + except: + pass + maxthreads = N_PROCS + + if maxthreads is None: + maxthreads = 4 + + self.workers = [] + + # initialize workers + for x in xrange(maxthreads): + worker = WorkerThread() + worker.attach(self.queue, self.rvqueue, self.delayed_exceptions) + worker.setDaemon(True) + + self.workers.append(worker) +
+ def __del__(self): + self.destroy() + +
[docs] def empty(self): + while True: + try: + self.queue.get(block = False) + self.queue.task_done() + except Queue.Empty: + break +
+
[docs] def destroy(self): + self.join() + + del self.workers[:] +
+
[docs] def put(self, callable, *args, **kwargs): + self.queue.put((callable, args, kwargs)) +
+
[docs] def put_nowait(self, callable, *args, **kwargs): + self.queue.put_nowait((callable, args, kwargs)) +
+
[docs] def start(self): + for worker in self.workers: + if not worker.isAlive(): + worker.start() +
+
[docs] def join(self): + # Wait until all queued tasks have been processed + self.queue.join() + + for worker in self.workers: + worker.quit() + + for worker in self.workers: + worker.join() +
+
[docs] def sync(self): + if self.delayed_exceptions: + typ,val,loc = self.delayed_exceptions[0] + del self.delayed_exceptions[:] + raise typ,val,loc +
+ def __iter__(self): + if self.rvqueue is not None: + while True: + try: + yield self.rvqueue.get_nowait() + except Queue.Empty: + self.queue.join() + try: + yield self.rvqueue.get_nowait() + except Queue.Empty: + raise StopIteration +
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/util/parsers/xml_parser.html b/doc/sphinx/_build/html/_modules/nepi/util/parsers/xml_parser.html new file mode 100644 index 00000000..1d92a071 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/util/parsers/xml_parser.html @@ -0,0 +1,549 @@ + + + + + + + + nepi.util.parsers.xml_parser — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.util.parsers.xml_parser

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+from nepi.util.netgraph import NetGraph, TopologyType 
+from nepi.util.timefuncs import stformat, tsformat
+
+from xml.dom import minidom
+
+import datetime
+import sys
+import os
+
+STRING = "string"
+BOOL = "bool"
+INTEGER = "integer"
+DOUBLE = "float"
+
+
[docs]def xmlencode(s): + if isinstance(s, str): + rv = s.decode("latin1") + if isinstance(s, datetime.datetime): + rv = tsformat(s) + elif not isinstance(s, unicode): + rv = unicode(s) + else: + rv = s + return rv.replace(u'\x00',u'&#0000;') +
+
[docs]def xmldecode(s, cast = str): + ret = s.replace(u'&#0000',u'\x00').encode("ascii") + ret = cast(ret) + if s == "None": + return None + return ret +
+
[docs]def from_type(value): + if isinstance(value, bool): + return BOOL + if isinstance(value, int): + return INTEGER + if isinstance(value, float): + return DOUBLE + + return STRING +
+
[docs]def to_type(type, value): + if not value: + return value + + if type == STRING: + return str(value) + if type == BOOL: + return value == "True" + if type == INTEGER: + return int(value) + if type == DOUBLE: + return float(value) +
+
[docs]class ECXMLParser(object): +
[docs] def to_xml(self, ec): + + doc = minidom.Document() + + self._ec_to_xml(doc, ec) + + try: + xml = doc.toprettyxml(indent=" ", encoding="UTF-8") + except: + print >>sys.stderr, "Oops: generating XML from %s" % (data,) + raise + + return xml +
+ def _ec_to_xml(self, doc, ec): + ecnode = doc.createElement("experiment") + ecnode.setAttribute("exp_id", xmlencode(ec.exp_id)) + ecnode.setAttribute("run_id", xmlencode(ec.run_id)) + ecnode.setAttribute("nthreads", xmlencode(ec.nthreads)) + ecnode.setAttribute("local_dir", xmlencode(ec.local_dir)) + doc.appendChild(ecnode) + + if ec.netgraph != None: + self._netgraph_to_xml(doc, ecnode, ec) + + rmsnode = doc.createElement("rms") + ecnode.appendChild(rmsnode) + + for guid, rm in ec._resources.iteritems(): + self._rm_to_xml(doc, rmsnode, ec, guid, rm) + + return doc + + def _netgraph_to_xml(self, doc, ecnode, ec): + ngnode = doc.createElement("topology") + ngnode.setAttribute("topo-type", xmlencode(ec.netgraph.topo_type)) + ecnode.appendChild(ngnode) + + self. _netgraph_nodes_to_xml(doc, ngnode, ec) + self. _netgraph_edges_to_xml(doc, ngnode, ec) + + def _netgraph_nodes_to_xml(self, doc, ngnode, ec): + ngnsnode = doc.createElement("nodes") + ngnode.appendChild(ngnsnode) + + for nid in ec.netgraph.nodes(): + ngnnode = doc.createElement("node") + ngnnode.setAttribute("nid", xmlencode(nid)) + ngnnode.setAttribute("nid-type", from_type(nid)) + ngnsnode.appendChild(ngnnode) + + # Mark ources and targets + if ec.netgraph.is_source(nid): + ngnnode.setAttribute("source", xmlencode(True)) + + if ec.netgraph.is_target(nid): + ngnnode.setAttribute("target", xmlencode(True)) + + # Node annotations + annosnode = doc.createElement("node-annotations") + add_annotations = False + for name in ec.netgraph.node_annotations(nid): + add_annotations = True + value = ec.netgraph.node_annotation(nid, name) + annonode = doc.createElement("node-annotation") + annonode.setAttribute("name", xmlencode(name)) + annonode.setAttribute("value", xmlencode(value)) + annonode.setAttribute("type", from_type(value)) + annosnode.appendChild(annonode) + + if add_annotations: + ngnnode.appendChild(annosnode) + + def _netgraph_edges_to_xml(self, doc, ngnode, ec): + ngesnode = doc.createElement("edges") + ngnode.appendChild(ngesnode) + + for nid1, nid2 in ec.netgraph.edges(): + ngenode = doc.createElement("edge") + ngenode.setAttribute("nid1", xmlencode(nid1)) + ngenode.setAttribute("nid1-type", from_type(nid1)) + ngenode.setAttribute("nid2", xmlencode(nid2)) + ngenode.setAttribute("nid2-type", from_type(nid2)) + ngesnode.appendChild(ngenode) + + # Edge annotations + annosnode = doc.createElement("edge-annotations") + add_annotations = False + for name in ec.netgraph.edge_annotations(nid1, nid2): + add_annotations = True + value = ec.netgraph.edge_annotation(nid1, nid2, name) + annonode = doc.createElement("edge-annotation") + annonode.setAttribute("name", xmlencode(name)) + annonode.setAttribute("value", xmlencode(value)) + annonode.setAttribute("type", from_type(value)) + annosnode.appendChild(annonode) + + if add_annotations: + ngenode.appendChild(annosnode) + + def _rm_to_xml(self, doc, rmsnode, ec, guid, rm): + rmnode = doc.createElement("rm") + rmnode.setAttribute("guid", xmlencode(guid)) + rmnode.setAttribute("rtype", xmlencode(rm._rtype)) + rmnode.setAttribute("state", xmlencode(rm._state)) + if rm._start_time: + rmnode.setAttribute("start_time", xmlencode(rm._start_time)) + if rm._stop_time: + rmnode.setAttribute("stop_time", xmlencode(rm._stop_time)) + if rm._discover_time: + rmnode.setAttribute("discover_time", xmlencode(rm._discover_time)) + if rm._provision_time: + rmnode.setAttribute("provision_time", xmlencode(rm._provision_time)) + if rm._ready_time: + rmnode.setAttribute("ready_time", xmlencode(rm._ready_time)) + if rm._release_time: + rmnode.setAttribute("release_time", xmlencode(rm._release_time)) + if rm._failed_time: + rmnode.setAttribute("failed_time", xmlencode(rm._failed_time)) + rmsnode.appendChild(rmnode) + + anode = doc.createElement("attributes") + attributes = False + + for attr in rm._attrs.values(): + if attr.has_changed: + attributes = True + aanode = doc.createElement("attribute") + aanode.setAttribute("name", xmlencode(attr.name)) + aanode.setAttribute("value", xmlencode(attr.value)) + aanode.setAttribute("type", from_type(attr.value)) + anode.appendChild(aanode) + + if attributes: + rmnode.appendChild(anode) + + cnode = doc.createElement("connections") + connections = False + + for guid in rm._connections: + connections = True + ccnode = doc.createElement("connection") + ccnode.setAttribute("guid", xmlencode(guid)) + cnode.appendChild(ccnode) + + if connections: + rmnode.appendChild(cnode) + + cnnode = doc.createElement("conditions") + conditions = False + + for action, conds in rm._conditions.iteritems(): + conditions = True + for (group, state, time) in conds: + ccnnode = doc.createElement("condition") + ccnnode.setAttribute("action", xmlencode(action)) + ccnnode.setAttribute("group", xmlencode(group)) + ccnnode.setAttribute("state", xmlencode(state)) + ccnnode.setAttribute("time", xmlencode(time)) + cnnode.appendChild(ccnnode) + + if conditions: + rmnode.appendChild(cnnode) + + tnode = doc.createElement("traces") + traces = False + + for trace in rm._trcs.values(): + if trace.enabled: + traces = True + ttnode = doc.createElement("trace") + ttnode.setAttribute("name", xmlencode(trace.name)) + tnode.appendChild(ttnode) + + if traces: + rmnode.appendChild(tnode) + +
[docs] def from_xml(self, xml): + doc = minidom.parseString(xml) + return self._ec_from_xml(doc) +
+ def _ec_from_xml(self, doc): + from nepi.execution.ec import ExperimentController + ec = None + + ecnode_list = doc.getElementsByTagName("experiment") + for ecnode in ecnode_list: + if ecnode.nodeType == doc.ELEMENT_NODE: + exp_id = xmldecode(ecnode.getAttribute("exp_id")) + run_id = xmldecode(ecnode.getAttribute("run_id")) + local_dir = xmldecode(ecnode.getAttribute("local_dir")) + + # Configure number of preocessing threads + nthreads = xmldecode(ecnode.getAttribute("nthreads")) + os.environ["NEPI_NTHREADS"] = nthreads + + # Deserialize netgraph + topology = None + topo_type = None + + netgraph = self._netgraph_from_xml(doc, ecnode) + + if netgraph: + topo_type = netgraph.topo_type + topology = netgraph.topology + + # Instantiate EC + ec = ExperimentController(exp_id = exp_id, local_dir = local_dir, + topology = topology, topo_type = topo_type) + + connections = set() + + rmsnode_list = ecnode.getElementsByTagName("rms") + if rmsnode_list: + rmnode_list = rmsnode_list[0].getElementsByTagName("rm") + for rmnode in rmnode_list: + if rmnode.nodeType == doc.ELEMENT_NODE: + self._rm_from_xml(doc, rmnode, ec, connections) + + for (guid1, guid2) in connections: + ec.register_connection(guid1, guid2) + + break + + return ec + + def _netgraph_from_xml(self, doc, ecnode): + netgraph = None + + topology = ecnode.getElementsByTagName("topology") + if topology: + topology = topology[0] + topo_type = xmldecode(topology.getAttribute("topo-type")) + + netgraph = NetGraph(topo_type = topo_type) + + ngnsnode_list = topology.getElementsByTagName("nodes") + if ngnsnode_list: + ngnsnode = ngnsnode_list[0].getElementsByTagName("node") + for ngnnode in ngnsnode: + nid = xmldecode(ngnnode.getAttribute("nid")) + tipe = xmldecode(ngnnode.getAttribute("nid-type")) + nid = to_type(tipe, nid) + netgraph.add_node(nid) + + if ngnnode.hasAttribute("source"): + netgraph.set_source(nid) + if ngnnode.hasAttribute("target"): + netgraph.set_target(nid) + + annosnode_list = ngnnode.getElementsByTagName("node-annotations") + + if annosnode_list: + annosnode = annosnode_list[0].getElementsByTagName("node-annotation") + for annonode in annosnode: + name = xmldecode(annonode.getAttribute("name")) + + if name == "ips": + ips = xmldecode(annonode.getAttribute("value"), eval) # list + for ip in ips: + netgraph.annotate_node_ip(nid, ip) + else: + value = xmldecode(annonode.getAttribute("value")) + tipe = xmldecode(annonode.getAttribute("type")) + value = to_type(tipe, value) + netgraph.annotate_node(nid, name, value) + + ngesnode_list = topology.getElementsByTagName("edges") + if ngesnode_list: + ngesnode = ngesnode_list[0].getElementsByTagName("edge") + for ngenode in ngesnode: + nid1 = xmldecode(ngenode.getAttribute("nid1")) + tipe1 = xmldecode(ngenode.getAttribute("nid1-type")) + nid1 = to_type(tipe1, nid1) + + nid2 = xmldecode(ngenode.getAttribute("nid2")) + tipe2 = xmldecode(ngenode.getAttribute("nid2-type")) + nid2 = to_type(tipe2, nid2) + + netgraph.add_edge(nid1, nid2) + + annosnode_list = ngenode.getElementsByTagName("edge-annotations") + if annosnode_list: + annosnode = annosnode_list[0].getElementsByTagName("edge-annotation") + for annonode in annosnode: + name = xmldecode(annonode.getAttribute("name")) + + if name == "net": + net = xmldecode(annonode.getAttribute("value"), eval) # dict + netgraph.annotate_edge_net(nid1, nid2, net[nid1], net[nid2], + net["mask"], net["network"], net["prefix"]) + else: + value = xmldecode(annonode.getAttribute("value")) + tipe = xmldecode(annonode.getAttribute("type")) + value = to_type(tipe, value) + netgraph.annotate_edge(nid1, nid2, name, value) + return netgraph + + def _rm_from_xml(self, doc, rmnode, ec, connections): + start_time = None + stop_time = None + discover_time = None + provision_time = None + ready_time = None + release_time = None + failed_time = None + + guid = xmldecode(rmnode.getAttribute("guid"), int) + rtype = xmldecode(rmnode.getAttribute("rtype")) + + # FOR NOW ONLY STATE NEW IS ALLOWED + state = 0 + """ + state = xmldecode(rmnode.getAttribute("state"), int) + + if rmnode.hasAttribute("start_time"): + start_time = xmldecode(rmnode.getAttribute("start_time"), + datetime.datetime) + if rmnode.hasAttribute("stop_time"): + stop_time = xmldecode(rmnode.getAttribute("stop_time"), + datetime.datetime) + if rmnode.hasAttribute("discover_time"): + dicover_time = xmldecode(rmnode.getAttribute("discover_time"), + datetime.datetime) + if rmnode.hasAttribute("provision_time"): + provision_time = xmldecode(rmnode.getAttribute("provision_time"), + datetime.datetime) + if rmnode.hasAttribute("ready_time"): + ready_time = xmldecode(rmnode.getAttribute("ready_time"), + datetime.datetime) + if rmnode.hasAttribute("release_time"): + release_time = xmldecode(rmnode.getAttribute("release_time"), + datetime.datetime) + if rmnode.hasAttribute("failed_time"): + failed_time = xmldecode(rmnode.getAttribute("failed_time"), + datetime.datetime) + """ + + ec.register_resource(rtype, guid = guid) + rm = ec.get_resource(guid) + rm.set_state_time(state, "_start_time", start_time) + rm.set_state_time(state, "_stop_time", stop_time) + rm.set_state_time(state, "_discover_time", discover_time) + rm.set_state_time(state, "_provision_time", provision_time) + rm.set_state_time(state, "_ready_time", ready_time) + rm.set_state_time(state, "_release_time", release_time) + rm.set_state_time(state, "_failed_time", failed_time) + + anode_list = rmnode.getElementsByTagName("attributes") + if anode_list: + aanode_list = anode_list[0].getElementsByTagName("attribute") + for aanode in aanode_list: + name = xmldecode(aanode.getAttribute("name")) + value = xmldecode(aanode.getAttribute("value")) + tipe = xmldecode(aanode.getAttribute("type")) + value = to_type(tipe, value) + rm.set(name, value) + + cnode_list = rmnode.getElementsByTagName("connections") + if cnode_list: + ccnode_list = cnode_list[0].getElementsByTagName("connection") + for ccnode in ccnode_list: + guid2 = xmldecode(ccnode.getAttribute("guid"), int) + connections.add((guid, guid2)) + + tnode_list = rmnode.getElementsByTagName("traces") + if tnode_list: + ttnode_list = tnode_list[0].getElementsByTagName("trace") + for ttnode in ttnode_list: + name = xmldecode(ttnode.getAttribute("name")) + ec.enable_trace(guid, name) + + cnnode_list = rmnode.getElementsByTagName("conditions") + if cnnode_list: + ccnnode_list = cnnode_list[0].getElementsByTagName("condition") + for ccnnode in ccnnode_list: + action = xmldecode(ccnnode.getAttribute("action"), int) + group = xmldecode(ccnnode.getAttribute("group"), eval) # list + state = xmldecode(ccnnode.getAttribute("state"), int) + time = xmldecode(ccnnode.getAttribute("time")) + time = to_type('STRING', time) + ec.register_condition(guid, action, group, state, time = time) +
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/util/plotter.html b/doc/sphinx/_build/html/_modules/nepi/util/plotter.html new file mode 100644 index 00000000..3276b3c4 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/util/plotter.html @@ -0,0 +1,198 @@ + + + + + + + + nepi.util.plotter — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.util.plotter

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+import logging
+import os
+
+try:
+    import networkx
+except ImportError:
+    msg = "Networkx library is not installed, you will not be able to plot."
+    logger = logging.Logger("Plotter")
+    logger.debug(msg)
+
+try:
+    import matplotlib.pyplot as plt
+except:
+    msg = ("Matplotlib library is not installed or X11 is not enabled. "
+        "You will not be able generate PNG plots.")
+    logger = logging.Logger("Plotter")
+    logger.debug(msg)
+
+
[docs]class PFormats: + DOT = "dot" + FIGURE = "figure" +
+
[docs]class ECPlotter(object): +
[docs] def plot(self, ec, dirpath = None, format= PFormats.FIGURE, + show = False): + graph, labels = self._ec2graph(ec) + + add_extension = False + + if not dirpath: + import tempfile + dirpath = tempfile.mkdtemp() + + fpath = os.path.join(dirpath, "%s_%s" % (ec.exp_id, ec.run_id)) + + if format == PFormats.FIGURE: + pos = networkx.graphviz_layout(graph, prog="neato") + networkx.draw(graph, pos = pos, node_color="white", + node_size = 500, with_labels=True) + + label = "\n".join(map(lambda v: "%s: %s" % (v[0], v[1]), labels.iteritems())) + plt.annotate(label, xy=(0.05, 0.95), xycoords='axes fraction') + + fpath += ".png" + + plt.savefig(fpath, bbox_inches="tight") + + if show: + plt.show() + + elif format == PFormats.DOT: + fpath += ".dot" + + networkx.write_dot(graph, fpath) + + if show: + import subprocess + subprocess.call(["dot", "-Tps", fpath, "-o", "%s.ps" % fpath]) + subprocess.call(["evince","%s.ps" % fpath]) + + return fpath +
+ def _ec2graph(self, ec): + graph = networkx.Graph(graph = dict(overlap = "false")) + + labels = dict() + connections = set() + + for guid, rm in ec._resources.iteritems(): + label = rm.get_rtype() + + graph.add_node(guid, + label = "%d %s" % (guid, label), + width = 50/72.0, # 1 inch = 72 points + height = 50/72.0, + shape = "circle") + + labels[guid] = label + + for guid2 in rm.connections: + # Avoid adding a same connection twice + if (guid2, guid) not in connections: + connections.add((guid, guid2)) + + for (guid1, guid2) in connections: + graph.add_edge(guid1, guid2) + + return graph, labels
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/util/rmatcher.html b/doc/sphinx/_build/html/_modules/nepi/util/rmatcher.html new file mode 100644 index 00000000..3279823f --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/util/rmatcher.html @@ -0,0 +1,155 @@ + + + + + + + + nepi.util.rmatcher — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.util.rmatcher

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+
[docs]def match_tags(box, all_tags, exact_tags): + """ returns True if box has required tags """ + tall = set(all_tags) + texact = set(exact_tags) + + if texact and box.connections == texact: + return True + + if tall and tall.issubset(box.connections): + return True + + return False +
+
[docs]def find_boxes(box, all_tags = None, exact_tags = None, max_depth = 1): + """ Look for the connected boxes with the required tags, doing breath-first + search, until max_depth ( max_depth = None will traverse the entire graph ). + """ + if not all_tags and not exact_tags: + msg = "No matching criteria for resources." + raise RuntimeError(msg) + + queue = set() + # enqueue (depth, box) + queue.add((0, box)) + + traversed = set() + traversed.add(box) + + depth = 0 + + result = set() + + while len(q) > 0: + (depth, a) = queue.pop() + if match_tags(a, all_tags, exact_tags): + result.add(a) + + if not max_depth or depth <= max_depth: + depth += 1 + for b in sorted(a.connections): + if b not in traversed: + traversed.add(b) + queue.add((depth, b)) + + return result
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/util/serializer.html b/doc/sphinx/_build/html/_modules/nepi/util/serializer.html new file mode 100644 index 00000000..9514b5ea --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/util/serializer.html @@ -0,0 +1,151 @@ + + + + + + + + nepi.util.serializer — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.util.serializer

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+import datetime
+import os
+
+
[docs]class SFormats: + XML = "xml" +
+
[docs]class ECSerializer(object): +
[docs] def load(self, filepath, format = SFormats.XML): + if format == SFormats.XML: + from nepi.util.parsers.xml_parser import ECXMLParser + + parser = ECXMLParser() + f = open(filepath, "r") + xml = f.read() + f.close() + + ec = parser.from_xml(xml) + + return ec +
+
[docs] def serialize(self, ec, format = SFormats.XML): + if format == SFormats.XML: + from nepi.util.parsers.xml_parser import ECXMLParser + + parser = ECXMLParser() + sec = parser.to_xml(ec) + + return sec +
+
[docs] def save(self, ec, dirpath, format = SFormats.XML): + date = datetime.datetime.now().strftime('%Y%m%d%H%M%S') + filename = "%s_%s" % (ec.exp_id, date) + + if format == SFormats.XML: + filepath = os.path.join(dirpath, "%s.xml" % filename) + sec = self.serialize(ec, format = format) + f = open(filepath, "w") + f.write(sec) + f.close() + + return filepath +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/util/sfaapi.html b/doc/sphinx/_build/html/_modules/nepi/util/sfaapi.html new file mode 100644 index 00000000..1939a77b --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/util/sfaapi.html @@ -0,0 +1,562 @@ + + + + + + + + nepi.util.sfaapi — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.util.sfaapi

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Lucia Guevgeozian Odizzio <lucia.guevgeozian_odizzio@inria.fr>
+
+import threading
+import hashlib
+import re
+import os
+import time
+
+from nepi.util.logger import Logger
+
+try:
+    from sfa.client.sfi import Sfi
+    from sfa.util.xrn import hrn_to_urn
+except ImportError:
+    log = Logger("SFA API")
+    log.debug("Packages sfa-common or sfa-client not installed.\
+         Could not import sfa.client.sfi or sfa.util.xrn")
+
+from nepi.util.sfarspec_proc import SfaRSpecProcessing
+
+
[docs]class SFAAPI(object): + """ + API for quering the SFA service. It uses Sfi class from the tool sfi client. + """ + def __init__(self, sfi_user, sfi_auth, sfi_registry, sfi_sm, private_key, ec, + batch, rtype, timeout): + + self._blacklist = set() + self._reserved = set() + self._resources_cache = None + self._already_cached = False + self._ec = ec + self.apis = 1 + + if batch: + self._testbed_res = rtype + self._count = 0 + self._total = self._get_total_res() + self._slice_resources_batch = list() + + self._log = Logger("SFA API") + self.api = Sfi() + self.rspec_proc = SfaRSpecProcessing() + self.lock_slice = threading.Lock() + self.lock_blist = threading.Lock() + self.lock_resv = threading.Lock() + + self.api.options.timeout = timeout + self.api.options.raw = None + self.api.options.user = sfi_user + self.api.options.auth = sfi_auth + self.api.options.registry = sfi_registry + self.api.options.sm = sfi_sm + self.api.options.user_private_key = private_key + + # Load blacklist from file + if ec.get_global('PlanetlabNode', 'persist_blacklist'): + self._set_blacklist() + + def _set_blacklist(self): + """ + Initialize the blacklist with previous nodes blacklisted, in + previous runs. + """ + nepi_home = os.path.join(os.path.expanduser("~"), ".nepi") + plblacklist_file = os.path.join(nepi_home, "plblacklist.txt") + with open(plblacklist_file, 'r') as f: + hosts_tobl = f.read().splitlines() + if hosts_tobl: + for host in hosts_tobl: + self._blacklist.add(host) + + def _get_total_res(self): + """ + Get the total amount of resources instanciated using this API, + to be able to add them using the same Allocate and Provision + call at once. Specially for Wilabt testbed that doesn't allow + to add slivers after the slice already has some. + """ + rms = list() + res_gids = self._ec.resources + for gid in res_gids: + rm = self._ec.get_resource(gid) + if self._testbed_res.lower() in rm._rtype.lower(): + rms.append(rm) + return rms + + def _sfi_exec_method(self, command, slicename=None, rspec=None, urn=None, action=None): + """ + Execute sfi method, which correspond to SFA call. It can be the following + calls: Describe, Delete, Allocate, Provision, ListResources. + """ + if command in ['describe', 'delete', 'allocate', 'provision', 'action']: + if not slicename: + raise TypeError("The slice hrn is expected for this method %s" % command) + if command == 'allocate' and not rspec: + raise TypeError("RSpec is expected for this method %s" % command) + + if command == 'allocate': + args_list = [slicename, rspec] + else: + args_list = [slicename] + if command != 'delete': + args_list = args_list + ['-o', '/tmp/rspec_output'] + if command == 'action': + args_list = [slicename, action] + + elif command == 'resources': + args_list = ['-o', '/tmp/rspec_output'] + + else: raise TypeError("Sfi method not supported") + + self.api.command = command + self.api.command_parser = self.api.create_parser_command(self.api.command) + (command_options, command_args) = self.api.command_parser.parse_args(args_list) + self.api.command_options = command_options + self.api.read_config() + self.api.bootstrap() + + try: + os.remove("/tmp/rspec_output.rspec") + except OSError: + self._log.debug("Couldn't remove temporary output file for RSpec or it doesn't exist") + + try: + self.api.dispatch(command, command_options, command_args) + with open("/tmp/rspec_output.rspec", "r") as result_file: + result = result_file.read() + return result + except: + self._log.debug(" Couldn't retrive rspec output information from method %s " % command) + return None + +
[docs] def get_resources_info(self): + """ + Get all resources and its attributes from aggregate. + """ + try: + rspec_slice = self._sfi_exec_method('resources') + except: + raise RuntimeError("Fail to list resources") + + self._resources_cache = self.rspec_proc.parse_sfa_rspec(rspec_slice) + self._already_cached = True + return self._resources_cache +
+
[docs] def get_resources_hrn(self, resources=None): + """ + Get list of resources hrn, without the resource info. + """ + if not resources: + if not self._already_cached: + resources = self.get_resources_info()['resource'] + else: + resources = self._resources_cache['resource'] + + component_tohrn = dict() + for resource in resources: + hrn = resource['hrn'].replace('\\', '') + component_tohrn[resource['component_name']] = hrn + + return component_tohrn +
+
[docs] def get_slice_resources(self, slicename): + """ + Get resources and info from slice. + """ + try: + with self.lock_slice: + rspec_slice = self._sfi_exec_method('describe', slicename) + except: + self._log.debug("Fail to describe resources for slice %s, slice may be empty" % slicename) + + if rspec_slice is not None: + result = self.rspec_proc.parse_sfa_rspec(rspec_slice) + return result + else: + return {'resource':[],'lease':[]} + +
+
[docs] def add_resource_to_slice(self, slicename, resource_hrn, leases=None): + """ + Get the list of resources' urn, build the rspec string and call the allocate + and provision method. + """ + resources_hrn_new = list() + resource_parts = resource_hrn.split('.') + resource_hrn = '.'.join(resource_parts[:2]) + '.' + '\\.'.join(resource_parts[2:]) + resources_hrn_new.append(resource_hrn) + + with self.lock_slice: + rspec_slice = self._sfi_exec_method('describe', slicename) + if rspec_slice is not None: + slice_resources = self.rspec_proc.parse_sfa_rspec(rspec_slice)['resource'] + else: slice_resources = [] + if slice_resources: + slice_resources_hrn = self.get_resources_hrn(slice_resources) + for s_hrn_key, s_hrn_value in slice_resources_hrn.iteritems(): + s_parts = s_hrn_value.split('.') + s_hrn = '.'.join(s_parts[:2]) + '.' + '\\.'.join(s_parts[2:]) + resources_hrn_new.append(s_hrn) + + + resources_urn = self._get_resources_urn(resources_hrn_new) + rspec = self.rspec_proc.build_sfa_rspec(slicename, resources_urn, None, leases) + f = open("/tmp/rspec_input.rspec", "w") + f.truncate(0) + f.write(rspec) + f.close() + + if not os.path.getsize("/tmp/rspec_input.rspec") > 0: + raise RuntimeError("Fail to create rspec file to allocate resource in slice %s" % slicename) + + # ALLOCATE + try: + self._log.debug("Allocating resources in slice %s" % slicename) + out = self._sfi_exec_method('allocate', slicename, "/tmp/rspec_input.rspec") + except: + raise RuntimeError("Fail to allocate resource for slice %s" % slicename) + + if out is not None: + # PROVISION + try: + self._log.debug("Provisioning resources in slice %s" % slicename) + self._sfi_exec_method('provision', slicename) + except: + raise RuntimeError("Fail to provision resource for slice %s" % slicename) + return True +
+
[docs] def add_resource_to_slice_batch(self, slicename, resource_hrn, properties=None, leases=None): + """ + Method to add all resources together to the slice. Previous deletion of slivers. + Specially used for wilabt that doesn't allow to add more resources to the slice + after some resources are added. Every sliver have to be deleted and the batch + has to be added at once. + """ + self._count += 1 + self._slice_resources_batch.append(resource_hrn) + resources_hrn_new = list() + if self._count == len(self._total): + check_all_inslice = self._check_all_inslice(self._slice_resources_batch, slicename) + if check_all_inslice == True: + return True + for resource_hrn in self._slice_resources_batch: + resource_parts = resource_hrn.split('.') + resource_hrn = '.'.join(resource_parts[:2]) + '.' + '\\.'.join(resource_parts[2:]) + resources_hrn_new.append(resource_hrn) + with self.lock_slice: + if check_all_inslice != 0: + self._sfi_exec_method('delete', slicename) + time.sleep(480) + + # Re implementing urn from hrn because the library sfa-common doesn't work for wilabt + resources_urn = self._get_urn(resources_hrn_new) + rspec = self.rspec_proc.build_sfa_rspec(slicename, resources_urn, properties, leases) + f = open("/tmp/rspec_input.rspec", "w") + f.truncate(0) + f.write(rspec) + f.close() + + if not os.path.getsize("/tmp/rspec_input.rspec") > 0: + raise RuntimeError("Fail to create rspec file to allocate resources in slice %s" % slicename) + + # ALLOCATE + try: + self._log.debug("Allocating resources in slice %s" % slicename) + out = self._sfi_exec_method('allocate', slicename, "/tmp/rspec_input.rspec") + except: + raise RuntimeError("Fail to allocate resource for slice %s" % slicename) + + if out is not None: + # PROVISION + try: + self._log.debug("Provisioning resources in slice %s" % slicename) + self._sfi_exec_method('provision', slicename) + self._sfi_exec_method('action', slicename=slicename, action='geni_start') + except: + raise RuntimeError("Fail to provision resource for slice %s" % slicename) + return True + else: + raise RuntimeError("Fail to allocate resources for slice %s" % slicename) + + else: + self._log.debug(" Waiting for more nodes to add the batch to the slice ") +
+ def _check_all_inslice(self, resources_hrn, slicename): + slice_res = self.get_slice_resources(slicename)['resource'] + if slice_res: + if len(slice_res[0]['services']) != 0: + slice_res_hrn = self.get_resources_hrn(slice_res).values() + if self._compare_lists(slice_res_hrn, resources_hrn): + return True + else: return len(slice_res_hrn) + return 0 + + def _compare_lists(self, list1, list2): + if len(list1) != len(list2): + return False + for item in list1: + if item not in list2: + return False + return True + + def _get_urn(self, resources_hrn): + """ + Get urn from hrn. + """ + resources_urn = list() + for hrn in resources_hrn: + hrn = hrn.replace("\\", "").split('.') + node = hrn.pop() + auth = '.'.join(hrn) + urn = ['urn:publicid:IDN+', auth, '+node+', node] + urn = ''.join(urn) + resources_urn.append(urn) + return resources_urn + +
[docs] def remove_resource_from_slice(self, slicename, resource_hrn, leases=None): + """ + Remove slivers from slice. Currently sfi doesn't support removing particular + slivers. + """ + resource_urn = self._get_resources_urn([resource_hrn]).pop() + with self.lock_slice: + try: + self._sfi_exec_method('delete', slicename, urn=resource_urn) + except: + raise RuntimeError("Fail to delete resource for slice %s" % slicename) + return True +
+
[docs] def remove_all_from_slice(self, slicename): + """ + De-allocate and de-provision all slivers of the named slice. + Currently sfi doesn't support removing particular + slivers, so this method works only for removing every sliver. Setting the + resource_hrn parameter is not necessary. + """ + with self.lock_slice: + try: + self._sfi_exec_method('delete', slicename) + except: + raise RuntimeError("Fail to delete slivers for slice %s" % slicename) + return True +
+ def _get_resources_urn(self, resources_hrn): + """ + Builds list of resources' urn based on hrn. + """ + resources_urn = list() + + for resource in resources_hrn: + resources_urn.append(hrn_to_urn(resource, 'node')) + + return resources_urn + +
[docs] def blacklist_resource(self, resource_hrn): + """ + Adding resource_hrn to blacklist, and taking + the resource from the reserved list. + """ + with self.lock_blist: + self._blacklist.add(resource_hrn) + with self.lock_resv: + if resource_hrn in self._reserved: + self._reserved.remove(resource_hrn) +
+
[docs] def blacklisted(self, resource_hrn): + """ + Check if the resource is in the blacklist. + """ + with self.lock_blist: + if resource_hrn in self._blacklist: + return True + return False +
+
[docs] def reserve_resource(self, resource_hrn): + """ + Add resource to the reserved list. + """ + self._reserved.add(resource_hrn) +
+
[docs] def reserved(self, resource_hrn): + """ + Check that the resource in not reserved. + """ + with self.lock_resv: + if resource_hrn in self._reserved: + return True + else: + self.reserve_resource(resource_hrn) + return False +
+
[docs] def release(self): + """ + Remove hosts from the reserved and blacklist lists, and in case + the persist attribute is set, it saves the blacklisted hosts + in the blacklist file. + """ + self.apis -= 1 + if self.apis == 0: + blacklist = self._blacklist + self._blacklist = set() + self._reserved = set() +# if self._ecobj.get_global('PlanetlabSfaNode', 'persist_blacklist'): +# if blacklist: +# to_blacklist = list() +# hostnames = self.get_nodes(list(blacklist), ['hostname']) +# for hostname in hostnames: +# to_blacklist.append(hostname['hostname']) +# +# nepi_home = os.path.join(os.path.expanduser("~"), ".nepi") +# plblacklist_file = os.path.join(nepi_home, "plblacklist.txt") +# +# with open(plblacklist_file, 'w') as f: +# for host in to_blacklist: +# f.write("%s\n" % host) +# + +
+
[docs]class SFAAPIFactory(object): + """ + API Factory to manage a map of SFAAPI instances as key-value pairs, it + instanciate a single instance per key. The key represents the same SFA, + credentials. + """ + + _lock = threading.Lock() + _apis = dict() + + + @classmethod +
[docs] def get_api(cls, sfi_user, sfi_auth, sfi_registry, sfi_sm, private_key, ec, + batch = False, rtype = None, timeout = None): + + if sfi_user and sfi_sm: + key = cls.make_key(sfi_user, sfi_sm) + with cls._lock: + api = cls._apis.get(key) + + if not api: + api = SFAAPI(sfi_user, sfi_auth, sfi_registry, sfi_sm, private_key, + ec, batch, rtype, timeout) + cls._apis[key] = api + else: + api.apis += 1 + + return api + + return None +
+ @classmethod +
[docs] def make_key(cls, *args): + skey = "".join(map(str, args)) + return hashlib.md5(skey).hexdigest() +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/util/sfarspec_proc.html b/doc/sphinx/_build/html/_modules/nepi/util/sfarspec_proc.html new file mode 100644 index 00000000..9561359f --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/util/sfarspec_proc.html @@ -0,0 +1,312 @@ + + + + + + + + nepi.util.sfarspec_proc — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.util.sfarspec_proc

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from nepi.util.logger import Logger
+try:
+    from sfa.rspecs.rspec import RSpec
+    from sfa.util.xrn import Xrn, get_leaf, get_authority, hrn_to_urn, urn_to_hrn
+except ImportError:
+    log = Logger("SFA RSpec Processing")
+    log.debug("Package sfa-common not installed.\
+         Could not import sfa.rspecs.rspec and sfa.util.xrn")
+
+from types import StringTypes, ListType
+
+
+
[docs]class SfaRSpecProcessing(object): + """ + Class to process SFA RSpecs, parse the RSpec replies such as Advertisement RSpecs, + and build in the case of Request RSpecs. + """ + def __init__(self, config=None): + self._log = Logger("SFA RSpec Processing") + self.config = config + +
[docs] def make_dict_rec(self, obj): + if not obj or isinstance(obj, (StringTypes, bool)): + return obj + if isinstance(obj, list): + objcopy = [] + for x in obj: + objcopy.append(self.make_dict_rec(x)) + return objcopy + # We thus suppose we have a child of dict + objcopy = {} + for k, v in obj.items(): + objcopy[k] = self.make_dict_rec(v) + return objcopy +
+
[docs] def parse_sfa_rspec(self, rspec_string): + """ + Parse the RSpec XML as a string. + """ + # rspec_type and rspec_version should be set in the config of the platform, + # we use GENIv3 as default one if not + if self.config: + if 'rspec_type' and 'rspec_version' in self.config: + rspec_version = self.config['rspec_type'] + ' ' + self.config['rspec_version'] + else: + rspec_version = 'GENI 3' + self._log.debug(rspec_version) + rspec = RSpec(rspec_string, version=rspec_version) + + try: + nodes = rspec.version.get_nodes() + except Exception, e: + self._log.warn("Could not retrieve nodes in RSpec: %s" % e) + try: + leases = rspec.version.get_leases() + except Exception, e: + self._log.warn("Could not retrieve leases in RSpec: %s" % e) + try: + links = rspec.version.get_links() + except Exception, e: + self._log.warn("Could not retrieve links in RSpec: %s" % e) + try: + channels = rspec.version.get_channels() + except Exception, e: + self._log.warn("Could not retrieve channels in RSpec: %s" % e) + + resources = [] + # Extend object and Format object field's name + for node in nodes: + node['type'] = 'node' + node['network_hrn'] = Xrn(node['component_id']).authority[0] # network ? XXX + node['hrn'] = urn_to_hrn(node['component_id'])[0] + node['urn'] = node['component_id'] + node['hostname'] = node['component_name'] + node['initscripts'] = node.pop('pl_initscripts') + if 'exclusive' in node and node['exclusive']: + node['exclusive'] = node['exclusive'].lower() == 'true' + + # XXX This should use a MAP as before + if 'position' in node: # iotlab + node['x'] = node['position']['posx'] + node['y'] = node['position']['posy'] + node['z'] = node['position']['posz'] + del node['position'] + + if 'location' in node: + if node['location']: + node['latitude'] = node['location']['latitude'] + node['longitude'] = node['location']['longitude'] + del node['location'] + + # Flatten tags + if 'tags' in node: + if node['tags']: + for tag in node['tags']: + node[tag['tagname']] = tag['value'] + del node['tags'] + + + # We suppose we have children of dict that cannot be serialized + # with xmlrpc, let's make dict + resources.append(self.make_dict_rec(node)) + + # NOTE a channel is a resource and should not be treated independently + # resource + # | + # +----+------+-------+ + # | | | | + # node link channel etc. + #resources.extend(nodes) + #resources.extend(channels) + + return {'resource': resources, 'lease': leases } +# 'channel': channels \ +# } + +
+
[docs] def build_sfa_rspec(self, slice_id, resources, properties, leases): + """ + Build the XML RSpec from list of resources' urns. + eg. resources = ["urn:publicid:IDN+ple:modenaple+node+planetlab-1.ing.unimo.it"] + """ + #if isinstance(resources, str): + # resources = eval(resources) + # rspec_type and rspec_version should be set in the config of the platform, + # we use GENIv3 as default one if not + if self.config: + if 'rspec_type' and 'rspec_version' in self.config: + rspec_version = self.config['rspec_type'] + ' ' + self.config['rspec_version'] + else: + rspec_version = 'GENI 3' + + # extend rspec version with "content_type" + rspec_version += ' request' + + rspec = RSpec(version=rspec_version) + + nodes = [] + channels = [] + links = [] + self._log.debug("Building RSpec for resources %s" % resources) + cardinal = 0 + wilab = False + for urn in resources: + # XXX TO BE CORRECTED, this handles None values + if not urn: + continue + self._log.debug(urn) + resource = dict() + # TODO: take into account the case where we send a dict of URNs without keys + #resource['component_id'] = resource.pop('urn') + resource['component_id'] = urn + resource_hrn, resource_type = urn_to_hrn(resource['component_id']) + # build component_manager_id + top_auth = resource_hrn.split('.')[0] + cm = urn.split("+") + resource['component_manager_id'] = "%s+%s+authority+cm" % (cm[0],top_auth) + + if resource_type == 'node': + # XXX dirty hack WiLab !!! +# Commented Lucia, doesn't work for wilabt +# if self.config: +# if 'wilab2' in self.config['sm']: +# resource['client_id'] = "PC" +# resource['sliver_type'] = "raw-pc" + if 'wilab2' in urn: + wilab = True + resource['client_id'] = "node%s" % cardinal + resource['sliver_type'] = "raw-pc" + resource['disk_image'] = "hola" + top_auth = resource_hrn.replace("\\", "").split('.') + top_auth.pop() + top_auth = '.'.join(top_auth) + cm = urn.split("+") + resource['component_manager_id'] = "%s+%s+authority+cm" % (cm[0],top_auth) + cardinal += 1 + nodes.append(resource) + elif resource_type == 'link': + links.append(resource) + elif resource_type == 'channel': + channels.append(resource) + else: + raise Exception, "Not supported type of resource" + + rspec.version.add_nodes(nodes, rspec_content_type="request") + #rspec.version.add_leases(leases) + #rspec.version.add_links(links) + #rspec.version.add_channels(channels) + + #self._log.debug("request rspec: %s"%rspec.toxml()) + string = rspec.toxml() + if wilab and properties is not None: + ## dirty hack for the f4f demo + b = string.split('\n') + for i, n in enumerate(b): + if 'sliver_type name="raw-pc"' in n: + b[i] = '<sliver_type name="raw-pc">' + b.insert(i+1, '<disk_image name="urn:publicid:IDN+wall2.ilabt.iminds.be+image+emulab-ops//%s"/>' % properties['disk_image']) + #b.insert(i+1, '<disk_image name="urn:publicid:IDN+wilab2.ilabt.iminds.be+image+nepi:%s"/>' % properties['disk_image']) + b.insert(i+2, '</sliver_type>') + string = ''.join(b) + self._log.debug("request rspec : %s" % string) + return string +
+ +
+
+ +
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/util/sshfuncs.html b/doc/sphinx/_build/html/_modules/nepi/util/sshfuncs.html new file mode 100644 index 00000000..b588babb --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/util/sshfuncs.html @@ -0,0 +1,988 @@ + + + + + + + + nepi.util.sshfuncs — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.util.sshfuncs

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+#         Claudio Freire <claudio-daniel.freire@inria.fr>
+
+## TODO: This code needs reviewing !!!
+
+import base64
+import errno
+import hashlib
+import logging
+import os
+import os.path
+import re
+import select
+import signal
+import socket
+import subprocess
+import threading
+import time
+import tempfile
+
+_re_inet = re.compile("\d+:\s+(?P<name>[a-z0-9_-]+)\s+inet6?\s+(?P<inet>[a-f0-9.:/]+)\s+(brd\s+[0-9.]+)?.*scope\s+global.*") 
+
+logger = logging.getLogger("sshfuncs")
+
+
[docs]def log(msg, level, out = None, err = None): + if out: + msg += " - OUT: %s " % out + + if err: + msg += " - ERROR: %s " % err + + logger.log(level, msg) +
+if hasattr(os, "devnull"): + DEV_NULL = os.devnull +else: + DEV_NULL = "/dev/null" + +SHELL_SAFE = re.compile('^[-a-zA-Z0-9_=+:.,/]*$') + +
[docs]class STDOUT: + """ + Special value that when given to rspawn in stderr causes stderr to + redirect to whatever stdout was redirected to. + """ +
+
[docs]class ProcStatus: + """ + Codes for status of remote spawned process + """ + # Process is still running + RUNNING = 1 + + # Process is finished + FINISHED = 2 + + # Process hasn't started running yet (this should be very rare) + NOT_STARTED = 3 +
+hostbyname_cache = dict() +hostbyname_cache_lock = threading.Lock() + +
[docs]def resolve_hostname(host): + ip = None + + if host in ["localhost", "127.0.0.1", "::1"]: + p = subprocess.Popen("ip -o addr list", shell=True, + stdout=subprocess.PIPE, stderr=subprocess.PIPE) + stdout, stderr = p.communicate() + m = _re_inet.findall(stdout) + ip = m[0][1].split("/")[0] + else: + ip = socket.gethostbyname(host) + + return ip +
+
[docs]def gethostbyname(host): + global hostbyname_cache + global hostbyname_cache_lock + + hostbyname = hostbyname_cache.get(host) + if not hostbyname: + with hostbyname_cache_lock: + hostbyname = resolve_hostname(host) + hostbyname_cache[host] = hostbyname + + msg = " Added hostbyname %s - %s " % (host, hostbyname) + log(msg, logging.DEBUG) + + return hostbyname +
+OPENSSH_HAS_PERSIST = None + +
[docs]def openssh_has_persist(): + """ The ssh_config options ControlMaster and ControlPersist allow to + reuse a same network connection for multiple ssh sessions. In this + way limitations on number of open ssh connections can be bypassed. + However, older versions of openSSH do not support this feature. + This function is used to determine if ssh connection persist features + can be used. + """ + global OPENSSH_HAS_PERSIST + if OPENSSH_HAS_PERSIST is None: + proc = subprocess.Popen(["ssh","-v"], + stdout = subprocess.PIPE, + stderr = subprocess.STDOUT, + stdin = open("/dev/null","r") ) + out,err = proc.communicate() + proc.wait() + + vre = re.compile(r'OpenSSH_(?:[6-9]|5[.][8-9]|5[.][1-9][0-9]|[1-9][0-9]).*', re.I) + OPENSSH_HAS_PERSIST = bool(vre.match(out)) + return OPENSSH_HAS_PERSIST +
+
[docs]def make_server_key_args(server_key, host, port): + """ Returns a reference to a temporary known_hosts file, to which + the server key has been added. + + Make sure to hold onto the temp file reference until the process is + done with it + + :param server_key: the server public key + :type server_key: str + + :param host: the hostname + :type host: str + + :param port: the ssh port + :type port: str + + """ + if port is not None: + host = '%s:%s' % (host, str(port)) + + # Create a temporary server key file + tmp_known_hosts = tempfile.NamedTemporaryFile() + + hostbyname = gethostbyname(host) + + # Add the intended host key + tmp_known_hosts.write('%s,%s %s\n' % (host, hostbyname, server_key)) + + # If we're not in strict mode, add user-configured keys + if os.environ.get('NEPI_STRICT_AUTH_MODE',"").lower() not in ('1','true','on'): + user_hosts_path = '%s/.ssh/known_hosts' % (os.environ.get('HOME',""),) + if os.access(user_hosts_path, os.R_OK): + f = open(user_hosts_path, "r") + tmp_known_hosts.write(f.read()) + f.close() + + tmp_known_hosts.flush() + + return tmp_known_hosts +
+
[docs]def make_control_path(agent, forward_x11): + ctrl_path = "/tmp/nepi_ssh" + + if agent: + ctrl_path +="_a" + + if forward_x11: + ctrl_path +="_x" + + ctrl_path += "-%r@%h:%p" + + return ctrl_path +
+
[docs]def shell_escape(s): + """ Escapes strings so that they are safe to use as command-line + arguments """ + if SHELL_SAFE.match(s): + # safe string - no escaping needed + return s + else: + # unsafe string - escape + def escp(c): + if (32 <= ord(c) < 127 or c in ('\r','\n','\t')) and c not in ("'",'"'): + return c + else: + return "'$'\\x%02x''" % (ord(c),) + s = ''.join(map(escp,s)) + return "'%s'" % (s,) +
+
[docs]def eintr_retry(func): + """Retries a function invocation when a EINTR occurs""" + import functools + @functools.wraps(func) + def rv(*p, **kw): + retry = kw.pop("_retry", False) + for i in xrange(0 if retry else 4): + try: + return func(*p, **kw) + except (select.error, socket.error), args: + if args[0] == errno.EINTR: + continue + else: + raise + except OSError, e: + if e.errno == errno.EINTR: + continue + else: + raise + else: + return func(*p, **kw) + return rv +
+
[docs]def rexec(command, host, user, + port = None, + gwuser = None, + gw = None, + agent = True, + sudo = False, + identity = None, + server_key = None, + env = None, + tty = False, + connect_timeout = 30, + retry = 3, + persistent = True, + forward_x11 = False, + blocking = True, + strict_host_checking = True): + """ + Executes a remote command, returns ((stdout,stderr),process) + """ + + tmp_known_hosts = None + if not gw: + hostip = gethostbyname(host) + else: hostip = None + + args = ['ssh', '-C', + # Don't bother with localhost. Makes test easier + '-o', 'NoHostAuthenticationForLocalhost=yes', + '-o', 'ConnectTimeout=%d' % (int(connect_timeout),), + '-o', 'ConnectionAttempts=3', + '-o', 'ServerAliveInterval=30', + '-o', 'TCPKeepAlive=yes', + '-o', 'Batchmode=yes', + '-l', user, hostip or host] + + if persistent and openssh_has_persist(): + args.extend([ + '-o', 'ControlMaster=auto', + '-o', 'ControlPath=%s' % (make_control_path(agent, forward_x11),), + '-o', 'ControlPersist=60' ]) + + if not strict_host_checking: + # Do not check for Host key. Unsafe. + args.extend(['-o', 'StrictHostKeyChecking=no']) + + if gw: + proxycommand = _proxy_command(gw, gwuser, identity) + args.extend(['-o', proxycommand]) + + if agent: + args.append('-A') + + if port: + args.append('-p%d' % port) + + if identity: + identity = os.path.expanduser(identity) + args.extend(('-i', identity)) + + if tty: + args.append('-t') + args.append('-t') + + if forward_x11: + args.append('-X') + + if server_key: + # Create a temporary server key file + tmp_known_hosts = make_server_key_args(server_key, host, port) + args.extend(['-o', 'UserKnownHostsFile=%s' % (tmp_known_hosts.name,)]) + + if sudo: + command = "sudo " + command + + args.append(command) + + log_msg = " rexec - host %s - command %s " % (str(host), " ".join(map(str, args))) + + stdout = stderr = stdin = subprocess.PIPE + if forward_x11: + stdout = stderr = stdin = None + + return _retry_rexec(args, log_msg, + stderr = stderr, + stdin = stdin, + stdout = stdout, + env = env, + retry = retry, + tmp_known_hosts = tmp_known_hosts, + blocking = blocking) +
+
[docs]def rcopy(source, dest, + port = None, + gwuser = None, + gw = None, + recursive = False, + identity = None, + server_key = None, + retry = 3, + strict_host_checking = True): + """ + Copies from/to remote sites. + + Source and destination should have the user and host encoded + as per scp specs. + + Source can be a list of files to copy to a single destination, + (in which case it is advised that the destination be a folder), + or a single file in a string. + """ + + # Parse destination as <user>@<server>:<path> + if isinstance(dest, str) and ':' in dest: + remspec, path = dest.split(':',1) + elif isinstance(source, str) and ':' in source: + remspec, path = source.split(':',1) + else: + raise ValueError, "Both endpoints cannot be local" + user,host = remspec.rsplit('@',1) + + # plain scp + tmp_known_hosts = None + + args = ['scp', '-q', '-p', '-C', + # Speed up transfer using blowfish cypher specification which is + # faster than the default one (3des) + '-c', 'blowfish', + # Don't bother with localhost. Makes test easier + '-o', 'NoHostAuthenticationForLocalhost=yes', + '-o', 'ConnectTimeout=60', + '-o', 'ConnectionAttempts=3', + '-o', 'ServerAliveInterval=30', + '-o', 'TCPKeepAlive=yes' ] + + if port: + args.append('-P%d' % port) + + if gw: + proxycommand = _proxy_command(gw, gwuser, identity) + args.extend(['-o', proxycommand]) + + if recursive: + args.append('-r') + + if identity: + identity = os.path.expanduser(identity) + args.extend(('-i', identity)) + + if server_key: + # Create a temporary server key file + tmp_known_hosts = make_server_key_args(server_key, host, port) + args.extend(['-o', 'UserKnownHostsFile=%s' % (tmp_known_hosts.name,)]) + + if not strict_host_checking: + # Do not check for Host key. Unsafe. + args.extend(['-o', 'StrictHostKeyChecking=no']) + + if isinstance(source, list): + args.extend(source) + else: + if openssh_has_persist(): + args.extend([ + '-o', 'ControlMaster=auto', + '-o', 'ControlPath=%s' % (make_control_path(False, False),) + ]) + args.append(source) + + if isinstance(dest, list): + args.extend(dest) + else: + args.append(dest) + + log_msg = " rcopy - host %s - command %s " % (str(host), " ".join(map(str, args))) + + return _retry_rexec(args, log_msg, env = None, retry = retry, + tmp_known_hosts = tmp_known_hosts, + blocking = True) +
+
[docs]def rspawn(command, pidfile, + stdout = '/dev/null', + stderr = STDOUT, + stdin = '/dev/null', + home = None, + create_home = False, + sudo = False, + host = None, + port = None, + user = None, + gwuser = None, + gw = None, + agent = None, + identity = None, + server_key = None, + tty = False, + strict_host_checking = True): + """ + Spawn a remote command such that it will continue working asynchronously in + background. + + :param command: The command to run, it should be a single line. + :type command: str + + :param pidfile: Path to a file where to store the pid and ppid of the + spawned process + :type pidfile: str + + :param stdout: Path to file to redirect standard output. + The default value is /dev/null + :type stdout: str + + :param stderr: Path to file to redirect standard error. + If the special STDOUT value is used, stderr will + be redirected to the same file as stdout + :type stderr: str + + :param stdin: Path to a file with input to be piped into the command's standard input + :type stdin: str + + :param home: Path to working directory folder. + It is assumed to exist unless the create_home flag is set. + :type home: str + + :param create_home: Flag to force creation of the home folder before + running the command + :type create_home: bool + + :param sudo: Flag forcing execution with sudo user + :type sudo: bool + + :rtype: tuple + + (stdout, stderr), process + + Of the spawning process, which only captures errors at spawning time. + Usually only useful for diagnostics. + """ + # Start process in a "daemonized" way, using nohup and heavy + # stdin/out redirection to avoid connection issues + if stderr is STDOUT: + stderr = '&1' + else: + stderr = ' ' + stderr + + daemon_command = '{ { %(command)s > %(stdout)s 2>%(stderr)s < %(stdin)s & } ; echo $! 1 > %(pidfile)s ; }' % { + 'command' : command, + 'pidfile' : shell_escape(pidfile), + 'stdout' : stdout, + 'stderr' : stderr, + 'stdin' : stdin, + } + + cmd = "%(create)s%(gohome)s rm -f %(pidfile)s ; %(sudo)s nohup bash -c %(command)s " % { + 'command' : shell_escape(daemon_command), + 'sudo' : 'sudo -S' if sudo else '', + 'pidfile' : shell_escape(pidfile), + 'gohome' : 'cd %s ; ' % (shell_escape(home),) if home else '', + 'create' : 'mkdir -p %s ; ' % (shell_escape(home),) if create_home and home else '', + } + + (out,err),proc = rexec( + cmd, + host = host, + port = port, + user = user, + gwuser = gwuser, + gw = gw, + agent = agent, + identity = identity, + server_key = server_key, + tty = tty, + strict_host_checking = strict_host_checking , + ) + + if proc.wait(): + raise RuntimeError, "Failed to set up application on host %s: %s %s" % (host, out,err,) + + return ((out, err), proc) +
+@eintr_retry +
[docs]def rgetpid(pidfile, + host = None, + port = None, + user = None, + gwuser = None, + gw = None, + agent = None, + identity = None, + server_key = None, + strict_host_checking = True): + """ + Returns the pid and ppid of a process from a remote file where the + information was stored. + + :param home: Path to directory where the pidfile is located + :type home: str + + :param pidfile: Name of file containing the pid information + :type pidfile: str + + :rtype: int + + A (pid, ppid) tuple useful for calling rstatus and rkill, + or None if the pidfile isn't valid yet (can happen when process is staring up) + + """ + (out,err),proc = rexec( + "cat %(pidfile)s" % { + 'pidfile' : pidfile, + }, + host = host, + port = port, + user = user, + gwuser = gwuser, + gw = gw, + agent = agent, + identity = identity, + server_key = server_key, + strict_host_checking = strict_host_checking + ) + + if proc.wait(): + return None + + if out: + try: + return map(int,out.strip().split(' ',1)) + except: + # Ignore, many ways to fail that don't matter that much + return None +
+@eintr_retry +
[docs]def rstatus(pid, ppid, + host = None, + port = None, + user = None, + gwuser = None, + gw = None, + agent = None, + identity = None, + server_key = None, + strict_host_checking = True): + """ + Returns a code representing the the status of a remote process + + :param pid: Process id of the process + :type pid: int + + :param ppid: Parent process id of process + :type ppid: int + + :rtype: int (One of NOT_STARTED, RUNNING, FINISHED) + + """ + (out,err),proc = rexec( + # Check only by pid. pid+ppid does not always work (especially with sudo) + " (( ps --pid %(pid)d -o pid | grep -c %(pid)d && echo 'wait') || echo 'done' ) | tail -n 1" % { + 'ppid' : ppid, + 'pid' : pid, + }, + host = host, + port = port, + user = user, + gwuser = gwuser, + gw = gw, + agent = agent, + identity = identity, + server_key = server_key, + strict_host_checking = strict_host_checking + ) + + if proc.wait(): + return ProcStatus.NOT_STARTED + + status = False + if err: + if err.strip().find("Error, do this: mount -t proc none /proc") >= 0: + status = True + elif out: + status = (out.strip() == 'wait') + else: + return ProcStatus.NOT_STARTED + return ProcStatus.RUNNING if status else ProcStatus.FINISHED +
+@eintr_retry +
[docs]def rkill(pid, ppid, + host = None, + port = None, + user = None, + gwuser = None, + gw = None, + agent = None, + sudo = False, + identity = None, + server_key = None, + nowait = False, + strict_host_checking = True): + """ + Sends a kill signal to a remote process. + + First tries a SIGTERM, and if the process does not end in 10 seconds, + it sends a SIGKILL. + + :param pid: Process id of process to be killed + :type pid: int + + :param ppid: Parent process id of process to be killed + :type ppid: int + + :param sudo: Flag indicating if sudo should be used to kill the process + :type sudo: bool + + """ + subkill = "$(ps --ppid %(pid)d -o pid h)" % { 'pid' : pid } + cmd = """ +SUBKILL="%(subkill)s" ; +%(sudo)s kill -- -%(pid)d $SUBKILL || /bin/true +%(sudo)s kill %(pid)d $SUBKILL || /bin/true +for x in 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 ; do + sleep 0.2 + if [ `ps --pid %(pid)d -o pid | grep -c %(pid)d` == '0' ]; then + break + else + %(sudo)s kill -- -%(pid)d $SUBKILL || /bin/true + %(sudo)s kill %(pid)d $SUBKILL || /bin/true + fi + sleep 1.8 +done +if [ `ps --pid %(pid)d -o pid | grep -c %(pid)d` != '0' ]; then + %(sudo)s kill -9 -- -%(pid)d $SUBKILL || /bin/true + %(sudo)s kill -9 %(pid)d $SUBKILL || /bin/true +fi +""" + if nowait: + cmd = "( %s ) >/dev/null 2>/dev/null </dev/null &" % (cmd,) + + (out,err),proc = rexec( + cmd % { + 'ppid' : ppid, + 'pid' : pid, + 'sudo' : 'sudo -S' if sudo else '', + 'subkill' : subkill, + }, + host = host, + port = port, + user = user, + gwuser = gwuser, + gw = gw, + agent = agent, + identity = identity, + server_key = server_key, + strict_host_checking = strict_host_checking + ) + + # wait, don't leave zombies around + proc.wait() + + return (out, err), proc +
+def _retry_rexec(args, + log_msg, + stdout = subprocess.PIPE, + stdin = subprocess.PIPE, + stderr = subprocess.PIPE, + env = None, + retry = 3, + tmp_known_hosts = None, + blocking = True): + + for x in xrange(retry): + # connects to the remote host and starts a remote connection + proc = subprocess.Popen(args, + env = env, + stdout = stdout, + stdin = stdin, + stderr = stderr) + + # attach tempfile object to the process, to make sure the file stays + # alive until the process is finished with it + proc._known_hosts = tmp_known_hosts + + # The argument block == False forces to rexec to return immediately, + # without blocking + try: + err = out = " " + if blocking: + #(out, err) = proc.communicate() + # The method communicate was re implemented for performance issues + # when using python subprocess communicate method the ssh commands + # last one minute each + out, err = _communicate(proc, input=None) + + elif stdout: + out = proc.stdout.read() + if proc.poll() and stderr: + err = proc.stderr.read() + + log(log_msg, logging.DEBUG, out, err) + + if proc.poll(): + skip = False + + if err.strip().startswith('ssh: ') or err.strip().startswith('mux_client_hello_exchange: '): + # SSH error, can safely retry + skip = True + elif retry: + # Probably timed out or plain failed but can retry + skip = True + + if skip: + t = x*2 + msg = "SLEEPING %d ... ATEMPT %d - command %s " % ( + t, x, " ".join(args)) + log(msg, logging.DEBUG) + + time.sleep(t) + continue + break + except RuntimeError, e: + msg = " rexec EXCEPTION - TIMEOUT -> %s \n %s" % ( e.args, log_msg ) + log(msg, logging.DEBUG, out, err) + + if retry <= 0: + raise + retry -= 1 + + return ((out, err), proc) + +# POSIX +# Don't remove. The method communicate was re implemented for performance issues +def _communicate(proc, input, timeout=None, err_on_timeout=True): + read_set = [] + write_set = [] + stdout = None # Return + stderr = None # Return + + killed = False + + if timeout is not None: + timelimit = time.time() + timeout + killtime = timelimit + 4 + bailtime = timelimit + 4 + + if proc.stdin: + # Flush stdio buffer. This might block, if the user has + # been writing to .stdin in an uncontrolled fashion. + proc.stdin.flush() + if input: + write_set.append(proc.stdin) + else: + proc.stdin.close() + + if proc.stdout: + read_set.append(proc.stdout) + stdout = [] + + if proc.stderr: + read_set.append(proc.stderr) + stderr = [] + + input_offset = 0 + while read_set or write_set: + if timeout is not None: + curtime = time.time() + if timeout is None or curtime > timelimit: + if curtime > bailtime: + break + elif curtime > killtime: + signum = signal.SIGKILL + else: + signum = signal.SIGTERM + # Lets kill it + os.kill(proc.pid, signum) + select_timeout = 0.5 + else: + select_timeout = timelimit - curtime + 0.1 + else: + select_timeout = 1.0 + + if select_timeout > 1.0: + select_timeout = 1.0 + + try: + rlist, wlist, xlist = select.select(read_set, write_set, [], select_timeout) + except select.error,e: + if e[0] != 4: + raise + else: + continue + + if not rlist and not wlist and not xlist and proc.poll() is not None: + # timeout and process exited, say bye + break + + if proc.stdin in wlist: + # When select has indicated that the file is writable, + # we can write up to PIPE_BUF bytes without risk + # blocking. POSIX defines PIPE_BUF >= 512 + bytes_written = os.write(proc.stdin.fileno(), + buffer(input, input_offset, 512)) + input_offset += bytes_written + + if input_offset >= len(input): + proc.stdin.close() + write_set.remove(proc.stdin) + + if proc.stdout in rlist: + data = os.read(proc.stdout.fileno(), 1024) + if data == "": + proc.stdout.close() + read_set.remove(proc.stdout) + stdout.append(data) + + if proc.stderr in rlist: + data = os.read(proc.stderr.fileno(), 1024) + if data == "": + proc.stderr.close() + read_set.remove(proc.stderr) + stderr.append(data) + + # All data exchanged. Translate lists into strings. + if stdout is not None: + stdout = ''.join(stdout) + if stderr is not None: + stderr = ''.join(stderr) + + # Translate newlines, if requested. We cannot let the file + # object do the translation: It is based on stdio, which is + # impossible to combine with select (unless forcing no + # buffering). + if proc.universal_newlines and hasattr(file, 'newlines'): + if stdout: + stdout = proc._translate_newlines(stdout) + if stderr: + stderr = proc._translate_newlines(stderr) + + if killed and err_on_timeout: + errcode = proc.poll() + raise RuntimeError, ("Operation timed out", errcode, stdout, stderr) + else: + if killed: + proc.poll() + else: + proc.wait() + return (stdout, stderr) + +def _proxy_command(gw, gwuser, gwidentity): + """ + Constructs the SSH ProxyCommand option to add to the SSH command to connect + via a proxy + :param gw: SSH proxy hostname + :type gw: str + + :param gwuser: SSH proxy username + :type gwuser: str + + :param gwidentity: SSH proxy identity file + :type gwidentity: str + + + :rtype: str + + returns the SSH ProxyCommand option. + """ + + proxycommand = 'ProxyCommand=ssh -q ' + if gwidentity: + proxycommand += '-i %s ' % os.path.expanduser(gwidentity) + if gwuser: + proxycommand += '%s' % gwuser + else: + proxycommand += '%r' + proxycommand += '@%s -W %%h:%%p' % gw + + return proxycommand +
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/util/statfuncs.html b/doc/sphinx/_build/html/_modules/nepi/util/statfuncs.html new file mode 100644 index 00000000..73b5db7a --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/util/statfuncs.html @@ -0,0 +1,136 @@ + + + + + + + + nepi.util.statfuncs — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.util.statfuncs

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+import math
+import numpy
+from scipy import stats
+
+
[docs]def compute_mean(sample): + # TODO: Discard outliers !!!! + + if not sample: + print " CANNOT COMPUTE STATS for ", sample + return (0, 0, 0, 0) + + x = numpy.array(sample) + + # sample mean and standard deviation + n, min_max, mean, var, skew, kurt = stats.describe(x) + std = math.sqrt(var) + + # for the population mean and std ... + # mean = x.mean() + # std = x.std() + + # Calculate confidence interval t-distribution + ## BUG: Use quantil of NORMAL distribution, not t-student quantil distribution + ci = stats.t.interval(0.95, n-1, loc = mean, scale = std/math.sqrt(n)) + + return (mean, std, ci[0], ci[1]) +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_modules/nepi/util/timefuncs.html b/doc/sphinx/_build/html/_modules/nepi/util/timefuncs.html new file mode 100644 index 00000000..398babe9 --- /dev/null +++ b/doc/sphinx/_build/html/_modules/nepi/util/timefuncs.html @@ -0,0 +1,213 @@ + + + + + + + + nepi.util.timefuncs — NEPI 3.0 documentation + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ +

Source code for nepi.util.timefuncs

+#
+#    NEPI, a framework to manage network experiments
+#    Copyright (C) 2013 INRIA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
+
+
+import datetime
+import re
+
+_strf = "%Y%m%d%H%M%S%f"
+_reabs = re.compile("^\d{20}$")
+_rerel = re.compile("^(?P<time>\d+(.\d+)?)(?P<units>h|m|s|ms|us)$")
+
+# Work around to fix "ImportError: Failed to import _strptime because the import lock is held by another thread."
+datetime.datetime.strptime("20120807124732894211", _strf)
+
+
[docs]def stformat(sdate): + """ Constructs a datetime object from a string date with + format YYYYMMddHHMMSSffff + + """ + return datetime.datetime.strptime(sdate, _strf).date() +
+
[docs]def tsformat(date = None): + """ Formats a datetime object to a string with format YYYYMMddHHMMSSffff. + If no date is given, the current date is used. + + """ + if not date: + date = tnow() + + return date.strftime(_strf) +
+
[docs]def tnow(): + """ Returns datetime object with the current time """ + return datetime.datetime.now() +
+
[docs]def tdiff(date1, date2): + """ Returns difference ( date1 - date2 ) as a datetime object, + where date1 and date 2 are datetime objects + + """ + return date1 - date2 +
+def _get_total_seconds(td): + return (td.microseconds + (td.seconds + td.days * 24 * 3600) * 1e6) / 1e6 + +
[docs]def tdiffsec(date1, date2): + """ Returns the date difference ( date1 - date2 ) in seconds, + where date1 and date 2 are datetime objects + + """ + diff = tdiff(date1, date2) + return _get_total_seconds(diff) +
+
[docs]def stabsformat(sdate, dbase = None): + """ Constructs a datetime object from a string date. + The string date can be expressed as an absolute date + ( i.e. format YYYYMMddHHMMSSffff ) or as a relative time + ( e.g. format '5m' or '10s'). + If the date is a relative time and the dbase parameter + is given (dbase must be datetime object), the returned + date will be dbase + sdate. If dbase is None, + current time will be used instead as base time. + + :param date : string date + :type date : date + + """ + + # No date given, return current datetime + if not sdate: + return tnow() + + # Absolute date is given + if _reabs.match(sdate): + return stformat(sdate) + + # Relative time is given + m = _rerel.match(sdate) + if m: + time = float(m.groupdict()['time']) + units = m.groupdict()['units'] + if units == 'h': + delta = datetime.timedelta(hours = time) + elif units == 'm': + delta = datetime.timedelta(minutes = time) + elif units == 's': + delta = datetime.timedelta(seconds = time) + elif units == 'ms': + delta = datetime.timedelta(microseconds = (time*1000)) + else: + delta = datetime.timedelta(microseconds = time) + + if not dbase: + dbase = tnow() + + return dbase + delta + + return None +
+
[docs]def compute_delay_ms(timestamp2, timestamp1): + d1 = datetime.datetime.fromtimestamp(float(timestamp1)) + d2 = datetime.datetime.fromtimestamp(float(timestamp2)) + delay = d2 - d1 + + # round up resolution - round up to miliseconds + return delay.total_seconds() * 1000 +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/_sources/_layout/modules.txt b/doc/sphinx/_build/html/_sources/_layout/modules.txt new file mode 100644 index 00000000..6486b2cf --- /dev/null +++ b/doc/sphinx/_build/html/_sources/_layout/modules.txt @@ -0,0 +1,7 @@ +nepi +==== + +.. toctree:: + :maxdepth: 4 + + nepi diff --git a/doc/sphinx/_build/html/_sources/_layout/nepi.data.processing.ccn.txt b/doc/sphinx/_build/html/_sources/_layout/nepi.data.processing.ccn.txt new file mode 100644 index 00000000..4b3bb6b2 --- /dev/null +++ b/doc/sphinx/_build/html/_sources/_layout/nepi.data.processing.ccn.txt @@ -0,0 +1,22 @@ +nepi.data.processing.ccn package +================================ + +Submodules +---------- + +nepi.data.processing.ccn.parser module +-------------------------------------- + +.. automodule:: nepi.data.processing.ccn.parser + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: nepi.data.processing.ccn + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/_build/html/_sources/_layout/nepi.data.processing.ping.txt b/doc/sphinx/_build/html/_sources/_layout/nepi.data.processing.ping.txt new file mode 100644 index 00000000..56d3574d --- /dev/null +++ b/doc/sphinx/_build/html/_sources/_layout/nepi.data.processing.ping.txt @@ -0,0 +1,22 @@ +nepi.data.processing.ping package +================================= + +Submodules +---------- + +nepi.data.processing.ping.parser module +--------------------------------------- + +.. automodule:: nepi.data.processing.ping.parser + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: nepi.data.processing.ping + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/_build/html/_sources/_layout/nepi.data.processing.txt b/doc/sphinx/_build/html/_sources/_layout/nepi.data.processing.txt new file mode 100644 index 00000000..6f22a0fa --- /dev/null +++ b/doc/sphinx/_build/html/_sources/_layout/nepi.data.processing.txt @@ -0,0 +1,18 @@ +nepi.data.processing package +============================ + +Subpackages +----------- + +.. toctree:: + + nepi.data.processing.ccn + nepi.data.processing.ping + +Module contents +--------------- + +.. automodule:: nepi.data.processing + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/_build/html/_sources/_layout/nepi.data.txt b/doc/sphinx/_build/html/_sources/_layout/nepi.data.txt new file mode 100644 index 00000000..2841cdc0 --- /dev/null +++ b/doc/sphinx/_build/html/_sources/_layout/nepi.data.txt @@ -0,0 +1,17 @@ +nepi.data package +================= + +Subpackages +----------- + +.. toctree:: + + nepi.data.processing + +Module contents +--------------- + +.. automodule:: nepi.data + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/_build/html/_sources/_layout/nepi.execution.txt b/doc/sphinx/_build/html/_sources/_layout/nepi.execution.txt new file mode 100644 index 00000000..c8f46ae0 --- /dev/null +++ b/doc/sphinx/_build/html/_sources/_layout/nepi.execution.txt @@ -0,0 +1,70 @@ +nepi.execution package +====================== + +Submodules +---------- + +nepi.execution.attribute module +------------------------------- + +.. automodule:: nepi.execution.attribute + :members: + :undoc-members: + :show-inheritance: + +nepi.execution.ec module +------------------------ + +.. automodule:: nepi.execution.ec + :members: + :undoc-members: + :show-inheritance: + +nepi.execution.resource module +------------------------------ + +.. automodule:: nepi.execution.resource + :members: + :undoc-members: + :show-inheritance: + +nepi.execution.runner module +---------------------------- + +.. automodule:: nepi.execution.runner + :members: + :undoc-members: + :show-inheritance: + +nepi.execution.scheduler module +------------------------------- + +.. automodule:: nepi.execution.scheduler + :members: + :undoc-members: + :show-inheritance: + +nepi.execution.tags module +-------------------------- + +.. automodule:: nepi.execution.tags + :members: + :undoc-members: + :show-inheritance: + +nepi.execution.trace module +--------------------------- + +.. automodule:: nepi.execution.trace + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: nepi.execution + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/_build/html/_sources/_layout/nepi.resources.all.txt b/doc/sphinx/_build/html/_sources/_layout/nepi.resources.all.txt new file mode 100644 index 00000000..59459003 --- /dev/null +++ b/doc/sphinx/_build/html/_sources/_layout/nepi.resources.all.txt @@ -0,0 +1,22 @@ +nepi.resources.all package +========================== + +Submodules +---------- + +nepi.resources.all.collector module +----------------------------------- + +.. automodule:: nepi.resources.all.collector + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: nepi.resources.all + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/_build/html/_sources/_layout/nepi.resources.linux.ccn.txt b/doc/sphinx/_build/html/_sources/_layout/nepi.resources.linux.ccn.txt new file mode 100644 index 00000000..871cb33f --- /dev/null +++ b/doc/sphinx/_build/html/_sources/_layout/nepi.resources.linux.ccn.txt @@ -0,0 +1,94 @@ +nepi.resources.linux.ccn package +================================ + +Submodules +---------- + +nepi.resources.linux.ccn.ccnapplication module +---------------------------------------------- + +.. automodule:: nepi.resources.linux.ccn.ccnapplication + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.ccn.ccncat module +-------------------------------------- + +.. automodule:: nepi.resources.linux.ccn.ccncat + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.ccn.ccncontent module +------------------------------------------ + +.. automodule:: nepi.resources.linux.ccn.ccncontent + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.ccn.ccnd module +------------------------------------ + +.. automodule:: nepi.resources.linux.ccn.ccnd + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.ccn.ccnpeek module +--------------------------------------- + +.. automodule:: nepi.resources.linux.ccn.ccnpeek + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.ccn.ccnping module +--------------------------------------- + +.. automodule:: nepi.resources.linux.ccn.ccnping + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.ccn.ccnpingserver module +--------------------------------------------- + +.. automodule:: nepi.resources.linux.ccn.ccnpingserver + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.ccn.ccnpoke module +--------------------------------------- + +.. automodule:: nepi.resources.linux.ccn.ccnpoke + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.ccn.ccnr module +------------------------------------ + +.. automodule:: nepi.resources.linux.ccn.ccnr + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.ccn.fibentry module +---------------------------------------- + +.. automodule:: nepi.resources.linux.ccn.fibentry + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: nepi.resources.linux.ccn + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/_build/html/_sources/_layout/nepi.resources.linux.netns.txt b/doc/sphinx/_build/html/_sources/_layout/nepi.resources.linux.netns.txt new file mode 100644 index 00000000..a20d9109 --- /dev/null +++ b/doc/sphinx/_build/html/_sources/_layout/nepi.resources.linux.netns.txt @@ -0,0 +1,30 @@ +nepi.resources.linux.netns package +================================== + +Submodules +---------- + +nepi.resources.linux.netns.netnsclient module +--------------------------------------------- + +.. automodule:: nepi.resources.linux.netns.netnsclient + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.netns.netnsemulation module +------------------------------------------------ + +.. automodule:: nepi.resources.linux.netns.netnsemulation + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: nepi.resources.linux.netns + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/_build/html/_sources/_layout/nepi.resources.linux.ns3.ccn.txt b/doc/sphinx/_build/html/_sources/_layout/nepi.resources.linux.ns3.ccn.txt new file mode 100644 index 00000000..a6e08684 --- /dev/null +++ b/doc/sphinx/_build/html/_sources/_layout/nepi.resources.linux.ns3.ccn.txt @@ -0,0 +1,70 @@ +nepi.resources.linux.ns3.ccn package +==================================== + +Submodules +---------- + +nepi.resources.linux.ns3.ccn.ns3ccncatdceapplication module +----------------------------------------------------------- + +.. automodule:: nepi.resources.linux.ns3.ccn.ns3ccncatdceapplication + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.ns3.ccn.ns3ccndceapplication module +-------------------------------------------------------- + +.. automodule:: nepi.resources.linux.ns3.ccn.ns3ccndceapplication + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.ns3.ccn.ns3ccnddceapplication module +--------------------------------------------------------- + +.. automodule:: nepi.resources.linux.ns3.ccn.ns3ccnddceapplication + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.ns3.ccn.ns3ccnpeekdceapplication module +------------------------------------------------------------ + +.. automodule:: nepi.resources.linux.ns3.ccn.ns3ccnpeekdceapplication + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.ns3.ccn.ns3ccnpokedceapplication module +------------------------------------------------------------ + +.. automodule:: nepi.resources.linux.ns3.ccn.ns3ccnpokedceapplication + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.ns3.ccn.ns3ccnrdceapplication module +--------------------------------------------------------- + +.. automodule:: nepi.resources.linux.ns3.ccn.ns3ccnrdceapplication + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.ns3.ccn.ns3fibentrydceapplication module +------------------------------------------------------------- + +.. automodule:: nepi.resources.linux.ns3.ccn.ns3fibentrydceapplication + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: nepi.resources.linux.ns3.ccn + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/_build/html/_sources/_layout/nepi.resources.linux.ns3.txt b/doc/sphinx/_build/html/_sources/_layout/nepi.resources.linux.ns3.txt new file mode 100644 index 00000000..341946ed --- /dev/null +++ b/doc/sphinx/_build/html/_sources/_layout/nepi.resources.linux.ns3.txt @@ -0,0 +1,69 @@ +nepi.resources.linux.ns3 package +================================ + +Subpackages +----------- + +.. toctree:: + + nepi.resources.linux.ns3.ccn + +Submodules +---------- + +nepi.resources.linux.ns3.fdudptunnel module +------------------------------------------- + +.. automodule:: nepi.resources.linux.ns3.fdudptunnel + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.ns3.ns3client module +----------------------------------------- + +.. automodule:: nepi.resources.linux.ns3.ns3client + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.ns3.ns3dceapplication module +------------------------------------------------- + +.. automodule:: nepi.resources.linux.ns3.ns3dceapplication + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.ns3.ns3pingdceapplication module +----------------------------------------------------- + +.. automodule:: nepi.resources.linux.ns3.ns3pingdceapplication + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.ns3.ns3simulation module +--------------------------------------------- + +.. automodule:: nepi.resources.linux.ns3.ns3simulation + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.ns3.tuntapfdlink module +-------------------------------------------- + +.. automodule:: nepi.resources.linux.ns3.tuntapfdlink + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: nepi.resources.linux.ns3 + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/_build/html/_sources/_layout/nepi.resources.linux.txt b/doc/sphinx/_build/html/_sources/_layout/nepi.resources.linux.txt new file mode 100644 index 00000000..40e4309b --- /dev/null +++ b/doc/sphinx/_build/html/_sources/_layout/nepi.resources.linux.txt @@ -0,0 +1,167 @@ +nepi.resources.linux package +============================ + +Subpackages +----------- + +.. toctree:: + + nepi.resources.linux.ccn + nepi.resources.linux.netns + nepi.resources.linux.ns3 + +Submodules +---------- + +nepi.resources.linux.application module +--------------------------------------- + +.. automodule:: nepi.resources.linux.application + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.channel module +----------------------------------- + +.. automodule:: nepi.resources.linux.channel + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.debfuncs module +------------------------------------ + +.. automodule:: nepi.resources.linux.debfuncs + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.gretunnel module +------------------------------------- + +.. automodule:: nepi.resources.linux.gretunnel + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.interface module +------------------------------------- + +.. automodule:: nepi.resources.linux.interface + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.mtr module +------------------------------- + +.. automodule:: nepi.resources.linux.mtr + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.node module +-------------------------------- + +.. automodule:: nepi.resources.linux.node + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.nping module +--------------------------------- + +.. automodule:: nepi.resources.linux.nping + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.ping module +-------------------------------- + +.. automodule:: nepi.resources.linux.ping + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.route module +--------------------------------- + +.. automodule:: nepi.resources.linux.route + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.rpmfuncs module +------------------------------------ + +.. automodule:: nepi.resources.linux.rpmfuncs + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.tap module +------------------------------- + +.. automodule:: nepi.resources.linux.tap + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.tcpdump module +----------------------------------- + +.. automodule:: nepi.resources.linux.tcpdump + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.traceroute module +-------------------------------------- + +.. automodule:: nepi.resources.linux.traceroute + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.tun module +------------------------------- + +.. automodule:: nepi.resources.linux.tun + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.tunnel module +---------------------------------- + +.. automodule:: nepi.resources.linux.tunnel + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.udptest module +----------------------------------- + +.. automodule:: nepi.resources.linux.udptest + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.udptunnel module +------------------------------------- + +.. automodule:: nepi.resources.linux.udptunnel + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: nepi.resources.linux + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/_build/html/_sources/_layout/nepi.resources.netns.txt b/doc/sphinx/_build/html/_sources/_layout/nepi.resources.netns.txt new file mode 100644 index 00000000..eacf7f36 --- /dev/null +++ b/doc/sphinx/_build/html/_sources/_layout/nepi.resources.netns.txt @@ -0,0 +1,118 @@ +nepi.resources.netns package +============================ + +Submodules +---------- + +nepi.resources.netns.netnsapplication module +-------------------------------------------- + +.. automodule:: nepi.resources.netns.netnsapplication + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.netns.netnsbase module +------------------------------------- + +.. automodule:: nepi.resources.netns.netnsbase + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.netns.netnsclient module +--------------------------------------- + +.. automodule:: nepi.resources.netns.netnsclient + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.netns.netnsemulation module +------------------------------------------ + +.. automodule:: nepi.resources.netns.netnsemulation + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.netns.netnsinterface module +------------------------------------------ + +.. automodule:: nepi.resources.netns.netnsinterface + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.netns.netnsipv4address module +-------------------------------------------- + +.. automodule:: nepi.resources.netns.netnsipv4address + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.netns.netnsnode module +------------------------------------- + +.. automodule:: nepi.resources.netns.netnsnode + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.netns.netnsnodeinterface module +---------------------------------------------- + +.. automodule:: nepi.resources.netns.netnsnodeinterface + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.netns.netnsroute module +-------------------------------------- + +.. automodule:: nepi.resources.netns.netnsroute + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.netns.netnsserver module +--------------------------------------- + +.. automodule:: nepi.resources.netns.netnsserver + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.netns.netnsswitch module +--------------------------------------- + +.. automodule:: nepi.resources.netns.netnsswitch + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.netns.netnswrapper module +---------------------------------------- + +.. automodule:: nepi.resources.netns.netnswrapper + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.netns.netnswrapper_debug module +---------------------------------------------- + +.. automodule:: nepi.resources.netns.netnswrapper_debug + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: nepi.resources.netns + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/_build/html/_sources/_layout/nepi.resources.ns3.classes.txt b/doc/sphinx/_build/html/_sources/_layout/nepi.resources.ns3.classes.txt new file mode 100644 index 00000000..e489b712 --- /dev/null +++ b/doc/sphinx/_build/html/_sources/_layout/nepi.resources.ns3.classes.txt @@ -0,0 +1,862 @@ +nepi.resources.ns3.classes package +================================== + +Submodules +---------- + +nepi.resources.ns3.classes.aarf_wifi_manager module +--------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.aarf_wifi_manager + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.aarfcd_wifi_manager module +----------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.aarfcd_wifi_manager + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.adhoc_wifi_mac module +------------------------------------------------ + +.. automodule:: nepi.resources.ns3.classes.adhoc_wifi_mac + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.aloha_noack_net_device module +-------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.aloha_noack_net_device + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.amrr_wifi_manager module +--------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.amrr_wifi_manager + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.ap_wifi_mac module +--------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.ap_wifi_mac + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.arf_wifi_manager module +-------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.arf_wifi_manager + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.arp_l3protocol module +------------------------------------------------ + +.. automodule:: nepi.resources.ns3.classes.arp_l3protocol + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.base_station_net_device module +--------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.base_station_net_device + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.binary_error_model module +---------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.binary_error_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.binary_error_sixlow_model module +----------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.binary_error_sixlow_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.bridge_channel module +------------------------------------------------ + +.. automodule:: nepi.resources.ns3.classes.bridge_channel + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.bridge_net_device module +--------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.bridge_net_device + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.bulk_send_application module +------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.bulk_send_application + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.burst_error_model module +--------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.burst_error_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.cara_wifi_manager module +--------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.cara_wifi_manager + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.constant_acceleration_mobility_model module +---------------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.constant_acceleration_mobility_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.constant_position_mobility_model module +------------------------------------------------------------------ + +.. automodule:: nepi.resources.ns3.classes.constant_position_mobility_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.constant_rate_wifi_manager module +------------------------------------------------------------ + +.. automodule:: nepi.resources.ns3.classes.constant_rate_wifi_manager + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.constant_speed_propagation_delay_model module +------------------------------------------------------------------------ + +.. automodule:: nepi.resources.ns3.classes.constant_speed_propagation_delay_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.constant_velocity_mobility_model module +------------------------------------------------------------------ + +.. automodule:: nepi.resources.ns3.classes.constant_velocity_mobility_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.cost231propagation_loss_model module +--------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.cost231propagation_loss_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.csma_channel module +---------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.csma_channel + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.csma_net_device module +------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.csma_net_device + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.drop_tail_queue module +------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.drop_tail_queue + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.dsrdsr_routing module +------------------------------------------------ + +.. automodule:: nepi.resources.ns3.classes.dsrdsr_routing + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.emu_net_device module +------------------------------------------------ + +.. automodule:: nepi.resources.ns3.classes.emu_net_device + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.error_channel module +----------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.error_channel + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.error_channel_sixlow module +------------------------------------------------------ + +.. automodule:: nepi.resources.ns3.classes.error_channel_sixlow + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.error_net_device module +-------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.error_net_device + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.fd_net_device module +----------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.fd_net_device + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.fixed_rss_loss_model module +------------------------------------------------------ + +.. automodule:: nepi.resources.ns3.classes.fixed_rss_loss_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.friis_propagation_loss_model module +-------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.friis_propagation_loss_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.gauss_markov_mobility_model module +------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.gauss_markov_mobility_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.hierarchical_mobility_model module +------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.hierarchical_mobility_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.hybrid_buildings_propagation_loss_model module +------------------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.hybrid_buildings_propagation_loss_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.icmpv4l4protocol module +-------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.icmpv4l4protocol + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.icmpv6l4protocol module +-------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.icmpv6l4protocol + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.ideal_wifi_manager module +---------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.ideal_wifi_manager + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.ipv4l3protocol module +------------------------------------------------ + +.. automodule:: nepi.resources.ns3.classes.ipv4l3protocol + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.itu_r1411los_propagation_loss_model module +--------------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.itu_r1411los_propagation_loss_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.itu_r1411nlos_over_rooftop_propagation_loss_model module +----------------------------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.itu_r1411nlos_over_rooftop_propagation_loss_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.jakes_propagation_loss_model module +-------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.jakes_propagation_loss_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.kun2600mhz_propagation_loss_model module +------------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.kun2600mhz_propagation_loss_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.list_error_model module +-------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.list_error_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.log_distance_propagation_loss_model module +--------------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.log_distance_propagation_loss_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.loopback_net_device module +----------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.loopback_net_device + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.lr_wpan_net_device module +---------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.lr_wpan_net_device + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.lte_enb_net_device module +---------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.lte_enb_net_device + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.lte_simple_net_device module +------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.lte_simple_net_device + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.lte_ue_net_device module +--------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.lte_ue_net_device + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.matrix_propagation_loss_model module +--------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.matrix_propagation_loss_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.mesh_point_device module +--------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.mesh_point_device + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.mesh_wifi_interface_mac module +--------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.mesh_wifi_interface_mac + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.minstrel_wifi_manager module +------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.minstrel_wifi_manager + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.multi_model_spectrum_channel module +-------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.multi_model_spectrum_channel + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.nakagami_propagation_loss_model module +----------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.nakagami_propagation_loss_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.nist_error_rate_model module +------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.nist_error_rate_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.node module +-------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.node + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.non_communicating_net_device module +-------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.non_communicating_net_device + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.ocb_wifi_mac module +---------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.ocb_wifi_mac + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.oh_buildings_propagation_loss_model module +--------------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.oh_buildings_propagation_loss_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.okumura_hata_propagation_loss_model module +--------------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.okumura_hata_propagation_loss_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.on_off_application module +---------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.on_off_application + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.onoe_wifi_manager module +--------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.onoe_wifi_manager + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.packet_sink module +--------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.packet_sink + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.ping6 module +--------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.ping6 + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.point_to_point_channel module +-------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.point_to_point_channel + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.point_to_point_net_device module +----------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.point_to_point_net_device + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.point_to_point_remote_channel module +--------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.point_to_point_remote_channel + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.radvd module +--------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.radvd + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.random_direction2d_mobility_model module +------------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.random_direction2d_mobility_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.random_propagation_delay_model module +---------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.random_propagation_delay_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.random_propagation_loss_model module +--------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.random_propagation_loss_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.random_walk2d_mobility_model module +-------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.random_walk2d_mobility_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.random_waypoint_mobility_model module +---------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.random_waypoint_mobility_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.range_propagation_loss_model module +-------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.range_propagation_loss_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.rate_error_model module +-------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.rate_error_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.receive_list_error_model module +---------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.receive_list_error_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.red_queue module +------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.red_queue + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.rraa_wifi_manager module +--------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.rraa_wifi_manager + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.simple_channel module +------------------------------------------------ + +.. automodule:: nepi.resources.ns3.classes.simple_channel + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.simple_net_device module +--------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.simple_net_device + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.single_model_spectrum_channel module +--------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.single_model_spectrum_channel + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.six_low_pan_net_device module +-------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.six_low_pan_net_device + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.sta_wifi_mac module +---------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.sta_wifi_mac + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.steady_state_random_waypoint_mobility_model module +----------------------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.steady_state_random_waypoint_mobility_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.subscriber_station_net_device module +--------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.subscriber_station_net_device + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.tap_bridge module +-------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.tap_bridge + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.tcp_l4protocol module +------------------------------------------------ + +.. automodule:: nepi.resources.ns3.classes.tcp_l4protocol + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.three_log_distance_propagation_loss_model module +--------------------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.three_log_distance_propagation_loss_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.two_ray_ground_propagation_loss_model module +----------------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.two_ray_ground_propagation_loss_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.uan_channel module +--------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.uan_channel + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.udp_client module +-------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.udp_client + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.udp_echo_client module +------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.udp_echo_client + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.udp_echo_server module +------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.udp_echo_server + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.udp_l4protocol module +------------------------------------------------ + +.. automodule:: nepi.resources.ns3.classes.udp_l4protocol + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.udp_server module +-------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.udp_server + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.udp_trace_client module +-------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.udp_trace_client + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.v4ping module +---------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.v4ping + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.virtual_net_device module +---------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.virtual_net_device + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.waypoint_mobility_model module +--------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.waypoint_mobility_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.wifi_net_device module +------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.wifi_net_device + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.yans_error_rate_model module +------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.yans_error_rate_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.yans_wifi_channel module +--------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.yans_wifi_channel + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.yans_wifi_phy module +----------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.yans_wifi_phy + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: nepi.resources.ns3.classes + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/_build/html/_sources/_layout/nepi.resources.ns3.txt b/doc/sphinx/_build/html/_sources/_layout/nepi.resources.ns3.txt new file mode 100644 index 00000000..94356ab8 --- /dev/null +++ b/doc/sphinx/_build/html/_sources/_layout/nepi.resources.ns3.txt @@ -0,0 +1,269 @@ +nepi.resources.ns3 package +========================== + +Subpackages +----------- + +.. toctree:: + + nepi.resources.ns3.classes + +Submodules +---------- + +nepi.resources.ns3.ns3application module +---------------------------------------- + +.. automodule:: nepi.resources.ns3.ns3application + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3arpl3protocol module +------------------------------------------ + +.. automodule:: nepi.resources.ns3.ns3arpl3protocol + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3base module +--------------------------------- + +.. automodule:: nepi.resources.ns3.ns3base + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3ccndceapplication module +---------------------------------------------- + +.. automodule:: nepi.resources.ns3.ns3ccndceapplication + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3channel module +------------------------------------ + +.. automodule:: nepi.resources.ns3.ns3channel + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3client module +----------------------------------- + +.. automodule:: nepi.resources.ns3.ns3client + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3dceapplication module +------------------------------------------- + +.. automodule:: nepi.resources.ns3.ns3dceapplication + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3dcehelper module +-------------------------------------- + +.. automodule:: nepi.resources.ns3.ns3dcehelper + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3errormodel module +--------------------------------------- + +.. automodule:: nepi.resources.ns3.ns3errormodel + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3errorratemodel module +------------------------------------------- + +.. automodule:: nepi.resources.ns3.ns3errorratemodel + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3fdnetdevice module +---------------------------------------- + +.. automodule:: nepi.resources.ns3.ns3fdnetdevice + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3icmpv4l4protocol module +--------------------------------------------- + +.. automodule:: nepi.resources.ns3.ns3icmpv4l4protocol + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3ipv4l3protocol module +------------------------------------------- + +.. automodule:: nepi.resources.ns3.ns3ipv4l3protocol + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3mobilitymodel module +------------------------------------------ + +.. automodule:: nepi.resources.ns3.ns3mobilitymodel + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3netdevice module +-------------------------------------- + +.. automodule:: nepi.resources.ns3.ns3netdevice + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3node module +--------------------------------- + +.. automodule:: nepi.resources.ns3.ns3node + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3pipechanel module +--------------------------------------- + +.. automodule:: nepi.resources.ns3.ns3pipechanel + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3propagationdelaymodel module +-------------------------------------------------- + +.. automodule:: nepi.resources.ns3.ns3propagationdelaymodel + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3propagationlossmodel module +------------------------------------------------- + +.. automodule:: nepi.resources.ns3.ns3propagationlossmodel + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3queue module +---------------------------------- + +.. automodule:: nepi.resources.ns3.ns3queue + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3route module +---------------------------------- + +.. automodule:: nepi.resources.ns3.ns3route + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3server module +----------------------------------- + +.. automodule:: nepi.resources.ns3.ns3server + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3simulation module +--------------------------------------- + +.. automodule:: nepi.resources.ns3.ns3simulation + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3wifichannel module +---------------------------------------- + +.. automodule:: nepi.resources.ns3.ns3wifichannel + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3wifimac module +------------------------------------ + +.. automodule:: nepi.resources.ns3.ns3wifimac + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3wifinetdevice module +------------------------------------------ + +.. automodule:: nepi.resources.ns3.ns3wifinetdevice + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3wifiphy module +------------------------------------ + +.. automodule:: nepi.resources.ns3.ns3wifiphy + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3wifiremotestationmanager module +----------------------------------------------------- + +.. automodule:: nepi.resources.ns3.ns3wifiremotestationmanager + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3wrapper module +------------------------------------ + +.. automodule:: nepi.resources.ns3.ns3wrapper + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3wrapper_debug module +------------------------------------------ + +.. automodule:: nepi.resources.ns3.ns3wrapper_debug + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.resource_manager_generator module +---------------------------------------------------- + +.. automodule:: nepi.resources.ns3.resource_manager_generator + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: nepi.resources.ns3 + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/_build/html/_sources/_layout/nepi.resources.omf.txt b/doc/sphinx/_build/html/_sources/_layout/nepi.resources.omf.txt new file mode 100644 index 00000000..7dd222ee --- /dev/null +++ b/doc/sphinx/_build/html/_sources/_layout/nepi.resources.omf.txt @@ -0,0 +1,118 @@ +nepi.resources.omf package +========================== + +Submodules +---------- + +nepi.resources.omf.application module +------------------------------------- + +.. automodule:: nepi.resources.omf.application + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.omf.channel module +--------------------------------- + +.. automodule:: nepi.resources.omf.channel + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.omf.interface module +----------------------------------- + +.. automodule:: nepi.resources.omf.interface + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.omf.messages_5_4 module +-------------------------------------- + +.. automodule:: nepi.resources.omf.messages_5_4 + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.omf.messages_6 module +------------------------------------ + +.. automodule:: nepi.resources.omf.messages_6 + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.omf.node module +------------------------------ + +.. automodule:: nepi.resources.omf.node + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.omf.omf5_api module +---------------------------------- + +.. automodule:: nepi.resources.omf.omf5_api + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.omf.omf6_api module +---------------------------------- + +.. automodule:: nepi.resources.omf.omf6_api + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.omf.omf6_parser module +------------------------------------- + +.. automodule:: nepi.resources.omf.omf6_parser + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.omf.omf_api_factory module +----------------------------------------- + +.. automodule:: nepi.resources.omf.omf_api_factory + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.omf.omf_client module +------------------------------------ + +.. automodule:: nepi.resources.omf.omf_client + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.omf.omf_resource module +-------------------------------------- + +.. automodule:: nepi.resources.omf.omf_resource + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.omf.wilabt_node module +------------------------------------- + +.. automodule:: nepi.resources.omf.wilabt_node + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: nepi.resources.omf + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/_build/html/_sources/_layout/nepi.resources.planetlab.ns3.txt b/doc/sphinx/_build/html/_sources/_layout/nepi.resources.planetlab.ns3.txt new file mode 100644 index 00000000..a8759d48 --- /dev/null +++ b/doc/sphinx/_build/html/_sources/_layout/nepi.resources.planetlab.ns3.txt @@ -0,0 +1,30 @@ +nepi.resources.planetlab.ns3 package +==================================== + +Submodules +---------- + +nepi.resources.planetlab.ns3.fdudptunnel module +----------------------------------------------- + +.. automodule:: nepi.resources.planetlab.ns3.fdudptunnel + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.planetlab.ns3.tuntapfdlink module +------------------------------------------------ + +.. automodule:: nepi.resources.planetlab.ns3.tuntapfdlink + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: nepi.resources.planetlab.ns3 + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/_build/html/_sources/_layout/nepi.resources.planetlab.openvswitch.txt b/doc/sphinx/_build/html/_sources/_layout/nepi.resources.planetlab.openvswitch.txt new file mode 100644 index 00000000..edbb21a2 --- /dev/null +++ b/doc/sphinx/_build/html/_sources/_layout/nepi.resources.planetlab.openvswitch.txt @@ -0,0 +1,30 @@ +nepi.resources.planetlab.openvswitch package +============================================ + +Submodules +---------- + +nepi.resources.planetlab.openvswitch.ovs module +----------------------------------------------- + +.. automodule:: nepi.resources.planetlab.openvswitch.ovs + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.planetlab.openvswitch.ovsport module +--------------------------------------------------- + +.. automodule:: nepi.resources.planetlab.openvswitch.ovsport + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: nepi.resources.planetlab.openvswitch + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/_build/html/_sources/_layout/nepi.resources.planetlab.txt b/doc/sphinx/_build/html/_sources/_layout/nepi.resources.planetlab.txt new file mode 100644 index 00000000..9fde12c9 --- /dev/null +++ b/doc/sphinx/_build/html/_sources/_layout/nepi.resources.planetlab.txt @@ -0,0 +1,70 @@ +nepi.resources.planetlab package +================================ + +Subpackages +----------- + +.. toctree:: + + nepi.resources.planetlab.ns3 + nepi.resources.planetlab.openvswitch + +Submodules +---------- + +nepi.resources.planetlab.node module +------------------------------------ + +.. automodule:: nepi.resources.planetlab.node + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.planetlab.plcapi module +-------------------------------------- + +.. automodule:: nepi.resources.planetlab.plcapi + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.planetlab.sfa_node module +---------------------------------------- + +.. automodule:: nepi.resources.planetlab.sfa_node + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.planetlab.tap module +----------------------------------- + +.. automodule:: nepi.resources.planetlab.tap + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.planetlab.tun module +----------------------------------- + +.. automodule:: nepi.resources.planetlab.tun + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.planetlab.vroute module +-------------------------------------- + +.. automodule:: nepi.resources.planetlab.vroute + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: nepi.resources.planetlab + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/_build/html/_sources/_layout/nepi.resources.txt b/doc/sphinx/_build/html/_sources/_layout/nepi.resources.txt new file mode 100644 index 00000000..4c1fcfc2 --- /dev/null +++ b/doc/sphinx/_build/html/_sources/_layout/nepi.resources.txt @@ -0,0 +1,22 @@ +nepi.resources package +====================== + +Subpackages +----------- + +.. toctree:: + + nepi.resources.all + nepi.resources.linux + nepi.resources.netns + nepi.resources.ns3 + nepi.resources.omf + nepi.resources.planetlab + +Module contents +--------------- + +.. automodule:: nepi.resources + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/_build/html/_sources/_layout/nepi.txt b/doc/sphinx/_build/html/_sources/_layout/nepi.txt new file mode 100644 index 00000000..aa1d5d30 --- /dev/null +++ b/doc/sphinx/_build/html/_sources/_layout/nepi.txt @@ -0,0 +1,20 @@ +nepi package +============ + +Subpackages +----------- + +.. toctree:: + + nepi.data + nepi.execution + nepi.resources + nepi.util + +Module contents +--------------- + +.. automodule:: nepi + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/_build/html/_sources/_layout/nepi.util.parsers.txt b/doc/sphinx/_build/html/_sources/_layout/nepi.util.parsers.txt new file mode 100644 index 00000000..34888c17 --- /dev/null +++ b/doc/sphinx/_build/html/_sources/_layout/nepi.util.parsers.txt @@ -0,0 +1,22 @@ +nepi.util.parsers package +========================= + +Submodules +---------- + +nepi.util.parsers.xml_parser module +----------------------------------- + +.. automodule:: nepi.util.parsers.xml_parser + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: nepi.util.parsers + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/_build/html/_sources/_layout/nepi.util.txt b/doc/sphinx/_build/html/_sources/_layout/nepi.util.txt new file mode 100644 index 00000000..cf0bc639 --- /dev/null +++ b/doc/sphinx/_build/html/_sources/_layout/nepi.util.txt @@ -0,0 +1,141 @@ +nepi.util package +================= + +Subpackages +----------- + +.. toctree:: + + nepi.util.parsers + +Submodules +---------- + +nepi.util.environ module +------------------------ + +.. automodule:: nepi.util.environ + :members: + :undoc-members: + :show-inheritance: + +nepi.util.execfuncs module +-------------------------- + +.. automodule:: nepi.util.execfuncs + :members: + :undoc-members: + :show-inheritance: + +nepi.util.guid module +--------------------- + +.. automodule:: nepi.util.guid + :members: + :undoc-members: + :show-inheritance: + +nepi.util.logger module +----------------------- + +.. automodule:: nepi.util.logger + :members: + :undoc-members: + :show-inheritance: + +nepi.util.manifoldapi module +---------------------------- + +.. automodule:: nepi.util.manifoldapi + :members: + :undoc-members: + :show-inheritance: + +nepi.util.netgraph module +------------------------- + +.. automodule:: nepi.util.netgraph + :members: + :undoc-members: + :show-inheritance: + +nepi.util.parallel module +------------------------- + +.. automodule:: nepi.util.parallel + :members: + :undoc-members: + :show-inheritance: + +nepi.util.plotter module +------------------------ + +.. automodule:: nepi.util.plotter + :members: + :undoc-members: + :show-inheritance: + +nepi.util.rmatcher module +------------------------- + +.. automodule:: nepi.util.rmatcher + :members: + :undoc-members: + :show-inheritance: + +nepi.util.serializer module +--------------------------- + +.. automodule:: nepi.util.serializer + :members: + :undoc-members: + :show-inheritance: + +nepi.util.sfaapi module +----------------------- + +.. automodule:: nepi.util.sfaapi + :members: + :undoc-members: + :show-inheritance: + +nepi.util.sfarspec_proc module +------------------------------ + +.. automodule:: nepi.util.sfarspec_proc + :members: + :undoc-members: + :show-inheritance: + +nepi.util.sshfuncs module +------------------------- + +.. automodule:: nepi.util.sshfuncs + :members: + :undoc-members: + :show-inheritance: + +nepi.util.statfuncs module +-------------------------- + +.. automodule:: nepi.util.statfuncs + :members: + :undoc-members: + :show-inheritance: + +nepi.util.timefuncs module +-------------------------- + +.. automodule:: nepi.util.timefuncs + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: nepi.util + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/_build/html/_sources/index.txt b/doc/sphinx/_build/html/_sources/index.txt new file mode 100644 index 00000000..6cc4c839 --- /dev/null +++ b/doc/sphinx/_build/html/_sources/index.txt @@ -0,0 +1,91 @@ +.. Nepi documentation master file, created by + sphinx-quickstart on Tue Mar 26 11:36:35 2013. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +NEPI modules +============ + +This page documents the NEPI source code. It presents the NEPI core modules, the Platform resource modules (i.e. drivers to manage platforms), and other miscellaneous classes. + +Core modules +------------ + + * ExperimentController API + + * :mod:`ExperimentController ` + + * ResourceManager API + + * :mod:`ResourceManager ` + + * Attribute module + + * :mod:`Attribute ` + + * Trace module + + * :mod:`Trace ` + + * Runner module + + * :mod:`ExperimentRunner ` + + * Scheduler module + + * :mod:`Scheduler ` + + + +Platform modules +---------------- + + * Live Experiments + + * Linux testbeds + + * :mod:`Linux ` + + * PlanetLab testbeds + + * :mod:`PlanetLab ` + + * OMF testbed + + * :mod:`OMF ` + + * Simulated Experiments + + * ns-3 simulator + + * :mod:`ns-3 ` + + * :mod:`ns-3 in Linux hosts ` + + * Emulated Experiments + + * DCE emulation extension + + * :mod:`DCE Application ` + + * :mod:`DCE Linux Application ` + + * NetNS emulator + + * :mod:`NetNS ` + +Miscellaneous modules +--------------------- + + * :mod:`Util ` + +.. toctree:: + + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` + diff --git a/doc/sphinx/_build/html/_static/ajax-loader.gif b/doc/sphinx/_build/html/_static/ajax-loader.gif new file mode 100644 index 00000000..61faf8ca Binary files /dev/null and b/doc/sphinx/_build/html/_static/ajax-loader.gif differ diff --git a/doc/sphinx/_build/html/_static/basic.css b/doc/sphinx/_build/html/_static/basic.css new file mode 100644 index 00000000..967e36ce --- /dev/null +++ b/doc/sphinx/_build/html/_static/basic.css @@ -0,0 +1,537 @@ +/* + * basic.css + * ~~~~~~~~~ + * + * Sphinx stylesheet -- basic theme. + * + * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + +/* -- main layout ----------------------------------------------------------- */ + +div.clearer { + clear: both; +} + +/* -- relbar ---------------------------------------------------------------- */ + +div.related { + width: 100%; + font-size: 90%; +} + +div.related h3 { + display: none; +} + +div.related ul { + margin: 0; + padding: 0 0 0 10px; + list-style: none; +} + +div.related li { + display: inline; +} + +div.related li.right { + float: right; + margin-right: 5px; +} + +/* -- sidebar --------------------------------------------------------------- */ + +div.sphinxsidebarwrapper { + padding: 10px 5px 0 10px; +} + +div.sphinxsidebar { + float: left; + width: 230px; + margin-left: -100%; + font-size: 90%; +} + +div.sphinxsidebar ul { + list-style: none; +} + +div.sphinxsidebar ul ul, +div.sphinxsidebar ul.want-points { + margin-left: 20px; + list-style: square; +} + +div.sphinxsidebar ul ul { + margin-top: 0; + margin-bottom: 0; +} + +div.sphinxsidebar form { + margin-top: 10px; +} + +div.sphinxsidebar input { + border: 1px solid #98dbcc; + font-family: sans-serif; + font-size: 1em; +} + +div.sphinxsidebar #searchbox input[type="text"] { + width: 170px; +} + +div.sphinxsidebar #searchbox input[type="submit"] { + width: 30px; +} + +img { + border: 0; + max-width: 100%; +} + +/* -- search page ----------------------------------------------------------- */ + +ul.search { + margin: 10px 0 0 20px; + padding: 0; +} + +ul.search li { + padding: 5px 0 5px 20px; + background-image: url(file.png); + background-repeat: no-repeat; + background-position: 0 7px; +} + +ul.search li a { + font-weight: bold; +} + +ul.search li div.context { + color: #888; + margin: 2px 0 0 30px; + text-align: left; +} + +ul.keywordmatches li.goodmatch a { + font-weight: bold; +} + +/* -- index page ------------------------------------------------------------ */ + +table.contentstable { + width: 90%; +} + +table.contentstable p.biglink { + line-height: 150%; +} + +a.biglink { + font-size: 1.3em; +} + +span.linkdescr { + font-style: italic; + padding-top: 5px; + font-size: 90%; +} + +/* -- general index --------------------------------------------------------- */ + +table.indextable { + width: 100%; +} + +table.indextable td { + text-align: left; + vertical-align: top; +} + +table.indextable dl, table.indextable dd { + margin-top: 0; + margin-bottom: 0; +} + +table.indextable tr.pcap { + height: 10px; +} + +table.indextable tr.cap { + margin-top: 10px; + background-color: #f2f2f2; +} + +img.toggler { + margin-right: 3px; + margin-top: 3px; + cursor: pointer; +} + +div.modindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +div.genindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +/* -- general body styles --------------------------------------------------- */ + +a.headerlink { + visibility: hidden; +} + +h1:hover > a.headerlink, +h2:hover > a.headerlink, +h3:hover > a.headerlink, +h4:hover > a.headerlink, +h5:hover > a.headerlink, +h6:hover > a.headerlink, +dt:hover > a.headerlink { + visibility: visible; +} + +div.body p.caption { + text-align: inherit; +} + +div.body td { + text-align: left; +} + +.field-list ul { + padding-left: 1em; +} + +.first { + margin-top: 0 !important; +} + +p.rubric { + margin-top: 30px; + font-weight: bold; +} + +img.align-left, .figure.align-left, object.align-left { + clear: left; + float: left; + margin-right: 1em; +} + +img.align-right, .figure.align-right, object.align-right { + clear: right; + float: right; + margin-left: 1em; +} + +img.align-center, .figure.align-center, object.align-center { + display: block; + margin-left: auto; + margin-right: auto; +} + +.align-left { + text-align: left; +} + +.align-center { + text-align: center; +} + +.align-right { + text-align: right; +} + +/* -- sidebars -------------------------------------------------------------- */ + +div.sidebar { + margin: 0 0 0.5em 1em; + border: 1px solid #ddb; + padding: 7px 7px 0 7px; + background-color: #ffe; + width: 40%; + float: right; +} + +p.sidebar-title { + font-weight: bold; +} + +/* -- topics ---------------------------------------------------------------- */ + +div.topic { + border: 1px solid #ccc; + padding: 7px 7px 0 7px; + margin: 10px 0 10px 0; +} + +p.topic-title { + font-size: 1.1em; + font-weight: bold; + margin-top: 10px; +} + +/* -- admonitions ----------------------------------------------------------- */ + +div.admonition { + margin-top: 10px; + margin-bottom: 10px; + padding: 7px; +} + +div.admonition dt { + font-weight: bold; +} + +div.admonition dl { + margin-bottom: 0; +} + +p.admonition-title { + margin: 0px 10px 5px 0px; + font-weight: bold; +} + +div.body p.centered { + text-align: center; + margin-top: 25px; +} + +/* -- tables ---------------------------------------------------------------- */ + +table.docutils { + border: 0; + border-collapse: collapse; +} + +table.docutils td, table.docutils th { + padding: 1px 8px 1px 5px; + border-top: 0; + border-left: 0; + border-right: 0; + border-bottom: 1px solid #aaa; +} + +table.field-list td, table.field-list th { + border: 0 !important; +} + +table.footnote td, table.footnote th { + border: 0 !important; +} + +th { + text-align: left; + padding-right: 5px; +} + +table.citation { + border-left: solid 1px gray; + margin-left: 1px; +} + +table.citation td { + border-bottom: none; +} + +/* -- other body styles ----------------------------------------------------- */ + +ol.arabic { + list-style: decimal; +} + +ol.loweralpha { + list-style: lower-alpha; +} + +ol.upperalpha { + list-style: upper-alpha; +} + +ol.lowerroman { + list-style: lower-roman; +} + +ol.upperroman { + list-style: upper-roman; +} + +dl { + margin-bottom: 15px; +} + +dd p { + margin-top: 0px; +} + +dd ul, dd table { + margin-bottom: 10px; +} + +dd { + margin-top: 3px; + margin-bottom: 10px; + margin-left: 30px; +} + +dt:target, .highlighted { + background-color: #fbe54e; +} + +dl.glossary dt { + font-weight: bold; + font-size: 1.1em; +} + +.field-list ul { + margin: 0; + padding-left: 1em; +} + +.field-list p { + margin: 0; +} + +.optional { + font-size: 1.3em; +} + +.versionmodified { + font-style: italic; +} + +.system-message { + background-color: #fda; + padding: 5px; + border: 3px solid red; +} + +.footnote:target { + background-color: #ffa; +} + +.line-block { + display: block; + margin-top: 1em; + margin-bottom: 1em; +} + +.line-block .line-block { + margin-top: 0; + margin-bottom: 0; + margin-left: 1.5em; +} + +.guilabel, .menuselection { + font-family: sans-serif; +} + +.accelerator { + text-decoration: underline; +} + +.classifier { + font-style: oblique; +} + +abbr, acronym { + border-bottom: dotted 1px; + cursor: help; +} + +/* -- code displays --------------------------------------------------------- */ + +pre { + overflow: auto; + overflow-y: hidden; /* fixes display issues on Chrome browsers */ +} + +td.linenos pre { + padding: 5px 0px; + border: 0; + background-color: transparent; + color: #aaa; +} + +table.highlighttable { + margin-left: 0.5em; +} + +table.highlighttable td { + padding: 0 0.5em 0 0.5em; +} + +tt.descname { + background-color: transparent; + font-weight: bold; + font-size: 1.2em; +} + +tt.descclassname { + background-color: transparent; +} + +tt.xref, a tt { + background-color: transparent; + font-weight: bold; +} + +h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt { + background-color: transparent; +} + +.viewcode-link { + float: right; +} + +.viewcode-back { + float: right; + font-family: sans-serif; +} + +div.viewcode-block:target { + margin: -1px -10px; + padding: 0 10px; +} + +/* -- math display ---------------------------------------------------------- */ + +img.math { + vertical-align: middle; +} + +div.body div.math p { + text-align: center; +} + +span.eqno { + float: right; +} + +/* -- printout stylesheet --------------------------------------------------- */ + +@media print { + div.document, + div.documentwrapper, + div.bodywrapper { + margin: 0 !important; + width: 100%; + } + + div.sphinxsidebar, + div.related, + div.footer, + #top-link { + display: none; + } +} \ No newline at end of file diff --git a/doc/sphinx/_build/html/_static/comment-bright.png b/doc/sphinx/_build/html/_static/comment-bright.png new file mode 100644 index 00000000..551517b8 Binary files /dev/null and b/doc/sphinx/_build/html/_static/comment-bright.png differ diff --git a/doc/sphinx/_build/html/_static/comment-close.png b/doc/sphinx/_build/html/_static/comment-close.png new file mode 100644 index 00000000..09b54be4 Binary files /dev/null and b/doc/sphinx/_build/html/_static/comment-close.png differ diff --git a/doc/sphinx/_build/html/_static/comment.png b/doc/sphinx/_build/html/_static/comment.png new file mode 100644 index 00000000..92feb52b Binary files /dev/null and b/doc/sphinx/_build/html/_static/comment.png differ diff --git a/doc/sphinx/_build/html/_static/contents.png b/doc/sphinx/_build/html/_static/contents.png new file mode 100644 index 00000000..7fb82154 Binary files /dev/null and b/doc/sphinx/_build/html/_static/contents.png differ diff --git a/doc/sphinx/_build/html/_static/doctools.js b/doc/sphinx/_build/html/_static/doctools.js new file mode 100644 index 00000000..c5455c90 --- /dev/null +++ b/doc/sphinx/_build/html/_static/doctools.js @@ -0,0 +1,238 @@ +/* + * doctools.js + * ~~~~~~~~~~~ + * + * Sphinx JavaScript utilities for all documentation. + * + * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + +/** + * select a different prefix for underscore + */ +$u = _.noConflict(); + +/** + * make the code below compatible with browsers without + * an installed firebug like debugger +if (!window.console || !console.firebug) { + var names = ["log", "debug", "info", "warn", "error", "assert", "dir", + "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", + "profile", "profileEnd"]; + window.console = {}; + for (var i = 0; i < names.length; ++i) + window.console[names[i]] = function() {}; +} + */ + +/** + * small helper function to urldecode strings + */ +jQuery.urldecode = function(x) { + return decodeURIComponent(x).replace(/\+/g, ' '); +}; + +/** + * small helper function to urlencode strings + */ +jQuery.urlencode = encodeURIComponent; + +/** + * This function returns the parsed url parameters of the + * current request. Multiple values per key are supported, + * it will always return arrays of strings for the value parts. + */ +jQuery.getQueryParameters = function(s) { + if (typeof s == 'undefined') + s = document.location.search; + var parts = s.substr(s.indexOf('?') + 1).split('&'); + var result = {}; + for (var i = 0; i < parts.length; i++) { + var tmp = parts[i].split('=', 2); + var key = jQuery.urldecode(tmp[0]); + var value = jQuery.urldecode(tmp[1]); + if (key in result) + result[key].push(value); + else + result[key] = [value]; + } + return result; +}; + +/** + * highlight a given string on a jquery object by wrapping it in + * span elements with the given class name. + */ +jQuery.fn.highlightText = function(text, className) { + function highlight(node) { + if (node.nodeType == 3) { + var val = node.nodeValue; + var pos = val.toLowerCase().indexOf(text); + if (pos >= 0 && !jQuery(node.parentNode).hasClass(className)) { + var span = document.createElement("span"); + span.className = className; + span.appendChild(document.createTextNode(val.substr(pos, text.length))); + node.parentNode.insertBefore(span, node.parentNode.insertBefore( + document.createTextNode(val.substr(pos + text.length)), + node.nextSibling)); + node.nodeValue = val.substr(0, pos); + } + } + else if (!jQuery(node).is("button, select, textarea")) { + jQuery.each(node.childNodes, function() { + highlight(this); + }); + } + } + return this.each(function() { + highlight(this); + }); +}; + +/** + * Small JavaScript module for the documentation. + */ +var Documentation = { + + init : function() { + this.fixFirefoxAnchorBug(); + this.highlightSearchWords(); + this.initIndexTable(); + }, + + /** + * i18n support + */ + TRANSLATIONS : {}, + PLURAL_EXPR : function(n) { return n == 1 ? 0 : 1; }, + LOCALE : 'unknown', + + // gettext and ngettext don't access this so that the functions + // can safely bound to a different name (_ = Documentation.gettext) + gettext : function(string) { + var translated = Documentation.TRANSLATIONS[string]; + if (typeof translated == 'undefined') + return string; + return (typeof translated == 'string') ? translated : translated[0]; + }, + + ngettext : function(singular, plural, n) { + var translated = Documentation.TRANSLATIONS[singular]; + if (typeof translated == 'undefined') + return (n == 1) ? singular : plural; + return translated[Documentation.PLURALEXPR(n)]; + }, + + addTranslations : function(catalog) { + for (var key in catalog.messages) + this.TRANSLATIONS[key] = catalog.messages[key]; + this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')'); + this.LOCALE = catalog.locale; + }, + + /** + * add context elements like header anchor links + */ + addContextElements : function() { + $('div[id] > :header:first').each(function() { + $('\u00B6'). + attr('href', '#' + this.id). + attr('title', _('Permalink to this headline')). + appendTo(this); + }); + $('dt[id]').each(function() { + $('\u00B6'). + attr('href', '#' + this.id). + attr('title', _('Permalink to this definition')). + appendTo(this); + }); + }, + + /** + * workaround a firefox stupidity + */ + fixFirefoxAnchorBug : function() { + if (document.location.hash && $.browser.mozilla) + window.setTimeout(function() { + document.location.href += ''; + }, 10); + }, + + /** + * highlight the search words provided in the url in the text + */ + highlightSearchWords : function() { + var params = $.getQueryParameters(); + var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : []; + if (terms.length) { + var body = $('div.body'); + if (!body.length) { + body = $('body'); + } + window.setTimeout(function() { + $.each(terms, function() { + body.highlightText(this.toLowerCase(), 'highlighted'); + }); + }, 10); + $('') + .appendTo($('#searchbox')); + } + }, + + /** + * init the domain index toggle buttons + */ + initIndexTable : function() { + var togglers = $('img.toggler').click(function() { + var src = $(this).attr('src'); + var idnum = $(this).attr('id').substr(7); + $('tr.cg-' + idnum).toggle(); + if (src.substr(-9) == 'minus.png') + $(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); + else + $(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); + }).css('display', ''); + if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) { + togglers.click(); + } + }, + + /** + * helper function to hide the search marks again + */ + hideSearchWords : function() { + $('#searchbox .highlight-link').fadeOut(300); + $('span.highlighted').removeClass('highlighted'); + }, + + /** + * make the url absolute + */ + makeURL : function(relativeURL) { + return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; + }, + + /** + * get the current relative url + */ + getCurrentURL : function() { + var path = document.location.pathname; + var parts = path.split(/\//); + $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { + if (this == '..') + parts.pop(); + }); + var url = parts.join('/'); + return path.substring(url.lastIndexOf('/') + 1, path.length - 1); + } +}; + +// quick alias for translations +_ = Documentation.gettext; + +$(document).ready(function() { + Documentation.init(); +}); diff --git a/doc/sphinx/_build/html/_static/down-pressed.png b/doc/sphinx/_build/html/_static/down-pressed.png new file mode 100644 index 00000000..6f7ad782 Binary files /dev/null and b/doc/sphinx/_build/html/_static/down-pressed.png differ diff --git a/doc/sphinx/_build/html/_static/down.png b/doc/sphinx/_build/html/_static/down.png new file mode 100644 index 00000000..3003a887 Binary files /dev/null and b/doc/sphinx/_build/html/_static/down.png differ diff --git a/doc/sphinx/_build/html/_static/file.png b/doc/sphinx/_build/html/_static/file.png new file mode 100644 index 00000000..d18082e3 Binary files /dev/null and b/doc/sphinx/_build/html/_static/file.png differ diff --git a/doc/sphinx/_build/html/_static/jquery.js b/doc/sphinx/_build/html/_static/jquery.js new file mode 100644 index 00000000..12581195 --- /dev/null +++ b/doc/sphinx/_build/html/_static/jquery.js @@ -0,0 +1,9404 @@ +/*! + * jQuery JavaScript Library v1.7.2 + * http://jquery.com/ + * + * Copyright 2011, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Thu Aug 1 23:20:30 BRT 2013 + */ +(function( window, undefined ) { + +// Use the correct document accordingly with window argument (sandbox) +var document = window.document, + navigator = window.navigator, + location = window.location; +var jQuery = (function() { + +// Define a local copy of jQuery +var jQuery = function( selector, context ) { + // The jQuery object is actually just the init constructor 'enhanced' + return new jQuery.fn.init( selector, context, rootjQuery ); + }, + + // Map over jQuery in case of overwrite + _jQuery = window.jQuery, + + // Map over the $ in case of overwrite + _$ = window.$, + + // A central reference to the root jQuery(document) + rootjQuery, + + // A simple way to check for HTML strings or ID strings + // Prioritize #id over to avoid XSS via location.hash (#9521) + quickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/, + + // Check if a string has a non-whitespace character in it + rnotwhite = /\S/, + + // Used for trimming whitespace + trimLeft = /^\s+/, + trimRight = /\s+$/, + + // Match a standalone tag + rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/, + + // JSON RegExp + rvalidchars = /^[\],:{}\s]*$/, + rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, + rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, + rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, + + // Useragent RegExp + rwebkit = /(webkit)[ \/]([\w.]+)/, + ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/, + rmsie = /(msie) ([\w.]+)/, + rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/, + + // Matches dashed string for camelizing + rdashAlpha = /-([a-z]|[0-9])/ig, + rmsPrefix = /^-ms-/, + + // Used by jQuery.camelCase as callback to replace() + fcamelCase = function( all, letter ) { + return ( letter + "" ).toUpperCase(); + }, + + // Keep a UserAgent string for use with jQuery.browser + userAgent = navigator.userAgent, + + // For matching the engine and version of the browser + browserMatch, + + // The deferred used on DOM ready + readyList, + + // The ready event handler + DOMContentLoaded, + + // Save a reference to some core methods + toString = Object.prototype.toString, + hasOwn = Object.prototype.hasOwnProperty, + push = Array.prototype.push, + slice = Array.prototype.slice, + trim = String.prototype.trim, + indexOf = Array.prototype.indexOf, + + // [[Class]] -> type pairs + class2type = {}; + +jQuery.fn = jQuery.prototype = { + constructor: jQuery, + init: function( selector, context, rootjQuery ) { + var match, elem, ret, doc; + + // Handle $(""), $(null), or $(undefined) + if ( !selector ) { + return this; + } + + // Handle $(DOMElement) + if ( selector.nodeType ) { + this.context = this[0] = selector; + this.length = 1; + return this; + } + + // The body element only exists once, optimize finding it + if ( selector === "body" && !context && document.body ) { + this.context = document; + this[0] = document.body; + this.selector = selector; + this.length = 1; + return this; + } + + // Handle HTML strings + if ( typeof selector === "string" ) { + // Are we dealing with HTML string or an ID? + if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { + // Assume that strings that start and end with <> are HTML and skip the regex check + match = [ null, selector, null ]; + + } else { + match = quickExpr.exec( selector ); + } + + // Verify a match, and that no context was specified for #id + if ( match && (match[1] || !context) ) { + + // HANDLE: $(html) -> $(array) + if ( match[1] ) { + context = context instanceof jQuery ? context[0] : context; + doc = ( context ? context.ownerDocument || context : document ); + + // If a single string is passed in and it's a single tag + // just do a createElement and skip the rest + ret = rsingleTag.exec( selector ); + + if ( ret ) { + if ( jQuery.isPlainObject( context ) ) { + selector = [ document.createElement( ret[1] ) ]; + jQuery.fn.attr.call( selector, context, true ); + + } else { + selector = [ doc.createElement( ret[1] ) ]; + } + + } else { + ret = jQuery.buildFragment( [ match[1] ], [ doc ] ); + selector = ( ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment ).childNodes; + } + + return jQuery.merge( this, selector ); + + // HANDLE: $("#id") + } else { + elem = document.getElementById( match[2] ); + + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Handle the case where IE and Opera return items + // by name instead of ID + if ( elem.id !== match[2] ) { + return rootjQuery.find( selector ); + } + + // Otherwise, we inject the element directly into the jQuery object + this.length = 1; + this[0] = elem; + } + + this.context = document; + this.selector = selector; + return this; + } + + // HANDLE: $(expr, $(...)) + } else if ( !context || context.jquery ) { + return ( context || rootjQuery ).find( selector ); + + // HANDLE: $(expr, context) + // (which is just equivalent to: $(context).find(expr) + } else { + return this.constructor( context ).find( selector ); + } + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( jQuery.isFunction( selector ) ) { + return rootjQuery.ready( selector ); + } + + if ( selector.selector !== undefined ) { + this.selector = selector.selector; + this.context = selector.context; + } + + return jQuery.makeArray( selector, this ); + }, + + // Start with an empty selector + selector: "", + + // The current version of jQuery being used + jquery: "1.7.2", + + // The default length of a jQuery object is 0 + length: 0, + + // The number of elements contained in the matched element set + size: function() { + return this.length; + }, + + toArray: function() { + return slice.call( this, 0 ); + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + return num == null ? + + // Return a 'clean' array + this.toArray() : + + // Return just the object + ( num < 0 ? this[ this.length + num ] : this[ num ] ); + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems, name, selector ) { + // Build a new jQuery matched element set + var ret = this.constructor(); + + if ( jQuery.isArray( elems ) ) { + push.apply( ret, elems ); + + } else { + jQuery.merge( ret, elems ); + } + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + + ret.context = this.context; + + if ( name === "find" ) { + ret.selector = this.selector + ( this.selector ? " " : "" ) + selector; + } else if ( name ) { + ret.selector = this.selector + "." + name + "(" + selector + ")"; + } + + // Return the newly-formed element set + return ret; + }, + + // Execute a callback for every element in the matched set. + // (You can seed the arguments with an array of args, but this is + // only used internally.) + each: function( callback, args ) { + return jQuery.each( this, callback, args ); + }, + + ready: function( fn ) { + // Attach the listeners + jQuery.bindReady(); + + // Add the callback + readyList.add( fn ); + + return this; + }, + + eq: function( i ) { + i = +i; + return i === -1 ? + this.slice( i ) : + this.slice( i, i + 1 ); + }, + + first: function() { + return this.eq( 0 ); + }, + + last: function() { + return this.eq( -1 ); + }, + + slice: function() { + return this.pushStack( slice.apply( this, arguments ), + "slice", slice.call(arguments).join(",") ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map(this, function( elem, i ) { + return callback.call( elem, i, elem ); + })); + }, + + end: function() { + return this.prevObject || this.constructor(null); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: push, + sort: [].sort, + splice: [].splice +}; + +// Give the init function the jQuery prototype for later instantiation +jQuery.fn.init.prototype = jQuery.fn; + +jQuery.extend = jQuery.fn.extend = function() { + var options, name, src, copy, copyIsArray, clone, + target = arguments[0] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + target = arguments[1] || {}; + // skip the boolean and the target + i = 2; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !jQuery.isFunction(target) ) { + target = {}; + } + + // extend jQuery itself if only one argument is passed + if ( length === i ) { + target = this; + --i; + } + + for ( ; i < length; i++ ) { + // Only deal with non-null/undefined values + if ( (options = arguments[ i ]) != null ) { + // Extend the base object + for ( name in options ) { + src = target[ name ]; + copy = options[ name ]; + + // Prevent never-ending loop + if ( target === copy ) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { + if ( copyIsArray ) { + copyIsArray = false; + clone = src && jQuery.isArray(src) ? src : []; + + } else { + clone = src && jQuery.isPlainObject(src) ? src : {}; + } + + // Never move original objects, clone them + target[ name ] = jQuery.extend( deep, clone, copy ); + + // Don't bring in undefined values + } else if ( copy !== undefined ) { + target[ name ] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +jQuery.extend({ + noConflict: function( deep ) { + if ( window.$ === jQuery ) { + window.$ = _$; + } + + if ( deep && window.jQuery === jQuery ) { + window.jQuery = _jQuery; + } + + return jQuery; + }, + + // Is the DOM ready to be used? Set to true once it occurs. + isReady: false, + + // A counter to track how many items to wait for before + // the ready event fires. See #6781 + readyWait: 1, + + // Hold (or release) the ready event + holdReady: function( hold ) { + if ( hold ) { + jQuery.readyWait++; + } else { + jQuery.ready( true ); + } + }, + + // Handle when the DOM is ready + ready: function( wait ) { + // Either a released hold or an DOMready/load event and not yet ready + if ( (wait === true && !--jQuery.readyWait) || (wait !== true && !jQuery.isReady) ) { + // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). + if ( !document.body ) { + return setTimeout( jQuery.ready, 1 ); + } + + // Remember that the DOM is ready + jQuery.isReady = true; + + // If a normal DOM Ready event fired, decrement, and wait if need be + if ( wait !== true && --jQuery.readyWait > 0 ) { + return; + } + + // If there are functions bound, to execute + readyList.fireWith( document, [ jQuery ] ); + + // Trigger any bound ready events + if ( jQuery.fn.trigger ) { + jQuery( document ).trigger( "ready" ).off( "ready" ); + } + } + }, + + bindReady: function() { + if ( readyList ) { + return; + } + + readyList = jQuery.Callbacks( "once memory" ); + + // Catch cases where $(document).ready() is called after the + // browser event has already occurred. + if ( document.readyState === "complete" ) { + // Handle it asynchronously to allow scripts the opportunity to delay ready + return setTimeout( jQuery.ready, 1 ); + } + + // Mozilla, Opera and webkit nightlies currently support this event + if ( document.addEventListener ) { + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false ); + + // A fallback to window.onload, that will always work + window.addEventListener( "load", jQuery.ready, false ); + + // If IE event model is used + } else if ( document.attachEvent ) { + // ensure firing before onload, + // maybe late but safe also for iframes + document.attachEvent( "onreadystatechange", DOMContentLoaded ); + + // A fallback to window.onload, that will always work + window.attachEvent( "onload", jQuery.ready ); + + // If IE and not a frame + // continually check to see if the document is ready + var toplevel = false; + + try { + toplevel = window.frameElement == null; + } catch(e) {} + + if ( document.documentElement.doScroll && toplevel ) { + doScrollCheck(); + } + } + }, + + // See test/unit/core.js for details concerning isFunction. + // Since version 1.3, DOM methods and functions like alert + // aren't supported. They return false on IE (#2968). + isFunction: function( obj ) { + return jQuery.type(obj) === "function"; + }, + + isArray: Array.isArray || function( obj ) { + return jQuery.type(obj) === "array"; + }, + + isWindow: function( obj ) { + return obj != null && obj == obj.window; + }, + + isNumeric: function( obj ) { + return !isNaN( parseFloat(obj) ) && isFinite( obj ); + }, + + type: function( obj ) { + return obj == null ? + String( obj ) : + class2type[ toString.call(obj) ] || "object"; + }, + + isPlainObject: function( obj ) { + // Must be an Object. + // Because of IE, we also have to check the presence of the constructor property. + // Make sure that DOM nodes and window objects don't pass through, as well + if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { + return false; + } + + try { + // Not own constructor property must be Object + if ( obj.constructor && + !hasOwn.call(obj, "constructor") && + !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { + return false; + } + } catch ( e ) { + // IE8,9 Will throw exceptions on certain host objects #9897 + return false; + } + + // Own properties are enumerated firstly, so to speed up, + // if last one is own, then all properties are own. + + var key; + for ( key in obj ) {} + + return key === undefined || hasOwn.call( obj, key ); + }, + + isEmptyObject: function( obj ) { + for ( var name in obj ) { + return false; + } + return true; + }, + + error: function( msg ) { + throw new Error( msg ); + }, + + parseJSON: function( data ) { + if ( typeof data !== "string" || !data ) { + return null; + } + + // Make sure leading/trailing whitespace is removed (IE can't handle it) + data = jQuery.trim( data ); + + // Attempt to parse using the native JSON parser first + if ( window.JSON && window.JSON.parse ) { + return window.JSON.parse( data ); + } + + // Make sure the incoming data is actual JSON + // Logic borrowed from http://json.org/json2.js + if ( rvalidchars.test( data.replace( rvalidescape, "@" ) + .replace( rvalidtokens, "]" ) + .replace( rvalidbraces, "")) ) { + + return ( new Function( "return " + data ) )(); + + } + jQuery.error( "Invalid JSON: " + data ); + }, + + // Cross-browser xml parsing + parseXML: function( data ) { + if ( typeof data !== "string" || !data ) { + return null; + } + var xml, tmp; + try { + if ( window.DOMParser ) { // Standard + tmp = new DOMParser(); + xml = tmp.parseFromString( data , "text/xml" ); + } else { // IE + xml = new ActiveXObject( "Microsoft.XMLDOM" ); + xml.async = "false"; + xml.loadXML( data ); + } + } catch( e ) { + xml = undefined; + } + if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { + jQuery.error( "Invalid XML: " + data ); + } + return xml; + }, + + noop: function() {}, + + // Evaluates a script in a global context + // Workarounds based on findings by Jim Driscoll + // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context + globalEval: function( data ) { + if ( data && rnotwhite.test( data ) ) { + // We use execScript on Internet Explorer + // We use an anonymous function so that context is window + // rather than jQuery in Firefox + ( window.execScript || function( data ) { + window[ "eval" ].call( window, data ); + } )( data ); + } + }, + + // Convert dashed to camelCase; used by the css and data modules + // Microsoft forgot to hump their vendor prefix (#9572) + camelCase: function( string ) { + return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); + }, + + nodeName: function( elem, name ) { + return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase(); + }, + + // args is for internal usage only + each: function( object, callback, args ) { + var name, i = 0, + length = object.length, + isObj = length === undefined || jQuery.isFunction( object ); + + if ( args ) { + if ( isObj ) { + for ( name in object ) { + if ( callback.apply( object[ name ], args ) === false ) { + break; + } + } + } else { + for ( ; i < length; ) { + if ( callback.apply( object[ i++ ], args ) === false ) { + break; + } + } + } + + // A special, fast, case for the most common use of each + } else { + if ( isObj ) { + for ( name in object ) { + if ( callback.call( object[ name ], name, object[ name ] ) === false ) { + break; + } + } + } else { + for ( ; i < length; ) { + if ( callback.call( object[ i ], i, object[ i++ ] ) === false ) { + break; + } + } + } + } + + return object; + }, + + // Use native String.trim function wherever possible + trim: trim ? + function( text ) { + return text == null ? + "" : + trim.call( text ); + } : + + // Otherwise use our own trimming functionality + function( text ) { + return text == null ? + "" : + text.toString().replace( trimLeft, "" ).replace( trimRight, "" ); + }, + + // results is for internal usage only + makeArray: function( array, results ) { + var ret = results || []; + + if ( array != null ) { + // The window, strings (and functions) also have 'length' + // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930 + var type = jQuery.type( array ); + + if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) { + push.call( ret, array ); + } else { + jQuery.merge( ret, array ); + } + } + + return ret; + }, + + inArray: function( elem, array, i ) { + var len; + + if ( array ) { + if ( indexOf ) { + return indexOf.call( array, elem, i ); + } + + len = array.length; + i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; + + for ( ; i < len; i++ ) { + // Skip accessing in sparse arrays + if ( i in array && array[ i ] === elem ) { + return i; + } + } + } + + return -1; + }, + + merge: function( first, second ) { + var i = first.length, + j = 0; + + if ( typeof second.length === "number" ) { + for ( var l = second.length; j < l; j++ ) { + first[ i++ ] = second[ j ]; + } + + } else { + while ( second[j] !== undefined ) { + first[ i++ ] = second[ j++ ]; + } + } + + first.length = i; + + return first; + }, + + grep: function( elems, callback, inv ) { + var ret = [], retVal; + inv = !!inv; + + // Go through the array, only saving the items + // that pass the validator function + for ( var i = 0, length = elems.length; i < length; i++ ) { + retVal = !!callback( elems[ i ], i ); + if ( inv !== retVal ) { + ret.push( elems[ i ] ); + } + } + + return ret; + }, + + // arg is for internal usage only + map: function( elems, callback, arg ) { + var value, key, ret = [], + i = 0, + length = elems.length, + // jquery objects are treated as arrays + isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ; + + // Go through the array, translating each of the items to their + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret[ ret.length ] = value; + } + } + + // Go through every key on the object, + } else { + for ( key in elems ) { + value = callback( elems[ key ], key, arg ); + + if ( value != null ) { + ret[ ret.length ] = value; + } + } + } + + // Flatten any nested arrays + return ret.concat.apply( [], ret ); + }, + + // A global GUID counter for objects + guid: 1, + + // Bind a function to a context, optionally partially applying any + // arguments. + proxy: function( fn, context ) { + if ( typeof context === "string" ) { + var tmp = fn[ context ]; + context = fn; + fn = tmp; + } + + // Quick check to determine if target is callable, in the spec + // this throws a TypeError, but we will just return undefined. + if ( !jQuery.isFunction( fn ) ) { + return undefined; + } + + // Simulated bind + var args = slice.call( arguments, 2 ), + proxy = function() { + return fn.apply( context, args.concat( slice.call( arguments ) ) ); + }; + + // Set the guid of unique handler to the same of original handler, so it can be removed + proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++; + + return proxy; + }, + + // Mutifunctional method to get and set values to a collection + // The value/s can optionally be executed if it's a function + access: function( elems, fn, key, value, chainable, emptyGet, pass ) { + var exec, + bulk = key == null, + i = 0, + length = elems.length; + + // Sets many values + if ( key && typeof key === "object" ) { + for ( i in key ) { + jQuery.access( elems, fn, i, key[i], 1, emptyGet, value ); + } + chainable = 1; + + // Sets one value + } else if ( value !== undefined ) { + // Optionally, function values get executed if exec is true + exec = pass === undefined && jQuery.isFunction( value ); + + if ( bulk ) { + // Bulk operations only iterate when executing function values + if ( exec ) { + exec = fn; + fn = function( elem, key, value ) { + return exec.call( jQuery( elem ), value ); + }; + + // Otherwise they run against the entire set + } else { + fn.call( elems, value ); + fn = null; + } + } + + if ( fn ) { + for (; i < length; i++ ) { + fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass ); + } + } + + chainable = 1; + } + + return chainable ? + elems : + + // Gets + bulk ? + fn.call( elems ) : + length ? fn( elems[0], key ) : emptyGet; + }, + + now: function() { + return ( new Date() ).getTime(); + }, + + // Use of jQuery.browser is frowned upon. + // More details: http://docs.jquery.com/Utilities/jQuery.browser + uaMatch: function( ua ) { + ua = ua.toLowerCase(); + + var match = rwebkit.exec( ua ) || + ropera.exec( ua ) || + rmsie.exec( ua ) || + ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) || + []; + + return { browser: match[1] || "", version: match[2] || "0" }; + }, + + sub: function() { + function jQuerySub( selector, context ) { + return new jQuerySub.fn.init( selector, context ); + } + jQuery.extend( true, jQuerySub, this ); + jQuerySub.superclass = this; + jQuerySub.fn = jQuerySub.prototype = this(); + jQuerySub.fn.constructor = jQuerySub; + jQuerySub.sub = this.sub; + jQuerySub.fn.init = function init( selector, context ) { + if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) { + context = jQuerySub( context ); + } + + return jQuery.fn.init.call( this, selector, context, rootjQuerySub ); + }; + jQuerySub.fn.init.prototype = jQuerySub.fn; + var rootjQuerySub = jQuerySub(document); + return jQuerySub; + }, + + browser: {} +}); + +// Populate the class2type map +jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); +}); + +browserMatch = jQuery.uaMatch( userAgent ); +if ( browserMatch.browser ) { + jQuery.browser[ browserMatch.browser ] = true; + jQuery.browser.version = browserMatch.version; +} + +// Deprecated, use jQuery.browser.webkit instead +if ( jQuery.browser.webkit ) { + jQuery.browser.safari = true; +} + +// IE doesn't match non-breaking spaces with \s +if ( rnotwhite.test( "\xA0" ) ) { + trimLeft = /^[\s\xA0]+/; + trimRight = /[\s\xA0]+$/; +} + +// All jQuery objects should point back to these +rootjQuery = jQuery(document); + +// Cleanup functions for the document ready method +if ( document.addEventListener ) { + DOMContentLoaded = function() { + document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false ); + jQuery.ready(); + }; + +} else if ( document.attachEvent ) { + DOMContentLoaded = function() { + // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). + if ( document.readyState === "complete" ) { + document.detachEvent( "onreadystatechange", DOMContentLoaded ); + jQuery.ready(); + } + }; +} + +// The DOM ready check for Internet Explorer +function doScrollCheck() { + if ( jQuery.isReady ) { + return; + } + + try { + // If IE is used, use the trick by Diego Perini + // http://javascript.nwbox.com/IEContentLoaded/ + document.documentElement.doScroll("left"); + } catch(e) { + setTimeout( doScrollCheck, 1 ); + return; + } + + // and execute any waiting functions + jQuery.ready(); +} + +return jQuery; + +})(); + + +// String to Object flags format cache +var flagsCache = {}; + +// Convert String-formatted flags into Object-formatted ones and store in cache +function createFlags( flags ) { + var object = flagsCache[ flags ] = {}, + i, length; + flags = flags.split( /\s+/ ); + for ( i = 0, length = flags.length; i < length; i++ ) { + object[ flags[i] ] = true; + } + return object; +} + +/* + * Create a callback list using the following parameters: + * + * flags: an optional list of space-separated flags that will change how + * the callback list behaves + * + * By default a callback list will act like an event callback list and can be + * "fired" multiple times. + * + * Possible flags: + * + * once: will ensure the callback list can only be fired once (like a Deferred) + * + * memory: will keep track of previous values and will call any callback added + * after the list has been fired right away with the latest "memorized" + * values (like a Deferred) + * + * unique: will ensure a callback can only be added once (no duplicate in the list) + * + * stopOnFalse: interrupt callings when a callback returns false + * + */ +jQuery.Callbacks = function( flags ) { + + // Convert flags from String-formatted to Object-formatted + // (we check in cache first) + flags = flags ? ( flagsCache[ flags ] || createFlags( flags ) ) : {}; + + var // Actual callback list + list = [], + // Stack of fire calls for repeatable lists + stack = [], + // Last fire value (for non-forgettable lists) + memory, + // Flag to know if list was already fired + fired, + // Flag to know if list is currently firing + firing, + // First callback to fire (used internally by add and fireWith) + firingStart, + // End of the loop when firing + firingLength, + // Index of currently firing callback (modified by remove if needed) + firingIndex, + // Add one or several callbacks to the list + add = function( args ) { + var i, + length, + elem, + type, + actual; + for ( i = 0, length = args.length; i < length; i++ ) { + elem = args[ i ]; + type = jQuery.type( elem ); + if ( type === "array" ) { + // Inspect recursively + add( elem ); + } else if ( type === "function" ) { + // Add if not in unique mode and callback is not in + if ( !flags.unique || !self.has( elem ) ) { + list.push( elem ); + } + } + } + }, + // Fire callbacks + fire = function( context, args ) { + args = args || []; + memory = !flags.memory || [ context, args ]; + fired = true; + firing = true; + firingIndex = firingStart || 0; + firingStart = 0; + firingLength = list.length; + for ( ; list && firingIndex < firingLength; firingIndex++ ) { + if ( list[ firingIndex ].apply( context, args ) === false && flags.stopOnFalse ) { + memory = true; // Mark as halted + break; + } + } + firing = false; + if ( list ) { + if ( !flags.once ) { + if ( stack && stack.length ) { + memory = stack.shift(); + self.fireWith( memory[ 0 ], memory[ 1 ] ); + } + } else if ( memory === true ) { + self.disable(); + } else { + list = []; + } + } + }, + // Actual Callbacks object + self = { + // Add a callback or a collection of callbacks to the list + add: function() { + if ( list ) { + var length = list.length; + add( arguments ); + // Do we need to add the callbacks to the + // current firing batch? + if ( firing ) { + firingLength = list.length; + // With memory, if we're not firing then + // we should call right away, unless previous + // firing was halted (stopOnFalse) + } else if ( memory && memory !== true ) { + firingStart = length; + fire( memory[ 0 ], memory[ 1 ] ); + } + } + return this; + }, + // Remove a callback from the list + remove: function() { + if ( list ) { + var args = arguments, + argIndex = 0, + argLength = args.length; + for ( ; argIndex < argLength ; argIndex++ ) { + for ( var i = 0; i < list.length; i++ ) { + if ( args[ argIndex ] === list[ i ] ) { + // Handle firingIndex and firingLength + if ( firing ) { + if ( i <= firingLength ) { + firingLength--; + if ( i <= firingIndex ) { + firingIndex--; + } + } + } + // Remove the element + list.splice( i--, 1 ); + // If we have some unicity property then + // we only need to do this once + if ( flags.unique ) { + break; + } + } + } + } + } + return this; + }, + // Control if a given callback is in the list + has: function( fn ) { + if ( list ) { + var i = 0, + length = list.length; + for ( ; i < length; i++ ) { + if ( fn === list[ i ] ) { + return true; + } + } + } + return false; + }, + // Remove all callbacks from the list + empty: function() { + list = []; + return this; + }, + // Have the list do nothing anymore + disable: function() { + list = stack = memory = undefined; + return this; + }, + // Is it disabled? + disabled: function() { + return !list; + }, + // Lock the list in its current state + lock: function() { + stack = undefined; + if ( !memory || memory === true ) { + self.disable(); + } + return this; + }, + // Is it locked? + locked: function() { + return !stack; + }, + // Call all callbacks with the given context and arguments + fireWith: function( context, args ) { + if ( stack ) { + if ( firing ) { + if ( !flags.once ) { + stack.push( [ context, args ] ); + } + } else if ( !( flags.once && memory ) ) { + fire( context, args ); + } + } + return this; + }, + // Call all the callbacks with the given arguments + fire: function() { + self.fireWith( this, arguments ); + return this; + }, + // To know if the callbacks have already been called at least once + fired: function() { + return !!fired; + } + }; + + return self; +}; + + + + +var // Static reference to slice + sliceDeferred = [].slice; + +jQuery.extend({ + + Deferred: function( func ) { + var doneList = jQuery.Callbacks( "once memory" ), + failList = jQuery.Callbacks( "once memory" ), + progressList = jQuery.Callbacks( "memory" ), + state = "pending", + lists = { + resolve: doneList, + reject: failList, + notify: progressList + }, + promise = { + done: doneList.add, + fail: failList.add, + progress: progressList.add, + + state: function() { + return state; + }, + + // Deprecated + isResolved: doneList.fired, + isRejected: failList.fired, + + then: function( doneCallbacks, failCallbacks, progressCallbacks ) { + deferred.done( doneCallbacks ).fail( failCallbacks ).progress( progressCallbacks ); + return this; + }, + always: function() { + deferred.done.apply( deferred, arguments ).fail.apply( deferred, arguments ); + return this; + }, + pipe: function( fnDone, fnFail, fnProgress ) { + return jQuery.Deferred(function( newDefer ) { + jQuery.each( { + done: [ fnDone, "resolve" ], + fail: [ fnFail, "reject" ], + progress: [ fnProgress, "notify" ] + }, function( handler, data ) { + var fn = data[ 0 ], + action = data[ 1 ], + returned; + if ( jQuery.isFunction( fn ) ) { + deferred[ handler ](function() { + returned = fn.apply( this, arguments ); + if ( returned && jQuery.isFunction( returned.promise ) ) { + returned.promise().then( newDefer.resolve, newDefer.reject, newDefer.notify ); + } else { + newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] ); + } + }); + } else { + deferred[ handler ]( newDefer[ action ] ); + } + }); + }).promise(); + }, + // Get a promise for this deferred + // If obj is provided, the promise aspect is added to the object + promise: function( obj ) { + if ( obj == null ) { + obj = promise; + } else { + for ( var key in promise ) { + obj[ key ] = promise[ key ]; + } + } + return obj; + } + }, + deferred = promise.promise({}), + key; + + for ( key in lists ) { + deferred[ key ] = lists[ key ].fire; + deferred[ key + "With" ] = lists[ key ].fireWith; + } + + // Handle state + deferred.done( function() { + state = "resolved"; + }, failList.disable, progressList.lock ).fail( function() { + state = "rejected"; + }, doneList.disable, progressList.lock ); + + // Call given func if any + if ( func ) { + func.call( deferred, deferred ); + } + + // All done! + return deferred; + }, + + // Deferred helper + when: function( firstParam ) { + var args = sliceDeferred.call( arguments, 0 ), + i = 0, + length = args.length, + pValues = new Array( length ), + count = length, + pCount = length, + deferred = length <= 1 && firstParam && jQuery.isFunction( firstParam.promise ) ? + firstParam : + jQuery.Deferred(), + promise = deferred.promise(); + function resolveFunc( i ) { + return function( value ) { + args[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value; + if ( !( --count ) ) { + deferred.resolveWith( deferred, args ); + } + }; + } + function progressFunc( i ) { + return function( value ) { + pValues[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value; + deferred.notifyWith( promise, pValues ); + }; + } + if ( length > 1 ) { + for ( ; i < length; i++ ) { + if ( args[ i ] && args[ i ].promise && jQuery.isFunction( args[ i ].promise ) ) { + args[ i ].promise().then( resolveFunc(i), deferred.reject, progressFunc(i) ); + } else { + --count; + } + } + if ( !count ) { + deferred.resolveWith( deferred, args ); + } + } else if ( deferred !== firstParam ) { + deferred.resolveWith( deferred, length ? [ firstParam ] : [] ); + } + return promise; + } +}); + + + + +jQuery.support = (function() { + + var support, + all, + a, + select, + opt, + input, + fragment, + tds, + events, + eventName, + i, + isSupported, + div = document.createElement( "div" ), + documentElement = document.documentElement; + + // Preliminary tests + div.setAttribute("className", "t"); + div.innerHTML = "
a"; + + all = div.getElementsByTagName( "*" ); + a = div.getElementsByTagName( "a" )[ 0 ]; + + // Can't get basic test support + if ( !all || !all.length || !a ) { + return {}; + } + + // First batch of supports tests + select = document.createElement( "select" ); + opt = select.appendChild( document.createElement("option") ); + input = div.getElementsByTagName( "input" )[ 0 ]; + + support = { + // IE strips leading whitespace when .innerHTML is used + leadingWhitespace: ( div.firstChild.nodeType === 3 ), + + // Make sure that tbody elements aren't automatically inserted + // IE will insert them into empty tables + tbody: !div.getElementsByTagName("tbody").length, + + // Make sure that link elements get serialized correctly by innerHTML + // This requires a wrapper element in IE + htmlSerialize: !!div.getElementsByTagName("link").length, + + // Get the style information from getAttribute + // (IE uses .cssText instead) + style: /top/.test( a.getAttribute("style") ), + + // Make sure that URLs aren't manipulated + // (IE normalizes it by default) + hrefNormalized: ( a.getAttribute("href") === "/a" ), + + // Make sure that element opacity exists + // (IE uses filter instead) + // Use a regex to work around a WebKit issue. See #5145 + opacity: /^0.55/.test( a.style.opacity ), + + // Verify style float existence + // (IE uses styleFloat instead of cssFloat) + cssFloat: !!a.style.cssFloat, + + // Make sure that if no value is specified for a checkbox + // that it defaults to "on". + // (WebKit defaults to "" instead) + checkOn: ( input.value === "on" ), + + // Make sure that a selected-by-default option has a working selected property. + // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) + optSelected: opt.selected, + + // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) + getSetAttribute: div.className !== "t", + + // Tests for enctype support on a form(#6743) + enctype: !!document.createElement("form").enctype, + + // Makes sure cloning an html5 element does not cause problems + // Where outerHTML is undefined, this still works + html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav>", + + // Will be defined later + submitBubbles: true, + changeBubbles: true, + focusinBubbles: false, + deleteExpando: true, + noCloneEvent: true, + inlineBlockNeedsLayout: false, + shrinkWrapBlocks: false, + reliableMarginRight: true, + pixelMargin: true + }; + + // jQuery.boxModel DEPRECATED in 1.3, use jQuery.support.boxModel instead + jQuery.boxModel = support.boxModel = (document.compatMode === "CSS1Compat"); + + // Make sure checked status is properly cloned + input.checked = true; + support.noCloneChecked = input.cloneNode( true ).checked; + + // Make sure that the options inside disabled selects aren't marked as disabled + // (WebKit marks them as disabled) + select.disabled = true; + support.optDisabled = !opt.disabled; + + // Test to see if it's possible to delete an expando from an element + // Fails in Internet Explorer + try { + delete div.test; + } catch( e ) { + support.deleteExpando = false; + } + + if ( !div.addEventListener && div.attachEvent && div.fireEvent ) { + div.attachEvent( "onclick", function() { + // Cloning a node shouldn't copy over any + // bound event handlers (IE does this) + support.noCloneEvent = false; + }); + div.cloneNode( true ).fireEvent( "onclick" ); + } + + // Check if a radio maintains its value + // after being appended to the DOM + input = document.createElement("input"); + input.value = "t"; + input.setAttribute("type", "radio"); + support.radioValue = input.value === "t"; + + input.setAttribute("checked", "checked"); + + // #11217 - WebKit loses check when the name is after the checked attribute + input.setAttribute( "name", "t" ); + + div.appendChild( input ); + fragment = document.createDocumentFragment(); + fragment.appendChild( div.lastChild ); + + // WebKit doesn't clone checked state correctly in fragments + support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; + + // Check if a disconnected checkbox will retain its checked + // value of true after appended to the DOM (IE6/7) + support.appendChecked = input.checked; + + fragment.removeChild( input ); + fragment.appendChild( div ); + + // Technique from Juriy Zaytsev + // http://perfectionkills.com/detecting-event-support-without-browser-sniffing/ + // We only care about the case where non-standard event systems + // are used, namely in IE. Short-circuiting here helps us to + // avoid an eval call (in setAttribute) which can cause CSP + // to go haywire. See: https://developer.mozilla.org/en/Security/CSP + if ( div.attachEvent ) { + for ( i in { + submit: 1, + change: 1, + focusin: 1 + }) { + eventName = "on" + i; + isSupported = ( eventName in div ); + if ( !isSupported ) { + div.setAttribute( eventName, "return;" ); + isSupported = ( typeof div[ eventName ] === "function" ); + } + support[ i + "Bubbles" ] = isSupported; + } + } + + fragment.removeChild( div ); + + // Null elements to avoid leaks in IE + fragment = select = opt = div = input = null; + + // Run tests that need a body at doc ready + jQuery(function() { + var container, outer, inner, table, td, offsetSupport, + marginDiv, conMarginTop, style, html, positionTopLeftWidthHeight, + paddingMarginBorderVisibility, paddingMarginBorder, + body = document.getElementsByTagName("body")[0]; + + if ( !body ) { + // Return for frameset docs that don't have a body + return; + } + + conMarginTop = 1; + paddingMarginBorder = "padding:0;margin:0;border:"; + positionTopLeftWidthHeight = "position:absolute;top:0;left:0;width:1px;height:1px;"; + paddingMarginBorderVisibility = paddingMarginBorder + "0;visibility:hidden;"; + style = "style='" + positionTopLeftWidthHeight + paddingMarginBorder + "5px solid #000;"; + html = "
" + + "" + + "
"; + + container = document.createElement("div"); + container.style.cssText = paddingMarginBorderVisibility + "width:0;height:0;position:static;top:0;margin-top:" + conMarginTop + "px"; + body.insertBefore( container, body.firstChild ); + + // Construct the test element + div = document.createElement("div"); + container.appendChild( div ); + + // Check if table cells still have offsetWidth/Height when they are set + // to display:none and there are still other visible table cells in a + // table row; if so, offsetWidth/Height are not reliable for use when + // determining if an element has been hidden directly using + // display:none (it is still safe to use offsets if a parent element is + // hidden; don safety goggles and see bug #4512 for more information). + // (only IE 8 fails this test) + div.innerHTML = "
t
"; + tds = div.getElementsByTagName( "td" ); + isSupported = ( tds[ 0 ].offsetHeight === 0 ); + + tds[ 0 ].style.display = ""; + tds[ 1 ].style.display = "none"; + + // Check if empty table cells still have offsetWidth/Height + // (IE <= 8 fail this test) + support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); + + // Check if div with explicit width and no margin-right incorrectly + // gets computed margin-right based on width of container. For more + // info see bug #3333 + // Fails in WebKit before Feb 2011 nightlies + // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right + if ( window.getComputedStyle ) { + div.innerHTML = ""; + marginDiv = document.createElement( "div" ); + marginDiv.style.width = "0"; + marginDiv.style.marginRight = "0"; + div.style.width = "2px"; + div.appendChild( marginDiv ); + support.reliableMarginRight = + ( parseInt( ( window.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0; + } + + if ( typeof div.style.zoom !== "undefined" ) { + // Check if natively block-level elements act like inline-block + // elements when setting their display to 'inline' and giving + // them layout + // (IE < 8 does this) + div.innerHTML = ""; + div.style.width = div.style.padding = "1px"; + div.style.border = 0; + div.style.overflow = "hidden"; + div.style.display = "inline"; + div.style.zoom = 1; + support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 ); + + // Check if elements with layout shrink-wrap their children + // (IE 6 does this) + div.style.display = "block"; + div.style.overflow = "visible"; + div.innerHTML = "
"; + support.shrinkWrapBlocks = ( div.offsetWidth !== 3 ); + } + + div.style.cssText = positionTopLeftWidthHeight + paddingMarginBorderVisibility; + div.innerHTML = html; + + outer = div.firstChild; + inner = outer.firstChild; + td = outer.nextSibling.firstChild.firstChild; + + offsetSupport = { + doesNotAddBorder: ( inner.offsetTop !== 5 ), + doesAddBorderForTableAndCells: ( td.offsetTop === 5 ) + }; + + inner.style.position = "fixed"; + inner.style.top = "20px"; + + // safari subtracts parent border width here which is 5px + offsetSupport.fixedPosition = ( inner.offsetTop === 20 || inner.offsetTop === 15 ); + inner.style.position = inner.style.top = ""; + + outer.style.overflow = "hidden"; + outer.style.position = "relative"; + + offsetSupport.subtractsBorderForOverflowNotVisible = ( inner.offsetTop === -5 ); + offsetSupport.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== conMarginTop ); + + if ( window.getComputedStyle ) { + div.style.marginTop = "1%"; + support.pixelMargin = ( window.getComputedStyle( div, null ) || { marginTop: 0 } ).marginTop !== "1%"; + } + + if ( typeof container.style.zoom !== "undefined" ) { + container.style.zoom = 1; + } + + body.removeChild( container ); + marginDiv = div = container = null; + + jQuery.extend( support, offsetSupport ); + }); + + return support; +})(); + + + + +var rbrace = /^(?:\{.*\}|\[.*\])$/, + rmultiDash = /([A-Z])/g; + +jQuery.extend({ + cache: {}, + + // Please use with caution + uuid: 0, + + // Unique for each copy of jQuery on the page + // Non-digits removed to match rinlinejQuery + expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ), + + // The following elements throw uncatchable exceptions if you + // attempt to add expando properties to them. + noData: { + "embed": true, + // Ban all objects except for Flash (which handle expandos) + "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", + "applet": true + }, + + hasData: function( elem ) { + elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; + return !!elem && !isEmptyDataObject( elem ); + }, + + data: function( elem, name, data, pvt /* Internal Use Only */ ) { + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var privateCache, thisCache, ret, + internalKey = jQuery.expando, + getByName = typeof name === "string", + + // We have to handle DOM nodes and JS objects differently because IE6-7 + // can't GC object references properly across the DOM-JS boundary + isNode = elem.nodeType, + + // Only DOM nodes need the global jQuery cache; JS object data is + // attached directly to the object so GC can occur automatically + cache = isNode ? jQuery.cache : elem, + + // Only defining an ID for JS objects if its cache already exists allows + // the code to shortcut on the same path as a DOM node with no cache + id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey, + isEvents = name === "events"; + + // Avoid doing any more work than we need to when trying to get data on an + // object that has no data at all + if ( (!id || !cache[id] || (!isEvents && !pvt && !cache[id].data)) && getByName && data === undefined ) { + return; + } + + if ( !id ) { + // Only DOM nodes need a new unique ID for each element since their data + // ends up in the global cache + if ( isNode ) { + elem[ internalKey ] = id = ++jQuery.uuid; + } else { + id = internalKey; + } + } + + if ( !cache[ id ] ) { + cache[ id ] = {}; + + // Avoids exposing jQuery metadata on plain JS objects when the object + // is serialized using JSON.stringify + if ( !isNode ) { + cache[ id ].toJSON = jQuery.noop; + } + } + + // An object can be passed to jQuery.data instead of a key/value pair; this gets + // shallow copied over onto the existing cache + if ( typeof name === "object" || typeof name === "function" ) { + if ( pvt ) { + cache[ id ] = jQuery.extend( cache[ id ], name ); + } else { + cache[ id ].data = jQuery.extend( cache[ id ].data, name ); + } + } + + privateCache = thisCache = cache[ id ]; + + // jQuery data() is stored in a separate object inside the object's internal data + // cache in order to avoid key collisions between internal data and user-defined + // data. + if ( !pvt ) { + if ( !thisCache.data ) { + thisCache.data = {}; + } + + thisCache = thisCache.data; + } + + if ( data !== undefined ) { + thisCache[ jQuery.camelCase( name ) ] = data; + } + + // Users should not attempt to inspect the internal events object using jQuery.data, + // it is undocumented and subject to change. But does anyone listen? No. + if ( isEvents && !thisCache[ name ] ) { + return privateCache.events; + } + + // Check for both converted-to-camel and non-converted data property names + // If a data property was specified + if ( getByName ) { + + // First Try to find as-is property data + ret = thisCache[ name ]; + + // Test for null|undefined property data + if ( ret == null ) { + + // Try to find the camelCased property + ret = thisCache[ jQuery.camelCase( name ) ]; + } + } else { + ret = thisCache; + } + + return ret; + }, + + removeData: function( elem, name, pvt /* Internal Use Only */ ) { + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var thisCache, i, l, + + // Reference to internal data cache key + internalKey = jQuery.expando, + + isNode = elem.nodeType, + + // See jQuery.data for more information + cache = isNode ? jQuery.cache : elem, + + // See jQuery.data for more information + id = isNode ? elem[ internalKey ] : internalKey; + + // If there is already no cache entry for this object, there is no + // purpose in continuing + if ( !cache[ id ] ) { + return; + } + + if ( name ) { + + thisCache = pvt ? cache[ id ] : cache[ id ].data; + + if ( thisCache ) { + + // Support array or space separated string names for data keys + if ( !jQuery.isArray( name ) ) { + + // try the string as a key before any manipulation + if ( name in thisCache ) { + name = [ name ]; + } else { + + // split the camel cased version by spaces unless a key with the spaces exists + name = jQuery.camelCase( name ); + if ( name in thisCache ) { + name = [ name ]; + } else { + name = name.split( " " ); + } + } + } + + for ( i = 0, l = name.length; i < l; i++ ) { + delete thisCache[ name[i] ]; + } + + // If there is no data left in the cache, we want to continue + // and let the cache object itself get destroyed + if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) { + return; + } + } + } + + // See jQuery.data for more information + if ( !pvt ) { + delete cache[ id ].data; + + // Don't destroy the parent cache unless the internal data object + // had been the only thing left in it + if ( !isEmptyDataObject(cache[ id ]) ) { + return; + } + } + + // Browsers that fail expando deletion also refuse to delete expandos on + // the window, but it will allow it on all other JS objects; other browsers + // don't care + // Ensure that `cache` is not a window object #10080 + if ( jQuery.support.deleteExpando || !cache.setInterval ) { + delete cache[ id ]; + } else { + cache[ id ] = null; + } + + // We destroyed the cache and need to eliminate the expando on the node to avoid + // false lookups in the cache for entries that no longer exist + if ( isNode ) { + // IE does not allow us to delete expando properties from nodes, + // nor does it have a removeAttribute function on Document nodes; + // we must handle all of these cases + if ( jQuery.support.deleteExpando ) { + delete elem[ internalKey ]; + } else if ( elem.removeAttribute ) { + elem.removeAttribute( internalKey ); + } else { + elem[ internalKey ] = null; + } + } + }, + + // For internal use only. + _data: function( elem, name, data ) { + return jQuery.data( elem, name, data, true ); + }, + + // A method for determining if a DOM node can handle the data expando + acceptData: function( elem ) { + if ( elem.nodeName ) { + var match = jQuery.noData[ elem.nodeName.toLowerCase() ]; + + if ( match ) { + return !(match === true || elem.getAttribute("classid") !== match); + } + } + + return true; + } +}); + +jQuery.fn.extend({ + data: function( key, value ) { + var parts, part, attr, name, l, + elem = this[0], + i = 0, + data = null; + + // Gets all values + if ( key === undefined ) { + if ( this.length ) { + data = jQuery.data( elem ); + + if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { + attr = elem.attributes; + for ( l = attr.length; i < l; i++ ) { + name = attr[i].name; + + if ( name.indexOf( "data-" ) === 0 ) { + name = jQuery.camelCase( name.substring(5) ); + + dataAttr( elem, name, data[ name ] ); + } + } + jQuery._data( elem, "parsedAttrs", true ); + } + } + + return data; + } + + // Sets multiple values + if ( typeof key === "object" ) { + return this.each(function() { + jQuery.data( this, key ); + }); + } + + parts = key.split( ".", 2 ); + parts[1] = parts[1] ? "." + parts[1] : ""; + part = parts[1] + "!"; + + return jQuery.access( this, function( value ) { + + if ( value === undefined ) { + data = this.triggerHandler( "getData" + part, [ parts[0] ] ); + + // Try to fetch any internally stored data first + if ( data === undefined && elem ) { + data = jQuery.data( elem, key ); + data = dataAttr( elem, key, data ); + } + + return data === undefined && parts[1] ? + this.data( parts[0] ) : + data; + } + + parts[1] = value; + this.each(function() { + var self = jQuery( this ); + + self.triggerHandler( "setData" + part, parts ); + jQuery.data( this, key, value ); + self.triggerHandler( "changeData" + part, parts ); + }); + }, null, value, arguments.length > 1, null, false ); + }, + + removeData: function( key ) { + return this.each(function() { + jQuery.removeData( this, key ); + }); + } +}); + +function dataAttr( elem, key, data ) { + // If nothing was found internally, try to fetch any + // data from the HTML5 data-* attribute + if ( data === undefined && elem.nodeType === 1 ) { + + var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); + + data = elem.getAttribute( name ); + + if ( typeof data === "string" ) { + try { + data = data === "true" ? true : + data === "false" ? false : + data === "null" ? null : + jQuery.isNumeric( data ) ? +data : + rbrace.test( data ) ? jQuery.parseJSON( data ) : + data; + } catch( e ) {} + + // Make sure we set the data so it isn't changed later + jQuery.data( elem, key, data ); + + } else { + data = undefined; + } + } + + return data; +} + +// checks a cache object for emptiness +function isEmptyDataObject( obj ) { + for ( var name in obj ) { + + // if the public data object is empty, the private is still empty + if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { + continue; + } + if ( name !== "toJSON" ) { + return false; + } + } + + return true; +} + + + + +function handleQueueMarkDefer( elem, type, src ) { + var deferDataKey = type + "defer", + queueDataKey = type + "queue", + markDataKey = type + "mark", + defer = jQuery._data( elem, deferDataKey ); + if ( defer && + ( src === "queue" || !jQuery._data(elem, queueDataKey) ) && + ( src === "mark" || !jQuery._data(elem, markDataKey) ) ) { + // Give room for hard-coded callbacks to fire first + // and eventually mark/queue something else on the element + setTimeout( function() { + if ( !jQuery._data( elem, queueDataKey ) && + !jQuery._data( elem, markDataKey ) ) { + jQuery.removeData( elem, deferDataKey, true ); + defer.fire(); + } + }, 0 ); + } +} + +jQuery.extend({ + + _mark: function( elem, type ) { + if ( elem ) { + type = ( type || "fx" ) + "mark"; + jQuery._data( elem, type, (jQuery._data( elem, type ) || 0) + 1 ); + } + }, + + _unmark: function( force, elem, type ) { + if ( force !== true ) { + type = elem; + elem = force; + force = false; + } + if ( elem ) { + type = type || "fx"; + var key = type + "mark", + count = force ? 0 : ( (jQuery._data( elem, key ) || 1) - 1 ); + if ( count ) { + jQuery._data( elem, key, count ); + } else { + jQuery.removeData( elem, key, true ); + handleQueueMarkDefer( elem, type, "mark" ); + } + } + }, + + queue: function( elem, type, data ) { + var q; + if ( elem ) { + type = ( type || "fx" ) + "queue"; + q = jQuery._data( elem, type ); + + // Speed up dequeue by getting out quickly if this is just a lookup + if ( data ) { + if ( !q || jQuery.isArray(data) ) { + q = jQuery._data( elem, type, jQuery.makeArray(data) ); + } else { + q.push( data ); + } + } + return q || []; + } + }, + + dequeue: function( elem, type ) { + type = type || "fx"; + + var queue = jQuery.queue( elem, type ), + fn = queue.shift(), + hooks = {}; + + // If the fx queue is dequeued, always remove the progress sentinel + if ( fn === "inprogress" ) { + fn = queue.shift(); + } + + if ( fn ) { + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if ( type === "fx" ) { + queue.unshift( "inprogress" ); + } + + jQuery._data( elem, type + ".run", hooks ); + fn.call( elem, function() { + jQuery.dequeue( elem, type ); + }, hooks ); + } + + if ( !queue.length ) { + jQuery.removeData( elem, type + "queue " + type + ".run", true ); + handleQueueMarkDefer( elem, type, "queue" ); + } + } +}); + +jQuery.fn.extend({ + queue: function( type, data ) { + var setter = 2; + + if ( typeof type !== "string" ) { + data = type; + type = "fx"; + setter--; + } + + if ( arguments.length < setter ) { + return jQuery.queue( this[0], type ); + } + + return data === undefined ? + this : + this.each(function() { + var queue = jQuery.queue( this, type, data ); + + if ( type === "fx" && queue[0] !== "inprogress" ) { + jQuery.dequeue( this, type ); + } + }); + }, + dequeue: function( type ) { + return this.each(function() { + jQuery.dequeue( this, type ); + }); + }, + // Based off of the plugin by Clint Helfers, with permission. + // http://blindsignals.com/index.php/2009/07/jquery-delay/ + delay: function( time, type ) { + time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; + type = type || "fx"; + + return this.queue( type, function( next, hooks ) { + var timeout = setTimeout( next, time ); + hooks.stop = function() { + clearTimeout( timeout ); + }; + }); + }, + clearQueue: function( type ) { + return this.queue( type || "fx", [] ); + }, + // Get a promise resolved when queues of a certain type + // are emptied (fx is the type by default) + promise: function( type, object ) { + if ( typeof type !== "string" ) { + object = type; + type = undefined; + } + type = type || "fx"; + var defer = jQuery.Deferred(), + elements = this, + i = elements.length, + count = 1, + deferDataKey = type + "defer", + queueDataKey = type + "queue", + markDataKey = type + "mark", + tmp; + function resolve() { + if ( !( --count ) ) { + defer.resolveWith( elements, [ elements ] ); + } + } + while( i-- ) { + if (( tmp = jQuery.data( elements[ i ], deferDataKey, undefined, true ) || + ( jQuery.data( elements[ i ], queueDataKey, undefined, true ) || + jQuery.data( elements[ i ], markDataKey, undefined, true ) ) && + jQuery.data( elements[ i ], deferDataKey, jQuery.Callbacks( "once memory" ), true ) )) { + count++; + tmp.add( resolve ); + } + } + resolve(); + return defer.promise( object ); + } +}); + + + + +var rclass = /[\n\t\r]/g, + rspace = /\s+/, + rreturn = /\r/g, + rtype = /^(?:button|input)$/i, + rfocusable = /^(?:button|input|object|select|textarea)$/i, + rclickable = /^a(?:rea)?$/i, + rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, + getSetAttribute = jQuery.support.getSetAttribute, + nodeHook, boolHook, fixSpecified; + +jQuery.fn.extend({ + attr: function( name, value ) { + return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 ); + }, + + removeAttr: function( name ) { + return this.each(function() { + jQuery.removeAttr( this, name ); + }); + }, + + prop: function( name, value ) { + return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 ); + }, + + removeProp: function( name ) { + name = jQuery.propFix[ name ] || name; + return this.each(function() { + // try/catch handles cases where IE balks (such as removing a property on window) + try { + this[ name ] = undefined; + delete this[ name ]; + } catch( e ) {} + }); + }, + + addClass: function( value ) { + var classNames, i, l, elem, + setClass, c, cl; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( j ) { + jQuery( this ).addClass( value.call(this, j, this.className) ); + }); + } + + if ( value && typeof value === "string" ) { + classNames = value.split( rspace ); + + for ( i = 0, l = this.length; i < l; i++ ) { + elem = this[ i ]; + + if ( elem.nodeType === 1 ) { + if ( !elem.className && classNames.length === 1 ) { + elem.className = value; + + } else { + setClass = " " + elem.className + " "; + + for ( c = 0, cl = classNames.length; c < cl; c++ ) { + if ( !~setClass.indexOf( " " + classNames[ c ] + " " ) ) { + setClass += classNames[ c ] + " "; + } + } + elem.className = jQuery.trim( setClass ); + } + } + } + } + + return this; + }, + + removeClass: function( value ) { + var classNames, i, l, elem, className, c, cl; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( j ) { + jQuery( this ).removeClass( value.call(this, j, this.className) ); + }); + } + + if ( (value && typeof value === "string") || value === undefined ) { + classNames = ( value || "" ).split( rspace ); + + for ( i = 0, l = this.length; i < l; i++ ) { + elem = this[ i ]; + + if ( elem.nodeType === 1 && elem.className ) { + if ( value ) { + className = (" " + elem.className + " ").replace( rclass, " " ); + for ( c = 0, cl = classNames.length; c < cl; c++ ) { + className = className.replace(" " + classNames[ c ] + " ", " "); + } + elem.className = jQuery.trim( className ); + + } else { + elem.className = ""; + } + } + } + } + + return this; + }, + + toggleClass: function( value, stateVal ) { + var type = typeof value, + isBool = typeof stateVal === "boolean"; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( i ) { + jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); + }); + } + + return this.each(function() { + if ( type === "string" ) { + // toggle individual class names + var className, + i = 0, + self = jQuery( this ), + state = stateVal, + classNames = value.split( rspace ); + + while ( (className = classNames[ i++ ]) ) { + // check each className given, space seperated list + state = isBool ? state : !self.hasClass( className ); + self[ state ? "addClass" : "removeClass" ]( className ); + } + + } else if ( type === "undefined" || type === "boolean" ) { + if ( this.className ) { + // store className if set + jQuery._data( this, "__className__", this.className ); + } + + // toggle whole className + this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; + } + }); + }, + + hasClass: function( selector ) { + var className = " " + selector + " ", + i = 0, + l = this.length; + for ( ; i < l; i++ ) { + if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) { + return true; + } + } + + return false; + }, + + val: function( value ) { + var hooks, ret, isFunction, + elem = this[0]; + + if ( !arguments.length ) { + if ( elem ) { + hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; + + if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { + return ret; + } + + ret = elem.value; + + return typeof ret === "string" ? + // handle most common string cases + ret.replace(rreturn, "") : + // handle cases where value is null/undef or number + ret == null ? "" : ret; + } + + return; + } + + isFunction = jQuery.isFunction( value ); + + return this.each(function( i ) { + var self = jQuery(this), val; + + if ( this.nodeType !== 1 ) { + return; + } + + if ( isFunction ) { + val = value.call( this, i, self.val() ); + } else { + val = value; + } + + // Treat null/undefined as ""; convert numbers to string + if ( val == null ) { + val = ""; + } else if ( typeof val === "number" ) { + val += ""; + } else if ( jQuery.isArray( val ) ) { + val = jQuery.map(val, function ( value ) { + return value == null ? "" : value + ""; + }); + } + + hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; + + // If set returns undefined, fall back to normal setting + if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { + this.value = val; + } + }); + } +}); + +jQuery.extend({ + valHooks: { + option: { + get: function( elem ) { + // attributes.value is undefined in Blackberry 4.7 but + // uses .value. See #6932 + var val = elem.attributes.value; + return !val || val.specified ? elem.value : elem.text; + } + }, + select: { + get: function( elem ) { + var value, i, max, option, + index = elem.selectedIndex, + values = [], + options = elem.options, + one = elem.type === "select-one"; + + // Nothing was selected + if ( index < 0 ) { + return null; + } + + // Loop through all the selected options + i = one ? index : 0; + max = one ? index + 1 : options.length; + for ( ; i < max; i++ ) { + option = options[ i ]; + + // Don't return options that are disabled or in a disabled optgroup + if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) && + (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) { + + // Get the specific value for the option + value = jQuery( option ).val(); + + // We don't need an array for one selects + if ( one ) { + return value; + } + + // Multi-Selects return an array + values.push( value ); + } + } + + // Fixes Bug #2551 -- select.val() broken in IE after form.reset() + if ( one && !values.length && options.length ) { + return jQuery( options[ index ] ).val(); + } + + return values; + }, + + set: function( elem, value ) { + var values = jQuery.makeArray( value ); + + jQuery(elem).find("option").each(function() { + this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; + }); + + if ( !values.length ) { + elem.selectedIndex = -1; + } + return values; + } + } + }, + + attrFn: { + val: true, + css: true, + html: true, + text: true, + data: true, + width: true, + height: true, + offset: true + }, + + attr: function( elem, name, value, pass ) { + var ret, hooks, notxml, + nType = elem.nodeType; + + // don't get/set attributes on text, comment and attribute nodes + if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + if ( pass && name in jQuery.attrFn ) { + return jQuery( elem )[ name ]( value ); + } + + // Fallback to prop when attributes are not supported + if ( typeof elem.getAttribute === "undefined" ) { + return jQuery.prop( elem, name, value ); + } + + notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); + + // All attributes are lowercase + // Grab necessary hook if one is defined + if ( notxml ) { + name = name.toLowerCase(); + hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook ); + } + + if ( value !== undefined ) { + + if ( value === null ) { + jQuery.removeAttr( elem, name ); + return; + + } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) { + return ret; + + } else { + elem.setAttribute( name, "" + value ); + return value; + } + + } else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) { + return ret; + + } else { + + ret = elem.getAttribute( name ); + + // Non-existent attributes return null, we normalize to undefined + return ret === null ? + undefined : + ret; + } + }, + + removeAttr: function( elem, value ) { + var propName, attrNames, name, l, isBool, + i = 0; + + if ( value && elem.nodeType === 1 ) { + attrNames = value.toLowerCase().split( rspace ); + l = attrNames.length; + + for ( ; i < l; i++ ) { + name = attrNames[ i ]; + + if ( name ) { + propName = jQuery.propFix[ name ] || name; + isBool = rboolean.test( name ); + + // See #9699 for explanation of this approach (setting first, then removal) + // Do not do this for boolean attributes (see #10870) + if ( !isBool ) { + jQuery.attr( elem, name, "" ); + } + elem.removeAttribute( getSetAttribute ? name : propName ); + + // Set corresponding property to false for boolean attributes + if ( isBool && propName in elem ) { + elem[ propName ] = false; + } + } + } + } + }, + + attrHooks: { + type: { + set: function( elem, value ) { + // We can't allow the type property to be changed (since it causes problems in IE) + if ( rtype.test( elem.nodeName ) && elem.parentNode ) { + jQuery.error( "type property can't be changed" ); + } else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { + // Setting the type on a radio button after the value resets the value in IE6-9 + // Reset value to it's default in case type is set after value + // This is for element creation + var val = elem.value; + elem.setAttribute( "type", value ); + if ( val ) { + elem.value = val; + } + return value; + } + } + }, + // Use the value property for back compat + // Use the nodeHook for button elements in IE6/7 (#1954) + value: { + get: function( elem, name ) { + if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { + return nodeHook.get( elem, name ); + } + return name in elem ? + elem.value : + null; + }, + set: function( elem, value, name ) { + if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { + return nodeHook.set( elem, value, name ); + } + // Does not return so that setAttribute is also used + elem.value = value; + } + } + }, + + propFix: { + tabindex: "tabIndex", + readonly: "readOnly", + "for": "htmlFor", + "class": "className", + maxlength: "maxLength", + cellspacing: "cellSpacing", + cellpadding: "cellPadding", + rowspan: "rowSpan", + colspan: "colSpan", + usemap: "useMap", + frameborder: "frameBorder", + contenteditable: "contentEditable" + }, + + prop: function( elem, name, value ) { + var ret, hooks, notxml, + nType = elem.nodeType; + + // don't get/set properties on text, comment and attribute nodes + if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); + + if ( notxml ) { + // Fix name and attach hooks + name = jQuery.propFix[ name ] || name; + hooks = jQuery.propHooks[ name ]; + } + + if ( value !== undefined ) { + if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { + return ret; + + } else { + return ( elem[ name ] = value ); + } + + } else { + if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { + return ret; + + } else { + return elem[ name ]; + } + } + }, + + propHooks: { + tabIndex: { + get: function( elem ) { + // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set + // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ + var attributeNode = elem.getAttributeNode("tabindex"); + + return attributeNode && attributeNode.specified ? + parseInt( attributeNode.value, 10 ) : + rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? + 0 : + undefined; + } + } + } +}); + +// Add the tabIndex propHook to attrHooks for back-compat (different case is intentional) +jQuery.attrHooks.tabindex = jQuery.propHooks.tabIndex; + +// Hook for boolean attributes +boolHook = { + get: function( elem, name ) { + // Align boolean attributes with corresponding properties + // Fall back to attribute presence where some booleans are not supported + var attrNode, + property = jQuery.prop( elem, name ); + return property === true || typeof property !== "boolean" && ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ? + name.toLowerCase() : + undefined; + }, + set: function( elem, value, name ) { + var propName; + if ( value === false ) { + // Remove boolean attributes when set to false + jQuery.removeAttr( elem, name ); + } else { + // value is true since we know at this point it's type boolean and not false + // Set boolean attributes to the same name and set the DOM property + propName = jQuery.propFix[ name ] || name; + if ( propName in elem ) { + // Only set the IDL specifically if it already exists on the element + elem[ propName ] = true; + } + + elem.setAttribute( name, name.toLowerCase() ); + } + return name; + } +}; + +// IE6/7 do not support getting/setting some attributes with get/setAttribute +if ( !getSetAttribute ) { + + fixSpecified = { + name: true, + id: true, + coords: true + }; + + // Use this for any attribute in IE6/7 + // This fixes almost every IE6/7 issue + nodeHook = jQuery.valHooks.button = { + get: function( elem, name ) { + var ret; + ret = elem.getAttributeNode( name ); + return ret && ( fixSpecified[ name ] ? ret.nodeValue !== "" : ret.specified ) ? + ret.nodeValue : + undefined; + }, + set: function( elem, value, name ) { + // Set the existing or create a new attribute node + var ret = elem.getAttributeNode( name ); + if ( !ret ) { + ret = document.createAttribute( name ); + elem.setAttributeNode( ret ); + } + return ( ret.nodeValue = value + "" ); + } + }; + + // Apply the nodeHook to tabindex + jQuery.attrHooks.tabindex.set = nodeHook.set; + + // Set width and height to auto instead of 0 on empty string( Bug #8150 ) + // This is for removals + jQuery.each([ "width", "height" ], function( i, name ) { + jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { + set: function( elem, value ) { + if ( value === "" ) { + elem.setAttribute( name, "auto" ); + return value; + } + } + }); + }); + + // Set contenteditable to false on removals(#10429) + // Setting to empty string throws an error as an invalid value + jQuery.attrHooks.contenteditable = { + get: nodeHook.get, + set: function( elem, value, name ) { + if ( value === "" ) { + value = "false"; + } + nodeHook.set( elem, value, name ); + } + }; +} + + +// Some attributes require a special call on IE +if ( !jQuery.support.hrefNormalized ) { + jQuery.each([ "href", "src", "width", "height" ], function( i, name ) { + jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { + get: function( elem ) { + var ret = elem.getAttribute( name, 2 ); + return ret === null ? undefined : ret; + } + }); + }); +} + +if ( !jQuery.support.style ) { + jQuery.attrHooks.style = { + get: function( elem ) { + // Return undefined in the case of empty string + // Normalize to lowercase since IE uppercases css property names + return elem.style.cssText.toLowerCase() || undefined; + }, + set: function( elem, value ) { + return ( elem.style.cssText = "" + value ); + } + }; +} + +// Safari mis-reports the default selected property of an option +// Accessing the parent's selectedIndex property fixes it +if ( !jQuery.support.optSelected ) { + jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, { + get: function( elem ) { + var parent = elem.parentNode; + + if ( parent ) { + parent.selectedIndex; + + // Make sure that it also works with optgroups, see #5701 + if ( parent.parentNode ) { + parent.parentNode.selectedIndex; + } + } + return null; + } + }); +} + +// IE6/7 call enctype encoding +if ( !jQuery.support.enctype ) { + jQuery.propFix.enctype = "encoding"; +} + +// Radios and checkboxes getter/setter +if ( !jQuery.support.checkOn ) { + jQuery.each([ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = { + get: function( elem ) { + // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified + return elem.getAttribute("value") === null ? "on" : elem.value; + } + }; + }); +} +jQuery.each([ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], { + set: function( elem, value ) { + if ( jQuery.isArray( value ) ) { + return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); + } + } + }); +}); + + + + +var rformElems = /^(?:textarea|input|select)$/i, + rtypenamespace = /^([^\.]*)?(?:\.(.+))?$/, + rhoverHack = /(?:^|\s)hover(\.\S+)?\b/, + rkeyEvent = /^key/, + rmouseEvent = /^(?:mouse|contextmenu)|click/, + rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, + rquickIs = /^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/, + quickParse = function( selector ) { + var quick = rquickIs.exec( selector ); + if ( quick ) { + // 0 1 2 3 + // [ _, tag, id, class ] + quick[1] = ( quick[1] || "" ).toLowerCase(); + quick[3] = quick[3] && new RegExp( "(?:^|\\s)" + quick[3] + "(?:\\s|$)" ); + } + return quick; + }, + quickIs = function( elem, m ) { + var attrs = elem.attributes || {}; + return ( + (!m[1] || elem.nodeName.toLowerCase() === m[1]) && + (!m[2] || (attrs.id || {}).value === m[2]) && + (!m[3] || m[3].test( (attrs[ "class" ] || {}).value )) + ); + }, + hoverHack = function( events ) { + return jQuery.event.special.hover ? events : events.replace( rhoverHack, "mouseenter$1 mouseleave$1" ); + }; + +/* + * Helper functions for managing events -- not part of the public interface. + * Props to Dean Edwards' addEvent library for many of the ideas. + */ +jQuery.event = { + + add: function( elem, types, handler, data, selector ) { + + var elemData, eventHandle, events, + t, tns, type, namespaces, handleObj, + handleObjIn, quick, handlers, special; + + // Don't attach events to noData or text/comment nodes (allow plain objects tho) + if ( elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data( elem )) ) { + return; + } + + // Caller can pass in an object of custom data in lieu of the handler + if ( handler.handler ) { + handleObjIn = handler; + handler = handleObjIn.handler; + selector = handleObjIn.selector; + } + + // Make sure that the handler has a unique ID, used to find/remove it later + if ( !handler.guid ) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure and main handler, if this is the first + events = elemData.events; + if ( !events ) { + elemData.events = events = {}; + } + eventHandle = elemData.handle; + if ( !eventHandle ) { + elemData.handle = eventHandle = function( e ) { + // Discard the second event of a jQuery.event.trigger() and + // when an event is called after a page has unloaded + return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ? + jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : + undefined; + }; + // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events + eventHandle.elem = elem; + } + + // Handle multiple events separated by a space + // jQuery(...).bind("mouseover mouseout", fn); + types = jQuery.trim( hoverHack(types) ).split( " " ); + for ( t = 0; t < types.length; t++ ) { + + tns = rtypenamespace.exec( types[t] ) || []; + type = tns[1]; + namespaces = ( tns[2] || "" ).split( "." ).sort(); + + // If event changes its type, use the special event handlers for the changed type + special = jQuery.event.special[ type ] || {}; + + // If selector defined, determine special event api type, otherwise given type + type = ( selector ? special.delegateType : special.bindType ) || type; + + // Update special based on newly reset type + special = jQuery.event.special[ type ] || {}; + + // handleObj is passed to all event handlers + handleObj = jQuery.extend({ + type: type, + origType: tns[1], + data: data, + handler: handler, + guid: handler.guid, + selector: selector, + quick: selector && quickParse( selector ), + namespace: namespaces.join(".") + }, handleObjIn ); + + // Init the event handler queue if we're the first + handlers = events[ type ]; + if ( !handlers ) { + handlers = events[ type ] = []; + handlers.delegateCount = 0; + + // Only use addEventListener/attachEvent if the special events handler returns false + if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { + // Bind the global event handler to the element + if ( elem.addEventListener ) { + elem.addEventListener( type, eventHandle, false ); + + } else if ( elem.attachEvent ) { + elem.attachEvent( "on" + type, eventHandle ); + } + } + } + + if ( special.add ) { + special.add.call( elem, handleObj ); + + if ( !handleObj.handler.guid ) { + handleObj.handler.guid = handler.guid; + } + } + + // Add to the element's handler list, delegates in front + if ( selector ) { + handlers.splice( handlers.delegateCount++, 0, handleObj ); + } else { + handlers.push( handleObj ); + } + + // Keep track of which events have ever been used, for event optimization + jQuery.event.global[ type ] = true; + } + + // Nullify elem to prevent memory leaks in IE + elem = null; + }, + + global: {}, + + // Detach an event or set of events from an element + remove: function( elem, types, handler, selector, mappedTypes ) { + + var elemData = jQuery.hasData( elem ) && jQuery._data( elem ), + t, tns, type, origType, namespaces, origCount, + j, events, special, handle, eventType, handleObj; + + if ( !elemData || !(events = elemData.events) ) { + return; + } + + // Once for each type.namespace in types; type may be omitted + types = jQuery.trim( hoverHack( types || "" ) ).split(" "); + for ( t = 0; t < types.length; t++ ) { + tns = rtypenamespace.exec( types[t] ) || []; + type = origType = tns[1]; + namespaces = tns[2]; + + // Unbind all events (on this namespace, if provided) for the element + if ( !type ) { + for ( type in events ) { + jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); + } + continue; + } + + special = jQuery.event.special[ type ] || {}; + type = ( selector? special.delegateType : special.bindType ) || type; + eventType = events[ type ] || []; + origCount = eventType.length; + namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.)?") + "(\\.|$)") : null; + + // Remove matching events + for ( j = 0; j < eventType.length; j++ ) { + handleObj = eventType[ j ]; + + if ( ( mappedTypes || origType === handleObj.origType ) && + ( !handler || handler.guid === handleObj.guid ) && + ( !namespaces || namespaces.test( handleObj.namespace ) ) && + ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { + eventType.splice( j--, 1 ); + + if ( handleObj.selector ) { + eventType.delegateCount--; + } + if ( special.remove ) { + special.remove.call( elem, handleObj ); + } + } + } + + // Remove generic event handler if we removed something and no more handlers exist + // (avoids potential for endless recursion during removal of special event handlers) + if ( eventType.length === 0 && origCount !== eventType.length ) { + if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) { + jQuery.removeEvent( elem, type, elemData.handle ); + } + + delete events[ type ]; + } + } + + // Remove the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + handle = elemData.handle; + if ( handle ) { + handle.elem = null; + } + + // removeData also checks for emptiness and clears the expando if empty + // so use it instead of delete + jQuery.removeData( elem, [ "events", "handle" ], true ); + } + }, + + // Events that are safe to short-circuit if no handlers are attached. + // Native DOM events should not be added, they may have inline handlers. + customEvent: { + "getData": true, + "setData": true, + "changeData": true + }, + + trigger: function( event, data, elem, onlyHandlers ) { + // Don't do events on text and comment nodes + if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) { + return; + } + + // Event object or event type + var type = event.type || event, + namespaces = [], + cache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType; + + // focus/blur morphs to focusin/out; ensure we're not firing them right now + if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { + return; + } + + if ( type.indexOf( "!" ) >= 0 ) { + // Exclusive events trigger only for the exact event (no namespaces) + type = type.slice(0, -1); + exclusive = true; + } + + if ( type.indexOf( "." ) >= 0 ) { + // Namespaced trigger; create a regexp to match event type in handle() + namespaces = type.split("."); + type = namespaces.shift(); + namespaces.sort(); + } + + if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) { + // No jQuery handlers for this event type, and it can't have inline handlers + return; + } + + // Caller can pass in an Event, Object, or just an event type string + event = typeof event === "object" ? + // jQuery.Event object + event[ jQuery.expando ] ? event : + // Object literal + new jQuery.Event( type, event ) : + // Just the event type (string) + new jQuery.Event( type ); + + event.type = type; + event.isTrigger = true; + event.exclusive = exclusive; + event.namespace = namespaces.join( "." ); + event.namespace_re = event.namespace? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)") : null; + ontype = type.indexOf( ":" ) < 0 ? "on" + type : ""; + + // Handle a global trigger + if ( !elem ) { + + // TODO: Stop taunting the data cache; remove global events and always attach to document + cache = jQuery.cache; + for ( i in cache ) { + if ( cache[ i ].events && cache[ i ].events[ type ] ) { + jQuery.event.trigger( event, data, cache[ i ].handle.elem, true ); + } + } + return; + } + + // Clean up the event in case it is being reused + event.result = undefined; + if ( !event.target ) { + event.target = elem; + } + + // Clone any incoming data and prepend the event, creating the handler arg list + data = data != null ? jQuery.makeArray( data ) : []; + data.unshift( event ); + + // Allow special events to draw outside the lines + special = jQuery.event.special[ type ] || {}; + if ( special.trigger && special.trigger.apply( elem, data ) === false ) { + return; + } + + // Determine event propagation path in advance, per W3C events spec (#9951) + // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) + eventPath = [[ elem, special.bindType || type ]]; + if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { + + bubbleType = special.delegateType || type; + cur = rfocusMorph.test( bubbleType + type ) ? elem : elem.parentNode; + old = null; + for ( ; cur; cur = cur.parentNode ) { + eventPath.push([ cur, bubbleType ]); + old = cur; + } + + // Only add window if we got to document (e.g., not plain obj or detached DOM) + if ( old && old === elem.ownerDocument ) { + eventPath.push([ old.defaultView || old.parentWindow || window, bubbleType ]); + } + } + + // Fire handlers on the event path + for ( i = 0; i < eventPath.length && !event.isPropagationStopped(); i++ ) { + + cur = eventPath[i][0]; + event.type = eventPath[i][1]; + + handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); + if ( handle ) { + handle.apply( cur, data ); + } + // Note that this is a bare JS function and not a jQuery handler + handle = ontype && cur[ ontype ]; + if ( handle && jQuery.acceptData( cur ) && handle.apply( cur, data ) === false ) { + event.preventDefault(); + } + } + event.type = type; + + // If nobody prevented the default action, do it now + if ( !onlyHandlers && !event.isDefaultPrevented() ) { + + if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) && + !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) { + + // Call a native DOM method on the target with the same name name as the event. + // Can't use an .isFunction() check here because IE6/7 fails that test. + // Don't do default actions on window, that's where global variables be (#6170) + // IE<9 dies on focus/blur to hidden element (#1486) + if ( ontype && elem[ type ] && ((type !== "focus" && type !== "blur") || event.target.offsetWidth !== 0) && !jQuery.isWindow( elem ) ) { + + // Don't re-trigger an onFOO event when we call its FOO() method + old = elem[ ontype ]; + + if ( old ) { + elem[ ontype ] = null; + } + + // Prevent re-triggering of the same event, since we already bubbled it above + jQuery.event.triggered = type; + elem[ type ](); + jQuery.event.triggered = undefined; + + if ( old ) { + elem[ ontype ] = old; + } + } + } + } + + return event.result; + }, + + dispatch: function( event ) { + + // Make a writable jQuery.Event from the native event object + event = jQuery.event.fix( event || window.event ); + + var handlers = ( (jQuery._data( this, "events" ) || {} )[ event.type ] || []), + delegateCount = handlers.delegateCount, + args = [].slice.call( arguments, 0 ), + run_all = !event.exclusive && !event.namespace, + special = jQuery.event.special[ event.type ] || {}, + handlerQueue = [], + i, j, cur, jqcur, ret, selMatch, matched, matches, handleObj, sel, related; + + // Use the fix-ed jQuery.Event rather than the (read-only) native event + args[0] = event; + event.delegateTarget = this; + + // Call the preDispatch hook for the mapped type, and let it bail if desired + if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { + return; + } + + // Determine handlers that should run if there are delegated events + // Avoid non-left-click bubbling in Firefox (#3861) + if ( delegateCount && !(event.button && event.type === "click") ) { + + // Pregenerate a single jQuery object for reuse with .is() + jqcur = jQuery(this); + jqcur.context = this.ownerDocument || this; + + for ( cur = event.target; cur != this; cur = cur.parentNode || this ) { + + // Don't process events on disabled elements (#6911, #8165) + if ( cur.disabled !== true ) { + selMatch = {}; + matches = []; + jqcur[0] = cur; + for ( i = 0; i < delegateCount; i++ ) { + handleObj = handlers[ i ]; + sel = handleObj.selector; + + if ( selMatch[ sel ] === undefined ) { + selMatch[ sel ] = ( + handleObj.quick ? quickIs( cur, handleObj.quick ) : jqcur.is( sel ) + ); + } + if ( selMatch[ sel ] ) { + matches.push( handleObj ); + } + } + if ( matches.length ) { + handlerQueue.push({ elem: cur, matches: matches }); + } + } + } + } + + // Add the remaining (directly-bound) handlers + if ( handlers.length > delegateCount ) { + handlerQueue.push({ elem: this, matches: handlers.slice( delegateCount ) }); + } + + // Run delegates first; they may want to stop propagation beneath us + for ( i = 0; i < handlerQueue.length && !event.isPropagationStopped(); i++ ) { + matched = handlerQueue[ i ]; + event.currentTarget = matched.elem; + + for ( j = 0; j < matched.matches.length && !event.isImmediatePropagationStopped(); j++ ) { + handleObj = matched.matches[ j ]; + + // Triggered event must either 1) be non-exclusive and have no namespace, or + // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). + if ( run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) { + + event.data = handleObj.data; + event.handleObj = handleObj; + + ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) + .apply( matched.elem, args ); + + if ( ret !== undefined ) { + event.result = ret; + if ( ret === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + } + } + } + + // Call the postDispatch hook for the mapped type + if ( special.postDispatch ) { + special.postDispatch.call( this, event ); + } + + return event.result; + }, + + // Includes some event props shared by KeyEvent and MouseEvent + // *** attrChange attrName relatedNode srcElement are not normalized, non-W3C, deprecated, will be removed in 1.8 *** + props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), + + fixHooks: {}, + + keyHooks: { + props: "char charCode key keyCode".split(" "), + filter: function( event, original ) { + + // Add which for key events + if ( event.which == null ) { + event.which = original.charCode != null ? original.charCode : original.keyCode; + } + + return event; + } + }, + + mouseHooks: { + props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), + filter: function( event, original ) { + var eventDoc, doc, body, + button = original.button, + fromElement = original.fromElement; + + // Calculate pageX/Y if missing and clientX/Y available + if ( event.pageX == null && original.clientX != null ) { + eventDoc = event.target.ownerDocument || document; + doc = eventDoc.documentElement; + body = eventDoc.body; + + event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); + event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); + } + + // Add relatedTarget, if necessary + if ( !event.relatedTarget && fromElement ) { + event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; + } + + // Add which for click: 1 === left; 2 === middle; 3 === right + // Note: button is not normalized, so don't use it + if ( !event.which && button !== undefined ) { + event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); + } + + return event; + } + }, + + fix: function( event ) { + if ( event[ jQuery.expando ] ) { + return event; + } + + // Create a writable copy of the event object and normalize some properties + var i, prop, + originalEvent = event, + fixHook = jQuery.event.fixHooks[ event.type ] || {}, + copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; + + event = jQuery.Event( originalEvent ); + + for ( i = copy.length; i; ) { + prop = copy[ --i ]; + event[ prop ] = originalEvent[ prop ]; + } + + // Fix target property, if necessary (#1925, IE 6/7/8 & Safari2) + if ( !event.target ) { + event.target = originalEvent.srcElement || document; + } + + // Target should not be a text node (#504, Safari) + if ( event.target.nodeType === 3 ) { + event.target = event.target.parentNode; + } + + // For mouse/key events; add metaKey if it's not there (#3368, IE6/7/8) + if ( event.metaKey === undefined ) { + event.metaKey = event.ctrlKey; + } + + return fixHook.filter? fixHook.filter( event, originalEvent ) : event; + }, + + special: { + ready: { + // Make sure the ready event is setup + setup: jQuery.bindReady + }, + + load: { + // Prevent triggered image.load events from bubbling to window.load + noBubble: true + }, + + focus: { + delegateType: "focusin" + }, + blur: { + delegateType: "focusout" + }, + + beforeunload: { + setup: function( data, namespaces, eventHandle ) { + // We only want to do this special case on windows + if ( jQuery.isWindow( this ) ) { + this.onbeforeunload = eventHandle; + } + }, + + teardown: function( namespaces, eventHandle ) { + if ( this.onbeforeunload === eventHandle ) { + this.onbeforeunload = null; + } + } + } + }, + + simulate: function( type, elem, event, bubble ) { + // Piggyback on a donor event to simulate a different one. + // Fake originalEvent to avoid donor's stopPropagation, but if the + // simulated event prevents default then we do the same on the donor. + var e = jQuery.extend( + new jQuery.Event(), + event, + { type: type, + isSimulated: true, + originalEvent: {} + } + ); + if ( bubble ) { + jQuery.event.trigger( e, null, elem ); + } else { + jQuery.event.dispatch.call( elem, e ); + } + if ( e.isDefaultPrevented() ) { + event.preventDefault(); + } + } +}; + +// Some plugins are using, but it's undocumented/deprecated and will be removed. +// The 1.7 special event interface should provide all the hooks needed now. +jQuery.event.handle = jQuery.event.dispatch; + +jQuery.removeEvent = document.removeEventListener ? + function( elem, type, handle ) { + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle, false ); + } + } : + function( elem, type, handle ) { + if ( elem.detachEvent ) { + elem.detachEvent( "on" + type, handle ); + } + }; + +jQuery.Event = function( src, props ) { + // Allow instantiation without the 'new' keyword + if ( !(this instanceof jQuery.Event) ) { + return new jQuery.Event( src, props ); + } + + // Event object + if ( src && src.type ) { + this.originalEvent = src; + this.type = src.type; + + // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false || + src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse; + + // Event type + } else { + this.type = src; + } + + // Put explicitly provided properties onto the event object + if ( props ) { + jQuery.extend( this, props ); + } + + // Create a timestamp if incoming event doesn't have one + this.timeStamp = src && src.timeStamp || jQuery.now(); + + // Mark it as fixed + this[ jQuery.expando ] = true; +}; + +function returnFalse() { + return false; +} +function returnTrue() { + return true; +} + +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding +// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +jQuery.Event.prototype = { + preventDefault: function() { + this.isDefaultPrevented = returnTrue; + + var e = this.originalEvent; + if ( !e ) { + return; + } + + // if preventDefault exists run it on the original event + if ( e.preventDefault ) { + e.preventDefault(); + + // otherwise set the returnValue property of the original event to false (IE) + } else { + e.returnValue = false; + } + }, + stopPropagation: function() { + this.isPropagationStopped = returnTrue; + + var e = this.originalEvent; + if ( !e ) { + return; + } + // if stopPropagation exists run it on the original event + if ( e.stopPropagation ) { + e.stopPropagation(); + } + // otherwise set the cancelBubble property of the original event to true (IE) + e.cancelBubble = true; + }, + stopImmediatePropagation: function() { + this.isImmediatePropagationStopped = returnTrue; + this.stopPropagation(); + }, + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse +}; + +// Create mouseenter/leave events using mouseover/out and event-time checks +jQuery.each({ + mouseenter: "mouseover", + mouseleave: "mouseout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = { + delegateType: fix, + bindType: fix, + + handle: function( event ) { + var target = this, + related = event.relatedTarget, + handleObj = event.handleObj, + selector = handleObj.selector, + ret; + + // For mousenter/leave call the handler if related is outside the target. + // NB: No relatedTarget if the mouse left/entered the browser window + if ( !related || (related !== target && !jQuery.contains( target, related )) ) { + event.type = handleObj.origType; + ret = handleObj.handler.apply( this, arguments ); + event.type = fix; + } + return ret; + } + }; +}); + +// IE submit delegation +if ( !jQuery.support.submitBubbles ) { + + jQuery.event.special.submit = { + setup: function() { + // Only need this for delegated form submit events + if ( jQuery.nodeName( this, "form" ) ) { + return false; + } + + // Lazy-add a submit handler when a descendant form may potentially be submitted + jQuery.event.add( this, "click._submit keypress._submit", function( e ) { + // Node name check avoids a VML-related crash in IE (#9807) + var elem = e.target, + form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; + if ( form && !form._submit_attached ) { + jQuery.event.add( form, "submit._submit", function( event ) { + event._submit_bubble = true; + }); + form._submit_attached = true; + } + }); + // return undefined since we don't need an event listener + }, + + postDispatch: function( event ) { + // If form was submitted by the user, bubble the event up the tree + if ( event._submit_bubble ) { + delete event._submit_bubble; + if ( this.parentNode && !event.isTrigger ) { + jQuery.event.simulate( "submit", this.parentNode, event, true ); + } + } + }, + + teardown: function() { + // Only need this for delegated form submit events + if ( jQuery.nodeName( this, "form" ) ) { + return false; + } + + // Remove delegated handlers; cleanData eventually reaps submit handlers attached above + jQuery.event.remove( this, "._submit" ); + } + }; +} + +// IE change delegation and checkbox/radio fix +if ( !jQuery.support.changeBubbles ) { + + jQuery.event.special.change = { + + setup: function() { + + if ( rformElems.test( this.nodeName ) ) { + // IE doesn't fire change on a check/radio until blur; trigger it on click + // after a propertychange. Eat the blur-change in special.change.handle. + // This still fires onchange a second time for check/radio after blur. + if ( this.type === "checkbox" || this.type === "radio" ) { + jQuery.event.add( this, "propertychange._change", function( event ) { + if ( event.originalEvent.propertyName === "checked" ) { + this._just_changed = true; + } + }); + jQuery.event.add( this, "click._change", function( event ) { + if ( this._just_changed && !event.isTrigger ) { + this._just_changed = false; + jQuery.event.simulate( "change", this, event, true ); + } + }); + } + return false; + } + // Delegated event; lazy-add a change handler on descendant inputs + jQuery.event.add( this, "beforeactivate._change", function( e ) { + var elem = e.target; + + if ( rformElems.test( elem.nodeName ) && !elem._change_attached ) { + jQuery.event.add( elem, "change._change", function( event ) { + if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { + jQuery.event.simulate( "change", this.parentNode, event, true ); + } + }); + elem._change_attached = true; + } + }); + }, + + handle: function( event ) { + var elem = event.target; + + // Swallow native change events from checkbox/radio, we already triggered them above + if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { + return event.handleObj.handler.apply( this, arguments ); + } + }, + + teardown: function() { + jQuery.event.remove( this, "._change" ); + + return rformElems.test( this.nodeName ); + } + }; +} + +// Create "bubbling" focus and blur events +if ( !jQuery.support.focusinBubbles ) { + jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { + + // Attach a single capturing handler while someone wants focusin/focusout + var attaches = 0, + handler = function( event ) { + jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); + }; + + jQuery.event.special[ fix ] = { + setup: function() { + if ( attaches++ === 0 ) { + document.addEventListener( orig, handler, true ); + } + }, + teardown: function() { + if ( --attaches === 0 ) { + document.removeEventListener( orig, handler, true ); + } + } + }; + }); +} + +jQuery.fn.extend({ + + on: function( types, selector, data, fn, /*INTERNAL*/ one ) { + var origFn, type; + + // Types can be a map of types/handlers + if ( typeof types === "object" ) { + // ( types-Object, selector, data ) + if ( typeof selector !== "string" ) { // && selector != null + // ( types-Object, data ) + data = data || selector; + selector = undefined; + } + for ( type in types ) { + this.on( type, selector, data, types[ type ], one ); + } + return this; + } + + if ( data == null && fn == null ) { + // ( types, fn ) + fn = selector; + data = selector = undefined; + } else if ( fn == null ) { + if ( typeof selector === "string" ) { + // ( types, selector, fn ) + fn = data; + data = undefined; + } else { + // ( types, data, fn ) + fn = data; + data = selector; + selector = undefined; + } + } + if ( fn === false ) { + fn = returnFalse; + } else if ( !fn ) { + return this; + } + + if ( one === 1 ) { + origFn = fn; + fn = function( event ) { + // Can use an empty set, since event contains the info + jQuery().off( event ); + return origFn.apply( this, arguments ); + }; + // Use same guid so caller can remove using origFn + fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); + } + return this.each( function() { + jQuery.event.add( this, types, fn, data, selector ); + }); + }, + one: function( types, selector, data, fn ) { + return this.on( types, selector, data, fn, 1 ); + }, + off: function( types, selector, fn ) { + if ( types && types.preventDefault && types.handleObj ) { + // ( event ) dispatched jQuery.Event + var handleObj = types.handleObj; + jQuery( types.delegateTarget ).off( + handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, + handleObj.selector, + handleObj.handler + ); + return this; + } + if ( typeof types === "object" ) { + // ( types-object [, selector] ) + for ( var type in types ) { + this.off( type, selector, types[ type ] ); + } + return this; + } + if ( selector === false || typeof selector === "function" ) { + // ( types [, fn] ) + fn = selector; + selector = undefined; + } + if ( fn === false ) { + fn = returnFalse; + } + return this.each(function() { + jQuery.event.remove( this, types, fn, selector ); + }); + }, + + bind: function( types, data, fn ) { + return this.on( types, null, data, fn ); + }, + unbind: function( types, fn ) { + return this.off( types, null, fn ); + }, + + live: function( types, data, fn ) { + jQuery( this.context ).on( types, this.selector, data, fn ); + return this; + }, + die: function( types, fn ) { + jQuery( this.context ).off( types, this.selector || "**", fn ); + return this; + }, + + delegate: function( selector, types, data, fn ) { + return this.on( types, selector, data, fn ); + }, + undelegate: function( selector, types, fn ) { + // ( namespace ) or ( selector, types [, fn] ) + return arguments.length == 1? this.off( selector, "**" ) : this.off( types, selector, fn ); + }, + + trigger: function( type, data ) { + return this.each(function() { + jQuery.event.trigger( type, data, this ); + }); + }, + triggerHandler: function( type, data ) { + if ( this[0] ) { + return jQuery.event.trigger( type, data, this[0], true ); + } + }, + + toggle: function( fn ) { + // Save reference to arguments for access in closure + var args = arguments, + guid = fn.guid || jQuery.guid++, + i = 0, + toggler = function( event ) { + // Figure out which function to execute + var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i; + jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 ); + + // Make sure that clicks stop + event.preventDefault(); + + // and execute the function + return args[ lastToggle ].apply( this, arguments ) || false; + }; + + // link all the functions, so any of them can unbind this click handler + toggler.guid = guid; + while ( i < args.length ) { + args[ i++ ].guid = guid; + } + + return this.click( toggler ); + }, + + hover: function( fnOver, fnOut ) { + return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); + } +}); + +jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + + "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) { + + // Handle event binding + jQuery.fn[ name ] = function( data, fn ) { + if ( fn == null ) { + fn = data; + data = null; + } + + return arguments.length > 0 ? + this.on( name, null, data, fn ) : + this.trigger( name ); + }; + + if ( jQuery.attrFn ) { + jQuery.attrFn[ name ] = true; + } + + if ( rkeyEvent.test( name ) ) { + jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks; + } + + if ( rmouseEvent.test( name ) ) { + jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks; + } +}); + + + +/*! + * Sizzle CSS Selector Engine + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * More information: http://sizzlejs.com/ + */ +(function(){ + +var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, + expando = "sizcache" + (Math.random() + '').replace('.', ''), + done = 0, + toString = Object.prototype.toString, + hasDuplicate = false, + baseHasDuplicate = true, + rBackslash = /\\/g, + rReturn = /\r\n/g, + rNonWord = /\W/; + +// Here we check if the JavaScript engine is using some sort of +// optimization where it does not always call our comparision +// function. If that is the case, discard the hasDuplicate value. +// Thus far that includes Google Chrome. +[0, 0].sort(function() { + baseHasDuplicate = false; + return 0; +}); + +var Sizzle = function( selector, context, results, seed ) { + results = results || []; + context = context || document; + + var origContext = context; + + if ( context.nodeType !== 1 && context.nodeType !== 9 ) { + return []; + } + + if ( !selector || typeof selector !== "string" ) { + return results; + } + + var m, set, checkSet, extra, ret, cur, pop, i, + prune = true, + contextXML = Sizzle.isXML( context ), + parts = [], + soFar = selector; + + // Reset the position of the chunker regexp (start from head) + do { + chunker.exec( "" ); + m = chunker.exec( soFar ); + + if ( m ) { + soFar = m[3]; + + parts.push( m[1] ); + + if ( m[2] ) { + extra = m[3]; + break; + } + } + } while ( m ); + + if ( parts.length > 1 && origPOS.exec( selector ) ) { + + if ( parts.length === 2 && Expr.relative[ parts[0] ] ) { + set = posProcess( parts[0] + parts[1], context, seed ); + + } else { + set = Expr.relative[ parts[0] ] ? + [ context ] : + Sizzle( parts.shift(), context ); + + while ( parts.length ) { + selector = parts.shift(); + + if ( Expr.relative[ selector ] ) { + selector += parts.shift(); + } + + set = posProcess( selector, set, seed ); + } + } + + } else { + // Take a shortcut and set the context if the root selector is an ID + // (but not if it'll be faster if the inner selector is an ID) + if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML && + Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) { + + ret = Sizzle.find( parts.shift(), context, contextXML ); + context = ret.expr ? + Sizzle.filter( ret.expr, ret.set )[0] : + ret.set[0]; + } + + if ( context ) { + ret = seed ? + { expr: parts.pop(), set: makeArray(seed) } : + Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML ); + + set = ret.expr ? + Sizzle.filter( ret.expr, ret.set ) : + ret.set; + + if ( parts.length > 0 ) { + checkSet = makeArray( set ); + + } else { + prune = false; + } + + while ( parts.length ) { + cur = parts.pop(); + pop = cur; + + if ( !Expr.relative[ cur ] ) { + cur = ""; + } else { + pop = parts.pop(); + } + + if ( pop == null ) { + pop = context; + } + + Expr.relative[ cur ]( checkSet, pop, contextXML ); + } + + } else { + checkSet = parts = []; + } + } + + if ( !checkSet ) { + checkSet = set; + } + + if ( !checkSet ) { + Sizzle.error( cur || selector ); + } + + if ( toString.call(checkSet) === "[object Array]" ) { + if ( !prune ) { + results.push.apply( results, checkSet ); + + } else if ( context && context.nodeType === 1 ) { + for ( i = 0; checkSet[i] != null; i++ ) { + if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) { + results.push( set[i] ); + } + } + + } else { + for ( i = 0; checkSet[i] != null; i++ ) { + if ( checkSet[i] && checkSet[i].nodeType === 1 ) { + results.push( set[i] ); + } + } + } + + } else { + makeArray( checkSet, results ); + } + + if ( extra ) { + Sizzle( extra, origContext, results, seed ); + Sizzle.uniqueSort( results ); + } + + return results; +}; + +Sizzle.uniqueSort = function( results ) { + if ( sortOrder ) { + hasDuplicate = baseHasDuplicate; + results.sort( sortOrder ); + + if ( hasDuplicate ) { + for ( var i = 1; i < results.length; i++ ) { + if ( results[i] === results[ i - 1 ] ) { + results.splice( i--, 1 ); + } + } + } + } + + return results; +}; + +Sizzle.matches = function( expr, set ) { + return Sizzle( expr, null, null, set ); +}; + +Sizzle.matchesSelector = function( node, expr ) { + return Sizzle( expr, null, null, [node] ).length > 0; +}; + +Sizzle.find = function( expr, context, isXML ) { + var set, i, len, match, type, left; + + if ( !expr ) { + return []; + } + + for ( i = 0, len = Expr.order.length; i < len; i++ ) { + type = Expr.order[i]; + + if ( (match = Expr.leftMatch[ type ].exec( expr )) ) { + left = match[1]; + match.splice( 1, 1 ); + + if ( left.substr( left.length - 1 ) !== "\\" ) { + match[1] = (match[1] || "").replace( rBackslash, "" ); + set = Expr.find[ type ]( match, context, isXML ); + + if ( set != null ) { + expr = expr.replace( Expr.match[ type ], "" ); + break; + } + } + } + } + + if ( !set ) { + set = typeof context.getElementsByTagName !== "undefined" ? + context.getElementsByTagName( "*" ) : + []; + } + + return { set: set, expr: expr }; +}; + +Sizzle.filter = function( expr, set, inplace, not ) { + var match, anyFound, + type, found, item, filter, left, + i, pass, + old = expr, + result = [], + curLoop = set, + isXMLFilter = set && set[0] && Sizzle.isXML( set[0] ); + + while ( expr && set.length ) { + for ( type in Expr.filter ) { + if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) { + filter = Expr.filter[ type ]; + left = match[1]; + + anyFound = false; + + match.splice(1,1); + + if ( left.substr( left.length - 1 ) === "\\" ) { + continue; + } + + if ( curLoop === result ) { + result = []; + } + + if ( Expr.preFilter[ type ] ) { + match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter ); + + if ( !match ) { + anyFound = found = true; + + } else if ( match === true ) { + continue; + } + } + + if ( match ) { + for ( i = 0; (item = curLoop[i]) != null; i++ ) { + if ( item ) { + found = filter( item, match, i, curLoop ); + pass = not ^ found; + + if ( inplace && found != null ) { + if ( pass ) { + anyFound = true; + + } else { + curLoop[i] = false; + } + + } else if ( pass ) { + result.push( item ); + anyFound = true; + } + } + } + } + + if ( found !== undefined ) { + if ( !inplace ) { + curLoop = result; + } + + expr = expr.replace( Expr.match[ type ], "" ); + + if ( !anyFound ) { + return []; + } + + break; + } + } + } + + // Improper expression + if ( expr === old ) { + if ( anyFound == null ) { + Sizzle.error( expr ); + + } else { + break; + } + } + + old = expr; + } + + return curLoop; +}; + +Sizzle.error = function( msg ) { + throw new Error( "Syntax error, unrecognized expression: " + msg ); +}; + +/** + * Utility function for retreiving the text value of an array of DOM nodes + * @param {Array|Element} elem + */ +var getText = Sizzle.getText = function( elem ) { + var i, node, + nodeType = elem.nodeType, + ret = ""; + + if ( nodeType ) { + if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { + // Use textContent || innerText for elements + if ( typeof elem.textContent === 'string' ) { + return elem.textContent; + } else if ( typeof elem.innerText === 'string' ) { + // Replace IE's carriage returns + return elem.innerText.replace( rReturn, '' ); + } else { + // Traverse it's children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling) { + ret += getText( elem ); + } + } + } else if ( nodeType === 3 || nodeType === 4 ) { + return elem.nodeValue; + } + } else { + + // If no nodeType, this is expected to be an array + for ( i = 0; (node = elem[i]); i++ ) { + // Do not traverse comment nodes + if ( node.nodeType !== 8 ) { + ret += getText( node ); + } + } + } + return ret; +}; + +var Expr = Sizzle.selectors = { + order: [ "ID", "NAME", "TAG" ], + + match: { + ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, + CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, + NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/, + ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/, + TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/, + CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/, + POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/, + PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/ + }, + + leftMatch: {}, + + attrMap: { + "class": "className", + "for": "htmlFor" + }, + + attrHandle: { + href: function( elem ) { + return elem.getAttribute( "href" ); + }, + type: function( elem ) { + return elem.getAttribute( "type" ); + } + }, + + relative: { + "+": function(checkSet, part){ + var isPartStr = typeof part === "string", + isTag = isPartStr && !rNonWord.test( part ), + isPartStrNotTag = isPartStr && !isTag; + + if ( isTag ) { + part = part.toLowerCase(); + } + + for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) { + if ( (elem = checkSet[i]) ) { + while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {} + + checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ? + elem || false : + elem === part; + } + } + + if ( isPartStrNotTag ) { + Sizzle.filter( part, checkSet, true ); + } + }, + + ">": function( checkSet, part ) { + var elem, + isPartStr = typeof part === "string", + i = 0, + l = checkSet.length; + + if ( isPartStr && !rNonWord.test( part ) ) { + part = part.toLowerCase(); + + for ( ; i < l; i++ ) { + elem = checkSet[i]; + + if ( elem ) { + var parent = elem.parentNode; + checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false; + } + } + + } else { + for ( ; i < l; i++ ) { + elem = checkSet[i]; + + if ( elem ) { + checkSet[i] = isPartStr ? + elem.parentNode : + elem.parentNode === part; + } + } + + if ( isPartStr ) { + Sizzle.filter( part, checkSet, true ); + } + } + }, + + "": function(checkSet, part, isXML){ + var nodeCheck, + doneName = done++, + checkFn = dirCheck; + + if ( typeof part === "string" && !rNonWord.test( part ) ) { + part = part.toLowerCase(); + nodeCheck = part; + checkFn = dirNodeCheck; + } + + checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML ); + }, + + "~": function( checkSet, part, isXML ) { + var nodeCheck, + doneName = done++, + checkFn = dirCheck; + + if ( typeof part === "string" && !rNonWord.test( part ) ) { + part = part.toLowerCase(); + nodeCheck = part; + checkFn = dirNodeCheck; + } + + checkFn( "previousSibling", part, doneName, checkSet, nodeCheck, isXML ); + } + }, + + find: { + ID: function( match, context, isXML ) { + if ( typeof context.getElementById !== "undefined" && !isXML ) { + var m = context.getElementById(match[1]); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + return m && m.parentNode ? [m] : []; + } + }, + + NAME: function( match, context ) { + if ( typeof context.getElementsByName !== "undefined" ) { + var ret = [], + results = context.getElementsByName( match[1] ); + + for ( var i = 0, l = results.length; i < l; i++ ) { + if ( results[i].getAttribute("name") === match[1] ) { + ret.push( results[i] ); + } + } + + return ret.length === 0 ? null : ret; + } + }, + + TAG: function( match, context ) { + if ( typeof context.getElementsByTagName !== "undefined" ) { + return context.getElementsByTagName( match[1] ); + } + } + }, + preFilter: { + CLASS: function( match, curLoop, inplace, result, not, isXML ) { + match = " " + match[1].replace( rBackslash, "" ) + " "; + + if ( isXML ) { + return match; + } + + for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) { + if ( elem ) { + if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n\r]/g, " ").indexOf(match) >= 0) ) { + if ( !inplace ) { + result.push( elem ); + } + + } else if ( inplace ) { + curLoop[i] = false; + } + } + } + + return false; + }, + + ID: function( match ) { + return match[1].replace( rBackslash, "" ); + }, + + TAG: function( match, curLoop ) { + return match[1].replace( rBackslash, "" ).toLowerCase(); + }, + + CHILD: function( match ) { + if ( match[1] === "nth" ) { + if ( !match[2] ) { + Sizzle.error( match[0] ); + } + + match[2] = match[2].replace(/^\+|\s*/g, ''); + + // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6' + var test = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec( + match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" || + !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]); + + // calculate the numbers (first)n+(last) including if they are negative + match[2] = (test[1] + (test[2] || 1)) - 0; + match[3] = test[3] - 0; + } + else if ( match[2] ) { + Sizzle.error( match[0] ); + } + + // TODO: Move to normal caching system + match[0] = done++; + + return match; + }, + + ATTR: function( match, curLoop, inplace, result, not, isXML ) { + var name = match[1] = match[1].replace( rBackslash, "" ); + + if ( !isXML && Expr.attrMap[name] ) { + match[1] = Expr.attrMap[name]; + } + + // Handle if an un-quoted value was used + match[4] = ( match[4] || match[5] || "" ).replace( rBackslash, "" ); + + if ( match[2] === "~=" ) { + match[4] = " " + match[4] + " "; + } + + return match; + }, + + PSEUDO: function( match, curLoop, inplace, result, not ) { + if ( match[1] === "not" ) { + // If we're dealing with a complex expression, or a simple one + if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) { + match[3] = Sizzle(match[3], null, null, curLoop); + + } else { + var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not); + + if ( !inplace ) { + result.push.apply( result, ret ); + } + + return false; + } + + } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) { + return true; + } + + return match; + }, + + POS: function( match ) { + match.unshift( true ); + + return match; + } + }, + + filters: { + enabled: function( elem ) { + return elem.disabled === false && elem.type !== "hidden"; + }, + + disabled: function( elem ) { + return elem.disabled === true; + }, + + checked: function( elem ) { + return elem.checked === true; + }, + + selected: function( elem ) { + // Accessing this property makes selected-by-default + // options in Safari work properly + if ( elem.parentNode ) { + elem.parentNode.selectedIndex; + } + + return elem.selected === true; + }, + + parent: function( elem ) { + return !!elem.firstChild; + }, + + empty: function( elem ) { + return !elem.firstChild; + }, + + has: function( elem, i, match ) { + return !!Sizzle( match[3], elem ).length; + }, + + header: function( elem ) { + return (/h\d/i).test( elem.nodeName ); + }, + + text: function( elem ) { + var attr = elem.getAttribute( "type" ), type = elem.type; + // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) + // use getAttribute instead to test this case + return elem.nodeName.toLowerCase() === "input" && "text" === type && ( attr === type || attr === null ); + }, + + radio: function( elem ) { + return elem.nodeName.toLowerCase() === "input" && "radio" === elem.type; + }, + + checkbox: function( elem ) { + return elem.nodeName.toLowerCase() === "input" && "checkbox" === elem.type; + }, + + file: function( elem ) { + return elem.nodeName.toLowerCase() === "input" && "file" === elem.type; + }, + + password: function( elem ) { + return elem.nodeName.toLowerCase() === "input" && "password" === elem.type; + }, + + submit: function( elem ) { + var name = elem.nodeName.toLowerCase(); + return (name === "input" || name === "button") && "submit" === elem.type; + }, + + image: function( elem ) { + return elem.nodeName.toLowerCase() === "input" && "image" === elem.type; + }, + + reset: function( elem ) { + var name = elem.nodeName.toLowerCase(); + return (name === "input" || name === "button") && "reset" === elem.type; + }, + + button: function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && "button" === elem.type || name === "button"; + }, + + input: function( elem ) { + return (/input|select|textarea|button/i).test( elem.nodeName ); + }, + + focus: function( elem ) { + return elem === elem.ownerDocument.activeElement; + } + }, + setFilters: { + first: function( elem, i ) { + return i === 0; + }, + + last: function( elem, i, match, array ) { + return i === array.length - 1; + }, + + even: function( elem, i ) { + return i % 2 === 0; + }, + + odd: function( elem, i ) { + return i % 2 === 1; + }, + + lt: function( elem, i, match ) { + return i < match[3] - 0; + }, + + gt: function( elem, i, match ) { + return i > match[3] - 0; + }, + + nth: function( elem, i, match ) { + return match[3] - 0 === i; + }, + + eq: function( elem, i, match ) { + return match[3] - 0 === i; + } + }, + filter: { + PSEUDO: function( elem, match, i, array ) { + var name = match[1], + filter = Expr.filters[ name ]; + + if ( filter ) { + return filter( elem, i, match, array ); + + } else if ( name === "contains" ) { + return (elem.textContent || elem.innerText || getText([ elem ]) || "").indexOf(match[3]) >= 0; + + } else if ( name === "not" ) { + var not = match[3]; + + for ( var j = 0, l = not.length; j < l; j++ ) { + if ( not[j] === elem ) { + return false; + } + } + + return true; + + } else { + Sizzle.error( name ); + } + }, + + CHILD: function( elem, match ) { + var first, last, + doneName, parent, cache, + count, diff, + type = match[1], + node = elem; + + switch ( type ) { + case "only": + case "first": + while ( (node = node.previousSibling) ) { + if ( node.nodeType === 1 ) { + return false; + } + } + + if ( type === "first" ) { + return true; + } + + node = elem; + + /* falls through */ + case "last": + while ( (node = node.nextSibling) ) { + if ( node.nodeType === 1 ) { + return false; + } + } + + return true; + + case "nth": + first = match[2]; + last = match[3]; + + if ( first === 1 && last === 0 ) { + return true; + } + + doneName = match[0]; + parent = elem.parentNode; + + if ( parent && (parent[ expando ] !== doneName || !elem.nodeIndex) ) { + count = 0; + + for ( node = parent.firstChild; node; node = node.nextSibling ) { + if ( node.nodeType === 1 ) { + node.nodeIndex = ++count; + } + } + + parent[ expando ] = doneName; + } + + diff = elem.nodeIndex - last; + + if ( first === 0 ) { + return diff === 0; + + } else { + return ( diff % first === 0 && diff / first >= 0 ); + } + } + }, + + ID: function( elem, match ) { + return elem.nodeType === 1 && elem.getAttribute("id") === match; + }, + + TAG: function( elem, match ) { + return (match === "*" && elem.nodeType === 1) || !!elem.nodeName && elem.nodeName.toLowerCase() === match; + }, + + CLASS: function( elem, match ) { + return (" " + (elem.className || elem.getAttribute("class")) + " ") + .indexOf( match ) > -1; + }, + + ATTR: function( elem, match ) { + var name = match[1], + result = Sizzle.attr ? + Sizzle.attr( elem, name ) : + Expr.attrHandle[ name ] ? + Expr.attrHandle[ name ]( elem ) : + elem[ name ] != null ? + elem[ name ] : + elem.getAttribute( name ), + value = result + "", + type = match[2], + check = match[4]; + + return result == null ? + type === "!=" : + !type && Sizzle.attr ? + result != null : + type === "=" ? + value === check : + type === "*=" ? + value.indexOf(check) >= 0 : + type === "~=" ? + (" " + value + " ").indexOf(check) >= 0 : + !check ? + value && result !== false : + type === "!=" ? + value !== check : + type === "^=" ? + value.indexOf(check) === 0 : + type === "$=" ? + value.substr(value.length - check.length) === check : + type === "|=" ? + value === check || value.substr(0, check.length + 1) === check + "-" : + false; + }, + + POS: function( elem, match, i, array ) { + var name = match[2], + filter = Expr.setFilters[ name ]; + + if ( filter ) { + return filter( elem, i, match, array ); + } + } + } +}; + +var origPOS = Expr.match.POS, + fescape = function(all, num){ + return "\\" + (num - 0 + 1); + }; + +for ( var type in Expr.match ) { + Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) ); + Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) ); +} +// Expose origPOS +// "global" as in regardless of relation to brackets/parens +Expr.match.globalPOS = origPOS; + +var makeArray = function( array, results ) { + array = Array.prototype.slice.call( array, 0 ); + + if ( results ) { + results.push.apply( results, array ); + return results; + } + + return array; +}; + +// Perform a simple check to determine if the browser is capable of +// converting a NodeList to an array using builtin methods. +// Also verifies that the returned array holds DOM nodes +// (which is not the case in the Blackberry browser) +try { + Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType; + +// Provide a fallback method if it does not work +} catch( e ) { + makeArray = function( array, results ) { + var i = 0, + ret = results || []; + + if ( toString.call(array) === "[object Array]" ) { + Array.prototype.push.apply( ret, array ); + + } else { + if ( typeof array.length === "number" ) { + for ( var l = array.length; i < l; i++ ) { + ret.push( array[i] ); + } + + } else { + for ( ; array[i]; i++ ) { + ret.push( array[i] ); + } + } + } + + return ret; + }; +} + +var sortOrder, siblingCheck; + +if ( document.documentElement.compareDocumentPosition ) { + sortOrder = function( a, b ) { + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) { + return a.compareDocumentPosition ? -1 : 1; + } + + return a.compareDocumentPosition(b) & 4 ? -1 : 1; + }; + +} else { + sortOrder = function( a, b ) { + // The nodes are identical, we can exit early + if ( a === b ) { + hasDuplicate = true; + return 0; + + // Fallback to using sourceIndex (in IE) if it's available on both nodes + } else if ( a.sourceIndex && b.sourceIndex ) { + return a.sourceIndex - b.sourceIndex; + } + + var al, bl, + ap = [], + bp = [], + aup = a.parentNode, + bup = b.parentNode, + cur = aup; + + // If the nodes are siblings (or identical) we can do a quick check + if ( aup === bup ) { + return siblingCheck( a, b ); + + // If no parents were found then the nodes are disconnected + } else if ( !aup ) { + return -1; + + } else if ( !bup ) { + return 1; + } + + // Otherwise they're somewhere else in the tree so we need + // to build up a full list of the parentNodes for comparison + while ( cur ) { + ap.unshift( cur ); + cur = cur.parentNode; + } + + cur = bup; + + while ( cur ) { + bp.unshift( cur ); + cur = cur.parentNode; + } + + al = ap.length; + bl = bp.length; + + // Start walking down the tree looking for a discrepancy + for ( var i = 0; i < al && i < bl; i++ ) { + if ( ap[i] !== bp[i] ) { + return siblingCheck( ap[i], bp[i] ); + } + } + + // We ended someplace up the tree so do a sibling check + return i === al ? + siblingCheck( a, bp[i], -1 ) : + siblingCheck( ap[i], b, 1 ); + }; + + siblingCheck = function( a, b, ret ) { + if ( a === b ) { + return ret; + } + + var cur = a.nextSibling; + + while ( cur ) { + if ( cur === b ) { + return -1; + } + + cur = cur.nextSibling; + } + + return 1; + }; +} + +// Check to see if the browser returns elements by name when +// querying by getElementById (and provide a workaround) +(function(){ + // We're going to inject a fake input element with a specified name + var form = document.createElement("div"), + id = "script" + (new Date()).getTime(), + root = document.documentElement; + + form.innerHTML = ""; + + // Inject it into the root element, check its status, and remove it quickly + root.insertBefore( form, root.firstChild ); + + // The workaround has to do additional checks after a getElementById + // Which slows things down for other browsers (hence the branching) + if ( document.getElementById( id ) ) { + Expr.find.ID = function( match, context, isXML ) { + if ( typeof context.getElementById !== "undefined" && !isXML ) { + var m = context.getElementById(match[1]); + + return m ? + m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? + [m] : + undefined : + []; + } + }; + + Expr.filter.ID = function( elem, match ) { + var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); + + return elem.nodeType === 1 && node && node.nodeValue === match; + }; + } + + root.removeChild( form ); + + // release memory in IE + root = form = null; +})(); + +(function(){ + // Check to see if the browser returns only elements + // when doing getElementsByTagName("*") + + // Create a fake element + var div = document.createElement("div"); + div.appendChild( document.createComment("") ); + + // Make sure no comments are found + if ( div.getElementsByTagName("*").length > 0 ) { + Expr.find.TAG = function( match, context ) { + var results = context.getElementsByTagName( match[1] ); + + // Filter out possible comments + if ( match[1] === "*" ) { + var tmp = []; + + for ( var i = 0; results[i]; i++ ) { + if ( results[i].nodeType === 1 ) { + tmp.push( results[i] ); + } + } + + results = tmp; + } + + return results; + }; + } + + // Check to see if an attribute returns normalized href attributes + div.innerHTML = ""; + + if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" && + div.firstChild.getAttribute("href") !== "#" ) { + + Expr.attrHandle.href = function( elem ) { + return elem.getAttribute( "href", 2 ); + }; + } + + // release memory in IE + div = null; +})(); + +if ( document.querySelectorAll ) { + (function(){ + var oldSizzle = Sizzle, + div = document.createElement("div"), + id = "__sizzle__"; + + div.innerHTML = "

"; + + // Safari can't handle uppercase or unicode characters when + // in quirks mode. + if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) { + return; + } + + Sizzle = function( query, context, extra, seed ) { + context = context || document; + + // Only use querySelectorAll on non-XML documents + // (ID selectors don't work in non-HTML documents) + if ( !seed && !Sizzle.isXML(context) ) { + // See if we find a selector to speed up + var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query ); + + if ( match && (context.nodeType === 1 || context.nodeType === 9) ) { + // Speed-up: Sizzle("TAG") + if ( match[1] ) { + return makeArray( context.getElementsByTagName( query ), extra ); + + // Speed-up: Sizzle(".CLASS") + } else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) { + return makeArray( context.getElementsByClassName( match[2] ), extra ); + } + } + + if ( context.nodeType === 9 ) { + // Speed-up: Sizzle("body") + // The body element only exists once, optimize finding it + if ( query === "body" && context.body ) { + return makeArray( [ context.body ], extra ); + + // Speed-up: Sizzle("#ID") + } else if ( match && match[3] ) { + var elem = context.getElementById( match[3] ); + + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Handle the case where IE and Opera return items + // by name instead of ID + if ( elem.id === match[3] ) { + return makeArray( [ elem ], extra ); + } + + } else { + return makeArray( [], extra ); + } + } + + try { + return makeArray( context.querySelectorAll(query), extra ); + } catch(qsaError) {} + + // qSA works strangely on Element-rooted queries + // We can work around this by specifying an extra ID on the root + // and working up from there (Thanks to Andrew Dupont for the technique) + // IE 8 doesn't work on object elements + } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { + var oldContext = context, + old = context.getAttribute( "id" ), + nid = old || id, + hasParent = context.parentNode, + relativeHierarchySelector = /^\s*[+~]/.test( query ); + + if ( !old ) { + context.setAttribute( "id", nid ); + } else { + nid = nid.replace( /'/g, "\\$&" ); + } + if ( relativeHierarchySelector && hasParent ) { + context = context.parentNode; + } + + try { + if ( !relativeHierarchySelector || hasParent ) { + return makeArray( context.querySelectorAll( "[id='" + nid + "'] " + query ), extra ); + } + + } catch(pseudoError) { + } finally { + if ( !old ) { + oldContext.removeAttribute( "id" ); + } + } + } + } + + return oldSizzle(query, context, extra, seed); + }; + + for ( var prop in oldSizzle ) { + Sizzle[ prop ] = oldSizzle[ prop ]; + } + + // release memory in IE + div = null; + })(); +} + +(function(){ + var html = document.documentElement, + matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector; + + if ( matches ) { + // Check to see if it's possible to do matchesSelector + // on a disconnected node (IE 9 fails this) + var disconnectedMatch = !matches.call( document.createElement( "div" ), "div" ), + pseudoWorks = false; + + try { + // This should fail with an exception + // Gecko does not error, returns false instead + matches.call( document.documentElement, "[test!='']:sizzle" ); + + } catch( pseudoError ) { + pseudoWorks = true; + } + + Sizzle.matchesSelector = function( node, expr ) { + // Make sure that attribute selectors are quoted + expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']"); + + if ( !Sizzle.isXML( node ) ) { + try { + if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) { + var ret = matches.call( node, expr ); + + // IE 9's matchesSelector returns false on disconnected nodes + if ( ret || !disconnectedMatch || + // As well, disconnected nodes are said to be in a document + // fragment in IE 9, so check for that + node.document && node.document.nodeType !== 11 ) { + return ret; + } + } + } catch(e) {} + } + + return Sizzle(expr, null, null, [node]).length > 0; + }; + } +})(); + +(function(){ + var div = document.createElement("div"); + + div.innerHTML = "
"; + + // Opera can't find a second classname (in 9.6) + // Also, make sure that getElementsByClassName actually exists + if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) { + return; + } + + // Safari caches class attributes, doesn't catch changes (in 3.2) + div.lastChild.className = "e"; + + if ( div.getElementsByClassName("e").length === 1 ) { + return; + } + + Expr.order.splice(1, 0, "CLASS"); + Expr.find.CLASS = function( match, context, isXML ) { + if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) { + return context.getElementsByClassName(match[1]); + } + }; + + // release memory in IE + div = null; +})(); + +function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { + for ( var i = 0, l = checkSet.length; i < l; i++ ) { + var elem = checkSet[i]; + + if ( elem ) { + var match = false; + + elem = elem[dir]; + + while ( elem ) { + if ( elem[ expando ] === doneName ) { + match = checkSet[elem.sizset]; + break; + } + + if ( elem.nodeType === 1 && !isXML ){ + elem[ expando ] = doneName; + elem.sizset = i; + } + + if ( elem.nodeName.toLowerCase() === cur ) { + match = elem; + break; + } + + elem = elem[dir]; + } + + checkSet[i] = match; + } + } +} + +function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { + for ( var i = 0, l = checkSet.length; i < l; i++ ) { + var elem = checkSet[i]; + + if ( elem ) { + var match = false; + + elem = elem[dir]; + + while ( elem ) { + if ( elem[ expando ] === doneName ) { + match = checkSet[elem.sizset]; + break; + } + + if ( elem.nodeType === 1 ) { + if ( !isXML ) { + elem[ expando ] = doneName; + elem.sizset = i; + } + + if ( typeof cur !== "string" ) { + if ( elem === cur ) { + match = true; + break; + } + + } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) { + match = elem; + break; + } + } + + elem = elem[dir]; + } + + checkSet[i] = match; + } + } +} + +if ( document.documentElement.contains ) { + Sizzle.contains = function( a, b ) { + return a !== b && (a.contains ? a.contains(b) : true); + }; + +} else if ( document.documentElement.compareDocumentPosition ) { + Sizzle.contains = function( a, b ) { + return !!(a.compareDocumentPosition(b) & 16); + }; + +} else { + Sizzle.contains = function() { + return false; + }; +} + +Sizzle.isXML = function( elem ) { + // documentElement is verified for cases where it doesn't yet exist + // (such as loading iframes in IE - #4833) + var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement; + + return documentElement ? documentElement.nodeName !== "HTML" : false; +}; + +var posProcess = function( selector, context, seed ) { + var match, + tmpSet = [], + later = "", + root = context.nodeType ? [context] : context; + + // Position selectors must be done after the filter + // And so must :not(positional) so we move all PSEUDOs to the end + while ( (match = Expr.match.PSEUDO.exec( selector )) ) { + later += match[0]; + selector = selector.replace( Expr.match.PSEUDO, "" ); + } + + selector = Expr.relative[selector] ? selector + "*" : selector; + + for ( var i = 0, l = root.length; i < l; i++ ) { + Sizzle( selector, root[i], tmpSet, seed ); + } + + return Sizzle.filter( later, tmpSet ); +}; + +// EXPOSE +// Override sizzle attribute retrieval +Sizzle.attr = jQuery.attr; +Sizzle.selectors.attrMap = {}; +jQuery.find = Sizzle; +jQuery.expr = Sizzle.selectors; +jQuery.expr[":"] = jQuery.expr.filters; +jQuery.unique = Sizzle.uniqueSort; +jQuery.text = Sizzle.getText; +jQuery.isXMLDoc = Sizzle.isXML; +jQuery.contains = Sizzle.contains; + + +})(); + + +var runtil = /Until$/, + rparentsprev = /^(?:parents|prevUntil|prevAll)/, + // Note: This RegExp should be improved, or likely pulled from Sizzle + rmultiselector = /,/, + isSimple = /^.[^:#\[\.,]*$/, + slice = Array.prototype.slice, + POS = jQuery.expr.match.globalPOS, + // methods guaranteed to produce a unique set when starting from a unique set + guaranteedUnique = { + children: true, + contents: true, + next: true, + prev: true + }; + +jQuery.fn.extend({ + find: function( selector ) { + var self = this, + i, l; + + if ( typeof selector !== "string" ) { + return jQuery( selector ).filter(function() { + for ( i = 0, l = self.length; i < l; i++ ) { + if ( jQuery.contains( self[ i ], this ) ) { + return true; + } + } + }); + } + + var ret = this.pushStack( "", "find", selector ), + length, n, r; + + for ( i = 0, l = this.length; i < l; i++ ) { + length = ret.length; + jQuery.find( selector, this[i], ret ); + + if ( i > 0 ) { + // Make sure that the results are unique + for ( n = length; n < ret.length; n++ ) { + for ( r = 0; r < length; r++ ) { + if ( ret[r] === ret[n] ) { + ret.splice(n--, 1); + break; + } + } + } + } + } + + return ret; + }, + + has: function( target ) { + var targets = jQuery( target ); + return this.filter(function() { + for ( var i = 0, l = targets.length; i < l; i++ ) { + if ( jQuery.contains( this, targets[i] ) ) { + return true; + } + } + }); + }, + + not: function( selector ) { + return this.pushStack( winnow(this, selector, false), "not", selector); + }, + + filter: function( selector ) { + return this.pushStack( winnow(this, selector, true), "filter", selector ); + }, + + is: function( selector ) { + return !!selector && ( + typeof selector === "string" ? + // If this is a positional selector, check membership in the returned set + // so $("p:first").is("p:last") won't return true for a doc with two "p". + POS.test( selector ) ? + jQuery( selector, this.context ).index( this[0] ) >= 0 : + jQuery.filter( selector, this ).length > 0 : + this.filter( selector ).length > 0 ); + }, + + closest: function( selectors, context ) { + var ret = [], i, l, cur = this[0]; + + // Array (deprecated as of jQuery 1.7) + if ( jQuery.isArray( selectors ) ) { + var level = 1; + + while ( cur && cur.ownerDocument && cur !== context ) { + for ( i = 0; i < selectors.length; i++ ) { + + if ( jQuery( cur ).is( selectors[ i ] ) ) { + ret.push({ selector: selectors[ i ], elem: cur, level: level }); + } + } + + cur = cur.parentNode; + level++; + } + + return ret; + } + + // String + var pos = POS.test( selectors ) || typeof selectors !== "string" ? + jQuery( selectors, context || this.context ) : + 0; + + for ( i = 0, l = this.length; i < l; i++ ) { + cur = this[i]; + + while ( cur ) { + if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) { + ret.push( cur ); + break; + + } else { + cur = cur.parentNode; + if ( !cur || !cur.ownerDocument || cur === context || cur.nodeType === 11 ) { + break; + } + } + } + } + + ret = ret.length > 1 ? jQuery.unique( ret ) : ret; + + return this.pushStack( ret, "closest", selectors ); + }, + + // Determine the position of an element within + // the matched set of elements + index: function( elem ) { + + // No argument, return index in parent + if ( !elem ) { + return ( this[0] && this[0].parentNode ) ? this.prevAll().length : -1; + } + + // index in selector + if ( typeof elem === "string" ) { + return jQuery.inArray( this[0], jQuery( elem ) ); + } + + // Locate the position of the desired element + return jQuery.inArray( + // If it receives a jQuery object, the first element is used + elem.jquery ? elem[0] : elem, this ); + }, + + add: function( selector, context ) { + var set = typeof selector === "string" ? + jQuery( selector, context ) : + jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), + all = jQuery.merge( this.get(), set ); + + return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ? + all : + jQuery.unique( all ) ); + }, + + andSelf: function() { + return this.add( this.prevObject ); + } +}); + +// A painfully simple check to see if an element is disconnected +// from a document (should be improved, where feasible). +function isDisconnected( node ) { + return !node || !node.parentNode || node.parentNode.nodeType === 11; +} + +jQuery.each({ + parent: function( elem ) { + var parent = elem.parentNode; + return parent && parent.nodeType !== 11 ? parent : null; + }, + parents: function( elem ) { + return jQuery.dir( elem, "parentNode" ); + }, + parentsUntil: function( elem, i, until ) { + return jQuery.dir( elem, "parentNode", until ); + }, + next: function( elem ) { + return jQuery.nth( elem, 2, "nextSibling" ); + }, + prev: function( elem ) { + return jQuery.nth( elem, 2, "previousSibling" ); + }, + nextAll: function( elem ) { + return jQuery.dir( elem, "nextSibling" ); + }, + prevAll: function( elem ) { + return jQuery.dir( elem, "previousSibling" ); + }, + nextUntil: function( elem, i, until ) { + return jQuery.dir( elem, "nextSibling", until ); + }, + prevUntil: function( elem, i, until ) { + return jQuery.dir( elem, "previousSibling", until ); + }, + siblings: function( elem ) { + return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); + }, + children: function( elem ) { + return jQuery.sibling( elem.firstChild ); + }, + contents: function( elem ) { + return jQuery.nodeName( elem, "iframe" ) ? + elem.contentDocument || elem.contentWindow.document : + jQuery.makeArray( elem.childNodes ); + } +}, function( name, fn ) { + jQuery.fn[ name ] = function( until, selector ) { + var ret = jQuery.map( this, fn, until ); + + if ( !runtil.test( name ) ) { + selector = until; + } + + if ( selector && typeof selector === "string" ) { + ret = jQuery.filter( selector, ret ); + } + + ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret; + + if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) { + ret = ret.reverse(); + } + + return this.pushStack( ret, name, slice.call( arguments ).join(",") ); + }; +}); + +jQuery.extend({ + filter: function( expr, elems, not ) { + if ( not ) { + expr = ":not(" + expr + ")"; + } + + return elems.length === 1 ? + jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] : + jQuery.find.matches(expr, elems); + }, + + dir: function( elem, dir, until ) { + var matched = [], + cur = elem[ dir ]; + + while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { + if ( cur.nodeType === 1 ) { + matched.push( cur ); + } + cur = cur[dir]; + } + return matched; + }, + + nth: function( cur, result, dir, elem ) { + result = result || 1; + var num = 0; + + for ( ; cur; cur = cur[dir] ) { + if ( cur.nodeType === 1 && ++num === result ) { + break; + } + } + + return cur; + }, + + sibling: function( n, elem ) { + var r = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + r.push( n ); + } + } + + return r; + } +}); + +// Implement the identical functionality for filter and not +function winnow( elements, qualifier, keep ) { + + // Can't pass null or undefined to indexOf in Firefox 4 + // Set to 0 to skip string check + qualifier = qualifier || 0; + + if ( jQuery.isFunction( qualifier ) ) { + return jQuery.grep(elements, function( elem, i ) { + var retVal = !!qualifier.call( elem, i, elem ); + return retVal === keep; + }); + + } else if ( qualifier.nodeType ) { + return jQuery.grep(elements, function( elem, i ) { + return ( elem === qualifier ) === keep; + }); + + } else if ( typeof qualifier === "string" ) { + var filtered = jQuery.grep(elements, function( elem ) { + return elem.nodeType === 1; + }); + + if ( isSimple.test( qualifier ) ) { + return jQuery.filter(qualifier, filtered, !keep); + } else { + qualifier = jQuery.filter( qualifier, filtered ); + } + } + + return jQuery.grep(elements, function( elem, i ) { + return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep; + }); +} + + + + +function createSafeFragment( document ) { + var list = nodeNames.split( "|" ), + safeFrag = document.createDocumentFragment(); + + if ( safeFrag.createElement ) { + while ( list.length ) { + safeFrag.createElement( + list.pop() + ); + } + } + return safeFrag; +} + +var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" + + "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", + rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g, + rleadingWhitespace = /^\s+/, + rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig, + rtagName = /<([\w:]+)/, + rtbody = /]", "i"), + // checked="checked" or checked + rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, + rscriptType = /\/(java|ecma)script/i, + rcleanScript = /^\s*", "" ], + legend: [ 1, "
", "
" ], + thead: [ 1, "", "
" ], + tr: [ 2, "", "
" ], + td: [ 3, "", "
" ], + col: [ 2, "", "
" ], + area: [ 1, "", "" ], + _default: [ 0, "", "" ] + }, + safeFragment = createSafeFragment( document ); + +wrapMap.optgroup = wrapMap.option; +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + +// IE can't serialize and + + + + + + + +
+
+ + + + + +
+
+ +
+
+
+
+ + +

Index

+ +
+ A + | B + | C + | D + | E + | F + | G + | H + | I + | J + | K + | L + | M + | N + | O + | P + | Q + | R + | S + | T + | U + | V + | W + | X + +
+

A

+ + + +
+ +
abort (nepi.execution.ec.ExperimentController attribute) +
+ +
+ +
(nepi.execution.ec.FailureManager attribute) +
+ +
+ +
add_edge() (nepi.util.netgraph.NetGraph method) +
+ + +
add_node() (nepi.util.netgraph.NetGraph method) +
+ + +
add_resource_to_slice() (nepi.util.manifoldapi.MANIFOLDAPI method) +
+ +
+ +
(nepi.util.sfaapi.SFAAPI method) +
+ +
+ +
add_resource_to_slice_batch() (nepi.util.sfaapi.SFAAPI method) +
+ + +
add_set_hook() (nepi.resources.omf.application.OMFApplication method) +
+ + +
add_set_hooks() (nepi.resources.linux.interface.LinuxInterface method) +
+ + +
add_slice_nodes() (nepi.resources.planetlab.plcapi.PLCAPI method) +
+ + +
ADHOC (nepi.util.netgraph.TopologyType attribute) +
+ + +
alias_function() (nepi.resources.omf.messages_5_4.MessageHandler method) +
+ + +
ALL (nepi.execution.trace.TraceAttr attribute) +
+ + +
allowed (nepi.execution.attribute.Attribute attribute) +
+ + +
allowed_types (nepi.resources.ns3.ns3wrapper.NS3Wrapper attribute) +
+ + +
AMtoGateway (nepi.resources.omf.omf_resource.ResourceGateway attribute) +
+ + +
annotate_cn_graph() (in module nepi.data.processing.ccn.parser) +
+ +
+ +
(in module nepi.data.processing.ping.parser) +
+ +
+
+ +
annotate_cn_node() (in module nepi.data.processing.ccn.parser) +
+ +
+ +
(in module nepi.data.processing.ping.parser) +
+ +
+ +
annotate_edge() (nepi.util.netgraph.NetGraph method) +
+ + +
annotate_edge_net() (nepi.util.netgraph.NetGraph method) +
+ + +
annotate_node() (nepi.util.netgraph.NetGraph method) +
+ + +
annotate_node_ip() (nepi.util.netgraph.NetGraph method) +
+ + +
api (nepi.resources.planetlab.plcapi.PLCAPI attribute) +
+ +
+ +
(nepi.util.manifoldapi.MANIFOLDAPI attribute) +
+ +
+ +
app_home (nepi.resources.linux.application.LinuxApplication attribute) +
+ + +
app_home() (nepi.resources.linux.ns3.fdudptunnel.LinuxNs3FdUdpTunnel method) +
+ +
+ +
(nepi.resources.linux.tunnel.LinuxTunnel method) +
+ +
+ +
arp (nepi.resources.ns3.ns3node.NS3BaseNode attribute) +
+ + +
ascii_helper_uuid (nepi.resources.ns3.ns3netdevice.NS3BaseNetDevice attribute) +
+ + +
assign_controller() (nepi.resources.planetlab.openvswitch.ovs.PlanetlabOVSSwitch method) +
+ + +
assign_p2p_ips() (nepi.util.netgraph.NetGraph method) +
+ + +
attach() (nepi.util.parallel.WorkerThread method) +
+ + +
Attribute (class in nepi.execution.attribute) +
+ +
+ +

B

+ + + +
+ +
backticks() (in module nepi.util.environ) +
+ + +
BaseOMFClient (class in nepi.resources.omf.omf_client) +
+ + +
bin_dir (nepi.resources.linux.node.LinuxNode attribute) +
+ + +
blacklist_host() (nepi.resources.planetlab.plcapi.PLCAPI method) +
+ + +
blacklist_resource() (nepi.util.sfaapi.SFAAPI method) +
+ +
+ +
blacklisted() (nepi.resources.planetlab.plcapi.PLCAPI method) +
+ +
+ +
(nepi.util.sfaapi.SFAAPI method) +
+ +
+ +
Bool (nepi.execution.attribute.Types attribute) +
+ + +
build() (nepi.resources.linux.application.LinuxApplication method) +
+ + +
build_sfa_rspec() (nepi.util.sfarspec_proc.SfaRSpecProcessing method) +
+ +
+ +

C

+ + + +
+ +
ccn_client_helper_uuid (nepi.resources.ns3.ns3ccndceapplication.NS3BaseCCNDceApplication attribute) +
+ + +
ccn_client_lock (nepi.resources.ns3.ns3ccndceapplication.NS3BaseCCNDceApplication attribute) +
+ + +
ccn_consumers() (in module nepi.data.processing.ccn.parser) +
+ + +
ccn_producers() (in module nepi.data.processing.ccn.parser) +
+ + +
ccnd (nepi.resources.linux.ccn.ccnapplication.LinuxCCNApplication attribute) +
+ +
+ +
(nepi.resources.linux.ccn.ccncontent.LinuxCCNContent attribute) +
+ + +
(nepi.resources.linux.ccn.ccnr.LinuxCCNR attribute) +
+ + +
(nepi.resources.linux.ccn.fibentry.LinuxFIBEntry attribute) +
+ +
+ +
ccnpingserver (nepi.resources.linux.ccn.ccnping.LinuxCCNPing attribute) +
+ + +
ccnr (nepi.resources.linux.ccn.ccncontent.LinuxCCNContent attribute) +
+ + +
channel (nepi.resources.linux.interface.LinuxInterface attribute) +
+ +
+ +
(nepi.resources.ns3.ns3netdevice.NS3BaseNetDevice attribute) +
+ + +
(nepi.resources.ns3.ns3propagationdelaymodel.NS3BasePropagationDelayModel attribute) +
+ + +
(nepi.resources.ns3.ns3propagationlossmodel.NS3BasePropagationLossModel attribute) +
+ + +
(nepi.resources.ns3.ns3wifiphy.NS3BaseWifiPhy attribute) +
+ + +
(nepi.resources.omf.interface.OMFWifiInterface attribute) +
+ +
+ +
ChannelToFreq (nepi.resources.omf.channel.OMFChannel attribute) +
+ + +
check_deploy() (nepi.resources.omf.application.OMFApplication method) +
+ +
+ +
(nepi.resources.omf.interface.OMFWifiInterface method) +
+ +
+ +
check_errors() (nepi.resources.linux.node.LinuxNode method) +
+ + +
check_mailbox() (nepi.resources.omf.omf6_api.OMF6API method) +
+ +
+ +
(nepi.resources.omf.omf6_parser.OMF6Parser method) +
+ + +
(nepi.resources.omf.omf_client.OMFClient method) +
+ +
+ +
check_output() (nepi.resources.linux.node.LinuxNode method) +
+ + +
check_ready() (nepi.resources.omf.omf6_api.OMF6API method) +
+ + +
check_release() (nepi.resources.omf.application.OMFApplication method) +
+ +
+ +
(nepi.resources.omf.interface.OMFWifiInterface method) +
+ +
+ +
check_sliver_ovs() (nepi.resources.planetlab.openvswitch.ovs.PlanetlabOVSSwitch method) +
+ + +
check_start() (nepi.resources.omf.application.OMFApplication method) +
+ + +
check_state_connection() (nepi.resources.linux.gretunnel.LinuxGRETunnel method) +
+ +
+ +
(nepi.resources.linux.ns3.fdudptunnel.LinuxNs3FdUdpTunnel method) +
+ + +
(nepi.resources.linux.tunnel.LinuxTunnel method) +
+ + +
(nepi.resources.linux.udptunnel.LinuxUdpTunnel method) +
+ +
+ +
check_status() (nepi.resources.linux.tap.LinuxTap method) +
+ +
+ +
(nepi.resources.planetlab.openvswitch.ovsport.PlanetlabOVSPort method) +
+ +
+ +
clean_experiment() (nepi.resources.linux.node.LinuxNode method) +
+ + +
clean_home() (nepi.resources.linux.node.LinuxNode method) +
+ + +
clean_processes() (nepi.resources.linux.node.LinuxNode method) +
+ + +
client (nepi.resources.netns.netnsemulation.NetNSEmulation attribute) +
+ +
+ +
(nepi.resources.ns3.ns3simulation.NS3Simulation attribute) +
+ +
+ +
clone_command() (nepi.resources.linux.netns.netnsemulation.LinuxNetNSEmulation method) +
+ + +
close_socket() (in module nepi.resources.ns3.ns3server) +
+ + +
clsinit() (in module nepi.execution.resource) +
+ +
+ +
clsinit_copy() (in module nepi.execution.resource) +
+ + +
Collector (class in nepi.resources.all.collector) +
+ + +
compute_delay_ms() (in module nepi.util.timefuncs) +
+ + +
compute_mean() (in module nepi.util.statfuncs) +
+ + +
conditions (nepi.execution.resource.ResourceManager attribute) +
+ + +
configure() (nepi.execution.resource.ResourceManager method) +
+ +
+ +
(nepi.resources.linux.ccn.fibentry.LinuxFIBEntry method) +
+ + +
(nepi.resources.linux.ns3.ns3simulation.LinuxNS3Simulation method) +
+ + +
(nepi.resources.omf.omf5_api.OMF5API method) +
+ +
+ +
configure_function() (nepi.resources.omf.messages_5_4.MessageHandler method) +
+ +
+ +
(nepi.resources.omf.messages_6.MessageHandler method) +
+ +
+ +
configure_iface() (nepi.resources.omf.interface.OMFWifiInterface method) +
+ + +
configure_ip() (nepi.resources.omf.interface.OMFWifiInterface method) +
+ + +
configure_on_omf5() (nepi.resources.omf.interface.OMFWifiInterface method) +
+ + +
configure_on_omf6() (nepi.resources.omf.interface.OMFWifiInterface method) +
+ + +
connected (nepi.resources.netns.netnsbase.NetNSBase attribute) +
+ +
+ +
(nepi.resources.ns3.ns3base.NS3Base attribute) +
+ +
+ +
connections (nepi.execution.resource.ResourceManager attribute) +
+ + +
Construct (nepi.execution.attribute.Flags attribute) +
+ + +
copy() (nepi.resources.linux.node.LinuxNode method) +
+ + +
CORRUPTFILE (nepi.resources.linux.node.ExitCode attribute) +
+ + +
CREATE (nepi.resources.netns.netnsserver.NetNSWrapperMessage attribute) +
+ +
+ +
(nepi.resources.ns3.ns3server.NS3WrapperMessage attribute) +
+ +
+ +
create() (nepi.execution.resource.ResourceFactory class method) +
+ +
+ +
(nepi.resources.linux.netns.netnsclient.LinuxNetNSClient method) +
+ + +
(nepi.resources.linux.ns3.ns3client.LinuxNS3Client method) +
+ + +
(nepi.resources.netns.netnsclient.NetNSClient method) +
+ + +
(nepi.resources.netns.netnsemulation.NetNSEmulation method) +
+ + +
(nepi.resources.netns.netnswrapper.NetNSWrapper method) +
+ + +
(nepi.resources.ns3.ns3client.NS3Client method) +
+ + +
(nepi.resources.ns3.ns3simulation.NS3Simulation method) +
+ + +
(nepi.resources.ns3.ns3wrapper.NS3Wrapper method) +
+ + +
(nepi.resources.omf.omf_client.OMFClient method) +
+ +
+ +
create_and_enroll_topic() (nepi.resources.omf.omf6_api.OMF6API method) +
+ + +
create_api() (nepi.resources.omf.omf_api_factory.OMFAPIFactory class method) +
+ +
+ +
(nepi.resources.planetlab.plcapi.PLCAPIFactory class method) +
+ +
+ +
create_bridge() (nepi.resources.planetlab.openvswitch.ovs.PlanetlabOVSSwitch method) +
+ + +
create_function() (nepi.resources.omf.messages_6.MessageHandler method) +
+ + +
create_ns3_rms() (in module nepi.resources.ns3.resource_manager_generator) +
+ + +
create_port() (nepi.resources.planetlab.openvswitch.ovsport.PlanetlabOVSPort method) +
+ + +
create_socket() (in module nepi.resources.netns.netnsserver) +
+ + +
Credential (nepi.execution.attribute.Flags attribute) +
+ +
+ +

D

+ + + +
+ +
dce_application_lock (nepi.resources.ns3.ns3dcehelper.NS3DceHelper attribute) +
+ + +
dce_application_uuid (nepi.resources.ns3.ns3dcehelper.NS3DceHelper attribute) +
+ + +
dce_helper (nepi.resources.linux.ns3.ns3simulation.LinuxNS3Simulation attribute) +
+ + +
dce_manager_lock (nepi.resources.ns3.ns3dcehelper.NS3DceHelper attribute) +
+ + +
dce_manager_uuid (nepi.resources.ns3.ns3dcehelper.NS3DceHelper attribute) +
+ + +
dce_repo (nepi.resources.linux.ns3.ns3simulation.LinuxNS3Simulation attribute) +
+ + +
dce_src_location (nepi.resources.linux.ns3.ns3simulation.LinuxNS3Simulation attribute) +
+ + +
dce_version (nepi.resources.linux.ns3.ns3simulation.LinuxNS3Simulation attribute) +
+ + +
dceapplications (nepi.resources.ns3.ns3node.NS3BaseNode attribute) +
+ + +
DEBIAN (nepi.resources.linux.node.OSType attribute) +
+ + +
debug() (nepi.util.logger.Logger method) +
+ + +
debuger (nepi.resources.netns.netnswrapper.NetNSWrapper attribute) +
+ +
+ +
(nepi.resources.ns3.ns3wrapper.NS3Wrapper attribute) +
+ +
+ +
default (nepi.execution.attribute.Attribute attribute) +
+ + +
del_edge_annotation() (nepi.util.netgraph.NetGraph method) +
+ + +
del_node_annotation() (nepi.util.netgraph.NetGraph method) +
+ + +
delete() (nepi.resources.omf.omf5_api.OMF5API method) +
+ +
+ +
(nepi.resources.omf.omf_client.OMFClient method) +
+ +
+ +
delete_slice_node() (nepi.resources.planetlab.plcapi.PLCAPI method) +
+ + +
DEPLOY (nepi.execution.resource.ResourceAction attribute) +
+ + +
deploy() (nepi.execution.ec.ExperimentController method) +
+ +
+ +
(nepi.execution.resource.ResourceManager method) +
+ +
+ +
deploy_with_conditions() (nepi.execution.resource.ResourceManager method) +
+ + +
Design (nepi.execution.attribute.Flags attribute) +
+ + +
destroy() (nepi.util.parallel.ParallelRun method) +
+ + +
device (nepi.resources.linux.route.LinuxRoute attribute) +
+ +
+ +
(nepi.resources.ns3.ns3errormodel.NS3BaseErrorModel attribute) +
+ + +
(nepi.resources.ns3.ns3queue.NS3BaseQueue attribute) +
+ + +
(nepi.resources.ns3.ns3wifimac.NS3BaseWifiMac attribute) +
+ + +
(nepi.resources.ns3.ns3wifiphy.NS3BaseWifiPhy attribute) +
+ + +
(nepi.resources.ns3.ns3wifiremotestationmanager.NS3BaseWifiRemoteStationManager attribute) +
+ +
+ +
device_helper_uuid (nepi.resources.ns3.ns3netdevice.NS3BaseNetDevice attribute) +
+ + +
devices (nepi.resources.ns3.ns3channel.NS3BaseChannel attribute) +
+ +
+ +
(nepi.resources.ns3.ns3node.NS3BaseNode attribute) +
+ + +
(nepi.resources.ns3.ns3pipechanel.NS3BasePipeChannel attribute) +
+ +
+ +
disconnect() (nepi.resources.omf.omf5_api.OMF5API method) +
+ +
+ +
(nepi.resources.omf.omf6_api.OMF6API method) +
+ +
+ +
discover() (nepi.execution.ec.ExperimentController method) +
+ +
+ +
(nepi.execution.resource.ResourceManager method) +
+ +
+ +
discover_time (nepi.execution.resource.ResourceManager attribute) +
+ +
+ +
DISCOVERED (nepi.execution.resource.ResourceState attribute) +
+ + +
do_configure() (nepi.execution.resource.ResourceManager method) +
+ + +
do_connect() (nepi.execution.resource.ResourceManager method) +
+ + +
do_deploy() (nepi.execution.resource.ResourceManager method) +
+ +
+ +
(nepi.resources.all.collector.Collector method) +
+ + +
(nepi.resources.linux.application.LinuxApplication method) +
+ + +
(nepi.resources.linux.ccn.ccnapplication.LinuxCCNApplication method) +
+ + +
(nepi.resources.linux.ccn.ccncat.LinuxCCNCat method) +
+ + +
(nepi.resources.linux.ccn.ccncontent.LinuxCCNContent method) +
+ + +
(nepi.resources.linux.ccn.ccnd.LinuxCCND method) +
+ + +
(nepi.resources.linux.ccn.ccnpeek.LinuxCCNPeek method) +
+ + +
(nepi.resources.linux.ccn.ccnpingserver.LinuxCCNPingServer method) +
+ + +
(nepi.resources.linux.ccn.ccnpoke.LinuxCCNPoke method) +
+ + +
(nepi.resources.linux.ccn.ccnr.LinuxCCNR method) +
+ + +
(nepi.resources.linux.ccn.fibentry.LinuxFIBEntry method) +
+ + +
(nepi.resources.linux.interface.LinuxInterface method) +
+ + +
(nepi.resources.linux.mtr.LinuxMtr method) +
+ + +
(nepi.resources.linux.netns.netnsemulation.LinuxNetNSEmulation method) +
+ + +
(nepi.resources.linux.node.LinuxNode method) +
+ + +
(nepi.resources.linux.nping.LinuxNPing method) +
+ + +
(nepi.resources.linux.ns3.ns3simulation.LinuxNS3Simulation method) +
+ + +
(nepi.resources.linux.ns3.tuntapfdlink.LinuxTunTapFdLink method) +
+ + +
(nepi.resources.linux.ping.LinuxPing method) +
+ + +
(nepi.resources.linux.route.LinuxRoute method) +
+ + +
(nepi.resources.linux.tap.LinuxTap method) +
+ + +
(nepi.resources.linux.tcpdump.LinuxTcpdump method) +
+ + +
(nepi.resources.linux.traceroute.LinuxTraceroute method) +
+ + +
(nepi.resources.linux.tunnel.LinuxTunnel method) +
+ + +
(nepi.resources.linux.udptest.LinuxUdpTest method) +
+ + +
(nepi.resources.netns.netnsbase.NetNSBase method) +
+ + +
(nepi.resources.ns3.ns3base.NS3Base method) +
+ + +
(nepi.resources.omf.application.OMFApplication method) +
+ + +
(nepi.resources.omf.channel.OMFChannel method) +
+ + +
(nepi.resources.omf.interface.OMFWifiInterface method) +
+ + +
(nepi.resources.omf.node.OMFNode method) +
+ + +
(nepi.resources.omf.wilabt_node.WilabtSfaNode method) +
+ + +
(nepi.resources.planetlab.openvswitch.ovs.PlanetlabOVSSwitch method) +
+ + +
(nepi.resources.planetlab.openvswitch.ovsport.PlanetlabOVSPort method) +
+ + +
(nepi.resources.planetlab.vroute.PlanetlabVroute method) +
+ +
+ +
do_disconnect() (nepi.execution.resource.ResourceManager method) +
+ + +
do_discover() (nepi.execution.resource.ResourceManager method) +
+ +
+ +
(nepi.resources.linux.interface.LinuxInterface method) +
+ + +
(nepi.resources.omf.wilabt_node.WilabtSfaNode method) +
+ + +
(nepi.resources.planetlab.node.PlanetlabNode method) +
+ + +
(nepi.resources.planetlab.sfa_node.PlanetlabSfaNode method) +
+ +
+ +
do_fail() (nepi.execution.resource.ResourceManager method) +
+ + +
do_provision() (nepi.execution.resource.ResourceManager method) +
+ +
+ +
(nepi.resources.all.collector.Collector method) +
+ + +
(nepi.resources.linux.application.LinuxApplication method) +
+ + +
(nepi.resources.linux.interface.LinuxInterface method) +
+ + +
(nepi.resources.linux.node.LinuxNode method) +
+ + +
(nepi.resources.linux.tunnel.LinuxTunnel method) +
+ + +
(nepi.resources.netns.netnsbase.NetNSBase method) +
+ + +
(nepi.resources.ns3.ns3base.NS3Base method) +
+ + +
(nepi.resources.omf.wilabt_node.WilabtSfaNode method) +
+ + +
(nepi.resources.planetlab.node.PlanetlabNode method) +
+ + +
(nepi.resources.planetlab.openvswitch.ovs.PlanetlabOVSSwitch method) +
+ + +
(nepi.resources.planetlab.openvswitch.ovsport.PlanetlabOVSPort method) +
+ + +
(nepi.resources.planetlab.sfa_node.PlanetlabSfaNode method) +
+ +
+ +
do_release() (nepi.execution.resource.ResourceManager method) +
+ +
+ +
(nepi.resources.all.collector.Collector method) +
+ + +
(nepi.resources.linux.application.LinuxApplication method) +
+ + +
(nepi.resources.linux.interface.LinuxInterface method) +
+ + +
(nepi.resources.linux.netns.netnsemulation.LinuxNetNSEmulation method) +
+ + +
(nepi.resources.linux.node.LinuxNode method) +
+ + +
(nepi.resources.linux.ns3.ns3simulation.LinuxNS3Simulation method) +
+ + +
(nepi.resources.linux.tap.LinuxTap method) +
+ + +
(nepi.resources.omf.application.OMFApplication method) +
+ + +
(nepi.resources.omf.channel.OMFChannel method) +
+ + +
(nepi.resources.omf.interface.OMFWifiInterface method) +
+ + +
(nepi.resources.omf.node.OMFNode method) +
+ + +
(nepi.resources.omf.wilabt_node.WilabtSfaNode method) +
+ + +
(nepi.resources.planetlab.node.PlanetlabNode method) +
+ + +
(nepi.resources.planetlab.openvswitch.ovs.PlanetlabOVSSwitch method) +
+ + +
(nepi.resources.planetlab.openvswitch.ovsport.PlanetlabOVSPort method) +
+ + +
(nepi.resources.planetlab.sfa_node.PlanetlabSfaNode method) +
+ + +
(nepi.resources.planetlab.vroute.PlanetlabVroute method) +
+ +
+ +
do_reserve() (nepi.execution.resource.ResourceManager method) +
+ + +
do_start() (nepi.execution.resource.ResourceManager method) +
+ +
+ +
(nepi.resources.linux.application.LinuxApplication method) +
+ + +
(nepi.resources.linux.ccn.ccncontent.LinuxCCNContent method) +
+ + +
(nepi.resources.linux.ccn.ccnd.LinuxCCND method) +
+ + +
(nepi.resources.linux.ccn.ccnping.LinuxCCNPing method) +
+ + +
(nepi.resources.linux.ccn.ccnr.LinuxCCNR method) +
+ + +
(nepi.resources.linux.ccn.fibentry.LinuxFIBEntry method) +
+ + +
(nepi.resources.linux.mtr.LinuxMtr method) +
+ + +
(nepi.resources.linux.netns.netnsemulation.LinuxNetNSEmulation method) +
+ + +
(nepi.resources.linux.ns3.ns3simulation.LinuxNS3Simulation method) +
+ + +
(nepi.resources.linux.ns3.tuntapfdlink.LinuxTunTapFdLink method) +
+ + +
(nepi.resources.linux.ping.LinuxPing method) +
+ + +
(nepi.resources.linux.route.LinuxRoute method) +
+ + +
(nepi.resources.linux.tap.LinuxTap method) +
+ + +
(nepi.resources.linux.traceroute.LinuxTraceroute method) +
+ + +
(nepi.resources.linux.tunnel.LinuxTunnel method) +
+ + +
(nepi.resources.linux.udptest.LinuxUdpTest method) +
+ + +
(nepi.resources.netns.netnsapplication.NetNSApplication method) +
+ + +
(nepi.resources.netns.netnsbase.NetNSBase method) +
+ + +
(nepi.resources.ns3.ns3application.NS3BaseApplication method) +
+ + +
(nepi.resources.ns3.ns3base.NS3Base method) +
+ + +
(nepi.resources.ns3.ns3dceapplication.NS3BaseDceApplication method) +
+ + +
(nepi.resources.omf.application.OMFApplication method) +
+ + +
(nepi.resources.planetlab.vroute.PlanetlabVroute method) +
+ +
+ +
do_stop() (nepi.execution.resource.ResourceManager method) +
+ +
+ +
(nepi.resources.linux.application.LinuxApplication method) +
+ + +
(nepi.resources.linux.ccn.ccnd.LinuxCCND method) +
+ + +
(nepi.resources.linux.ccn.fibentry.LinuxFIBEntry method) +
+ + +
(nepi.resources.linux.netns.netnsemulation.LinuxNetNSEmulation method) +
+ + +
(nepi.resources.linux.ns3.ns3simulation.LinuxNS3Simulation method) +
+ + +
(nepi.resources.linux.route.LinuxRoute method) +
+ + +
(nepi.resources.linux.tap.LinuxTap method) +
+ + +
(nepi.resources.linux.tunnel.LinuxTunnel method) +
+ + +
(nepi.resources.netns.netnsbase.NetNSBase method) +
+ + +
(nepi.resources.ns3.ns3application.NS3BaseApplication method) +
+ + +
(nepi.resources.ns3.ns3base.NS3Base method) +
+ + +
(nepi.resources.ns3.ns3dceapplication.NS3BaseDceApplication method) +
+ + +
(nepi.resources.omf.application.OMFApplication method) +
+ + +
(nepi.resources.planetlab.vroute.PlanetlabVroute method) +
+ +
+ +
DONE (nepi.execution.scheduler.TaskStatus attribute) +
+ + +
DOT (nepi.util.plotter.PFormats attribute) +
+ + +
Double (nepi.execution.attribute.Types attribute) +
+ + +
download() (nepi.resources.linux.node.LinuxNode method) +
+ + +
dump_content_history() (in module nepi.data.processing.ccn.parser) +
+ + +
dump_create() (nepi.resources.netns.netnswrapper_debug.NetNSWrapperDebuger method) +
+ +
+ +
(nepi.resources.ns3.ns3wrapper_debug.NS3WrapperDebuger method) +
+ +
+ +
dump_factory() (nepi.resources.netns.netnswrapper_debug.NetNSWrapperDebuger method) +
+ +
+ +
(nepi.resources.ns3.ns3wrapper_debug.NS3WrapperDebuger method) +
+ +
+ +
dump_get() (nepi.resources.netns.netnswrapper_debug.NetNSWrapperDebuger method) +
+ +
+ +
(nepi.resources.ns3.ns3wrapper_debug.NS3WrapperDebuger method) +
+ +
+ +
dump_header() (nepi.resources.netns.netnswrapper_debug.NetNSWrapperDebuger method) +
+ +
+ +
(nepi.resources.ns3.ns3wrapper_debug.NS3WrapperDebuger method) +
+ +
+ +
dump_invoke() (nepi.resources.netns.netnswrapper_debug.NetNSWrapperDebuger method) +
+ +
+ +
(nepi.resources.ns3.ns3wrapper_debug.NS3WrapperDebuger method) +
+ +
+ +
dump_set() (nepi.resources.netns.netnswrapper_debug.NetNSWrapperDebuger method) +
+ +
+ +
(nepi.resources.ns3.ns3wrapper_debug.NS3WrapperDebuger method) +
+ +
+ +
dump_shutdown() (nepi.resources.netns.netnswrapper_debug.NetNSWrapperDebuger method) +
+ +
+ +
(nepi.resources.ns3.ns3wrapper_debug.NS3WrapperDebuger method) +
+ +
+ +
dump_start() (nepi.resources.ns3.ns3wrapper_debug.NS3WrapperDebuger method) +
+ + +
dump_stop() (nepi.resources.ns3.ns3wrapper_debug.NS3WrapperDebuger method) +
+ + +
dump_to_script() (nepi.resources.netns.netnswrapper_debug.NetNSWrapperDebuger method) +
+ +
+ +
(nepi.resources.ns3.ns3wrapper_debug.NS3WrapperDebuger method) +
+ +
+
+ +

E

+ + + +
+ +
ec (nepi.execution.ec.FailureManager attribute) +
+ +
+ +
(nepi.execution.resource.ResourceManager attribute) +
+ +
+ +
EC_FAILURE (nepi.execution.ec.FailureLevel attribute) +
+ + +
ECPlotter (class in nepi.util.plotter) +
+ + +
ECSerializer (class in nepi.util.serializer) +
+ + +
ECState (class in nepi.execution.ec) +
+ + +
ecstate (nepi.execution.ec.ExperimentController attribute) +
+ + +
ECXMLParser (class in nepi.util.parsers.xml_parser) +
+ + +
edge_annotation() (nepi.util.netgraph.NetGraph method) +
+ + +
edge_annotations() (nepi.util.netgraph.NetGraph method) +
+ + +
edge_net_annotation() (nepi.util.netgraph.NetGraph method) +
+ + +
edges() (nepi.util.netgraph.NetGraph method) +
+ + +
eintr_retry() (in module nepi.util.sshfuncs) +
+ + +
empty() (nepi.util.parallel.ParallelRun method) +
+ + +
emu_get() (nepi.resources.netns.netnsemulation.NetNSEmulation method) +
+ + +
emu_set() (nepi.resources.netns.netnsemulation.NetNSEmulation method) +
+ + +
emulation (nepi.resources.linux.netns.netnsclient.LinuxNetNSClient attribute) +
+ +
+ +
(nepi.resources.netns.netnsapplication.NetNSApplication attribute) +
+ + +
(nepi.resources.netns.netnsipv4address.NetNSIPv4Address attribute) +
+ + +
(nepi.resources.netns.netnsnode.NetNSNode attribute) +
+ + +
(nepi.resources.netns.netnsnodeinterface.NetNSNodeInterface attribute) +
+ + +
(nepi.resources.netns.netnsroute.NetNSIPv4Route attribute) +
+ + +
(nepi.resources.netns.netnsswitch.NetNSSwitch attribute) +
+ +
+ +
enable_dce (nepi.resources.linux.ns3.ns3simulation.LinuxNS3Simulation attribute) +
+ + +
enable_trace() (nepi.execution.ec.ExperimentController method) +
+ +
+ +
(nepi.execution.resource.ResourceManager method) +
+ +
+ +
enabled (nepi.resources.netns.netnswrapper_debug.NetNSWrapperDebuger attribute) +
+ +
+ +
(nepi.resources.ns3.ns3wrapper_debug.NS3WrapperDebuger attribute) +
+ +
+ +
endpoint1 (nepi.resources.linux.ns3.fdudptunnel.LinuxNs3FdUdpTunnel attribute) +
+ +
+ +
(nepi.resources.linux.tunnel.LinuxTunnel attribute) +
+ +
+ +
endpoint2 (nepi.resources.linux.ns3.fdudptunnel.LinuxNs3FdUdpTunnel attribute) +
+ +
+ +
(nepi.resources.linux.tunnel.LinuxTunnel attribute) +
+ +
+ +
endpoint_mkdir() (nepi.resources.linux.ns3.fdudptunnel.LinuxNs3FdUdpTunnel method) +
+ +
+ +
(nepi.resources.linux.tunnel.LinuxTunnel method) +
+ +
+ +
endpoint_node() (nepi.resources.linux.ns3.fdudptunnel.LinuxNs3FdUdpTunnel method) +
+ + +
enroll_function() (nepi.resources.omf.messages_5_4.MessageHandler method) +
+ +
+ +
enroll_host() (nepi.resources.omf.omf5_api.OMF5API method) +
+ + +
enroll_topic() (nepi.resources.omf.omf6_api.OMF6API method) +
+ + +
Enumerate (nepi.execution.attribute.Types attribute) +
+ + +
ERROR (nepi.execution.scheduler.TaskStatus attribute) +
+ +
+ +
(nepi.resources.linux.node.ExitCode attribute) +
+ +
+ +
error() (nepi.util.logger.Logger method) +
+ + +
establish() (nepi.resources.linux.ns3.fdudptunnel.LinuxNs3FdUdpTunnel method) +
+ + +
establish_connection() (nepi.resources.linux.gretunnel.LinuxGRETunnel method) +
+ +
+ +
(nepi.resources.linux.ns3.fdudptunnel.LinuxNs3FdUdpTunnel method) +
+ + +
(nepi.resources.linux.tunnel.LinuxTunnel method) +
+ + +
(nepi.resources.linux.udptunnel.LinuxUdpTunnel method) +
+ +
+ +
establish_udp_connection() (nepi.resources.linux.tap.LinuxTap method) +
+ +
+ +
(nepi.resources.planetlab.openvswitch.ovsport.PlanetlabOVSPort method) +
+ +
+ +
eval_failure() (nepi.execution.ec.FailureManager method) +
+ + +
evaluate_normal_convergence() (nepi.execution.runner.ExperimentRunner method) +
+ + +
execute() (in module nepi.util.environ) +
+ +
+ +
(nepi.resources.linux.node.LinuxNode method) +
+ + +
(nepi.resources.omf.omf5_api.OMF5API method) +
+ + +
(nepi.resources.omf.wilabt_node.WilabtSfaNode method) +
+ +
+ +
execute_command() (nepi.resources.linux.application.LinuxApplication method) +
+ + +
execute_deploy_command() (nepi.resources.linux.application.LinuxApplication method) +
+ + +
execute_function() (nepi.resources.omf.messages_5_4.MessageHandler method) +
+ + +
exit() (nepi.resources.omf.omf5_api.OMF5API method) +
+ + +
exit_function() (nepi.resources.omf.messages_5_4.MessageHandler method) +
+ + +
ExitCode (class in nepi.resources.linux.node) +
+ + +
exitcode() (nepi.resources.linux.node.LinuxNode method) +
+ + +
exp_dir (nepi.execution.ec.ExperimentController attribute) +
+ +
+ +
(nepi.resources.linux.node.LinuxNode attribute) +
+ +
+ +
exp_home (nepi.resources.linux.node.LinuxNode attribute) +
+ + +
exp_id (nepi.execution.ec.ExperimentController attribute) +
+ +
+ +
(nepi.resources.omf.application.OMFApplication attribute) +
+ + +
(nepi.resources.omf.channel.OMFChannel attribute) +
+ + +
(nepi.resources.omf.interface.OMFWifiInterface attribute) +
+ + +
(nepi.resources.omf.node.OMFNode attribute) +
+ +
+ +
ExperimentController (class in nepi.execution.ec) +
+ + +
ExperimentRunner (class in nepi.execution.runner) +
+ +
+ +

F

+ + + +
+ +
FACTORY (nepi.resources.ns3.ns3server.NS3WrapperMessage attribute) +
+ + +
factory() (nepi.resources.linux.ns3.ns3client.LinuxNS3Client method) +
+ +
+ +
(nepi.resources.ns3.ns3client.NS3Client method) +
+ + +
(nepi.resources.ns3.ns3simulation.NS3Simulation method) +
+ + +
(nepi.resources.ns3.ns3wrapper.NS3Wrapper method) +
+ +
+ +
fail() (nepi.execution.resource.ResourceManager method) +
+ + +
fail_discovery() (nepi.resources.omf.wilabt_node.WilabtSfaNode method) +
+ +
+ +
(nepi.resources.planetlab.node.PlanetlabNode method) +
+ + +
(nepi.resources.planetlab.sfa_node.PlanetlabSfaNode method) +
+ +
+ +
fail_node_not_alive() (nepi.resources.omf.wilabt_node.WilabtSfaNode method) +
+ +
+ +
(nepi.resources.planetlab.node.PlanetlabNode method) +
+ + +
(nepi.resources.planetlab.sfa_node.PlanetlabSfaNode method) +
+ +
+ +
fail_node_not_available() (nepi.resources.omf.wilabt_node.WilabtSfaNode method) +
+ +
+ +
(nepi.resources.planetlab.node.PlanetlabNode method) +
+ + +
(nepi.resources.planetlab.sfa_node.PlanetlabSfaNode method) +
+ +
+ +
fail_not_enough_nodes() (nepi.resources.omf.wilabt_node.WilabtSfaNode method) +
+ +
+ +
(nepi.resources.planetlab.node.PlanetlabNode method) +
+ + +
(nepi.resources.planetlab.sfa_node.PlanetlabSfaNode method) +
+ +
+ +
fail_plapi() (nepi.resources.planetlab.node.PlanetlabNode method) +
+ + +
fail_sfaapi() (nepi.resources.omf.wilabt_node.WilabtSfaNode method) +
+ +
+ +
(nepi.resources.planetlab.sfa_node.PlanetlabSfaNode method) +
+ +
+ +
FAILED (nepi.execution.ec.ECState attribute) +
+ +
+ +
(nepi.execution.resource.ResourceState attribute) +
+ +
+ +
failed_time (nepi.execution.resource.ResourceManager attribute) +
+ + +
failtrap() (in module nepi.execution.resource) +
+ + +
failure_level (nepi.execution.ec.ExperimentController attribute) +
+ + +
FailureLevel (class in nepi.execution.ec) +
+ + +
FailureManager (class in nepi.execution.ec) +
+ + +
fdnetdevice (nepi.resources.linux.ns3.tuntapfdlink.LinuxTunTapFdLink attribute) +
+ +
+ +
(nepi.resources.planetlab.ns3.tuntapfdlink.PlanetlabTunTapFdLink attribute) +
+ +
+ +
fdnode (nepi.resources.linux.ns3.tuntapfdlink.LinuxTunTapFdLink attribute) +
+ + +
FEDORA (nepi.resources.linux.node.OSType attribute) +
+ + +
FEDORA_12 (nepi.resources.linux.node.OSType attribute) +
+ + +
FEDORA_14 (nepi.resources.linux.node.OSType attribute) +
+ + +
FEDORA_8 (nepi.resources.linux.node.OSType attribute) +
+ + +
FIGURE (nepi.util.plotter.PFormats attribute) +
+ + +
FILENOTFOUND (nepi.resources.linux.node.ExitCode attribute) +
+ + +
Filter (nepi.execution.attribute.Flags attribute) +
+ +
+ +
filter_existing_files() (nepi.resources.linux.node.LinuxNode method) +
+ + +
filter_resources() (nepi.execution.ec.ExperimentController method) +
+ + +
find_boxes() (in module nepi.util.rmatcher) +
+ + +
find_home() (nepi.resources.linux.node.LinuxNode method) +
+ + +
find_types() (in module nepi.execution.resource) +
+ + +
finish_multicall() (nepi.resources.planetlab.plcapi.PLCAPI method) +
+ + +
FINISHED (nepi.util.sshfuncs.ProcStatus attribute) +
+ + +
Flags (class in nepi.execution.attribute) +
+ + +
flags (nepi.execution.attribute.Attribute attribute) +
+ + +
FLUSH (nepi.resources.netns.netnsserver.NetNSWrapperMessage attribute) +
+ +
+ +
(nepi.resources.ns3.ns3server.NS3WrapperMessage attribute) +
+ +
+ +
flush() (nepi.resources.linux.netns.netnsclient.LinuxNetNSClient method) +
+ +
+ +
(nepi.resources.linux.ns3.ns3client.LinuxNS3Client method) +
+ + +
(nepi.resources.netns.netnsclient.NetNSClient method) +
+ + +
(nepi.resources.netns.netnsemulation.NetNSEmulation method) +
+ + +
(nepi.resources.ns3.ns3client.NS3Client method) +
+ + +
(nepi.resources.ns3.ns3simulation.NS3Simulation method) +
+ +
+ +
fm (nepi.execution.ec.ExperimentController attribute) +
+ + +
format_args() (nepi.resources.netns.netnswrapper_debug.NetNSWrapperDebuger method) +
+ +
+ +
(nepi.resources.ns3.ns3wrapper_debug.NS3WrapperDebuger method) +
+ +
+ +
format_environment() (nepi.resources.linux.node.LinuxNode method) +
+ + +
format_kwargs() (nepi.resources.netns.netnswrapper_debug.NetNSWrapperDebuger method) +
+ +
+ +
(nepi.resources.ns3.ns3wrapper_debug.NS3WrapperDebuger method) +
+ +
+ +
format_value() (nepi.resources.netns.netnswrapper_debug.NetNSWrapperDebuger method) +
+ +
+ +
(nepi.resources.ns3.ns3wrapper_debug.NS3WrapperDebuger method) +
+ +
+ +
frcp_configure() (nepi.resources.omf.omf6_api.OMF6API method) +
+ + +
frcp_create() (nepi.resources.omf.omf6_api.OMF6API method) +
+ + +
frcp_inform() (nepi.resources.omf.omf6_api.OMF6API method) +
+ + +
frcp_release() (nepi.resources.omf.omf6_api.OMF6API method) +
+ + +
frcp_request() (nepi.resources.omf.omf6_api.OMF6API method) +
+ + +
from_type() (in module nepi.util.parsers.xml_parser) +
+ + +
from_xml() (nepi.util.parsers.xml_parser.ECXMLParser method) +
+ +
+ +

G

+ + + +
+ +
generate_topology() (nepi.util.netgraph.NetGraph method) +
+ + +
GET (nepi.resources.netns.netnsserver.NetNSWrapperMessage attribute) +
+ +
+ +
(nepi.resources.ns3.ns3server.NS3WrapperMessage attribute) +
+ +
+ +
get() (nepi.execution.ec.ExperimentController method) +
+ +
+ +
(nepi.execution.resource.ResourceManager method) +
+ + +
(nepi.resources.linux.netns.netnsclient.LinuxNetNSClient method) +
+ + +
(nepi.resources.linux.ns3.ns3client.LinuxNS3Client method) +
+ + +
(nepi.resources.netns.netnsbase.NetNSBase method) +
+ + +
(nepi.resources.netns.netnsclient.NetNSClient method) +
+ + +
(nepi.resources.netns.netnswrapper.NetNSWrapper method) +
+ + +
(nepi.resources.ns3.ns3base.NS3Base method) +
+ + +
(nepi.resources.ns3.ns3client.NS3Client method) +
+ + +
(nepi.resources.ns3.ns3wrapper.NS3Wrapper method) +
+ + +
(nepi.resources.omf.omf_client.OMFClient method) +
+ +
+ +
get_api() (nepi.resources.omf.omf_api_factory.OMFAPIFactory class method) +
+ +
+ +
(nepi.resources.planetlab.plcapi.PLCAPIFactory class method) +
+ + +
(nepi.util.manifoldapi.MANIFOLDAPIFactory class method) +
+ + +
(nepi.util.sfaapi.SFAAPIFactory class method) +
+ +
+ +
get_attribute() (nepi.execution.ec.ExperimentController method) +
+ +
+ +
(nepi.execution.resource.ResourceManager class method) +
+ +
+ +
get_attributes() (nepi.execution.ec.ExperimentController method) +
+ +
+ +
(nepi.execution.resource.ResourceManager class method) +
+ +
+ +
get_connected() (nepi.execution.resource.ResourceManager method) +
+ + +
get_discover_time() (nepi.execution.ec.ExperimentController method) +
+ + +
get_endpoints() (nepi.resources.linux.gretunnel.LinuxGRETunnel method) +
+ +
+ +
(nepi.resources.linux.ns3.fdudptunnel.LinuxNs3FdUdpTunnel method) +
+ + +
(nepi.resources.linux.tunnel.LinuxTunnel method) +
+ + +
(nepi.resources.linux.udptunnel.LinuxUdpTunnel method) +
+ + +
(nepi.resources.planetlab.ns3.fdudptunnel.PlanetlabNs3FdUdpTunnel method) +
+ +
+ +
get_failed_time() (nepi.execution.ec.ExperimentController method) +
+ + +
get_frequency() (nepi.resources.omf.channel.OMFChannel method) +
+ + +
get_global() (nepi.execution.ec.ExperimentController method) +
+ +
+ +
(nepi.execution.resource.ResourceManager class method) +
+ +
+ +
get_help() (nepi.execution.resource.ResourceManager class method) +
+ + +
get_interfaces() (nepi.resources.planetlab.plcapi.PLCAPI method) +
+ + +
get_node_flavour() (nepi.resources.planetlab.plcapi.PLCAPI method) +
+ + +
get_node_info() (nepi.resources.planetlab.plcapi.PLCAPI method) +
+ + +
get_node_tags() (nepi.resources.planetlab.plcapi.PLCAPI method) +
+ + +
get_nodes() (nepi.resources.planetlab.plcapi.PLCAPI method) +
+ + +
get_object() (nepi.resources.netns.netnswrapper.NetNSWrapper method) +
+ +
+ +
(nepi.resources.ns3.ns3wrapper.NS3Wrapper method) +
+ +
+ +
get_options() (in module nepi.resources.netns.netnsserver) +
+ +
+ +
(in module nepi.resources.ns3.ns3server) +
+ +
+ +
get_os() (nepi.resources.linux.node.LinuxNode method) +
+ + +
get_p2p_info() (nepi.util.netgraph.NetGraph method) +
+ + +
get_platform() (nepi.execution.resource.ResourceManager class method) +
+ + +
get_provision_time() (nepi.execution.ec.ExperimentController method) +
+ + +
get_ready_time() (nepi.execution.ec.ExperimentController method) +
+ + +
get_release_time() (nepi.execution.ec.ExperimentController method) +
+ + +
get_resource() (nepi.execution.ec.ExperimentController method) +
+ +
+ +
get_resource_info() (nepi.util.manifoldapi.MANIFOLDAPI method) +
+ + +
get_resource_type() (nepi.execution.resource.ResourceFactory class method) +
+ + +
get_resource_urn() (nepi.util.manifoldapi.MANIFOLDAPI method) +
+ + +
get_resources_by_type() (nepi.execution.ec.ExperimentController method) +
+ + +
get_resources_hrn() (nepi.util.sfaapi.SFAAPI method) +
+ + +
get_resources_info() (nepi.util.sfaapi.SFAAPI method) +
+ + +
get_rtype() (nepi.execution.resource.ResourceManager class method) +
+ + +
get_session_key() (nepi.util.manifoldapi.MANIFOLDAPI method) +
+ + +
get_slice_id() (nepi.resources.planetlab.plcapi.PLCAPI method) +
+ + +
get_slice_nodes() (nepi.resources.planetlab.plcapi.PLCAPI method) +
+ + +
get_slice_resources() (nepi.util.manifoldapi.MANIFOLDAPI method) +
+ +
+ +
(nepi.util.sfaapi.SFAAPI method) +
+ +
+ +
get_slice_tags() (nepi.resources.planetlab.plcapi.PLCAPI method) +
+ + +
get_slice_vnet_sys_tag() (nepi.resources.planetlab.plcapi.PLCAPI method) +
+ + +
get_slices() (nepi.resources.planetlab.plcapi.PLCAPI method) +
+ + +
get_start_time() (nepi.execution.ec.ExperimentController method) +
+ + +
get_stop_time() (nepi.execution.ec.ExperimentController method) +
+ + +
get_task() (nepi.execution.ec.ExperimentController method) +
+ + +
get_traces() (nepi.execution.ec.ExperimentController method) +
+ +
+ +
(nepi.execution.resource.ResourceManager class method) +
+ +
+ +
get_value() (nepi.execution.attribute.Attribute method) +
+ + +
gethostbyname() (in module nepi.util.sshfuncs) +
+ + +
getpid() (nepi.resources.linux.node.LinuxNode method) +
+ + +
Global (nepi.execution.attribute.Flags attribute) +
+ + +
gre_connect() (nepi.resources.linux.tap.LinuxTap method) +
+ +
+ +
(nepi.resources.planetlab.tap.PlanetlabTap method) +
+ +
+ +
gre_enabled (nepi.resources.linux.tap.LinuxTap attribute) +
+ + +
guid (nepi.execution.resource.ResourceManager attribute) +
+ + +
GuidGenerator (class in nepi.util.guid) +
+ +
+ +

H

+ + + +
+ +
handle() (nepi.resources.omf.omf6_parser.OMF6Parser method) +
+ + +
handle_message() (in module nepi.resources.netns.netnsserver) +
+ +
+ +
(in module nepi.resources.ns3.ns3server) +
+ +
+ +
handle_omf_message() (nepi.resources.omf.omf_client.OMFClient method) +
+ + +
has_attribute() (nepi.execution.resource.ResourceManager method) +
+ + +
has_changed (nepi.execution.attribute.Attribute attribute) +
+ +
+ +
has_changed() (nepi.execution.resource.ResourceManager method) +
+ + +
has_flag() (nepi.execution.attribute.Attribute method) +
+ +
+ +
(nepi.execution.resource.ResourceManager method) +
+ +
+ +
HeapScheduler (class in nepi.execution.scheduler) +
+ + +
help (nepi.execution.attribute.Attribute attribute) +
+ +
+ +
(nepi.execution.trace.Trace attribute) +
+ +
+ +
home_dir (nepi.resources.linux.node.LinuxNode attribute) +
+ +
+ +

I

+ + + +
+ +
IFF_TAP (nepi.resources.linux.tap.LinuxTap attribute) +
+ + +
IFF_TUN (nepi.resources.linux.tap.LinuxTap attribute) +
+ + +
in_foreground (nepi.resources.linux.application.LinuxApplication attribute) +
+ + +
info() (nepi.util.logger.Logger method) +
+ + +
inform_failure() (nepi.execution.ec.ExperimentController method) +
+ + +
init_mailbox() (nepi.resources.omf.omf6_parser.OMF6Parser method) +
+ + +
initialize_workers() (nepi.util.parallel.ParallelRun method) +
+ + +
initiate() (nepi.resources.linux.ns3.fdudptunnel.LinuxNs3FdUdpTunnel method) +
+ + +
initiate_connection() (nepi.resources.linux.gretunnel.LinuxGRETunnel method) +
+ +
+ +
(nepi.resources.linux.ns3.fdudptunnel.LinuxNs3FdUdpTunnel method) +
+ + +
(nepi.resources.linux.tunnel.LinuxTunnel method) +
+ + +
(nepi.resources.linux.udptunnel.LinuxUdpTunnel method) +
+ +
+ +
initiate_udp_connection() (nepi.resources.linux.tap.LinuxTap method) +
+ +
+ +
(nepi.resources.planetlab.openvswitch.ovsport.PlanetlabOVSPort method) +
+ +
+ +
install() (nepi.resources.linux.application.LinuxApplication method) +
+ + +
install_dependencies() (nepi.resources.linux.application.LinuxApplication method) +
+ + +
install_packages() (nepi.resources.linux.node.LinuxNode method) +
+ + +
install_packages_command() (in module nepi.resources.linux.debfuncs) +
+ +
+ +
(in module nepi.resources.linux.rpmfuncs) +
+ + +
(nepi.resources.linux.node.LinuxNode method) +
+ +
+ +
install_rpmfusion_command() (in module nepi.resources.linux.rpmfuncs) +
+ +
+ +
Integer (nepi.execution.attribute.Types attribute) +
+ + +
interface (nepi.resources.netns.netnsipv4address.NetNSIPv4Address attribute) +
+ +
+ +
(nepi.resources.netns.netnsswitch.NetNSSwitch attribute) +
+ +
+ +
INVOKE (nepi.resources.netns.netnsserver.NetNSWrapperMessage attribute) +
+ +
+ +
(nepi.resources.ns3.ns3server.NS3WrapperMessage attribute) +
+ +
+ +
invoke() (nepi.resources.linux.netns.netnsclient.LinuxNetNSClient method) +
+ +
+ +
(nepi.resources.linux.ns3.ns3client.LinuxNS3Client method) +
+ + +
(nepi.resources.netns.netnsclient.NetNSClient method) +
+ + +
(nepi.resources.netns.netnsemulation.NetNSEmulation method) +
+ + +
(nepi.resources.netns.netnswrapper.NetNSWrapper method) +
+ + +
(nepi.resources.ns3.ns3client.NS3Client method) +
+ + +
(nepi.resources.ns3.ns3simulation.NS3Simulation method) +
+ + +
(nepi.resources.ns3.ns3wrapper.NS3Wrapper method) +
+ +
+ +
ipv4 (nepi.resources.ns3.ns3node.NS3BaseNode attribute) +
+ + +
is_alive() (nepi.resources.linux.node.LinuxNode method) +
+ + +
is_control() (in module nepi.data.processing.ccn.parser) +
+ + +
is_finished (nepi.resources.ns3.ns3wrapper.NS3Wrapper attribute) +
+ + +
is_rm_instance() (nepi.execution.resource.ResourceManager method) +
+ + +
is_running (nepi.resources.ns3.ns3wrapper.NS3Wrapper attribute) +
+ + +
is_source() (nepi.util.netgraph.NetGraph method) +
+ + +
is_started (nepi.resources.ns3.ns3wrapper.NS3Wrapper attribute) +
+ + +
is_target() (nepi.util.netgraph.NetGraph method) +
+ + +
is_valid_value() (nepi.execution.attribute.Attribute method) +
+ +
+ +

J

+ + +
+ +
join() (nepi.util.parallel.ParallelRun method) +
+ +
+ +

K

+ + +
+ +
kill() (nepi.resources.linux.node.LinuxNode method) +
+ +
+ +

L

+ + + +
+ +
LADDER (nepi.util.netgraph.TopologyType attribute) +
+ + +
lcopy() (in module nepi.util.execfuncs) +
+ + +
lexec() (in module nepi.util.execfuncs) +
+ + +
lgetpid() (in module nepi.util.execfuncs) +
+ + +
lib_dir (nepi.resources.linux.node.LinuxNode attribute) +
+ + +
LINEAR (nepi.util.netgraph.TopologyType attribute) +
+ + +
LinuxApplication (class in nepi.resources.linux.application) +
+ + +
LinuxCCNApplication (class in nepi.resources.linux.ccn.ccnapplication) +
+ + +
LinuxCCNCat (class in nepi.resources.linux.ccn.ccncat) +
+ + +
LinuxCCNContent (class in nepi.resources.linux.ccn.ccncontent) +
+ + +
LinuxCCND (class in nepi.resources.linux.ccn.ccnd) +
+ + +
LinuxCCNPeek (class in nepi.resources.linux.ccn.ccnpeek) +
+ + +
LinuxCCNPing (class in nepi.resources.linux.ccn.ccnping) +
+ + +
LinuxCCNPingServer (class in nepi.resources.linux.ccn.ccnpingserver) +
+ + +
LinuxCCNPoke (class in nepi.resources.linux.ccn.ccnpoke) +
+ + +
LinuxCCNR (class in nepi.resources.linux.ccn.ccnr) +
+ + +
LinuxChannel (class in nepi.resources.linux.channel) +
+ + +
LinuxDcePing (class in nepi.resources.linux.ns3.ns3pingdceapplication) +
+ + +
LinuxFIBEntry (class in nepi.resources.linux.ccn.fibentry) +
+ + +
LinuxGRETunnel (class in nepi.resources.linux.gretunnel) +
+ + +
LinuxInterface (class in nepi.resources.linux.interface) +
+ + +
LinuxMtr (class in nepi.resources.linux.mtr) +
+ + +
LinuxNetNSClient (class in nepi.resources.linux.netns.netnsclient) +
+ + +
LinuxNetNSEmulation (class in nepi.resources.linux.netns.netnsemulation) +
+ + +
LinuxNode (class in nepi.resources.linux.node) +
+ + +
LinuxNPing (class in nepi.resources.linux.nping) +
+ + +
LinuxNS3CCNDceApplication (class in nepi.resources.linux.ns3.ccn.ns3ccndceapplication) +
+ + +
LinuxNS3Client (class in nepi.resources.linux.ns3.ns3client) +
+ + +
LinuxNS3DceApplication (class in nepi.resources.linux.ns3.ns3dceapplication) +
+ + +
LinuxNS3DceCCNCat (class in nepi.resources.linux.ns3.ccn.ns3ccncatdceapplication) +
+ + +
LinuxNS3DceCCND (class in nepi.resources.linux.ns3.ccn.ns3ccnddceapplication) +
+ + +
LinuxNS3DceCCNPeek (class in nepi.resources.linux.ns3.ccn.ns3ccnpeekdceapplication) +
+ +
+ +
LinuxNS3DceCCNPoke (class in nepi.resources.linux.ns3.ccn.ns3ccnpokedceapplication) +
+ + +
LinuxNS3DceCCNR (class in nepi.resources.linux.ns3.ccn.ns3ccnrdceapplication) +
+ + +
LinuxNS3DceFIBEntry (class in nepi.resources.linux.ns3.ccn.ns3fibentrydceapplication) +
+ + +
LinuxNs3FdUdpTunnel (class in nepi.resources.linux.ns3.fdudptunnel) +
+ + +
LinuxNS3Simulation (class in nepi.resources.linux.ns3.ns3simulation) +
+ + +
LinuxPing (class in nepi.resources.linux.ping) +
+ + +
LinuxRoute (class in nepi.resources.linux.route) +
+ + +
LinuxTap (class in nepi.resources.linux.tap) +
+ + +
LinuxTcpdump (class in nepi.resources.linux.tcpdump) +
+ + +
LinuxTraceroute (class in nepi.resources.linux.traceroute) +
+ + +
LinuxTun (class in nepi.resources.linux.tun) +
+ + +
LinuxTunnel (class in nepi.resources.linux.tunnel) +
+ + +
LinuxTunTapFdLink (class in nepi.resources.linux.ns3.tuntapfdlink) +
+ + +
LinuxUdpTest (class in nepi.resources.linux.udptest) +
+ + +
LinuxUdpTunnel (class in nepi.resources.linux.udptunnel) +
+ + +
lkill() (in module nepi.util.execfuncs) +
+ + +
load() (nepi.execution.ec.ExperimentController class method) +
+ +
+ +
(nepi.util.serializer.ECSerializer method) +
+ +
+ +
load_configuration() (nepi.resources.linux.interface.LinuxInterface method) +
+ + +
load_content_history() (in module nepi.data.processing.ccn.parser) +
+ + +
load_ns3_libraries() (in module nepi.resources.ns3.ns3wrapper) +
+ + +
load_ns3_module() (in module nepi.resources.ns3.ns3wrapper) +
+ + +
local_dir (nepi.execution.ec.ExperimentController attribute) +
+ + +
localhost (nepi.resources.linux.node.LinuxNode attribute) +
+ + +
lock (nepi.resources.omf.omf_api_factory.OMFAPIFactory attribute) +
+ +
+ +
(nepi.resources.planetlab.node.PlanetlabNode attribute) +
+ +
+ +
log() (in module nepi.util.sshfuncs) +
+ +
+ +
(nepi.util.logger.Logger method) +
+ +
+ +
log_function() (nepi.resources.omf.messages_5_4.MessageHandler method) +
+ + +
log_message() (nepi.execution.resource.ResourceManager method) +
+ +
+ +
(nepi.resources.linux.application.LinuxApplication method) +
+ + +
(nepi.resources.linux.channel.LinuxChannel method) +
+ + +
(nepi.resources.linux.gretunnel.LinuxGRETunnel method) +
+ + +
(nepi.resources.linux.interface.LinuxInterface method) +
+ + +
(nepi.resources.linux.node.LinuxNode method) +
+ + +
(nepi.resources.linux.ns3.fdudptunnel.LinuxNs3FdUdpTunnel method) +
+ + +
(nepi.resources.linux.tunnel.LinuxTunnel method) +
+ + +
(nepi.resources.linux.udptunnel.LinuxUdpTunnel method) +
+ + +
(nepi.util.logger.Logger method) +
+ +
+ +
Logger (class in nepi.util.logger) +
+ + +
logger (nepi.execution.ec.ExperimentController attribute) +
+ +
+ +
(nepi.resources.netns.netnswrapper.NetNSWrapper attribute) +
+ + +
(nepi.resources.ns3.ns3wrapper.NS3Wrapper attribute) +
+ + +
(nepi.util.logger.Logger attribute) +
+ +
+ +
lspawn() (in module nepi.util.execfuncs) +
+ + +
lstatus() (in module nepi.util.execfuncs) +
+ +
+ +

M

+ + + +
+ +
make_control_path() (in module nepi.util.sshfuncs) +
+ + +
make_dict_rec() (nepi.util.sfarspec_proc.SfaRSpecProcessing method) +
+ + +
make_key() (nepi.util.manifoldapi.MANIFOLDAPIFactory class method) +
+ +
+ +
(nepi.util.sfaapi.SFAAPIFactory class method) +
+ +
+ +
make_server_key_args() (in module nepi.util.sshfuncs) +
+ + +
make_uuid() (nepi.resources.netns.netnswrapper.NetNSWrapper method) +
+ +
+ +
(nepi.resources.ns3.ns3wrapper.NS3Wrapper method) +
+ +
+ +
MANIFOLDAPI (class in nepi.util.manifoldapi) +
+ + +
MANIFOLDAPIFactory (class in nepi.util.manifoldapi) +
+ +
+ +
match_tags() (in module nepi.util.rmatcher) +
+ + +
mcapi (nepi.resources.planetlab.plcapi.PLCAPI attribute) +
+ + +
MESH (nepi.util.netgraph.TopologyType attribute) +
+ + +
MessageHandler (class in nepi.resources.omf.messages_5_4) +
+ +
+ +
(class in nepi.resources.omf.messages_6) +
+ +
+ +
mkdir() (nepi.resources.linux.node.LinuxNode method) +
+ + +
mobility (nepi.resources.ns3.ns3node.NS3BaseNode attribute) +
+ +
+ +

N

+ + + +
+ +
name (nepi.execution.attribute.Attribute attribute) +
+ +
+ +
(nepi.execution.trace.Trace attribute) +
+ +
+ +
nepi (module) +
+ + +
nepi.data (module) +
+ + +
nepi.data.processing (module) +
+ + +
nepi.data.processing.ccn (module) +
+ + +
nepi.data.processing.ccn.parser (module) +
+ + +
nepi.data.processing.ping (module) +
+ + +
nepi.data.processing.ping.parser (module) +
+ + +
nepi.execution (module) +
+ + +
nepi.execution.attribute (module) +
+ + +
nepi.execution.ec (module) +
+ + +
nepi.execution.resource (module) +
+ + +
nepi.execution.runner (module) +
+ + +
nepi.execution.scheduler (module) +
+ + +
nepi.execution.tags (module) +
+ + +
nepi.execution.trace (module) +
+ + +
nepi.resources (module) +
+ + +
nepi.resources.all (module) +
+ + +
nepi.resources.all.collector (module) +
+ + +
nepi.resources.linux (module) +
+ + +
nepi.resources.linux.application (module) +
+ + +
nepi.resources.linux.ccn (module) +
+ + +
nepi.resources.linux.ccn.ccnapplication (module) +
+ + +
nepi.resources.linux.ccn.ccncat (module) +
+ + +
nepi.resources.linux.ccn.ccncontent (module) +
+ + +
nepi.resources.linux.ccn.ccnd (module) +
+ + +
nepi.resources.linux.ccn.ccnpeek (module) +
+ + +
nepi.resources.linux.ccn.ccnping (module) +
+ + +
nepi.resources.linux.ccn.ccnpingserver (module) +
+ + +
nepi.resources.linux.ccn.ccnpoke (module) +
+ + +
nepi.resources.linux.ccn.ccnr (module) +
+ + +
nepi.resources.linux.ccn.fibentry (module) +
+ + +
nepi.resources.linux.channel (module) +
+ + +
nepi.resources.linux.debfuncs (module) +
+ + +
nepi.resources.linux.gretunnel (module) +
+ + +
nepi.resources.linux.interface (module) +
+ + +
nepi.resources.linux.mtr (module) +
+ + +
nepi.resources.linux.netns (module) +
+ + +
nepi.resources.linux.netns.netnsclient (module) +
+ + +
nepi.resources.linux.netns.netnsemulation (module) +
+ + +
nepi.resources.linux.node (module) +
+ + +
nepi.resources.linux.nping (module) +
+ + +
nepi.resources.linux.ns3 (module) +
+ + +
nepi.resources.linux.ns3.ccn (module) +
+ + +
nepi.resources.linux.ns3.ccn.ns3ccncatdceapplication (module) +
+ + +
nepi.resources.linux.ns3.ccn.ns3ccndceapplication (module) +
+ + +
nepi.resources.linux.ns3.ccn.ns3ccnddceapplication (module) +
+ + +
nepi.resources.linux.ns3.ccn.ns3ccnpeekdceapplication (module) +
+ + +
nepi.resources.linux.ns3.ccn.ns3ccnpokedceapplication (module) +
+ + +
nepi.resources.linux.ns3.ccn.ns3ccnrdceapplication (module) +
+ + +
nepi.resources.linux.ns3.ccn.ns3fibentrydceapplication (module) +
+ + +
nepi.resources.linux.ns3.fdudptunnel (module) +
+ + +
nepi.resources.linux.ns3.ns3client (module) +
+ + +
nepi.resources.linux.ns3.ns3dceapplication (module) +
+ + +
nepi.resources.linux.ns3.ns3pingdceapplication (module) +
+ + +
nepi.resources.linux.ns3.ns3simulation (module) +
+ + +
nepi.resources.linux.ns3.tuntapfdlink (module) +
+ + +
nepi.resources.linux.ping (module) +
+ + +
nepi.resources.linux.route (module) +
+ + +
nepi.resources.linux.rpmfuncs (module) +
+ + +
nepi.resources.linux.tap (module) +
+ + +
nepi.resources.linux.tcpdump (module) +
+ + +
nepi.resources.linux.traceroute (module) +
+ + +
nepi.resources.linux.tun (module) +
+ + +
nepi.resources.linux.tunnel (module) +
+ + +
nepi.resources.linux.udptest (module) +
+ + +
nepi.resources.linux.udptunnel (module) +
+ + +
nepi.resources.netns (module) +
+ + +
nepi.resources.netns.netnsapplication (module) +
+ + +
nepi.resources.netns.netnsbase (module) +
+ + +
nepi.resources.netns.netnsclient (module) +
+ + +
nepi.resources.netns.netnsemulation (module) +
+ + +
nepi.resources.netns.netnsinterface (module) +
+ + +
nepi.resources.netns.netnsipv4address (module) +
+ + +
nepi.resources.netns.netnsnode (module) +
+ + +
nepi.resources.netns.netnsnodeinterface (module) +
+ + +
nepi.resources.netns.netnsroute (module) +
+ + +
nepi.resources.netns.netnsserver (module) +
+ + +
nepi.resources.netns.netnsswitch (module) +
+ + +
nepi.resources.netns.netnswrapper (module) +
+ + +
nepi.resources.netns.netnswrapper_debug (module) +
+ + +
nepi.resources.ns3 (module) +
+ + +
nepi.resources.ns3.classes (module) +
+ + +
nepi.resources.ns3.classes.aarf_wifi_manager (module) +
+ + +
nepi.resources.ns3.classes.aarfcd_wifi_manager (module) +
+ + +
nepi.resources.ns3.classes.adhoc_wifi_mac (module) +
+ + +
nepi.resources.ns3.classes.aloha_noack_net_device (module) +
+ + +
nepi.resources.ns3.classes.amrr_wifi_manager (module) +
+ + +
nepi.resources.ns3.classes.ap_wifi_mac (module) +
+ + +
nepi.resources.ns3.classes.arf_wifi_manager (module) +
+ + +
nepi.resources.ns3.classes.arp_l3protocol (module) +
+ + +
nepi.resources.ns3.classes.base_station_net_device (module) +
+ + +
nepi.resources.ns3.classes.binary_error_model (module) +
+ + +
nepi.resources.ns3.classes.binary_error_sixlow_model (module) +
+ + +
nepi.resources.ns3.classes.bridge_channel (module) +
+ + +
nepi.resources.ns3.classes.bridge_net_device (module) +
+ + +
nepi.resources.ns3.classes.bulk_send_application (module) +
+ + +
nepi.resources.ns3.classes.burst_error_model (module) +
+ + +
nepi.resources.ns3.classes.cara_wifi_manager (module) +
+ + +
nepi.resources.ns3.classes.constant_acceleration_mobility_model (module) +
+ + +
nepi.resources.ns3.classes.constant_position_mobility_model (module) +
+ + +
nepi.resources.ns3.classes.constant_rate_wifi_manager (module) +
+ + +
nepi.resources.ns3.classes.constant_speed_propagation_delay_model (module) +
+ + +
nepi.resources.ns3.classes.constant_velocity_mobility_model (module) +
+ + +
nepi.resources.ns3.classes.cost231propagation_loss_model (module) +
+ + +
nepi.resources.ns3.classes.csma_channel (module) +
+ + +
nepi.resources.ns3.classes.csma_net_device (module) +
+ + +
nepi.resources.ns3.classes.drop_tail_queue (module) +
+ + +
nepi.resources.ns3.classes.dsrdsr_routing (module) +
+ + +
nepi.resources.ns3.classes.emu_net_device (module) +
+ + +
nepi.resources.ns3.classes.error_channel (module) +
+ + +
nepi.resources.ns3.classes.error_channel_sixlow (module) +
+ + +
nepi.resources.ns3.classes.error_net_device (module) +
+ + +
nepi.resources.ns3.classes.fd_net_device (module) +
+ + +
nepi.resources.ns3.classes.fixed_rss_loss_model (module) +
+ + +
nepi.resources.ns3.classes.friis_propagation_loss_model (module) +
+ + +
nepi.resources.ns3.classes.gauss_markov_mobility_model (module) +
+ + +
nepi.resources.ns3.classes.hierarchical_mobility_model (module) +
+ + +
nepi.resources.ns3.classes.hybrid_buildings_propagation_loss_model (module) +
+ + +
nepi.resources.ns3.classes.icmpv4l4protocol (module) +
+ + +
nepi.resources.ns3.classes.icmpv6l4protocol (module) +
+ + +
nepi.resources.ns3.classes.ideal_wifi_manager (module) +
+ + +
nepi.resources.ns3.classes.ipv4l3protocol (module) +
+ + +
nepi.resources.ns3.classes.itu_r1411los_propagation_loss_model (module) +
+ + +
nepi.resources.ns3.classes.itu_r1411nlos_over_rooftop_propagation_loss_model (module) +
+ + +
nepi.resources.ns3.classes.jakes_propagation_loss_model (module) +
+ + +
nepi.resources.ns3.classes.kun2600mhz_propagation_loss_model (module) +
+ + +
nepi.resources.ns3.classes.list_error_model (module) +
+ + +
nepi.resources.ns3.classes.log_distance_propagation_loss_model (module) +
+ + +
nepi.resources.ns3.classes.loopback_net_device (module) +
+ + +
nepi.resources.ns3.classes.lr_wpan_net_device (module) +
+ + +
nepi.resources.ns3.classes.lte_enb_net_device (module) +
+ + +
nepi.resources.ns3.classes.lte_simple_net_device (module) +
+ + +
nepi.resources.ns3.classes.lte_ue_net_device (module) +
+ + +
nepi.resources.ns3.classes.matrix_propagation_loss_model (module) +
+ + +
nepi.resources.ns3.classes.mesh_point_device (module) +
+ + +
nepi.resources.ns3.classes.mesh_wifi_interface_mac (module) +
+ + +
nepi.resources.ns3.classes.minstrel_wifi_manager (module) +
+ + +
nepi.resources.ns3.classes.multi_model_spectrum_channel (module) +
+ + +
nepi.resources.ns3.classes.nakagami_propagation_loss_model (module) +
+ + +
nepi.resources.ns3.classes.nist_error_rate_model (module) +
+ + +
nepi.resources.ns3.classes.node (module) +
+ + +
nepi.resources.ns3.classes.non_communicating_net_device (module) +
+ + +
nepi.resources.ns3.classes.ocb_wifi_mac (module) +
+ + +
nepi.resources.ns3.classes.oh_buildings_propagation_loss_model (module) +
+ + +
nepi.resources.ns3.classes.okumura_hata_propagation_loss_model (module) +
+ + +
nepi.resources.ns3.classes.on_off_application (module) +
+ + +
nepi.resources.ns3.classes.onoe_wifi_manager (module) +
+ + +
nepi.resources.ns3.classes.packet_sink (module) +
+ + +
nepi.resources.ns3.classes.ping6 (module) +
+ + +
nepi.resources.ns3.classes.point_to_point_channel (module) +
+ + +
nepi.resources.ns3.classes.point_to_point_net_device (module) +
+ + +
nepi.resources.ns3.classes.point_to_point_remote_channel (module) +
+ + +
nepi.resources.ns3.classes.radvd (module) +
+ + +
nepi.resources.ns3.classes.random_direction2d_mobility_model (module) +
+ + +
nepi.resources.ns3.classes.random_propagation_delay_model (module) +
+ + +
nepi.resources.ns3.classes.random_propagation_loss_model (module) +
+ + +
nepi.resources.ns3.classes.random_walk2d_mobility_model (module) +
+ + +
nepi.resources.ns3.classes.random_waypoint_mobility_model (module) +
+ + +
nepi.resources.ns3.classes.range_propagation_loss_model (module) +
+ + +
nepi.resources.ns3.classes.rate_error_model (module) +
+ + +
nepi.resources.ns3.classes.receive_list_error_model (module) +
+ + +
nepi.resources.ns3.classes.red_queue (module) +
+ + +
nepi.resources.ns3.classes.rraa_wifi_manager (module) +
+ + +
nepi.resources.ns3.classes.simple_channel (module) +
+ + +
nepi.resources.ns3.classes.simple_net_device (module) +
+ + +
nepi.resources.ns3.classes.single_model_spectrum_channel (module) +
+ + +
nepi.resources.ns3.classes.six_low_pan_net_device (module) +
+ + +
nepi.resources.ns3.classes.sta_wifi_mac (module) +
+ + +
nepi.resources.ns3.classes.steady_state_random_waypoint_mobility_model (module) +
+ + +
nepi.resources.ns3.classes.subscriber_station_net_device (module) +
+ + +
nepi.resources.ns3.classes.tap_bridge (module) +
+ + +
nepi.resources.ns3.classes.tcp_l4protocol (module) +
+ + +
nepi.resources.ns3.classes.three_log_distance_propagation_loss_model (module) +
+ + +
nepi.resources.ns3.classes.two_ray_ground_propagation_loss_model (module) +
+ + +
nepi.resources.ns3.classes.uan_channel (module) +
+ + +
nepi.resources.ns3.classes.udp_client (module) +
+ + +
nepi.resources.ns3.classes.udp_echo_client (module) +
+ + +
nepi.resources.ns3.classes.udp_echo_server (module) +
+ + +
nepi.resources.ns3.classes.udp_l4protocol (module) +
+ + +
nepi.resources.ns3.classes.udp_server (module) +
+ + +
nepi.resources.ns3.classes.udp_trace_client (module) +
+ + +
nepi.resources.ns3.classes.v4ping (module) +
+ + +
nepi.resources.ns3.classes.virtual_net_device (module) +
+ + +
nepi.resources.ns3.classes.waypoint_mobility_model (module) +
+ + +
nepi.resources.ns3.classes.wifi_net_device (module) +
+ + +
nepi.resources.ns3.classes.yans_error_rate_model (module) +
+ + +
nepi.resources.ns3.classes.yans_wifi_channel (module) +
+ + +
nepi.resources.ns3.classes.yans_wifi_phy (module) +
+ + +
nepi.resources.ns3.ns3application (module) +
+ + +
nepi.resources.ns3.ns3arpl3protocol (module) +
+ + +
nepi.resources.ns3.ns3base (module) +
+ + +
nepi.resources.ns3.ns3ccndceapplication (module) +
+ + +
nepi.resources.ns3.ns3channel (module) +
+ + +
nepi.resources.ns3.ns3client (module) +
+ + +
nepi.resources.ns3.ns3dceapplication (module) +
+ + +
nepi.resources.ns3.ns3dcehelper (module) +
+ + +
nepi.resources.ns3.ns3errormodel (module) +
+ + +
nepi.resources.ns3.ns3errorratemodel (module) +
+ + +
nepi.resources.ns3.ns3fdnetdevice (module) +
+ + +
nepi.resources.ns3.ns3icmpv4l4protocol (module) +
+ + +
nepi.resources.ns3.ns3ipv4l3protocol (module) +
+ + +
nepi.resources.ns3.ns3mobilitymodel (module) +
+ + +
nepi.resources.ns3.ns3netdevice (module) +
+ + +
nepi.resources.ns3.ns3node (module) +
+ + +
nepi.resources.ns3.ns3pipechanel (module) +
+ + +
nepi.resources.ns3.ns3propagationdelaymodel (module) +
+ + +
nepi.resources.ns3.ns3propagationlossmodel (module) +
+ + +
nepi.resources.ns3.ns3queue (module) +
+ + +
nepi.resources.ns3.ns3route (module) +
+ + +
nepi.resources.ns3.ns3server (module) +
+ + +
nepi.resources.ns3.ns3simulation (module) +
+ + +
nepi.resources.ns3.ns3wifichannel (module) +
+ + +
nepi.resources.ns3.ns3wifimac (module) +
+ + +
nepi.resources.ns3.ns3wifinetdevice (module) +
+ + +
nepi.resources.ns3.ns3wifiphy (module) +
+ + +
nepi.resources.ns3.ns3wifiremotestationmanager (module) +
+ + +
nepi.resources.ns3.ns3wrapper (module) +
+ + +
nepi.resources.ns3.ns3wrapper_debug (module) +
+ + +
nepi.resources.ns3.resource_manager_generator (module) +
+ + +
nepi.resources.omf (module) +
+ + +
nepi.resources.omf.application (module) +
+ +
+ +
nepi.resources.omf.channel (module) +
+ + +
nepi.resources.omf.interface (module) +
+ + +
nepi.resources.omf.messages_5_4 (module) +
+ + +
nepi.resources.omf.messages_6 (module) +
+ + +
nepi.resources.omf.node (module) +
+ + +
nepi.resources.omf.omf5_api (module) +
+ + +
nepi.resources.omf.omf6_api (module) +
+ + +
nepi.resources.omf.omf6_parser (module) +
+ + +
nepi.resources.omf.omf_api_factory (module) +
+ + +
nepi.resources.omf.omf_client (module) +
+ + +
nepi.resources.omf.omf_resource (module) +
+ + +
nepi.resources.omf.wilabt_node (module) +
+ + +
nepi.resources.planetlab (module) +
+ + +
nepi.resources.planetlab.node (module) +
+ + +
nepi.resources.planetlab.ns3 (module) +
+ + +
nepi.resources.planetlab.ns3.fdudptunnel (module) +
+ + +
nepi.resources.planetlab.ns3.tuntapfdlink (module) +
+ + +
nepi.resources.planetlab.openvswitch (module) +
+ + +
nepi.resources.planetlab.openvswitch.ovs (module) +
+ + +
nepi.resources.planetlab.openvswitch.ovsport (module) +
+ + +
nepi.resources.planetlab.plcapi (module) +
+ + +
nepi.resources.planetlab.sfa_node (module) +
+ + +
nepi.resources.planetlab.tap (module) +
+ + +
nepi.resources.planetlab.tun (module) +
+ + +
nepi.resources.planetlab.vroute (module) +
+ + +
nepi.util (module) +
+ + +
nepi.util.environ (module) +
+ + +
nepi.util.execfuncs (module) +
+ + +
nepi.util.guid (module) +
+ + +
nepi.util.logger (module) +
+ + +
nepi.util.manifoldapi (module) +
+ + +
nepi.util.netgraph (module) +
+ + +
nepi.util.parallel (module) +
+ + +
nepi.util.parsers (module) +
+ + +
nepi.util.parsers.xml_parser (module) +
+ + +
nepi.util.plotter (module) +
+ + +
nepi.util.rmatcher (module) +
+ + +
nepi.util.serializer (module) +
+ + +
nepi.util.sfaapi (module) +
+ + +
nepi.util.sfarspec_proc (module) +
+ + +
nepi.util.sshfuncs (module) +
+ + +
nepi.util.statfuncs (module) +
+ + +
nepi.util.timefuncs (module) +
+ + +
nepi_home (nepi.resources.linux.node.LinuxNode attribute) +
+ + +
NetGraph (class in nepi.util.netgraph) +
+ + +
netgraph (nepi.execution.ec.ExperimentController attribute) +
+ + +
netns_repo (nepi.resources.linux.netns.netnsemulation.LinuxNetNSEmulation attribute) +
+ + +
netns_src (nepi.resources.linux.netns.netnsemulation.LinuxNetNSEmulation attribute) +
+ + +
netns_version (nepi.resources.linux.netns.netnsemulation.LinuxNetNSEmulation attribute) +
+ + +
NetNSApplication (class in nepi.resources.netns.netnsapplication) +
+ + +
NetNSBase (class in nepi.resources.netns.netnsbase) +
+ + +
NetNSClient (class in nepi.resources.netns.netnsclient) +
+ + +
NetNSEmulation (class in nepi.resources.netns.netnsemulation) +
+ + +
NetNSInterface (class in nepi.resources.netns.netnsinterface) +
+ + +
NetNSIPv4Address (class in nepi.resources.netns.netnsipv4address) +
+ + +
NetNSIPv4Route (class in nepi.resources.netns.netnsroute) +
+ + +
NetNSNode (class in nepi.resources.netns.netnsnode) +
+ + +
NetNSNodeInterface (class in nepi.resources.netns.netnsnodeinterface) +
+ + +
NetNSSwitch (class in nepi.resources.netns.netnsswitch) +
+ + +
NetNSWrapper (class in nepi.resources.netns.netnswrapper) +
+ + +
NetNSWrapperDebuger (class in nepi.resources.netns.netnswrapper_debug) +
+ + +
NetNSWrapperMessage (class in nepi.resources.netns.netnsserver) +
+ + +
network_types (nepi.resources.planetlab.plcapi.PLCAPI attribute) +
+ + +
NEW (nepi.execution.resource.ResourceState attribute) +
+ +
+ +
(nepi.execution.scheduler.TaskStatus attribute) +
+ +
+ +
newexp_function() (nepi.resources.omf.messages_5_4.MessageHandler method) +
+ + +
next() (nepi.execution.scheduler.HeapScheduler method) +
+ +
+ +
(nepi.util.guid.GuidGenerator method) +
+ +
+ +
node (nepi.resources.linux.application.LinuxApplication attribute) +
+ +
+ +
(nepi.resources.linux.ccn.ccnapplication.LinuxCCNApplication attribute) +
+ + +
(nepi.resources.linux.ccn.ccncontent.LinuxCCNContent attribute) +
+ + +
(nepi.resources.linux.ccn.ccnr.LinuxCCNR attribute) +
+ + +
(nepi.resources.linux.ccn.fibentry.LinuxFIBEntry attribute) +
+ + +
(nepi.resources.linux.interface.LinuxInterface attribute) +
+ + +
(nepi.resources.linux.ns3.tuntapfdlink.LinuxTunTapFdLink attribute) +
+ + +
(nepi.resources.linux.route.LinuxRoute attribute) +
+ + +
(nepi.resources.linux.tap.LinuxTap attribute) +
+ + +
(nepi.resources.netns.netnsapplication.NetNSApplication attribute) +
+ + +
(nepi.resources.netns.netnsipv4address.NetNSIPv4Address attribute) +
+ + +
(nepi.resources.netns.netnsnodeinterface.NetNSNodeInterface attribute) +
+ + +
(nepi.resources.netns.netnsroute.NetNSIPv4Route attribute) +
+ + +
(nepi.resources.netns.netnsswitch.NetNSSwitch attribute) +
+ + +
(nepi.resources.ns3.ns3application.NS3BaseApplication attribute) +
+ + +
(nepi.resources.ns3.ns3arpl3protocol.NS3BaseArpL3Protocol attribute) +
+ + +
(nepi.resources.ns3.ns3base.NS3Base attribute) +
+ + +
(nepi.resources.ns3.ns3errorratemodel.NS3BaseErrorRateModel attribute) +
+ + +
(nepi.resources.ns3.ns3icmpv4l4protocol.NS3BaseIcmpv4L4Protocol attribute) +
+ + +
(nepi.resources.ns3.ns3ipv4l3protocol.NS3BaseIpv4L3Protocol attribute) +
+ + +
(nepi.resources.ns3.ns3netdevice.NS3BaseNetDevice attribute) +
+ + +
(nepi.resources.ns3.ns3pipechanel.NS3BasePipeChannel attribute) +
+ + +
(nepi.resources.ns3.ns3queue.NS3BaseQueue attribute) +
+ + +
(nepi.resources.ns3.ns3route.NS3Route attribute) +
+ + +
(nepi.resources.ns3.ns3wifimac.NS3BaseWifiMac attribute) +
+ + +
(nepi.resources.ns3.ns3wifiphy.NS3BaseWifiPhy attribute) +
+ + +
(nepi.resources.ns3.ns3wifiremotestationmanager.NS3BaseWifiRemoteStationManager attribute) +
+ + +
(nepi.resources.omf.application.OMFApplication attribute) +
+ + +
(nepi.resources.omf.interface.OMFWifiInterface attribute) +
+ + +
(nepi.resources.planetlab.openvswitch.ovs.PlanetlabOVSSwitch attribute) +
+ + +
(nepi.resources.planetlab.openvswitch.ovsport.PlanetlabOVSPort attribute) +
+ + +
(nepi.resources.planetlab.tap.PlanetlabTap attribute) +
+ + +
(nepi.resources.planetlab.vroute.PlanetlabVroute attribute) +
+ +
+ +
node1 (nepi.resources.linux.ns3.fdudptunnel.LinuxNs3FdUdpTunnel attribute) +
+ + +
node2 (nepi.resources.linux.ns3.fdudptunnel.LinuxNs3FdUdpTunnel attribute) +
+ + +
node_annotation() (nepi.util.netgraph.NetGraph method) +
+ + +
node_annotations() (nepi.util.netgraph.NetGraph method) +
+ + +
node_home (nepi.resources.linux.node.LinuxNode attribute) +
+ + +
node_id (nepi.resources.ns3.ns3node.NS3BaseNode attribute) +
+ + +
node_ip_annotations() (nepi.util.netgraph.NetGraph method) +
+ + +
nodes() (nepi.resources.omf.omf_client.OMFClient method) +
+ +
+ +
(nepi.util.netgraph.NetGraph method) +
+ +
+ +
noop_function() (nepi.resources.omf.messages_5_4.MessageHandler method) +
+ + +
NoRead (nepi.execution.attribute.Flags attribute) +
+ + +
NOT_STARTED (nepi.util.sshfuncs.ProcStatus attribute) +
+ + +
NoWrite (nepi.execution.attribute.Flags attribute) +
+ + +
ns3 (nepi.resources.ns3.ns3wrapper.NS3Wrapper attribute) +
+ + +
ns3_build_location (nepi.resources.linux.ns3.ns3simulation.LinuxNS3Simulation attribute) +
+ + +
ns3_get() (nepi.resources.ns3.ns3simulation.NS3Simulation method) +
+ + +
ns3_repo (nepi.resources.linux.ns3.ns3simulation.LinuxNS3Simulation attribute) +
+ + +
ns3_set() (nepi.resources.ns3.ns3simulation.NS3Simulation method) +
+ + +
ns3_src_location (nepi.resources.linux.ns3.ns3simulation.LinuxNS3Simulation attribute) +
+ + +
NS3AarfcdWifiManager (class in nepi.resources.ns3.classes.aarfcd_wifi_manager) +
+ + +
NS3AarfWifiManager (class in nepi.resources.ns3.classes.aarf_wifi_manager) +
+ + +
NS3AdhocWifiMac (class in nepi.resources.ns3.classes.adhoc_wifi_mac) +
+ + +
NS3AlohaNoackNetDevice (class in nepi.resources.ns3.classes.aloha_noack_net_device) +
+ + +
NS3AmrrWifiManager (class in nepi.resources.ns3.classes.amrr_wifi_manager) +
+ + +
NS3ApWifiMac (class in nepi.resources.ns3.classes.ap_wifi_mac) +
+ + +
NS3ArfWifiManager (class in nepi.resources.ns3.classes.arf_wifi_manager) +
+ + +
NS3ArpL3Protocol (class in nepi.resources.ns3.classes.arp_l3protocol) +
+ + +
NS3Base (class in nepi.resources.ns3.ns3base) +
+ + +
NS3BaseApplication (class in nepi.resources.ns3.ns3application) +
+ + +
NS3BaseArpL3Protocol (class in nepi.resources.ns3.ns3arpl3protocol) +
+ + +
NS3BaseCCNDceApplication (class in nepi.resources.ns3.ns3ccndceapplication) +
+ + +
NS3BaseChannel (class in nepi.resources.ns3.ns3channel) +
+ + +
NS3BaseDceApplication (class in nepi.resources.ns3.ns3dceapplication) +
+ + +
NS3BaseErrorModel (class in nepi.resources.ns3.ns3errormodel) +
+ + +
NS3BaseErrorRateModel (class in nepi.resources.ns3.ns3errorratemodel) +
+ + +
NS3BaseFdNetDevice (class in nepi.resources.ns3.ns3fdnetdevice) +
+ + +
NS3BaseIcmpv4L4Protocol (class in nepi.resources.ns3.ns3icmpv4l4protocol) +
+ + +
NS3BaseIpv4L3Protocol (class in nepi.resources.ns3.ns3ipv4l3protocol) +
+ + +
NS3BaseMobilityModel (class in nepi.resources.ns3.ns3mobilitymodel) +
+ + +
NS3BaseNetDevice (class in nepi.resources.ns3.ns3netdevice) +
+ + +
NS3BaseNode (class in nepi.resources.ns3.ns3node) +
+ + +
NS3BasePipeChannel (class in nepi.resources.ns3.ns3pipechanel) +
+ + +
NS3BasePropagationDelayModel (class in nepi.resources.ns3.ns3propagationdelaymodel) +
+ + +
NS3BasePropagationLossModel (class in nepi.resources.ns3.ns3propagationlossmodel) +
+ + +
NS3BaseQueue (class in nepi.resources.ns3.ns3queue) +
+ + +
NS3BaseStationNetDevice (class in nepi.resources.ns3.classes.base_station_net_device) +
+ + +
NS3BaseWifiChannel (class in nepi.resources.ns3.ns3wifichannel) +
+ + +
NS3BaseWifiMac (class in nepi.resources.ns3.ns3wifimac) +
+ + +
NS3BaseWifiNetDevice (class in nepi.resources.ns3.ns3wifinetdevice) +
+ + +
NS3BaseWifiPhy (class in nepi.resources.ns3.ns3wifiphy) +
+ + +
NS3BaseWifiRemoteStationManager (class in nepi.resources.ns3.ns3wifiremotestationmanager) +
+ + +
NS3BinaryErrorModel (class in nepi.resources.ns3.classes.binary_error_model) +
+ + +
NS3BinaryErrorSixlowModel (class in nepi.resources.ns3.classes.binary_error_sixlow_model) +
+ + +
NS3BridgeChannel (class in nepi.resources.ns3.classes.bridge_channel) +
+ + +
NS3BridgeNetDevice (class in nepi.resources.ns3.classes.bridge_net_device) +
+ + +
NS3BulkSendApplication (class in nepi.resources.ns3.classes.bulk_send_application) +
+ + +
NS3BurstErrorModel (class in nepi.resources.ns3.classes.burst_error_model) +
+ + +
NS3CaraWifiManager (class in nepi.resources.ns3.classes.cara_wifi_manager) +
+ + +
NS3Client (class in nepi.resources.ns3.ns3client) +
+ + +
NS3ConstantAccelerationMobilityModel (class in nepi.resources.ns3.classes.constant_acceleration_mobility_model) +
+ + +
NS3ConstantPositionMobilityModel (class in nepi.resources.ns3.classes.constant_position_mobility_model) +
+ + +
NS3ConstantRateWifiManager (class in nepi.resources.ns3.classes.constant_rate_wifi_manager) +
+ + +
NS3ConstantSpeedPropagationDelayModel (class in nepi.resources.ns3.classes.constant_speed_propagation_delay_model) +
+ + +
NS3ConstantVelocityMobilityModel (class in nepi.resources.ns3.classes.constant_velocity_mobility_model) +
+ + +
NS3Cost231PropagationLossModel (class in nepi.resources.ns3.classes.cost231propagation_loss_model) +
+ + +
NS3CsmaChannel (class in nepi.resources.ns3.classes.csma_channel) +
+ + +
NS3CsmaNetDevice (class in nepi.resources.ns3.classes.csma_net_device) +
+ + +
NS3DceHelper (class in nepi.resources.ns3.ns3dcehelper) +
+ + +
NS3DropTailQueue (class in nepi.resources.ns3.classes.drop_tail_queue) +
+ + +
NS3dsrDsrRouting (class in nepi.resources.ns3.classes.dsrdsr_routing) +
+ + +
NS3EmuNetDevice (class in nepi.resources.ns3.classes.emu_net_device) +
+ + +
NS3ErrorChannel (class in nepi.resources.ns3.classes.error_channel) +
+ + +
NS3ErrorChannelSixlow (class in nepi.resources.ns3.classes.error_channel_sixlow) +
+ + +
NS3ErrorNetDevice (class in nepi.resources.ns3.classes.error_net_device) +
+ + +
NS3FdNetDevice (class in nepi.resources.ns3.classes.fd_net_device) +
+ + +
NS3FixedRssLossModel (class in nepi.resources.ns3.classes.fixed_rss_loss_model) +
+ + +
NS3FriisPropagationLossModel (class in nepi.resources.ns3.classes.friis_propagation_loss_model) +
+ + +
NS3GaussMarkovMobilityModel (class in nepi.resources.ns3.classes.gauss_markov_mobility_model) +
+ + +
NS3HierarchicalMobilityModel (class in nepi.resources.ns3.classes.hierarchical_mobility_model) +
+ + +
NS3HybridBuildingsPropagationLossModel (class in nepi.resources.ns3.classes.hybrid_buildings_propagation_loss_model) +
+ + +
NS3Icmpv4L4Protocol (class in nepi.resources.ns3.classes.icmpv4l4protocol) +
+ + +
NS3Icmpv6L4Protocol (class in nepi.resources.ns3.classes.icmpv6l4protocol) +
+ + +
NS3IdealWifiManager (class in nepi.resources.ns3.classes.ideal_wifi_manager) +
+ + +
NS3Ipv4L3Protocol (class in nepi.resources.ns3.classes.ipv4l3protocol) +
+ + +
NS3ItuR1411LosPropagationLossModel (class in nepi.resources.ns3.classes.itu_r1411los_propagation_loss_model) +
+ + +
NS3ItuR1411NlosOverRooftopPropagationLossModel (class in nepi.resources.ns3.classes.itu_r1411nlos_over_rooftop_propagation_loss_model) +
+ + +
NS3JakesPropagationLossModel (class in nepi.resources.ns3.classes.jakes_propagation_loss_model) +
+ + +
NS3Kun2600MhzPropagationLossModel (class in nepi.resources.ns3.classes.kun2600mhz_propagation_loss_model) +
+ + +
NS3ListErrorModel (class in nepi.resources.ns3.classes.list_error_model) +
+ + +
NS3LogDistancePropagationLossModel (class in nepi.resources.ns3.classes.log_distance_propagation_loss_model) +
+ + +
NS3LoopbackNetDevice (class in nepi.resources.ns3.classes.loopback_net_device) +
+ + +
NS3LrWpanNetDevice (class in nepi.resources.ns3.classes.lr_wpan_net_device) +
+ + +
NS3LteEnbNetDevice (class in nepi.resources.ns3.classes.lte_enb_net_device) +
+ + +
NS3LteSimpleNetDevice (class in nepi.resources.ns3.classes.lte_simple_net_device) +
+ + +
NS3LteUeNetDevice (class in nepi.resources.ns3.classes.lte_ue_net_device) +
+ + +
NS3MatrixPropagationLossModel (class in nepi.resources.ns3.classes.matrix_propagation_loss_model) +
+ + +
NS3MeshPointDevice (class in nepi.resources.ns3.classes.mesh_point_device) +
+ + +
NS3MeshWifiInterfaceMac (class in nepi.resources.ns3.classes.mesh_wifi_interface_mac) +
+ + +
NS3MinstrelWifiManager (class in nepi.resources.ns3.classes.minstrel_wifi_manager) +
+ + +
NS3MultiModelSpectrumChannel (class in nepi.resources.ns3.classes.multi_model_spectrum_channel) +
+ + +
NS3NakagamiPropagationLossModel (class in nepi.resources.ns3.classes.nakagami_propagation_loss_model) +
+ + +
NS3NistErrorRateModel (class in nepi.resources.ns3.classes.nist_error_rate_model) +
+ + +
NS3Node (class in nepi.resources.ns3.classes.node) +
+ + +
NS3NonCommunicatingNetDevice (class in nepi.resources.ns3.classes.non_communicating_net_device) +
+ + +
NS3OcbWifiMac (class in nepi.resources.ns3.classes.ocb_wifi_mac) +
+ + +
NS3OhBuildingsPropagationLossModel (class in nepi.resources.ns3.classes.oh_buildings_propagation_loss_model) +
+ + +
NS3OkumuraHataPropagationLossModel (class in nepi.resources.ns3.classes.okumura_hata_propagation_loss_model) +
+ + +
NS3OnoeWifiManager (class in nepi.resources.ns3.classes.onoe_wifi_manager) +
+ + +
NS3OnOffApplication (class in nepi.resources.ns3.classes.on_off_application) +
+ + +
NS3PacketSink (class in nepi.resources.ns3.classes.packet_sink) +
+ + +
NS3Ping6 (class in nepi.resources.ns3.classes.ping6) +
+ + +
NS3PointToPointChannel (class in nepi.resources.ns3.classes.point_to_point_channel) +
+ + +
NS3PointToPointNetDevice (class in nepi.resources.ns3.classes.point_to_point_net_device) +
+ + +
NS3PointToPointRemoteChannel (class in nepi.resources.ns3.classes.point_to_point_remote_channel) +
+ + +
NS3Radvd (class in nepi.resources.ns3.classes.radvd) +
+ + +
NS3RandomDirection2dMobilityModel (class in nepi.resources.ns3.classes.random_direction2d_mobility_model) +
+ + +
NS3RandomPropagationDelayModel (class in nepi.resources.ns3.classes.random_propagation_delay_model) +
+ + +
NS3RandomPropagationLossModel (class in nepi.resources.ns3.classes.random_propagation_loss_model) +
+ + +
NS3RandomWalk2dMobilityModel (class in nepi.resources.ns3.classes.random_walk2d_mobility_model) +
+ + +
NS3RandomWaypointMobilityModel (class in nepi.resources.ns3.classes.random_waypoint_mobility_model) +
+ + +
NS3RangePropagationLossModel (class in nepi.resources.ns3.classes.range_propagation_loss_model) +
+ + +
NS3RateErrorModel (class in nepi.resources.ns3.classes.rate_error_model) +
+ + +
NS3ReceiveListErrorModel (class in nepi.resources.ns3.classes.receive_list_error_model) +
+ + +
NS3RedQueue (class in nepi.resources.ns3.classes.red_queue) +
+ + +
NS3Route (class in nepi.resources.ns3.ns3route) +
+ + +
NS3RraaWifiManager (class in nepi.resources.ns3.classes.rraa_wifi_manager) +
+ + +
NS3SimpleChannel (class in nepi.resources.ns3.classes.simple_channel) +
+ + +
NS3SimpleNetDevice (class in nepi.resources.ns3.classes.simple_net_device) +
+ + +
NS3Simulation (class in nepi.resources.ns3.ns3simulation) +
+ + +
NS3SingleModelSpectrumChannel (class in nepi.resources.ns3.classes.single_model_spectrum_channel) +
+ + +
NS3SixLowPanNetDevice (class in nepi.resources.ns3.classes.six_low_pan_net_device) +
+ + +
NS3StaWifiMac (class in nepi.resources.ns3.classes.sta_wifi_mac) +
+ + +
NS3SteadyStateRandomWaypointMobilityModel (class in nepi.resources.ns3.classes.steady_state_random_waypoint_mobility_model) +
+ + +
NS3SubscriberStationNetDevice (class in nepi.resources.ns3.classes.subscriber_station_net_device) +
+ + +
NS3TapBridge (class in nepi.resources.ns3.classes.tap_bridge) +
+ + +
NS3TcpL4Protocol (class in nepi.resources.ns3.classes.tcp_l4protocol) +
+ + +
NS3ThreeLogDistancePropagationLossModel (class in nepi.resources.ns3.classes.three_log_distance_propagation_loss_model) +
+ + +
NS3TwoRayGroundPropagationLossModel (class in nepi.resources.ns3.classes.two_ray_ground_propagation_loss_model) +
+ + +
NS3UanChannel (class in nepi.resources.ns3.classes.uan_channel) +
+ + +
NS3UdpClient (class in nepi.resources.ns3.classes.udp_client) +
+ + +
NS3UdpEchoClient (class in nepi.resources.ns3.classes.udp_echo_client) +
+ + +
NS3UdpEchoServer (class in nepi.resources.ns3.classes.udp_echo_server) +
+ + +
NS3UdpL4Protocol (class in nepi.resources.ns3.classes.udp_l4protocol) +
+ + +
NS3UdpServer (class in nepi.resources.ns3.classes.udp_server) +
+ + +
NS3UdpTraceClient (class in nepi.resources.ns3.classes.udp_trace_client) +
+ + +
NS3V4Ping (class in nepi.resources.ns3.classes.v4ping) +
+ + +
NS3VirtualNetDevice (class in nepi.resources.ns3.classes.virtual_net_device) +
+ + +
NS3WaypointMobilityModel (class in nepi.resources.ns3.classes.waypoint_mobility_model) +
+ + +
NS3WifiNetDevice (class in nepi.resources.ns3.classes.wifi_net_device) +
+ + +
NS3Wrapper (class in nepi.resources.ns3.ns3wrapper) +
+ + +
NS3WrapperDebuger (class in nepi.resources.ns3.ns3wrapper_debug) +
+ + +
NS3WrapperMessage (class in nepi.resources.ns3.ns3server) +
+ + +
NS3YansErrorRateModel (class in nepi.resources.ns3.classes.yans_error_rate_model) +
+ + +
NS3YansWifiChannel (class in nepi.resources.ns3.classes.yans_wifi_channel) +
+ + +
NS3YansWifiPhy (class in nepi.resources.ns3.classes.yans_wifi_phy) +
+ + +
nthreads (nepi.execution.ec.ExperimentController attribute) +
+ +
+ +

O

+ + + +
+ +
OK (nepi.execution.ec.FailureLevel attribute) +
+ +
+ +
(nepi.resources.linux.node.ExitCode attribute) +
+ +
+ +
OMF5API (class in nepi.resources.omf.omf5_api) +
+ + +
OMF6API (class in nepi.resources.omf.omf6_api) +
+ + +
OMF6Parser (class in nepi.resources.omf.omf6_parser) +
+ + +
OMFAPIFactory (class in nepi.resources.omf.omf_api_factory) +
+ + +
OMFApplication (class in nepi.resources.omf.application) +
+ + +
OMFChannel (class in nepi.resources.omf.channel) +
+ + +
OMFClient (class in nepi.resources.omf.omf_client) +
+ + +
OMFNode (class in nepi.resources.omf.node) +
+ +
+ +
OMFResource (class in nepi.resources.omf.omf_resource) +
+ + +
OMFWifiInterface (class in nepi.resources.omf.interface) +
+ + +
open_socket() (in module nepi.resources.ns3.ns3server) +
+ + +
openssh_has_persist() (in module nepi.util.sshfuncs) +
+ + +
order (nepi.util.netgraph.NetGraph attribute) +
+ + +
os (nepi.resources.linux.node.LinuxNode attribute) +
+ + +
OSType (class in nepi.resources.linux.node) +
+ + +
ovs_status() (nepi.resources.planetlab.openvswitch.ovs.PlanetlabOVSSwitch method) +
+ + +
ovsswitch (nepi.resources.planetlab.openvswitch.ovsport.PlanetlabOVSPort attribute) +
+ +
+ +

P

+ + + +
+ +
ParallelRun (class in nepi.util.parallel) +
+ + +
parse_file() (in module nepi.data.processing.ccn.parser) +
+ +
+ +
(in module nepi.data.processing.ping.parser) +
+ +
+ +
parse_sfa_rspec() (nepi.util.sfarspec_proc.SfaRSpecProcessing method) +
+ + +
PATH (nepi.execution.trace.TraceAttr attribute) +
+ + +
path (nepi.resources.linux.ccn.ccnd.LinuxCCND attribute) +
+ + +
peer_map (nepi.resources.planetlab.plcapi.PLCAPI attribute) +
+ + +
pending (nepi.execution.scheduler.HeapScheduler attribute) +
+ + +
persist (nepi.execution.ec.ExperimentController attribute) +
+ + +
PFormats (class in nepi.util.plotter) +
+ + +
phy (nepi.resources.ns3.ns3errorratemodel.NS3BaseErrorRateModel attribute) +
+ + +
phys (nepi.resources.ns3.ns3wifichannel.NS3BaseWifiChannel attribute) +
+ + +
pi (nepi.resources.linux.ns3.fdudptunnel.LinuxNs3FdUdpTunnel attribute) +
+ + +
pid (nepi.resources.linux.application.LinuxApplication attribute) +
+ +
+ +
(nepi.resources.ns3.ns3dceapplication.NS3BaseDceApplication attribute) +
+ +
+ +
ping (nepi.resources.linux.ccn.fibentry.LinuxFIBEntry attribute) +
+ + +
PlanetlabNode (class in nepi.resources.planetlab.node) +
+ + +
PlanetlabNs3FdUdpTunnel (class in nepi.resources.planetlab.ns3.fdudptunnel) +
+ + +
PlanetlabOVSPort (class in nepi.resources.planetlab.openvswitch.ovsport) +
+ + +
PlanetlabOVSSwitch (class in nepi.resources.planetlab.openvswitch.ovs) +
+ + +
PlanetlabSfaNode (class in nepi.resources.planetlab.sfa_node) +
+ + +
PlanetlabTap (class in nepi.resources.planetlab.tap) +
+ + +
PlanetlabTun (class in nepi.resources.planetlab.tun) +
+ + +
PlanetlabTunTapFdLink (class in nepi.resources.planetlab.ns3.tuntapfdlink) +
+ + +
PlanetlabVroute (class in nepi.resources.planetlab.vroute) +
+ + +
plapi (nepi.resources.planetlab.node.PlanetlabNode attribute) +
+ +
+ +
PLCAPI (class in nepi.resources.planetlab.plcapi) +
+ + +
PLCAPIFactory (class in nepi.resources.planetlab.plcapi) +
+ + +
plot() (nepi.execution.ec.ExperimentController method) +
+ +
+ +
(nepi.util.plotter.ECPlotter method) +
+ +
+ +
populate_factory() (in module nepi.execution.resource) +
+ + +
port_number (nepi.resources.planetlab.openvswitch.ovsport.PlanetlabOVSPort attribute) +
+ + +
ppid (nepi.resources.linux.application.LinuxApplication attribute) +
+ + +
process_content_history() (in module nepi.data.processing.ccn.parser) +
+ + +
process_content_history_logs() (in module nepi.data.processing.ccn.parser) +
+ + +
ProcStatus (class in nepi.util.sshfuncs) +
+ + +
provision() (nepi.execution.ec.ExperimentController method) +
+ +
+ +
(nepi.execution.resource.ResourceManager method) +
+ +
+ +
provision_time (nepi.execution.resource.ResourceManager attribute) +
+ + +
PROVISIONED (nepi.execution.resource.ResourceState attribute) +
+ + +
publish() (nepi.resources.omf.omf_client.OMFClient method) +
+ + +
purge() (nepi.resources.omf.omf_client.OMFClient method) +
+ + +
put() (nepi.util.parallel.ParallelRun method) +
+ + +
put_nowait() (nepi.util.parallel.ParallelRun method) +
+ + +
pygccxml_version (nepi.resources.linux.ns3.ns3simulation.LinuxNS3Simulation attribute) +
+ + +
python_passfd_repo (nepi.resources.linux.netns.netnsemulation.LinuxNetNSEmulation attribute) +
+ + +
python_passfd_src (nepi.resources.linux.netns.netnsemulation.LinuxNetNSEmulation attribute) +
+ + +
python_passfd_version (nepi.resources.linux.netns.netnsemulation.LinuxNetNSEmulation attribute) +
+ + +
python_unshare_repo (nepi.resources.linux.netns.netnsemulation.LinuxNetNSEmulation attribute) +
+ + +
python_unshare_src (nepi.resources.linux.netns.netnsemulation.LinuxNetNSEmulation attribute) +
+ + +
python_unshare_version (nepi.resources.linux.netns.netnsemulation.LinuxNetNSEmulation attribute) +
+ +
+ +

Q

+ + + +
+ +
queue (nepi.resources.ns3.ns3netdevice.NS3BaseNetDevice attribute) +
+ +
+ +
quit() (nepi.util.parallel.WorkerThread method) +
+ +
+ +

R

+ + + +
+ +
range (nepi.execution.attribute.Attribute attribute) +
+ + +
rcopy() (in module nepi.util.sshfuncs) +
+ + +
READY (nepi.execution.resource.ResourceState attribute) +
+ + +
ready (nepi.resources.omf.omf_client.OMFClient attribute) +
+ + +
ready_time (nepi.execution.resource.ResourceManager attribute) +
+ + +
recv_fd() (nepi.resources.ns3.ns3fdnetdevice.NS3BaseFdNetDevice method) +
+ + +
recv_msg() (in module nepi.resources.netns.netnsserver) +
+ +
+ +
(in module nepi.resources.ns3.ns3server) +
+ +
+ +
register() (nepi.resources.omf.omf_client.OMFClient method) +
+ + +
register_condition() (nepi.execution.ec.ExperimentController method) +
+ +
+ +
(nepi.execution.resource.ResourceManager method) +
+ +
+ +
register_connection() (nepi.execution.ec.ExperimentController method) +
+ +
+ +
(nepi.execution.resource.ResourceManager method) +
+ +
+ +
register_resource() (nepi.execution.ec.ExperimentController method) +
+ + +
register_type() (nepi.execution.resource.ResourceFactory class method) +
+ + +
release() (nepi.execution.ec.ExperimentController method) +
+ +
+ +
(nepi.execution.resource.ResourceManager method) +
+ + +
(nepi.resources.omf.omf5_api.OMF5API method) +
+ + +
(nepi.resources.planetlab.plcapi.PLCAPI method) +
+ + +
(nepi.util.sfaapi.SFAAPI method) +
+ +
+ +
release_api() (nepi.resources.omf.omf_api_factory.OMFAPIFactory class method) +
+ + +
release_function() (nepi.resources.omf.messages_6.MessageHandler method) +
+ + +
release_time (nepi.execution.resource.ResourceManager attribute) +
+ + +
RELEASED (nepi.execution.ec.ECState attribute) +
+ +
+ +
(nepi.execution.resource.ResourceState attribute) +
+ +
+ +
remote_socket (nepi.resources.linux.netns.netnsemulation.LinuxNetNSEmulation attribute) +
+ +
+ +
(nepi.resources.linux.ns3.ns3simulation.LinuxNS3Simulation attribute) +
+ +
+ +
remove() (nepi.execution.scheduler.HeapScheduler method) +
+ + +
remove_all_from_slice() (nepi.util.sfaapi.SFAAPI method) +
+ + +
remove_packages() (nepi.resources.linux.node.LinuxNode method) +
+ + +
remove_packages_command() (in module nepi.resources.linux.debfuncs) +
+ +
+ +
(in module nepi.resources.linux.rpmfuncs) +
+ +
+ +
remove_resource() (nepi.execution.ec.ExperimentController method) +
+ + +
remove_resource_from_slice() (nepi.util.manifoldapi.MANIFOLDAPI method) +
+ +
+ +
(nepi.util.sfaapi.SFAAPI method) +
+ +
+ +
replace_args() (nepi.resources.netns.netnswrapper.NetNSWrapper method) +
+ +
+ +
(nepi.resources.ns3.ns3wrapper.NS3Wrapper method) +
+ +
+ +
replace_kwargs() (nepi.resources.netns.netnswrapper.NetNSWrapper method) +
+ +
+ +
(nepi.resources.ns3.ns3wrapper.NS3Wrapper method) +
+ +
+ +
replace_paths() (nepi.resources.linux.application.LinuxApplication method) +
+ +
+ +
(nepi.resources.linux.netns.netnsemulation.LinuxNetNSEmulation method) +
+ + +
(nepi.resources.linux.ns3.ns3simulation.LinuxNS3Simulation method) +
+ +
+ +
request_function() (nepi.resources.omf.messages_6.MessageHandler method) +
+ + +
reschedule_delay (nepi.execution.resource.ResourceManager attribute) +
+ + +
reserve() (nepi.execution.resource.ResourceManager method) +
+ + +
reserve_host() (nepi.resources.planetlab.plcapi.PLCAPI method) +
+ +
+ +
reserve_resource() (nepi.util.sfaapi.SFAAPI method) +
+ + +
Reserved (nepi.execution.attribute.Flags attribute) +
+ + +
RESERVED (nepi.execution.resource.ResourceState attribute) +
+ + +
reserved() (nepi.resources.planetlab.plcapi.PLCAPI method) +
+ +
+ +
(nepi.util.sfaapi.SFAAPI method) +
+ +
+ +
reserved_time (nepi.execution.resource.ResourceManager attribute) +
+ + +
resolve_hostname() (in module nepi.util.sshfuncs) +
+ + +
resource_types() (nepi.execution.resource.ResourceFactory class method) +
+ + +
ResourceAction (class in nepi.execution.resource) +
+ + +
ResourceFactory (class in nepi.execution.resource) +
+ + +
ResourceGateway (class in nepi.resources.omf.omf_resource) +
+ + +
ResourceManager (class in nepi.execution.resource) +
+ + +
resources (nepi.execution.ec.ExperimentController attribute) +
+ + +
ResourceState (class in nepi.execution.resource) +
+ + +
retract() (nepi.resources.omf.omf_client.OMFClient method) +
+ + +
rexec() (in module nepi.util.sshfuncs) +
+ + +
rgetpid() (in module nepi.util.sshfuncs) +
+ + +
rkill() (in module nepi.util.sshfuncs) +
+ + +
RM_FAILURE (nepi.execution.ec.FailureLevel attribute) +
+ + +
rmdir() (nepi.resources.linux.node.LinuxNode method) +
+ + +
rspawn() (in module nepi.util.sshfuncs) +
+ + +
rstatus() (in module nepi.util.sshfuncs) +
+ + +
run() (nepi.execution.runner.ExperimentRunner method) +
+ +
+ +
(nepi.resources.linux.node.LinuxNode method) +
+ + +
(nepi.util.parallel.WorkerThread method) +
+ +
+ +
run_and_wait() (nepi.resources.linux.node.LinuxNode method) +
+ + +
run_dir (nepi.execution.ec.ExperimentController attribute) +
+ + +
run_experiment() (nepi.execution.runner.ExperimentRunner method) +
+ + +
run_home (nepi.resources.linux.application.LinuxApplication attribute) +
+ +
+ +
(nepi.resources.linux.node.LinuxNode attribute) +
+ +
+ +
run_home() (nepi.resources.linux.ns3.fdudptunnel.LinuxNs3FdUdpTunnel method) +
+ +
+ +
(nepi.resources.linux.tunnel.LinuxTunnel method) +
+ +
+ +
run_id (nepi.execution.ec.ExperimentController attribute) +
+ + +
run_server() (in module nepi.resources.netns.netnsserver) +
+ +
+ +
(in module nepi.resources.ns3.ns3server) +
+ +
+ +
RUNNING (nepi.execution.ec.ECState attribute) +
+ +
+ +
(nepi.util.sshfuncs.ProcStatus attribute) +
+ +
+
+ +

S

+ + + +
+ +
save() (nepi.execution.ec.ExperimentController method) +
+ +
+ +
(nepi.util.serializer.ECSerializer method) +
+ +
+ +
schedule() (nepi.execution.ec.ExperimentController method) +
+ +
+ +
(nepi.execution.scheduler.HeapScheduler method) +
+ +
+ +
script_path (nepi.resources.netns.netnswrapper_debug.NetNSWrapperDebuger attribute) +
+ +
+ +
(nepi.resources.ns3.ns3wrapper_debug.NS3WrapperDebuger attribute) +
+ +
+ +
select_base_class() (in module nepi.resources.ns3.resource_manager_generator) +
+ + +
select_random_source() (nepi.util.netgraph.NetGraph method) +
+ + +
select_target_zero() (nepi.util.netgraph.NetGraph method) +
+ + +
send_msg() (nepi.resources.linux.netns.netnsclient.LinuxNetNSClient method) +
+ +
+ +
(nepi.resources.linux.ns3.ns3client.LinuxNS3Client method) +
+ +
+ +
send_reply() (in module nepi.resources.netns.netnsserver) +
+ +
+ +
(in module nepi.resources.ns3.ns3server) +
+ +
+ +
send_stdin() (nepi.resources.omf.omf5_api.OMF5API method) +
+ + +
serialize() (nepi.execution.ec.ExperimentController method) +
+ +
+ +
(nepi.util.serializer.ECSerializer method) +
+ +
+ +
servers_on() (nepi.resources.planetlab.openvswitch.ovs.PlanetlabOVSSwitch method) +
+ + +
SET (nepi.resources.netns.netnsserver.NetNSWrapperMessage attribute) +
+ +
+ +
(nepi.resources.ns3.ns3server.NS3WrapperMessage attribute) +
+ +
+ +
set() (nepi.execution.ec.ExperimentController method) +
+ +
+ +
(nepi.execution.resource.ResourceManager method) +
+ + +
(nepi.resources.linux.netns.netnsclient.LinuxNetNSClient method) +
+ + +
(nepi.resources.linux.ns3.ns3client.LinuxNS3Client method) +
+ + +
(nepi.resources.netns.netnsbase.NetNSBase method) +
+ + +
(nepi.resources.netns.netnsclient.NetNSClient method) +
+ + +
(nepi.resources.netns.netnswrapper.NetNSWrapper method) +
+ + +
(nepi.resources.ns3.ns3base.NS3Base method) +
+ + +
(nepi.resources.ns3.ns3client.NS3Client method) +
+ + +
(nepi.resources.ns3.ns3wrapper.NS3Wrapper method) +
+ +
+ +
set_discovered() (nepi.execution.resource.ResourceManager method) +
+ + +
set_ec() (nepi.execution.ec.FailureManager method) +
+ + +
set_ec_failure() (nepi.execution.ec.FailureManager method) +
+ + +
set_failed() (nepi.execution.resource.ResourceManager method) +
+ + +
set_global() (nepi.execution.ec.ExperimentController method) +
+ +
+ +
(nepi.execution.resource.ResourceManager class method) +
+ +
+ +
set_hook_mtu() (nepi.resources.linux.interface.LinuxInterface method) +
+ + +
set_hook_up() (nepi.resources.linux.interface.LinuxInterface method) +
+ + +
set_provisioned() (nepi.execution.resource.ResourceManager method) +
+ + +
set_ready() (nepi.execution.resource.ResourceManager method) +
+ + +
set_released() (nepi.execution.resource.ResourceManager method) +
+ + +
set_reserved() (nepi.execution.resource.ResourceManager method) +
+ + +
set_source() (nepi.util.netgraph.NetGraph method) +
+ + +
set_started() (nepi.execution.resource.ResourceManager method) +
+ + +
set_state() (nepi.execution.resource.ResourceManager method) +
+ + +
set_state_time() (nepi.execution.resource.ResourceManager method) +
+ + +
set_stopped() (nepi.execution.resource.ResourceManager method) +
+ + +
set_target() (nepi.util.netgraph.NetGraph method) +
+ + +
set_value() (nepi.execution.attribute.Attribute method) +
+ + +
set_with_conditions() (nepi.execution.ec.ExperimentController method) +
+ +
+ +
(nepi.execution.resource.ResourceManager method) +
+ +
+ +
SFAAPI (class in nepi.util.sfaapi) +
+ + +
sfaapi (nepi.resources.omf.wilabt_node.WilabtSfaNode attribute) +
+ +
+ +
(nepi.resources.planetlab.sfa_node.PlanetlabSfaNode attribute) +
+ +
+ +
SFAAPIFactory (class in nepi.util.sfaapi) +
+ + +
SfaRSpecProcessing (class in nepi.util.sfarspec_proc) +
+ + +
SFormats (class in nepi.util.serializer) +
+ +
+ +
share_dir (nepi.resources.linux.node.LinuxNode attribute) +
+ + +
shell_escape() (in module nepi.util.sshfuncs) +
+ + +
SHUTDOWN (nepi.resources.netns.netnsserver.NetNSWrapperMessage attribute) +
+ +
+ +
(nepi.resources.ns3.ns3server.NS3WrapperMessage attribute) +
+ +
+ +
shutdown() (nepi.execution.ec.ExperimentController method) +
+ +
+ +
(nepi.resources.linux.netns.netnsclient.LinuxNetNSClient method) +
+ + +
(nepi.resources.linux.ns3.ns3client.LinuxNS3Client method) +
+ + +
(nepi.resources.netns.netnsclient.NetNSClient method) +
+ + +
(nepi.resources.netns.netnsemulation.NetNSEmulation method) +
+ + +
(nepi.resources.netns.netnswrapper.NetNSWrapper method) +
+ + +
(nepi.resources.ns3.ns3client.NS3Client method) +
+ + +
(nepi.resources.ns3.ns3simulation.NS3Simulation method) +
+ + +
(nepi.resources.ns3.ns3wrapper.NS3Wrapper method) +
+ +
+ +
simulation (nepi.resources.linux.ns3.ns3client.LinuxNS3Client attribute) +
+ +
+ +
(nepi.resources.ns3.ns3base.NS3Base attribute) +
+ + +
(nepi.resources.ns3.ns3channel.NS3BaseChannel attribute) +
+ + +
(nepi.resources.ns3.ns3node.NS3BaseNode attribute) +
+ + +
(nepi.resources.ns3.ns3propagationdelaymodel.NS3BasePropagationDelayModel attribute) +
+ + +
(nepi.resources.ns3.ns3propagationlossmodel.NS3BasePropagationLossModel attribute) +
+ + +
(nepi.resources.ns3.ns3wifichannel.NS3BaseWifiChannel attribute) +
+ +
+ +
SIZE (nepi.execution.trace.TraceAttr attribute) +
+ + +
sock_name (nepi.resources.linux.tap.LinuxTap attribute) +
+ + +
socket_name (nepi.resources.linux.netns.netnsemulation.LinuxNetNSEmulation attribute) +
+ +
+ +
(nepi.resources.linux.ns3.ns3simulation.LinuxNS3Simulation attribute) +
+ +
+ +
sources() (nepi.util.netgraph.NetGraph method) +
+ + +
src_dir (nepi.resources.linux.node.LinuxNode attribute) +
+ + +
stabsformat() (in module nepi.util.timefuncs) +
+ + +
STAR (nepi.util.netgraph.TopologyType attribute) +
+ + +
START (nepi.execution.resource.ResourceAction attribute) +
+ +
+ +
(nepi.resources.ns3.ns3server.NS3WrapperMessage attribute) +
+ +
+ +
start() (nepi.execution.ec.ExperimentController method) +
+ +
+ +
(nepi.execution.resource.ResourceManager method) +
+ + +
(nepi.resources.linux.ns3.ns3client.LinuxNS3Client method) +
+ + +
(nepi.resources.ns3.ns3client.NS3Client method) +
+ + +
(nepi.resources.ns3.ns3simulation.NS3Simulation method) +
+ + +
(nepi.resources.ns3.ns3wrapper.NS3Wrapper method) +
+ + +
(nepi.resources.omf.omf_client.OMFClient method) +
+ + +
(nepi.util.parallel.ParallelRun method) +
+ +
+ +
start_multicall() (nepi.resources.planetlab.plcapi.PLCAPI method) +
+ + +
start_time (nepi.execution.resource.ResourceManager attribute) +
+ + +
start_with_conditions() (nepi.execution.resource.ResourceManager method) +
+ + +
STARTED (nepi.execution.resource.ResourceState attribute) +
+ + +
state (nepi.execution.resource.ResourceManager attribute) +
+ +
+ +
(nepi.resources.linux.application.LinuxApplication attribute) +
+ + +
(nepi.resources.linux.ccn.ccnd.LinuxCCND attribute) +
+ + +
(nepi.resources.linux.ns3.ns3simulation.LinuxNS3Simulation attribute) +
+ + +
(nepi.resources.linux.tap.LinuxTap attribute) +
+ + +
(nepi.resources.linux.tunnel.LinuxTunnel attribute) +
+ + +
(nepi.resources.netns.netnsapplication.NetNSApplication attribute) +
+ + +
(nepi.resources.netns.netnsbase.NetNSBase attribute) +
+ + +
(nepi.resources.ns3.ns3application.NS3BaseApplication attribute) +
+ + +
(nepi.resources.ns3.ns3base.NS3Base attribute) +
+ +
+ +
state() (nepi.execution.ec.ExperimentController method) +
+ + +
status() (nepi.resources.linux.node.LinuxNode method) +
+ + +
stdin_function() (nepi.resources.omf.messages_5_4.MessageHandler method) +
+ + +
stdin_hook() (nepi.resources.omf.application.OMFApplication method) +
+ + +
STDOUT (class in nepi.util.sshfuncs) +
+ + +
stformat() (in module nepi.util.timefuncs) +
+ + +
STOP (nepi.execution.resource.ResourceAction attribute) +
+ +
+ +
(nepi.resources.ns3.ns3server.NS3WrapperMessage attribute) +
+ +
+ +
stop() (nepi.execution.ec.ExperimentController method) +
+ +
+ +
(nepi.execution.resource.ResourceManager method) +
+ + +
(nepi.resources.linux.ns3.ns3client.LinuxNS3Client method) +
+ + +
(nepi.resources.ns3.ns3client.NS3Client method) +
+ + +
(nepi.resources.ns3.ns3simulation.NS3Simulation method) +
+ + +
(nepi.resources.ns3.ns3wrapper.NS3Wrapper method) +
+ +
+ +
stop_time (nepi.execution.resource.ResourceManager attribute) +
+ + +
stop_with_conditions() (nepi.execution.resource.ResourceManager method) +
+ + +
STOPPED (nepi.execution.resource.ResourceState attribute) +
+ + +
store_path (nepi.resources.all.collector.Collector attribute) +
+ + +
STREAM (nepi.execution.trace.TraceAttr attribute) +
+ + +
String (nepi.execution.attribute.Types attribute) +
+ + +
subscribe() (nepi.resources.omf.omf_client.OMFClient method) +
+ + +
subscriptions() (nepi.resources.omf.omf_client.OMFClient method) +
+ + +
switch (nepi.resources.netns.netnsnodeinterface.NetNSNodeInterface attribute) +
+ + +
sync() (nepi.util.parallel.ParallelRun method) +
+ +
+ +

T

+ + + +
+ +
tap (nepi.resources.linux.ns3.tuntapfdlink.LinuxTunTapFdLink attribute) +
+ +
+ +
(nepi.resources.planetlab.ns3.tuntapfdlink.PlanetlabTunTapFdLink attribute) +
+ + +
(nepi.resources.planetlab.vroute.PlanetlabVroute attribute) +
+ +
+ +
tapnode (nepi.resources.linux.ns3.tuntapfdlink.LinuxTunTapFdLink attribute) +
+ + +
targets() (nepi.util.netgraph.NetGraph method) +
+ + +
Task (class in nepi.execution.scheduler) +
+ + +
TaskStatus (class in nepi.execution.scheduler) +
+ + +
tdiff() (in module nepi.util.timefuncs) +
+ + +
tdiffsec() (in module nepi.util.timefuncs) +
+ + +
template_attributes() (in module nepi.resources.ns3.resource_manager_generator) +
+ + +
template_traces() (in module nepi.resources.ns3.resource_manager_generator) +
+ + +
terminate_connection() (nepi.resources.linux.gretunnel.LinuxGRETunnel method) +
+ +
+ +
(nepi.resources.linux.ns3.fdudptunnel.LinuxNs3FdUdpTunnel method) +
+ + +
(nepi.resources.linux.tap.LinuxTap method) +
+ + +
(nepi.resources.linux.tunnel.LinuxTunnel method) +
+ + +
(nepi.resources.linux.udptunnel.LinuxUdpTunnel method) +
+ + +
(nepi.resources.planetlab.openvswitch.ovsport.PlanetlabOVSPort method) +
+ +
+ +
TERMINATED (nepi.execution.ec.ECState attribute) +
+ + +
test() (nepi.resources.planetlab.plcapi.PLCAPI method) +
+ + +
TestbedtoGateway (nepi.resources.omf.omf_resource.ResourceGateway attribute) +
+ + +
tnow() (in module nepi.util.timefuncs) +
+ + +
to_type() (in module nepi.util.parsers.xml_parser) +
+ +
+ +
to_xml() (nepi.util.parsers.xml_parser.ECXMLParser method) +
+ + +
topo_type (nepi.util.netgraph.NetGraph attribute) +
+ + +
topology (nepi.util.netgraph.NetGraph attribute) +
+ + +
TopologyType (class in nepi.util.netgraph) +
+ + +
Trace (class in nepi.execution.trace) +
+ + +
trace() (nepi.execution.ec.ExperimentController method) +
+ +
+ +
(nepi.execution.resource.ResourceManager method) +
+ + +
(nepi.resources.linux.application.LinuxApplication method) +
+ + +
(nepi.resources.linux.ccn.fibentry.LinuxFIBEntry method) +
+ + +
(nepi.resources.linux.ns3.ns3simulation.LinuxNS3Simulation method) +
+ + +
(nepi.resources.netns.netnsbase.NetNSBase method) +
+ + +
(nepi.resources.ns3.ns3base.NS3Base method) +
+ + +
(nepi.resources.ns3.ns3dceapplication.NS3BaseDceApplication method) +
+ + +
(nepi.resources.omf.application.OMFApplication method) +
+ +
+ +
trace_enabled() (nepi.execution.ec.ExperimentController method) +
+ +
+ +
(nepi.execution.resource.ResourceManager method) +
+ +
+ +
trace_filepath() (nepi.resources.linux.application.LinuxApplication method) +
+ + +
TraceAttr (class in nepi.execution.trace) +
+ + +
traceroute (nepi.resources.linux.ccn.fibentry.LinuxFIBEntry attribute) +
+ + +
TREE (nepi.util.netgraph.TopologyType attribute) +
+ + +
tsformat() (in module nepi.util.timefuncs) +
+ + +
type (nepi.execution.attribute.Attribute attribute) +
+ + +
Types (class in nepi.execution.attribute) +
+ +
+ +

U

+ + + +
+ +
UBUNTU (nepi.resources.linux.node.OSType attribute) +
+ + +
udp_connect() (nepi.resources.linux.tap.LinuxTap method) +
+ + +
unblacklist_host() (nepi.resources.planetlab.plcapi.PLCAPI method) +
+ + +
unenroll_topic() (nepi.resources.omf.omf6_api.OMF6API method) +
+ + +
unregister() (nepi.resources.omf.omf_client.OMFClient method) +
+ + +
unregister_condition() (nepi.execution.resource.ResourceManager method) +
+ + +
unregister_connection() (nepi.execution.resource.ResourceManager method) +
+ + +
unreserve_host() (nepi.resources.planetlab.plcapi.PLCAPI method) +
+ + +
unsubscribe() (nepi.resources.omf.omf_client.OMFClient method) +
+ + +
update_slice() (nepi.resources.planetlab.plcapi.PLCAPI method) +
+ + +
upload() (nepi.resources.linux.node.LinuxNode method) +
+ + +
upload_binaries() (nepi.resources.linux.application.LinuxApplication method) +
+ +
+ +
upload_code() (nepi.resources.linux.application.LinuxApplication method) +
+ + +
upload_command() (nepi.resources.linux.node.LinuxNode method) +
+ + +
upload_extra_sources() (nepi.resources.linux.netns.netnsemulation.LinuxNetNSEmulation method) +
+ +
+ +
(nepi.resources.linux.ns3.ns3simulation.LinuxNS3Simulation method) +
+ +
+ +
upload_files() (nepi.resources.linux.application.LinuxApplication method) +
+ + +
upload_libraries() (nepi.resources.linux.application.LinuxApplication method) +
+ + +
upload_sources() (nepi.resources.linux.application.LinuxApplication method) +
+ +
+ +
(nepi.resources.linux.netns.netnsemulation.LinuxNetNSEmulation method) +
+ + +
(nepi.resources.linux.ns3.fdudptunnel.LinuxNs3FdUdpTunnel method) +
+ + +
(nepi.resources.linux.ns3.ns3simulation.LinuxNS3Simulation method) +
+ + +
(nepi.resources.linux.ns3.tuntapfdlink.LinuxTunTapFdLink method) +
+ + +
(nepi.resources.linux.route.LinuxRoute method) +
+ + +
(nepi.resources.linux.tap.LinuxTap method) +
+ + +
(nepi.resources.planetlab.ns3.tuntapfdlink.PlanetlabTunTapFdLink method) +
+ + +
(nepi.resources.planetlab.tap.PlanetlabTap method) +
+ + +
(nepi.resources.planetlab.vroute.PlanetlabVroute method) +
+ +
+ +
upload_start_command() (nepi.resources.linux.application.LinuxApplication method) +
+ +
+ +
(nepi.resources.linux.ccn.ccncontent.LinuxCCNContent method) +
+ + +
(nepi.resources.linux.ccn.ccnd.LinuxCCND method) +
+ + +
(nepi.resources.linux.ccn.ccnr.LinuxCCNR method) +
+ + +
(nepi.resources.linux.ccn.fibentry.LinuxFIBEntry method) +
+ + +
(nepi.resources.linux.mtr.LinuxMtr method) +
+ + +
(nepi.resources.linux.netns.netnsemulation.LinuxNetNSEmulation method) +
+ + +
(nepi.resources.linux.ns3.ns3simulation.LinuxNS3Simulation method) +
+ + +
(nepi.resources.linux.ns3.tuntapfdlink.LinuxTunTapFdLink method) +
+ + +
(nepi.resources.linux.ping.LinuxPing method) +
+ + +
(nepi.resources.linux.route.LinuxRoute method) +
+ + +
(nepi.resources.linux.tap.LinuxTap method) +
+ + +
(nepi.resources.linux.traceroute.LinuxTraceroute method) +
+ + +
(nepi.resources.linux.udptest.LinuxUdpTest method) +
+ + +
(nepi.resources.planetlab.tap.PlanetlabTap method) +
+ + +
(nepi.resources.planetlab.vroute.PlanetlabVroute method) +
+ +
+ +
upload_stdin() (nepi.resources.linux.application.LinuxApplication method) +
+ + +
use_deb (nepi.resources.linux.node.LinuxNode attribute) +
+ + +
use_rpm (nepi.resources.linux.node.LinuxNode attribute) +
+ + +
usr_dir (nepi.resources.linux.node.LinuxNode attribute) +
+ + +
uuid (nepi.resources.netns.netnsbase.NetNSBase attribute) +
+ +
+ +
(nepi.resources.ns3.ns3base.NS3Base attribute) +
+ +
+
+ +

V

+ + + +
+ +
valid_connection() (nepi.execution.resource.ResourceManager method) +
+ +
+ +
(nepi.resources.all.collector.Collector method) +
+ + +
(nepi.resources.linux.application.LinuxApplication method) +
+ + +
(nepi.resources.linux.ccn.ccnapplication.LinuxCCNApplication method) +
+ + +
(nepi.resources.linux.ccn.ccncat.LinuxCCNCat method) +
+ + +
(nepi.resources.linux.ccn.ccncontent.LinuxCCNContent method) +
+ + +
(nepi.resources.linux.ccn.ccnd.LinuxCCND method) +
+ + +
(nepi.resources.linux.ccn.ccnpeek.LinuxCCNPeek method) +
+ + +
(nepi.resources.linux.ccn.ccnping.LinuxCCNPing method) +
+ + +
(nepi.resources.linux.ccn.ccnpingserver.LinuxCCNPingServer method) +
+ + +
(nepi.resources.linux.ccn.ccnpoke.LinuxCCNPoke method) +
+ + +
(nepi.resources.linux.ccn.ccnr.LinuxCCNR method) +
+ + +
(nepi.resources.linux.ccn.fibentry.LinuxFIBEntry method) +
+ + +
(nepi.resources.linux.channel.LinuxChannel method) +
+ + +
(nepi.resources.linux.gretunnel.LinuxGRETunnel method) +
+ + +
(nepi.resources.linux.interface.LinuxInterface method) +
+ + +
(nepi.resources.linux.mtr.LinuxMtr method) +
+ + +
(nepi.resources.linux.netns.netnsemulation.LinuxNetNSEmulation method) +
+ + +
(nepi.resources.linux.node.LinuxNode method) +
+ + +
(nepi.resources.linux.nping.LinuxNPing method) +
+ + +
(nepi.resources.linux.ns3.ns3simulation.LinuxNS3Simulation method) +
+ + +
(nepi.resources.linux.ping.LinuxPing method) +
+ + +
(nepi.resources.linux.tap.LinuxTap method) +
+ + +
(nepi.resources.linux.tcpdump.LinuxTcpdump method) +
+ + +
(nepi.resources.linux.traceroute.LinuxTraceroute method) +
+ + +
(nepi.resources.linux.tunnel.LinuxTunnel method) +
+ + +
(nepi.resources.linux.udptest.LinuxUdpTest method) +
+ + +
(nepi.resources.omf.application.OMFApplication method) +
+ + +
(nepi.resources.omf.channel.OMFChannel method) +
+ + +
(nepi.resources.omf.interface.OMFWifiInterface method) +
+ + +
(nepi.resources.omf.node.OMFNode method) +
+ + +
(nepi.resources.omf.wilabt_node.WilabtSfaNode method) +
+ + +
(nepi.resources.planetlab.node.PlanetlabNode method) +
+ + +
(nepi.resources.planetlab.openvswitch.ovs.PlanetlabOVSSwitch method) +
+ + +
(nepi.resources.planetlab.openvswitch.ovsport.PlanetlabOVSPort method) +
+ + +
(nepi.resources.planetlab.sfa_node.PlanetlabSfaNode method) +
+ + +
(nepi.resources.planetlab.tap.PlanetlabTap method) +
+ + +
(nepi.resources.planetlab.vroute.PlanetlabVroute method) +
+ +
+ +
value (nepi.execution.attribute.Attribute attribute) +
+ + +
verify() (nepi.resources.linux.ns3.fdudptunnel.LinuxNs3FdUdpTunnel method) +
+ + +
verify_connection() (nepi.resources.linux.gretunnel.LinuxGRETunnel method) +
+ +
+ +
(nepi.resources.linux.ns3.fdudptunnel.LinuxNs3FdUdpTunnel method) +
+ + +
(nepi.resources.linux.tap.LinuxTap method) +
+ + +
(nepi.resources.linux.tunnel.LinuxTunnel method) +
+ + +
(nepi.resources.linux.udptunnel.LinuxUdpTunnel method) +
+ + +
(nepi.resources.planetlab.openvswitch.ovsport.PlanetlabOVSPort method) +
+ +
+ +
version (nepi.resources.linux.ccn.ccnd.LinuxCCND attribute) +
+ +
+ +
(nepi.resources.linux.ns3.ccn.ns3ccnddceapplication.LinuxNS3DceCCND attribute) +
+ +
+
+ +
vif_name_file (nepi.resources.planetlab.tap.PlanetlabTap attribute) +
+ + +
vif_prefix (nepi.resources.linux.tap.LinuxTap attribute) +
+ + +
vif_type (nepi.resources.linux.tap.LinuxTap attribute) +
+ + +
vif_type_flag (nepi.resources.linux.tap.LinuxTap attribute) +
+ +
+ +

W

+ + + +
+ +
wait() (nepi.execution.ec.ExperimentController method) +
+ + +
wait_deployed() (nepi.execution.ec.ExperimentController method) +
+ + +
wait_file() (nepi.resources.linux.ns3.fdudptunnel.LinuxNs3FdUdpTunnel method) +
+ +
+ +
(nepi.resources.linux.tap.LinuxTap method) +
+ +
+ +
wait_finished() (nepi.execution.ec.ExperimentController method) +
+ + +
wait_local_port() (nepi.resources.linux.ns3.fdudptunnel.LinuxNs3FdUdpTunnel method) +
+ + +
wait_pid() (nepi.resources.linux.node.LinuxNode method) +
+ + +
wait_released() (nepi.execution.ec.ExperimentController method) +
+ + +
wait_remote_socket() (nepi.resources.linux.netns.netnsemulation.LinuxNetNSEmulation method) +
+ +
+ +
(nepi.resources.linux.ns3.ns3simulation.LinuxNS3Simulation method) +
+ +
+
+ +
wait_result() (nepi.resources.linux.ns3.fdudptunnel.LinuxNs3FdUdpTunnel method) +
+ + +
wait_run() (nepi.resources.linux.node.LinuxNode method) +
+ + +
wait_started() (nepi.execution.ec.ExperimentController method) +
+ + +
wait_vif_name() (nepi.resources.planetlab.tap.PlanetlabTap method) +
+ + +
warning() (nepi.util.logger.Logger method) +
+ + +
WilabtSfaNode (class in nepi.resources.omf.wilabt_node) +
+ + +
WorkerThread (class in nepi.util.parallel) +
+ + +
WorkerThread.QUIT (class in nepi.util.parallel) +
+ +
+ +

X

+ + + +
+ +
XML (nepi.util.serializer.SFormats attribute) +
+ + +
xmldecode() (in module nepi.util.parsers.xml_parser) +
+ +
+ +
xmlencode() (in module nepi.util.parsers.xml_parser) +
+ +
+ + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/index.html b/doc/sphinx/_build/html/index.html new file mode 100644 index 00000000..f5861b3c --- /dev/null +++ b/doc/sphinx/_build/html/index.html @@ -0,0 +1,201 @@ + + + + + + + + NEPI modules — NEPI 3.0 documentation + + + + + + + + + + + + +
+
+

Table Of Contents

+ + +

This Page

+ + + +
+
+ +
+
+
+
+ +
+

NEPI modules¶

+

This page documents the NEPI source code. It presents the NEPI core modules, the Platform resource modules (i.e. drivers to manage platforms), and other miscellaneous classes.

+
+

Core modules¶

+
+
+
+
+
+

Platform modules¶

+
+
+
+
+
+

Miscellaneous modules¶

+
+
+
+
+
    +
+
+
+
+
+

Indices and tables¶

+ +
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/objects.inv b/doc/sphinx/_build/html/objects.inv new file mode 100644 index 00000000..2c3613a6 Binary files /dev/null and b/doc/sphinx/_build/html/objects.inv differ diff --git a/doc/sphinx/_build/html/py-modindex.html b/doc/sphinx/_build/html/py-modindex.html new file mode 100644 index 00000000..5cdeea12 --- /dev/null +++ b/doc/sphinx/_build/html/py-modindex.html @@ -0,0 +1,1424 @@ + + + + + + + + Python Module Index — NEPI 3.0 documentation + + + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+
+
+ + +

Python Module Index

+ +
+ n +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 
+ n
+ nepi +
    + nepi.data +
    + nepi.data.processing +
    + nepi.data.processing.ccn +
    + nepi.data.processing.ccn.parser +
    + nepi.data.processing.ping +
    + nepi.data.processing.ping.parser +
    + nepi.execution +
    + nepi.execution.attribute +
    + nepi.execution.ec +
    + nepi.execution.resource +
    + nepi.execution.runner +
    + nepi.execution.scheduler +
    + nepi.execution.tags +
    + nepi.execution.trace +
    + nepi.resources +
    + nepi.resources.all +
    + nepi.resources.all.collector +
    + nepi.resources.linux +
    + nepi.resources.linux.application +
    + nepi.resources.linux.ccn +
    + nepi.resources.linux.ccn.ccnapplication +
    + nepi.resources.linux.ccn.ccncat +
    + nepi.resources.linux.ccn.ccncontent +
    + nepi.resources.linux.ccn.ccnd +
    + nepi.resources.linux.ccn.ccnpeek +
    + nepi.resources.linux.ccn.ccnping +
    + nepi.resources.linux.ccn.ccnpingserver +
    + nepi.resources.linux.ccn.ccnpoke +
    + nepi.resources.linux.ccn.ccnr +
    + nepi.resources.linux.ccn.fibentry +
    + nepi.resources.linux.channel +
    + nepi.resources.linux.debfuncs +
    + nepi.resources.linux.gretunnel +
    + nepi.resources.linux.interface +
    + nepi.resources.linux.mtr +
    + nepi.resources.linux.netns +
    + nepi.resources.linux.netns.netnsclient +
    + nepi.resources.linux.netns.netnsemulation +
    + nepi.resources.linux.node +
    + nepi.resources.linux.nping +
    + nepi.resources.linux.ns3 +
    + nepi.resources.linux.ns3.ccn +
    + nepi.resources.linux.ns3.ccn.ns3ccncatdceapplication +
    + nepi.resources.linux.ns3.ccn.ns3ccndceapplication +
    + nepi.resources.linux.ns3.ccn.ns3ccnddceapplication +
    + nepi.resources.linux.ns3.ccn.ns3ccnpeekdceapplication +
    + nepi.resources.linux.ns3.ccn.ns3ccnpokedceapplication +
    + nepi.resources.linux.ns3.ccn.ns3ccnrdceapplication +
    + nepi.resources.linux.ns3.ccn.ns3fibentrydceapplication +
    + nepi.resources.linux.ns3.fdudptunnel +
    + nepi.resources.linux.ns3.ns3client +
    + nepi.resources.linux.ns3.ns3dceapplication +
    + nepi.resources.linux.ns3.ns3pingdceapplication +
    + nepi.resources.linux.ns3.ns3simulation +
    + nepi.resources.linux.ns3.tuntapfdlink +
    + nepi.resources.linux.ping +
    + nepi.resources.linux.route +
    + nepi.resources.linux.rpmfuncs +
    + nepi.resources.linux.tap +
    + nepi.resources.linux.tcpdump +
    + nepi.resources.linux.traceroute +
    + nepi.resources.linux.tun +
    + nepi.resources.linux.tunnel +
    + nepi.resources.linux.udptest +
    + nepi.resources.linux.udptunnel +
    + nepi.resources.netns +
    + nepi.resources.netns.netnsapplication +
    + nepi.resources.netns.netnsbase +
    + nepi.resources.netns.netnsclient +
    + nepi.resources.netns.netnsemulation +
    + nepi.resources.netns.netnsinterface +
    + nepi.resources.netns.netnsipv4address +
    + nepi.resources.netns.netnsnode +
    + nepi.resources.netns.netnsnodeinterface +
    + nepi.resources.netns.netnsroute +
    + nepi.resources.netns.netnsserver +
    + nepi.resources.netns.netnsswitch +
    + nepi.resources.netns.netnswrapper +
    + nepi.resources.netns.netnswrapper_debug +
    + nepi.resources.ns3 +
    + nepi.resources.ns3.classes +
    + nepi.resources.ns3.classes.aarf_wifi_manager +
    + nepi.resources.ns3.classes.aarfcd_wifi_manager +
    + nepi.resources.ns3.classes.adhoc_wifi_mac +
    + nepi.resources.ns3.classes.aloha_noack_net_device +
    + nepi.resources.ns3.classes.amrr_wifi_manager +
    + nepi.resources.ns3.classes.ap_wifi_mac +
    + nepi.resources.ns3.classes.arf_wifi_manager +
    + nepi.resources.ns3.classes.arp_l3protocol +
    + nepi.resources.ns3.classes.base_station_net_device +
    + nepi.resources.ns3.classes.binary_error_model +
    + nepi.resources.ns3.classes.binary_error_sixlow_model +
    + nepi.resources.ns3.classes.bridge_channel +
    + nepi.resources.ns3.classes.bridge_net_device +
    + nepi.resources.ns3.classes.bulk_send_application +
    + nepi.resources.ns3.classes.burst_error_model +
    + nepi.resources.ns3.classes.cara_wifi_manager +
    + nepi.resources.ns3.classes.constant_acceleration_mobility_model +
    + nepi.resources.ns3.classes.constant_position_mobility_model +
    + nepi.resources.ns3.classes.constant_rate_wifi_manager +
    + nepi.resources.ns3.classes.constant_speed_propagation_delay_model +
    + nepi.resources.ns3.classes.constant_velocity_mobility_model +
    + nepi.resources.ns3.classes.cost231propagation_loss_model +
    + nepi.resources.ns3.classes.csma_channel +
    + nepi.resources.ns3.classes.csma_net_device +
    + nepi.resources.ns3.classes.drop_tail_queue +
    + nepi.resources.ns3.classes.dsrdsr_routing +
    + nepi.resources.ns3.classes.emu_net_device +
    + nepi.resources.ns3.classes.error_channel +
    + nepi.resources.ns3.classes.error_channel_sixlow +
    + nepi.resources.ns3.classes.error_net_device +
    + nepi.resources.ns3.classes.fd_net_device +
    + nepi.resources.ns3.classes.fixed_rss_loss_model +
    + nepi.resources.ns3.classes.friis_propagation_loss_model +
    + nepi.resources.ns3.classes.gauss_markov_mobility_model +
    + nepi.resources.ns3.classes.hierarchical_mobility_model +
    + nepi.resources.ns3.classes.hybrid_buildings_propagation_loss_model +
    + nepi.resources.ns3.classes.icmpv4l4protocol +
    + nepi.resources.ns3.classes.icmpv6l4protocol +
    + nepi.resources.ns3.classes.ideal_wifi_manager +
    + nepi.resources.ns3.classes.ipv4l3protocol +
    + nepi.resources.ns3.classes.itu_r1411los_propagation_loss_model +
    + nepi.resources.ns3.classes.itu_r1411nlos_over_rooftop_propagation_loss_model +
    + nepi.resources.ns3.classes.jakes_propagation_loss_model +
    + nepi.resources.ns3.classes.kun2600mhz_propagation_loss_model +
    + nepi.resources.ns3.classes.list_error_model +
    + nepi.resources.ns3.classes.log_distance_propagation_loss_model +
    + nepi.resources.ns3.classes.loopback_net_device +
    + nepi.resources.ns3.classes.lr_wpan_net_device +
    + nepi.resources.ns3.classes.lte_enb_net_device +
    + nepi.resources.ns3.classes.lte_simple_net_device +
    + nepi.resources.ns3.classes.lte_ue_net_device +
    + nepi.resources.ns3.classes.matrix_propagation_loss_model +
    + nepi.resources.ns3.classes.mesh_point_device +
    + nepi.resources.ns3.classes.mesh_wifi_interface_mac +
    + nepi.resources.ns3.classes.minstrel_wifi_manager +
    + nepi.resources.ns3.classes.multi_model_spectrum_channel +
    + nepi.resources.ns3.classes.nakagami_propagation_loss_model +
    + nepi.resources.ns3.classes.nist_error_rate_model +
    + nepi.resources.ns3.classes.node +
    + nepi.resources.ns3.classes.non_communicating_net_device +
    + nepi.resources.ns3.classes.ocb_wifi_mac +
    + nepi.resources.ns3.classes.oh_buildings_propagation_loss_model +
    + nepi.resources.ns3.classes.okumura_hata_propagation_loss_model +
    + nepi.resources.ns3.classes.on_off_application +
    + nepi.resources.ns3.classes.onoe_wifi_manager +
    + nepi.resources.ns3.classes.packet_sink +
    + nepi.resources.ns3.classes.ping6 +
    + nepi.resources.ns3.classes.point_to_point_channel +
    + nepi.resources.ns3.classes.point_to_point_net_device +
    + nepi.resources.ns3.classes.point_to_point_remote_channel +
    + nepi.resources.ns3.classes.radvd +
    + nepi.resources.ns3.classes.random_direction2d_mobility_model +
    + nepi.resources.ns3.classes.random_propagation_delay_model +
    + nepi.resources.ns3.classes.random_propagation_loss_model +
    + nepi.resources.ns3.classes.random_walk2d_mobility_model +
    + nepi.resources.ns3.classes.random_waypoint_mobility_model +
    + nepi.resources.ns3.classes.range_propagation_loss_model +
    + nepi.resources.ns3.classes.rate_error_model +
    + nepi.resources.ns3.classes.receive_list_error_model +
    + nepi.resources.ns3.classes.red_queue +
    + nepi.resources.ns3.classes.rraa_wifi_manager +
    + nepi.resources.ns3.classes.simple_channel +
    + nepi.resources.ns3.classes.simple_net_device +
    + nepi.resources.ns3.classes.single_model_spectrum_channel +
    + nepi.resources.ns3.classes.six_low_pan_net_device +
    + nepi.resources.ns3.classes.sta_wifi_mac +
    + nepi.resources.ns3.classes.steady_state_random_waypoint_mobility_model +
    + nepi.resources.ns3.classes.subscriber_station_net_device +
    + nepi.resources.ns3.classes.tap_bridge +
    + nepi.resources.ns3.classes.tcp_l4protocol +
    + nepi.resources.ns3.classes.three_log_distance_propagation_loss_model +
    + nepi.resources.ns3.classes.two_ray_ground_propagation_loss_model +
    + nepi.resources.ns3.classes.uan_channel +
    + nepi.resources.ns3.classes.udp_client +
    + nepi.resources.ns3.classes.udp_echo_client +
    + nepi.resources.ns3.classes.udp_echo_server +
    + nepi.resources.ns3.classes.udp_l4protocol +
    + nepi.resources.ns3.classes.udp_server +
    + nepi.resources.ns3.classes.udp_trace_client +
    + nepi.resources.ns3.classes.v4ping +
    + nepi.resources.ns3.classes.virtual_net_device +
    + nepi.resources.ns3.classes.waypoint_mobility_model +
    + nepi.resources.ns3.classes.wifi_net_device +
    + nepi.resources.ns3.classes.yans_error_rate_model +
    + nepi.resources.ns3.classes.yans_wifi_channel +
    + nepi.resources.ns3.classes.yans_wifi_phy +
    + nepi.resources.ns3.ns3application +
    + nepi.resources.ns3.ns3arpl3protocol +
    + nepi.resources.ns3.ns3base +
    + nepi.resources.ns3.ns3ccndceapplication +
    + nepi.resources.ns3.ns3channel +
    + nepi.resources.ns3.ns3client +
    + nepi.resources.ns3.ns3dceapplication +
    + nepi.resources.ns3.ns3dcehelper +
    + nepi.resources.ns3.ns3errormodel +
    + nepi.resources.ns3.ns3errorratemodel +
    + nepi.resources.ns3.ns3fdnetdevice +
    + nepi.resources.ns3.ns3icmpv4l4protocol +
    + nepi.resources.ns3.ns3ipv4l3protocol +
    + nepi.resources.ns3.ns3mobilitymodel +
    + nepi.resources.ns3.ns3netdevice +
    + nepi.resources.ns3.ns3node +
    + nepi.resources.ns3.ns3pipechanel +
    + nepi.resources.ns3.ns3propagationdelaymodel +
    + nepi.resources.ns3.ns3propagationlossmodel +
    + nepi.resources.ns3.ns3queue +
    + nepi.resources.ns3.ns3route +
    + nepi.resources.ns3.ns3server +
    + nepi.resources.ns3.ns3simulation +
    + nepi.resources.ns3.ns3wifichannel +
    + nepi.resources.ns3.ns3wifimac +
    + nepi.resources.ns3.ns3wifinetdevice +
    + nepi.resources.ns3.ns3wifiphy +
    + nepi.resources.ns3.ns3wifiremotestationmanager +
    + nepi.resources.ns3.ns3wrapper +
    + nepi.resources.ns3.ns3wrapper_debug +
    + nepi.resources.ns3.resource_manager_generator +
    + nepi.resources.omf +
    + nepi.resources.omf.application +
    + nepi.resources.omf.channel +
    + nepi.resources.omf.interface +
    + nepi.resources.omf.messages_5_4 +
    + nepi.resources.omf.messages_6 +
    + nepi.resources.omf.node +
    + nepi.resources.omf.omf5_api +
    + nepi.resources.omf.omf6_api +
    + nepi.resources.omf.omf6_parser +
    + nepi.resources.omf.omf_api_factory +
    + nepi.resources.omf.omf_client +
    + nepi.resources.omf.omf_resource +
    + nepi.resources.omf.wilabt_node +
    + nepi.resources.planetlab +
    + nepi.resources.planetlab.node +
    + nepi.resources.planetlab.ns3 +
    + nepi.resources.planetlab.ns3.fdudptunnel +
    + nepi.resources.planetlab.ns3.tuntapfdlink +
    + nepi.resources.planetlab.openvswitch +
    + nepi.resources.planetlab.openvswitch.ovs +
    + nepi.resources.planetlab.openvswitch.ovsport +
    + nepi.resources.planetlab.plcapi +
    + nepi.resources.planetlab.sfa_node +
    + nepi.resources.planetlab.tap +
    + nepi.resources.planetlab.tun +
    + nepi.resources.planetlab.vroute +
    + nepi.util +
    + nepi.util.environ +
    + nepi.util.execfuncs +
    + nepi.util.guid +
    + nepi.util.logger +
    + nepi.util.manifoldapi +
    + nepi.util.netgraph +
    + nepi.util.parallel +
    + nepi.util.parsers +
    + nepi.util.parsers.xml_parser +
    + nepi.util.plotter +
    + nepi.util.rmatcher +
    + nepi.util.serializer +
    + nepi.util.sfaapi +
    + nepi.util.sfarspec_proc +
    + nepi.util.sshfuncs +
    + nepi.util.statfuncs +
    + nepi.util.timefuncs +
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/search.html b/doc/sphinx/_build/html/search.html new file mode 100644 index 00000000..fff7c622 --- /dev/null +++ b/doc/sphinx/_build/html/search.html @@ -0,0 +1,105 @@ + + + + + + + + Search — NEPI 3.0 documentation + + + + + + + + + + + + + + + + + + +
+
+
+
+ +
+
+
+
+ +

Search

+
+ +

+ Please activate JavaScript to enable the search + functionality. +

+
+

+ From here you can search these documents. Enter your search + words into the box below and click "search". Note that the search + function will automatically search for all of the words. Pages + containing fewer words won't appear in the result list. +

+
+ + + +
+ +
+ +
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/sphinx/_build/html/searchindex.js b/doc/sphinx/_build/html/searchindex.js new file mode 100644 index 00000000..163da033 --- /dev/null +++ b/doc/sphinx/_build/html/searchindex.js @@ -0,0 +1 @@ +Search.setIndex({envversion:42,terms:{get_slice_resourc:16,get_object:[20,6],wait_start:10,prefix:[16,1],wait_local_port:8,nthread:10,concret:10,ns3ccnpeekdceappl:[8,12,1,21],linuxccnpok:0,ns3basestationnetdevic:11,everi:16,do_releas:[8,1,19,9,2,10,13,4],ns3subscriberstationnetdevic:11,manifoldapi:[12,17],ns3fdnetdevic:[12,21],cmd:[16,1],upload:[1,4],netns_vers:2,sliceid:4,verif:[4,9],enable_trac:10,ns3randompropagationdelaymodel:11,histor:3,consequ:10,second:[10,16,4],aggreg:[3,16],linuxtcpdump:1,udp_l4protocol:[12,21,6],even:1,ns3pingdceappl:[12,1,21],messages_6:[12,21],omf6_api:[12,21],introspect:6,adhoc:16,ns3apwifimac:11,"new":[10,16,4],net:[1,4],topolog:[3,16],ovsswitch:19,linuxp:1,controlmast:16,omfappl:4,ns3fixedrsslossmodel:11,path:[0,8,1,2,10,16,3,4,22],taskstatu:10,ns3udpl4protocol:11,okumura_hata_propagation_loss_model:[12,21,6],unreserve_host:9,datetim:16,endpoint_mkdir:[8,1],realeas:10,sdate:16,countn:3,unix:4,linuxnod:[1,9],plot:[10,16],describ:10,would:1,omf_resourc:[12,21],call:[10,16,4,9],ns3dcehelp:[12,21],type:[19,10,13,16,4,23],until:[8,1,9,2,10,16,4],heappop:10,ns3constantvelocitymobilitymodel:11,relat:[10,1,6],notic:[1,4],warn:16,parse_fil:[3,22],get_platform:10,register_resourc:10,hold:[16,1],yans_wifi_phi:[12,21,6],uploadin:1,must:[10,16,1],join:16,err:[16,1],pid:[16,1,6],work:[16,1],spec:16,server_kei:16,get_provision_tim:10,upload_start_command:[8,0,1,9,2],root:[10,16,4],overrid:10,set_stop:10,unregister_condit:10,indic:16,rgister:10,ns3binaryerrorsixlowmodel:11,want:[1,4],prefixlen:16,ns3loopbacknetdevic:11,end:[16,1,4],fail_sfaapi:[4,9],how:1,sever:10,env:[16,1,4],peer_map:9,udp_serv:[12,21,6],src_dir:[8,1,2],config:16,connect_timeout:[16,1,4],ns3mobilitymodel:[12,21],confid:10,ns3tapbridg:11,ladder:16,after:[10,16,19,4,9],openvswitch:[12,21,9],lab:9,befor:[10,16,1,19],mesh:16,arch:9,parallel:[12,17],slice_id:16,clean_hom:1,ns3server:[12,21],credenti:[10,16,4],content_histori:3,receiv:[10,4],environ:[12,1,17,4],order:[10,16,4],netn:[12,1,21],sta_wifi_mac:[12,21,6],ocb_wifi_mac:[12,21,6],uuid:[20,6],reserve_resourc:16,filter_existing_fil:1,select_target_zero:16,persist:[10,16,1,4],cred:4,them:10,thei:[16,1,4],bootstrapf:9,safe:[10,16],ostyp:1,stop_with_condit:10,maxqueu:16,interrupt:10,wait_releas:10,min_run:10,pformat:16,each:[10,3,4,9,16],debug:[16,1,20,6],linuxtun:1,mean:[10,1,4],onoe_wifi_manag:[12,21,6],myslic:16,range_propagation_loss_model:[12,21,6],pl_user:9,point_to_point_net_devic:[12,21,6],csma_net_devic:[12,21,6],upload_sourc:[7,8,1,9,2],collector:[12,21],network:[10,16],dst:1,linuxns3cli:8,content:17,nito:4,linear:16,use_rpm:1,free:10,standard:16,netnswrappermessag:20,sigkil:16,fcdistro:9,store_path:13,linuxccncat:0,experimentid:4,filter:[10,16,9],unabl:1,lte_ue_net_devic:[12,21,6],onto:16,rang:10,netns_src:2,edge_net_annot:16,clsinit_copi:10,independ:10,restrict:10,hook:4,instruct:1,get_o:1,messag:[10,3,4],ns3tworaygroundpropagationlossmodel:11,sleekxmpp:4,consol:1,log_funct:4,tool:[16,1],wlab17:4,alreadi:[10,16,1],pl_host:9,set_ec_failur:10,target:[16,4],keyword:9,provid:[10,3,1],tree:16,"final":10,assign_control:19,provis:[10,16,4,9],ns3errormodel:[12,21],ccn_client_helper_uuid:6,runner:[12,17],execute_command:1,ns3lteenbnetdevic:11,wait_pid:1,log_distance_propagation_loss_model:[12,21,6],recreat:10,linuxappl:[0,8,1,19,2,9],ns3simul:[12,1,21],fname:3,lte_simple_net_devic:[12,21,6],ns3wrapper:[12,21],port_numb:19,usernam:[16,9],ns3channel:[12,21],register_typ:10,mesh_point_devic:[12,21,6],planetlabovsport:19,don:4,random_propagation_loss_model:[12,21,6],doe:[10,16,19,9],dump_factori:[20,6],get_help:10,declar:10,release_tim:10,dot:16,frcp_configur:4,servers_on:19,random:16,dirpath:[10,16],get_resourc:10,hybrid_buildings_propagation_loss_model:[12,21,6],find_typ:10,fail_node_not_al:[4,9],involv:10,absolut:[10,16],udp_trace_cli:[12,21,6],explain:[],configur:[10,0,4,8],stanza:4,than:10,modenapl:16,busi:1,folder:[10,16,1],timefunc:[12,17],create_ns3_rm:6,resourcemang:10,stop:[6,8,1,19,2,10,4],sfaapi:[12,17,4,9],udptunnel:[12,21],report:10,ideal_wifi_manag:[12,21,6],symmetr:10,ns3_set:6,omf5_api:[12,21],ns3constantpositionmobilitymodel:11,method:[6,1,9,10,20,16,4],check_releas:4,human:10,multi_model_spectrum_channel:[12,21,6],result:[10,16,1],ns3aarfcdwifimanag:11,respons:[10,1],fail:10,fd_net_devic:[12,21,6],dsrdsr_rout:[12,21,6],subject:10,discoveri:10,endpoint_nod:8,figur:[10,16],ns3applic:[12,21],dce_application_lock:6,udp_echo_cli:[12,21,6],res_id:4,remote_span:16,attribut:[12,17],accord:16,omf:[10,12,21],ns3_src_locat:8,ns3basemobilitymodel:[11,6],get_p2p_info:16,ovsport:[12,21,9],omf6_pars:[12,21],oml:16,extens:[10,5,9],advertis:16,ns3_build_loc:8,howev:[10,16],lte_enb_net_devic:[12,21,6],login:[16,9],strict_host_check:[16,1,4],ns3bridgechannel:11,slice_tag_id:9,nicta:4,guid:[0,6,7,8,12,1,19,9,2,10,13,11,14,17,4,20],assum:[10,16],ns3listerrormodel:11,xmldecod:23,been:[10,16,4],enrol:4,gre_en:1,terminate_connect:[8,1,19],unsubscrib:4,ns3basenetdevic:[11,6],basic:10,endpoint1:[8,1],endpoint2:[8,1],csma_channel:[12,21,6],run_serv:[20,6],hpcbench:1,xml_parser:[16,12],ani:[10,1,4,9],ns3basearpl3protocol:[11,6],blacklist_resourc:16,child:[10,4],get_opt:[20,6],dce_manager_lock:6,ident:16,servic:[16,9],properti:[16,4,9],sourceforg:1,sfarspecprocess:16,check_readi:4,spawn:[16,1],applic:[10,12,21],"0x7f028ff15bb0":16,set_discov:10,ityp:4,kwarg:[6,8,2,10,20,16],make_dict_rec:16,conn:[20,6],sfa_nod:[12,21],ccnr:[12,1,21],perform:10,make:[10,16],ccnd:[3,12,1,21],complex:9,configure_ip:4,ns3friispropagationlossmodel:11,complet:[10,9],parse_sfa_rspec:16,do_deploi:[0,6,8,1,19,9,2,10,13,4,20],nid:[3,16],rais:10,enable_dc:8,ns3_wrapper:6,ns3dceapplic:[12,1,21],netnswrapp:[12,21],redefin:10,scenario:10,inherit:10,client:[6,1,9,20,16,4],get_slice_vnet_sys_tag:9,thi:[5,6,1,9,10,20,16,4],install_depend:1,tcp_l4protocol:[12,21,6],protocol:4,linuxns3dceappl:8,ns3baseipv4l3protocol:[11,6],initiate_connect:[8,1],yet:[16,4],expos:10,character:10,save:[10,16,1],adress:4,noop_funct:4,mayb:16,preserv:1,ns3threelogdistancepropagationlossmodel:11,ns3ccncatdceappl:[8,12,1,21],background:[16,1],dce_vers:8,measur:[10,1],daemon:1,specif:[10,1,4],manual:1,fail_discoveri:[4,9],ns3okumurahatapropagationlossmodel:11,dce_application_uuid:6,fedora_12:1,fedora_14:1,negat:9,interv:10,recv_msg:[20,6],intern:16,clean_experi:1,planetlabtun:9,set_provis:10,subclass:10,get_trac:10,ns3basefdnetdevic:[11,6],condit:10,localhost:1,start_multical:9,core:[],plu:16,ssh_config:16,ple:[16,9],plc:9,unregister_connect:10,peer:9,get_nod:9,guidgener:16,obj:16,tdiffsec:16,make_kei:16,simul:[8,5,6,10,2],timestamp2:16,timestamp1:16,produc:10,ns3basedceappl:[8,6],shell_escap:16,newuuid:[20,6],"float":10,encod:16,www:9,node_ip_annot:16,separet:1,often:4,ns3sixlowpannetdevic:11,wai:[16,1,4,9],support:[10,16,1,9],transform:10,avail:[10,1,19],ap_wifi_mac:[12,21,6],gil:10,tcpdump:[12,21],fork:1,matrix_propagation_loss_model:[12,21,6],medium:1,minstrel_wifi_manag:[12,21,6],form:10,forc:[10,16,1],run_hom:[8,1],raise_on_error:1,heap:10,"true":[10,16,1,4],flavour:9,attr:[0,6,8,1,10,20,4],set_with_condit:10,mtr:[12,21],maximum:10,mtu:1,ecxmlpars:23,tsformat:16,ns3nisterrorratemodel:11,fixed_rss_loss_model:[12,21,6],featur:16,netnsipv4rout:20,configure_ifac:4,get_resource_urn:16,diagnost:16,workerthread:16,exist:[1,19,10,9,16,4],check:[1,19,10,9,16,4],from_typ:23,verify_connect:[8,1,19],steady_state_random_waypoint_mobility_model:[12,21,6],ns3baseicmpv4l4protocol:[11,6],when:[10,16,1,4],annotate_cn_nod:[3,22],test:[16,9],ns3node:[12,21],node:[10,3,12,21],traceattr:10,consid:10,to_typ:23,emu_get:20,longer:10,emu_net_devic:[12,21,6],create_hom:[16,1],exp_hom:1,time:[10,16,4,9,6],resource_urn:16,uan_channel:[12,21,6],annotate_node_ip:16,simple_net_devic:[12,21,6],concept:10,skip:10,consum:3,focus:4,create_and_enroll_top:4,fail_not_enough_nod:[4,9],remote_statu:16,netnsswitch:[12,21],decid:10,depend:[1,4,9],graph:[10,3,22,16],readabl:10,node_count:16,sourc:[0,13,5,7,6,1,19,9,2,10,16,23,11,8,3,14,4,22,20],string:[10,16,1,9],ns3receivelisterrormodel:11,wait_run:1,pl_pass:9,add_set_hook:[1,4],level:[10,16,20,4,6],get_rtyp:10,connection_app_hom:[1,19,9],upload_fil:1,filter_resourc:10,channeltofreq:4,receive_list_error_model:[12,21,6],ns3constantaccelerationmobilitymodel:11,arf_wifi_manag:[12,21,6],ns3ccnddceapplic:[8,12,1,21],port:[8,1,4,19,16],del_edge_annot:16,establish_connect:[8,1],repli:[16,20,6],current:[10,16,4,19],stformat:16,ovs_statu:19,deriv:10,udp_echo_serv:[12,21,6],old_valu:4,gener:[10,8,1,4,9],cara_wifi_manag:[12,21,6],satisfi:10,address:[10,8,4,16],use_deb:1,wait:[8,1,19,2,10,9],box:[16,4],check_mailbox:4,sfi_sm:16,plotter:[12,17],netgraph:[10,12,17],queue:[10,16,6],trial:1,yans_error_rate_model:[12,21,6],environn:4,linuxnetnscli:2,generate_topolog:16,prefer:10,backtick:16,instal:[1,9],mobil:6,ipv4l3protocol:[12,21,6],live:[5,1],criteria:10,msg:[10,8,1,16],scope:[10,1],ppid:[16,1],ns3steadystaterandomwaypointmobilitymodel:11,send_repli:[20,6],ip2:16,plexu:4,ip1:16,ip6:1,ip4:1,exp_id:[10,4],ccncat:[12,1,21],three_log_distance_propagation_loss_model:[12,21,6],uniqu:[10,16,4],cat:1,can:[10,16,1,4],deploy_with_condit:10,process_content_histori:3,purpos:10,get_resources_info:16,stream:10,ns3randomwalk2dmobilitymodel:11,eval_failur:10,topic:4,critic:10,abort:10,occur:[10,16,1],alwai:1,dump_head:[20,6],unimo:16,multipl:[10,16],annotate_edg:16,check_statu:[1,19],ns3radvd:11,ping:[12,15,18],purg:4,create_port:19,map:[16,9],stdin_funct:4,mac:1,nitlab:4,two_ray_ground_propagation_loss_model:[12,21,6],date:[10,16,4],data:[12,17],ns3arfwifimanag:11,vif_name_fil:9,stdin:[16,1,4],assign_p2p_ip:16,inform:[6,9,10,16,3,4],"switch":[10,20,19],block:[0,6,8,1,10,20,16,4],callabl:16,replace_path:[8,1,2],tty:[16,1,4],ns3wifiremotestationmanag:[12,21],still:[16,1],entiti:[10,13],jid:4,group:[10,16],polici:10,ns3wrappermessag:6,ns3propagationlossmodel:[12,21],platform:[10,16],mail:4,plcapi:[12,21],non:1,ns3randomdirection2dmobilitymodel:11,initi:[10,8,4],remove_resourc:10,select_base_class:6,verifi:8,now:4,list_error_model:[12,21,6],ns3ccnpokedceappl:[8,12,1,21],name:[0,6,8,1,9,2,10,20,16,3,4],separ:10,initiate_udp_connect:[1,19],x11:1,netnsclient:[12,1,21],ns3bulksendappl:11,compil:1,ns3rateerrormodel:11,udp_connect:1,replac:[8,1,2],continu:[10,16,1],newval:1,happen:[16,1],error_channel:[12,21,6],ns3constantspeedpropagationdelaymodel:11,subnet:16,ccn_produc:3,type_nam:[20,6],resource_hrn:16,cipher_kei:[8,1,19],oldval:1,factori:[8,16,6],resource_typ:10,ns3amrrwifimanag:11,urlpattern:[16,9],ns3errorchannelsixlow:11,get_start_tim:10,"byte":10,care:[10,16,1],ns3udptracecli:11,frequenc:4,synchron:1,turn:19,log_messag:[10,8,1,16],first:[10,16,1],oper:[10,20,6],do_fail:10,directli:[10,1,4],upload_command:1,onc:16,arrai:9,ns3cost231propagationlossmodel:11,parser:[12,15,18],error_channel_sixlow:[12,21,6],enable_dump:[20,6],custom:[4,9],open:16,size:10,given:[10,16,9],local_port:8,cumul:10,copi:[10,16,1],specifi:[10,16,9],open_socket:6,blacklist:[16,9],reserved_tim:10,ns3baseccndceappl:[14,6],add_edge_callback:10,ns3ccnrdceapplic:[8,12,1,21],tuntapfdlink:[12,1,21],sasl_mech:4,lkill:16,get_node_info:9,classmethod:[10,16,4,9],python_passfd_src:2,ressourc:10,were:10,tophat:16,ns3idealwifimanag:11,dump_to_script:[20,6],argument:[10,16,4,9],parallelrun:16,inform_failur:10,do_discov:[10,1,4,9],destroi:16,note:[1,9],ideal:16,omfnod:4,take:[10,16,1],advis:16,burst_error_model:[12,21,6],dump_get:[20,6],noth:[16,4],channel:[12,21],del_node_annot:16,begin:10,sure:16,trace:[12,17],normal:[10,1],track:[10,16],set_ec:10,ns3carawifimanag:11,set_glob:10,date2:16,pair:16,remove_packag:1,wilabtsfanod:4,ns3ping6:11,omf5:4,fdnetdevic:[7,8,6],later:[1,4],runtim:1,put_nowait:16,ns3basewifinetdevic:[11,6],start_with_condit:10,topologytyp:16,show:[10,16],get_failed_tim:10,netnsnod:[12,21],itu_r1411nlos_over_rooftop_propagation_loss_model:[12,21,6],xml:[10,16,23],onli:[1,19,10,9,16,4],explicitli:[10,1],state:[0,6,8,1,10,20,4],dict:[16,4],rspec_str:16,get:[6,8,1,9,2,10,19,16,4,20],repo:2,ssl:4,create_funct:4,ssh:[16,19,1,4,9],is_sourc:16,requir:[10,16,1],yield:10,upload_stdin:1,ns3lrwpannetdevic:11,make_control_path:16,where:[16,1,19],format_arg:[20,6],rexec:16,from_xml:23,msg_type:[8,6,20,2],fail_plapi:9,concern:4,date1:16,upload_cod:1,ns3baseappl:[11,6],parent:[10,16,4],ns3icmpv4l4protocol:[12,21],enumer:10,enough:10,ns3fibentrydceappl:[8,12,1,21],between:10,"import":[10,1],cmdlinearg:4,create_socket:20,amtogatewai:4,get_glob:10,ns3droptailqueu:11,tun:[12,21],remote_socket:[8,2],mani:[10,1],with_lock:1,mesh_wifi_interface_mac:[12,21,6],format_environ:1,ns3constantratewifimanag:11,colon:1,deploi:[10,1,4,19],binary_error_model:[12,21,6],get_ready_tim:10,ns3onoewifimanag:11,mark:[10,16],breath:16,omfresourc:4,state_time_attr:10,plapi:9,repons:13,newexp_funct:4,reschedul:10,do_provis:[6,19,1,13,10,9,4,20],ns3minstrelwifimanag:11,linuxns3dcefibentri:14,single_model_spectrum_channel:[12,21,6],prefixt:16,local_endpoint:19,linuxudptunnel:[8,1],gretunnel:[12,21],ns3multimodelspectrumchannel:11,experimentrunn:[10,5],set_hook:10,"case":[16,4],sfi_us:16,ovswitch:19,linuxrout:1,linuxns3dceccnpok:14,exec_run_hom:9,cast:23,invok:[10,8,6,20,2],invoc:[16,1,4],arp_l3protocol:[12,21,6],ccnapplic:[12,1,21],virtual_net_devic:[12,21,6],add_slice_nod:9,stdout:[16,1],metric:10,destin:[16,1,4],lr_wpan_net_devic:[12,21,6],ns3yanswifiphi:11,initialize_work:16,rmatcher:[12,17],dce_src_loc:8,same:[1,13,10,9,16,4],binari:1,ns3rraawifimanag:11,finish:[16,1,4],evaluate_convergence_callback:10,dump_stop:6,escape_quot:4,driver:5,check_sliver_ov:19,capabl:10,ns3bursterrormodel:11,finish_multical:9,ready_tim:10,ns3csmachannel:11,execute_deploy_command:1,load_content_histori:3,ccn:[12,15,18],disassoci:10,rpmfunc:[12,21],linuxccnd:0,manifold:16,execut:[12,17],allowed_typ:6,failed_tim:10,kill:[16,1,4],linuxccnr:0,get_slic:9,linuxccnp:0,flavor:1,struct:9,get_resources_hrn:16,except:1,param:[10,16,9],get_slice_tag:9,forward_x11:[16,1,4],newexp:4,ns3errornetdevic:11,drop_tail_queu:[12,21,6],read:[10,1],tid:[10,6],dbase:16,xmpp_root:4,get_frequ:4,delayed_except:16,integ:[10,1],server:[16,1,4,19],red_queu:[12,21,6],either:[10,16,1,4],appid:4,output:[16,1],manag:[10,5,16],is_valid_valu:10,format_kwarg:[20,6],ns3netdevic:[12,21],constant_speed_propagation_delay_model:[12,21,6],adequ:10,ns3wifiphi:[12,21],planetlabovsswitch:19,slice:[16,4,9],confirm:4,linuxns3simul:8,set_target:16,level_nam:4,exit:[10,1,4],nodefamili:9,linuxchannel:1,tapnod:8,do_stop:[0,6,8,1,9,2,10,20,4],add_resource_to_slice_batch:16,is_target:16,timeout:16,share_dir:1,logs_dir:[3,22],"throw":1,src:[1,4,2],select_random_sourc:16,central:16,netnsipv4address:[12,21],register_connect:10,establish_udp_connect:[1,19],shra:4,omfchannel:4,unregist:4,remove_packages_command:1,constant_rate_wifi_manag:[12,21,6],stare:16,log:[10,3,4,16],area:9,alias_funct:4,overwrit:1,start:[6,8,1,19,2,10,16,4],interfac:[10,12,21],rmdir:1,iff_tap:1,tupl:16,recv_fd:6,friis_propagation_loss_model:[12,21,6],netnsinterfac:[12,21],possibl:[10,1,4,19],"default":[10,16,4,9],uid:4,creat:[6,8,1,9,2,10,19,16,4,20],certain:10,file:[8,1,9,10,16,3,4,22],planetlabvrout:9,orient:[],field:[16,9],valid:[10,16],nakagami_propagation_loss_model:[12,21,6],you:[16,1,4],architectur:4,registri:9,python_unshare_src:2,ns3baseerrorratemodel:[11,6],dump_invok:[20,6],remote_kil:16,linuxinterfac:1,directori:[10,16,1,13],release_funct:4,wifi:4,descript:10,set_stat:10,escap:[8,1,16,2],bulk_send_appl:[12,21,6],represent:[10,16],all:[10,12,21],remove_resource_from_slic:16,do_connect:10,ns3itur1411lospropagationlossmodel:11,check_error:1,code:[10,5,1,16,8],follow:[10,1,9],scp:16,edg:16,get_node_flavour:9,template_attribut:6,those:[10,1],yans_wifi_channel:[12,21,6],ccnping:[12,1,21],global:[10,9],delete_slice_nod:9,noread:10,fals:[6,1,10,20,16,3,4],sshfunc:[12,17],vif_typ:1,util:[10,12,17,4],clientxmpp:4,load_ns3_modul:6,failur:10,jakes_propagation_loss_model:[12,21,6],nepi_hom:1,list:[7,8,1,9,10,16,4],ec_failur:10,emul:[5,20,2],stderr:[16,1],node1:8,node2:8,ns3wifinetdevic:[12,21],dump_shutdown:[20,6],omf_api_factori:[12,21],sync:16,design:10,pass:[10,16],fail_node_not_avail:[4,9],socket_nam:[8,6,20,2],brief:1,make_server_key_arg:16,configure_funct:4,delet:[16,1,4,19],ns3pipechanel:[12,21],version:[0,4,16,14],"public":16,is_finish:6,full:[10,4],exit_funct:4,send_stdin:4,ns3udpechoserv:11,bin_dir:1,dump_set:[20,6],modifi:10,valu:[6,1,10,20,16,4,23],optionn:9,search:[5,16],ecstat:10,ns3ccndceapplic:[8,12,1,21],unenroll_top:4,ns3pointtopointnetdevic:11,action:10,messagehandl:4,clone_command:2,six_low_pan_net_devic:[12,21,6],rraa_wifi_manag:[12,21,6],compute_mean:16,filenam:[3,1,22,8],establish:8,regist:[10,4],two:[10,1,6],taken:10,more:16,desir:[16,1,4,19],oh_buildings_propagation_loss_model:[12,21,6],ns3wrapperdebug:6,flag:[10,16],particular:16,known:10,set_valu:10,frcp_inform:4,none:[6,8,1,9,2,10,16,4],endpoint:[7,8,1,19],sincron:9,remote_spawn:16,dev:16,histori:3,remain:1,openssh:16,get_slice_id:9,share:[1,4,9],templat:10,ecplott:16,minimum:10,max_run:10,ns3pointtopointchannel:11,interconnect:[7,8,10,6],gwuser:16,procstatu:16,anoth:[10,1],ns3packetsink:11,random_waypoint_mobility_model:[12,21,6],ns3gaussmarkovmobilitymodel:11,ns3randompropagationlossmodel:11,isn:16,resourc:[12,17],cost231propagation_loss_model:[12,21,6],format_valu:[20,6],ns3udpechocli:11,associ:[10,13],rspawn:16,"short":1,connection_run_hom:[1,19,9],caus:16,callback:10,help:10,xmpp:4,vif_type_flag:1,through:[10,4],ns3csmanetdevic:11,paramet:[19,1,13,10,9,16,4],itu_r1411los_propagation_loss_model:[12,21,6],get_valu:10,pend:10,getpid:1,bypass:16,netnsnodeinterfac:[12,21],omf_client:[12,21],"return":[7,8,1,9,10,19,16,3,4],timestamp:[10,4],planetlabsfanod:9,resource_manager_gener:[12,21],framework:16,ns3adhocwifimac:11,detach:1,set_sourc:16,gethostbynam:16,dceapplic:6,ns3ohbuildingspropagationlossmodel:11,sfaapifactori:16,sock_nam:1,wait_deploi:10,fulli:9,lib_dir:1,load_configur:1,ns3basechannel:[11,6],realli:1,connect:[6,1,19,10,20,16,4],handle_messag:[20,6],event:4,provision_tim:10,item:4,enroll_host:4,publish:4,lstatu:16,print:19,foreground:1,qualifi:9,proxi:9,random_propagation_delay_model:[12,21,6],ns3onoffappl:11,reason:10,base:[0,6,7,8,1,19,9,2,10,23,13,16,11,14,4,20],clazznam:[20,6],put:[16,4],bash:1,planetlabns3fdudptunnel:7,thread:[10,16,4,9,6],launch:1,retriv:1,edge_annot:16,reserve_host:9,assign:[10,16,19],wait_finish:10,number:[10,8,4,16],xmppp:4,done:[10,16],do_start:[0,6,8,1,9,2,10,20,4],jabber:4,baseomfcli:4,differ:[10,16,1,4],script:1,interact:[10,1],linuxns3dceccnr:14,construct:[10,16,20,6],gauss_markov_mobility_model:[12,21,6],linuxdcep:8,linuxns3dceccncat:14,linuxns3dceccnd:14,store:[10,16,1],option:[16,1,9],relationship:10,get_slice_nod:9,part:[10,1],pars:[3,16],remot:[8,1,16,2],remov:[10,16,1],local_p:9,random_walk2d_mobility_model:[12,21,6],bridg:19,str:[10,16,4,9,23],expid:4,comput:[10,3,16],set_releas:10,omfwifiinterfac:4,packag:17,netnsserv:[12,21],"null":16,ns_log:6,annotate_nod:16,lib:1,self:[10,1],also:[16,1],without:[16,4],build:[16,1,4],vif_nam:9,distribut:10,get_resource_typ:10,planetlab:[10,12,21],previou:16,reach:10,ns3rout:[12,21],stdin_hook:4,node_id:[9,6],app_hom:[8,1],ns3noncommunicatingnetdevic:11,parse_ping_log:3,loopback_net_devic:[12,21,6],exp:1,execfunc:[12,17],linuxnp:1,netnswrapperdebug:20,debfunc:[12,21],heapq:10,ns3wifimac:[12,21],session:[16,4],networkx:16,ns3basewifichannel:[11,6],find:10,access:10,wifi_net_devic:[12,21,6],quer:16,evaluate_normal_converg:10,random_direction2d_mobility_model:[12,21,6],unus:4,express:[10,16],nativ:9,configure_on_omf5:4,configure_on_omf6:4,aarfcd_wifi_manag:[12,21,6],ns3icmpv6l4protocol:11,iff_tun:1,ns3basepropagationlossmodel:[11,6],netnsemul:[12,1,21],common:[20,4,6],set_start:10,planetlabtap:9,arp:6,linuxtunnel:1,locali:16,get_endpoint:[7,8,1],point_to_point_remote_channel:[12,21,6],see:16,linuxccnappl:0,arg:[6,8,1,13,2,10,19,16,4,20],reserv:[10,16,9],resourceact:10,ns3udpclient:11,reus:16,fibentri:[12,1,21],subscript:4,experi:[5,1,13,10,19,16,4],xmppclient:4,valid_connect:[0,8,1,19,9,2,10,13,4],numer:[10,9],to_xml:23,network_typ:9,tnow:16,ecseri:16,ns3simplenetdevic:11,install_packag:1,run_dir:10,clsinit:10,load:[10,16],run_id:10,instanti:10,schedul:[12,17],do_reserv:10,home_dir:1,linuxtracerout:1,shutdown:[10,8,6,20,2],linux:[10,12,21],backend:16,guid1:10,guid2:10,adhoc_wifi_mac:[12,21,6],devic:[7,8,1,9,6],empti:16,find_box:16,netnsappl:[12,21],ns3basewifiphi:[11,6],linuxns3ccndceappl:14,slice_id_or_nam:9,imag:[4,9],rspec:16,is_control:3,func:[10,16],blacklist_host:9,ns3jakespropagationlossmodel:11,look:[10,16],batch:16,"while":[10,1],behavior:[10,1,4],error:[10,16,1,19],python_passfd_repo:2,readi:[10,4],omf5api:4,origin:4,netnsbas:[12,21],itself:19,manifoldapifactori:16,bwlimit:[8,1,19],get_resources_by_typ:10,decor:10,fedora:1,belong:10,resolve_hostnam:16,sliver:[16,19],ns3tcpl4protocol:11,content_nam:3,rcopi:16,moment:[10,4],temporari:16,user:[10,16,1,4,9],lgetpid:16,find_hom:1,implement:[10,4],subpackag:17,openssh_has_persist:16,travers:16,task:[10,16,1],replace_arg:[20,6],older:16,wait_vif_nam:9,explan:1,ns3wrapper_debug:[12,21],app_id:4,udptest:[12,21],planetlabnod:9,close_socket:6,enrollkei:4,linuxccnpingserv:0,"0x7f0290310f90":6,input:[16,1],point_to_point_channel:[12,21,6],modul:17,bin:1,is_run:6,format:[10,16,1],submodul:[12,15,17,18],tap_bridg:[12,21,6],exp_dir:[10,1],ccn_client_lock:6,semi:1,dce_repo:8,signal:16,upload_extra_sourc:[8,2],elaps:10,collect:[10,22,13],"boolean":[10,19,4,9],frcp_creat:4,has_attribut:10,load_ns3_librari:6,plc_flavour:9,creation:[16,4],some:[16,9],back:4,failure_level:10,unspecifi:9,sampl:[10,16],ns3ltesimplenetdevic:11,ns3simplechannel:11,per:16,prop:4,retri:[16,1,4],reproduc:1,machin:10,object:[6,9,10,20,16,4,23],run:[10,16,1,4,19],has_flag:10,ping6:[12,21,6],gre_connect:[1,9],sfi_registri:16,wait_all_readi:10,from:[10,3,1,4,16],get_release_tim:10,send_msg:[8,2],constraint:16,private_kei:16,idn:16,dump_start:6,ns3kun2600mhzpropagationlossmodel:11,exitcod:1,pythonpath:1,pldistro:9,hrn:[16,4],all_tag:16,devnam:1,nowrit:10,omf6api:4,sock:6,"long":1,set_fail:10,includ:9,forward:1,compute_metric_callback:10,ns3hierarchicalmobilitymodel:11,ns3uanchannel:11,atom:10,line:[16,1],ns3:[12,1,21],info:[16,1,4],cid:4,uth:4,nid1:[16,22],planet:9,set_hook_mtu:1,similar:1,frcp_releas:4,set_state_tim:10,msg_id:4,ns3basequeu:[11,6],doesn:[16,4],repres:[10,16,1,4],lspawn:16,retract:4,filenotfound:1,failtrap:10,sfarspec_proc:[12,17],clean:[1,4],eintr_retri:16,fdnode:8,meaning:[10,4,19],rm_failur:10,linuxns3dceccnpeek:14,frcp_request:4,typeid:6,ns3wifichannel:[12,21],guids1:10,guids2:10,wait_fil:[8,1],exact_tag:16,queri:[10,16],release_api:4,node_annot:16,maxthread:16,is_rm_inst:10,set_hook_up:1,ns3binaryerrormodel:11,get_node_tag:9,send:[16,4],noop:4,sent:4,vlc:4,ns3_repo:8,tri:16,on_off_appl:[12,21,6],do_disconnect:10,myresourcemanag:10,refer:16,ns3basenod:[11,6],check_state_connect:[8,1],ecodefil:1,ns3itur1411nlosoverrooftoppropagationlossmodel:11,unblacklist_host:9,download:1,aloha_noack_net_devic:[12,21,6],pl_ptn:9,index:[10,5,4],resourcest:10,compute_delay_m:16,cell:4,experiment:10,ns3_get:6,icmpv6l4protocol:[12,21,6],get_discover_tim:10,whatev:16,"enum":10,"0x7f028fc193b0":4,vif_prefix:1,linuxns3fdudptunnel:[7,8],ubuntu:1,becom:4,sinc:[10,1,4],host:[5,1,9,10,16,4],corruptfil:1,wait_guid:10,converg:10,chang:[10,4],control:[10,19,1,4,13],set_reserv:10,app:1,bridge_net_devic:[12,21,6],gatewai:4,api:[5,4,9,16],statfunc:[12,17],hierarchical_mobility_model:[12,21,6],rclass:10,commun:4,logger_compon:16,ns3meshpointdevic:11,doubl:10,next:[10,16],ascii_helper_uuid:6,constant_velocity_mobility_model:[12,21,6],usr:1,check_deploi:4,mask4:1,enroll_top:4,mask6:1,comparison:9,subscriber_station_net_devic:[12,21,6],fedora_8:1,agent:16,ns3singlemodelspectrumchannel:11,upload_binari:1,retriev:[10,16,1,9],install_packages_command:1,tunnel:[12,21],alia:4,txqueuelen:[8,1,19],unenrol:4,annot:3,get_resource_info:16,omfapifactori:4,ns3alohanoacknetdevic:11,get_task:10,ns3errorratemodel:[12,21],tap:[12,21],process:[12,18],lock:[4,9,6],sudo:[16,1,4],trace_filepath:1,tag:[12,17],ns3arpl3protocol:[12,21],serial:[10,12,17],dce_manager_uuid:6,delai:[10,22],ccnpoke:[12,1,21],publicid:16,filepath:[10,16],ns3emunetdevic:11,plcapifactori:9,linuxccnpeek:0,instead:[10,16,1,4],linuxfibentri:0,stop_tim:10,overridden:[10,9],remote_check_pid:16,physic:10,alloc:16,non_communicating_net_devic:[12,21,6],loglevel:[20,6],ns3virtualnetdevic:11,element:[10,4],temp:[16,1],allow:[1,19,10,9,16,4],omf6pars:4,ns3basewifiremotestationmanag:[11,6],get_stop_tim:10,planelab:9,trace_en:10,add_edg:16,remote_endpoint:[8,1,19,9],device_helper_uuid:6,nist_error_rate_model:[12,21,6],ccnpingserv:[12,1,21],local_dir:10,populate_factori:10,therefor:10,python:[10,1],python_unshare_vers:2,ns3ocbwifimac:11,ns3aarfwifimanag:11,run_experi:10,rstatu:16,testbedtogatewai:4,get_connect:10,mode:1,wait_tim:10,chunk:10,udp_client:[12,21,6],special:[8,1,9,2,16,4],out:[16,1],variabl:[1,4],python_passfd_vers:2,install_rpmfusion_command:1,linuxgretunnel:1,develop:[],ns3errorchannel:11,identifi:[10,9],suitabl:[4,9],rel:[10,16],statist:10,ns3stawifimac:11,linuxtap:[1,9],ips2nid:[3,22],ns3udpserv:11,constant_position_mobility_model:[12,21,6],dictionari:[10,3,4],releas:[10,16,19,4,9],wilabt_nod:[12,21],xmlencod:23,has_chang:10,could:10,keep:[10,1],heappush:10,not_start:16,known_host:16,lexec:16,netnsrout:[12,21],python_unshare_repo:2,dump_content_histori:3,mai:9,set:[6,8,9,2,10,19,16,4,20],v4ping:[12,21,6],ccndlog:3,mkdir:[16,1],system:[4,9],wrapper:20,attach:[16,1],termin:[10,1],max_depth:16,get_interfac:9,udp:1,shell:[8,1,2],register_condit:10,netnswrapper_debug:[12,21],failurelevel:10,cpython:10,ns3base:[12,21],structur:1,check_output:1,amrr_wifi_manag:[12,21,6],sens:10,dce_help:8,enroll_funct:4,start_tim:10,kun2600mhz_propagation_loss_model:[12,21,6],session_kei:9,correspond:4,linuxnetnsemul:2,have:[10,16,1,6],close:19,need:[10,16,1,4,19],ns3basewifimac:[11,6],binary_error_sixlow_model:[12,21,6],emu_set:20,mcapi:9,rout:[12,21],error_net_devic:[12,21,6],do_configur:10,which:[10,16,1,4,9],interface_id_or_ip:9,instanci:[16,4,9],singl:[10,16,1],create_api:[4,9],unless:16,get_api:[16,4,9],deploy:[10,9],clase:10,discov:[10,4,9],cipher:[8,1,19],node_tag_id:9,sfi:[16,4,9],"class":[0,6,8,12,1,13,2,10,20,14,21],sfa:[16,4,9],build_sfa_rspec:16,ns3ipv4l3protocol:[12,21],url:[16,9],urn:16,gather:[1,4],request:[16,4],set_readi:10,pipe:[16,1,6],pidfil:[16,1],determin:16,text:[10,1],verbos:16,waypoint_mobility_model:[12,21,6],ccnpeek:[12,1,21],get_session_kei:16,redirect:[16,1],upload_librari:1,locat:16,should:[10,16,20,9,6],add_nod:16,wait_result:8,local:[10,16,1,13,9],create_bridg:19,ns3randomwaypointmobilitymodel:11,base_station_net_devic:[12,21,6],wait_remote_socket:[8,2],autom:1,ns3meshwifiinterfacemac:11,enabl:[10,20,6],ns3basepipechannel:6,lala:1,whether:[10,16,1],contain:[10,16,1,9],script_path:[20,6],view:9,node_id_or_hostnam:9,fdudptunnel:[12,1,21],planetlabtuntapfdlink:7,usr_dir:1,make_uuid:[20,6],statu:[10,16,1,19],extend:10,correctli:[4,9],ns3bridgenetdevic:11,pattern:9,inorm:22,written:4,ns3queue:[12,21],ns3v4ping:11,kei:16,update_slic:9,entir:16,disconnect:4,experimentcontrol:[5,1,19,10,13,4],add_resource_to_slic:16,rtype:[10,16,4],ccn_consum:3,messages_5_4:[12,21],plugin_config:4,tracerout:[12,21,22],etc:[10,16,1,4],instanc:[10,16,4,9],sigterm:16,rexitcod:1,complementari:[],arriv:10,respect:1,admin:9,rgetpid:16,quit:[10,16],resourcegatewai:4,compon:10,immedi:1,radvd:[12,21,6],icmpv4l4protocol:[12,21,6],presenc:4,assert:4,"0x7f028fc19a70":9,nping:[12,21],simple_channel:[12,21,6],togeth:16,present:5,replic:10,multi:1,plain:[1,9],remove_all_from_slic:16,defin:[10,4,9],sformat:16,eintr:16,get_attribut:10,ns3matrixpropagationlossmodel:11,ns3hybridbuildingspropagationlossmodel:11,site:16,request_funct:4,linuxccncont:0,clean_process:1,handl:[10,4],slicenam:[16,9],ns3dsrdsrrout:11,ns3waypointmobilitymodel:11,http:[16,1,9],hostnam:[16,4,9],rkill:16,upon:[10,9],discover_tim:10,phy:6,ns3pointtopointremotechannel:11,execute_funct:4,wthat:19,netns_repo:2,linuxudptest:1,well:[],ofr:4,command:[6,8,1,9,2,20,16,4],resourcefactori:10,usual:[10,16],less:10,vrout:[12,21],obtain:10,dump_creat:[20,6],add_node_callback:10,packet_sink:[12,21,6],annotate_cn_graph:[3,22],web:[16,9],ns3redqueu:11,point:16,init_mailbox:4,add:[9,10,16,3,4,22],is_al:1,stabsformat:16,logger:[6,12,10,20,17,4],match:[10,16,9],xmlrpc:9,dest:16,handle_omf_messag:4,ccncontent:[12,1,21],testb:[10,5,4],know:1,password:[16,4,9],recurs:16,like:[16,9],ns3nakagamipropagationlossmodel:11,necessari:[10,16,1],failuremanag:10,page:5,pygccxml_vers:8,lcopi:16,captur:16,nid2:16,rvqueue:16,"export":1,ns3rangepropagationlossmodel:11,flush:[8,6,20,2],home:[16,1],ilabt:4,librari:[16,1,4],rate_error_model:[12,21,6],node_id_or_nam:9,wilab2:4,leas:16,ipv4:6,sequenc:9,linuxtuntapfdlink:[7,8],ns3propagationdelaymodel:[12,21],dce:5,usag:1,omfclient:4,offset:[0,6,8,1,10,20,4],yyyymmddhhmmssffff:16,about:[10,9],actual:[8,1,2],socket:[8,2],wilabt:[16,4],run_and_wait:1,constant_acceleration_mobility_model:[12,21,6],automat:[10,1],guard:4,check_start:4,ns3yanswifichannel:11,imind:4,aarf_wifi_manag:[12,21,6],sfi_auth:16,ns3basepropagationdelaymodel:[11,6],"function":[10,16,1,4,9],ns3yanserrorratemodel:11,subscrib:4,lalal:1,ns3client:[12,1,21],uninstal:1,inlin:1,count:3,made:[10,1],in_foreground:1,reschedule_delai:10,resourcemanag:[5,6,1,13,10,20,4],asynchron:16,topo_typ:16,limit:16,template_trac:6,process_content_history_log:3,otherwis:10,problem:4,ns3lteuenetdevic:11,plugin_whitelist:4,evalu:10,ns3logdistancepropagationlossmodel:11,"int":[19,1,13,10,9,16,4],mask:16,dure:[10,1,19],tdiff:16,bridge_channel:[12,21,6],inf:4,ing:16,detail:[10,9],virtual:10,new_valu:4,node_hom:1,other:[10,5,1],bool:[10,16],branch:16,varieti:10,is_start:6,repeat:10,star:16,heapschedul:10,shfile:1,replace_kwarg:[20,6],ns3baseerrormodel:[11,6],linuxmtr:1,omf_5:4,debian:1,annotate_edge_net:16,reliabl:1,match_tag:16,controlpersist:16},objtypes:{"0":"py:module","1":"py:method","2":"py:function","3":"py:class","4":"py:attribute","5":"py:classmethod"},objnames:{"0":["py","module","Python module"],"1":["py","method","Python method"],"2":["py","function","Python function"],"3":["py","class","Python class"],"4":["py","attribute","Python attribute"],"5":["py","classmethod","Python class method"]},filenames:["_layout/nepi.resources.linux.ccn","_layout/nepi.resources.linux","_layout/nepi.resources.linux.netns","_layout/nepi.data.processing.ccn","_layout/nepi.resources.omf","index","_layout/nepi.resources.ns3","_layout/nepi.resources.planetlab.ns3","_layout/nepi.resources.linux.ns3","_layout/nepi.resources.planetlab","_layout/nepi.execution","_layout/nepi.resources.ns3.classes","_layout/nepi","_layout/nepi.resources.all","_layout/nepi.resources.linux.ns3.ccn","_layout/nepi.data.processing","_layout/nepi.util","_layout/modules","_layout/nepi.data","_layout/nepi.resources.planetlab.openvswitch","_layout/nepi.resources.netns","_layout/nepi.resources","_layout/nepi.data.processing.ping","_layout/nepi.util.parsers"],titles:["nepi.resources.linux.ccn package","nepi.resources.linux package","nepi.resources.linux.netns package","nepi.data.processing.ccn package","nepi.resources.omf package","NEPI modules","nepi.resources.ns3 package","nepi.resources.planetlab.ns3 package","nepi.resources.linux.ns3 package","nepi.resources.planetlab package","nepi.execution package","nepi.resources.ns3.classes package","nepi package","nepi.resources.all package","nepi.resources.linux.ns3.ccn package","nepi.data.processing package","nepi.util package","nepi","nepi.data package","nepi.resources.planetlab.openvswitch package","nepi.resources.netns package","nepi.resources package","nepi.data.processing.ping package","nepi.util.parsers package"],objects:{"":{nepi:[12,0,0,"-"]},"nepi.resources.ns3.classes.hierarchical_mobility_model":{NS3HierarchicalMobilityModel:[11,3,1,""]},"nepi.resources.linux.rpmfuncs":{install_rpmfusion_command:[1,2,1,""],remove_packages_command:[1,2,1,""],install_packages_command:[1,2,1,""]},"nepi.resources.netns.netnsswitch":{NetNSSwitch:[20,3,1,""]},"nepi.resources.linux.route":{LinuxRoute:[1,3,1,""]},"nepi.resources.ns3.classes.matrix_propagation_loss_model":{NS3MatrixPropagationLossModel:[11,3,1,""]},"nepi.util.parsers.xml_parser":{xmlencode:[23,2,1,""],to_type:[23,2,1,""],ECXMLParser:[23,3,1,""],from_type:[23,2,1,""],xmldecode:[23,2,1,""]},"nepi.resources.netns.netnswrapper.NetNSWrapper":{debuger:[20,4,1,""],invoke:[20,1,1,""],get:[20,1,1,""],get_object:[20,1,1,""],create:[20,1,1,""],replace_kwargs:[20,1,1,""],set:[20,1,1,""],make_uuid:[20,1,1,""],shutdown:[20,1,1,""],replace_args:[20,1,1,""],logger:[20,4,1,""]},"nepi.resources.netns.netnsserver.NetNSWrapperMessage":{SET:[20,4,1,""],INVOKE:[20,4,1,""],GET:[20,4,1,""],CREATE:[20,4,1,""],SHUTDOWN:[20,4,1,""],FLUSH:[20,4,1,""]},"nepi.resources.planetlab.plcapi.PLCAPI":{reserved:[9,1,1,""],get_slice_id:[9,1,1,""],delete_slice_node:[9,1,1,""],start_multicall:[9,1,1,""],get_node_tags:[9,1,1,""],api:[9,4,1,""],unblacklist_host:[9,1,1,""],get_slices:[9,1,1,""],get_slice_tags:[9,1,1,""],get_node_flavour:[9,1,1,""],mcapi:[9,4,1,""],peer_map:[9,4,1,""],test:[9,1,1,""],finish_multicall:[9,1,1,""],get_interfaces:[9,1,1,""],get_slice_nodes:[9,1,1,""],blacklist_host:[9,1,1,""],blacklisted:[9,1,1,""],unreserve_host:[9,1,1,""],get_node_info:[9,1,1,""],network_types:[9,4,1,""],get_slice_vnet_sys_tag:[9,1,1,""],release:[9,1,1,""],reserve_host:[9,1,1,""],get_nodes:[9,1,1,""],update_slice:[9,1,1,""],add_slice_nodes:[9,1,1,""]},"nepi.resources.ns3.ns3node.NS3BaseNode":{arp:[6,4,1,""],mobility:[6,4,1,""],devices:[6,4,1,""],simulation:[6,4,1,""],node_id:[6,4,1,""],ipv4:[6,4,1,""],dceapplications:[6,4,1,""]},"nepi.util":{sfaapi:[16,0,0,"-"],netgraph:[16,0,0,"-"],rmatcher:[16,0,0,"-"],plotter:[16,0,0,"-"],manifoldapi:[16,0,0,"-"],sfarspec_proc:[16,0,0,"-"],statfuncs:[16,0,0,"-"],parsers:[23,0,0,"-"],environ:[16,0,0,"-"],execfuncs:[16,0,0,"-"],timefuncs:[16,0,0,"-"],logger:[16,0,0,"-"],guid:[16,0,0,"-"],parallel:[16,0,0,"-"],serializer:[16,0,0,"-"],sshfuncs:[16,0,0,"-"]},"nepi.resources.linux.ccn.ccncontent":{LinuxCCNContent:[0,3,1,""]},"nepi.resources.ns3.classes.bridge_net_device":{NS3BridgeNetDevice:[11,3,1,""]},"nepi.resources.linux.node.ExitCode":{CORRUPTFILE:[1,4,1,""],FILENOTFOUND:[1,4,1,""],OK:[1,4,1,""],ERROR:[1,4,1,""]},"nepi.resources.ns3.classes.arf_wifi_manager":{NS3ArfWifiManager:[11,3,1,""]},"nepi.resources.linux.mtr.LinuxMtr":{upload_start_command:[1,1,1,""],do_deploy:[1,1,1,""],valid_connection:[1,1,1,""],do_start:[1,1,1,""]},"nepi.resources.ns3.classes.packet_sink":{NS3PacketSink:[11,3,1,""]},"nepi.execution.trace.TraceAttr":{PATH:[10,4,1,""],ALL:[10,4,1,""],STREAM:[10,4,1,""],SIZE:[10,4,1,""]},"nepi.resources.netns.netnsnodeinterface.NetNSNodeInterface":{node:[20,4,1,""],"switch":[20,4,1,""],emulation:[20,4,1,""]},"nepi.resources.linux.application.LinuxApplication":{upload_files:[1,1,1,""],upload_code:[1,1,1,""],do_release:[1,1,1,""],pid:[1,4,1,""],trace_filepath:[1,1,1,""],do_start:[1,1,1,""],upload_libraries:[1,1,1,""],valid_connection:[1,1,1,""],upload_binaries:[1,1,1,""],replace_paths:[1,1,1,""],state:[1,4,1,""],run_home:[1,4,1,""],build:[1,1,1,""],do_stop:[1,1,1,""],upload_sources:[1,1,1,""],ppid:[1,4,1,""],node:[1,4,1,""],app_home:[1,4,1,""],trace:[1,1,1,""],execute_command:[1,1,1,""],do_provision:[1,1,1,""],install_dependencies:[1,1,1,""],do_deploy:[1,1,1,""],log_message:[1,1,1,""],in_foreground:[1,4,1,""],execute_deploy_command:[1,1,1,""],upload_stdin:[1,1,1,""],install:[1,1,1,""],upload_start_command:[1,1,1,""]},"nepi.resources.ns3.ns3dceapplication.NS3BaseDceApplication":{do_stop:[6,1,1,""],pid:[6,4,1,""],do_start:[6,1,1,""],trace:[6,1,1,""]},"nepi.resources.linux.ccn.ccnpoke":{LinuxCCNPoke:[0,3,1,""]},"nepi.resources.netns.netnsnode":{NetNSNode:[20,3,1,""]},"nepi.resources.ns3.classes.multi_model_spectrum_channel":{NS3MultiModelSpectrumChannel:[11,3,1,""]},"nepi.resources.linux.ccn.fibentry.LinuxFIBEntry":{node:[0,4,1,""],traceroute:[0,4,1,""],valid_connection:[0,1,1,""],trace:[0,1,1,""],ping:[0,4,1,""],ccnd:[0,4,1,""],do_deploy:[0,1,1,""],do_start:[0,1,1,""],upload_start_command:[0,1,1,""],do_stop:[0,1,1,""],configure:[0,1,1,""]},"nepi.data.processing.ping.parser":{annotate_cn_graph:[22,2,1,""],parse_file:[22,2,1,""],annotate_cn_node:[22,2,1,""]},"nepi.resources.ns3.ns3route.NS3Route":{node:[6,4,1,""]},"nepi.util.logger":{Logger:[16,3,1,""]},"nepi.resources.ns3.classes.radvd":{NS3Radvd:[11,3,1,""]},"nepi.resources.linux.tcpdump.LinuxTcpdump":{do_deploy:[1,1,1,""],valid_connection:[1,1,1,""]},"nepi.resources.netns.netnsroute.NetNSIPv4Route":{node:[20,4,1,""],emulation:[20,4,1,""]},"nepi.resources.ns3.classes.cost231propagation_loss_model":{NS3Cost231PropagationLossModel:[11,3,1,""]},"nepi.util.sshfuncs":{rspawn:[16,2,1,""],STDOUT:[16,3,1,""],log:[16,2,1,""],openssh_has_persist:[16,2,1,""],resolve_hostname:[16,2,1,""],rkill:[16,2,1,""],make_server_key_args:[16,2,1,""],gethostbyname:[16,2,1,""],shell_escape:[16,2,1,""],ProcStatus:[16,3,1,""],rexec:[16,2,1,""],eintr_retry:[16,2,1,""],make_control_path:[16,2,1,""],rcopy:[16,2,1,""],rgetpid:[16,2,1,""],rstatus:[16,2,1,""]},"nepi.resources.ns3.classes.subscriber_station_net_device":{NS3SubscriberStationNetDevice:[11,3,1,""]},"nepi.resources.linux.channel":{LinuxChannel:[1,3,1,""]},"nepi.resources.planetlab.ns3.fdudptunnel.PlanetlabNs3FdUdpTunnel":{get_endpoints:[7,1,1,""]},"nepi.resources.linux.traceroute.LinuxTraceroute":{upload_start_command:[1,1,1,""],do_deploy:[1,1,1,""],valid_connection:[1,1,1,""],do_start:[1,1,1,""]},"nepi.resources.linux.ccn.ccnpeek.LinuxCCNPeek":{do_deploy:[0,1,1,""],valid_connection:[0,1,1,""]},"nepi.resources.linux.debfuncs":{remove_packages_command:[1,2,1,""],install_packages_command:[1,2,1,""]},"nepi.resources.ns3.classes.yans_wifi_phy":{NS3YansWifiPhy:[11,3,1,""]},"nepi.resources.linux.route.LinuxRoute":{node:[1,4,1,""],device:[1,4,1,""],do_deploy:[1,1,1,""],do_start:[1,1,1,""],upload_start_command:[1,1,1,""],do_stop:[1,1,1,""],upload_sources:[1,1,1,""]},"nepi.resources.netns.netnsserver":{get_options:[20,2,1,""],NetNSWrapperMessage:[20,3,1,""],run_server:[20,2,1,""],recv_msg:[20,2,1,""],create_socket:[20,2,1,""],handle_message:[20,2,1,""],send_reply:[20,2,1,""]},"nepi.resources.linux.ns3.ccn.ns3ccndceapplication":{LinuxNS3CCNDceApplication:[14,3,1,""]},"nepi.resources.ns3.ns3errorratemodel.NS3BaseErrorRateModel":{node:[6,4,1,""],phy:[6,4,1,""]},"nepi.resources.omf.omf6_api.OMF6API":{frcp_inform:[4,1,1,""],unenroll_topic:[4,1,1,""],disconnect:[4,1,1,""],create_and_enroll_topic:[4,1,1,""],frcp_configure:[4,1,1,""],check_ready:[4,1,1,""],frcp_create:[4,1,1,""],frcp_release:[4,1,1,""],check_mailbox:[4,1,1,""],frcp_request:[4,1,1,""],enroll_topic:[4,1,1,""]},"nepi.resources.planetlab":{node:[9,0,0,"-"],ns3:[7,0,0,"-"],tap:[9,0,0,"-"],vroute:[9,0,0,"-"],sfa_node:[9,0,0,"-"],openvswitch:[19,0,0,"-"],tun:[9,0,0,"-"],plcapi:[9,0,0,"-"]},"nepi.resources.omf.channel.OMFChannel":{valid_connection:[4,1,1,""],get_frequency:[4,1,1,""],do_release:[4,1,1,""],do_deploy:[4,1,1,""],ChannelToFreq:[4,4,1,""],exp_id:[4,4,1,""]},"nepi.resources.netns.netnsapplication":{NetNSApplication:[20,3,1,""]},"nepi.resources.netns.netnsipv4address":{NetNSIPv4Address:[20,3,1,""]},"nepi.execution.resource.ResourceAction":{START:[10,4,1,""],STOP:[10,4,1,""],DEPLOY:[10,4,1,""]},"nepi.resources.planetlab.ns3.fdudptunnel":{PlanetlabNs3FdUdpTunnel:[7,3,1,""]},"nepi.util.serializer":{ECSerializer:[16,3,1,""],SFormats:[16,3,1,""]},"nepi.resources.netns.netnsclient.NetNSClient":{set:[20,1,1,""],invoke:[20,1,1,""],get:[20,1,1,""],create:[20,1,1,""],shutdown:[20,1,1,""],flush:[20,1,1,""]},"nepi.util.sshfuncs.ProcStatus":{NOT_STARTED:[16,4,1,""],RUNNING:[16,4,1,""],FINISHED:[16,4,1,""]},"nepi.resources.linux.ns3.ccn.ns3ccnrdceapplication":{LinuxNS3DceCCNR:[14,3,1,""]},"nepi.resources.ns3.classes.aarf_wifi_manager":{NS3AarfWifiManager:[11,3,1,""]},"nepi.resources.ns3.ns3ccndceapplication.NS3BaseCCNDceApplication":{ccn_client_lock:[6,4,1,""],ccn_client_helper_uuid:[6,4,1,""]},"nepi.resources.ns3.classes.csma_channel":{NS3CsmaChannel:[11,3,1,""]},"nepi.resources.ns3.classes.uan_channel":{NS3UanChannel:[11,3,1,""]},"nepi.resources.linux.ccn.ccnpeek":{LinuxCCNPeek:[0,3,1,""]},"nepi.execution.runner.ExperimentRunner":{evaluate_normal_convergence:[10,1,1,""],run:[10,1,1,""],run_experiment:[10,1,1,""]},"nepi.resources.ns3.ns3icmpv4l4protocol":{NS3BaseIcmpv4L4Protocol:[6,3,1,""]},"nepi.resources.ns3.ns3channel":{NS3BaseChannel:[6,3,1,""]},"nepi.resources.ns3.ns3base":{NS3Base:[6,3,1,""]},"nepi.resources.omf.interface":{OMFWifiInterface:[4,3,1,""]},"nepi.resources.ns3.classes.okumura_hata_propagation_loss_model":{NS3OkumuraHataPropagationLossModel:[11,3,1,""]},"nepi.resources.netns.netnswrapper_debug.NetNSWrapperDebuger":{format_kwargs:[20,1,1,""],dump_factory:[20,1,1,""],dump_create:[20,1,1,""],dump_shutdown:[20,1,1,""],dump_to_script:[20,1,1,""],enabled:[20,4,1,""],dump_invoke:[20,1,1,""],format_value:[20,1,1,""],dump_header:[20,1,1,""],format_args:[20,1,1,""],script_path:[20,4,1,""],dump_set:[20,1,1,""],dump_get:[20,1,1,""]},"nepi.util.plotter.PFormats":{FIGURE:[16,4,1,""],DOT:[16,4,1,""]},"nepi.resources.ns3.classes.virtual_net_device":{NS3VirtualNetDevice:[11,3,1,""]},"nepi.resources.ns3.classes.ap_wifi_mac":{NS3ApWifiMac:[11,3,1,""]},"nepi.resources.omf.omf_client":{OMFClient:[4,3,1,""],BaseOMFClient:[4,3,1,""]},"nepi.util.statfuncs":{compute_mean:[16,2,1,""]},"nepi.util.manifoldapi.MANIFOLDAPIFactory":{make_key:[16,5,1,""],get_api:[16,5,1,""]},"nepi.execution.runner":{ExperimentRunner:[10,3,1,""]},"nepi.resources.linux.udptunnel.LinuxUdpTunnel":{initiate_connection:[1,1,1,""],verify_connection:[1,1,1,""],establish_connection:[1,1,1,""],log_message:[1,1,1,""],terminate_connection:[1,1,1,""],get_endpoints:[1,1,1,""],check_state_connection:[1,1,1,""]},"nepi.resources.ns3.classes.lte_enb_net_device":{NS3LteEnbNetDevice:[11,3,1,""]},"nepi.resources.omf.channel":{OMFChannel:[4,3,1,""]},"nepi.resources.linux.netns.netnsemulation.LinuxNetNSEmulation":{clone_command:[2,1,1,""],netns_src:[2,4,1,""],socket_name:[2,4,1,""],python_unshare_repo:[2,4,1,""],do_start:[2,1,1,""],valid_connection:[2,1,1,""],replace_paths:[2,1,1,""],python_unshare_version:[2,4,1,""],do_stop:[2,1,1,""],upload_sources:[2,1,1,""],do_release:[2,1,1,""],python_unshare_src:[2,4,1,""],wait_remote_socket:[2,1,1,""],python_passfd_version:[2,4,1,""],do_deploy:[2,1,1,""],netns_version:[2,4,1,""],remote_socket:[2,4,1,""],netns_repo:[2,4,1,""],upload_extra_sources:[2,1,1,""],python_passfd_src:[2,4,1,""],upload_start_command:[2,1,1,""],python_passfd_repo:[2,4,1,""]},"nepi.execution.resource.ResourceFactory":{create:[10,5,1,""],register_type:[10,5,1,""],resource_types:[10,5,1,""],get_resource_type:[10,5,1,""]},"nepi.util.timefuncs":{stabsformat:[16,2,1,""],compute_delay_ms:[16,2,1,""],tdiff:[16,2,1,""],tnow:[16,2,1,""],tsformat:[16,2,1,""],stformat:[16,2,1,""],tdiffsec:[16,2,1,""]},"nepi.execution.attribute.Types":{Integer:[10,4,1,""],Double:[10,4,1,""],Bool:[10,4,1,""],String:[10,4,1,""],Enumerate:[10,4,1,""]},"nepi.resources.omf.messages_5_4.MessageHandler":{enroll_function:[4,1,1,""],configure_function:[4,1,1,""],exit_function:[4,1,1,""],alias_function:[4,1,1,""],execute_function:[4,1,1,""],stdin_function:[4,1,1,""],log_function:[4,1,1,""],noop_function:[4,1,1,""],newexp_function:[4,1,1,""]},"nepi.resources.omf.messages_6":{MessageHandler:[4,3,1,""]},"nepi.resources.ns3.ns3queue.NS3BaseQueue":{device:[6,4,1,""],node:[6,4,1,""]},"nepi.resources.linux.gretunnel":{LinuxGRETunnel:[1,3,1,""]},"nepi.resources.ns3.classes.ocb_wifi_mac":{NS3OcbWifiMac:[11,3,1,""]},"nepi.execution.ec.FailureManager":{ec:[10,4,1,""],abort:[10,4,1,""],eval_failure:[10,1,1,""],set_ec_failure:[10,1,1,""],set_ec:[10,1,1,""]},"nepi.resources.omf.omf_api_factory.OMFAPIFactory":{lock:[4,4,1,""],create_api:[4,5,1,""],release_api:[4,5,1,""],get_api:[4,5,1,""]},"nepi.resources.ns3.ns3wifiremotestationmanager.NS3BaseWifiRemoteStationManager":{device:[6,4,1,""],node:[6,4,1,""]},"nepi.resources.ns3.ns3wifiphy":{NS3BaseWifiPhy:[6,3,1,""]},"nepi.resources.ns3.ns3arpl3protocol.NS3BaseArpL3Protocol":{node:[6,4,1,""]},"nepi.resources.planetlab.openvswitch.ovsport":{PlanetlabOVSPort:[19,3,1,""]},"nepi.data.processing.ccn":{parser:[3,0,0,"-"]},"nepi.resources.ns3.classes.log_distance_propagation_loss_model":{NS3LogDistancePropagationLossModel:[11,3,1,""]},"nepi.resources.ns3.ns3fdnetdevice.NS3BaseFdNetDevice":{recv_fd:[6,1,1,""]},"nepi.resources.ns3.classes.udp_trace_client":{NS3UdpTraceClient:[11,3,1,""]},"nepi.resources.ns3.ns3wifiremotestationmanager":{NS3BaseWifiRemoteStationManager:[6,3,1,""]},"nepi.resources.ns3.classes.random_direction2d_mobility_model":{NS3RandomDirection2dMobilityModel:[11,3,1,""]},"nepi.resources.ns3.ns3wifichannel.NS3BaseWifiChannel":{phys:[6,4,1,""],simulation:[6,4,1,""]},"nepi.resources.ns3.classes.constant_velocity_mobility_model":{NS3ConstantVelocityMobilityModel:[11,3,1,""]},"nepi.resources.ns3.classes.three_log_distance_propagation_loss_model":{NS3ThreeLogDistancePropagationLossModel:[11,3,1,""]},"nepi.resources.ns3.classes":{constant_rate_wifi_manager:[11,0,0,"-"],sta_wifi_mac:[11,0,0,"-"],waypoint_mobility_model:[11,0,0,"-"],ocb_wifi_mac:[11,0,0,"-"],dsrdsr_routing:[11,0,0,"-"],hybrid_buildings_propagation_loss_model:[11,0,0,"-"],packet_sink:[11,0,0,"-"],loopback_net_device:[11,0,0,"-"],itu_r1411los_propagation_loss_model:[11,0,0,"-"],nist_error_rate_model:[11,0,0,"-"],yans_wifi_channel:[11,0,0,"-"],point_to_point_channel:[11,0,0,"-"],random_direction2d_mobility_model:[11,0,0,"-"],lr_wpan_net_device:[11,0,0,"-"],udp_trace_client:[11,0,0,"-"],list_error_model:[11,0,0,"-"],bridge_net_device:[11,0,0,"-"],jakes_propagation_loss_model:[11,0,0,"-"],rraa_wifi_manager:[11,0,0,"-"],receive_list_error_model:[11,0,0,"-"],virtual_net_device:[11,0,0,"-"],minstrel_wifi_manager:[11,0,0,"-"],multi_model_spectrum_channel:[11,0,0,"-"],itu_r1411nlos_over_rooftop_propagation_loss_model:[11,0,0,"-"],lte_enb_net_device:[11,0,0,"-"],point_to_point_remote_channel:[11,0,0,"-"],binary_error_sixlow_model:[11,0,0,"-"],error_channel:[11,0,0,"-"],aloha_noack_net_device:[11,0,0,"-"],udp_l4protocol:[11,0,0,"-"],amrr_wifi_manager:[11,0,0,"-"],ideal_wifi_manager:[11,0,0,"-"],rate_error_model:[11,0,0,"-"],kun2600mhz_propagation_loss_model:[11,0,0,"-"],icmpv6l4protocol:[11,0,0,"-"],csma_net_device:[11,0,0,"-"],udp_echo_client:[11,0,0,"-"],constant_speed_propagation_delay_model:[11,0,0,"-"],drop_tail_queue:[11,0,0,"-"],random_propagation_delay_model:[11,0,0,"-"],ping6:[11,0,0,"-"],constant_position_mobility_model:[11,0,0,"-"],onoe_wifi_manager:[11,0,0,"-"],okumura_hata_propagation_loss_model:[11,0,0,"-"],bulk_send_application:[11,0,0,"-"],lte_simple_net_device:[11,0,0,"-"],yans_error_rate_model:[11,0,0,"-"],non_communicating_net_device:[11,0,0,"-"],red_queue:[11,0,0,"-"],mesh_wifi_interface_mac:[11,0,0,"-"],error_net_device:[11,0,0,"-"],aarfcd_wifi_manager:[11,0,0,"-"],v4ping:[11,0,0,"-"],binary_error_model:[11,0,0,"-"],emu_net_device:[11,0,0,"-"],hierarchical_mobility_model:[11,0,0,"-"],fd_net_device:[11,0,0,"-"],constant_acceleration_mobility_model:[11,0,0,"-"],gauss_markov_mobility_model:[11,0,0,"-"],ipv4l3protocol:[11,0,0,"-"],constant_velocity_mobility_model:[11,0,0,"-"],ap_wifi_mac:[11,0,0,"-"],simple_net_device:[11,0,0,"-"],csma_channel:[11,0,0,"-"],icmpv4l4protocol:[11,0,0,"-"],wifi_net_device:[11,0,0,"-"],oh_buildings_propagation_loss_model:[11,0,0,"-"],range_propagation_loss_model:[11,0,0,"-"],lte_ue_net_device:[11,0,0,"-"],yans_wifi_phy:[11,0,0,"-"],single_model_spectrum_channel:[11,0,0,"-"],mesh_point_device:[11,0,0,"-"],simple_channel:[11,0,0,"-"],arf_wifi_manager:[11,0,0,"-"],three_log_distance_propagation_loss_model:[11,0,0,"-"],friis_propagation_loss_model:[11,0,0,"-"],aarf_wifi_manager:[11,0,0,"-"],tap_bridge:[11,0,0,"-"],random_propagation_loss_model:[11,0,0,"-"],random_walk2d_mobility_model:[11,0,0,"-"],radvd:[11,0,0,"-"],six_low_pan_net_device:[11,0,0,"-"],on_off_application:[11,0,0,"-"],arp_l3protocol:[11,0,0,"-"],fixed_rss_loss_model:[11,0,0,"-"],adhoc_wifi_mac:[11,0,0,"-"],base_station_net_device:[11,0,0,"-"],log_distance_propagation_loss_model:[11,0,0,"-"],udp_echo_server:[11,0,0,"-"],udp_client:[11,0,0,"-"],steady_state_random_waypoint_mobility_model:[11,0,0,"-"],point_to_point_net_device:[11,0,0,"-"],tcp_l4protocol:[11,0,0,"-"],random_waypoint_mobility_model:[11,0,0,"-"],nakagami_propagation_loss_model:[11,0,0,"-"],burst_error_model:[11,0,0,"-"],subscriber_station_net_device:[11,0,0,"-"],error_channel_sixlow:[11,0,0,"-"],node:[11,0,0,"-"],cost231propagation_loss_model:[11,0,0,"-"],two_ray_ground_propagation_loss_model:[11,0,0,"-"],cara_wifi_manager:[11,0,0,"-"],matrix_propagation_loss_model:[11,0,0,"-"],udp_server:[11,0,0,"-"],bridge_channel:[11,0,0,"-"],uan_channel:[11,0,0,"-"]},"nepi.resources.planetlab.openvswitch.ovs":{PlanetlabOVSSwitch:[19,3,1,""]},"nepi.resources.netns.netnsapplication.NetNSApplication":{node:[20,4,1,""],state:[20,4,1,""],emulation:[20,4,1,""],do_start:[20,1,1,""]},"nepi.resources.ns3.ns3dceapplication":{NS3BaseDceApplication:[6,3,1,""]},"nepi.resources.linux.ccn.ccnping.LinuxCCNPing":{ccnpingserver:[0,4,1,""],valid_connection:[0,1,1,""],do_start:[0,1,1,""]},"nepi.resources.linux.netns":{netnsclient:[2,0,0,"-"],netnsemulation:[2,0,0,"-"]},"nepi.resources.ns3.classes.on_off_application":{NS3OnOffApplication:[11,3,1,""]},"nepi.resources.omf.omf5_api.OMF5API":{execute:[4,1,1,""],disconnect:[4,1,1,""],configure:[4,1,1,""],enroll_host:[4,1,1,""],exit:[4,1,1,""],send_stdin:[4,1,1,""],release:[4,1,1,""],"delete":[4,1,1,""]},"nepi.resources.ns3.classes.bridge_channel":{NS3BridgeChannel:[11,3,1,""]},"nepi.util.parallel.ParallelRun":{initialize_workers:[16,1,1,""],join:[16,1,1,""],sync:[16,1,1,""],start:[16,1,1,""],put_nowait:[16,1,1,""],put:[16,1,1,""],destroy:[16,1,1,""],empty:[16,1,1,""]},"nepi.resources.ns3.ns3icmpv4l4protocol.NS3BaseIcmpv4L4Protocol":{node:[6,4,1,""]},"nepi.resources.linux.ns3.ns3client":{LinuxNS3Client:[8,3,1,""]},"nepi.resources.ns3.classes.error_channel":{NS3ErrorChannel:[11,3,1,""]},"nepi.resources.ns3.ns3dcehelper":{NS3DceHelper:[6,3,1,""]},"nepi.resources.linux.ns3.ns3simulation":{LinuxNS3Simulation:[8,3,1,""]},"nepi.util.sfaapi":{SFAAPI:[16,3,1,""],SFAAPIFactory:[16,3,1,""]},"nepi.resources.ns3.classes.udp_server":{NS3UdpServer:[11,3,1,""]},"nepi.util.sfaapi.SFAAPIFactory":{make_key:[16,5,1,""],get_api:[16,5,1,""]},"nepi.resources.omf.omf6_parser":{OMF6Parser:[4,3,1,""]},"nepi.resources.netns.netnswrapper":{NetNSWrapper:[20,3,1,""]},"nepi.resources.ns3.classes.wifi_net_device":{NS3WifiNetDevice:[11,3,1,""]},"nepi.resources.all":{collector:[13,0,0,"-"]},"nepi.resources.ns3.classes.ideal_wifi_manager":{NS3IdealWifiManager:[11,3,1,""]},"nepi.resources.linux.netns.netnsemulation":{LinuxNetNSEmulation:[2,3,1,""]},"nepi.resources.ns3.classes.waypoint_mobility_model":{NS3WaypointMobilityModel:[11,3,1,""]},"nepi.util.sfarspec_proc":{SfaRSpecProcessing:[16,3,1,""]},"nepi.resources.omf.omf5_api":{OMF5API:[4,3,1,""]},"nepi.execution.trace":{TraceAttr:[10,3,1,""],Trace:[10,3,1,""]},"nepi.resources.ns3.classes.fixed_rss_loss_model":{NS3FixedRssLossModel:[11,3,1,""]},"nepi.resources.ns3.ns3wrapper":{NS3Wrapper:[6,3,1,""],load_ns3_module:[6,2,1,""],load_ns3_libraries:[6,2,1,""]},"nepi.resources.linux.ns3.fdudptunnel.LinuxNs3FdUdpTunnel":{establish_connection:[8,1,1,""],wait_file:[8,1,1,""],establish:[8,1,1,""],endpoint_node:[8,1,1,""],wait_local_port:[8,1,1,""],verify:[8,1,1,""],run_home:[8,1,1,""],endpoint1:[8,4,1,""],endpoint2:[8,4,1,""],pi:[8,4,1,""],check_state_connection:[8,1,1,""],app_home:[8,1,1,""],upload_sources:[8,1,1,""],verify_connection:[8,1,1,""],log_message:[8,1,1,""],wait_result:[8,1,1,""],initiate_connection:[8,1,1,""],initiate:[8,1,1,""],endpoint_mkdir:[8,1,1,""],node1:[8,4,1,""],node2:[8,4,1,""],terminate_connection:[8,1,1,""],get_endpoints:[8,1,1,""]},"nepi.resources.ns3.ns3client":{NS3Client:[6,3,1,""]},"nepi.resources.ns3.classes.gauss_markov_mobility_model":{NS3GaussMarkovMobilityModel:[11,3,1,""]},"nepi.resources.linux.ccn.ccnpingserver.LinuxCCNPingServer":{do_deploy:[0,1,1,""],valid_connection:[0,1,1,""]},"nepi.resources.ns3.classes.minstrel_wifi_manager":{NS3MinstrelWifiManager:[11,3,1,""]},"nepi.util.execfuncs":{lcopy:[16,2,1,""],lkill:[16,2,1,""],lstatus:[16,2,1,""],lspawn:[16,2,1,""],lgetpid:[16,2,1,""],lexec:[16,2,1,""]},"nepi.resources.ns3.ns3application.NS3BaseApplication":{node:[6,4,1,""],do_stop:[6,1,1,""],state:[6,4,1,""],do_start:[6,1,1,""]},"nepi.execution.resource.ResourceManager":{do_fail:[10,1,1,""],do_configure:[10,1,1,""],set:[10,1,1,""],register_connection:[10,1,1,""],trace_enabled:[10,1,1,""],get_global:[10,5,1,""],do_connect:[10,1,1,""],do_release:[10,1,1,""],discover:[10,1,1,""],ec:[10,4,1,""],deploy_with_conditions:[10,1,1,""],do_discover:[10,1,1,""],set_global:[10,5,1,""],set_state:[10,1,1,""],set_stopped:[10,1,1,""],do_start:[10,1,1,""],is_rm_instance:[10,1,1,""],guid:[10,4,1,""],set_failed:[10,1,1,""],has_flag:[10,1,1,""],do_reserve:[10,1,1,""],stop_with_conditions:[10,1,1,""],has_changed:[10,1,1,""],valid_connection:[10,1,1,""],failed_time:[10,4,1,""],get:[10,1,1,""],unregister_connection:[10,1,1,""],discover_time:[10,4,1,""],set_state_time:[10,1,1,""],start:[10,1,1,""],state:[10,4,1,""],reserved_time:[10,4,1,""],has_attribute:[10,1,1,""],set_started:[10,1,1,""],set_provisioned:[10,1,1,""],get_rtype:[10,5,1,""],enable_trace:[10,1,1,""],set_discovered:[10,1,1,""],configure:[10,1,1,""],trace:[10,1,1,""],deploy:[10,1,1,""],stop:[10,1,1,""],start_time:[10,4,1,""],do_provision:[10,1,1,""],get_attribute:[10,5,1,""],stop_time:[10,4,1,""],connections:[10,4,1,""],set_with_conditions:[10,1,1,""],reschedule_delay:[10,4,1,""],do_deploy:[10,1,1,""],get_traces:[10,5,1,""],get_platform:[10,5,1,""],do_stop:[10,1,1,""],log_message:[10,1,1,""],register_condition:[10,1,1,""],provision:[10,1,1,""],provision_time:[10,4,1,""],unregister_condition:[10,1,1,""],get_connected:[10,1,1,""],start_with_conditions:[10,1,1,""],ready_time:[10,4,1,""],conditions:[10,4,1,""],set_reserved:[10,1,1,""],set_released:[10,1,1,""],release_time:[10,4,1,""],do_disconnect:[10,1,1,""],get_help:[10,5,1,""],release:[10,1,1,""],fail:[10,1,1,""],set_ready:[10,1,1,""],get_attributes:[10,5,1,""],reserve:[10,1,1,""]},"nepi.util.rmatcher":{find_boxes:[16,2,1,""],match_tags:[16,2,1,""]},"nepi.resources.linux.ns3.ccn.ns3ccnddceapplication":{LinuxNS3DceCCND:[14,3,1,""]},"nepi.resources.ns3.ns3wrapper_debug.NS3WrapperDebuger":{format_kwargs:[6,1,1,""],dump_factory:[6,1,1,""],dump_invoke:[6,1,1,""],dump_shutdown:[6,1,1,""],dump_stop:[6,1,1,""],dump_to_script:[6,1,1,""],enabled:[6,4,1,""],dump_create:[6,1,1,""],format_value:[6,1,1,""],dump_header:[6,1,1,""],format_args:[6,1,1,""],dump_start:[6,1,1,""],script_path:[6,4,1,""],dump_set:[6,1,1,""],dump_get:[6,1,1,""]},"nepi.resources.ns3.ns3propagationdelaymodel":{NS3BasePropagationDelayModel:[6,3,1,""]},"nepi.resources.ns3.ns3mobilitymodel":{NS3BaseMobilityModel:[6,3,1,""]},"nepi.resources.ns3.classes.base_station_net_device":{NS3BaseStationNetDevice:[11,3,1,""]},"nepi.resources.ns3.ns3errorratemodel":{NS3BaseErrorRateModel:[6,3,1,""]},"nepi.resources":{all:[13,0,0,"-"],omf:[4,0,0,"-"],planetlab:[9,0,0,"-"],linux:[1,0,0,"-"],netns:[20,0,0,"-"],ns3:[6,0,0,"-"]},nepi:{util:[16,0,0,"-"],execution:[10,0,0,"-"],data:[18,0,0,"-"],resources:[21,0,0,"-"]},"nepi.resources.ns3.classes.ipv4l3protocol":{NS3Ipv4L3Protocol:[11,3,1,""]},"nepi.resources.ns3.classes.error_channel_sixlow":{NS3ErrorChannelSixlow:[11,3,1,""]},"nepi.resources.ns3.classes.steady_state_random_waypoint_mobility_model":{NS3SteadyStateRandomWaypointMobilityModel:[11,3,1,""]},"nepi.resources.linux":{node:[1,0,0,"-"],tap:[1,0,0,"-"],application:[1,0,0,"-"],mtr:[1,0,0,"-"],route:[1,0,0,"-"],ping:[1,0,0,"-"],traceroute:[1,0,0,"-"],udptunnel:[1,0,0,"-"],ccn:[0,0,0,"-"],tunnel:[1,0,0,"-"],nping:[1,0,0,"-"],rpmfuncs:[1,0,0,"-"],tun:[1,0,0,"-"],gretunnel:[1,0,0,"-"],"interface":[1,0,0,"-"],netns:[2,0,0,"-"],debfuncs:[1,0,0,"-"],ns3:[8,0,0,"-"],tcpdump:[1,0,0,"-"],udptest:[1,0,0,"-"],channel:[1,0,0,"-"]},"nepi.resources.ns3.classes.binary_error_model":{NS3BinaryErrorModel:[11,3,1,""]},"nepi.resources.planetlab.openvswitch":{ovs:[19,0,0,"-"],ovsport:[19,0,0,"-"]},"nepi.resources.omf":{node:[4,0,0,"-"],omf_client:[4,0,0,"-"],messages_6:[4,0,0,"-"],omf5_api:[4,0,0,"-"],omf_api_factory:[4,0,0,"-"],omf6_parser:[4,0,0,"-"],omf_resource:[4,0,0,"-"],application:[4,0,0,"-"],messages_5_4:[4,0,0,"-"],"interface":[4,0,0,"-"],omf6_api:[4,0,0,"-"],wilabt_node:[4,0,0,"-"],channel:[4,0,0,"-"]},"nepi.util.guid.GuidGenerator":{next:[16,1,1,""]},"nepi.resources.ns3.ns3simulation.NS3Simulation":{ns3_set:[6,1,1,""],invoke:[6,1,1,""],create:[6,1,1,""],stop:[6,1,1,""],factory:[6,1,1,""],start:[6,1,1,""],client:[6,4,1,""],shutdown:[6,1,1,""],flush:[6,1,1,""],ns3_get:[6,1,1,""]},"nepi.resources.ns3.classes.mesh_point_device":{NS3MeshPointDevice:[11,3,1,""]},"nepi.resources.linux.tcpdump":{LinuxTcpdump:[1,3,1,""]},"nepi.util.parallel":{WorkerThread:[16,3,1,""],ParallelRun:[16,3,1,""]},"nepi.util.plotter":{PFormats:[16,3,1,""],ECPlotter:[16,3,1,""]},"nepi.resources.planetlab.tap.PlanetlabTap":{node:[9,4,1,""],valid_connection:[9,1,1,""],vif_name_file:[9,4,1,""],gre_connect:[9,1,1,""],upload_start_command:[9,1,1,""],wait_vif_name:[9,1,1,""],upload_sources:[9,1,1,""]},"nepi.resources.linux.ccn.ccnpoke.LinuxCCNPoke":{do_deploy:[0,1,1,""],valid_connection:[0,1,1,""]},"nepi.execution.ec.ECState":{TERMINATED:[10,4,1,""],RUNNING:[10,4,1,""],RELEASED:[10,4,1,""],FAILED:[10,4,1,""]},"nepi.resources.ns3.classes.tap_bridge":{NS3TapBridge:[11,3,1,""]},"nepi.resources.linux.gretunnel.LinuxGRETunnel":{valid_connection:[1,1,1,""],verify_connection:[1,1,1,""],initiate_connection:[1,1,1,""],establish_connection:[1,1,1,""],log_message:[1,1,1,""],terminate_connection:[1,1,1,""],get_endpoints:[1,1,1,""],check_state_connection:[1,1,1,""]},"nepi.data":{processing:[15,0,0,"-"]},"nepi.resources.planetlab.sfa_node.PlanetlabSfaNode":{sfaapi:[9,4,1,""],do_release:[9,1,1,""],valid_connection:[9,1,1,""],do_provision:[9,1,1,""],do_discover:[9,1,1,""],fail_sfaapi:[9,1,1,""],fail_not_enough_nodes:[9,1,1,""],fail_node_not_alive:[9,1,1,""],fail_discovery:[9,1,1,""],fail_node_not_available:[9,1,1,""]},"nepi.resources.planetlab.tun":{PlanetlabTun:[9,3,1,""]},"nepi.resources.ns3.ns3server.NS3WrapperMessage":{SET:[6,4,1,""],INVOKE:[6,4,1,""],GET:[6,4,1,""],CREATE:[6,4,1,""],STOP:[6,4,1,""],FACTORY:[6,4,1,""],START:[6,4,1,""],SHUTDOWN:[6,4,1,""],FLUSH:[6,4,1,""]},"nepi.resources.ns3.ns3netdevice":{NS3BaseNetDevice:[6,3,1,""]},"nepi.resources.planetlab.vroute.PlanetlabVroute":{node:[9,4,1,""],tap:[9,4,1,""],valid_connection:[9,1,1,""],do_release:[9,1,1,""],do_deploy:[9,1,1,""],do_start:[9,1,1,""],upload_start_command:[9,1,1,""],do_stop:[9,1,1,""],upload_sources:[9,1,1,""]},"nepi.resources.ns3":{ns3wrapper_debug:[6,0,0,"-"],ns3errorratemodel:[6,0,0,"-"],ns3errormodel:[6,0,0,"-"],ns3wifiphy:[6,0,0,"-"],ns3wifimac:[6,0,0,"-"],ns3arpl3protocol:[6,0,0,"-"],ns3route:[6,0,0,"-"],ns3dceapplication:[6,0,0,"-"],resource_manager_generator:[6,0,0,"-"],ns3icmpv4l4protocol:[6,0,0,"-"],ns3propagationlossmodel:[6,0,0,"-"],ns3simulation:[6,0,0,"-"],ns3pipechanel:[6,0,0,"-"],ns3queue:[6,0,0,"-"],ns3wrapper:[6,0,0,"-"],ns3mobilitymodel:[6,0,0,"-"],ns3propagationdelaymodel:[6,0,0,"-"],ns3fdnetdevice:[6,0,0,"-"],ns3channel:[6,0,0,"-"],ns3ccndceapplication:[6,0,0,"-"],ns3wifiremotestationmanager:[6,0,0,"-"],ns3client:[6,0,0,"-"],ns3dcehelper:[6,0,0,"-"],ns3wifichannel:[6,0,0,"-"],ns3node:[6,0,0,"-"],ns3wifinetdevice:[6,0,0,"-"],ns3ipv4l3protocol:[6,0,0,"-"],ns3server:[6,0,0,"-"],ns3netdevice:[6,0,0,"-"],ns3base:[6,0,0,"-"],classes:[11,0,0,"-"],ns3application:[6,0,0,"-"]},"nepi.resources.ns3.ns3wifiphy.NS3BaseWifiPhy":{device:[6,4,1,""],node:[6,4,1,""],channel:[6,4,1,""]},"nepi.resources.linux.nping.LinuxNPing":{do_deploy:[1,1,1,""],valid_connection:[1,1,1,""]},"nepi.execution.scheduler.TaskStatus":{NEW:[10,4,1,""],DONE:[10,4,1,""],ERROR:[10,4,1,""]},"nepi.resources.linux.ns3.ns3pingdceapplication":{LinuxDcePing:[8,3,1,""]},"nepi.util.serializer.SFormats":{XML:[16,4,1,""]},"nepi.resources.ns3.ns3simulation":{NS3Simulation:[6,3,1,""]},"nepi.resources.ns3.classes.nist_error_rate_model":{NS3NistErrorRateModel:[11,3,1,""]},"nepi.resources.netns":{netnswrapper:[20,0,0,"-"],netnsbase:[20,0,0,"-"],netnsserver:[20,0,0,"-"],netnsipv4address:[20,0,0,"-"],netnswrapper_debug:[20,0,0,"-"],netnsapplication:[20,0,0,"-"],netnsnodeinterface:[20,0,0,"-"],netnsinterface:[20,0,0,"-"],netnsemulation:[20,0,0,"-"],netnsnode:[20,0,0,"-"],netnsroute:[20,0,0,"-"],netnsclient:[20,0,0,"-"],netnsswitch:[20,0,0,"-"]},"nepi.util.parsers.xml_parser.ECXMLParser":{from_xml:[23,1,1,""],to_xml:[23,1,1,""]},"nepi.resources.ns3.classes.kun2600mhz_propagation_loss_model":{NS3Kun2600MhzPropagationLossModel:[11,3,1,""]},"nepi.resources.netns.netnsswitch.NetNSSwitch":{"interface":[20,4,1,""],node:[20,4,1,""],emulation:[20,4,1,""]},"nepi.resources.ns3.classes.constant_speed_propagation_delay_model":{NS3ConstantSpeedPropagationDelayModel:[11,3,1,""]},"nepi.resources.ns3.ns3errormodel":{NS3BaseErrorModel:[6,3,1,""]},"nepi.resources.linux.node.OSType":{FEDORA_12:[1,4,1,""],FEDORA_14:[1,4,1,""],FEDORA:[1,4,1,""],FEDORA_8:[1,4,1,""],UBUNTU:[1,4,1,""],DEBIAN:[1,4,1,""]},"nepi.data.processing.ccn.parser":{annotate_cn_graph:[3,2,1,""],process_content_history_logs:[3,2,1,""],process_content_history:[3,2,1,""],ccn_consumers:[3,2,1,""],is_control:[3,2,1,""],ccn_producers:[3,2,1,""],annotate_cn_node:[3,2,1,""],parse_file:[3,2,1,""],load_content_history:[3,2,1,""],dump_content_history:[3,2,1,""]},"nepi.resources.planetlab.ns3":{fdudptunnel:[7,0,0,"-"],tuntapfdlink:[7,0,0,"-"]},"nepi.resources.ns3.ns3netdevice.NS3BaseNetDevice":{node:[6,4,1,""],queue:[6,4,1,""],ascii_helper_uuid:[6,4,1,""],channel:[6,4,1,""],device_helper_uuid:[6,4,1,""]},"nepi.resources.ns3.ns3wrapper.NS3Wrapper":{is_started:[6,4,1,""],debuger:[6,4,1,""],start:[6,1,1,""],invoke:[6,1,1,""],get:[6,1,1,""],replace_kwargs:[6,1,1,""],create:[6,1,1,""],stop:[6,1,1,""],factory:[6,1,1,""],is_running:[6,4,1,""],ns3:[6,4,1,""],get_object:[6,1,1,""],set:[6,1,1,""],make_uuid:[6,1,1,""],shutdown:[6,1,1,""],replace_args:[6,1,1,""],logger:[6,4,1,""],allowed_types:[6,4,1,""],is_finished:[6,4,1,""]},"nepi.resources.planetlab.node.PlanetlabNode":{plapi:[9,4,1,""],do_release:[9,1,1,""],valid_connection:[9,1,1,""],lock:[9,4,1,""],do_provision:[9,1,1,""],do_discover:[9,1,1,""],fail_plapi:[9,1,1,""],fail_not_enough_nodes:[9,1,1,""],fail_node_not_alive:[9,1,1,""],fail_discovery:[9,1,1,""],fail_node_not_available:[9,1,1,""]},"nepi.resources.linux.ns3.tuntapfdlink.LinuxTunTapFdLink":{node:[8,4,1,""],tap:[8,4,1,""],fdnetdevice:[8,4,1,""],fdnode:[8,4,1,""],upload_start_command:[8,1,1,""],do_deploy:[8,1,1,""],do_start:[8,1,1,""],tapnode:[8,4,1,""],upload_sources:[8,1,1,""]},"nepi.resources.ns3.classes.friis_propagation_loss_model":{NS3FriisPropagationLossModel:[11,3,1,""]},"nepi.resources.ns3.ns3base.NS3Base":{node:[6,4,1,""],set:[6,1,1,""],uuid:[6,4,1,""],trace:[6,1,1,""],get:[6,1,1,""],do_provision:[6,1,1,""],state:[6,4,1,""],simulation:[6,4,1,""],do_deploy:[6,1,1,""],connected:[6,4,1,""],do_start:[6,1,1,""],do_stop:[6,1,1,""]},"nepi.resources.linux.udptunnel":{LinuxUdpTunnel:[1,3,1,""]},"nepi.resources.ns3.classes.jakes_propagation_loss_model":{NS3JakesPropagationLossModel:[11,3,1,""]},"nepi.resources.linux.ns3.ccn.ns3fibentrydceapplication":{LinuxNS3DceFIBEntry:[14,3,1,""]},"nepi.resources.ns3.classes.sta_wifi_mac":{NS3StaWifiMac:[11,3,1,""]},"nepi.resources.linux.ns3":{tuntapfdlink:[8,0,0,"-"],fdudptunnel:[8,0,0,"-"],ns3simulation:[8,0,0,"-"],ccn:[14,0,0,"-"],ns3client:[8,0,0,"-"],ns3pingdceapplication:[8,0,0,"-"],ns3dceapplication:[8,0,0,"-"]},"nepi.resources.linux.ns3.ccn.ns3ccnpokedceapplication":{LinuxNS3DceCCNPoke:[14,3,1,""]},"nepi.resources.ns3.classes.single_model_spectrum_channel":{NS3SingleModelSpectrumChannel:[11,3,1,""]},"nepi.resources.ns3.classes.lte_ue_net_device":{NS3LteUeNetDevice:[11,3,1,""]},"nepi.resources.ns3.ns3server":{get_options:[6,2,1,""],run_server:[6,2,1,""],close_socket:[6,2,1,""],recv_msg:[6,2,1,""],open_socket:[6,2,1,""],handle_message:[6,2,1,""],send_reply:[6,2,1,""],NS3WrapperMessage:[6,3,1,""]},"nepi.execution.trace.Trace":{help:[10,4,1,""],name:[10,4,1,""]},"nepi.resources.ns3.ns3ipv4l3protocol.NS3BaseIpv4L3Protocol":{node:[6,4,1,""]},"nepi.resources.linux.node":{OSType:[1,3,1,""],LinuxNode:[1,3,1,""],ExitCode:[1,3,1,""]},"nepi.resources.omf.wilabt_node.WilabtSfaNode":{execute:[4,1,1,""],do_release:[4,1,1,""],valid_connection:[4,1,1,""],do_provision:[4,1,1,""],do_discover:[4,1,1,""],sfaapi:[4,4,1,""],fail_sfaapi:[4,1,1,""],do_deploy:[4,1,1,""],fail_not_enough_nodes:[4,1,1,""],fail_node_not_alive:[4,1,1,""],fail_discovery:[4,1,1,""],fail_node_not_available:[4,1,1,""]},"nepi.resources.linux.ns3.tuntapfdlink":{LinuxTunTapFdLink:[8,3,1,""]},"nepi.resources.ns3.ns3client.NS3Client":{set:[6,1,1,""],invoke:[6,1,1,""],get:[6,1,1,""],create:[6,1,1,""],stop:[6,1,1,""],factory:[6,1,1,""],start:[6,1,1,""],shutdown:[6,1,1,""],flush:[6,1,1,""]},"nepi.resources.omf.omf6_api":{OMF6API:[4,3,1,""]},"nepi.resources.ns3.classes.constant_rate_wifi_manager":{NS3ConstantRateWifiManager:[11,3,1,""]},"nepi.resources.ns3.classes.simple_channel":{NS3SimpleChannel:[11,3,1,""]},"nepi.resources.ns3.classes.emu_net_device":{NS3EmuNetDevice:[11,3,1,""]},"nepi.resources.netns.netnsroute":{NetNSIPv4Route:[20,3,1,""]},"nepi.resources.netns.netnsbase.NetNSBase":{set:[20,1,1,""],uuid:[20,4,1,""],trace:[20,1,1,""],get:[20,1,1,""],do_provision:[20,1,1,""],state:[20,4,1,""],do_deploy:[20,1,1,""],connected:[20,4,1,""],do_start:[20,1,1,""],do_stop:[20,1,1,""]},"nepi.resources.linux.ccn.ccnpingserver":{LinuxCCNPingServer:[0,3,1,""]},"nepi.resources.ns3.ns3dcehelper.NS3DceHelper":{dce_manager_uuid:[6,4,1,""],dce_application_uuid:[6,4,1,""],dce_manager_lock:[6,4,1,""],dce_application_lock:[6,4,1,""]},"nepi.resources.omf.messages_5_4":{MessageHandler:[4,3,1,""]},"nepi.resources.linux.node.LinuxNode":{usr_dir:[1,4,1,""],node_home:[1,4,1,""],do_release:[1,1,1,""],install_packages:[1,1,1,""],find_home:[1,1,1,""],kill:[1,1,1,""],valid_connection:[1,1,1,""],download:[1,1,1,""],wait_pid:[1,1,1,""],nepi_home:[1,4,1,""],clean_processes:[1,1,1,""],bin_dir:[1,4,1,""],format_environment:[1,1,1,""],upload_command:[1,1,1,""],mkdir:[1,1,1,""],home_dir:[1,4,1,""],filter_existing_files:[1,1,1,""],run_home:[1,4,1,""],getpid:[1,1,1,""],get_os:[1,1,1,""],src_dir:[1,4,1,""],exp_dir:[1,4,1,""],localhost:[1,4,1,""],rmdir:[1,1,1,""],status:[1,1,1,""],run:[1,1,1,""],clean_experiment:[1,1,1,""],share_dir:[1,4,1,""],do_provision:[1,1,1,""],use_rpm:[1,4,1,""],wait_run:[1,1,1,""],do_deploy:[1,1,1,""],exp_home:[1,4,1,""],log_message:[1,1,1,""],use_deb:[1,4,1,""],copy:[1,1,1,""],is_alive:[1,1,1,""],clean_home:[1,1,1,""],execute:[1,1,1,""],install_packages_command:[1,1,1,""],lib_dir:[1,4,1,""],upload:[1,1,1,""],check_errors:[1,1,1,""],check_output:[1,1,1,""],remove_packages:[1,1,1,""],exitcode:[1,1,1,""],os:[1,4,1,""],run_and_wait:[1,1,1,""]},"nepi.resources.ns3.classes.yans_wifi_channel":{NS3YansWifiChannel:[11,3,1,""]},"nepi.resources.ns3.classes.binary_error_sixlow_model":{NS3BinaryErrorSixlowModel:[11,3,1,""]},"nepi.resources.omf.omf_resource":{ResourceGateway:[4,3,1,""],OMFResource:[4,3,1,""]},"nepi.resources.netns.netnsbase":{NetNSBase:[20,3,1,""]},"nepi.resources.planetlab.vroute":{PlanetlabVroute:[9,3,1,""]},"nepi.resources.ns3.classes.csma_net_device":{NS3CsmaNetDevice:[11,3,1,""]},"nepi.resources.ns3.ns3wrapper_debug":{NS3WrapperDebuger:[6,3,1,""]},"nepi.resources.linux.ns3.fdudptunnel":{LinuxNs3FdUdpTunnel:[8,3,1,""]},"nepi.resources.ns3.classes.red_queue":{NS3RedQueue:[11,3,1,""]},"nepi.resources.linux.tap":{LinuxTap:[1,3,1,""]},"nepi.resources.ns3.classes.list_error_model":{NS3ListErrorModel:[11,3,1,""]},"nepi.resources.ns3.classes.udp_client":{NS3UdpClient:[11,3,1,""]},"nepi.resources.omf.node":{OMFNode:[4,3,1,""]},"nepi.resources.linux.ccn.ccnd.LinuxCCND":{valid_connection:[0,1,1,""],state:[0,4,1,""],do_deploy:[0,1,1,""],version:[0,4,1,""],do_start:[0,1,1,""],do_stop:[0,1,1,""],upload_start_command:[0,1,1,""],path:[0,4,1,""]},"nepi.resources.linux.interface":{LinuxInterface:[1,3,1,""]},"nepi.resources.ns3.classes.non_communicating_net_device":{NS3NonCommunicatingNetDevice:[11,3,1,""]},"nepi.resources.ns3.classes.itu_r1411los_propagation_loss_model":{NS3ItuR1411LosPropagationLossModel:[11,3,1,""]},"nepi.resources.linux.ccn.ccnping":{LinuxCCNPing:[0,3,1,""]},"nepi.resources.ns3.classes.lr_wpan_net_device":{NS3LrWpanNetDevice:[11,3,1,""]},"nepi.resources.ns3.classes.icmpv6l4protocol":{NS3Icmpv6L4Protocol:[11,3,1,""]},"nepi.resources.ns3.classes.tcp_l4protocol":{NS3TcpL4Protocol:[11,3,1,""]},"nepi.resources.linux.netns.netnsclient":{LinuxNetNSClient:[2,3,1,""]},"nepi.resources.ns3.ns3ipv4l3protocol":{NS3BaseIpv4L3Protocol:[6,3,1,""]},"nepi.resources.ns3.classes.onoe_wifi_manager":{NS3OnoeWifiManager:[11,3,1,""]},"nepi.resources.ns3.classes.two_ray_ground_propagation_loss_model":{NS3TwoRayGroundPropagationLossModel:[11,3,1,""]},"nepi.resources.linux.netns.netnsclient.LinuxNetNSClient":{set:[2,1,1,""],send_msg:[2,1,1,""],invoke:[2,1,1,""],get:[2,1,1,""],create:[2,1,1,""],emulation:[2,4,1,""],shutdown:[2,1,1,""],flush:[2,1,1,""]},"nepi.resources.linux.ns3.ns3simulation.LinuxNS3Simulation":{ns3_build_location:[8,4,1,""],socket_name:[8,4,1,""],do_release:[8,1,1,""],do_start:[8,1,1,""],ns3_src_location:[8,4,1,""],valid_connection:[8,1,1,""],replace_paths:[8,1,1,""],dce_src_location:[8,4,1,""],enable_dce:[8,4,1,""],state:[8,4,1,""],ns3_repo:[8,4,1,""],do_stop:[8,1,1,""],upload_sources:[8,1,1,""],pygccxml_version:[8,4,1,""],configure:[8,1,1,""],trace:[8,1,1,""],wait_remote_socket:[8,1,1,""],do_deploy:[8,1,1,""],remote_socket:[8,4,1,""],dce_helper:[8,4,1,""],dce_version:[8,4,1,""],dce_repo:[8,4,1,""],upload_extra_sources:[8,1,1,""],upload_start_command:[8,1,1,""]},"nepi.resources.ns3.classes.point_to_point_net_device":{NS3PointToPointNetDevice:[11,3,1,""]},"nepi.resources.planetlab.openvswitch.ovsport.PlanetlabOVSPort":{node:[19,4,1,""],ovsswitch:[19,4,1,""],establish_udp_connection:[19,1,1,""],valid_connection:[19,1,1,""],initiate_udp_connection:[19,1,1,""],do_release:[19,1,1,""],do_deploy:[19,1,1,""],port_number:[19,4,1,""],check_status:[19,1,1,""],do_provision:[19,1,1,""],terminate_connection:[19,1,1,""],create_port:[19,1,1,""],verify_connection:[19,1,1,""]},"nepi.resources.linux.udptest":{LinuxUdpTest:[1,3,1,""]},"nepi.resources.linux.ns3.ccn.ns3ccncatdceapplication":{LinuxNS3DceCCNCat:[14,3,1,""]},"nepi.resources.ns3.ns3wifinetdevice":{NS3BaseWifiNetDevice:[6,3,1,""]},"nepi.resources.ns3.ns3route":{NS3Route:[6,3,1,""]},"nepi.resources.ns3.classes.bulk_send_application":{NS3BulkSendApplication:[11,3,1,""]},"nepi.execution":{resource:[10,0,0,"-"],trace:[10,0,0,"-"],tags:[10,0,0,"-"],runner:[10,0,0,"-"],attribute:[10,0,0,"-"],ec:[10,0,0,"-"],scheduler:[10,0,0,"-"]},"nepi.resources.netns.netnsipv4address.NetNSIPv4Address":{"interface":[20,4,1,""],node:[20,4,1,""],emulation:[20,4,1,""]},"nepi.resources.planetlab.ns3.tuntapfdlink.PlanetlabTunTapFdLink":{upload_sources:[7,1,1,""],tap:[7,4,1,""],fdnetdevice:[7,4,1,""]},"nepi.resources.ns3.ns3node":{NS3BaseNode:[6,3,1,""]},"nepi.util.environ":{backticks:[16,2,1,""],execute:[16,2,1,""]},"nepi.util.guid":{GuidGenerator:[16,3,1,""]},"nepi.util.parsers":{xml_parser:[23,0,0,"-"]},"nepi.execution.attribute.Flags":{NoWrite:[10,4,1,""],Reserved:[10,4,1,""],NoRead:[10,4,1,""],Global:[10,4,1,""],Construct:[10,4,1,""],Filter:[10,4,1,""],Design:[10,4,1,""],Credential:[10,4,1,""]},"nepi.resources.omf.omf_api_factory":{OMFAPIFactory:[4,3,1,""]},"nepi.resources.ns3.ns3errormodel.NS3BaseErrorModel":{device:[6,4,1,""]},"nepi.resources.omf.application.OMFApplication":{node:[4,4,1,""],check_deploy:[4,1,1,""],valid_connection:[4,1,1,""],add_set_hook:[4,1,1,""],do_release:[4,1,1,""],do_deploy:[4,1,1,""],check_start:[4,1,1,""],stdin_hook:[4,1,1,""],do_start:[4,1,1,""],check_release:[4,1,1,""],trace:[4,1,1,""],do_stop:[4,1,1,""],exp_id:[4,4,1,""]},"nepi.resources.linux.ccn.ccncat":{LinuxCCNCat:[0,3,1,""]},"nepi.util.sfarspec_proc.SfaRSpecProcessing":{parse_sfa_rspec:[16,1,1,""],build_sfa_rspec:[16,1,1,""],make_dict_rec:[16,1,1,""]},"nepi.resources.netns.netnsnodeinterface":{NetNSNodeInterface:[20,3,1,""]},"nepi.resources.ns3.classes.udp_echo_client":{NS3UdpEchoClient:[11,3,1,""]},"nepi.resources.planetlab.openvswitch.ovs.PlanetlabOVSSwitch":{node:[19,4,1,""],do_provision:[19,1,1,""],check_sliver_ovs:[19,1,1,""],servers_on:[19,1,1,""],do_release:[19,1,1,""],create_bridge:[19,1,1,""],do_deploy:[19,1,1,""],valid_connection:[19,1,1,""],assign_controller:[19,1,1,""],ovs_status:[19,1,1,""]},"nepi.resources.linux.tunnel":{LinuxTunnel:[1,3,1,""]},"nepi.resources.ns3.classes.point_to_point_channel":{NS3PointToPointChannel:[11,3,1,""]},"nepi.resources.ns3.ns3wifimac.NS3BaseWifiMac":{node:[6,4,1,""],device:[6,4,1,""]},"nepi.resources.ns3.classes.fd_net_device":{NS3FdNetDevice:[11,3,1,""]},"nepi.execution.resource.ResourceState":{PROVISIONED:[10,4,1,""],RESERVED:[10,4,1,""],FAILED:[10,4,1,""],STARTED:[10,4,1,""],DISCOVERED:[10,4,1,""],RELEASED:[10,4,1,""],STOPPED:[10,4,1,""],READY:[10,4,1,""],NEW:[10,4,1,""]},"nepi.resources.omf.omf_resource.ResourceGateway":{TestbedtoGateway:[4,4,1,""],AMtoGateway:[4,4,1,""]},"nepi.resources.ns3.classes.simple_net_device":{NS3SimpleNetDevice:[11,3,1,""]},"nepi.resources.planetlab.tap":{PlanetlabTap:[9,3,1,""]},"nepi.resources.linux.application":{LinuxApplication:[1,3,1,""]},"nepi.util.manifoldapi.MANIFOLDAPI":{get_session_key:[16,1,1,""],get_resource_urn:[16,1,1,""],get_slice_resources:[16,1,1,""],get_resource_info:[16,1,1,""],add_resource_to_slice:[16,1,1,""],api:[16,4,1,""],remove_resource_from_slice:[16,1,1,""]},"nepi.data.processing":{ccn:[3,0,0,"-"],ping:[22,0,0,"-"]},"nepi.resources.ns3.classes.arp_l3protocol":{NS3ArpL3Protocol:[11,3,1,""]},"nepi.resources.ns3.ns3propagationdelaymodel.NS3BasePropagationDelayModel":{channel:[6,4,1,""],simulation:[6,4,1,""]},"nepi.resources.ns3.ns3ccndceapplication":{NS3BaseCCNDceApplication:[6,3,1,""]},"nepi.util.parallel.WorkerThread":{attach:[16,1,1,""],run:[16,1,1,""],QUIT:[16,3,1,""],quit:[16,1,1,""]},"nepi.resources.linux.ccn.ccncat.LinuxCCNCat":{do_deploy:[0,1,1,""],valid_connection:[0,1,1,""]},"nepi.resources.ns3.classes.constant_position_mobility_model":{NS3ConstantPositionMobilityModel:[11,3,1,""]},"nepi.resources.omf.messages_6.MessageHandler":{create_function:[4,1,1,""],request_function:[4,1,1,""],configure_function:[4,1,1,""],release_function:[4,1,1,""]},"nepi.resources.ns3.classes.receive_list_error_model":{NS3ReceiveListErrorModel:[11,3,1,""]},"nepi.execution.ec.ExperimentController":{get_task:[10,1,1,""],load:[10,5,1,""],stop:[10,1,1,""],set:[10,1,1,""],nthreads:[10,4,1,""],run_id:[10,4,1,""],trace_enabled:[10,1,1,""],serialize:[10,1,1,""],discover:[10,1,1,""],failure_level:[10,4,1,""],inform_failure:[10,1,1,""],abort:[10,4,1,""],shutdown:[10,1,1,""],set_global:[10,1,1,""],get_provision_time:[10,1,1,""],register_connection:[10,1,1,""],get_failed_time:[10,1,1,""],get_ready_time:[10,1,1,""],schedule:[10,1,1,""],get_global:[10,1,1,""],start:[10,1,1,""],state:[10,1,1,""],get_discover_time:[10,1,1,""],deploy:[10,1,1,""],persist:[10,4,1,""],local_dir:[10,4,1,""],logger:[10,4,1,""],wait:[10,1,1,""],resources:[10,4,1,""],enable_trace:[10,1,1,""],ecstate:[10,4,1,""],trace:[10,1,1,""],get:[10,1,1,""],remove_resource:[10,1,1,""],get_stop_time:[10,1,1,""],get_release_time:[10,1,1,""],get_attribute:[10,1,1,""],wait_started:[10,1,1,""],register_condition:[10,1,1,""],get_traces:[10,1,1,""],exp_id:[10,4,1,""],set_with_conditions:[10,1,1,""],provision:[10,1,1,""],fm:[10,4,1,""],get_resource:[10,1,1,""],run_dir:[10,4,1,""],filter_resources:[10,1,1,""],wait_released:[10,1,1,""],save:[10,1,1,""],wait_deployed:[10,1,1,""],netgraph:[10,4,1,""],get_resources_by_type:[10,1,1,""],plot:[10,1,1,""],register_resource:[10,1,1,""],exp_dir:[10,4,1,""],get_start_time:[10,1,1,""],release:[10,1,1,""],wait_finished:[10,1,1,""],get_attributes:[10,1,1,""]},"nepi.resources.linux.ping":{LinuxPing:[1,3,1,""]},"nepi.resources.ns3.classes.random_walk2d_mobility_model":{NS3RandomWalk2dMobilityModel:[11,3,1,""]},"nepi.execution.scheduler":{Task:[10,3,1,""],HeapScheduler:[10,3,1,""],TaskStatus:[10,3,1,""]},"nepi.resources.omf.wilabt_node":{WilabtSfaNode:[4,3,1,""]},"nepi.resources.linux.traceroute":{LinuxTraceroute:[1,3,1,""]},"nepi.resources.ns3.ns3propagationlossmodel.NS3BasePropagationLossModel":{channel:[6,4,1,""],simulation:[6,4,1,""]},"nepi.resources.linux.ns3.ns3client.LinuxNS3Client":{set:[8,1,1,""],send_msg:[8,1,1,""],invoke:[8,1,1,""],get:[8,1,1,""],create:[8,1,1,""],stop:[8,1,1,""],factory:[8,1,1,""],simulation:[8,4,1,""],start:[8,1,1,""],shutdown:[8,1,1,""],flush:[8,1,1,""]},"nepi.util.manifoldapi":{MANIFOLDAPIFactory:[16,3,1,""],MANIFOLDAPI:[16,3,1,""]},"nepi.resources.linux.channel.LinuxChannel":{log_message:[1,1,1,""],valid_connection:[1,1,1,""]},"nepi.resources.linux.ccn":{ccnpoke:[0,0,0,"-"],ccnapplication:[0,0,0,"-"],fibentry:[0,0,0,"-"],ccnr:[0,0,0,"-"],ccnpingserver:[0,0,0,"-"],ccncontent:[0,0,0,"-"],ccnd:[0,0,0,"-"],ccnpeek:[0,0,0,"-"],ccncat:[0,0,0,"-"],ccnping:[0,0,0,"-"]},"nepi.resources.ns3.classes.random_propagation_loss_model":{NS3RandomPropagationLossModel:[11,3,1,""]},"nepi.resources.omf.interface.OMFWifiInterface":{node:[4,4,1,""],valid_connection:[4,1,1,""],check_deploy:[4,1,1,""],do_release:[4,1,1,""],configure_iface:[4,1,1,""],do_deploy:[4,1,1,""],configure_ip:[4,1,1,""],configure_on_omf5:[4,1,1,""],configure_on_omf6:[4,1,1,""],check_release:[4,1,1,""],exp_id:[4,4,1,""],channel:[4,4,1,""]},"nepi.resources.ns3.ns3fdnetdevice":{NS3BaseFdNetDevice:[6,3,1,""]},"nepi.resources.ns3.classes.mesh_wifi_interface_mac":{NS3MeshWifiInterfaceMac:[11,3,1,""]},"nepi.resources.ns3.classes.oh_buildings_propagation_loss_model":{NS3OhBuildingsPropagationLossModel:[11,3,1,""]},"nepi.resources.omf.node.OMFNode":{exp_id:[4,4,1,""],do_deploy:[4,1,1,""],do_release:[4,1,1,""],valid_connection:[4,1,1,""]},"nepi.resources.ns3.classes.adhoc_wifi_mac":{NS3AdhocWifiMac:[11,3,1,""]},"nepi.resources.netns.netnswrapper_debug":{NetNSWrapperDebuger:[20,3,1,""]},"nepi.util.netgraph":{NetGraph:[16,3,1,""],TopologyType:[16,3,1,""]},"nepi.execution.ec":{ECState:[10,3,1,""],FailureLevel:[10,3,1,""],FailureManager:[10,3,1,""],ExperimentController:[10,3,1,""]},"nepi.resources.ns3.ns3channel.NS3BaseChannel":{devices:[6,4,1,""],simulation:[6,4,1,""]},"nepi.resources.ns3.classes.aarfcd_wifi_manager":{NS3AarfcdWifiManager:[11,3,1,""]},"nepi.resources.ns3.classes.icmpv4l4protocol":{NS3Icmpv4L4Protocol:[11,3,1,""]},"nepi.resources.omf.omf6_parser.OMF6Parser":{check_mailbox:[4,1,1,""],handle:[4,1,1,""],init_mailbox:[4,1,1,""]},"nepi.resources.linux.ns3.ns3dceapplication":{LinuxNS3DceApplication:[8,3,1,""]},"nepi.resources.ns3.ns3wifimac":{NS3BaseWifiMac:[6,3,1,""]},"nepi.resources.linux.ccn.ccnr":{LinuxCCNR:[0,3,1,""]},"nepi.resources.netns.netnsnode.NetNSNode":{emulation:[20,4,1,""]},"nepi.resources.linux.ccn.ccnd":{LinuxCCND:[0,3,1,""]},"nepi.resources.linux.interface.LinuxInterface":{add_set_hooks:[1,1,1,""],node:[1,4,1,""],do_release:[1,1,1,""],valid_connection:[1,1,1,""],do_provision:[1,1,1,""],do_discover:[1,1,1,""],do_deploy:[1,1,1,""],set_hook_mtu:[1,1,1,""],log_message:[1,1,1,""],set_hook_up:[1,1,1,""],channel:[1,4,1,""],load_configuration:[1,1,1,""]},"nepi.resources.netns.netnsclient":{NetNSClient:[20,3,1,""]},"nepi.resources.ns3.classes.rraa_wifi_manager":{NS3RraaWifiManager:[11,3,1,""]},"nepi.resources.ns3.classes.burst_error_model":{NS3BurstErrorModel:[11,3,1,""]},"nepi.resources.planetlab.node":{PlanetlabNode:[9,3,1,""]},"nepi.resources.ns3.classes.amrr_wifi_manager":{NS3AmrrWifiManager:[11,3,1,""]},"nepi.resources.ns3.classes.rate_error_model":{NS3RateErrorModel:[11,3,1,""]},"nepi.resources.ns3.ns3application":{NS3BaseApplication:[6,3,1,""]},"nepi.util.serializer.ECSerializer":{load:[16,1,1,""],save:[16,1,1,""],serialize:[16,1,1,""]},"nepi.resources.linux.ns3.ccn.ns3ccnddceapplication.LinuxNS3DceCCND":{version:[14,4,1,""]},"nepi.resources.linux.ccn.ccncontent.LinuxCCNContent":{node:[0,4,1,""],valid_connection:[0,1,1,""],ccnr:[0,4,1,""],ccnd:[0,4,1,""],do_deploy:[0,1,1,""],do_start:[0,1,1,""],upload_start_command:[0,1,1,""]},"nepi.resources.ns3.classes.cara_wifi_manager":{NS3CaraWifiManager:[11,3,1,""]},"nepi.resources.ns3.classes.constant_acceleration_mobility_model":{NS3ConstantAccelerationMobilityModel:[11,3,1,""]},"nepi.resources.ns3.classes.yans_error_rate_model":{NS3YansErrorRateModel:[11,3,1,""]},"nepi.resources.linux.ccn.ccnr.LinuxCCNR":{node:[0,4,1,""],valid_connection:[0,1,1,""],ccnd:[0,4,1,""],do_deploy:[0,1,1,""],do_start:[0,1,1,""],upload_start_command:[0,1,1,""]},"nepi.resources.linux.tunnel.LinuxTunnel":{app_home:[1,1,1,""],do_provision:[1,1,1,""],valid_connection:[1,1,1,""],verify_connection:[1,1,1,""],do_stop:[1,1,1,""],initiate_connection:[1,1,1,""],establish_connection:[1,1,1,""],do_deploy:[1,1,1,""],state:[1,4,1,""],run_home:[1,1,1,""],endpoint_mkdir:[1,1,1,""],do_start:[1,1,1,""],log_message:[1,1,1,""],endpoint1:[1,4,1,""],endpoint2:[1,4,1,""],terminate_connection:[1,1,1,""],get_endpoints:[1,1,1,""],check_state_connection:[1,1,1,""]},"nepi.resources.planetlab.plcapi":{PLCAPI:[9,3,1,""],PLCAPIFactory:[9,3,1,""]},"nepi.resources.netns.netnsinterface":{NetNSInterface:[20,3,1,""]},"nepi.util.plotter.ECPlotter":{plot:[16,1,1,""]},"nepi.resources.planetlab.plcapi.PLCAPIFactory":{create_api:[9,5,1,""],get_api:[9,5,1,""]},"nepi.resources.ns3.classes.random_propagation_delay_model":{NS3RandomPropagationDelayModel:[11,3,1,""]},"nepi.resources.ns3.classes.error_net_device":{NS3ErrorNetDevice:[11,3,1,""]},"nepi.util.netgraph.NetGraph":{topo_type:[16,4,1,""],add_node:[16,1,1,""],del_node_annotation:[16,1,1,""],targets:[16,1,1,""],node_annotation:[16,1,1,""],generate_topology:[16,1,1,""],annotate_edge:[16,1,1,""],set_target:[16,1,1,""],node_ip_annotations:[16,1,1,""],is_source:[16,1,1,""],select_target_zero:[16,1,1,""],nodes:[16,1,1,""],is_target:[16,1,1,""],set_source:[16,1,1,""],get_p2p_info:[16,1,1,""],select_random_source:[16,1,1,""],edge_net_annotation:[16,1,1,""],edges:[16,1,1,""],add_edge:[16,1,1,""],assign_p2p_ips:[16,1,1,""],topology:[16,4,1,""],annotate_node:[16,1,1,""],annotate_edge_net:[16,1,1,""],sources:[16,1,1,""],node_annotations:[16,1,1,""],del_edge_annotation:[16,1,1,""],order:[16,4,1,""],edge_annotation:[16,1,1,""],edge_annotations:[16,1,1,""],annotate_node_ip:[16,1,1,""]},"nepi.resources.netns.netnsemulation":{NetNSEmulation:[20,3,1,""]},"nepi.resources.ns3.ns3pipechanel.NS3BasePipeChannel":{node:[6,4,1,""],devices:[6,4,1,""]},"nepi.resources.ns3.classes.random_waypoint_mobility_model":{NS3RandomWaypointMobilityModel:[11,3,1,""]},"nepi.resources.omf.omf_client.OMFClient":{check_mailbox:[4,1,1,""],get:[4,1,1,""],unregister:[4,1,1,""],create:[4,1,1,""],register:[4,1,1,""],publish:[4,1,1,""],subscriptions:[4,1,1,""],purge:[4,1,1,""],subscribe:[4,1,1,""],retract:[4,1,1,""],unsubscribe:[4,1,1,""],ready:[4,4,1,""],nodes:[4,1,1,""],handle_omf_message:[4,1,1,""],start:[4,1,1,""],"delete":[4,1,1,""]},"nepi.util.netgraph.TopologyType":{STAR:[16,4,1,""],LINEAR:[16,4,1,""],LADDER:[16,4,1,""],TREE:[16,4,1,""],ADHOC:[16,4,1,""],MESH:[16,4,1,""]},"nepi.resources.ns3.classes.range_propagation_loss_model":{NS3RangePropagationLossModel:[11,3,1,""]},"nepi.resources.planetlab.sfa_node":{PlanetlabSfaNode:[9,3,1,""]},"nepi.resources.ns3.ns3arpl3protocol":{NS3BaseArpL3Protocol:[6,3,1,""]},"nepi.execution.scheduler.HeapScheduler":{next:[10,1,1,""],pending:[10,4,1,""],remove:[10,1,1,""],schedule:[10,1,1,""]},"nepi.resources.linux.ccn.ccnapplication.LinuxCCNApplication":{node:[0,4,1,""],ccnd:[0,4,1,""],do_deploy:[0,1,1,""],valid_connection:[0,1,1,""]},"nepi.resources.ns3.ns3wifichannel":{NS3BaseWifiChannel:[6,3,1,""]},"nepi.resources.linux.nping":{LinuxNPing:[1,3,1,""]},"nepi.resources.linux.ccn.fibentry":{LinuxFIBEntry:[0,3,1,""]},"nepi.execution.attribute.Attribute":{has_changed:[10,4,1,""],has_flag:[10,1,1,""],name:[10,4,1,""],"default":[10,4,1,""],get_value:[10,1,1,""],value:[10,4,1,""],is_valid_value:[10,1,1,""],range:[10,4,1,""],flags:[10,4,1,""],allowed:[10,4,1,""],set_value:[10,1,1,""],type:[10,4,1,""],help:[10,4,1,""]},"nepi.resources.linux.udptest.LinuxUdpTest":{upload_start_command:[1,1,1,""],do_deploy:[1,1,1,""],valid_connection:[1,1,1,""],do_start:[1,1,1,""]},"nepi.resources.linux.ccn.ccnapplication":{LinuxCCNApplication:[0,3,1,""]},"nepi.resources.ns3.classes.point_to_point_remote_channel":{NS3PointToPointRemoteChannel:[11,3,1,""]},"nepi.resources.linux.ns3.ccn.ns3ccnpeekdceapplication":{LinuxNS3DceCCNPeek:[14,3,1,""]},"nepi.resources.planetlab.ns3.tuntapfdlink":{PlanetlabTunTapFdLink:[7,3,1,""]},"nepi.resources.ns3.resource_manager_generator":{create_ns3_rms:[6,2,1,""],template_traces:[6,2,1,""],select_base_class:[6,2,1,""],template_attributes:[6,2,1,""]},"nepi.util.sfaapi.SFAAPI":{blacklist_resource:[16,1,1,""],reserved:[16,1,1,""],blacklisted:[16,1,1,""],get_resources_hrn:[16,1,1,""],reserve_resource:[16,1,1,""],remove_all_from_slice:[16,1,1,""],get_slice_resources:[16,1,1,""],remove_resource_from_slice:[16,1,1,""],add_resource_to_slice:[16,1,1,""],add_resource_to_slice_batch:[16,1,1,""],release:[16,1,1,""],get_resources_info:[16,1,1,""]},"nepi.resources.ns3.classes.udp_l4protocol":{NS3UdpL4Protocol:[11,3,1,""]},"nepi.resources.netns.netnsemulation.NetNSEmulation":{emu_set:[20,1,1,""],invoke:[20,1,1,""],create:[20,1,1,""],client:[20,4,1,""],shutdown:[20,1,1,""],flush:[20,1,1,""],emu_get:[20,1,1,""]},"nepi.resources.ns3.classes.aloha_noack_net_device":{NS3AlohaNoackNetDevice:[11,3,1,""]},"nepi.resources.linux.mtr":{LinuxMtr:[1,3,1,""]},"nepi.resources.ns3.classes.ping6":{NS3Ping6:[11,3,1,""]},"nepi.execution.ec.FailureLevel":{RM_FAILURE:[10,4,1,""],OK:[10,4,1,""],EC_FAILURE:[10,4,1,""]},"nepi.resources.linux.tun":{LinuxTun:[1,3,1,""]},"nepi.resources.ns3.classes.hybrid_buildings_propagation_loss_model":{NS3HybridBuildingsPropagationLossModel:[11,3,1,""]},"nepi.resources.ns3.classes.drop_tail_queue":{NS3DropTailQueue:[11,3,1,""]},"nepi.resources.ns3.ns3propagationlossmodel":{NS3BasePropagationLossModel:[6,3,1,""]},"nepi.resources.ns3.classes.nakagami_propagation_loss_model":{NS3NakagamiPropagationLossModel:[11,3,1,""]},"nepi.execution.resource":{ResourceManager:[10,3,1,""],populate_factory:[10,2,1,""],ResourceAction:[10,3,1,""],find_types:[10,2,1,""],ResourceState:[10,3,1,""],clsinit:[10,2,1,""],ResourceFactory:[10,3,1,""],clsinit_copy:[10,2,1,""],failtrap:[10,2,1,""]},"nepi.execution.attribute":{Attribute:[10,3,1,""],Flags:[10,3,1,""],Types:[10,3,1,""]},"nepi.resources.all.collector.Collector":{do_provision:[13,1,1,""],store_path:[13,4,1,""],do_deploy:[13,1,1,""],do_release:[13,1,1,""],valid_connection:[13,1,1,""]},"nepi.resources.ns3.classes.loopback_net_device":{NS3LoopbackNetDevice:[11,3,1,""]},"nepi.resources.ns3.classes.itu_r1411nlos_over_rooftop_propagation_loss_model":{NS3ItuR1411NlosOverRooftopPropagationLossModel:[11,3,1,""]},"nepi.resources.ns3.ns3pipechanel":{NS3BasePipeChannel:[6,3,1,""]},"nepi.resources.ns3.classes.v4ping":{NS3V4Ping:[11,3,1,""]},"nepi.resources.ns3.classes.lte_simple_net_device":{NS3LteSimpleNetDevice:[11,3,1,""]},"nepi.resources.ns3.classes.dsrdsr_routing":{NS3dsrDsrRouting:[11,3,1,""]},"nepi.resources.ns3.classes.udp_echo_server":{NS3UdpEchoServer:[11,3,1,""]},"nepi.resources.ns3.classes.six_low_pan_net_device":{NS3SixLowPanNetDevice:[11,3,1,""]},"nepi.resources.linux.tap.LinuxTap":{vif_type:[1,4,1,""],IFF_TAP:[1,4,1,""],udp_connect:[1,1,1,""],do_release:[1,1,1,""],wait_file:[1,1,1,""],vif_type_flag:[1,4,1,""],do_start:[1,1,1,""],check_status:[1,1,1,""],establish_udp_connection:[1,1,1,""],valid_connection:[1,1,1,""],initiate_udp_connection:[1,1,1,""],state:[1,4,1,""],do_stop:[1,1,1,""],upload_sources:[1,1,1,""],node:[1,4,1,""],verify_connection:[1,1,1,""],gre_enabled:[1,4,1,""],vif_prefix:[1,4,1,""],gre_connect:[1,1,1,""],do_deploy:[1,1,1,""],sock_name:[1,4,1,""],IFF_TUN:[1,4,1,""],upload_start_command:[1,1,1,""],terminate_connection:[1,1,1,""]},"nepi.resources.linux.ns3.ccn":{ns3ccncatdceapplication:[14,0,0,"-"],ns3fibentrydceapplication:[14,0,0,"-"],ns3ccnpeekdceapplication:[14,0,0,"-"],ns3ccnrdceapplication:[14,0,0,"-"],ns3ccnddceapplication:[14,0,0,"-"],ns3ccndceapplication:[14,0,0,"-"],ns3ccnpokedceapplication:[14,0,0,"-"]},"nepi.resources.ns3.classes.node":{NS3Node:[11,3,1,""]},"nepi.resources.all.collector":{Collector:[13,3,1,""]},"nepi.data.processing.ping":{parser:[22,0,0,"-"]},"nepi.util.logger.Logger":{info:[16,1,1,""],log:[16,1,1,""],warning:[16,1,1,""],error:[16,1,1,""],debug:[16,1,1,""],log_message:[16,1,1,""],logger:[16,4,1,""]},"nepi.resources.linux.ping.LinuxPing":{upload_start_command:[1,1,1,""],do_deploy:[1,1,1,""],valid_connection:[1,1,1,""],do_start:[1,1,1,""]},"nepi.resources.omf.application":{OMFApplication:[4,3,1,""]},"nepi.resources.ns3.ns3queue":{NS3BaseQueue:[6,3,1,""]}},titleterms:{netn:[20,2],all:13,execut:10,ns3wrapper_debug:6,vrout:9,sta_wifi_mac:11,netnswrapper_debug:20,rpmfunc:1,waypoint_mobility_model:11,netnsnod:20,ns3wifiremotestationmanag:6,ccnpeek:0,ocb_wifi_mac:11,omf_api_factori:4,hybrid_buildings_propagation_loss_model:11,netnsswitch:20,packet_sink:11,icmpv6l4protocol:11,itu_r1411los_propagation_loss_model:11,udp_trace_cli:11,ns3propagationlossmodel:6,ns3ccnrdceapplic:14,platform:5,nist_error_rate_model:11,binary_error_sixlow_model:11,ccnpingserv:0,yans_wifi_channel:11,logger:16,point_to_point_channel:11,ns3ccnpeekdceappl:14,ccnping:0,random_direction2d_mobility_model:11,applic:[1,4],omf_client:4,lr_wpan_net_devic:11,ns3fibentrydceappl:14,timefunc:16,rout:1,sshfunc:16,resource_manager_gener:6,ccncontent:0,udptunnel:1,util:[16,23],tap_bridg:11,ns3ccncatdceappl:14,aarfcd_wifi_manag:11,ideal_wifi_manag:11,list_error_model:11,manifoldapi:16,ns3wrapper:6,omf5_api:4,jakes_propagation_loss_model:11,ns3fdnetdevic:6,on_off_appl:11,ns3wifimac:6,red_queu:11,ns3base:6,adhoc_wifi_mac:11,channel:[1,4],ns3ccnddceapplic:14,netnsclient:[20,2],ns3wifinetdevic:6,receive_list_error_model:11,fdudptunnel:[7,8],onoe_wifi_manag:11,ns3netdevic:6,itu_r1411nlos_over_rooftop_propagation_loss_model:11,range_propagation_loss_model:11,point_to_point_remote_channel:11,point_to_point_net_devic:11,csma_net_devic:11,ns3wifiphi:6,arf_wifi_manag:11,fd_net_devic:11,error_channel:11,collector:13,nepi:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23],udp_l4protocol:11,ns3pingdceappl:8,ns3node:6,messages_6:4,rate_error_model:11,omf6_api:4,ns3icmpv4l4protocol:6,debfunc:1,content:[0,1,2,3,4,6,7,8,9,10,11,12,13,14,15,16,18,19,20,21,22,23],ns3pipechanel:6,fibentri:0,ns3applic:6,amrr_wifi_manag:11,attribut:10,core:5,ns3propagationdelaymodel:6,cara_wifi_manag:11,omf:4,udp_echo_serv:11,random_propagation_delay_model:11,ping6:11,ovsport:19,omf6_pars:4,constant_position_mobility_model:11,tun:[1,9],ns3client:[8,6],wilabt_nod:4,miscellan:5,okumura_hata_propagation_loss_model:11,ns3rout:6,ns3ccndceapplic:[14,6],messages_5_4:4,netnsipv4address:20,ccnpoke:0,lte_enb_net_devic:11,lte_ue_net_devic:11,netnsrout:20,yans_error_rate_model:11,tunnel:1,six_low_pan_net_devic:11,mesh_wifi_interface_mac:11,rraa_wifi_manag:11,schedul:10,modul:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,18,19,20,21,22,23],bridge_net_devic:11,submodul:[0,6,7,8,1,19,9,2,10,16,23,13,11,3,14,4,22,20],wifi_net_devic:11,statfunc:16,drop_tail_queu:11,linux:[8,0,14,1,2],v4ping:11,tap:[1,9],constant_rate_wifi_manag:11,guid:16,binary_error_model:11,hierarchical_mobility_model:11,ns3queue:6,omf_resourc:4,parallel:16,constant_acceleration_mobility_model:11,gauss_markov_mobility_model:11,ipv4l3protocol:11,process:[3,15,22],netnsappl:20,interfac:[1,4],multi_model_spectrum_channel:11,aarf_wifi_manag:11,ap_wifi_mac:11,ns3dcehelp:6,tcpdump:1,radvd:11,csma_channel:11,icmpv4l4protocol:11,constant_speed_propagation_delay_model:11,minstrel_wifi_manag:11,oh_buildings_propagation_loss_model:11,subscriber_station_net_devic:11,xml_parser:23,nping:1,simple_channel:11,gretunnel:1,ccncat:0,ns3:[7,8,14,11,6],yans_wifi_phi:11,three_log_distance_propagation_loss_model:11,friis_propagation_loss_model:11,base_station_net_devic:11,tuntapfdlink:[7,8],plcapi:9,netnsinterfac:20,netnsemul:[20,2],ns3ipv4l3protocol:6,random_walk2d_mobility_model:11,netnsnodeinterfac:20,bulk_send_appl:11,mtr:1,udp_echo_cli:11,single_model_spectrum_channel:11,plotter:16,ns3ccnpokedceappl:14,arp_l3protocol:11,ccnapplic:0,virtual_net_devic:11,fixed_rss_loss_model:11,ns3errorratemodel:6,netgraph:16,ns3errormodel:6,kun2600mhz_propagation_loss_model:11,runner:10,parser:[3,22,23],indic:5,packag:[0,1,2,3,4,6,7,8,9,10,11,12,13,14,15,16,18,19,20,21,22,23],netnsbas:20,tag:10,tabl:5,ns3arpl3protocol:6,netnsserv:20,serial:16,log_distance_propagation_loss_model:11,tracerout:1,udp_client:11,sfaapi:16,sfa_nod:9,ccnr:0,dsrdsr_rout:11,ns3simul:[8,6],ping:[1,22],error_net_devic:11,random_waypoint_mobility_model:11,ccnd:0,udp_serv:11,nakagami_propagation_loss_model:11,burst_error_model:11,document:[],ns3mobilitymodel:6,error_channel_sixlow:11,node:[11,1,4,9],constant_velocity_mobility_model:11,sfarspec_proc:16,resourc:[0,6,7,8,1,19,9,2,10,13,21,11,14,4,20],trace:10,planetlab:[7,19,9],ns3channel:6,openvswitch:19,tcp_l4protocol:11,cost231propagation_loss_model:11,"class":11,aloha_noack_net_devic:11,mesh_point_devic:11,two_ray_ground_propagation_loss_model:11,rmatcher:16,ns3dceapplic:[8,6],data:[3,15,18,22],netnswrapp:20,matrix_propagation_loss_model:11,steady_state_random_waypoint_mobility_model:11,subpackag:[18,6,8,12,1,9,15,16,21],ns3wifichannel:6,non_communicating_net_devic:11,random_propagation_loss_model:11,ns3server:6,emu_net_devic:11,bridge_channel:11,lte_simple_net_devic:11,loopback_net_devic:11,ccn:[0,14,3],environ:16,execfunc:16,uan_channel:11,udptest:1,simple_net_devic:11}}) \ No newline at end of file diff --git a/doc/sphinx/_layout/modules.rst b/doc/sphinx/_layout/modules.rst new file mode 100644 index 00000000..6486b2cf --- /dev/null +++ b/doc/sphinx/_layout/modules.rst @@ -0,0 +1,7 @@ +nepi +==== + +.. toctree:: + :maxdepth: 4 + + nepi diff --git a/doc/sphinx/_layout/nepi.data.processing.ccn.rst b/doc/sphinx/_layout/nepi.data.processing.ccn.rst new file mode 100644 index 00000000..4b3bb6b2 --- /dev/null +++ b/doc/sphinx/_layout/nepi.data.processing.ccn.rst @@ -0,0 +1,22 @@ +nepi.data.processing.ccn package +================================ + +Submodules +---------- + +nepi.data.processing.ccn.parser module +-------------------------------------- + +.. automodule:: nepi.data.processing.ccn.parser + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: nepi.data.processing.ccn + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/_layout/nepi.data.processing.ping.rst b/doc/sphinx/_layout/nepi.data.processing.ping.rst new file mode 100644 index 00000000..56d3574d --- /dev/null +++ b/doc/sphinx/_layout/nepi.data.processing.ping.rst @@ -0,0 +1,22 @@ +nepi.data.processing.ping package +================================= + +Submodules +---------- + +nepi.data.processing.ping.parser module +--------------------------------------- + +.. automodule:: nepi.data.processing.ping.parser + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: nepi.data.processing.ping + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/_layout/nepi.data.processing.rst b/doc/sphinx/_layout/nepi.data.processing.rst new file mode 100644 index 00000000..6f22a0fa --- /dev/null +++ b/doc/sphinx/_layout/nepi.data.processing.rst @@ -0,0 +1,18 @@ +nepi.data.processing package +============================ + +Subpackages +----------- + +.. toctree:: + + nepi.data.processing.ccn + nepi.data.processing.ping + +Module contents +--------------- + +.. automodule:: nepi.data.processing + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/_layout/nepi.data.rst b/doc/sphinx/_layout/nepi.data.rst new file mode 100644 index 00000000..2841cdc0 --- /dev/null +++ b/doc/sphinx/_layout/nepi.data.rst @@ -0,0 +1,17 @@ +nepi.data package +================= + +Subpackages +----------- + +.. toctree:: + + nepi.data.processing + +Module contents +--------------- + +.. automodule:: nepi.data + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/_layout/nepi.execution.rst b/doc/sphinx/_layout/nepi.execution.rst new file mode 100644 index 00000000..c8f46ae0 --- /dev/null +++ b/doc/sphinx/_layout/nepi.execution.rst @@ -0,0 +1,70 @@ +nepi.execution package +====================== + +Submodules +---------- + +nepi.execution.attribute module +------------------------------- + +.. automodule:: nepi.execution.attribute + :members: + :undoc-members: + :show-inheritance: + +nepi.execution.ec module +------------------------ + +.. automodule:: nepi.execution.ec + :members: + :undoc-members: + :show-inheritance: + +nepi.execution.resource module +------------------------------ + +.. automodule:: nepi.execution.resource + :members: + :undoc-members: + :show-inheritance: + +nepi.execution.runner module +---------------------------- + +.. automodule:: nepi.execution.runner + :members: + :undoc-members: + :show-inheritance: + +nepi.execution.scheduler module +------------------------------- + +.. automodule:: nepi.execution.scheduler + :members: + :undoc-members: + :show-inheritance: + +nepi.execution.tags module +-------------------------- + +.. automodule:: nepi.execution.tags + :members: + :undoc-members: + :show-inheritance: + +nepi.execution.trace module +--------------------------- + +.. automodule:: nepi.execution.trace + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: nepi.execution + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/_layout/nepi.resources.all.rst b/doc/sphinx/_layout/nepi.resources.all.rst new file mode 100644 index 00000000..59459003 --- /dev/null +++ b/doc/sphinx/_layout/nepi.resources.all.rst @@ -0,0 +1,22 @@ +nepi.resources.all package +========================== + +Submodules +---------- + +nepi.resources.all.collector module +----------------------------------- + +.. automodule:: nepi.resources.all.collector + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: nepi.resources.all + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/_layout/nepi.resources.linux.ccn.rst b/doc/sphinx/_layout/nepi.resources.linux.ccn.rst new file mode 100644 index 00000000..871cb33f --- /dev/null +++ b/doc/sphinx/_layout/nepi.resources.linux.ccn.rst @@ -0,0 +1,94 @@ +nepi.resources.linux.ccn package +================================ + +Submodules +---------- + +nepi.resources.linux.ccn.ccnapplication module +---------------------------------------------- + +.. automodule:: nepi.resources.linux.ccn.ccnapplication + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.ccn.ccncat module +-------------------------------------- + +.. automodule:: nepi.resources.linux.ccn.ccncat + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.ccn.ccncontent module +------------------------------------------ + +.. automodule:: nepi.resources.linux.ccn.ccncontent + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.ccn.ccnd module +------------------------------------ + +.. automodule:: nepi.resources.linux.ccn.ccnd + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.ccn.ccnpeek module +--------------------------------------- + +.. automodule:: nepi.resources.linux.ccn.ccnpeek + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.ccn.ccnping module +--------------------------------------- + +.. automodule:: nepi.resources.linux.ccn.ccnping + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.ccn.ccnpingserver module +--------------------------------------------- + +.. automodule:: nepi.resources.linux.ccn.ccnpingserver + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.ccn.ccnpoke module +--------------------------------------- + +.. automodule:: nepi.resources.linux.ccn.ccnpoke + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.ccn.ccnr module +------------------------------------ + +.. automodule:: nepi.resources.linux.ccn.ccnr + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.ccn.fibentry module +---------------------------------------- + +.. automodule:: nepi.resources.linux.ccn.fibentry + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: nepi.resources.linux.ccn + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/_layout/nepi.resources.linux.netns.rst b/doc/sphinx/_layout/nepi.resources.linux.netns.rst new file mode 100644 index 00000000..a20d9109 --- /dev/null +++ b/doc/sphinx/_layout/nepi.resources.linux.netns.rst @@ -0,0 +1,30 @@ +nepi.resources.linux.netns package +================================== + +Submodules +---------- + +nepi.resources.linux.netns.netnsclient module +--------------------------------------------- + +.. automodule:: nepi.resources.linux.netns.netnsclient + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.netns.netnsemulation module +------------------------------------------------ + +.. automodule:: nepi.resources.linux.netns.netnsemulation + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: nepi.resources.linux.netns + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/_layout/nepi.resources.linux.ns3.ccn.rst b/doc/sphinx/_layout/nepi.resources.linux.ns3.ccn.rst new file mode 100644 index 00000000..a6e08684 --- /dev/null +++ b/doc/sphinx/_layout/nepi.resources.linux.ns3.ccn.rst @@ -0,0 +1,70 @@ +nepi.resources.linux.ns3.ccn package +==================================== + +Submodules +---------- + +nepi.resources.linux.ns3.ccn.ns3ccncatdceapplication module +----------------------------------------------------------- + +.. automodule:: nepi.resources.linux.ns3.ccn.ns3ccncatdceapplication + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.ns3.ccn.ns3ccndceapplication module +-------------------------------------------------------- + +.. automodule:: nepi.resources.linux.ns3.ccn.ns3ccndceapplication + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.ns3.ccn.ns3ccnddceapplication module +--------------------------------------------------------- + +.. automodule:: nepi.resources.linux.ns3.ccn.ns3ccnddceapplication + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.ns3.ccn.ns3ccnpeekdceapplication module +------------------------------------------------------------ + +.. automodule:: nepi.resources.linux.ns3.ccn.ns3ccnpeekdceapplication + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.ns3.ccn.ns3ccnpokedceapplication module +------------------------------------------------------------ + +.. automodule:: nepi.resources.linux.ns3.ccn.ns3ccnpokedceapplication + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.ns3.ccn.ns3ccnrdceapplication module +--------------------------------------------------------- + +.. automodule:: nepi.resources.linux.ns3.ccn.ns3ccnrdceapplication + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.ns3.ccn.ns3fibentrydceapplication module +------------------------------------------------------------- + +.. automodule:: nepi.resources.linux.ns3.ccn.ns3fibentrydceapplication + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: nepi.resources.linux.ns3.ccn + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/_layout/nepi.resources.linux.ns3.rst b/doc/sphinx/_layout/nepi.resources.linux.ns3.rst new file mode 100644 index 00000000..341946ed --- /dev/null +++ b/doc/sphinx/_layout/nepi.resources.linux.ns3.rst @@ -0,0 +1,69 @@ +nepi.resources.linux.ns3 package +================================ + +Subpackages +----------- + +.. toctree:: + + nepi.resources.linux.ns3.ccn + +Submodules +---------- + +nepi.resources.linux.ns3.fdudptunnel module +------------------------------------------- + +.. automodule:: nepi.resources.linux.ns3.fdudptunnel + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.ns3.ns3client module +----------------------------------------- + +.. automodule:: nepi.resources.linux.ns3.ns3client + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.ns3.ns3dceapplication module +------------------------------------------------- + +.. automodule:: nepi.resources.linux.ns3.ns3dceapplication + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.ns3.ns3pingdceapplication module +----------------------------------------------------- + +.. automodule:: nepi.resources.linux.ns3.ns3pingdceapplication + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.ns3.ns3simulation module +--------------------------------------------- + +.. automodule:: nepi.resources.linux.ns3.ns3simulation + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.ns3.tuntapfdlink module +-------------------------------------------- + +.. automodule:: nepi.resources.linux.ns3.tuntapfdlink + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: nepi.resources.linux.ns3 + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/_layout/nepi.resources.linux.rst b/doc/sphinx/_layout/nepi.resources.linux.rst new file mode 100644 index 00000000..40e4309b --- /dev/null +++ b/doc/sphinx/_layout/nepi.resources.linux.rst @@ -0,0 +1,167 @@ +nepi.resources.linux package +============================ + +Subpackages +----------- + +.. toctree:: + + nepi.resources.linux.ccn + nepi.resources.linux.netns + nepi.resources.linux.ns3 + +Submodules +---------- + +nepi.resources.linux.application module +--------------------------------------- + +.. automodule:: nepi.resources.linux.application + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.channel module +----------------------------------- + +.. automodule:: nepi.resources.linux.channel + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.debfuncs module +------------------------------------ + +.. automodule:: nepi.resources.linux.debfuncs + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.gretunnel module +------------------------------------- + +.. automodule:: nepi.resources.linux.gretunnel + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.interface module +------------------------------------- + +.. automodule:: nepi.resources.linux.interface + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.mtr module +------------------------------- + +.. automodule:: nepi.resources.linux.mtr + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.node module +-------------------------------- + +.. automodule:: nepi.resources.linux.node + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.nping module +--------------------------------- + +.. automodule:: nepi.resources.linux.nping + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.ping module +-------------------------------- + +.. automodule:: nepi.resources.linux.ping + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.route module +--------------------------------- + +.. automodule:: nepi.resources.linux.route + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.rpmfuncs module +------------------------------------ + +.. automodule:: nepi.resources.linux.rpmfuncs + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.tap module +------------------------------- + +.. automodule:: nepi.resources.linux.tap + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.tcpdump module +----------------------------------- + +.. automodule:: nepi.resources.linux.tcpdump + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.traceroute module +-------------------------------------- + +.. automodule:: nepi.resources.linux.traceroute + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.tun module +------------------------------- + +.. automodule:: nepi.resources.linux.tun + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.tunnel module +---------------------------------- + +.. automodule:: nepi.resources.linux.tunnel + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.udptest module +----------------------------------- + +.. automodule:: nepi.resources.linux.udptest + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.linux.udptunnel module +------------------------------------- + +.. automodule:: nepi.resources.linux.udptunnel + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: nepi.resources.linux + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/_layout/nepi.resources.netns.rst b/doc/sphinx/_layout/nepi.resources.netns.rst new file mode 100644 index 00000000..eacf7f36 --- /dev/null +++ b/doc/sphinx/_layout/nepi.resources.netns.rst @@ -0,0 +1,118 @@ +nepi.resources.netns package +============================ + +Submodules +---------- + +nepi.resources.netns.netnsapplication module +-------------------------------------------- + +.. automodule:: nepi.resources.netns.netnsapplication + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.netns.netnsbase module +------------------------------------- + +.. automodule:: nepi.resources.netns.netnsbase + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.netns.netnsclient module +--------------------------------------- + +.. automodule:: nepi.resources.netns.netnsclient + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.netns.netnsemulation module +------------------------------------------ + +.. automodule:: nepi.resources.netns.netnsemulation + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.netns.netnsinterface module +------------------------------------------ + +.. automodule:: nepi.resources.netns.netnsinterface + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.netns.netnsipv4address module +-------------------------------------------- + +.. automodule:: nepi.resources.netns.netnsipv4address + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.netns.netnsnode module +------------------------------------- + +.. automodule:: nepi.resources.netns.netnsnode + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.netns.netnsnodeinterface module +---------------------------------------------- + +.. automodule:: nepi.resources.netns.netnsnodeinterface + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.netns.netnsroute module +-------------------------------------- + +.. automodule:: nepi.resources.netns.netnsroute + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.netns.netnsserver module +--------------------------------------- + +.. automodule:: nepi.resources.netns.netnsserver + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.netns.netnsswitch module +--------------------------------------- + +.. automodule:: nepi.resources.netns.netnsswitch + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.netns.netnswrapper module +---------------------------------------- + +.. automodule:: nepi.resources.netns.netnswrapper + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.netns.netnswrapper_debug module +---------------------------------------------- + +.. automodule:: nepi.resources.netns.netnswrapper_debug + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: nepi.resources.netns + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/_layout/nepi.resources.ns3.classes.rst b/doc/sphinx/_layout/nepi.resources.ns3.classes.rst new file mode 100644 index 00000000..e489b712 --- /dev/null +++ b/doc/sphinx/_layout/nepi.resources.ns3.classes.rst @@ -0,0 +1,862 @@ +nepi.resources.ns3.classes package +================================== + +Submodules +---------- + +nepi.resources.ns3.classes.aarf_wifi_manager module +--------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.aarf_wifi_manager + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.aarfcd_wifi_manager module +----------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.aarfcd_wifi_manager + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.adhoc_wifi_mac module +------------------------------------------------ + +.. automodule:: nepi.resources.ns3.classes.adhoc_wifi_mac + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.aloha_noack_net_device module +-------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.aloha_noack_net_device + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.amrr_wifi_manager module +--------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.amrr_wifi_manager + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.ap_wifi_mac module +--------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.ap_wifi_mac + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.arf_wifi_manager module +-------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.arf_wifi_manager + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.arp_l3protocol module +------------------------------------------------ + +.. automodule:: nepi.resources.ns3.classes.arp_l3protocol + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.base_station_net_device module +--------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.base_station_net_device + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.binary_error_model module +---------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.binary_error_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.binary_error_sixlow_model module +----------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.binary_error_sixlow_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.bridge_channel module +------------------------------------------------ + +.. automodule:: nepi.resources.ns3.classes.bridge_channel + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.bridge_net_device module +--------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.bridge_net_device + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.bulk_send_application module +------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.bulk_send_application + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.burst_error_model module +--------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.burst_error_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.cara_wifi_manager module +--------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.cara_wifi_manager + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.constant_acceleration_mobility_model module +---------------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.constant_acceleration_mobility_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.constant_position_mobility_model module +------------------------------------------------------------------ + +.. automodule:: nepi.resources.ns3.classes.constant_position_mobility_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.constant_rate_wifi_manager module +------------------------------------------------------------ + +.. automodule:: nepi.resources.ns3.classes.constant_rate_wifi_manager + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.constant_speed_propagation_delay_model module +------------------------------------------------------------------------ + +.. automodule:: nepi.resources.ns3.classes.constant_speed_propagation_delay_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.constant_velocity_mobility_model module +------------------------------------------------------------------ + +.. automodule:: nepi.resources.ns3.classes.constant_velocity_mobility_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.cost231propagation_loss_model module +--------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.cost231propagation_loss_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.csma_channel module +---------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.csma_channel + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.csma_net_device module +------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.csma_net_device + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.drop_tail_queue module +------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.drop_tail_queue + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.dsrdsr_routing module +------------------------------------------------ + +.. automodule:: nepi.resources.ns3.classes.dsrdsr_routing + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.emu_net_device module +------------------------------------------------ + +.. automodule:: nepi.resources.ns3.classes.emu_net_device + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.error_channel module +----------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.error_channel + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.error_channel_sixlow module +------------------------------------------------------ + +.. automodule:: nepi.resources.ns3.classes.error_channel_sixlow + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.error_net_device module +-------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.error_net_device + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.fd_net_device module +----------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.fd_net_device + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.fixed_rss_loss_model module +------------------------------------------------------ + +.. automodule:: nepi.resources.ns3.classes.fixed_rss_loss_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.friis_propagation_loss_model module +-------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.friis_propagation_loss_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.gauss_markov_mobility_model module +------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.gauss_markov_mobility_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.hierarchical_mobility_model module +------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.hierarchical_mobility_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.hybrid_buildings_propagation_loss_model module +------------------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.hybrid_buildings_propagation_loss_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.icmpv4l4protocol module +-------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.icmpv4l4protocol + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.icmpv6l4protocol module +-------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.icmpv6l4protocol + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.ideal_wifi_manager module +---------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.ideal_wifi_manager + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.ipv4l3protocol module +------------------------------------------------ + +.. automodule:: nepi.resources.ns3.classes.ipv4l3protocol + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.itu_r1411los_propagation_loss_model module +--------------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.itu_r1411los_propagation_loss_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.itu_r1411nlos_over_rooftop_propagation_loss_model module +----------------------------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.itu_r1411nlos_over_rooftop_propagation_loss_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.jakes_propagation_loss_model module +-------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.jakes_propagation_loss_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.kun2600mhz_propagation_loss_model module +------------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.kun2600mhz_propagation_loss_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.list_error_model module +-------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.list_error_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.log_distance_propagation_loss_model module +--------------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.log_distance_propagation_loss_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.loopback_net_device module +----------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.loopback_net_device + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.lr_wpan_net_device module +---------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.lr_wpan_net_device + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.lte_enb_net_device module +---------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.lte_enb_net_device + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.lte_simple_net_device module +------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.lte_simple_net_device + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.lte_ue_net_device module +--------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.lte_ue_net_device + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.matrix_propagation_loss_model module +--------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.matrix_propagation_loss_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.mesh_point_device module +--------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.mesh_point_device + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.mesh_wifi_interface_mac module +--------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.mesh_wifi_interface_mac + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.minstrel_wifi_manager module +------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.minstrel_wifi_manager + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.multi_model_spectrum_channel module +-------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.multi_model_spectrum_channel + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.nakagami_propagation_loss_model module +----------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.nakagami_propagation_loss_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.nist_error_rate_model module +------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.nist_error_rate_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.node module +-------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.node + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.non_communicating_net_device module +-------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.non_communicating_net_device + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.ocb_wifi_mac module +---------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.ocb_wifi_mac + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.oh_buildings_propagation_loss_model module +--------------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.oh_buildings_propagation_loss_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.okumura_hata_propagation_loss_model module +--------------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.okumura_hata_propagation_loss_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.on_off_application module +---------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.on_off_application + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.onoe_wifi_manager module +--------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.onoe_wifi_manager + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.packet_sink module +--------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.packet_sink + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.ping6 module +--------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.ping6 + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.point_to_point_channel module +-------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.point_to_point_channel + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.point_to_point_net_device module +----------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.point_to_point_net_device + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.point_to_point_remote_channel module +--------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.point_to_point_remote_channel + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.radvd module +--------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.radvd + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.random_direction2d_mobility_model module +------------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.random_direction2d_mobility_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.random_propagation_delay_model module +---------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.random_propagation_delay_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.random_propagation_loss_model module +--------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.random_propagation_loss_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.random_walk2d_mobility_model module +-------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.random_walk2d_mobility_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.random_waypoint_mobility_model module +---------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.random_waypoint_mobility_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.range_propagation_loss_model module +-------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.range_propagation_loss_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.rate_error_model module +-------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.rate_error_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.receive_list_error_model module +---------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.receive_list_error_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.red_queue module +------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.red_queue + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.rraa_wifi_manager module +--------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.rraa_wifi_manager + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.simple_channel module +------------------------------------------------ + +.. automodule:: nepi.resources.ns3.classes.simple_channel + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.simple_net_device module +--------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.simple_net_device + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.single_model_spectrum_channel module +--------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.single_model_spectrum_channel + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.six_low_pan_net_device module +-------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.six_low_pan_net_device + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.sta_wifi_mac module +---------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.sta_wifi_mac + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.steady_state_random_waypoint_mobility_model module +----------------------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.steady_state_random_waypoint_mobility_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.subscriber_station_net_device module +--------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.subscriber_station_net_device + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.tap_bridge module +-------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.tap_bridge + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.tcp_l4protocol module +------------------------------------------------ + +.. automodule:: nepi.resources.ns3.classes.tcp_l4protocol + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.three_log_distance_propagation_loss_model module +--------------------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.three_log_distance_propagation_loss_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.two_ray_ground_propagation_loss_model module +----------------------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.two_ray_ground_propagation_loss_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.uan_channel module +--------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.uan_channel + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.udp_client module +-------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.udp_client + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.udp_echo_client module +------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.udp_echo_client + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.udp_echo_server module +------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.udp_echo_server + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.udp_l4protocol module +------------------------------------------------ + +.. automodule:: nepi.resources.ns3.classes.udp_l4protocol + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.udp_server module +-------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.udp_server + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.udp_trace_client module +-------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.udp_trace_client + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.v4ping module +---------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.v4ping + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.virtual_net_device module +---------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.virtual_net_device + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.waypoint_mobility_model module +--------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.waypoint_mobility_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.wifi_net_device module +------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.wifi_net_device + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.yans_error_rate_model module +------------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.yans_error_rate_model + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.yans_wifi_channel module +--------------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.yans_wifi_channel + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.classes.yans_wifi_phy module +----------------------------------------------- + +.. automodule:: nepi.resources.ns3.classes.yans_wifi_phy + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: nepi.resources.ns3.classes + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/_layout/nepi.resources.ns3.rst b/doc/sphinx/_layout/nepi.resources.ns3.rst new file mode 100644 index 00000000..94356ab8 --- /dev/null +++ b/doc/sphinx/_layout/nepi.resources.ns3.rst @@ -0,0 +1,269 @@ +nepi.resources.ns3 package +========================== + +Subpackages +----------- + +.. toctree:: + + nepi.resources.ns3.classes + +Submodules +---------- + +nepi.resources.ns3.ns3application module +---------------------------------------- + +.. automodule:: nepi.resources.ns3.ns3application + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3arpl3protocol module +------------------------------------------ + +.. automodule:: nepi.resources.ns3.ns3arpl3protocol + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3base module +--------------------------------- + +.. automodule:: nepi.resources.ns3.ns3base + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3ccndceapplication module +---------------------------------------------- + +.. automodule:: nepi.resources.ns3.ns3ccndceapplication + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3channel module +------------------------------------ + +.. automodule:: nepi.resources.ns3.ns3channel + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3client module +----------------------------------- + +.. automodule:: nepi.resources.ns3.ns3client + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3dceapplication module +------------------------------------------- + +.. automodule:: nepi.resources.ns3.ns3dceapplication + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3dcehelper module +-------------------------------------- + +.. automodule:: nepi.resources.ns3.ns3dcehelper + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3errormodel module +--------------------------------------- + +.. automodule:: nepi.resources.ns3.ns3errormodel + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3errorratemodel module +------------------------------------------- + +.. automodule:: nepi.resources.ns3.ns3errorratemodel + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3fdnetdevice module +---------------------------------------- + +.. automodule:: nepi.resources.ns3.ns3fdnetdevice + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3icmpv4l4protocol module +--------------------------------------------- + +.. automodule:: nepi.resources.ns3.ns3icmpv4l4protocol + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3ipv4l3protocol module +------------------------------------------- + +.. automodule:: nepi.resources.ns3.ns3ipv4l3protocol + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3mobilitymodel module +------------------------------------------ + +.. automodule:: nepi.resources.ns3.ns3mobilitymodel + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3netdevice module +-------------------------------------- + +.. automodule:: nepi.resources.ns3.ns3netdevice + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3node module +--------------------------------- + +.. automodule:: nepi.resources.ns3.ns3node + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3pipechanel module +--------------------------------------- + +.. automodule:: nepi.resources.ns3.ns3pipechanel + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3propagationdelaymodel module +-------------------------------------------------- + +.. automodule:: nepi.resources.ns3.ns3propagationdelaymodel + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3propagationlossmodel module +------------------------------------------------- + +.. automodule:: nepi.resources.ns3.ns3propagationlossmodel + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3queue module +---------------------------------- + +.. automodule:: nepi.resources.ns3.ns3queue + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3route module +---------------------------------- + +.. automodule:: nepi.resources.ns3.ns3route + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3server module +----------------------------------- + +.. automodule:: nepi.resources.ns3.ns3server + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3simulation module +--------------------------------------- + +.. automodule:: nepi.resources.ns3.ns3simulation + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3wifichannel module +---------------------------------------- + +.. automodule:: nepi.resources.ns3.ns3wifichannel + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3wifimac module +------------------------------------ + +.. automodule:: nepi.resources.ns3.ns3wifimac + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3wifinetdevice module +------------------------------------------ + +.. automodule:: nepi.resources.ns3.ns3wifinetdevice + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3wifiphy module +------------------------------------ + +.. automodule:: nepi.resources.ns3.ns3wifiphy + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3wifiremotestationmanager module +----------------------------------------------------- + +.. automodule:: nepi.resources.ns3.ns3wifiremotestationmanager + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3wrapper module +------------------------------------ + +.. automodule:: nepi.resources.ns3.ns3wrapper + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.ns3wrapper_debug module +------------------------------------------ + +.. automodule:: nepi.resources.ns3.ns3wrapper_debug + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.ns3.resource_manager_generator module +---------------------------------------------------- + +.. automodule:: nepi.resources.ns3.resource_manager_generator + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: nepi.resources.ns3 + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/_layout/nepi.resources.omf.rst b/doc/sphinx/_layout/nepi.resources.omf.rst new file mode 100644 index 00000000..7dd222ee --- /dev/null +++ b/doc/sphinx/_layout/nepi.resources.omf.rst @@ -0,0 +1,118 @@ +nepi.resources.omf package +========================== + +Submodules +---------- + +nepi.resources.omf.application module +------------------------------------- + +.. automodule:: nepi.resources.omf.application + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.omf.channel module +--------------------------------- + +.. automodule:: nepi.resources.omf.channel + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.omf.interface module +----------------------------------- + +.. automodule:: nepi.resources.omf.interface + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.omf.messages_5_4 module +-------------------------------------- + +.. automodule:: nepi.resources.omf.messages_5_4 + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.omf.messages_6 module +------------------------------------ + +.. automodule:: nepi.resources.omf.messages_6 + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.omf.node module +------------------------------ + +.. automodule:: nepi.resources.omf.node + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.omf.omf5_api module +---------------------------------- + +.. automodule:: nepi.resources.omf.omf5_api + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.omf.omf6_api module +---------------------------------- + +.. automodule:: nepi.resources.omf.omf6_api + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.omf.omf6_parser module +------------------------------------- + +.. automodule:: nepi.resources.omf.omf6_parser + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.omf.omf_api_factory module +----------------------------------------- + +.. automodule:: nepi.resources.omf.omf_api_factory + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.omf.omf_client module +------------------------------------ + +.. automodule:: nepi.resources.omf.omf_client + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.omf.omf_resource module +-------------------------------------- + +.. automodule:: nepi.resources.omf.omf_resource + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.omf.wilabt_node module +------------------------------------- + +.. automodule:: nepi.resources.omf.wilabt_node + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: nepi.resources.omf + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/_layout/nepi.resources.planetlab.ns3.rst b/doc/sphinx/_layout/nepi.resources.planetlab.ns3.rst new file mode 100644 index 00000000..a8759d48 --- /dev/null +++ b/doc/sphinx/_layout/nepi.resources.planetlab.ns3.rst @@ -0,0 +1,30 @@ +nepi.resources.planetlab.ns3 package +==================================== + +Submodules +---------- + +nepi.resources.planetlab.ns3.fdudptunnel module +----------------------------------------------- + +.. automodule:: nepi.resources.planetlab.ns3.fdudptunnel + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.planetlab.ns3.tuntapfdlink module +------------------------------------------------ + +.. automodule:: nepi.resources.planetlab.ns3.tuntapfdlink + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: nepi.resources.planetlab.ns3 + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/_layout/nepi.resources.planetlab.openvswitch.rst b/doc/sphinx/_layout/nepi.resources.planetlab.openvswitch.rst new file mode 100644 index 00000000..edbb21a2 --- /dev/null +++ b/doc/sphinx/_layout/nepi.resources.planetlab.openvswitch.rst @@ -0,0 +1,30 @@ +nepi.resources.planetlab.openvswitch package +============================================ + +Submodules +---------- + +nepi.resources.planetlab.openvswitch.ovs module +----------------------------------------------- + +.. automodule:: nepi.resources.planetlab.openvswitch.ovs + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.planetlab.openvswitch.ovsport module +--------------------------------------------------- + +.. automodule:: nepi.resources.planetlab.openvswitch.ovsport + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: nepi.resources.planetlab.openvswitch + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/_layout/nepi.resources.planetlab.rst b/doc/sphinx/_layout/nepi.resources.planetlab.rst new file mode 100644 index 00000000..9fde12c9 --- /dev/null +++ b/doc/sphinx/_layout/nepi.resources.planetlab.rst @@ -0,0 +1,70 @@ +nepi.resources.planetlab package +================================ + +Subpackages +----------- + +.. toctree:: + + nepi.resources.planetlab.ns3 + nepi.resources.planetlab.openvswitch + +Submodules +---------- + +nepi.resources.planetlab.node module +------------------------------------ + +.. automodule:: nepi.resources.planetlab.node + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.planetlab.plcapi module +-------------------------------------- + +.. automodule:: nepi.resources.planetlab.plcapi + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.planetlab.sfa_node module +---------------------------------------- + +.. automodule:: nepi.resources.planetlab.sfa_node + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.planetlab.tap module +----------------------------------- + +.. automodule:: nepi.resources.planetlab.tap + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.planetlab.tun module +----------------------------------- + +.. automodule:: nepi.resources.planetlab.tun + :members: + :undoc-members: + :show-inheritance: + +nepi.resources.planetlab.vroute module +-------------------------------------- + +.. automodule:: nepi.resources.planetlab.vroute + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: nepi.resources.planetlab + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/_layout/nepi.resources.rst b/doc/sphinx/_layout/nepi.resources.rst new file mode 100644 index 00000000..4c1fcfc2 --- /dev/null +++ b/doc/sphinx/_layout/nepi.resources.rst @@ -0,0 +1,22 @@ +nepi.resources package +====================== + +Subpackages +----------- + +.. toctree:: + + nepi.resources.all + nepi.resources.linux + nepi.resources.netns + nepi.resources.ns3 + nepi.resources.omf + nepi.resources.planetlab + +Module contents +--------------- + +.. automodule:: nepi.resources + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/_layout/nepi.rst b/doc/sphinx/_layout/nepi.rst new file mode 100644 index 00000000..aa1d5d30 --- /dev/null +++ b/doc/sphinx/_layout/nepi.rst @@ -0,0 +1,20 @@ +nepi package +============ + +Subpackages +----------- + +.. toctree:: + + nepi.data + nepi.execution + nepi.resources + nepi.util + +Module contents +--------------- + +.. automodule:: nepi + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/_layout/nepi.util.parsers.rst b/doc/sphinx/_layout/nepi.util.parsers.rst new file mode 100644 index 00000000..34888c17 --- /dev/null +++ b/doc/sphinx/_layout/nepi.util.parsers.rst @@ -0,0 +1,22 @@ +nepi.util.parsers package +========================= + +Submodules +---------- + +nepi.util.parsers.xml_parser module +----------------------------------- + +.. automodule:: nepi.util.parsers.xml_parser + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: nepi.util.parsers + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/_layout/nepi.util.rst b/doc/sphinx/_layout/nepi.util.rst new file mode 100644 index 00000000..cf0bc639 --- /dev/null +++ b/doc/sphinx/_layout/nepi.util.rst @@ -0,0 +1,141 @@ +nepi.util package +================= + +Subpackages +----------- + +.. toctree:: + + nepi.util.parsers + +Submodules +---------- + +nepi.util.environ module +------------------------ + +.. automodule:: nepi.util.environ + :members: + :undoc-members: + :show-inheritance: + +nepi.util.execfuncs module +-------------------------- + +.. automodule:: nepi.util.execfuncs + :members: + :undoc-members: + :show-inheritance: + +nepi.util.guid module +--------------------- + +.. automodule:: nepi.util.guid + :members: + :undoc-members: + :show-inheritance: + +nepi.util.logger module +----------------------- + +.. automodule:: nepi.util.logger + :members: + :undoc-members: + :show-inheritance: + +nepi.util.manifoldapi module +---------------------------- + +.. automodule:: nepi.util.manifoldapi + :members: + :undoc-members: + :show-inheritance: + +nepi.util.netgraph module +------------------------- + +.. automodule:: nepi.util.netgraph + :members: + :undoc-members: + :show-inheritance: + +nepi.util.parallel module +------------------------- + +.. automodule:: nepi.util.parallel + :members: + :undoc-members: + :show-inheritance: + +nepi.util.plotter module +------------------------ + +.. automodule:: nepi.util.plotter + :members: + :undoc-members: + :show-inheritance: + +nepi.util.rmatcher module +------------------------- + +.. automodule:: nepi.util.rmatcher + :members: + :undoc-members: + :show-inheritance: + +nepi.util.serializer module +--------------------------- + +.. automodule:: nepi.util.serializer + :members: + :undoc-members: + :show-inheritance: + +nepi.util.sfaapi module +----------------------- + +.. automodule:: nepi.util.sfaapi + :members: + :undoc-members: + :show-inheritance: + +nepi.util.sfarspec_proc module +------------------------------ + +.. automodule:: nepi.util.sfarspec_proc + :members: + :undoc-members: + :show-inheritance: + +nepi.util.sshfuncs module +------------------------- + +.. automodule:: nepi.util.sshfuncs + :members: + :undoc-members: + :show-inheritance: + +nepi.util.statfuncs module +-------------------------- + +.. automodule:: nepi.util.statfuncs + :members: + :undoc-members: + :show-inheritance: + +nepi.util.timefuncs module +-------------------------- + +.. automodule:: nepi.util.timefuncs + :members: + :undoc-members: + :show-inheritance: + + +Module contents +--------------- + +.. automodule:: nepi.util + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/sphinx/conf.py b/doc/sphinx/conf.py new file mode 100644 index 00000000..188ce2ae --- /dev/null +++ b/doc/sphinx/conf.py @@ -0,0 +1,247 @@ +# -*- coding: utf-8 -*- +# +# Nepi documentation build configuration file, created by +# sphinx-quickstart on Tue Mar 25 16:32:00 2014. +# +# This file is execfile()d with the current directory set to its containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +import sys, os + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +sys.path.insert(0, os.path.abspath('../../src')) + +# -- General configuration ----------------------------------------------------- + +# If your documentation needs a minimal Sphinx version, state it here. +#needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be extensions +# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. +extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', 'sphinx.ext.todo', 'sphinx.ext.viewcode'] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix of source filenames. +source_suffix = '.rst' + +# The encoding of source files. +#source_encoding = 'utf-8-sig' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = u'NEPI' +copyright = u'2014, Alina Quereilhac, Lucia Guevgeozian Odizzio, Julien Tribino' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The short X.Y version. +version = '3' +# The full version, including alpha/beta/rc tags. +release = '3.0' + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +#language = None + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +#today = '' +# Else, today_fmt is used as the format for a strftime call. +#today_fmt = '%B %d, %Y' + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +exclude_patterns = ['_build'] + +# The reST default role (used for this markup: `text`) to use for all documents. +#default_role = None + +# If true, '()' will be appended to :func: etc. cross-reference text. +#add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +#add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +#show_authors = False + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# A list of ignored prefixes for module index sorting. +#modindex_common_prefix = [] + + +# -- Options for HTML output --------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +html_theme = 'sphinxdoc' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +#html_theme_options = {} + +# Add any paths that contain custom themes here, relative to this directory. +#html_theme_path = [] + +# The name for this set of Sphinx documents. If None, it defaults to +# " v documentation". +#html_title = None + +# A shorter title for the navigation bar. Default is the same as html_title. +#html_short_title = None + +# The name of an image file (relative to this directory) to place at the top +# of the sidebar. +#html_logo = None + +# The name of an image file (within the static path) to use as favicon of the +# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# pixels large. +#html_favicon = None + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, +# using the given strftime format. +#html_last_updated_fmt = '%b %d, %Y' + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +#html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +#html_sidebars = {} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +#html_additional_pages = {} + +# If false, no module index is generated. +#html_domain_indices = True + +# If false, no index is generated. +#html_use_index = True + +# If true, the index is split into individual pages for each letter. +#html_split_index = False + +# If true, links to the reST sources are added to the pages. +#html_show_sourcelink = True + +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. +#html_show_sphinx = True + +# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. +#html_show_copyright = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +#html_use_opensearch = '' + +# This is the file name suffix for HTML files (e.g. ".xhtml"). +#html_file_suffix = None + +# Output file base name for HTML help builder. +htmlhelp_basename = 'Nepidoc' + + +# -- Options for LaTeX output -------------------------------------------------- + +latex_elements = { +# The paper size ('letterpaper' or 'a4paper'). +#'papersize': 'letterpaper', + +# The font size ('10pt', '11pt' or '12pt'). +#'pointsize': '10pt', + +# Additional stuff for the LaTeX preamble. +#'preamble': '', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, author, documentclass [howto/manual]). +latex_documents = [ + ('index', 'NEPI.tex', u'NEPI Documentation', + u'Alina Quereilhac, Lucia Guevgeozian Odizzio, Julien Tribino', 'manual'), +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +#latex_logo = None + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +#latex_use_parts = False + +# If true, show page references after internal links. +#latex_show_pagerefs = False + +# If true, show URL addresses after external links. +#latex_show_urls = False + +# Documents to append as an appendix to all manuals. +#latex_appendices = [] + +# If false, no module index is generated. +#latex_domain_indices = True + + +# -- Options for manual page output -------------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + ('index', 'NEPI', u'NEPI Documentation', + [u'Alina Quereilhac, Lucia Guevgeozian Odizzio, Julien Tribino'], 1) +] + +# If true, show URL addresses after external links. +#man_show_urls = False + + +# -- Options for Texinfo output ------------------------------------------------ + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + ('index', 'NEPI', u'NEPI Documentation', + u'Alina Quereilhac, Lucia Guevgeozian Odizzio, Julien Tribino', + 'NEPI', 'The network experimentation programming interface', + 'Miscellaneous'), +] + +# Documents to append as an appendix to all manuals. +#texinfo_appendices = [] + +# If false, no module index is generated. +#texinfo_domain_indices = True + +# How to display URL addresses: 'footnote', 'no', or 'inline'. +#texinfo_show_urls = 'footnote' + + +# Example configuration for intersphinx: refer to the Python standard library. +intersphinx_mapping = {'http://docs.python.org/': None} diff --git a/doc/sphinx/index.rst b/doc/sphinx/index.rst new file mode 100644 index 00000000..6cc4c839 --- /dev/null +++ b/doc/sphinx/index.rst @@ -0,0 +1,91 @@ +.. Nepi documentation master file, created by + sphinx-quickstart on Tue Mar 26 11:36:35 2013. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +NEPI modules +============ + +This page documents the NEPI source code. It presents the NEPI core modules, the Platform resource modules (i.e. drivers to manage platforms), and other miscellaneous classes. + +Core modules +------------ + + * ExperimentController API + + * :mod:`ExperimentController ` + + * ResourceManager API + + * :mod:`ResourceManager ` + + * Attribute module + + * :mod:`Attribute ` + + * Trace module + + * :mod:`Trace ` + + * Runner module + + * :mod:`ExperimentRunner ` + + * Scheduler module + + * :mod:`Scheduler ` + + + +Platform modules +---------------- + + * Live Experiments + + * Linux testbeds + + * :mod:`Linux ` + + * PlanetLab testbeds + + * :mod:`PlanetLab ` + + * OMF testbed + + * :mod:`OMF ` + + * Simulated Experiments + + * ns-3 simulator + + * :mod:`ns-3 ` + + * :mod:`ns-3 in Linux hosts ` + + * Emulated Experiments + + * DCE emulation extension + + * :mod:`DCE Application ` + + * :mod:`DCE Linux Application ` + + * NetNS emulator + + * :mod:`NetNS ` + +Miscellaneous modules +--------------------- + + * :mod:`Util ` + +.. toctree:: + + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` +