summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2014-06-22bgp: fix a crash in path comparisonYAMAMOTO Takashi
this fixes the following crash. API method core.start called with args: {'router_id': '172.17.190.2', 'waiter':< <ryu.lib.hub.Event object at 0x7f903ed084d0>, 'bgp_server_port': 179, 'local_as: : 64512, 'refresh_max_eor_time': 0, 'refresh_stalepath_time': 0} API method neighbor.create called with args: {'cap_mbgp_vpnv6': False, 'ip_addrs ss': '172.17.190.3', 'cap_mbgp_vpnv4': False, 'remote_as': 64512, 'cap_mbgp_ipv' ': True} API method neighbor.create called with args: {'cap_mbgp_vpnv6': False, 'ip_addrs ss': '172.17.190.4', 'cap_mbgp_vpnv4': False, 'remote_as': 64512, 'cap_mbgp_ipv' ': True} Connection to peer: 172.17.190.3 established Connection to peer: 172.17.190.4 established the best path changed: 64512 0.0.0.0/0 172.17.190.3 False hub: uncaught exception: Traceback (most recent call last): File "/opt/ryu/ryu/lib/hub.py", line 52, in _launch func(*args, **kwargs) File "/opt/ryu/ryu/services/protocols/bgp/base.py", line 241, in start self._run(*args, **kwargs) File "/opt/ryu/ryu/services/protocols/bgp/processor.py", line 97, in _run self._process_dest() File "/opt/ryu/ryu/services/protocols/bgp/processor.py", line 114, in _proces_ _dest next_dest.process() File "/opt/ryu/ryu/services/protocols/bgp/info_base/base.py", line 396, in prc cess self._process() File "/opt/ryu/ryu/services/protocols/bgp/info_base/base.py", line 366, in _po ocess new_best_path, reason = self._process_paths() File "/opt/ryu/ryu/services/protocols/bgp/info_base/base.py", line 485, in _po ocess_paths current_best_path, reason = self._compute_best_known_path() File "/opt/ryu/ryu/services/protocols/bgp/info_base/base.py", line 588, in _cm mpute_best_known_path next_path) File "/opt/ryu/ryu/services/protocols/bgp/processor.py", line 252, in computeb best_path best_path = _cmp_by_router_id(local_asn, path1, path2) File "/opt/ryu/ryu/services/protocols/bgp/processor.py", line 495, in _cmp_byr router_id local_bgp_id = path_source1.protocol.sent_open.bgpid AttributeError: 'Peer' object has no attribute 'protocol' Tested-by: Itsuro ODA <oda@valinux.co.jp> Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-06-22library_bgp_speaker.rst: make an example more completeYAMAMOTO Takashi
also, while i'm here, remove trailing whitespaces in the example. Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-06-19ofa_neutron_agent: Change the copyright noticeYAMAMOTO Takashi
As a preparation to move this module to neutron repo, change the copyright notice to the style commonly found there. Also, add myself as co-author. Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-06-19ofa_neutron_agent: Remove unused logger instanceYAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-06-19ofa_neutron_agent: Use AppManager.run_appsYAMAMOTO Takashi
No functional changes are intended. Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-06-19AppManager: Add a convenient method to run appsYAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-06-19ofa_neutron_agent: SimplifyYAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-06-19app_manager: prevent loading unnecessary RyuAppsISHIDA Wataru
don't load RyuApps which is just imported and not defined in the module. for example, if we run the script "test.py" as shown below by $ ryu run test.py the past implementation loads and instantiates not only Test but also RyuApp and DPSet. this patch fix this wrong behavior test.py === from ryu.base.app_manager import RyuApp from ryu.controller.dpset import DPSet class Test(RyuApp): _CONTEXTS = {'dpset' : DPSet} Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-06-19package: add python-ryu-docYoshihiro Kaneko
This patch adds python-ryu-doc package which contains the HTML documentation generated from doc/. Also updates the man pages in doc/source/man/. Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-06-19sw test tool: Enable IPv6 flow label maskableYuichi Ito
OF 1.3.4 spec (B.15.1 Changes) says: Make IPv6 flow label maskable (EXT-101). This patch makes IPv6 flow label maskable, and adds a test file for IPv6 flow label with masks. Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-06-18document ryu.app.ofctlYAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-06-18ws_topology: shut up pep8 for long lines in a commentYAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-06-18bgp: support IPv6 peeringFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-06-18Add GUI appYAMADA Hideki
Signed-off-by: YAMADA Hideki <yamada.hideki@po.ntts.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-06-18ws_topology: Handle WebSocket disconnectionYAMADA Hideki
Signed-off-by: YAMADA Hideki <yamada.hideki@po.ntts.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-06-18ws_topology: Avoid controller name conflictionYAMADA Hideki
Signed-off-by: YAMADA Hideki <yamada.hideki@po.ntts.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-06-17add debian files to make packages for UbuntuYoshihiro Kaneko
Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-06-17app_manager: Stop checking h.callers in get_handlers()YAMAMOTO Takashi
dynamically registered handlers (vs. ones registered via set_ev_cls/handler decorators) do not necessarily have h.callers. Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-06-16bgp: catch socket error with sendallFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-06-16bgp: use sendall with lockFUJITA Tomonori
With the current design, multiple greenlets calls sendall() on a single tcp socket. This leads to a corrupted bgp message. This patch introduces mutex to work around the problem. However, I hope that we _fix_ the design where only one greenlet call sendall() on a signel tcp socket in the future. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-06-16bgp: use TCP_NODELAY for bgp connectionFUJITA Tomonori
Disables Nagle to send data immediately. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-06-15ryu.lib.hub: add logging wrapper for wsgi serverYoshihiro Kaneko
This patch adds a wrapper to relay the log of the wsgi server to the logger. Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-06-15contrib: import tinyrpc libraryYoshihiro Kaneko
https://pypi.python.org/pypi/tinyrpc/0.5 https://github.com/mbr/tinyrpc Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-06-15downgrade required version of msgpack-pythonYoshihiro Kaneko
For Ubuntu 14.04, downgrade the required version of msgpack-python. Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-06-14app_manager: Let application module to use require_app()YAMADA Hideki
Signed-off-by: YAMADA Hideki <yamada.hideki@po.ntts.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-06-13bgp: add bgpspaker module for non Ryu application usageFUJITA Tomonori
This enables you to use Ryu BGP feature as 'bgp speaker' python library, that is, without ryu-manager, RPC API, REST API, or other Ryu stuff, you can use Ryu BGP feature in your python application (just import bgpspeaker.py). The sample code and the API reference docs are included too. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Reviewed-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
2014-06-11fix failure of instantiating appYoshihiro Kaneko
For example, app-A has app-X in CONTEXTS, and app-B depends on app-X as SERVICE. When app-B is specified in the app-lists before app-A, the instantiating app-X fails by an assertion. $ PYTHONPATH=. bin/ryu-manager ryu.app.quantum_adapter ryu.app.gre_tunnel loading app ryu.app.quantum_adapter loading app ryu.app.gre_tunnel loading app ryu.controller.dpset loading app ryu.controller.ofp_handler loading app ryu.controller.ofp_handler loading app ryu.controller.ofp_handler instantiating app None of QuantumIfaces creating context quantum_ifaces instantiating app None of ConfSwitchSet creating context conf_switch instantiating app None of Network creating context network instantiating app None of Tunnels creating context tunnels instantiating app None of DPSet creating context dpset instantiating app ryu.app.gre_tunnel of GRETunnel instantiating app ryu.controller.dpset of DPSet Traceback (most recent call last): File "/opt/stack/ryu/bin/ryu-manager", line 19, in <module> main() File "/opt/stack/ryu/ryu/cmd/manager.py", line 77, in main services.extend(app_mgr.instantiate_apps(**contexts)) File "/opt/stack/ryu/ryu/base/app_manager.py", line 434, in instantiate_apps self._instantiate(app_name, cls, *args, **kwargs) File "/opt/stack/ryu/ryu/base/app_manager.py", line 421, in _instantiate register_app(app) File "/opt/stack/ryu/ryu/base/app_manager.py", line 50, in register_app assert app.name not in SERVICE_BRICKS AssertionError This patch avoid the double loading of app in context and service. Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-06-11fix: wrong copyrightFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-06-10sw test tool: Improve readability of IP mask valuesYuichi Ito
4294967040 -> "255.255.255.0" 4294902015 -> "255.255.0.255" 340282366920938463463374607431768145920 -> "ffff:ffff:ffff:ffff:ffff:ffff:ffff:0" 5192296858534827628530496329220095 -> "0:ffff:ffff:ffff:ffff:ffff:ffff:ffff" Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-06-10sw test tool: Improve readability of MAC mask valuesYuichi Ito
1099511627775 -> "00:ff:ff:ff:ff:ff" 281474976710400 -> "ff:ff:ff:ff:ff:00" 281474959998975 -> "ff:ff:ff:00:ff:ff" 281470698520575 -> "ff:ff:00:ff:ff:ff" Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-06-10sw test tool: Improve readability of padding dataYuichi Ito
str(\"\\x00\" * (60 - 42)) -> str('\\x00' * (60 - 42)) str(\"\\x11\" * (1500 - 54)) -> str('\\x11' * (1500 - 54)) '\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00' -> str('\\x00' * 30) Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-06-10sw test tool: Improve readability of tcp optionsYuichi Ito
option='\\x00\\x00\\x00\\x00' -> option=str('\\x00' * 4) option='\\x11\\x11\\x11\\x11' -> option=str('\\x11' * 4) Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-06-10rest_qos: Enable queue setting to interface individuallyKiyonari Harigae
Added an option command to enable the queue setting to interface individually. Also, some minor fixes. Signed-off-by: Kiyonari Harigae <lakshmi@cloudysunny14.org> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-06-10packet lib: add Connectivity Fault Management Protocol(CFM, IEEE 802.1ag)takahashi.minoru
Signed-off-by: TAKAHASHI Minoru <takahashi.minoru7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-06-10app_manager: Fix a crash in unregister_handlerYAMAMOTO Takashi
This fixes a regression introduced by commit d3f8f4eb. ("RyuApp: delete a key without handlers when unregistering a handler") Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-06-03Ryu 3.10FUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-06-03doc: add test-of-config-with-linc pageYoshihiro Kaneko
port from wiki page. Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-06-03doc: add test-vrrp pageYoshihiro Kaneko
port from wiki page. Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-06-03ofctl_v1_2: fix errors of get_flow_statstakahashi.minoru
following match fields caused an exception at get_flow_stats command: ipv6_nd_sll, ipv6_nd_tll this patch fixes this problem. Signed-off-by: TAKAHASHI Minoru <takahashi.minoru7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-06-03ofctl_v1_2: fix pep8takahashi.minoru
ryu/lib/ofctl_v1_2.py:444:15: E127 continuation line over-indented for visual indent Signed-off-by: TAKAHASHI Minoru <takahashi.minoru7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-06-02bgp: remove unnecessary OutgoingRoute attribute 'bgp4_format'ISHIDA Wataru
Attribute 'bgp4_format' was intended to be used to decide whether to construct UPDATE msg in bgp4 format or mpbgp format. But we can decide this simply by checking the path type which we are going update. If the path type is IPv4, we use bgp4 format. In other cases, we use mpbgp format. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-06-02bgp: fix typoISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-06-02bgp: fix bug of exchanging paths between vrf and global_tableISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-06-02packet/bgp: add route distinguisher classes and refine codesISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-06-02bgp: keep and use nexthop value as a string internallyISHIDA Wataru
Instead of BGPPathAttributeNextHop, keep nexthop value as a string. Convert it to string as we get Update msg. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-06-02ofctl_v1_2/3: MAC arbitrary bitmask supporttakahashi.minoru
ofctl_rest is now enabled to use MAC arbitrary bitmask as follows: curl -X POST -d '{"dpid": 1, "actions":[{"port":2, "type":"OUTPUT"}], "match":{"dl_dst":"01:02:03:ab:cd:ef/ff:ff:ff:ff:00:00"}}' http://localhost:8080/stats/flowentry/add And now enabled to display as follows: curl http://localhost:8080/stats/flow/1 { "1": [ { "actions": ["OUTPUT:2"], "idle_timeout": 0, "cookie": 0, "packet_count": 0, "hard_timeout": 0, "byte_count": 0, "duration_nsec": 951000000, "priority": 0, "duration_sec": 35, "table_id": 0, "match": {"dl_dst": "01:02:03:ab:00:00/ff:ff:ff:ff:00:00"} } ] } Signed-off-by: TAKAHASHI Minoru <takahashi.minoru7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-05-28bgp: add 'neighbors.get' and 'show.rib' JSON RPC APIFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-05-27bgp: add JSON RPC APIFUJITA Tomonori
Adds JSON RPC API on web socket to dynamically configure bgp. This is the initial support (there are still tons of APIs that are not exported via JSON RPC API). $ sudo PYTHONPATH=.:$PYTHONPATH ryu-manager ryu/services/protocols/bgp/api/jsonrpc.py ryu/services/protocols/bgp/application.py then you can configure on another terminal: ~ fujita$ wsdump.py ws://127.0.0.1:8080/bgp/ws Press Ctrl+C to quit > {"jsonrpc": "2.0", "id": 1, "method": "core.start", "params" : {"as_number":64512, "router_id":"10.0.0.2"}} < {"jsonrpc": "2.0", "id": 1, "result": {}} > {"jsonrpc": "2.0", "id": 1, "method": "neighbor.create", "params" : {"ip_address":"192.168.177.32", "remote_as":64513}} < {"jsonrpc": "2.0", "id": 1, "result": {}} > {"jsonrpc": "2.0", "id": 1, "method": "network.add", "params" : {"prefix":"10.20.0.0/24"}} < {"jsonrpc": "2.0", "id": 1, "result": {}} Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-05-27bgp: set bgp-config-file default NoneFUJITA Tomonori
allowing not use a config file. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-05-27bgp: fix non configured peer exceptionFUJITA Tomonori
peer is None if the connection comes from non configured bgp peer. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>