3003 Commits

Author SHA1 Message Date
FUJITA Tomonori
ca5afabce9 Ryu 4.10
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
v4.10
2017-01-06 05:52:53 +09:00
Shinpei Muraoka
25a15406f6 library_packet_ref: Update dhcp reference method
Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-01-06 05:27:09 +09:00
Shinpei Muraoka
c893ba04f7 test_dhcp: Extend unit test for fragmented options
Also, this patch removes the test case for __init__()
with "hlen" is zero,
because "hlen" should be recalculated at serialization.

Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-01-06 05:27:08 +09:00
Shinpei Muraoka
d908aff00c packet/dhcp: Revert b'str' conversion
This patch partially reverts 75e8c58916524243e6796e73c371981e14fff6ee
and 536a42d8c1c0be48e78d5f29b6fd55a38012d953.  dhcp.boot_file is ascii.

Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-01-06 05:27:07 +09:00
Shinpei Muraoka
a4d4291d10 packet/dhcp: Support fragmented options
Currently, if you set fragmented option data
for the packet library of dhcp, Traceback occurs.
This patch fixes to analyze up to options not corrupting data.
The remaining corrupting data will be appended
at the end of option list.

Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-01-06 05:26:59 +09:00
IWASE Yusuke
42c71ad0e6 BGPSpeaker/net_ctrl: Support multiple RPC sessions
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-29 22:58:50 +09:00
IWASE Yusuke
8555dda0f2 BGPSpeaker/base: Stop child activity by name
This patch enables Activity base to stop the child activity by name.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-29 22:58:49 +09:00
IWASE Yusuke
27b253d06e BGPSpeaker/net_ctrl: Move _send_*_response() function
This patch moves _send_*_response() function into RpcSession class
to use socket wrapper methods for maintaining the connection state
safely.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-29 22:58:43 +09:00
IWASE Yusuke
f1edc9fbd0 BGPSpeaker/net_ctrl: Close RPC session when disconnected
This patch fixes net_ctrl to check whether socket is connected and
to close RPC session when disconnected by RPC peer.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-29 22:58:38 +09:00
IWASE Yusuke
fcea0dc2af BGPSpeaker/net_ctrl: Pylint and fixes of typos
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-29 22:58:34 +09:00
IWASE Yusuke
7e30cf6b01 rpc_cli: Avoid to use eval()
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-29 22:58:23 +09:00
IWASE Yusuke
98a3b03792 rpc_cli: Close peer connections when exiting prompt
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-29 22:58:22 +09:00
IWASE Yusuke
daea96645a rpc_cli: Enable to execute a single command
This patch enables 'ryu rpc-cli' command to execute a single command
not interactively.

e.g.)
$ ryu rpc-cli --peers=bgp=localhost:50002 \
  --command='request bgp operator.show [{"params": ["rib", "ipv4"]}]'

This feature is convenient to controle BGPSpeaker states via shell
commands, for example.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-29 22:58:19 +09:00
IWASE Yusuke
49461e84ec ryu/app: Use Request/Response wrappers in REST Apps
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-29 22:14:01 +09:00
IWASE Yusuke
40178c92b2 wsgi: Wrapper classes of Request/Response in WebOb
With WebOB 1.7.0+, "charset" can not be omitted when constructing
Request/Response instance and exception will occur if omitted.
This patch adds wrapper classes of Request/Response for setting
charset="UTF-8" by default.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-29 22:13:56 +09:00
Shinpei Muraoka
95702135d4 library_bgp_speaker_ref: Fix unexpected unindent
This patch fixes unexpected unindent that occur when building.
Also, add ESI type to be specified for argument
esi of evpn_prefix_add and evpn_prefix_del.

Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-29 22:06:52 +09:00
IWASE Yusuke
6ebf0f7e4a optional-requires: Specify lxml version for OpenStack
OpenStack added "lxml!=3.7.0" into its requirements file, and this
patch adds the same specification for avoiding VersionConflict
error while installing.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-29 22:05:50 +09:00
IWASE Yusuke
73d331312e ryu-client: Remove client for OpenStack plugin/agent
This patch removes remaining of OpenStack Ryu plugin and agent.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-29 22:05:35 +09:00
IWASE Yusuke
cf1a2f37c8 doc: Deprecate OpenStack plugin ref
Because the Ryu plugin for OpenStack was deprecated and the description
in "using_with_openstack.rst" is obsoleted, this patch removes the link
to this page from the index and adds the cautions for it.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-29 22:05:27 +09:00
Shinpei Muraoka
eb646cee24 test_geneve: Add unit tests for Geneve
Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-29 22:04:26 +09:00
Shinpei Muraoka
b6c1189cc9 packet lib: Add packet library of Geneve
Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-29 22:04:20 +09:00
Shinpei Muraoka
6ea6e86e16 test_gre: Add unit tests for NVGRE
This patch adds test case of NVGRE.
Also, fixes unit tests for GRE to the method using packet capture.
For that reason, add packet capture files.

Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-29 22:04:15 +09:00
Shinpei Muraoka
19e415a19d packet/gre: Support NVGRE extension
Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-29 22:04:13 +09:00
Shinpei Muraoka
d1c275ed6f doc: library_packet_ref: Update references
Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-29 22:03:38 +09:00
IWASE Yusuke
9b2cb18729 rest_router: Fix ARP THA in reply message
Currently, rest_router sends ARP reply messages composing own MAC
address in Target MAC Address, and both Sender/Target MAC address
are MAC address of rest_router.
So, with this reply messages, Wireshark will report "Duplicate IP
address detected".
This patch fixes this problem.

This problem was reported by China Shenzhen TICOMM Information
Technology Co. Ltd.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-29 22:02:40 +09:00
IWASE Yusuke
cad9c8a940 install_docker_test_pkg: Remove unnecessary pip pacakges
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-14 13:23:33 +09:00
IWASE Yusuke
6da65f508e tox: Move dependencies installation to .travis.yml
This patch moves dependencies installation in tox.ini to .travis.yml
in order to avoid to install dependencies repeatedly when running
tox tests on locally.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-14 13:23:32 +09:00
IWASE Yusuke
f152c69ee0 bgp_scenario_test: Switch Python version
With Ubuntu base Docker image, Python 2.7 will always be used on
Scenario test containers if we just install "python-*".

This patch fixes to switch base Docker image and enables to use
the specific Python version.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-14 10:20:45 +09:00
IWASE Yusuke
c0e06c7ea7 test_requirements: Test cases for checking requirements
This patch adds the test cases for checking whether the requirements
of Ryu has no conflict with that of other projects (e.g., the global
requirements of OpenStack)

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-14 10:04:55 +09:00
IWASE Yusuke
c810965826 tox: Test ryu-manager without additional requirements
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-14 10:04:49 +09:00
IWASE Yusuke
1453f0f9e2 pip: Add doc requirements for convenience
This patch adds the requirements file for building the Ryu documentation.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-10 22:01:34 +09:00
IWASE Yusuke
bc9796b097 library_bgp_speaker_ref: Fix unexpected indentation
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-10 22:01:21 +09:00
IWASE Yusuke
f8fa7b68db doc: Add MRT file library reference
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-10 22:00:49 +09:00
IWASE Yusuke
d993e430ef test_mrtlib: Add unit tests for MRT paser
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-10 22:00:41 +09:00
IWASE Yusuke
b3804a8727 mrtlib: Add parser for MRT format [RFC6396]
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-10 22:00:34 +09:00
IWASE Yusuke
a6dc0bc8a7 packet/ospf: Reduce Pylint warnings
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-10 22:00:29 +09:00
IWASE Yusuke
5e8b6c69f2 type_desc: Define TypeDisp class for re-usability
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-10 22:00:22 +09:00
IWASE Yusuke
4a8c7245fa bgp_scenario_test/bgp: Pylint
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-10 21:40:07 +09:00
IWASE Yusuke
ee6cee3753 bgp_scenario_test/common: Pylint
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-10 21:40:05 +09:00
fumihiko kakuma
742c2a5e20 Delete an unnecessary function
Currently a scenario test doesn't use stream option of exec_on_ctn and
this function requires extra module(docker-py).
This patch deletes the unnecessary function.

Signed-off-by: Fumihiko Kakuma <kakuma@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-10 21:31:42 +09:00
fumihiko kakuma
46409763d4 Get some debug information
Get log for command execution error and ryu bgp app.

Signed-off-by: Fumihiko Kakuma <kakuma@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-10 21:31:34 +09:00
Omer Anson
b5d232d560 Add DHCP options constants to DHCP lib
Add DHCP options constants to DHCP lib for the following options:
* Domain name option (15)
* Interface MTU (26)
* Classless route (121)

These constants are used in Dragonflow, which uses ryu's DHCP lib to
construct a DHCP responder.

Signed-Off-By: Omer Anson <oaanson@gmail.com>

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-10 17:54:05 +09:00
IWASE Yusuke
e0c446a6b4 lib/ofctl_v_*: Enable to filter flow stats by priority
OpenFlow Spec does not allow to filter flow entries by priority,
but when with a large amount of flow entries, filtering by priority
is convenient to get statistics efficiently.

This patch enables lib/ofctl_v_* modules to filter flow stats by
priority.

This patch is suggested by China Shenzhen TICOMM Information
Technology Co. Ltd.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-10 15:29:37 +09:00
IWASE Yusuke
002cbbe1ec packet/bgp: Fix default of esi for IP Prefix route
"esi" value should be an instance of EvpnEsi subclass and not int
type value, this patch fixes the default value to "None".

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-10 14:59:29 +09:00
IWASE Yusuke
88c5be07de BGPSpeaker: ESI to be optional arg in MAC/IP Adv route
The ESI field should not be a route key for BGP processing in EVPN
MAC/IP Advertisement route, this patch confirms "esi" is an optional
argument for this route.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-10 14:59:26 +09:00
IWASE Yusuke
9e5f9d9d37 packet/bgp: Support multiple next_hop in BGPPathAttributeMpReachNLRI
In case of the IPv6 address family in MP-BGP, NLRI might has multipule
next_hop addresses (e.g., one is global unicast address and the other
is link local unicast address).

This patch fixes to support multipule next_hop addresses in MP-BGP
NLRIs.
For the backward compatibility, this patch make it to stor the first
next_hop address as next_hop attribute and all next_hop addresses
as next_hop_list.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-10 14:57:49 +09:00
IWASE Yusuke
ad5ce12e70 packet/bgp: Unpack mpls_label in BGPPathAttributePmsiTunnel
The decoded mpls_labe should be return as a tuple of (mpls_labe,
is_bos).
This patch fixes to unpack the returned tuple.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-10 14:57:43 +09:00
IWASE Yusuke
430424aac0 stringify: Add optional attributes list to be displayed
Currently, propery type attributes are ignored in the str and json
representations.
If we want to include them, it is required to override to_jsondict()
and from_jsondict() methods.

This patch adds the optional attributes list to specify the addtional
attributes included in the str and json representations.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-10 14:57:37 +09:00
IWASE Yusuke
197a6c49a6 packet/bgp: Support multiple BGP messages in a packet
This patch fixes to BGPMessage.parser() to return the reference to
its own class and to support multiple BGP messages in a single packet.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-10 14:57:34 +09:00
Shinpei Muraoka
17acdbb610 BGPSpeaker: Support Ethernet A-D Route and Ethernet Segment Route
This patch supports Ethernet Auto-discovery Route and
Ethernet Segment Route in BGPSpeaker.

Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-10 14:57:01 +09:00