Mentions légales du service

Skip to content
Snippets Groups Projects
Verified Commit 97a6dfb0 authored by SIMONIN Matthieu's avatar SIMONIN Matthieu
Browse files

doc: service SimpleNetem

parent 0d60715b
No related branches found
No related tags found
No related merge requests found
......@@ -10,11 +10,11 @@ Base Service Class
:undoc-members:
:show-inheritance:
Conda
======
Conda & Dask
=============
Conda Service Class
--------------------
Conda & Dask Service Class
--------------------------
.. automodule:: enoslib.service.conda.conda
......@@ -22,17 +22,6 @@ Conda Service Class
:undoc-members:
:show-inheritance:
Dask
====
Dask Service Class
--------------------
.. automodule:: enoslib.service.dask.dask
:members:
:undoc-members:
:show-inheritance:
Docker
======
......@@ -85,12 +74,12 @@ Monitoring Service Class
Network Emulation (Netem & SimpleNetem)
=========================
=======================================
.. _netem:
Netem Service Class
-------------------
Netem & SimpleNetem Service Class
---------------------------------
.. automodule:: enoslib.service.netem.netem
......
......@@ -7,16 +7,24 @@ Network Emulation
:depth: 2
This tutorial illustrates how network constraints can be enforced using |enoslib|.
For a complete reference you can refer to :ref:`api`.
Another resources can be found in the :ref:`netem`.
Setting up homogeneous constraints
-----------------------------------
Example
-------
When all your nodes share the same network limitations you can use the
`SimpleNetem` service.
The example is based on the G5K provider, but can be adapted to another one if desired.
Additionally, the network constraints are heterogeneous between nodes.
.. literalinclude:: network_emulation/tuto_simple_netem.py
:language: python
:linenos:
Setting up heterogeneous constraints
-------------------------------------
You can use the Netem service for this purpose. The example is based on the
G5K provider, but can be adapted to another one if desired.
.. literalinclude:: network_emulation/tuto_network_emulation.py
:language: python
:linenos:
......@@ -272,10 +272,14 @@ class SimpleNetem(Service):
def __init__(self, options: str, network: str, *, hosts: List[Host] = None):
"""A wrapper arount netem that applies the constraint on all the hosts.
Note that the network constraints are set in all the nodes for
outgoing packets only.
Args:
options: raw netem options as described here:
http://man7.org/linux/man-pages/man8/tc-netem.8.html
netowrk: on which network the constraints will be applied (role name)
network: on which network the constraints will be applied (role name)
hosts: list of host on which the constraints will be applied
Example:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment