From 87bfa6147491e31e299828fb02a223e6c9c3561f Mon Sep 17 00:00:00 2001 From: Vinicius Arcanjo Date: Tue, 8 Feb 2022 10:20:35 -0300 Subject: [PATCH 1/2] Updated README.rst --- README.rst | 121 ++++++++++++++++++++++++++++++++++------------------- 1 file changed, 77 insertions(+), 44 deletions(-) diff --git a/README.rst b/README.rst index 0e145626..84f48868 100644 --- a/README.rst +++ b/README.rst @@ -1,25 +1,30 @@ -######## -Overview -######## +|Stable| |Tag| |License| |Build| |Coverage| |Quality| -|License| |Build| |Coverage| |Quality| +.. raw:: html -.. attention:: +
+

kytos-ng/flow_manager

- THIS NAPP IS STILL EXPERIMENTAL AND ITS EVENTS, METHODS AND STRUCTURES MAY - CHANGE A LOT ON THE NEXT FEW DAYS/WEEKS. USE IT AT YOUR OWN DISCRETION + NApp that manages OpenFlow 1.3 entries +

OpenAPI Docs

+
-The *kytos/flow_manager* NApp exports a REST API to add, remove and -list flows from OpenFlow switches, for versions 1.0 and 1.3. -It can be used by other applications to manage flows with the supported fields. -This application creates an abstraction layer to other applications: -it is only necessary to know the endpoints. The application handles -the requests and returns the information already formatted. +Features +======== + +- REST API to create/update/read/delete flows +- Expose events to create/update/delete flows +- Store flows in memory and in a permanent storage +- Consistency check based on FlowStats to ensure that only expected flows are installed +- Consistency check ignored flows based on a cookie range and/or table id range +- Send barrier request and replies +- Handle southbound socket connection errors as applicable +- Option to allow to install a flow later on when a switch is connected Supported Fields -**************** +================ This NApp supports a subset of the OpenFlow specification fields in the bodies of the requests when creating and removing flows: @@ -62,40 +67,53 @@ the requests when creating and removing flows: Other fields are not supported and will generate error messages from the NApp. -########## Installing -########## +========== -All of the Kytos Network Applications are located in the NApps online repository. -To install this NApp, run: +To install this NApp, first, make sure to have the same venv activated as you have ``kytos`` installed on: .. code:: shell - $ kytos napps install kytos/flow_manager + $ git clone https://github.com/kytos-ng/flow_manager.git + $ cd flow_manager + $ python setup.py develop -############ Requirements -############ +============ -- kytos/of_core -- kytos/storehouse +- `kytos/of_core `_ +- `kytos/storehouse `_ -###### Events -###### +====== Generated -********* +--------- + +kytos/flow_manager.flow.pending +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +*buffer*: ``app`` + +Event reporting that a FlowMod was sent to a Datapath. + +Content: + +.. code-block:: python3 + + { + 'datapath': , + 'flow': + } kytos/flow_manager.flow.added -============================= +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *buffer*: ``app`` -Event reporting that a FlowMod was sent to a Datapath with the ADD command. +Event reporting that an installed Flow was confirmed via Barrier Reply. -Content -------- +Content: .. code-block:: python3 @@ -105,14 +123,13 @@ Content } kytos/flow_manager.flow.removed -=============================== +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *buffer*: ``app`` -Event reporting that a FlowMod was sent to a Datapath with the DELETE command. +Event reporting that a removed Flow was confirmed via ``OFPT_FLOW_REMOVED`` -Content -------- +Content: .. code-block:: python3 @@ -121,9 +138,29 @@ Content 'flow': } -########################## + +kytos/flow_manager.flow.error +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +*buffer*: ``app`` + +Event reporting that either an OFPT_ERROR error happened or an asynchronous core OpenFlow socket error happened. Clients that send FlowMods via ``flow_manager`` should handle these accordingly. If ``error_exception`` isn't set, then it's a OFPT_ERROR, otherwise, it's a socket exception. + +Content: + +.. code-block:: python3 + + { + 'datapath': , + 'flow': , + 'error_command': , + 'error_type': , + 'error_code': , + 'error_exception': + } + Flow consistency mechanism -########################## +========================== This NApp is also responsible for the consistency of the installed flows through kytos/flow_manager. To do this, all the flows sent to the switches are @@ -135,16 +172,10 @@ This resource can be disabled in the ``settings.py`` file, changing the time of the check to 0. -######## -Rest API -######## - -You can find a list of the available endpoints and example input/output in the -'REST API' tab in this NApp's webpage in the `Kytos NApps Server -`_. - .. TAGs +.. |Stable| image:: https://img.shields.io/badge/stability-stable-green.svg + :target: https://github.com/kytos-ng/flow_manager .. |License| image:: https://img.shields.io/github/license/kytos-ng/kytos.svg :target: https://github.com/kytos-ng/flow_manager/blob/master/LICENSE .. |Build| image:: https://scrutinizer-ci.com/g/kytos-ng/flow_manager/badges/build.png?b=master @@ -156,3 +187,5 @@ You can find a list of the available endpoints and example input/output in the .. |Quality| image:: https://scrutinizer-ci.com/g/kytos-ng/flow_manager/badges/quality-score.png?b=master :alt: Code-quality score :target: https://scrutinizer-ci.com/g/kytos-ng/flow_manager/?branch=master +.. |Tag| image:: https://img.shields.io/github/tag/kytos-ng/flow_manager.svg + :target: https://github.com/kytos-ng/flow_manager/tags From 83d5e04e73fdadfd913e648c336df13fae394853 Mon Sep 17 00:00:00 2001 From: Vinicius Arcanjo Date: Tue, 8 Feb 2022 10:48:03 -0300 Subject: [PATCH 2/2] Updated h1 code tag --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 84f48868..8dfad90d 100644 --- a/README.rst +++ b/README.rst @@ -3,7 +3,7 @@ .. raw:: html
-

kytos-ng/flow_manager

+

kytos/flow_manager

NApp that manages OpenFlow 1.3 entries