3042 Commits

Author SHA1 Message Date
FUJITA Tomonori
35e12d858c Ryu 4.12
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
v4.12
2017-03-02 15:38:47 +09:00
IWASE Yusuke
9420884db4 hub.StreamServer: Ommit validation for IPv4 address
To support the case that user specifies the host address like
'localhost', this patch removes the validation of the given address
as IPv4 address family and fixes to try listening as IPv4 by default.
Then, the validation will be handled in "eventlet.listen()".
This behavior is the same as that of before supporting the unix domain
socket.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-28 22:37:40 +09:00
IWASE Yusuke
a134362526 wsgi: Change default wsgi listen host to "0.0.0.0"
With netaddr.valid_ipv4/6, empty host is not allowed and will fail
to validate.
This patch changes to the default wsgi listen host to "0.0.0.0"
and enable to validate it by using netaddr.

Note: The default behavior is NOT changed.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-24 22:20:54 +09:00
IWASE Yusuke
7baa456696 zebra: Add sample application for Zebra server service
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-22 12:23:33 +09:00
IWASE Yusuke
8914385148 zebra: Implement Server APIs for Zebra protocol service
This patch implements APIs for performing as Zebra daemon of Quagga
and enables to integrate with other Quagga daemons.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-22 12:23:24 +09:00
IWASE Yusuke
1b486a0634 zebra: Implement database for Zebra protocol service
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-22 12:23:19 +09:00
IWASE Yusuke
dc57ff5b47 tools/optional-requires: SQLAlchemy for Zebra service
This patch adds a new optional requirements, SQLAlchemy, for Zebra
protocol service database.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-22 12:22:51 +09:00
IWASE Yusuke
d90589c2cc lib/netdevice: Constants defined in netdevice(7)
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-22 12:22:48 +09:00
IWASE Yusuke
793dc13e01 controller: Change default OPF listen host to "0.0.0.0"
With netaddr.valid_ipv4/6, empty host is not allowed and will fail
to validate.
This patch changes to the default openflow listen host to "0.0.0.0"
and enable to validate it by using netaddr.

Note: The default behavior is NOT changed.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-22 12:22:46 +09:00
IWASE Yusuke
9efde1d2f5 hub: Enable StreamServer to listen Unix domain socket
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-22 12:22:38 +09:00
IWASE Yusuke
fd3bfb55de zebra: Add sample application for Zebra client service
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-22 12:22:30 +09:00
IWASE Yusuke
e5a0974508 Implement Zebra protocol client service
This patch implements APIs for performing as a protocol daemon of Quagga
such as "ripd", "ospfd", "bgpd", for example.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-22 12:22:29 +09:00
IWASE Yusuke
c1f810b9b1 bgp/utils/bgp: Use lib/ip for Python 3 compatibility
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-22 11:38:01 +09:00
IWASE Yusuke
fd96d24314 BGPSpeaker: Use isinstance(*, bool) for boolean check
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-22 11:37:57 +09:00
IWASE Yusuke
ef3eefb2ad BGPSpeaker: Support Route Reflector features [RFC4456]
This patch implements the features for acting as a Route Reflector
which defined in RFC4456.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-22 11:37:52 +09:00
IWASE Yusuke
e06ec47232 packet/zebra: Enable to specify "prefix" arg in str
Currently, "prefix" argument should be an instance of IPv4Prefix or
IPv6Prefix in some Zebra message body classes.
But for the convenience, this patch enables to specify "prefix" in
the str type representation.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-17 20:14:02 +09:00
IWASE Yusuke
88aaba68bb lib/ip: Add wrapper for netaddr.valid_ipv4/6
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-17 20:14:00 +09:00
Albert Siersema
15a12a7a6a allow_local_as_in_count : allow local ASN in AS patch, e.g. "rd auto/route-target both auto"
Cisco/Juniper/Cumulus and undoubtedly more vendors offer a
simplification of the EVPN configuration by not having to
specify individual RD/RT's, e.g. in Cisco NX-OS syntax:

evpn
    vni 10311 l2
      rd auto
      route-target import auto
      route-target export auto

This simplifies/unifies the configuration.
All leaf switches/ryu instances share the same ASN (e.g. 65511).
Spine switches in the same layer can share an ASN as well (e.g. 65510).

To facilitate the above, the local ASN has to be accepted in the AS path.
To this end, Cisco includes an 'allowas-in' configuration statement.
See:
http://www.cisco.com/c/en/us/products/collateral/switches/nexus-9000-series-switches/guide-c07-734107.html
search for "MP-eBGP Design with VTEP Leaf Nodes in the Same BGP
Autonomous System"

This patch offers the possibility to specify the number of accepted
occurrences
of the local ASN in incoming AS paths. The default value is 0, which basically
is the same as the code before this patch: local ASN in the path
indicates a loop.
Non-zero values allow the local ASN to appear the specified number of times in
the AS path. A maximum value of 3 should satisfy most deployments.

Signed-off-by: Albert Siersema <albert@mediacaster.nl>
2017-02-11 14:59:51 +09:00
IWASE Yusuke
e13f46b256 BGPSpeaker: Advertise VNI on EVPN Multicast Ethernet-Tag
For the interoperability with other MP BGP EVPN VXLAN implementations
(e.g., Cisco NX-OS), this patch enables to advertise the VNI with the
PMSI Tunnel attribute on the Inclusive Multicast Ethernet Tag Route
messages.

Suggested-by: Albert Siersema <albert@mediacaster.nl>
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-11 14:41:08 +09:00
IWASE Yusuke
6e78aa3b94 BGPSpeaker: Allow empty IP Address in EVPN advertisement
For the EVPN MAC/IP Advertisement Route, IP Address field might be
omitted in case of the L2VPN MAC advertisement (e.g., Cisco NX-OS).
This patch allows to specify the empty IP Address to advertise.

This patch is suggested by Albert Siersema for the interoperability
with other MP BGP EVPN VXLAN implementations.

Suggested-by: Albert Siersema <albert@mediacaster.nl>
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-11 14:41:07 +09:00
IWASE Yusuke
b0c9da18a0 RyuBGPSpeaker: Enable to notify BGP events
This patch enables RyuBGPSpeaker, which is a base Ryu application for
creating user BGP applications, to notify the BGP events corresponding
to 'best_path_change_handler', 'peer_down_handler' and 'peer_up_handler'
of bgpspeaker.BGPSpeaker.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-11 14:21:04 +09:00
IWASE Yusuke
d2a97b16aa ofctl_v1_*: Use utility functions of ofctl_utils
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-11 14:21:04 +09:00
IWASE Yusuke
dffb3d3cf6 ofctl_v1_*: Use str_to_int instead of builtin int
This patch fixes lib/ofctl_v1_* to use the utility function str_to_int()
instead of the builtin function int().
With this change, lib/ofctl_v1_* can convert the user input values into
integer even if non-decimal string values (e.g. hexadecimal "0x80").

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-11 14:21:04 +09:00
Shinpei Muraoka
83bf7fae1d test_bgp: Add test cases for Flow Specification
This patch adds the test cases for
Flow Specification NLRI in MP_REAACH NLRI and
Traffic Filtering Actions in EXTENDED_COMMUNITIES.

Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-11 14:21:04 +09:00
Shinpei Muraoka
79741fdc88 packet/bgp: Support Flow Specification
Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-11 14:21:04 +09:00
Shinpei Muraoka
838708a32a pakcket/bgp: pylint
Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-11 14:21:04 +09:00
IWASE Yusuke
c4218ccde3 BGPSpeaker: Support to advertise Type 1, 2 Route Target
Currently, BGPSpeaker supports only type 0 (Two-Octet AS-Specific) Route
Target (or Route Distinguisher).
This patch enables to advertise Type 1 (IPv4-Address-Specific) and Type
2 (Four-Octet AS-Specific) Route Targets.

Reported-by: Albert Siersema <albert@mediacaster.nl>
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-11 14:21:04 +09:00
FUJITA Tomonori
6c92a75aa8 Ryu 4.11
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
v4.11
2017-02-04 15:00:43 +09:00
IWASE Yusuke
37391bb5bd utils: Re-implement parse_requirements
This patch re-implements utils.parse_requirements() without retrieving
code from OpenStack.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-01-23 22:26:29 +09:00
fumihiko kakuma
e9099345d2 docker_base.py: fix an ip option of "docker network connect"
ip address with subnet is ignored in ip option of "docker network connect"
This patch specifies a correct ip format for option.

Signed-off-by: Fumihiko Kakuma <kakuma@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-01-23 22:24:15 +09:00
IWASE Yusuke
17e2e51924 library_packet_ref: Add doc for Zebra packet library
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-01-23 22:23:24 +09:00
IWASE Yusuke
8ed4e24fb1 test_zebra: Unit tests for Zebra packet library
The pcap files for Zebra protocol were generated by:
  v2: Quagga 0.99.24.1 (Ubuntu 14.04 LST packaged version)
  v3: Quagga 1.1.0 (from Git source)

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-01-23 22:23:23 +09:00
IWASE Yusuke
0662e9024d packet/zebra: Add Zebra protocol parser
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-01-23 22:23:22 +09:00
IWASE Yusuke
1513ac9f95 bgp_scenario_test: Clean previous builds before installing
On Python3 Docker image, "python setup.py install" might fail in case
that the current directory contains the symlink to Docker host file
system and the link target is not visible from container.
e.g.)
  .tox/py34/include/python3.4m -> /usr/include/python3.4m

This patch fixes to remove .tox directory on Docker container and also
clean the previous builds before installing.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-01-23 21:59:31 +09:00
Yury Kulazhenkov
9ccec7bb5a sync ryu.services.protocols.ovsdb.client.Idl code with ovs lib
The ovs library has changed its implementation of the idl.Idl class. The
CTOR in ryu.services.protocols.ovsdb.client.Idl updated to be compatible
with the current version.

Patch fix the problem:
    if table.cond_changed:
AttributeError: 'TableSchema' object has no attribute 'cond_changed'

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-01-16 16:28:22 +09:00
Olivier DESNOE
6d4b094dc3 packet lib: adding DHCPv6 support
Signed-off-by: Olivier DESNOE <olivier.desnoe@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-01-14 22:48:23 +09:00
Shinpei Muraoka
2197fd55d1 doc: library_packet_ref: Add reference of openflow
Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-01-14 22:11:10 +09:00
Shinpei Muraoka
ca1a2a2781 test_openflow: Add unit tests for OpenFlow packet library
Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-01-14 22:11:09 +09:00
Shinpei Muraoka
82b113afb6 packet lib: Add packet library of OpenFlow
Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-01-14 22:11:06 +09:00
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