2995 Commits

Author SHA1 Message Date
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
Shinpei Muraoka
c4a84cb246 packet/bgp: Fix the ESI Label Extended Community to use mpls_label
Currently, ESI Label in BGPEvpnEsiLabelExtendedCommunity
has 3 byte integer set.
This patch fixes to use the mpls_label for ESI Label
of BGPEvpnEsiLabelExtendedCommunity.

Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-10 14:56:59 +09:00
FUJITA Tomonori
a3c1a8e06b Ryu 4.9
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
v4.9
2016-12-05 16:37:18 +09:00
fumihiko kakuma
5c5345e78c scenario test: Fix the wrong retry check in command execution
Signed-off-by: Fumihiko Kakuma <kakuma@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-11-24 15:14:35 +09:00
fumihiko kakuma
580f04d8a9 Enable to run a scenario test with a specific python version
Signed-off-by: Fumihiko Kakuma <kakuma@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-11-24 15:14:34 +09:00
IWASE Yusuke
d4d02dd0f6 rest_firewall: Compare reserved port in str representation
Along with the update of ofctl_rest, the output representation of
the port number in the OUTPUT action has been changed.
e.g.) In case of the OUTPUT action to the OFPP_NORMAL port
  OLD:
    'OUTPUT:4294967290'  # OFPP_NORMAL = 0xfffffffa
  NOW:
    'OUTPUT:NORMAL'

Currently, rest_firewall suposes the OLD format, and it will fail
to compare the port number, then all firewall rules will be shown
with "actions": "DENY".
This patch fixes to compare the port number in the NEW format and
fixes this problem.

Reported-by: Hong Panha <c011361065@edu.teu.ac.jp>
Reported-by: Ruy Takata <ruy.takata@gmail.com>
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-11-18 15:56:45 +09:00
IWASE Yusuke
156b3d2a6e test_vsctl: Use osrg/ryu-book image as Mininet container
This patch fixes test_vsctl.py to use osrg/ryu-book image as
Mininet container and shortens the testing hours.

Also, this patch removes the Dockerfile for building the Mininet
Docker image.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-11-18 15:56:33 +09:00
IWASE Yusuke
fbda130ebf test_vsctl: Wait for loading OVS kernel module
If the OVS kernel module is loaded at first time, it might take
a few seconds.
This patch add a sleep before sending OVSDB requests.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-11-18 15:55:01 +09:00
IWASE Yusuke
33ecea2dd6 integrated/bgp: Use Ubuntu:16.04 for base image
Using osrg/ryu Docker image for the base image make it easy to build
the image for the integrated tests, but the installed packages are
remained on the site-packages unless they are explicitly uninstalled.
This problem can cause the miss configured dependency when the
requirment files are updated, for example.

This patch fixes to use Ubuntu:16.04, which is the default for the
base image, and to build the test image on the clean environment.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-11-18 15:54:53 +09:00