Re: [Ryu-devel] error in qos_simple_switch_13

2016-08-21 Thread Shinpei Muraoka
Hi Closing parentheses does not exist in line 57. Please try to impart closing parentheses. >mod = parser.OFPFlowMod(datapath=datapath, priority=priority, >match=match, instructions=inst, table_id=1 Thanks, On 2016年08月20日 17:30, wesam kh wrote: > hi ry

[Ryu-devel] [PATCH 1/3] ofproto: Enable to specify packet library for OFPPacketOut.data

2016-08-21 Thread Shinpei Muraoka
So far if you set the packet library to OFPPacketOut.data, error occurred. This patch will be able to set the packet library in OFPPacketOut.data. Signed-off-by: Shinpei Muraoka --- ryu/ofproto/ofproto_v1_0_parser.py | 30 +++--- ryu/ofproto/ofproto_v1_2_parser.py | 31 ++

[Ryu-devel] [PATCH 0/3] Enable to specify packet library for OFPPacketOut.data

2016-08-21 Thread Shinpei Muraoka
Shinpei Muraoka (3): ofproto: Enable to specify packet library for OFPPacketOut.data lib/packet: Support the Json format data tests: Add tests for specifying Packet library for OFPPacketOut.data ryu/lib/packet/packet.py | 39 - ryu/ofproto/ofproto_v1_0

[Ryu-devel] [PATCH 2/3] lib/packet: Support the Json format data

2016-08-21 Thread Shinpei Muraoka
Signed-off-by: Shinpei Muraoka --- ryu/lib/packet/packet.py | 39 +-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/ryu/lib/packet/packet.py b/ryu/lib/packet/packet.py index 85e826f..043dae7 100644 --- a/ryu/lib/packet/packet.py +++ b/ryu/lib/p

[Ryu-devel] [PATCH 3/3] tests: Add tests for specifying Packet library for OFPPacketOut.data

2016-08-21 Thread Shinpei Muraoka
Signed-off-by: Shinpei Muraoka --- ...roto-OFP10-ofp_packet_out_packet_library.packet | Bin 0 -> 122 bytes ...roto-OFP12-ofp_packet_out_packet_library.packet | Bin 0 -> 138 bytes ...roto-OFP13-ofp_packet_out_packet_library.packet | Bin 0 -> 138 bytes ...roto-OFP14-ofp_packet_out_packet_library

[Ryu-devel] [PATCH 08/20] test_bgpspeaker: Add unit test for the API of EVPN

2016-08-21 Thread IWASE Yusuke
Signed-off-by: IWASE Yusuke --- .../unit/services/protocols/bgp/test_bgpspeaker.py | 276 + 1 file changed, 276 insertions(+) create mode 100644 ryu/tests/unit/services/protocols/bgp/test_bgpspeaker.py diff --git a/ryu/tests/unit/services/protocols/bgp/test_bgpspeaker.py b/

[Ryu-devel] [PATCH 19/20] doc: Update the API Reference for BGPSpeaker

2016-08-21 Thread IWASE Yusuke
Signed-off-by: IWASE Yusuke --- ryu/services/protocols/bgp/bgpspeaker.py | 66 ++--- ryu/services/protocols/bgp/info_base/base.py | 85 +--- 2 files changed, 72 insertions(+), 79 deletions(-) diff --git a/ryu/services/protocols/bgp/bgpspeaker.py b/ryu

[Ryu-devel] [PATCH 07/20] BGPSpeaker: Support Ethernet VPN update messages

2016-08-21 Thread IWASE Yusuke
This patch enables BGPSpeaker to advertise BGP EVPN routes and store the advertised BGP EVPN routes from the neighbors. TODO: - To support the VRF table for BGP EVPN routes. This patch supports the global table only. - To implement Multihoming Functions. Currently, ONLY Single-Homing is su

[Ryu-devel] [PATCH 12/20] test_table_manager: Add UTs for the Global Table API

2016-08-21 Thread IWASE Yusuke
Signed-off-by: IWASE Yusuke --- .../bgp/core_managers/test_table_manager.py| 91 ++ 1 file changed, 91 insertions(+) diff --git a/ryu/tests/unit/services/protocols/bgp/core_managers/test_table_manager.py b/ryu/tests/unit/services/protocols/bgp/core_managers/test_tab

[Ryu-devel] [PATCH 11/20] table_manager: Rename internal API for consistency

2016-08-21 Thread IWASE Yusuke
This patch remames the internal (not for users) API for the consistency, and add missing docstring. Signed-off-by: IWASE Yusuke --- ryu/services/protocols/bgp/api/rtconf.py | 4 ++-- .../protocols/bgp/core_managers/table_manager.py | 20 +--- 2 files changed, 15

[Ryu-devel] [PATCH 10/20] test_table_manager: Add UTs for the VRF Table API

2016-08-21 Thread IWASE Yusuke
Signed-off-by: IWASE Yusuke --- .../protocols/bgp/core_managers/table_manager.py | 4 + ryu/services/protocols/bgp/info_base/vrf.py| 5 + .../protocols/bgp/core_managers/__init__.py| 0 .../bgp/core_managers/test_table_manager.py| 264 + 4 files

[Ryu-devel] [PATCH 09/20] BGPSpeaker: Support VRF Table for Ethernet VPN

2016-08-21 Thread IWASE Yusuke
This patch enables BGPSpeaker to store EVPN routes into the VRF tables and to provide the API for advertising routes. Usage example: speaker = BGPSpeaker(as_number=65001, router_id='172.17.0.1') speaker.neighbor_add(address='172.17.0.2', remote_as=65002,

[Ryu-devel] [PATCH 16/20] BGPSpeaker: Raise exception when validation fails

2016-08-21 Thread IWASE Yusuke
In the validator for the API arguments should raise exception when the validator detects invalid arguments, otherwise the decorator for registering API functions, RegisterWithArgChecks, can pass through the invalid arguments. This patch fixes this problem. Signed-off-by: IWASE Yusuke --- ryu/se

[Ryu-devel] [PATCH 01/20] packet/bgp: Enable to parse the entire packet data

2016-08-21 Thread IWASE Yusuke
This patch fixes the TCP packet parser to return the BGP packet parser class if the TCP src or dst port is the reserved BGP port and enable to parse the entire packet data. Signed-off-by: IWASE Yusuke --- ryu/lib/packet/bgp.py | 8 ++-- ryu/lib/packet/bmp.py

[Ryu-devel] [PATCH 13/20] BGPSpeaker: Reduce Pylint warnings

2016-08-21 Thread IWASE Yusuke
Signed-off-by: IWASE Yusuke --- ryu/services/protocols/bgp/base.py | 32 ++--- ryu/services/protocols/bgp/bgpspeaker.py | 133 - .../protocols/bgp/core_managers/table_manager.py | 3 - .../protocols/bgp/operator/commands/show/rib.py| 10 +-

[Ryu-devel] [PATCH 20/20] BGPSpeaker: Suppress RD in EVPN VRF on SSH console

2016-08-21 Thread IWASE Yusuke
Because the NLRI_CLASS of the VRF EVPN Table is the same as the NLRI_CLASS of the Global EVPN Table, the str representation can not be distinguished with 'formatted_nlri_str' format. So, 'show vrf' commands on the SSH console returns the str outputs with Route Distinguisher (RD) even if the route o

[Ryu-devel] [PATCH 05/20] BGPSpeaker/info_base: Add comparison methods for Python3

2016-08-21 Thread IWASE Yusuke
Signed-off-by: IWASE Yusuke --- ryu/services/protocols/bgp/info_base/base.py | 18 ++ 1 file changed, 18 insertions(+) diff --git a/ryu/services/protocols/bgp/info_base/base.py b/ryu/services/protocols/bgp/info_base/base.py index 54e02bb..a11de7f 100644 --- a/ryu/services/protoc

[Ryu-devel] [PATCH 04/20] BGPSpeaker: Support Python3 on SSH console

2016-08-21 Thread IWASE Yusuke
Currently, SSH console of BGPSpeaker fails to recieve commands from user when it is running on Python3 due to the binary conversion. This patch fixes this problem and enables to use SSH console on Python3. Signed-off-by: IWASE Yusuke --- .../protocols/bgp/operator/commands/show/route_formatter_m

[Ryu-devel] [PATCH 03/20] test_bgp: Add unit tests for Ethernet VPN

2016-08-21 Thread IWASE Yusuke
Signed-off-by: IWASE Yusuke --- ryu/tests/packet_data/bgp4/evpn_esi_arbitrary.pcap | Bin 0 -> 156 bytes ryu/tests/packet_data/bgp4/evpn_esi_as_based.pcap | Bin 0 -> 156 bytes ryu/tests/packet_data/bgp4/evpn_esi_l2_bridge.pcap | Bin 0 -> 156 bytes ryu/tests/packet_data/bgp4/evpn_esi_lacp.pcap

[Ryu-devel] [PATCH 02/20] packet/bgp: Support MPLS-Based Ethernet VPN (RFC7432)

2016-08-21 Thread IWASE Yusuke
Signed-off-by: IWASE Yusuke --- ryu/lib/packet/afi.py | 1 + ryu/lib/packet/bgp.py | 806 +++-- ryu/lib/packet/safi.py | 1 + 3 files changed, 777 insertions(+), 31 deletions(-) diff --git a/ryu/lib/packet/afi.py b/ryu/lib/packet/afi.py index c84

[Ryu-devel] [PATCH 06/20] packet/bgp: Fix to serialize BGPNotification on Python3

2016-08-21 Thread IWASE Yusuke
Signed-off-by: IWASE Yusuke --- ryu/lib/packet/bgp.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ryu/lib/packet/bgp.py b/ryu/lib/packet/bgp.py index 697eff3..457f87b 100644 --- a/ryu/lib/packet/bgp.py +++ b/ryu/lib/packet/bgp.py @@ -3321,13 +3321,13 @@ class BGPNoti

[Ryu-devel] [PATCH 15/20] BGPSpeaker: Improve validation utility methods

2016-08-21 Thread IWASE Yusuke
This patch fixes to reduce Pylint warnings, to use 'netaddr' utilities and to reduce redundant if statements. Signed-off-by: IWASE Yusuke --- ryu/services/protocols/bgp/utils/validation.py | 190 +++-- 1 file changed, 82 insertions(+), 108 deletions(-) diff --git a/ryu/servi

[Ryu-devel] [PATCH 18/20] test_validation: Add unit tests for validation utilities

2016-08-21 Thread IWASE Yusuke
Signed-off-by: IWASE Yusuke --- .../unit/services/protocols/bgp/utils/__init__.py | 0 .../protocols/bgp/utils/test_validation.py | 203 + 2 files changed, 203 insertions(+) create mode 100644 ryu/tests/unit/services/protocols/bgp/utils/__init__.py create mode 100

[Ryu-devel] [PATCH 17/20] BGPSpeaker: Enable validation for optional arguments

2016-08-21 Thread IWASE Yusuke
Currently, RegisterWithArgChecks validates only required arguments, so invalid arguments might be passed through if the arguments are registered as optionals. This patch fixes to enable validation for optional arguments. Signed-off-by: IWASE Yusuke --- ryu/services/protocols/bgp/api/base.py | 12

[Ryu-devel] [PATCH 14/20] BGPSpeaker: Resolve unused argumet 'multi_exit_disc'

2016-08-21 Thread IWASE Yusuke
Signed-off-by: IWASE Yusuke --- ryu/services/protocols/bgp/bgpspeaker.py | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ryu/services/protocols/bgp/bgpspeaker.py b/ryu/services/protocols/bgp/bgpspeaker.py index 4608524..b6128ec 100644 --- a/ryu/services/protocols/bgp

[Ryu-devel] [PATCH 00/20] BGPSpeaker: Support MPLS-Based Ethernet VPN (RFC7432)

2016-08-21 Thread IWASE Yusuke
This patch enables BGPSpeaker to advertise MPLS-Based Ethernet VPN (RFC7432) routes and store the advertised BGP EVPN routes from the neighbors. Also, includes the Python3 compatibility improvements and the updates of the API reference of BGPSpeaker. IWASE Yusuke (20): packet/bgp: Enable to pars