3227 Commits

Author SHA1 Message Date
FUJITA Tomonori
b9909d0686 Ryu 4.26
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
v4.26
2018-07-01 20:10:13 +09:00
IWAMOTO Toshihiro
704dcc786a nx_actions: Fix NXActionSetTunnel docstring
set_tunnel and set_field:xxx->tun_id are different actions.

Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-06-20 12:05:11 +09:00
IWAMOTO Toshihiro
4bc29b2c5f Fix pycodestyle W605 warnings
W605 invalid escape sequence, which was recently added in pycodestyle,
would be a syntax error in future python3 versions.

Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-06-20 12:05:08 +09:00
IWASE Yusuke
b1ec9ed457 BGPSpeaker: Fix BGP state string conversion
The constants BGP_FSM_* are str type values and not callable.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-06-20 12:04:53 +09:00
IWASE Yusuke
56aff9adf3 pycodestyle: Ignore W504
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-06-20 12:04:46 +09:00
IWASE Yusuke
db7338b8db BGPSpeaker: Advertise local routes to RR clients
The current implementation misses the mandatory attributes when sending
locally generated routes to its Route Reflector (RR) clients, then the
clients will reject the received routes.

This patch fixes to add or update attributes to for sending locally
generated routes its RR clients.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-06-20 12:04:30 +09:00
IWAMOTO Toshihiro
a6bda030d3 pip: Blacklist eventlet 0.23.0
This is to sync with OpenStack requirements.

Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-06-20 11:10:25 +09:00
IWAMOTO Toshihiro
482aabcb1e lldp: Remove remaining SystemCapabilities.subtype from tests
Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-06-20 10:42:59 +09:00
Marcin Chron
99fc573a9c lldp: fixed SystemCapabilities TLV
This patch removes 'Subtype' byte from SystemCapabilities TLV.
There was an inconsistency in offical IEEE document which was corrected
in 802.1AB-2009/Cor 1-2013.

Signed-off-by: Marcin Chron <marcin_miko1@o2.pl>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-06-20 10:42:26 +09:00
FUJITA Tomonori
c29c9019ac Ryu 4.25
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
v4.25
2018-06-01 20:43:17 +09:00
Joe Mader
cda5bc7825 allow versions of eventlet > 0.21.0 2018-05-13 09:40:00 -06:00
FUJITA Tomonori
1c008060fa Ryu 4.24
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
v4.24
2018-04-01 15:15:49 +09:00
IWAMOTO Toshihiro
b8ebdbe961 ofproto: add Nicira extension ct_clear action
Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-03-28 18:02:06 +09:00
IWASE Yusuke
4e10ba4438 ofproto: Encode data field on OFPErrorMsg
Currently, when Ryu failed to negotiate the OpenFlow version with a
switch, Ryu will send the OFPT_ERROR message with an error reason on its
data field.
But on Python 3, error reason string is a str type value and required to
be encoded into a bytes type value, otherwise causes an exception when
sending the message.

This patch fixes to encode the given str value into a bytes type value
in OFPErrorMsg.__init__() and solves this problem.

Signed-off-by: William Fisher <william.w.fisher@gmail.com>
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-03-26 22:11:39 +09:00
IWASE Yusuke
3003d475d2 ofp_handler: Close socket when HELLO failed
With this patch, when failed to negotiate the OpenFlow version with a
switch, Ryu will close the socket connecting to the switch after sending
a OFPT_ERROR message.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-03-26 22:11:38 +09:00
IWASE Yusuke
afbc80352c controller: Wait for switch to disconnect connection
If a sender closes a socket immediately after sending some data, a
receiver can fail to receive full data from the sender.

This patch fixes to shutdown a socket with "SHUT_WR" (disallows further
sends only) and enables "Datapath" to wait for a switch to disconnect
the connection.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-03-26 22:11:32 +09:00
IWASE Yusuke
7a40d5c2f3 controller: Option to close socket after sending Message
Currently, Ryu does not provide the way to close a socket connecting to
a switch after sending all enqueued messages, but provides only the way
to close the socket immediately regardless of enqueued messages.

This patch adds a new option "close_socket" into "Datapath.send_msg()"
method and this option enables to close the socket after sending the
given message. This patch is convenient to close the socket after
sending OFPT_ERROR message to the switch.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-03-26 22:11:25 +09:00
IWASE Yusuke
976914f5e6 controller: Improve pylint result
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-03-26 22:11:19 +09:00
IWASE Yusuke
fe06d87f65 test_requirements: Avoid using pip as library
Because importing "pip" in Python scripts is not supported usage of
"pip", this patch fixes to use "pkg_resources" + "urllib" instead.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-03-26 15:55:20 +09:00
IWASE Yusuke
a27c56a054 utils: Remove "parse_requirements" function
This patch removes unused function "parse_requirements" in order to
avoid using "pip" as a Python library.

Note: Officially "from pip import req as pip_req" is not supported usage
of "pip".

Reported-by: Katsaounis Molyvas Stamatios <mokats@intracom-telecom.com>
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-03-26 15:55:18 +09:00
Thomas Bechtold
e6773539b5 Switch to msgpack in pip-requires
msgpack-python got renamed to msgpack[1] so use the new name.

[1] https://pypi.python.org/pypi/msgpack/0.5.1

Signed-off-by: Thomas Bechtold <tbechtold@suse.com>
Acked-By: Iwase Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-03-20 22:36:04 +09:00
IWASE Yusuke
a0f90115cc nicira_ext: Support DEC_NSH_TTL action
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-03-20 22:32:51 +09:00
IWASE Yusuke
684b665290 nicira_ext: Support Network Service Header match
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-03-20 22:32:50 +09:00
IWASE Yusuke
0841f3f253 doc: Fix unexpected indent in ofctl.api doc
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-03-05 20:28:17 +09:00
FUJITA Tomonori
8a48b62c90 Ryu 4.23
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
v4.23
2018-03-02 10:29:20 +09:00
IWASE Yusuke
09d2811569 doc: Document for ryu.lib.ovs
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-02-10 18:45:58 +09:00
IWASE Yusuke
bd384997ac lib/ovs: Fix a typo of "--may-exist" option
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-02-10 18:45:58 +09:00
FUJITA Tomonori
fb224e23b9 Ryu 4.22
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
v4.22
2018-02-01 20:56:39 +09:00
IWASE Yusuke
fa172559c5 bgp/application: Add note for BGPSpeaker API reference
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-01-23 17:16:47 +09:00
IWASE Yusuke
7d0b080e73 BGPSpeaker: Move docstring from __init__ to class
By the default, Sphinx does not include __init__() method for the
"autoclass" directive, and currently the description for the arguments
of BGPSpeaker is not generated.

This patch moves the docstring of __init__() to the class's docstring
and enables to generate the docs for the arguments of __init__().

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-01-23 17:16:45 +09:00
IWASE Yusuke
80312a4d64 BGPSpeaker: Enable to notify adj-RIB-in changed
This patch introduces a new argument "adj_rib_in_change_handler" into
BGPSpeaker and enables to notify adj-RIB-in changed to watchers.

Also this patch enables to "bgp.application.RyuBGPSpeaker" to notify a
new event EventAdjRibInChanged to other Ryu applications.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-01-23 17:16:41 +09:00
IWASE Yusuke
e81ec3fb01 ofctl: Enable to get all datapath objects
Also, updates the API document of ryu.app.ofctl.api.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-01-17 08:46:53 +09:00
IWASE Yusuke
37c73db7b1 confroller/dpset: Add usage example of instantiation
This patch adds the example to explain how to register dpset.DPSet
service and how to get DPSet instance from user application in order to
call the API of DPSet.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-01-17 08:46:52 +09:00
IWASE Yusuke
81cdd4f0d7 test_rpc: Adopt to msgpack-python>=0.50
msgpack-python version 0.50 or later supports bytearray objects, this
patch fixes to adopt to this change.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-01-17 08:46:14 +09:00
IWASE Yusuke
c3b484c787 doc: Usage for ryu/services/protocols/bgp/application.py
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-01-17 08:46:13 +09:00
FUJITA Tomonori
8287e3513a Ryu 4.21
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
v4.21
2018-01-02 13:49:50 +09:00
IWASE Yusuke
6e3eccb453 *: Apply autopep8
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-12-17 19:27:47 +09:00
IWASE Yusuke
83650576e4 travis: Introduce autopep8 test
This patch add a new test using "autopep8" to keep codes reformatted
easily by using Python tool.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-12-17 19:27:46 +09:00
IWASE Yusuke
d64db265b3 *: Adopt to pycodestyle's checks
This patch adopts to the following pycodestyle's checks;
  E275: missing whitespace after keyword
  E305: expected 2 blank lines after end of function or class

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-12-17 19:27:42 +09:00
IWASE Yusuke
bdf3549563 pycodestyle: Replace pep8
pep8 has been renamed to pycodestyle and will be removed in a future
release.

This patch replaces pep8 by pycodestyle and adding some settings for
pycodestyle.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-12-17 19:27:41 +09:00
IWASE Yusuke
870dcab678 ofproto_v1_5_parser: oxm_ids with name str in OFPActionCopyField
Currently, oxm_ids argument of OFPActionCopyField should be a list of
OFPOxmId instances, but this patch enables to specify with the OXM field
name as the str type value which is corresponding to the keywords of
OFPMatch.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-12-17 19:27:33 +09:00
IWASE Yusuke
4602651b2c ofproto_v1_5_parser: Missing trailing pads of OFPActionCopyField
OpenFlow Spec 1.5 says OFPActionCopyField has the trailing paddings to
make the action a whole multiple of 8 bytes in length.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-12-17 19:27:33 +09:00
IWASE Yusuke
aa9f3f483c ofproto_v1_5_parser: Fix length calculation of OFPOxmId
Currently, the oxm_length field is always composed with zero value
because OpenFlow Spec does not still clarify whether its value should be
doubled if the hasmask bit is set.

This patch fixes to compose the oxm_length value with the payload length
because Open vSwitch strictly checks the oxm_length which contained in
the OFPAT_COPY_FIELD action (introduced at OpenFlow 1.5), and this
causes the OFPT_ERROR messages then flows will not be installed.

Note: This patch does not backport this fix to ofproto_v1_3_parser.py
and ofproto_v1_4_parser.py because those modules are tested based on the
implementation of "linc/of_protocol" which supposes the oxm_length is
always zero. Also OFPOxmId should be rarely serialized at the controller
side when using OpenFlow 1.3 or 1.4.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-12-17 19:27:31 +09:00
Felician Nemeth
385b628d70 ovsdb: Fix small bug
Signed-off-by: Felicián Németh <nemethf@tmit.bme.hu>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-12-11 23:42:31 +09:00
IWAMOTO Toshihiro
1493f51daa packet_data_generator3: Generate OF13 Ext-230 bundle packets
Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-12-11 22:35:10 +09:00
IWAMOTO Toshihiro
381216075f packet_data_generator3: Support ovs-2.8
From ovs 2.8, ovs-ofctl tries to collect port descriptions, which
isn't handled by the fake server in gen.py.  Pass the --no-names
option to work around this.

Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-12-11 22:35:09 +09:00
IWAMOTO Toshihiro
9fa0b58199 ofproto_v1_3: Add bundle extension
Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-12-11 22:35:05 +09:00
IWAMOTO Toshihiro
98ea9024ed ofproto: Correct OFPBundle{Ctrl, Add}Msg docstrings
Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-12-11 22:34:16 +09:00
IWASE Yusuke
bf83292364 rest_vtep: Add some descriptions for troubleshooting
This patch adds some notes about the settings when using the Mininet
VMs for the environment on which rest_vtep.py running.

Reported-by: Varun Amrutiya <h20170244@pilani.bits-pilani.ac.in>
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-12-11 22:34:00 +09:00
IWASE Yusuke
7e6f3f00ed topology: Enable to detect migrations of hosts
Currently, the topology library does not update the position of a host
which was detected before even if the host migrated to another port.

This patch enables to detect the migrations of the hosts when the host
is detected on another port.

Reported-by: Mahmoud Elzoghbi <mahmoud.said.elzoghbi@gmail.com>
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-12-11 22:33:41 +09:00