Compare commits

..

No commits in common. "master" and "v3.1" have entirely different histories.
master ... v3.1

1557 changed files with 23013 additions and 432322 deletions

View File

@ -1,25 +0,0 @@
name: Unit tests
on: [push, pull_request]
jobs:
unit-tests:
name: Unit tests
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.5, 3.6, 3.7, 3.8, 3.9]
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade -r pip-requirements.txt
pip install tox tox-gh-actions coveralls
bash ryu/tests/integrated/common/install_docker_test_pkg_for_github_actions.sh
- name: Test with tox
run: NOSE_VERBOSE=0 tox

View File

@ -10,6 +10,6 @@
# W0614: Unused import %s from wildcard import # W0614: Unused import %s from wildcard import
# R0801: Similar lines in %s files # R0801: Similar lines in %s files
disable=C0111,W0511,W0142,E0602,C0103,E1101,R0903,W0614,R0801 disable=C0111,W0511,W0142,E0602,C0103,E1101,R0903,W0614,R0801
msg-template={path}:{line}: [{msg_id}({symbol}), {obj}] {msg} output-format=parseable
reports=yes reports=yes
files-output=no files-output=no

View File

@ -1,11 +0,0 @@
version: 2
build:
image: latest
python:
version: 3.6
install:
- method: pip
path: .
sphinx:
configuration: doc/source/conf.py
formats: all

View File

@ -1,15 +0,0 @@
{
"separateMajorMinor": false,
"schedule": [
"after 10pm every weekday",
"before 5am every weekday",
"every weekend"
],
"timezone": "Pacific/Auckland",
"extends": [
"config:base",
":prHourlyLimit1",
":preserveSemverRanges",
"docker:enableMajor"
]
}

View File

@ -1,9 +0,0 @@
---
linters:
flake8:
python: 3
max-line-length: 120
pep8:
python: 3
max-line-length: 120
py3k:

10
.travis.yml Normal file
View File

@ -0,0 +1,10 @@
language: python
python:
- "2.6"
- "2.7"
install:
- "pip install -r tools/pip-requires -r tools/test-requires --use-mirrors"
script:
- "./run_tests.sh -N"

View File

@ -7,7 +7,6 @@ graft etc
graft tools graft tools
recursive-exclude doc/build * recursive-exclude doc/build *
recursive-exclude ryu/tests/packet_data_generator * recursive-exclude ryu/tests/packet_data_generator *
recursive-exclude ryu/tests/packet_data_generator2 *
global-exclude *~ global-exclude *~
global-exclude *.pyc global-exclude *.pyc
global-exclude .gitignore global-exclude .gitignore

View File

@ -1,17 +1,12 @@
**PLEASE READ: RYU NOT CURRENTLY MAINTAINED**
* The Ryu project needs new maintainers - please file an issue if you are able to assist.
* see OpenStack's os-ken (`<https://github.com/openstack/os-ken>`_) for a maintained Ryu alternative.
What's Ryu What's Ryu
========== ==========
Ryu is a component-based software defined networking framework. Ryu is a component-based software defined networking framework.
Ryu provides software components with well defined API's that make it Ryu provides software components with well defined API that make it
easy for developers to create new network management and control easy for developers to create new network management and control
applications. Ryu supports various protocols for managing network applications. Ryu supports various protocols for managing network
devices, such as OpenFlow, Netconf, OF-config, etc. About OpenFlow, devices, such as OpenFlow, Netconf, OF-config, etc. About OpenFlow,
Ryu supports fully 1.0, 1.2, 1.3, 1.4, 1.5 and Nicira Extensions. Ryu supports fully 1.0, 1.2, 1.3 and Nicira Extensions.
All of the code is freely available under the Apache 2.0 license. Ryu All of the code is freely available under the Apache 2.0 license. Ryu
is fully written in Python. is fully written in Python.
@ -25,46 +20,25 @@ Installing Ryu is quite easy::
If you prefer to install Ryu from the source code:: If you prefer to install Ryu from the source code::
% git clone https://github.com/faucetsdn/ryu.git % git clone git://github.com/osrg/ryu.git
% cd ryu; pip install . % cd ryu; python ./setup.py install
If you want to use Ryu with `OpenStack <http://openstack.org/>`_,
please refer `detailed documents <http://ryu.readthedocs.org/en/latest/using_with_openstack.html>`_.
You can create tens of thousands of isolated virtual networks without
using VLAN. The Ryu application is included in OpenStack mainline as
of Essex release.
If you want to write your Ryu application, have a look at If you want to write your Ryu application, have a look at
`Writing ryu application <http://ryu.readthedocs.io/en/latest/writing_ryu_app.html>`_ document. `Writing ryu application <http://ryu.readthedocs.org/en/latest/writing_ryu_app.html>`_ document.
After writing your application, just type:: After writing your application, just type::
% ryu-manager yourapp.py % ryu-manager yourapp.py
Optional Requirements
=====================
Some functions of ryu require extra packages:
- OF-Config requires lxml and ncclient
- NETCONF requires paramiko
- BGP speaker (SSH console) requires paramiko
- Zebra protocol service (database) requires SQLAlchemy
If you want to use these functions, please install the requirements::
% pip install -r tools/optional-requires
Please refer to tools/optional-requires for details.
Prerequisites
=============
If you got some error messages at the installation stage, please confirm
dependencies for building the required Python packages.
On Ubuntu(16.04 LTS or later)::
% apt install gcc python-dev libffi-dev libssl-dev libxml2-dev libxslt1-dev zlib1g-dev
Support Support
======= =======
Ryu Official site is `<https://ryu-sdn.org/>`_. Ryu Official site is `<http://osrg.github.io/ryu/>`_.
If you have any If you have any
questions, suggestions, and patches, the mailing list is available at questions, suggestions, and patches, the mailing list is available at

View File

@ -5,59 +5,46 @@ How to Get Your Change Into Ryu
Submitting a change Submitting a change
=================== ===================
To send patches to ryu, please make a Send patches to ryu-devel@lists.sourceforge.net. Please don't use 'pull
`pull request <https://github.com/faucetsdn/ryu>`_ on GitHub. request' on github. We expect you to send a patch in Linux kernel
development style. If you are not familiar with it, please read the
following document:
Please check your changes with autopep8, pycodestyle(pep8) and running http://lxr.linux.no/source/Documentation/SubmittingPatches
unit tests to make sure that they don't break the existing features.
The following command does all for you.
.. code-block:: bash Please check your changes with pep8 and run unittests to make sure
that they don't break the existing features. The following command
does both for you:
# Install dependencies of tests fujita@rose:~/git/ryu$ ./run_tests.sh
$ pip install -r tools/test-requires
# Execute autopep8
# Also, it is convenient to add settings of your editor or IDE for
# applying autopep8 automatically.
$ autopep8 --recursive --in-place ryu/
# Execute unit tests and pycodestyle(pep8)
$ ./run_tests.sh
Of course, you are encouraged to add unittests when you add new Of course, you are encouraged to add unittests when you add new
features (it's not a must though). features (it's not a must though).
Python version and libraries Python version and libraries
============================ ============================
* Python 3.5, 3.6, 3.7, 3.8, 3.9: * Python 2.6+
As RHEL 6 adopted python 2.6, features only for 2.7+ should be avoided.
Ryu supports multiple Python versions. CI tests on GitHub Actions is running * standard library + widely used library
on these versions. Basically widely used == OpenStack adopted
As usual there are exceptions. gevents. Or python binding library for other
* standard library + widely used library:
Basically widely used == OpenStack adopted.
As usual there are exceptions. Or python binding library for other
component. component.
Coding style guide Coding style guide
================== ==================
* pep8: * pep8
As python is used, PEP8 is would be hopefully mandatory for As python is used, PEP8 is would be hopefully mandatory for
https://www.python.org/dev/peps/pep-0008/ http://www.python.org/dev/peps/pep-0008/
* pylint:
* pylint
Although pylint is useful for finding bugs, but pylint score not very Although pylint is useful for finding bugs, but pylint score not very
important for now because we're still at early development stage. important for now because we're still at early development stage.
https://www.pylint.org/
* Google python style guide is very helpful: * Google python style guide is very helpful
http://google.github.io/styleguide/pyguide.html http://google-styleguide.googlecode.com/svn/trunk/pyguide.html
* Guidelines derived from Guido's Recommendations: Guidelines derived from Guido's Recommendations
============================= ================= ======== ============================= ================= ========
Type Public Internal Type Public Internal
@ -75,16 +62,9 @@ Coding style guide
Local Variables lower_with_under Local Variables lower_with_under
============================= ================= ======== ============================= ================= ========
* OpenStack Nova style guide: * OpenStack Nova style guide
https://github.com/openstack/nova/blob/master/HACKING.rst https://github.com/openstack/nova/blob/master/HACKING.rst
* JSON files:
Ryu source tree has JSON files under ryu/tests/unit/ofproto/json.
They are used by unit tests. To make patches easier to read,
they are normalized using tools/normalize_json.py. Please re-run
the script before committing changes to these JSON files.
Reference Reference
========= =========
* Python Essential Reference, 4th Edition [Amazon] * Python Essential Reference, 4th Edition [Amazon]

5
debian/changelog vendored
View File

@ -1,5 +0,0 @@
ryu (3.10-1) trusty; urgency=low
* Initial release.
-- Ryu Project Team <ryu-devel@lists.sourceforge.net> Wed, 18 Jun 2014 14:50:23 +0900

3
debian/clean vendored
View File

@ -1,3 +0,0 @@
ryu.egg-info/*
debian/ryu-manager.8
debian/ryu.8

1
debian/compat vendored
View File

@ -1 +0,0 @@
9

82
debian/control vendored
View File

@ -1,82 +0,0 @@
Source: ryu
Section: net
Priority: optional
Maintainer: Ryu Project Team <ryu-devel@lists.sourceforge.net>
Build-Depends: debhelper (>= 9.0.0), python-all (>= 2.6), python-sphinx
Build-Depends-Indep:
python-eventlet,
python-lxml,
python-msgpack (>= 0.4.0),
python-netaddr,
python-oslo.config (>= 1:1.2.0),
python-paramiko,
python-routes,
python-six (>= 1.4.0),
python-webob (>=1.2),
python-setuptools,
python-pip,
python-pbr
Standards-Version: 3.9.5
Homepage: https://ryu-sdn.org
Vcs-Git: git://github.com/faucetsdn/ryu.git
Vcs-Browser: https://github.com/faucetsdn/ryu
XS-Python-Version: >= 2.6
Package: python-ryu
Architecture: all
Section: python
Depends:
python-eventlet,
python-lxml,
python-msgpack (>= 0.4.0),
python-netaddr,
python-oslo.config (>= 1:1.2.0),
python-paramiko,
python-routes,
python-six (>= 1.4.0),
python-webob (>=1.2),
${misc:Depends},
${python:Depends}
Suggests: python-ryu-doc
Provides: ${python:Provides}
XB-Python-Version: ${python:Versions}
Description: Ryu is a software defined networking framework
Ryu is a component-based software defined networking framework.
Ryu provides software components with well defined API that make
it easy for developers to create new network management and control
applications. Ryu supports various protocols for managing network
devices, such as OpenFlow, Netconf, OF-config, etc. About OpenFlow,
Ryu supports fully 1.0, 1.2, 1.3, 1.4 and Nicira Extensions.
.
This package provides the Python library.
Package: ryu-bin
Architecture: all
Depends:
python-ryu,
${misc:Depends},
${python:Depends},
${shlibs:Depends}
Description: Ryu is a software defined networking framework
Ryu is a component-based software defined networking framework.
Ryu provides software components with well defined API that make
it easy for developers to create new network management and control
applications. Ryu supports various protocols for managing network
devices, such as OpenFlow, Netconf, OF-config, etc. About OpenFlow,
Ryu supports fully 1.0, 1.2, 1.3, 1.4 and Nicira Extensions.
.
This package provides the Ryu manager.
Package: python-ryu-doc
Architecture: all
Section: doc
Description: Ryu is a software defined networking framework
Ryu is a component-based software defined networking framework.
Ryu provides software components with well defined API that make
it easy for developers to create new network management and control
applications. Ryu supports various protocols for managing network
devices, such as OpenFlow, Netconf, OF-config, etc. About OpenFlow,
Ryu supports fully 1.0, 1.2, 1.3, 1.4 and Nicira Extensions.
.
This package provides the HTML documentation including the Ryu API
manual.

62
debian/copyright vendored
View File

@ -1,62 +0,0 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: ryu
Source: http://github.com/faucetsdn/ryu
Files: *
Copyright: 2014 Ryu Project Team <ryu-devel@lists.sourceforge.net>
License: Apache-2.0
Files: ryu/contrib/_eventlet/*
Copyright: 2005-2006, Bob Ippolito
2007-2010, Linden Research, Inc.
2008-2010, Eventlet Contributors (see AUTHORS)
License: MIT
Files: ryu/contrib/ncclient/*
Copyright: Shikhar Bhushan <shikhar@schmizz.net>
Leonidas Poulopoulos <leopoul@noc.grnet.gr>
Ebben Aries <earies@juniper.net>
License: Apache-2.0
Files: ryu/contrib/tinyrpc/*
Copyright: 2013 Marc Brinkmann
License: MIT
Files: ryu/contrib/ovs/*
Copyright: 2009, 2010, 2011, 2012, 2013 Nicira, Inc.
License: Apache-2.0
License: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
.
http://www.apache.org/licenses/LICENSE-2.0
.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
.
On Debian-based systems, the full text of the Apache version 2.0 license
can be found in "/usr/share/common-licenses/Apache-2.0".
License: MIT
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

1
debian/docs vendored
View File

@ -1 +0,0 @@
README.rst

21
debian/log.conf vendored
View File

@ -1,21 +0,0 @@
[loggers]
keys = root
[handlers]
keys = file
[formatters]
keys = simple
[logger_root]
level = INFO
handlers = file
[handler_file]
class = handlers.WatchedFileHandler
formatter = simple
args = ('/var/log/ryu/ryu.log',)
[formatter_simple]
format = %(asctime)s.%(msecs)03d %(levelname)s %(name)s %(message)s
datefmt = %Y-%m-%d %H:%M:%S

View File

@ -1,9 +0,0 @@
Document: python-ryu-doc
Title: Ryu User Documentation
Author: Ryu Project Team
Abstract: Ryu is a component-based software defined networking framework.
Section: Programming/Python
Format: HTML
Index: /usr/share/doc/python-ryu-doc/html/index.html
Files: /usr/share/doc/python-ryu-doc/html/*.html

View File

@ -1,2 +0,0 @@
README.rst
debian/html

View File

@ -1 +0,0 @@
usr/lib/python*/dist-packages/*

35
debian/rules vendored
View File

@ -1,35 +0,0 @@
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# This has to be exported to make some magic below work.
export DH_OPTIONS
%:
dh $@ --with python2
override_dh_installman:
cd doc; \
make man; \
cp build/man/* ../debian/
dh_installman
override_dh_auto_build:
dh_auto_build
mkdir -p debian/html
cd doc; \
make html; \
cp -r build/html/* ../debian/html/
override_dh_installinit:
dh_installinit --no-start --name=ryu
override_dh_installlogrotate:
dh_installlogrotate --name=ryu
override_dh_auto_clean:
rm -rf html
dh_auto_clean

1
debian/ryu-bin.dirs vendored
View File

@ -1 +0,0 @@
/var/log/ryu

View File

@ -1,4 +0,0 @@
usr/bin/ryu-manager usr/bin
usr/bin/ryu usr/bin
debian/ryu.conf etc/ryu
debian/log.conf etc/ryu

View File

@ -1,2 +0,0 @@
debian/ryu-manager.8
debian/ryu.8

View File

@ -1,2 +0,0 @@
update-rc.d -f ryu remove >/dev/null || exit $?
#DEBHELPER#

View File

@ -1,7 +0,0 @@
/var/log/ryu/ryu.log {
daily
missingok
compress
delaycompress
notifempty
}

View File

@ -1,9 +0,0 @@
description "Ryu server"
start on (starting neutron-server or runlevel [2345])
stop on runlevel [!2345]
respawn
exec start-stop-daemon --start --exec /usr/bin/ryu -- \
run --config-file /etc/ryu/ryu.conf

36
debian/ryu.conf vendored
View File

@ -1,36 +0,0 @@
[DEFAULT]
log_config_file=/etc/ryu/log.conf
# app_lists = $RYU_APPS
#
# for OpenStack Neutron Ryu plugin:
# mac address based isolation
#app_lists = ryu.app.simple_isolation,ryu.app.rest
# VLAN
#app_lists=ryu.app.quantum_adapter,ryu.app.rest,ryu.app.rest_conf_switch,ryu.app.rest_quantum,ryu.app.rest_tunnel,ryu.app.simple_vlan
# GRE tunneling
#app_lists=ryu.app.gre_tunnel,ryu.app.quantum_adapter,ryu.app.rest,ryu.app.rest_conf_switch,ryu.app.rest_quantum,ryu.app.rest_tunnel,ryu.app.tunnel_port_updater
#
# wsapi_host=<hostip>
# wsapi_port=<port:8080>
# ofp_listen_host=<hostip>
# ofp_tcp_listen_port=<port:6633>
#wsapi_host = 0.0.0.0
#wsapi_port = 8080
#ofp_listen_host = 0.0.0.0
#ofp_tcp_listen_port = 6633
#
# the followings must be set according to neutron settings
# neutron_url = http://$Q_HOST:$Q_PORT
# neutron_admin_username = $Q_ADMIN_USERNAME
# neutron_admin_password = $SERVICE_PASSWORD
# neutron_admin_tenant_name = $SERVICE_TENANT_NAME
# neutron_admin_auth_url=$KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:$KEYSTONE_AUTH_PORT/v2.0
# neutron_auth_strategy = $Q_AUTH_STRATEGY
# neutron_controller_addr = tcp:$RYU_OFP_HOST:$RYU_OFP_PORT
#neutron_url = http://192.168.0.1:9696
#neutron_admin_username = admin
#neutron_admin_password = password
#neutron_admin_tenant_name = service
#neutron_admin_auth_url = http://192.168.0.1:5000/v2.0
#neutron_auth_strategy = keystone
#neutron_controller_addr = tcp:192.168.0.1:6633

View File

@ -1 +0,0 @@
3.0 (quilt)

View File

@ -1,15 +0,0 @@
.. _api_ref:
*******************************
Ryu API Reference
*******************************
.. XXX list all members explicitly to workaround a sphinx bug
.. XXX https://bitbucket.org/birkenfeld/sphinx/issue/1362
.. py:currentmodule:: ryu.base.app_manager
.. autoclass:: ryu.base.app_manager.RyuApp
:members: OFP_VERSIONS,_CONTEXTS,_EVENTS,close,context_iteritems,reply_to_request,send_event,send_event_to_observers,send_request,start
.. autoclass:: ryu.controller.dpset.DPSet
:members:

View File

@ -1,15 +0,0 @@
*************************
Built-in Ryu applications
*************************
Ryu has some built-in Ryu applications.
Some of them are examples.
Others provide some functionalities to other Ryu applications.
.. toctree::
:maxdepth: 1
app/ofctl.rst
app/ofctl_rest.rst
app/rest_vtep.rst
app/bgp_application.rst

View File

@ -1,6 +0,0 @@
**************************************
ryu.services.protocols.bgp.application
**************************************
.. automodule:: ryu.services.protocols.bgp.application
:members:

View File

@ -1,30 +0,0 @@
*************
ryu.app.ofctl
*************
ryu.app.ofctl provides a convenient way to use OpenFlow messages
synchronously.
OfctlService ryu application is automatically loaded if your
Ryu application imports ofctl.api module.
Example::
import ryu.app.ofctl.api
OfctlService application internally uses OpenFlow barrier messages
to ensure message boundaries. As OpenFlow messages are asynchronous
and some of messages does not have any replies on success, barriers
are necessary for correct error handling.
api module
==========
.. automodule:: ryu.app.ofctl.api
:members:
exceptions
==========
.. automodule:: ryu.app.ofctl.exception
:members:

File diff suppressed because it is too large Load Diff

View File

@ -1,12 +0,0 @@
*****************
ryu.app.rest_vtep
*****************
.. automodule:: ryu.app.rest_vtep
REST API
========
.. autoclass:: ryu.app.rest_vtep.RestVtepController
:members:
:member-order: bysource

View File

@ -1,144 +0,0 @@
*****************
Components of Ryu
*****************
Executables
===========
bin/ryu-manager
---------------
The main executable.
Base components
===============
ryu.base.app_manager
--------------------
.. automodule:: ryu.base.app_manager
OpenFlow controller
===================
ryu.controller.controller
-------------------------
.. automodule:: ryu.controller.controller
ryu.controller.dpset
--------------------
.. automodule:: ryu.controller.dpset
ryu.controller.ofp_event
------------------------
.. automodule:: ryu.controller.ofp_event
ryu.controller.ofp_handler
--------------------------
.. automodule:: ryu.controller.ofp_handler
OpenFlow wire protocol encoder and decoder
==========================================
ryu.ofproto.ofproto_v1_0
------------------------
.. automodule:: ryu.ofproto.ofproto_v1_0
ryu.ofproto.ofproto_v1_0_parser
-------------------------------
.. automodule:: ryu.ofproto.ofproto_v1_0_parser
ryu.ofproto.ofproto_v1_2
------------------------
.. automodule:: ryu.ofproto.ofproto_v1_2
ryu.ofproto.ofproto_v1_2_parser
-------------------------------
.. automodule:: ryu.ofproto.ofproto_v1_2_parser
ryu.ofproto.ofproto_v1_3
------------------------
.. automodule:: ryu.ofproto.ofproto_v1_3
ryu.ofproto.ofproto_v1_3_parser
-------------------------------
.. automodule:: ryu.ofproto.ofproto_v1_3_parser
ryu.ofproto.ofproto_v1_4
------------------------
.. automodule:: ryu.ofproto.ofproto_v1_4
ryu.ofproto.ofproto_v1_4_parser
-------------------------------
.. automodule:: ryu.ofproto.ofproto_v1_4_parser
ryu.ofproto.ofproto_v1_5
------------------------
.. automodule:: ryu.ofproto.ofproto_v1_5
ryu.ofproto.ofproto_v1_5_parser
-------------------------------
.. automodule:: ryu.ofproto.ofproto_v1_5_parser
Ryu applications
================
ryu.app.cbench
--------------
.. automodule:: ryu.app.cbench
ryu.app.simple_switch
---------------------
.. automodule:: ryu.app.simple_switch
ryu.topology
------------
.. automodule:: ryu.topology
Libraries
=========
ryu.lib.packet
--------------
.. automodule:: ryu.lib.packet
ryu.lib.ovs
-----------
.. automodule:: ryu.lib.ovs
ryu.lib.of_config
-----------------
.. automodule:: ryu.lib.of_config
ryu.lib.netconf
---------------
.. automodule:: ryu.lib.netconf
ryu.lib.xflow
-------------
.. automodule:: ryu.lib.xflow
Third party libraries
=====================
ryu.contrib.ovs
---------------
Open vSwitch python binding. Used by ryu.lib.ovs.
ryu.contrib.oslo.config
-----------------------
Oslo configuration library. Used for ryu-manager's command-line options
and configuration files.
ryu.contrib.ncclient
--------------------
Python library for NETCONF client. Used by ryu.lib.of_config.

View File

@ -17,7 +17,6 @@ import sys, os
# add these directories to sys.path here. If the directory is relative to the # 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. # documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.abspath('../..')) sys.path.insert(0, os.path.abspath('../..'))
sys.path.insert(0, os.path.abspath('.'))
from ryu import version as ryu_version from ryu import version as ryu_version
@ -44,7 +43,7 @@ master_doc = 'index'
# General information about the project. # General information about the project.
project = u'Ryu' project = u'Ryu'
copyright = u'2011-2014 Nippon Telegraph and Telephone Corporation' copyright = u'2011-2013 Nippon Telegraph and Telephone Corporation'
# The version info for the project you're documenting, acts as replacement for # The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the # |version| and |release|, also used in various other places throughout the
@ -94,7 +93,7 @@ pygments_style = 'sphinx'
# The theme to use for HTML and HTML Help pages. See the documentation for # The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes. # a list of builtin themes.
html_theme = 'sphinx_rtd_theme' html_theme = 'haiku'
# Theme options are theme-specific and customize the look and feel of a theme # 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 # further. For a list of options available for each theme, see the
@ -132,7 +131,6 @@ html_static_path = ['_static']
# If true, SmartyPants will be used to convert quotes and dashes to # If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities. # typographically correct entities.
#html_use_smartypants = True #html_use_smartypants = True
# (Deprecated since version 1.6)
# Custom sidebar templates, maps document names to template names. # Custom sidebar templates, maps document names to template names.
#html_sidebars = {} #html_sidebars = {}
@ -216,9 +214,7 @@ latex_documents = [
# (source start file, name, description, authors, manual section). # (source start file, name, description, authors, manual section).
man_pages = [ man_pages = [
('index', 'ryu', u'ryu Documentation', ('index', 'ryu', u'ryu Documentation',
[u'Ryu development team'], 8), [u'ryu development team'], 1),
('man/ryu', 'ryu', u'management for Ryu application', ('man/ryu_manager', 'ryu-manager', u'ryu manager',
[u'Ryu development team'], 8), [u'ryu development team'], 1),
('man/ryu_manager', 'ryu-manager', 'management for Ryu application',
[u'Ryu development team'], 8),
] ]

View File

@ -6,5 +6,4 @@ Configuration
:maxdepth: 2 :maxdepth: 2
tls.rst tls.rst
gui.rst

View File

@ -6,9 +6,6 @@ Writing Your Ryu Application
:maxdepth: 2 :maxdepth: 2
writing_ryu_app.rst writing_ryu_app.rst
components.rst
ryu_app_api.rst ryu_app_api.rst
library.rst library.rst
ofproto_ref.rst ofproto_ref.rst
nicira_ext_ref.rst
api_ref.rst

View File

@ -1,2 +0,0 @@
[parsers]
smart_quotes: false

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

View File

@ -1,33 +0,0 @@
***************
Topology Viewer
***************
ryu.app.gui_topology.gui_topology provides topology visualization.
This depends on following ryu applications.
===================== =================================================
ryu.app.rest_topology Get node and link data.
ryu.app.ws_topology Being notified change of link up/down.
ryu.app.ofctl_rest Get flows of datapaths.
===================== =================================================
Usage
=====
Run mininet (or join your real environment)::
$ sudo mn --controller remote --topo tree,depth=3
Run GUI application::
$ PYTHONPATH=. ./bin/ryu run --observe-links ryu/app/gui_topology/gui_topology.py
Access http://<ip address of ryu host>:8080 with your web browser.
Screenshot
==========
.. image:: gui.png
:width: 640 px

View File

@ -15,9 +15,7 @@ Contents:
getting_started.rst getting_started.rst
developing.rst developing.rst
configuration.rst configuration.rst
tests.rst using_with_openstack.rst
snort_integrate.rst
app.rst
Indices and tables Indices and tables
================== ==================

View File

@ -9,10 +9,4 @@ Ryu provides some useful library for your network applications.
library_packet.rst library_packet.rst
library_packet_ref.rst library_packet_ref.rst
library_pcap.rst
library_of_config.rst library_of_config.rst
library_bgp_speaker.rst
library_bgp_speaker_ref.rst
library_mrt.rst
library_ovsdb_manager.rst
library_ovsdb.rst

View File

@ -1,61 +0,0 @@
*******************
BGP speaker library
*******************
Introduction
============
Ryu BGP speaker library helps you to enable your code to speak BGP
protocol. The library supports IPv4, IPv4 MPLS-labeled VPN, IPv6
MPLS-labeled VPN and L2VPN EVPN address families.
Example
=======
The following simple code creates a BGP instance with AS number 64512
and Router ID 10.0.0.1. It tries to establish a bgp session with a
peer (its IP is 192.168.177.32 and the AS number is 64513). The
instance advertizes some prefixes.
.. code-block:: python
import eventlet
# BGPSpeaker needs sockets patched
eventlet.monkey_patch()
# initialize a log handler
# this is not strictly necessary but useful if you get messages like:
# No handlers could be found for logger "ryu.lib.hub"
import logging
import sys
log = logging.getLogger()
log.addHandler(logging.StreamHandler(sys.stderr))
from ryu.services.protocols.bgp.bgpspeaker import BGPSpeaker
def dump_remote_best_path_change(event):
print 'the best path changed:', event.remote_as, event.prefix,\
event.nexthop, event.is_withdraw
def detect_peer_down(remote_ip, remote_as):
print 'Peer down:', remote_ip, remote_as
if __name__ == "__main__":
speaker = BGPSpeaker(as_number=64512, router_id='10.0.0.1',
best_path_change_handler=dump_remote_best_path_change,
peer_down_handler=detect_peer_down)
speaker.neighbor_add('192.168.177.32', 64513)
# uncomment the below line if the speaker needs to talk with a bmp server.
# speaker.bmp_server_add('192.168.177.2', 11019)
count = 1
while True:
eventlet.sleep(30)
prefix = '10.20.' + str(count) + '.0/24'
print "add a new prefix", prefix
speaker.prefix_add(prefix)
count += 1
if count == 4:
speaker.shutdown()
break

View File

@ -1,21 +0,0 @@
*********************************
BGP speaker library API Reference
*********************************
BGPSpeaker class
================
.. autoclass:: ryu.services.protocols.bgp.bgpspeaker.BGPSpeaker
:members:
.. autoclass:: ryu.services.protocols.bgp.bgpspeaker.EventPrefix
:members:
.. autoclass:: ryu.services.protocols.bgp.info_base.base.PrefixFilter
:members:
.. autoclass:: ryu.services.protocols.bgp.info_base.base.ASPathFilter
:members:
.. autoclass:: ryu.services.protocols.bgp.info_base.base.AttributeMap
:members:

View File

@ -1,28 +0,0 @@
****************
MRT file library
****************
Introduction
============
Ryu MRT file library helps you to read/write MRT
(Multi-Threaded Routing Toolkit) Routing Information Export Format
[`RFC6396`_].
.. _RFC6396: https://tools.ietf.org/html/rfc6396
Reading MRT file
================
For loading the routing information contained in MRT files, you can use
mrtlib.Reader.
.. autoclass:: ryu.lib.mrtlib.Reader
Writing MRT file
================
For dumping the routing information which your RyuApp generated, you can use
mrtlib.Writer.
.. autoclass:: ryu.lib.mrtlib.Writer

View File

@ -1,76 +0,0 @@
*************
OVSDB library
*************
Path: ``ryu.lib.ovs``
Similar to the :doc:`library_ovsdb_manager`, this library enables your
application to speak the OVSDB protocol (RFC7047_), but differ from the
:doc:`library_ovsdb_manager`, this library will initiate connections from
controller side as ovs-vsctl_ command does.
Please make sure that your devices are listening on either the Unix domain
socket or TCP/SSL port before calling the APIs of this library.
.. code-block:: bash
# Show current configuration
$ ovs-vsctl get-manager
# Set TCP listen address
$ ovs-vsctl set-manager "ptcp:6640"
See manpage of ovs-vsctl_ command for more details.
.. _RFC7047: https://tools.ietf.org/html/rfc7047
.. _ovs-vsctl: http://openvswitch.org/support/dist-docs/ovs-vsctl.8.txt
Basic Usage
===========
1. Instantiate :py:mod:`ryu.lib.ovs.vsctl.VSCtl`.
2. Construct commands with :py:mod:`ryu.lib.ovs.vsctl.VSCtlCommand`.
The syntax is almost the same as ovs-vsctl_ command.
3. Execute commands via :py:mod:`ryu.lib.ovs.vsctl.VSCtl.run_command`.
Example
-------
.. code-block:: python
from ryu.lib.ovs import vsctl
OVSDB_ADDR = 'tcp:127.0.0.1:6640'
ovs_vsctl = vsctl.VSCtl(OVSDB_ADDR)
# Equivalent to
# $ ovs-vsctl show
command = vsctl.VSCtlCommand('show')
ovs_vsctl.run_command([command])
print(command)
# >>> VSCtlCommand(args=[],command='show',options=[],result='830d781f-c3c8-4b4f-837e-106e1b33d058\n ovs_version: "2.8.90"\n')
# Equivalent to
# $ ovs-vsctl list Port s1-eth1
command = vsctl.VSCtlCommand('list', ('Port', 's1-eth1'))
ovs_vsctl.run_command([command])
print(command)
# >>> VSCtlCommand(args=('Port', 's1-eth1'),command='list',options=[],result=[<ovs.db.idl.Row object at 0x7f525fb682e8>])
print(command.result[0].name)
# >>> s1-eth1
API Reference
=============
ryu.lib.ovs.vsctl
-----------------
.. automodule:: ryu.lib.ovs.vsctl
:members:
ryu.lib.ovs.bridge
------------------
.. automodule:: ryu.lib.ovs.bridge
:members:

View File

@ -1,99 +0,0 @@
*********************
OVSDB Manager library
*********************
Path: ``ryu.services.protocols.ovsdb``
Introduction
============
Ryu OVSDB Manager library allows your code to interact with devices
speaking the OVSDB protocol. This enables your code to perform remote
management of the devices and react to topology changes on them.
Please note this library will spawn a server listening on the port 6640 (the
IANA registered for OVSDB protocol), but does not initiate connections from
controller side.
Then, to make your devices connect to Ryu, you need to tell the controller IP
address and port to your devices.
.. code-block:: bash
# Show current configuration
$ ovs-vsctl get-manager
# Set manager (controller) address
$ ovs-vsctl set-manager "tcp:127.0.0.1:6640"
# If you want to specify IPv6 address, wrap ip with brackets
$ ovs-vsctl set-manager "tcp:[::1]:6640"
Also this library identifies the devices by "system-id" which should be unique,
persistent identifier among all devices connecting to a single controller.
Please make sure "system-id" is configured before connecting.
.. code-block:: bash
# Show current configuration
$ ovs-vsctl get Open_vSwitch . external_ids:system-id
# Set system-id manually
$ ovs-vsctl set Open_vSwitch . external_ids:system-id=<SYSTEM-ID>
Example
=======
The following logs all new OVSDB connections in "handle_new_ovsdb_connection"
and also provides the API "create_port" for creating a port on a bridge.
.. code-block:: python
import uuid
from ryu.base import app_manager
from ryu.controller.handler import set_ev_cls
from ryu.services.protocols.ovsdb import api as ovsdb
from ryu.services.protocols.ovsdb import event as ovsdb_event
class MyApp(app_manager.RyuApp):
@set_ev_cls(ovsdb_event.EventNewOVSDBConnection)
def handle_new_ovsdb_connection(self, ev):
system_id = ev.system_id
address = ev.client.address
self.logger.info(
'New OVSDB connection from system-id=%s, address=%s',
system_id, address)
# Example: If device has bridge "s1", add port "s1-eth99"
if ovsdb.bridge_exists(self, system_id, "s1"):
self.create_port(system_id, "s1", "s1-eth99")
def create_port(self, system_id, bridge_name, name):
new_iface_uuid = uuid.uuid4()
new_port_uuid = uuid.uuid4()
bridge = ovsdb.row_by_name(self, system_id, bridge_name)
def _create_port(tables, insert):
iface = insert(tables['Interface'], new_iface_uuid)
iface.name = name
iface.type = 'internal'
port = insert(tables['Port'], new_port_uuid)
port.name = name
port.interfaces = [iface]
bridge.ports = bridge.ports + [port]
return new_port_uuid, new_iface_uuid
req = ovsdb_event.EventModifyRequest(system_id, _create_port)
rep = self.send_request(req)
if rep.status != 'success':
self.logger.error('Error creating port %s on bridge %s: %s',
name, bridge, rep.status)
return None
return rep.insert_uuids[new_port_uuid]

View File

@ -86,17 +86,11 @@ is building an arp packet.
.. code-block:: python .. code-block:: python
from ryu.ofproto import ether e = ethernet.ethernet(dst, src, ether.ETH_TYPE_8021Q)
from ryu.lib.packet import ethernet, arp, packet
e = ethernet.ethernet(dst='ff:ff:ff:ff:ff:ff',
src='08:60:6e:7f:74:e7',
ethertype=ether.ETH_TYPE_ARP)
a = arp.arp(hwtype=1, proto=0x0800, hlen=6, plen=4, opcode=2, a = arp.arp(hwtype=1, proto=0x0800, hlen=6, plen=4, opcode=2,
src_mac='08:60:6e:7f:74:e7', src_ip='192.0.2.1', src='08:60:6e:7f:74:e7', src_ip='192.0.2.1',
dst_mac='00:00:00:00:00:00', dst_ip='192.0.2.2') dst='00:00:00:00:00:00', dst_ip='192.0.2.2')
p = packet.Packet() p = packet.Packet()
p.add_protocol(e) p.add_protocol(e)
p.add_protocol(a) p.add_protocol(a)
p.serialize() p.serialize()
print repr(p.data) # the on-wire packet

View File

@ -14,15 +14,92 @@ Stream Parser class
.. automodule:: ryu.lib.packet.stream_parser .. automodule:: ryu.lib.packet.stream_parser
:members: :members:
List of the sub-classes: .. autoclass:: ryu.lib.packet.bgp.StreamParser
:members:
- :py:mod:`ryu.lib.packet.bgp.StreamParser`
Protocol Header classes Protocol Header classes
======================= =======================
.. toctree:: .. automodule:: ryu.lib.packet.packet_base
:glob: :members:
library_packet_ref/packet_base .. automodule:: ryu.lib.packet.ethernet
library_packet_ref/* :members:
.. automodule:: ryu.lib.packet.vlan
:members:
.. automodule:: ryu.lib.packet.mpls
:members:
.. automodule:: ryu.lib.packet.arp
:members:
.. automodule:: ryu.lib.packet.ipv4
:members:
.. automodule:: ryu.lib.packet.icmp
:members:
.. automodule:: ryu.lib.packet.ipv6
:members:
.. automodule:: ryu.lib.packet.icmpv6
:members:
.. automodule:: ryu.lib.packet.tcp
:members:
.. automodule:: ryu.lib.packet.udp
:members:
.. autoclass:: ryu.lib.packet.dhcp.dhcp
:members:
.. autoclass:: ryu.lib.packet.dhcp.options
:members:
.. autoclass:: ryu.lib.packet.dhcp.option
:members:
.. autoclass:: ryu.lib.packet.vrrp.vrrp
:members:
.. autoclass:: ryu.lib.packet.vrrp.vrrpv2
:members:
.. autoclass:: ryu.lib.packet.vrrp.vrrpv3
:members:
.. autoclass:: ryu.lib.packet.slow.slow
:members:
.. autoclass:: ryu.lib.packet.slow.lacp
:members:
.. autoclass:: ryu.lib.packet.llc.llc
:members:
.. autoclass:: ryu.lib.packet.llc.ControlFormatI
:members:
.. autoclass:: ryu.lib.packet.llc.ControlFormatS
:members:
.. autoclass:: ryu.lib.packet.llc.ControlFormatU
:members:
.. autoclass:: ryu.lib.packet.bpdu.bpdu
:members:
.. autoclass:: ryu.lib.packet.bpdu.ConfigurationBPDUs
:members:
.. autoclass:: ryu.lib.packet.bpdu.TopologyChangeNotificationBPDUs
:members:
.. autoclass:: ryu.lib.packet.bpdu.RstBPDUs
:members:
.. autoclass:: ryu.lib.packet.igmp.igmp
:members:
.. autoclass:: ryu.lib.packet.bgp.BGPMessage
:members:
.. autoclass:: ryu.lib.packet.bgp.BGPOpen
:members:
.. autoclass:: ryu.lib.packet.bgp.BGPUpdate
:members:
.. autoclass:: ryu.lib.packet.bgp.BGPKeepAlive
:members:
.. autoclass:: ryu.lib.packet.bgp.BGPNotification
:members:

View File

@ -1,6 +0,0 @@
***
ARP
***
.. automodule:: ryu.lib.packet.arp
:members:

View File

@ -1,6 +0,0 @@
*****************
Packet Base Class
*****************
.. automodule:: ryu.lib.packet.packet_base
:members:

View File

@ -1,6 +0,0 @@
***
BFD
***
.. automodule:: ryu.lib.packet.bfd
:members:

View File

@ -1,6 +0,0 @@
***
BGP
***
.. automodule:: ryu.lib.packet.bgp
:members:

View File

@ -1,6 +0,0 @@
***
BMP
***
.. automodule:: ryu.lib.packet.bmp
:members:

View File

@ -1,6 +0,0 @@
****
BPDU
****
.. automodule:: ryu.lib.packet.bpdu
:members:

View File

@ -1,6 +0,0 @@
***
CFM
***
.. automodule:: ryu.lib.packet.cfm
:members:

View File

@ -1,6 +0,0 @@
****
DHCP
****
.. automodule:: ryu.lib.packet.dhcp
:members:

View File

@ -1,6 +0,0 @@
*****
DHCP6
*****
.. automodule:: ryu.lib.packet.dhcp6
:members:

View File

@ -1,6 +0,0 @@
********
Ethernet
********
.. automodule:: ryu.lib.packet.ethernet
:members:

View File

@ -1,6 +0,0 @@
******
Geneve
******
.. automodule:: ryu.lib.packet.geneve
:members:

View File

@ -1,6 +0,0 @@
***
GRE
***
.. automodule:: ryu.lib.packet.gre
:members:

View File

@ -1,6 +0,0 @@
****
ICMP
****
.. automodule:: ryu.lib.packet.icmp
:members:

View File

@ -1,6 +0,0 @@
******
ICMPv6
******
.. automodule:: ryu.lib.packet.icmpv6
:members:

View File

@ -1,6 +0,0 @@
****
IGMP
****
.. automodule:: ryu.lib.packet.igmp
:members:

View File

@ -1,6 +0,0 @@
****
IPv4
****
.. automodule:: ryu.lib.packet.ipv4
:members:

View File

@ -1,6 +0,0 @@
****
IPv6
****
.. automodule:: ryu.lib.packet.ipv6
:members:

View File

@ -1,6 +0,0 @@
***
LLC
***
.. automodule:: ryu.lib.packet.llc
:members:

View File

@ -1,6 +0,0 @@
****
LLDP
****
.. automodule:: ryu.lib.packet.lldp
:members:

View File

@ -1,6 +0,0 @@
****
MPLS
****
.. automodule:: ryu.lib.packet.mpls
:members:

View File

@ -1,6 +0,0 @@
********
OpenFlow
********
.. automodule:: ryu.lib.packet.openflow
:members:

View File

@ -1,6 +0,0 @@
****
OSPF
****
.. automodule:: ryu.lib.packet.ospf
:members:

View File

@ -1,6 +0,0 @@
***
PBB
***
.. automodule:: ryu.lib.packet.pbb
:members:

View File

@ -1,6 +0,0 @@
****
SCTP
****
.. automodule:: ryu.lib.packet.sctp
:members:

View File

@ -1,6 +0,0 @@
****
Slow
****
.. automodule:: ryu.lib.packet.slow
:members:

View File

@ -1,6 +0,0 @@
***
TCP
***
.. automodule:: ryu.lib.packet.tcp
:members:

View File

@ -1,6 +0,0 @@
***
UDP
***
.. automodule:: ryu.lib.packet.udp
:members:

View File

@ -1,6 +0,0 @@
****
VLAN
****
.. automodule:: ryu.lib.packet.vlan
:members:

View File

@ -1,6 +0,0 @@
****
VRRP
****
.. automodule:: ryu.lib.packet.vrrp
:members:

View File

@ -1,6 +0,0 @@
*****
VXLAN
*****
.. automodule:: ryu.lib.packet.vxlan
:members:

View File

@ -1,6 +0,0 @@
*****
Zebra
*****
.. automodule:: ryu.lib.packet.zebra
:members:

View File

@ -1,27 +0,0 @@
*****************
PCAP file library
*****************
Introduction
============
Ryu PCAP file library helps you to read/write PCAP file which file
format are described in `The Wireshark Wiki`_.
.. _The Wireshark Wiki: https://wiki.wireshark.org/Development/LibpcapFileFormat
Reading PCAP file
=================
For loading the packet data containing in PCAP files, you can use
pcaplib.Reader.
.. autoclass:: ryu.lib.pcaplib.Reader
Writing PCAP file
=================
For dumping the packet data which your RyuApp received, you can use
pcaplib.Writer.
.. autoclass:: ryu.lib.pcaplib.Writer

View File

@ -1,48 +0,0 @@
:orphan:
ryu manual page
===============
Synopsis
--------
**ryu** [-h] [--config-dir DIR] [--config-file PATH] [--version] [subcommand] ...
Description
-----------
:program:`ryu` is the executable for Ryu applications. ryu loads a sub-module
corresponding to the sub-command and run it. 'run' sub-command is an
equivalent to ryu-manager.
Ryu is a component-based software defined networking framework. Ryu
provides software components with well defined API that make it easy for
developers to create new network management and control applications.
Ryu supports various protocols for managing network devices, such as
OpenFlow, Netconf, OF-config, etc. About OpenFlow, Ryu supports fully
1.0, 1.2, 1.3, 1.4 and Nicira Extensions.
Options
-------
subcommand
[rpc-cli|run|of-config-cli]
subcommand_args
subcommand specific arguments
-h, --help
show this help message and exit
--config-dir DIR
Path to a config directory to pull \*.conf files from.
This file set is sorted, so as to provide a predictable
parse order if individual options are over-ridden. The
set is parsed after the file(s) specified via previous
--config-file, arguments hence over-ridden options in
the directory take precedence.
--config-file PATH
Path to a config file to use. Multiple config files can
be specified, with values in later files taking
precedence. The default files used are: None
--version
show program's version number and exit

View File

@ -3,182 +3,22 @@
ryu-manager manual page ryu-manager manual page
======================= =======================
Synoposis
Synopsis ---------
-------- **ryu-manager** [*options*] <ryu apps>[, <ryu apps> ...]
**ryu-manager** [-h]
[--app-lists APP_LISTS] [--ca-certs CA_CERTS]
[--config-dir DIR] [--config-file PATH]
[--ctl-cert CTL_CERT] [--ctl-privkey CTL_PRIVKEY]
[--default-log-level DEFAULT_LOG_LEVEL] [--explicit-drop]
[--install-lldp-flow] [--log-config-file LOG_CONFIG_FILE]
[--log-dir LOG_DIR] [--log-file LOG_FILE]
[--log-file-mode LOG_FILE_MODE]
[--neutron-admin-auth-url NEUTRON_ADMIN_AUTH_URL]
[--neutron-admin-password NEUTRON_ADMIN_PASSWORD]
[--neutron-admin-tenant-name NEUTRON_ADMIN_TENANT_NAME]
[--neutron-admin-username NEUTRON_ADMIN_USERNAME]
[--neutron-auth-strategy NEUTRON_AUTH_STRATEGY]
[--neutron-controller-addr NEUTRON_CONTROLLER_ADDR]
[--neutron-url NEUTRON_URL]
[--neutron-url-timeout NEUTRON_URL_TIMEOUT]
[--noexplicit-drop] [--noinstall-lldp-flow]
[--noobserve-links] [--nouse-stderr] [--nouse-syslog]
[--noverbose] [--observe-links]
[--ofp-listen-host OFP_LISTEN_HOST]
[--ofp-ssl-listen-port OFP_SSL_LISTEN_PORT]
[--ofp-tcp-listen-port OFP_TCP_LISTEN_PORT] [--use-stderr]
[--use-syslog] [--verbose] [--version]
[--wsapi-host WSAPI_HOST] [--wsapi-port WSAPI_PORT]
[--test-switch-dir TEST-SWITCH_DIR]
[--test-switch-target TEST-SWITCH_TARGET]
[--test-switch-tester TEST-SWITCH_TESTER]
[app [app ...]]
Description Description
----------- -----------
:program:`ryu-manager` is the executable for Ryu applications. ryu-manager :program:`ryu-manger` is an Operating System for Software Defined Networking
loads Ryu applications and run it.
Ryu is a component-based software defined networking framework. Ryu
provides software components with well defined API that make it easy for
developers to create new network management and control applications.
Ryu supports various protocols for managing network devices, such as
OpenFlow, Netconf, OF-config, etc. About OpenFlow, Ryu supports fully
1.0, 1.2, 1.3, 1.4 and Nicira Extensions.
Options Options
------- -------
app
application module name to run
-h, --help -h, --help
show this help message and exit
--app-lists APP_LISTS See also
application module name to run --------
:manpage:`ryu-client(1)`
--ca-certs CA_CERTS Author
CA certificates ------
Ryu development team
--config-dir DIR
Path to a config directory to pull \*.conf files from.
This file set is sorted, so as to provide a
predictable parse order if individual options are
over-ridden. The set is parsed after the file(s)
specified via previous --config-file, arguments hence
over-ridden options in the directory take precedence.
--config-file PATH
Path to a config file to use. Multiple config files
can be specified, with values in later files taking
precedence. The default files used are: None
--ctl-cert CTL_CERT
controller certificate
--ctl-privkey CTL_PRIVKEY
controller private key
--default-log-level DEFAULT_LOG_LEVEL
default log level
--explicit-drop
link discovery: explicitly drop lldp packet in
--install-lldp-flow
link discovery: explicitly install flow entry to send
lldp packet to controller
--log-config-file LOG_CONFIG_FILE
Path to a logging config file to use
--log-dir LOG_DIR
log file directory
--log-file LOG_FILE
log file name
--log-file-mode LOG_FILE_MODE
default log file permission
--neutron-admin-auth-url NEUTRON_ADMIN_AUTH_URL
auth url for connecting to neutron in admin context
--neutron-admin-password NEUTRON_ADMIN_PASSWORD
password for connecting to neutron in admin context
--neutron-admin-tenant-name NEUTRON_ADMIN_TENANT_NAME
tenant name for connecting to neutron in admin context
--neutron-admin-username NEUTRON_ADMIN_USERNAME
username for connecting to neutron in admin context
--neutron-auth-strategy NEUTRON_AUTH_STRATEGY
auth strategy for connecting to neutron in admincontext
--neutron-controller-addr NEUTRON_CONTROLLER_ADDR
openflow method:address:port to set controller ofovs bridge
--neutron-url NEUTRON_URL
URL for connecting to neutron
--neutron-url-timeout NEUTRON_URL_TIMEOUT
timeout value for connecting to neutron in seconds
--noexplicit-drop
The inverse of --explicit-drop
--noinstall-lldp-flow
The inverse of --install-lldp-flow
--noobserve-links
The inverse of --observe-links
--nouse-stderr
The inverse of --use-stderr
--nouse-syslog
The inverse of --use-syslog
--noverbose
The inverse of --verbose
--observe-links
observe link discovery events.
--ofp-listen-host OFP_LISTEN_HOST
openflow listen host
--ofp-ssl-listen-port OFP_SSL_LISTEN_PORT
openflow ssl listen port
--ofp-tcp-listen-port OFP_TCP_LISTEN_PORT
openflow tcp listen port
--use-stderr
log to standard error
--use-syslog
output to syslog
--verbose
show debug output
--version
show program's version number and exit
--wsapi-host WSAPI_HOST
webapp listen host
--wsapi-port WSAPI_PORT
webapp listen port
--test-switch-dir TEST-SWITCH_DIR
test files directory
--test-switch-target TEST-SWITCH_TARGET
target sw dp-id
--test-switch-tester TEST-SWITCH_TESTER
tester sw dp-id

View File

@ -1,69 +0,0 @@
***************************
Nicira Extension Structures
***************************
.. _nx_actions_structures:
Nicira Extension Actions Structures
===================================
The followings shows the supported NXAction classes only in OpenFlow1.0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. py:currentmodule:: ryu.ofproto.ofproto_v1_0_parser
.. autoclass:: NXActionSetQueue
.. autoclass:: NXActionDecTtl
.. autoclass:: NXActionPushMpls
.. autoclass:: NXActionPopMpls
.. autoclass:: NXActionSetMplsTtl
.. autoclass:: NXActionDecMplsTtl
.. autoclass:: NXActionSetMplsLabel
.. autoclass:: NXActionSetMplsTc
The followings shows the supported NXAction classes in OpenFlow1.0 or later
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. py:currentmodule:: ryu.ofproto.ofproto_v1_3_parser
.. autoclass:: NXActionPopQueue
.. autoclass:: NXActionRegLoad
.. autoclass:: NXActionRegLoad2
.. autoclass:: NXActionNote
.. autoclass:: NXActionSetTunnel
.. autoclass:: NXActionSetTunnel64
.. autoclass:: NXActionRegMove
.. autoclass:: NXActionResubmit
.. autoclass:: NXActionResubmitTable
.. autoclass:: NXActionOutputReg
.. autoclass:: NXActionOutputReg2
.. autoclass:: NXActionLearn
.. autoclass:: NXActionExit
.. autoclass:: NXActionController
.. autoclass:: NXActionController2
.. autoclass:: NXActionDecTtlCntIds
.. autoclass:: NXActionStackPush
.. autoclass:: NXActionStackPop
.. autoclass:: NXActionSample
.. autoclass:: NXActionSample2
.. autoclass:: NXActionFinTimeout
.. autoclass:: NXActionConjunction
.. autoclass:: NXActionMultipath
.. autoclass:: NXActionBundle
.. autoclass:: NXActionBundleLoad
.. autoclass:: NXActionCT
.. autoclass:: NXActionNAT
.. autoclass:: NXActionOutputTrunc
.. autoclass:: NXActionDecNshTtl
.. autoclass:: NXFlowSpecMatch
.. autoclass:: NXFlowSpecLoad
.. autoclass:: NXFlowSpecOutput
.. autofunction:: ryu.ofproto.nicira_ext.ofs_nbits
.. _nx_match_structures:
Nicira Extended Match Structures
================================
.. automodule:: ryu.ofproto.nicira_ext

View File

@ -8,8 +8,5 @@ OpenFlow protocol API Reference
:maxdepth: 3 :maxdepth: 3
ofproto_base.rst ofproto_base.rst
ofproto_v1_0_ref.rst
ofproto_v1_2_ref.rst ofproto_v1_2_ref.rst
ofproto_v1_3_ref.rst ofproto_v1_3_ref.rst
ofproto_v1_4_ref.rst
ofproto_v1_5_ref.rst

View File

@ -1,294 +0,0 @@
*************************************
OpenFlow v1.0 Messages and Structures
*************************************
.. py:currentmodule:: ryu.ofproto.ofproto_v1_0_parser
Controller-to-Switch Messages
=============================
Handshake
---------
.. autoclass:: OFPFeaturesRequest
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of10/1-5-features_request.packet.json
.. autoclass:: OFPSwitchFeatures
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of10/1-6-ofp_switch_features.packet.json
Switch Configuration
--------------------
.. autoclass:: OFPSetConfig
.. JSON Example:
..
.. .. literalinclude:: ../../ryu/tests/unit/ofproto/json/of10/1-7-ofp_set_config.packet.json
.. autoclass:: OFPGetConfigRequest
.. JSON Example:
..
.. .. literalinclude:: ../../ryu/tests/unit/ofproto/json/of10/1-8-ofp_get_config_request.packet.json
.. autoclass:: OFPGetConfigReply
.. JSON Example:
..
.. .. literalinclude:: ../../ryu/tests/unit/ofproto/json/of10/1-9-ofp_get_config_reply.packet.json
Modify State Messages
---------------------
.. autoclass:: OFPFlowMod
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of10/1-2-ofp_flow_mod.packet.json
.. .. literalinclude:: ../../ryu/tests/unit/ofproto/json/of10/1-3-ofp_flow_mod.packet.json
.. autoclass:: OFPPortMod
.. JSON Example:
..
.. .. literalinclude:: ../../ryu/tests/unit/ofproto/json/of10/1-22-ofp_port_mod.packet.json
Queue Configuration Messages
----------------------------
.. autoclass:: OFPQueueGetConfigRequest
.. JSON Example:
..
.. .. literalinclude:: ../../ryu/tests/unit/ofproto/json/of10/1-35-ofp_queue_get_config_request.packet.json
.. autoclass:: OFPQueueGetConfigReply
.. JSON Example:
..
.. .. literalinclude:: ../../ryu/tests/unit/ofproto/json/of10/1-36-ofp_queue_get_config_reply.packet.json
Read State Messages
-------------------
.. autoclass:: OFPDescStatsRequest
.. JSON Example:
..
.. .. literalinclude:: ../../ryu/tests/unit/ofproto/json/of10/1-24-ofp_desc_stats_request.packet.json
.. autoclass:: OFPDescStatsReply
.. JSON Example:
..
.. .. literalinclude:: ../../ryu/tests/unit/ofproto/json/of10/1-0-ofp_desc_stats_reply.packet.json
.. autoclass:: OFPFlowStatsRequest
.. JSON Example:
..
.. .. literalinclude:: ../../ryu/tests/unit/ofproto/json/of10/1-11-ofp_flow_stats_request.packet.json
.. autoclass:: OFPFlowStatsReply
.. JSON Example:
..
.. .. literalinclude:: ../../ryu/tests/unit/ofproto/json/of10/1-12-ofp_flow_stats_reply.packet.json
.. autoclass:: OFPAggregateStatsRequest
.. JSON Example:
..
.. .. literalinclude:: ../../ryu/tests/unit/ofproto/json/of10/1-25-ofp_aggregate_stats_request.packet.json
.. autoclass:: OFPAggregateStatsReply
.. JSON Example:
..
.. .. literalinclude:: ../../ryu/tests/unit/ofproto/json/of10/1-26-ofp_aggregate_stats_reply.packet.json
.. autoclass:: OFPTableStatsRequest
.. JSON Example:
..
.. .. literalinclude:: ../../ryu/tests/unit/ofproto/json/of10/1-27-ofp_table_stats_request.packet.json
.. autoclass:: OFPTableStatsReply
.. XXX commented out because it's too long
.. JSON Example:
..
.. .. literalinclude:: ../../ryu/tests/unit/ofproto/json/of10/1-28-ofp_table_stats_reply.packet.json
.. autoclass:: OFPPortStatsRequest
.. JSON Example:
..
.. .. literalinclude:: ../../ryu/tests/unit/ofproto/json/of10/1-29-ofp_port_stats_request.packet.json
.. autoclass:: OFPPortStatsReply
.. JSON Example:
..
.. .. literalinclude:: ../../ryu/tests/unit/ofproto/json/of10/1-30-ofp_port_stats_reply.packet.json
.. autoclass:: OFPQueueStatsRequest
.. JSON Example:
..
.. .. literalinclude:: ../../ryu/tests/unit/ofproto/json/of10/1-37-ofp_queue_stats_request.packet.json
.. autoclass:: OFPQueueStatsReply
.. JSON Example:
..
.. .. literalinclude:: ../../ryu/tests/unit/ofproto/json/of10/1-38-ofp_queue_stats_reply.packet.json
.. autoclass:: OFPVendorStatsRequest
.. autoclass:: OFPVendorStatsReply
Send Packet Message
-------------------
.. autoclass:: OFPPacketOut
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of10/1-1-ofp_packet_out.packet.json
Barrier Message
---------------
.. autoclass:: OFPBarrierRequest
.. JSON Example:
..
.. .. literalinclude:: ../../ryu/tests/unit/ofproto/json/of10/1-17-ofp_barrier_request.packet.json
.. autoclass:: OFPBarrierReply
.. JSON Example:
..
.. .. literalinclude:: ../../ryu/tests/unit/ofproto/json/of10/1-18-ofp_barrier_reply.packet.json
Asynchronous Messages
=====================
Packet-In Message
-----------------
.. autoclass:: OFPPacketIn
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of10/1-4-ofp_packet_in.packet.json
Flow Removed Message
--------------------
.. autoclass:: OFPFlowRemoved
.. JSON Example:
..
.. .. literalinclude:: ../../ryu/tests/unit/ofproto/json/of10/1-40-ofp_flow_removed.packet.json
Port Status Message
-------------------
.. autoclass:: OFPPortStatus
.. JSON Example:
..
.. .. literalinclude:: ../../ryu/tests/unit/ofproto/json/of10/1-39-ofp_port_status.packet.json
Error Message
-------------
.. autoclass:: OFPErrorMsg
.. JSON Example:
..
.. .. literalinclude:: ../../ryu/tests/unit/ofproto/json/of10/1-15-ofp_error_msg.packet.json
.. .. literalinclude:: ../../ryu/tests/unit/ofproto/json/of10/1-41-ofp_error_msg_vendor.packet.json
Symmetric Messages
==================
Hello
-----
.. autoclass:: OFPHello
.. JSON Example:
..
.. .. literalinclude:: ../../ryu/tests/unit/ofproto/json/of10/1-10-ofp_hello.packet.json
Echo Request
------------
.. autoclass:: OFPEchoRequest
.. JSON Example:
..
.. .. literalinclude:: ../../ryu/tests/unit/ofproto/json/of10/1-13-ofp_echo_request.packet.json
Echo Reply
----------
.. autoclass:: OFPEchoReply
.. JSON Example:
..
.. .. literalinclude:: ../../ryu/tests/unit/ofproto/json/of10/1-14-ofp_echo_reply.packet.json
Vendor
------------
.. autoclass:: OFPVendor
.. JSON Example:
..
.. .. literalinclude:: ../../ryu/tests/unit/ofproto/json/of10/1-16-ofp_vendor.packet.json
Port Structures
===============
.. autoclass:: OFPPhyPort
Flow Match Structure
====================
.. autoclass:: OFPMatch
Action Structures
=================
.. autoclass:: OFPActionHeader
.. autoclass:: OFPAction
.. autoclass:: OFPActionOutput
.. autoclass:: OFPActionVlanVid
.. autoclass:: OFPActionVlanPcp
.. autoclass:: OFPActionStripVlan
.. autoclass:: OFPActionDlAddr
.. autoclass:: OFPActionSetDlSrc
.. autoclass:: OFPActionSetDlDst
.. autoclass:: OFPActionNwAddr
.. autoclass:: OFPActionSetNwSrc
.. autoclass:: OFPActionSetNwDst
.. autoclass:: OFPActionSetNwTos
.. autoclass:: OFPActionTpPort
.. autoclass:: OFPActionSetTpSrc
.. autoclass:: OFPActionSetTpDst
.. autoclass:: OFPActionEnqueue
.. autoclass:: OFPActionVendor

View File

@ -312,11 +312,6 @@ Experimenter
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of12/3-16-ofp_experimenter.packet.json .. literalinclude:: ../../ryu/tests/unit/ofproto/json/of12/3-16-ofp_experimenter.packet.json
Port Structures
===============
.. autoclass:: OFPPort
Flow Match Structure Flow Match Structure
==================== ====================

View File

@ -235,9 +235,7 @@ Multipart Messages
JSON Example: JSON Example:
See an example in: .. literalinclude:: ../../ryu/tests/unit/ofproto/json/of13/4-56-ofp_table_features_reply.packet.json
``ryu/tests/unit/ofproto/json/of13/4-56-ofp_table_features_reply.packet.json``
Queue Configuration Messages Queue Configuration Messages
---------------------------- ----------------------------
@ -396,11 +394,6 @@ Experimenter
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of13/4-16-ofp_experimenter.packet.json .. literalinclude:: ../../ryu/tests/unit/ofproto/json/of13/4-16-ofp_experimenter.packet.json
Port Structures
===============
.. autoclass:: OFPPort
Flow Match Structure Flow Match Structure
==================== ====================

View File

@ -1,530 +0,0 @@
*************************************
OpenFlow v1.4 Messages and Structures
*************************************
.. py:currentmodule:: ryu.ofproto.ofproto_v1_4_parser
Controller-to-Switch Messages
=============================
Handshake
---------
.. autoclass:: OFPFeaturesRequest
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-5-ofp_features_request.packet.json
.. autoclass:: OFPSwitchFeatures
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-6-ofp_features_reply.packet.json
Switch Configuration
--------------------
.. autoclass:: OFPSetConfig
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-7-ofp_set_config.packet.json
.. autoclass:: OFPGetConfigRequest
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-8-ofp_get_config_request.packet.json
.. autoclass:: OFPGetConfigReply
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-9-ofp_get_config_reply.packet.json
Modify State Messages
---------------------
.. autoclass:: OFPTableMod
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-23-ofp_table_mod.packet.json
.. autoclass:: OFPFlowMod
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-2-ofp_flow_mod.packet.json
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-3-ofp_flow_mod.packet.json
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-44-ofp_flow_mod.packet.json
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-58-ofp_flow_mod.packet.json
.. autoclass:: OFPGroupMod
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-21-ofp_group_mod.packet.json
.. autoclass:: OFPPortMod
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-22-ofp_port_mod.packet.json
.. autoclass:: OFPMeterMod
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-43-ofp_meter_mod.packet.json
Multipart Messages
------------------
.. autoclass:: OFPDescStatsRequest
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-24-ofp_desc_request.packet.json
.. autoclass:: OFPDescStatsReply
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-0-ofp_desc_reply.packet.json
.. autoclass:: OFPFlowStatsRequest
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-11-ofp_flow_stats_request.packet.json
.. autoclass:: OFPFlowStatsReply
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-12-ofp_flow_stats_reply.packet.json
.. autoclass:: OFPAggregateStatsRequest
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-25-ofp_aggregate_stats_request.packet.json
.. autoclass:: OFPAggregateStatsReply
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-26-ofp_aggregate_stats_reply.packet.json
.. autoclass:: OFPTableStatsRequest
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-27-ofp_table_stats_request.packet.json
.. autoclass:: OFPTableStatsReply
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-28-ofp_table_stats_reply.packet.json
.. autoclass:: OFPTableDescStatsRequest
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-61-ofp_table_desc_request.packet.json
.. autoclass:: OFPTableDescStatsReply
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-62-ofp_table_desc_reply.packet.json
.. autoclass:: OFPTableFeaturesStatsRequest
JSON Example:
See an example in:
``ryu/tests/unit/ofproto/json/of14/5-53-ofp_table_features_request.packet.json``
.. autoclass:: OFPTableFeaturesStatsReply
JSON Example:
See an example in:
``ryu/tests/unit/ofproto/json/of14/5-54-ofp_table_features_reply.packet.json``
.. autoclass:: OFPPortStatsRequest
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-29-ofp_port_stats_request.packet.json
.. autoclass:: OFPPortStatsReply
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-30-ofp_port_stats_reply.packet.json
.. autoclass:: OFPPortDescStatsRequest
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-51-ofp_port_desc_request.packet.json
.. autoclass:: OFPPortDescStatsReply
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-52-ofp_port_desc_reply.packet.json
.. autoclass:: OFPQueueStatsRequest
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-35-ofp_queue_stats_request.packet.json
.. autoclass:: OFPQueueStatsReply
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-36-ofp_queue_stats_reply.packet.json
.. autoclass:: OFPQueueDescStatsRequest
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-63-ofp_queue_desc_request.packet.json
.. autoclass:: OFPQueueDescStatsReply
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-64-ofp_queue_desc_reply.packet.json
.. autoclass:: OFPGroupStatsRequest
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-55-ofp_group_stats_request.packet.json
.. autoclass:: OFPGroupStatsReply
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-56-ofp_group_stats_reply.packet.json
.. autoclass:: OFPGroupDescStatsRequest
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-33-ofp_group_desc_request.packet.json
.. autoclass:: OFPGroupDescStatsReply
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-34-ofp_group_desc_reply.packet.json
.. autoclass:: OFPGroupFeaturesStatsRequest
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-31-ofp_group_features_request.packet.json
.. autoclass:: OFPGroupFeaturesStatsReply
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-32-ofp_group_features_reply.packet.json
.. autoclass:: OFPMeterStatsRequest
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-47-ofp_meter_stats_request.packet.json
.. autoclass:: OFPMeterStatsReply
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-48-ofp_meter_stats_reply.packet.json
.. autoclass:: OFPMeterConfigStatsRequest
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-45-ofp_meter_config_request.packet.json
.. autoclass:: OFPMeterConfigStatsReply
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-46-ofp_meter_config_reply.packet.json
.. autoclass:: OFPMeterFeaturesStatsRequest
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-49-ofp_meter_features_request.packet.json
.. autoclass:: OFPMeterFeaturesStatsReply
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-50-ofp_meter_features_reply.packet.json
.. autoclass:: OFPFlowMonitorRequest
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-66-ofp_flow_monitor_request.packet.json
.. autoclass:: OFPFlowMonitorReply
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-67-ofp_flow_monitor_reply.packet.json
.. autoclass:: OFPExperimenterStatsRequest
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-59-ofp_experimenter_request.packet.json
.. autoclass:: OFPExperimenterStatsReply
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-60-ofp_experimenter_reply.packet.json
Packet-Out Message
------------------
.. autoclass:: OFPPacketOut
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-1-ofp_packet_out.packet.json
Barrier Message
---------------
.. autoclass:: OFPBarrierRequest
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-17-ofp_barrier_request.packet.json
.. autoclass:: OFPBarrierReply
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-18-ofp_barrier_reply.packet.json
Role Request Message
--------------------
.. autoclass:: OFPRoleRequest
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-19-ofp_role_request.packet.json
.. autoclass:: OFPRoleReply
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-20-ofp_role_reply.packet.json
Bundle Messages
---------------
.. autoclass:: OFPBundleCtrlMsg
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-69-ofp_bundle_ctrl_msg.packet.json
.. autoclass:: OFPBundleAddMsg
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-70-ofp_bundle_add_msg.packet.json
Set Asynchronous Configuration Message
--------------------------------------
.. autoclass:: OFPSetAsync
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-42-ofp_set_async.packet.json
.. autoclass:: OFPGetAsyncRequest
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-40-ofp_get_async_request.packet.json
.. autoclass:: OFPGetAsyncReply
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-41-ofp_get_async_reply.packet.json
Asynchronous Messages
=====================
Packet-In Message
-----------------
.. autoclass:: OFPPacketIn
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-4-ofp_packet_in.packet.json
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-57-ofp_packet_in.packet.json
Flow Removed Message
--------------------
.. autoclass:: OFPFlowRemoved
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-38-ofp_flow_removed.packet.json
Port Status Message
-------------------
.. autoclass:: OFPPortStatus
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-37-ofp_port_status.packet.json
Controller Role Status Message
------------------------------
.. autoclass:: OFPRoleStatus
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-65-ofp_role_status.packet.json
Table Status Message
--------------------
.. autoclass:: OFPTableStatus
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-68-ofp_table_status.packet.json
Request Forward Message
-----------------------
.. autoclass:: OFPRequestForward
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-71-ofp_requestforward.packet.json
Symmetric Messages
==================
Hello
-----
.. autoclass:: OFPHello
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-10-ofp_hello.packet.json
.. autoclass:: OFPHelloElemVersionBitmap
Echo Request
------------
.. autoclass:: OFPEchoRequest
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-13-ofp_echo_request.packet.json
Echo Reply
----------
.. autoclass:: OFPEchoReply
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-14-ofp_echo_reply.packet.json
Error Message
-------------
.. autoclass:: OFPErrorMsg
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-15-ofp_error_msg.packet.json
Experimenter
------------
.. autoclass:: OFPExperimenter
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-16-ofp_experimenter.packet.json
Port Structures
===============
.. autoclass:: OFPPort
Flow Match Structure
====================
.. autoclass:: OFPMatch
Flow Instruction Structures
===========================
.. autoclass:: OFPInstructionGotoTable
.. autoclass:: OFPInstructionWriteMetadata
.. autoclass:: OFPInstructionActions
.. autoclass:: OFPInstructionMeter
Action Structures
=================
.. autoclass:: OFPActionOutput
.. autoclass:: OFPActionCopyTtlOut
.. autoclass:: OFPActionCopyTtlIn
.. autoclass:: OFPActionSetMplsTtl
.. autoclass:: OFPActionDecMplsTtl
.. autoclass:: OFPActionPushVlan
.. autoclass:: OFPActionPopVlan
.. autoclass:: OFPActionPushMpls
.. autoclass:: OFPActionPopMpls
.. autoclass:: OFPActionSetQueue
.. autoclass:: OFPActionGroup
.. autoclass:: OFPActionSetNwTtl
.. autoclass:: OFPActionDecNwTtl
.. autoclass:: OFPActionSetField
.. autoclass:: OFPActionPushPbb
.. autoclass:: OFPActionPopPbb
.. autoclass:: OFPActionExperimenter

View File

@ -1,577 +0,0 @@
*************************************
OpenFlow v1.5 Messages and Structures
*************************************
.. py:currentmodule:: ryu.ofproto.ofproto_v1_5_parser
Controller-to-Switch Messages
=============================
Handshake
---------
.. autoclass:: OFPFeaturesRequest
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-features_request.packet.json
.. autoclass:: OFPSwitchFeatures
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-features_reply.packet.json
Switch Configuration
--------------------
.. autoclass:: OFPSetConfig
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-set_config.packet.json
.. autoclass:: OFPGetConfigRequest
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-get_config_request.packet.json
.. autoclass:: OFPGetConfigReply
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-get_config_reply.packet.json
Modify State Messages
---------------------
.. autoclass:: OFPTableMod
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-table_mod.packet.json
.. autoclass:: OFPFlowMod
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-flow_mod.packet.json
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-flow_mod_conjunction.packet.json
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-flow_mod_match_conj.packet.json
.. autoclass:: OFPGroupMod
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-group_mod.packet.json
.. autoclass:: OFPPortMod
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-port_mod.packet.json
.. autoclass:: OFPMeterMod
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-meter_mod.packet.json
Multipart Messages
------------------
.. autoclass:: OFPDescStatsRequest
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-desc_request.packet.json
.. autoclass:: OFPDescStatsReply
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-desc_reply.packet.json
.. autoclass:: OFPFlowDescStatsRequest
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-flow_desc_request.packet.json
.. autoclass:: OFPFlowDescStatsReply
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-flow_desc_reply.packet.json
.. autoclass:: OFPFlowStatsRequest
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-flow_stats_request.packet.json
.. autoclass:: OFPFlowStatsReply
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-flow_stats_reply.packet.json
.. autoclass:: OFPAggregateStatsRequest
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-aggregate_stats_request.packet.json
.. autoclass:: OFPAggregateStatsReply
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-aggregate_stats_reply.packet.json
.. autoclass:: OFPPortStatsRequest
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-port_stats_request.packet.json
.. autoclass:: OFPPortStatsReply
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-port_stats_reply.packet.json
.. autoclass:: OFPPortDescStatsRequest
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-port_desc_request.packet.json
.. autoclass:: OFPPortDescStatsReply
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-port_desc_reply.packet.json
.. autoclass:: OFPQueueStatsRequest
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-queue_stats_request.packet.json
.. autoclass:: OFPQueueStatsReply
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-queue_stats_reply.packet.json
.. autoclass:: OFPQueueDescStatsRequest
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-queue_desc_request.packet.json
.. autoclass:: OFPQueueDescStatsReply
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-queue_desc_reply.packet.json
.. autoclass:: OFPGroupStatsRequest
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-group_stats_request.packet.json
.. autoclass:: OFPGroupStatsReply
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-group_stats_reply.packet.json
.. autoclass:: OFPGroupDescStatsRequest
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-group_desc_request.packet.json
.. autoclass:: OFPGroupDescStatsReply
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-group_desc_reply.packet.json
.. autoclass:: OFPGroupFeaturesStatsRequest
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-group_features_request.packet.json
.. autoclass:: OFPGroupFeaturesStatsReply
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-group_features_reply.packet.json
.. autoclass:: OFPMeterStatsRequest
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-meter_stats_request.packet.json
.. autoclass:: OFPMeterStatsReply
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-meter_stats_reply.packet.json
.. autoclass:: OFPMeterDescStatsRequest
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-meter_desc_request.packet.json
.. autoclass:: OFPMeterDescStatsReply
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-meter_desc_reply.packet.json
.. autoclass:: OFPMeterFeaturesStatsRequest
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-meter_features_request.packet.json
.. autoclass:: OFPMeterFeaturesStatsReply
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-meter_features_reply.packet.json
.. autoclass:: OFPControllerStatusStatsRequest
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-controller_status_request.packet.json
.. autoclass:: OFPControllerStatusStatsReply
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-controller_status_reply.packet.json
.. autoclass:: OFPTableStatsRequest
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-table_stats_request.packet.json
.. autoclass:: OFPTableStatsReply
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-table_stats_reply.packet.json
.. autoclass:: OFPTableDescStatsRequest
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-table_desc_request.packet.json
.. autoclass:: OFPTableDescStatsReply
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-table_desc_reply.packet.json
.. autoclass:: OFPTableFeaturesStatsRequest
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-table_features_request.packet.json
.. autoclass:: OFPTableFeaturesStatsReply
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-table_features_reply.packet.json
.. autoclass:: OFPFlowMonitorRequest
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-flow_monitor_request.packet.json
.. autoclass:: OFPFlowMonitorReply
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-flow_monitor_reply.packet.json
.. autoclass:: OFPBundleFeaturesStatsRequest
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-bundle_features_request.packet.json
.. autoclass:: OFPBundleFeaturesStatsReply
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-bundle_features_reply.packet.json
.. autoclass:: OFPExperimenterStatsRequest
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-experimenter_request.packet.json
.. autoclass:: OFPExperimenterStatsReply
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-experimenter_reply.packet.json
Packet-Out Message
------------------
.. autoclass:: OFPPacketOut
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-packet_out.packet.json
Barrier Message
---------------
.. autoclass:: OFPBarrierRequest
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-barrier_request.packet.json
.. autoclass:: OFPBarrierReply
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-barrier_reply.packet.json
Role Request Message
--------------------
.. autoclass:: OFPRoleRequest
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-role_request.packet.json
.. autoclass:: OFPRoleReply
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-role_reply.packet.json
Bundle Messages
---------------
.. autoclass:: OFPBundleCtrlMsg
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-bundle_ctrl.packet.json
.. autoclass:: OFPBundleAddMsg
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-bundle_add.packet.json
Set Asynchronous Configuration Message
--------------------------------------
.. autoclass:: OFPSetAsync
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-set_async.packet.json
.. autoclass:: OFPGetAsyncRequest
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-get_async_request.packet.json
.. autoclass:: OFPGetAsyncReply
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-get_async_reply.packet.json
Asynchronous Messages
=====================
Packet-In Message
-----------------
.. autoclass:: OFPPacketIn
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-packet_in.packet.json
Flow Removed Message
--------------------
.. autoclass:: OFPFlowRemoved
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-flow_removed.packet.json
Port Status Message
-------------------
.. autoclass:: OFPPortStatus
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-port_status.packet.json
Controller Role Status Message
------------------------------
.. autoclass:: OFPRoleStatus
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-role_status.packet.json
Table Status Message
--------------------
.. autoclass:: OFPTableStatus
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-table_status.packet.json
Request Forward Message
-----------------------
.. autoclass:: OFPRequestForward
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-requestforward.packet.json
Controller Status Message
-------------------------
.. autoclass:: OFPControllerStatus
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-controller_status.packet.json
Symmetric Messages
==================
Hello
-----
.. autoclass:: OFPHello
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-hello.packet.json
.. autoclass:: OFPHelloElemVersionBitmap
Echo Request
------------
.. autoclass:: OFPEchoRequest
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-echo_request.packet.json
Echo Reply
----------
.. autoclass:: OFPEchoReply
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-echo_reply.packet.json
Error Message
-------------
.. autoclass:: OFPErrorMsg
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-error_msg.packet.json
Experimenter
------------
.. autoclass:: OFPExperimenter
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-error_msg_experimenter.packet.json
Port Structures
===============
.. autoclass:: OFPPort
Flow Match Structure
====================
.. autoclass:: OFPMatch
Flow Stats Structures
=====================
.. autoclass:: OFPStats
Flow Instruction Structures
===========================
.. autoclass:: OFPInstructionGotoTable
.. autoclass:: OFPInstructionWriteMetadata
.. autoclass:: OFPInstructionActions
.. autoclass:: OFPInstructionStatTrigger
Action Structures
=================
.. autoclass:: OFPActionOutput
.. autoclass:: OFPActionCopyTtlOut
.. autoclass:: OFPActionCopyTtlIn
.. autoclass:: OFPActionSetMplsTtl
.. autoclass:: OFPActionDecMplsTtl
.. autoclass:: OFPActionPushVlan
.. autoclass:: OFPActionPopVlan
.. autoclass:: OFPActionPushMpls
.. autoclass:: OFPActionPopMpls
.. autoclass:: OFPActionSetQueue
.. autoclass:: OFPActionGroup
.. autoclass:: OFPActionSetNwTtl
.. autoclass:: OFPActionDecNwTtl
.. autoclass:: OFPActionSetField
.. autoclass:: OFPActionPushPbb
.. autoclass:: OFPActionPopPbb
.. autoclass:: OFPActionCopyField
.. autoclass:: OFPActionMeter
.. autoclass:: OFPActionExperimenter
Controller Status Structure
===========================
.. autoclass:: OFPControllerStatusStats

View File

@ -1,3 +0,0 @@
"""
dummy module.
"""

View File

@ -1,7 +0,0 @@
"""
dummy module.
"""
class QuantumClientException:
pass

View File

@ -1,3 +0,0 @@
"""
dummy module.
"""

View File

@ -11,7 +11,7 @@ Threads, events, and event queues
Ryu applications are single-threaded entities which implement Ryu applications are single-threaded entities which implement
various functionalities in Ryu. Events are messages between them. various functionalities in Ryu. Events are messages between them.
Ryu applications send asynchronous events to each other. Ryu applications send asynchronous events each other.
Besides that, there are some Ryu-internal event sources which Besides that, there are some Ryu-internal event sources which
are not Ryu applications. One of examples of such event sources are not Ryu applications. One of examples of such event sources
is OpenFlow controller. is OpenFlow controller.
@ -22,18 +22,21 @@ between Ryu applications.
Each Ryu application has a receive queue for events. Each Ryu application has a receive queue for events.
The queue is FIFO and preserves the order of events. The queue is FIFO and preserves the order of events.
Each Ryu application has a thread for event processing. Each Ryu application has a thread for event processing.
The thread keeps draining the receive queue by dequeueing an event The thread keep draining the receive queue by dequeueing an event
and calling the appropritate event handler for the event type. and calling the appropritate event handler for the event type.
Because the event handler is called in the context of Because the event handler is called in the context of
the event processing thread, it should be careful when blocking. the event processing thread, it should be careful for blocking.
While an event handler is blocked, no further events for I.e. while an event handler is blocked, no further events for
the Ryu application will be processed. the Ryu application will be processed.
There are kinds of events which are used to implement synchronous There are kinds of events which are used to implement synchronous
inter-application calls between Ryu applications. inter-application calls between Ryu applications.
While such requests uses the same machinary as ordinary While such requests uses the same machinary as ordinary
events, their replies are put on a queue dedicated to the transaction events, their replies are put on another queue dedicated to replies
to avoid deadlock. to avoid deadlock.
(Because, unlike erlang, our queue doesn't support selective receive.)
It's assumed that the number of in-flight synchronous requests from
a Ryu application is at most 1.
While threads and queues is currently implemented with eventlet/greenlet, While threads and queues is currently implemented with eventlet/greenlet,
a direct use of them in a Ryu application is strongly discouraged. a direct use of them in a Ryu application is strongly discouraged.
@ -82,98 +85,374 @@ For example, EventOFPPacketIn for packet-in message.
The OpenFlow controller part of Ryu automatically decodes OpenFlow messages The OpenFlow controller part of Ryu automatically decodes OpenFlow messages
received from switches and send these events to Ryu applications which received from switches and send these events to Ryu applications which
expressed an interest using ryu.controller.handler.set_ev_cls. expressed an interest using ryu.controller.handler.set_ev_cls.
OpenFlow event classes are subclasses of the following class. OpenFlow event classes have at least the following attributes.
.. autoclass:: ryu.controller.ofp_event.EventOFPMsgBase ============ =============================================================
Attribute Description
============ =============================================================
msg An object which describes the corresponding OpenFlow message.
msg.datapath A ryu.controller.controller.Datapath instance which describes
an OpenFlow switch from which we received this OpenFlow message.
============ =============================================================
The msg object has some more additional members whose values are extracted
from the original OpenFlow message.
See :ref:`ofproto_ref` for more info about OpenFlow messages. See :ref:`ofproto_ref` for more info about OpenFlow messages.
ryu.base.app_manager.RyuApp ryu.base.app_manager.RyuApp
=========================== ===========================
See :ref:`api_ref`. The base class for Ryu applications.
ryu.controller.handler.set_ev_cls class attributes
================================= ----------------
.. autofunction:: ryu.controller.handler.set_ev_cls A RyuApp subclass can have class attributes with the following special
names, which are recognized by app_manager.
_CONTEXTS
`````````
A dictionary to specify contexts which this Ryu application wants to use.
Its key is a name of context and its value is an ordinary class
which implements the context. The class is instantiated by app_manager
and the instance is shared among RyuApp subclasses which has \_CONTEXTS
member with the same key. A RyuApp subclass can obtain a reference to
the instance via its \_\_init\_\_'s kwargs as the following.
.. code-block:: python
_CONTEXTS = {
'network': network.Network
}
def __init__(self, *args, *kwargs):
self.network = kwargs['network']
_EVENTS
```````
A list of event classes which this RyuApp subclass would generate.
This should be specified if and only if event classes are defined in
a different python module from the RyuApp subclass is.
OFP_VERSIONS
````````````
A list of supported OpenFlow versions for this RyuApp.
For example:
.. code-block:: python
OFP_VERSIONS = [ofproto_v1_0.OFP_VERSION,
ofproto_v1_2.OFP_VERSION]
If multiple Ryu applications are loaded in the system,
the intersection of their OFP_VERSIONS is used.
instance attributes
-------------------
A RyuApp instance provides the following attributes.
\_\_init\_\_(self, \*args, \*kwargs)
````````````````````````````````````
RyuApp subclasses are instantiated after ryu-manager loaded
all requested Ryu application modules.
\_\_init\_\_ should call RyuApp.__init__ with the same arguments.
It's illegal to send any events in \_\_init\_\_.
name
````
The name of the class used for message routing among Ryu applications.
(Cf. send_event)
It's set to __class__.__name__ by RyuApp.__init__.
It's discouraged to override this value.
send_request(self, req)
```````````````````````
Make a synchronous request.
Set req.sync to True, send it to a Ryu application specified by req.dst,
and block until receiving a reply.
Returns the received reply.
The argument should be an instance of EventRequestBase.
send_reply(self, rep)
`````````````````````
Send a reply for a synchronous request sent by send_request.
The argument should be an instance of EventReplyBase.
send_event(self, name, ev)
``````````````````````````
Send the specified event to the RyuApp instance specified by name.
send_event_to_observers(self, ev)
`````````````````````````````````
Send the specified event to all observers of this RyuApp.
ryu.controller.handler.set_ev_cls(ev_cls, dispatchers=None)
===========================================================
A decorator for Ryu application to declare an event handler.
Decorated method will become an event handler.
ev_cls is an event class whose instances this RyuApp wants to receive.
dispatchers argument specifies one of the following negotiation phases
(or a list of them) for which events should be generated for this handler.
Note that, in case an event changes the phase, the phase before the change
is used to check the interest.
=========================================== ==================================
Negotiation phase Description
=========================================== ==================================
ryu.controller.handler.HANDSHAKE_DISPATCHER Sending and waiting for hello
message
ryu.controller.handler.CONFIG_DISPATCHER Version negotiated and sent
features-request message
ryu.controller.handler.MAIN_DISPATCHER Switch-features message received
and sent set-config message
ryu.controller.handler.DEAD_DISPATCHER Disconnect from the peer. Or
disconnecting due to some
unrecoverable errors.
=========================================== ==================================
ryu.controller.controller.Datapath ryu.controller.controller.Datapath
================================== ==================================
.. autoclass:: ryu.controller.controller.Datapath A class to describe an OpenFlow switch connected to this controller.
An instance has the following attributes.
====================================== =======================================
Attribute Description
====================================== =======================================
id 64-bit OpenFlow Datapath ID.
Only available for
ryu.controller.handler.MAIN_DISPATCHER
phase.
ofproto A module which exports OpenFlow
definitions, mainly constants appeared
in the specification, for the
negotiated OpenFlow version. For
example, ryu.ofproto.ofproto_v1_0 for
OpenFlow 1.0.
ofproto_parser A module which exports OpenFlow wire
message encoder and decoder for the
negotiated OpenFlow version. For
example, ryu.ofproto.ofproto_v1_0_parser
for OpenFlow 1.0.
ofproto_parser.OFPxxxx(datapath, ....) A callable to prepare an OpenFlow
message for the given switch. It can
be sent with Datapath.send_msg later.
xxxx is a name of the message. For
example OFPFlowMod for flow-mod
message. Arguemnts depend on the
message.
set_xid(self, msg) Generate an OpenFlow XID and put it
in msg.xid.
send_msg(self, msg) Queue an OpenFlow message to send to
the corresponding switch. If msg.xid
is None, set_xid is automatically
called on the message before queueing.
send_packet_out deprecated
send_flow_mod deprecated
send_flow_del deprecated
send_delete_all_flows deprecated
send_barrier Queue an OpenFlow barrier message to
send to the switch.
send_nxt_set_flow_format deprecated
is_reserved_port deprecated
====================================== =======================================
ryu.controller.event.EventBase ryu.controller.event.EventBase
============================== ==============================
.. autoclass:: ryu.controller.event.EventBase The base of all event classes.
A Ryu application can define its own event type by creating a subclass.
ryu.controller.event.EventRequestBase ryu.controller.event.EventRequestBase
===================================== =====================================
.. autoclass:: ryu.controller.event.EventRequestBase The base class for synchronous request for RyuApp.send_request.
ryu.controller.event.EventReplyBase ryu.controller.event.EventReplyBase
=================================== ===================================
.. autoclass:: ryu.controller.event.EventReplyBase The base class for synchronous request reply for RyuApp.send_reply.
ryu.controller.ofp_event.EventOFPStateChange ryu.controller.ofp_event.EventOFPStateChange
============================================ ============================================
.. autoclass:: ryu.controller.ofp_event.EventOFPStateChange An event class for negotiation phase change notification.
An instance of this class is sent to observer after changing
the negotiation phase.
An instance has at least the following attributes.
ryu.controller.ofp_event.EventOFPPortStateChange ========= ====================================================================
================================================ Attribute Description
========= ====================================================================
.. autoclass:: ryu.controller.ofp_event.EventOFPPortStateChange datapath ryu.controller.controller.Datapath instance of the switch
========= ====================================================================
ryu.controller.dpset.EventDP ryu.controller.dpset.EventDP
============================ ============================
.. autoclass:: ryu.controller.dpset.EventDP An event class to notify connect/disconnect of a switch.
For OpenFlow switches, one can get the same notification by observing
ryu.controller.ofp_event.EventOFPStateChange.
An instance has at least the following attributes.
========= ====================================================================
Attribute Description
========= ====================================================================
dp A ryu.controller.controller.Datapath instance of the switch
enter True when the switch connected to our controller. False for
disconnect.
========= ====================================================================
ryu.controller.dpset.EventPortAdd ryu.controller.dpset.EventPortAdd
================================= =================================
.. autoclass:: ryu.controller.dpset.EventPortAdd An event class for switch port status notification.
This event is generated when a new port is added to a switch.
For OpenFlow switches, one can get the same notification by observing
ryu.controller.ofp_event.EventOFPPortStatus.
An instance has at least the following attributes.
========= ====================================================================
Attribute Description
========= ====================================================================
dp A ryu.controller.controller.Datapath instance of the switch
port port number
========= ====================================================================
ryu.controller.dpset.EventPortDelete ryu.controller.dpset.EventPortDelete
==================================== ====================================
.. autoclass:: ryu.controller.dpset.EventPortDelete An event class for switch port status notification.
This event is generated when a port is removed from a switch.
For OpenFlow switches, one can get the same notification by observing
ryu.controller.ofp_event.EventOFPPortStatus.
An instance has at least the following attributes.
========= ====================================================================
Attribute Description
========= ====================================================================
dp A ryu.controller.controller.Datapath instance of the switch
port port number
========= ====================================================================
ryu.controller.dpset.EventPortModify ryu.controller.dpset.EventPortModify
==================================== ====================================
.. autoclass:: ryu.controller.dpset.EventPortModify An event class for switch port status notification.
This event is generated when some attribute of a port is changed.
For OpenFlow switches, one can get the same notification by observing
ryu.controller.ofp_event.EventOFPPortStatus.
An instance has at least the following attributes.
========= ====================================================================
Attribute Description
========= ====================================================================
dp A ryu.controller.controller.Datapath instance of the switch
port port number
========= ====================================================================
ryu.controller.network.EventNetworkPort ryu.controller.network.EventNetworkPort
======================================= =======================================
.. autoclass:: ryu.controller.network.EventNetworkPort An event class for notification of port arrival and deperture.
This event is generated when a port is introduced to or removed from a network
by the REST API.
An instance has at least the following attributes.
========== ===================================================================
Attribute Description
========== ===================================================================
network_id Network ID
dpid OpenFlow Datapath ID of the switch to which the port belongs.
port_no OpenFlow port number of the port
add_del True for adding a port. False for removing a port.
========== ===================================================================
ryu.controller.network.EventNetworkDel ryu.controller.network.EventNetworkDel
====================================== ======================================
.. autoclass:: ryu.controller.network.EventNetworkDel An event class for network deletion.
This event is generated when a network is deleted by the REST API.
An instance has at least the following attributes.
========== ===================================================================
Attribute Description
========== ===================================================================
network_id Network ID
========== ===================================================================
ryu.controller.network.EventMacAddress ryu.controller.network.EventMacAddress
====================================== ======================================
.. autoclass:: ryu.controller.network.EventMacAddress An event class for end-point MAC address registration.
This event is generated when a end-point MAC address is updated
by the REST API.
An instance has at least the following attributes.
=========== ==================================================================
Attribute Description
=========== ==================================================================
network_id Network ID
dpid OpenFlow Datapath ID of the switch to which the port belongs.
port_no OpenFlow port number of the port
mac_address The old MAC address of the port if add_del is False. Otherwise
the new MAC address.
add_del False if this event is a result of a port removal. Otherwise
True.
=========== ==================================================================
ryu.controller.tunnels.EventTunnelKeyAdd ryu.controller.tunnels.EventTunnelKeyAdd
======================================== ========================================
.. autoclass:: ryu.controller.tunnels.EventTunnelKeyAdd An event class for tunnel key registration.
This event is generated when a tunnel key is registered or updated
by the REST API.
An instance has at least the following attributes.
=========== ==================================================================
Attribute Description
=========== ==================================================================
network_id Network ID
tunnel_key Tunnel Key
=========== ==================================================================
ryu.controller.tunnels.EventTunnelKeyDel ryu.controller.tunnels.EventTunnelKeyDel
======================================== ========================================
.. autoclass:: ryu.controller.tunnels.EventTunnelKeyDel An event class for tunnel key registration.
This event is generated when a tunnel key is removed by the REST API.
An instance has at least the following attributes.
=========== ==================================================================
Attribute Description
=========== ==================================================================
network_id Network ID
tunnel_key Tunnel Key
=========== ==================================================================
ryu.controller.tunnels.EventTunnelPort ryu.controller.tunnels.EventTunnelPort
====================================== ======================================
.. autoclass:: ryu.controller.tunnels.EventTunnelPort An event class for tunnel port registration.
This event is generated when a tunnel port is added or removed by the REST API.
An instance has at least the following attributes.
=========== ==================================================================
Attribute Description
=========== ==================================================================
dpid OpenFlow Datapath ID
port_no OpenFlow port number
remote_dpid OpenFlow port number of the tunnel peer
add_del True for adding a tunnel. False for removal.
=========== ==================================================================

View File

@ -1,152 +0,0 @@
******************
Snort Intergration
******************
This document describes how to integrate Ryu with Snort.
Overview
========
There are two options can send alert to Ryu controller. The Option 1 is easier if you just want to demonstrate or test. Since Snort need very large computation power for analyzing packets you can choose Option 2 to separate them.
**[Option 1] Ryu and Snort are on the same machine**
::
+---------------------+
| unixsock |
| Ryu == snort |
+----eth0-----eth1----+
| |
+-------+ +----------+ +-------+
| HostA |---| OFSwitch |---| HostB |
+-------+ +----------+ +-------+
The above depicts Ryu and Snort architecture. Ryu receives Snort alert packet via **Unix Domain Socket** . To monitor packets between HostA and HostB, installing a flow that mirrors packets to Snort.
**[Option 2] Ryu and Snort are on the different machines**
::
+---------------+
| Snort eth0--|
| Sniffer | |
+-----eth1------+ |
| |
+-------+ +----------+ +-----------+
| HostA |---| OFSwitch |---| LAN (*CP) |
+-------+ +----------+ +-----------+
| |
+----------+ +----------+
| HostB | | Ryu |
+----------+ +----------+
**\*CP: Control Plane**
The above depicts Ryu and Snort architecture. Ryu receives Snort alert packet via **Network Socket** . To monitor packets between HostA and HostB, installing a flow that mirrors packets to Snort.
Installation Snort
==================
Snort is an open source network intrusion prevention and detectionsystem developed by Sourcefire. If you are not familiar with installing/setting up Snort, please referto snort setup guides.
http://www.snort.org/documents
Configure Snort
===============
The configuration example is below:
- Add a snort rules file into ``/etc/snort/rules`` named ``Myrules.rules`` ::
alert icmp any any -> any any (msg:"Pinging...";sid:1000004;)
alert tcp any any -> any 80 (msg:"Port 80 is accessing"; sid:1000003;)
- Add the custom rules in ``/etc/snort/snort.conf`` ::
include $RULE_PATH/Myrules.rules
Configure NIC as a promiscuous mode. ::
$ sudo ifconfig eth1 promisc
Usage
=====
**[Option 1]**
1. Modify the ``simple_switch_snort.py``: ::
socket_config = {'unixsock': True}
# True: Unix Domain Socket Server [Option1]
# False: Network Socket Server [Option2]
2. Run Ryu with sample application: ::
$ sudo ./bin/ryu-manager ryu/app/simple_switch_snort.py
The incoming packets will all mirror to **port 3** which should be connect to Snort network interface. You can modify the mirror port by assign a new value in the ``self.snort_port = 3`` of ``simple_switch_snort.py``
3. Run Snort: ::
$ sudo -i
$ snort -i eth1 -A unsock -l /tmp -c /etc/snort/snort.conf
4. Send an ICMP packet from HostA (192.168.8.40) to HostB (192.168.8.50): ::
$ ping 192.168.8.50
5. You can see the result under next section.
**[Option 2]**
1. Modify the ``simple_switch_snort.py``: ::
socket_config = {'unixsock': False}
# True: Unix Domain Socket Server [Option1]
# False: Network Socket Server [Option2]
2. Run Ryu with sample application (On the Controller): ::
$ ./bin/ryu-manager ryu/app/simple_switch_snort.py
3. Run Snort (On the Snort machine): ::
$ sudo -i
$ snort -i eth1 -A unsock -l /tmp -c /etc/snort/snort.conf
4. Run ``pigrelay.py`` (On the Snort machine): ::
$ sudo python pigrelay.py
This program listening snort alert messages from unix domain socket and sending it to Ryu using network socket.
You can clone the source code from this repo. https://github.com/John-Lin/pigrelay
5. Send an ICMP packet from HostA (192.168.8.40) to HostB (192.168.8.50): ::
$ ping 192.168.8.50
6. You can see the alert message below: ::
alertmsg: Pinging...
icmp(code=0,csum=19725,data=echo(data=array('B', [97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 97, 98, 99, 100, 101, 102, 103, 104, 105]),id=1,seq=78),type=8)
ipv4(csum=42562,dst='192.168.8.50',flags=0,header_length=5,identification=724,offset=0,option=None,proto=1,src='192.168.8.40',tos=0,total_length=60,ttl=128,version=4)
ethernet(dst='00:23:54:5a:05:14',ethertype=2048,src='00:23:54:6c:1d:17')
alertmsg: Pinging...
icmp(code=0,csum=21773,data=echo(data=array('B', [97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 97, 98, 99, 100, 101, 102, 103, 104, 105]),id=1,seq=78),type=0)
ipv4(csum=52095,dst='192.168.8.40',flags=0,header_length=5,identification=7575,offset=0,option=None,proto=1,src='192.168.8.50',tos=0,total_length=60,ttl=64,version=4)

View File

@ -1,190 +0,0 @@
===================================
Testing OF-config support with LINC
===================================
This page describes how to setup LINC and test Ryu OF-config with it.
The procedure is as follows.
Although all the procedure is written for reader's convenience,
please refer to LINC document for latest informations of LINC.
https://github.com/FlowForwarding/LINC-Switch
The test procedure
* install Erlang environment
* build LINC
* configure LINC switch
* setup for LINC
* run LINC switch
* run Ryu test_of_config app
For getting/installing Ryu itself, please refer to https://ryu-sdn.org/
Install Erlang environment
==========================
Since LINC is written in Erlang, you need to install Erlang execution
environment. Required version is R15B+.
The easiest way is to use binary package from
https://www.erlang-solutions.com/downloads/download-erlang-otp
The distribution may also provide Erlang package.
build LINC
==========
install necessary packages for build
------------------------------------
install necessary build tools
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
On Ubuntu::
# apt-get install git-core bridge-utils libpcap0.8 libpcap-dev libcap2-bin uml-utilities
On RedHat/CentOS::
# yum install git sudo bridge-utils libpcap libpcap-devel libcap tunctl
Note that on RedHat/CentOS 5.x you need a newer version of libpcap::
# yum erase libpcap libpcap-devel
# yum install flex byacc
# wget http://www.tcpdump.org/release/libpcap-1.2.1.tar.gz
# tar xzf libpcap-1.2.1.tar.gz
# cd libpcap-1.2.1
# ./configure
# make && make install
get LINC repo and built
^^^^^^^^^^^^^^^^^^^^^^^
Clone LINC repo::
% git clone git://github.com/FlowForwarding/LINC-Switch.git
Then compile everything::
% cd LINC-Switch
% make
.. NOTE::
At the time of this writing, test_of_config fails due to a bug of LINC. You can try this test with LINC which is built by the following methods.
::
% cd LINC-Switch
% make
% cd deps/of_config
% git reset --hard f772af4b765984381ad024ca8e5b5b8c54362638
% cd ../..
% make offline
Setup LINC
==========
edit LINC switch configuration file. ``rel/linc/releases/0.1/sys.config``
Here is the sample sys.config for test_of_config.py to run.
::
[{linc,
[{of_config,enabled},
{capable_switch_ports,
[{port,1,[{interface,"linc-port"}]},
{port,2,[{interface,"linc-port2"}]},
{port,3,[{interface,"linc-port3"}]},
{port,4,[{interface,"linc-port4"}]}]},
{capable_switch_queues,
[
{queue,991,[{min_rate,10},{max_rate,120}]},
{queue,992,[{min_rate,10},{max_rate,130}]},
{queue,993,[{min_rate,200},{max_rate,300}]},
{queue,994,[{min_rate,400},{max_rate,900}]}
]},
{logical_switches,
[{switch,0,
[{backend,linc_us4},
{controllers,[{"Switch0-Default-Controller","127.0.0.1",6633,tcp}]},
{controllers_listener,{"127.0.0.1",9998,tcp}},
{queues_status,enabled},
{ports,[{port,1,{queues,[]}},{port,2,{queues,[991,992]}}]}]}
,
{switch,7,
[{backend,linc_us3},
{controllers,[{"Switch7-Controller","127.0.0.1",6633,tcp}]},
{controllers_listener,disabled},
{queues_status,enabled},
{ports,[{port,4,{queues,[]}},{port,3,{queues,[993,994]}}]}]}
]}]},
{enetconf,
[{capabilities,
[{base,{1,0}},
{base,{1,1}},
{startup,{1,0}},
{'writable-running',{1,0}}]},
{callback_module,linc_ofconfig},
{sshd_ip,{127,0,0,1}},
{sshd_port,1830},
{sshd_user_passwords,[{"linc","linc"}]}]},
{lager,
[{handlers,
[{lager_console_backend,debug},
{lager_file_backend,
[{"log/error.log",error,10485760,"$D0",5},
{"log/console.log",info,10485760,"$D0",5}]}]}]},
{sasl,
[{sasl_error_logger,{file,"log/sasl-error.log"}},
{errlog_type,error},
{error_logger_mf_dir,"log/sasl"},
{error_logger_mf_maxbytes,10485760},
{error_logger_mf_maxfiles,5}]},
{sync,[{excluded_modules,[procket]}]}].
setup for LINC
==============
As the above sys.config requires some network interface, create them::
# ip link add linc-port type veth peer name linc-port-peer
# ip link set linc-port up
# ip link add linc-port2 type veth peer name linc-port-peer2
# ip link set linc-port2 up
# ip link add linc-port3 type veth peer name linc-port-peer3
# ip link set linc-port3 up
# ip link add linc-port4 type veth peer name linc-port-peer4
# ip link set linc-port4 up
After stopping LINC, those created interfaces can be deleted::
# ip link delete linc-port
# ip link delete linc-port2
# ip link delete linc-port3
# ip link delete linc-port4
Starting LINC OpenFlow switch
=============================
Then run LINC::
# rel/linc/bin/linc console
Run Ryu test_of_config app
==========================
Run test_of_config app::
# ryu-manager --verbose ryu.tests.integrated.test_of_config ryu.app.rest
If you don't install ryu and are working in the git repo directly::
# PYTHONPATH=. ./bin/ryu-manager --verbose ryu.tests.integrated.test_of_config ryu.app.rest

Some files were not shown because too many files have changed in this diff Show More