summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2015-12-22lib/ofctl: Add test cases for ofctl_v1_0IWASE Yusuke
TODO: Add test cases for the other messages after adding test cases for ofproto/test_parser. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-22lib/ofctl: Add test cases for ofctl_v1_2IWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-22lib/ofctl: Add test cases for ofctl_v1_3IWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-22lib/ofctl: Implement unit test for sending messagesIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-22lib/ofctl: Rename unit test for action/matchIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-22lib/ofctl: Confirm UTF-8 in binary fieldsIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-22ofproto_v1_[23]_parser: Add default arguments in OFPQueuePropIWASE Yusuke
When loading OFPQueueGetConfigReply message from json dict, ofproto_parser can not set the property field in OFPQueueProp, because __init__() of OFPQueueProp sub-classes do not pass any argument to its own super-class. This patch fixes this problem. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-22test_parser: Add some expected json representationsIWASE Yusuke
This patch adds expected json representations for: - ofp_group_stats_request - fp_group_stats_reply Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-22packet_data: RegenIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-22packet_data_generator: Add ofp_group_stats messages for OF1.2IWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-22ofproto_v1_[2345]_parser: Set default length fieldIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-08avoid oslo.config 3.1.0 and later for python2.6 supportFUJITA Tomonori
oslo.config v3.1.0 dropped python2.6 support: https://github.com/openstack/oslo.config/commit/9470f19eacb99425055946bd4a6079b71406ff1b Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-08test_controller: Add unit test for _recv_loop()IWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-08controller: Split received message bufferIWASE Yusuke
When Ryu getting multiple OpenFlow messages in a single packet, _recv_loop() can pass the messages data including the subsequent OpenFlow message binary data to ofproto_parser.msg(). If the received OpenFlow message containing a binary data field (e.g. Echo-Reply, Packet-In), the parser may compose messages class with the subsequent messages data into the data field. This patch splits the received message buffer by the recieved OpenFlow message lenght and passes it to the parser. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-12-02Fix a stability issue relating to switch disconnection/re-connection events.Victor J. Orlikowski
If a switch gets disconnected via a network interruption on the control plane (or a similar event), the datapath associated with that switch might not be properly cleaned up. At the same time, the socket associated with that datapath can get leaked. This ultimately results in file descriptor resource exhaustion for Ryu, as a socket had the potential to be leaked on each reconnect. Also, a small typo was corrected in a method name in DPSet.
2015-12-02Ryu 3.28FUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-11-13test_parser: add conntrack testsIWAMOTO Toshihiro
Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-11-13packet_data_generator3: add a couple of conntrack packetsIWAMOTO Toshihiro
Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-11-13Implement NXActionCT and related ct_* matchesIWAMOTO Toshihiro
These are a Nicira extension for conntrack. Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-11-13tox: disable wheel cacheSatoshi KOBAYASHI
Recently, installed packages are cached by Wheel. It is serious when the package is using 2to3 with setuptools (use_2to3) for adapting python3. Because Wheel is caching the contents of translated. If the contents of translated are cached, it can't work properly in python2 Signed-off-by: Satoshi KOBAYASHI <satoshi-k@iij.ad.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-11-13python3: implicit relative import was deprecatedSatoshi KOBAYASHI
Signed-off-by: Satoshi KOBAYASHI <satoshi-k@iij.ad.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-11-13python3: itertools.ifilter() doesn't existSatoshi KOBAYASHI
Signed-off-by: Satoshi KOBAYASHI <satoshi-k@iij.ad.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-11-13python3: iter#next() doesn't existSatoshi KOBAYASHI
Signed-off-by: Satoshi KOBAYASHI <satoshi-k@iij.ad.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-11-13python3: <function>#func_name is renamed to __name__Satoshi KOBAYASHI
Signed-off-by: Satoshi KOBAYASHI <satoshi-k@iij.ad.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-11-13python3: import __future__ for just in caseSatoshi KOBAYASHI
Signed-off-by: Satoshi KOBAYASHI <satoshi-k@iij.ad.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-11-13python3: StandardError doesn't existSatoshi KOBAYASHI
Signed-off-by: Satoshi KOBAYASHI <satoshi-k@iij.ad.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-11-13ofctl_v1_3: Fix unsuitable error log in mod_meter_entry()Minoru TAKAHASHI
When omit the parameter of "flags" in mod_meter_entry(), following error log will be shown. example) 1.use mod_meter_entry() with omitting the parameter of "flags".   curl -X POST -d '{   "dpid": 1,   "meter_id": 1   }' http://localhost:8080/stats/meterentry/delete 2.following error log will be shown. Unknown flags: 0 This patch fixes the problem. Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-11-03Ryu 3.27FUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-10-28bgp: fix of sending "Start-of-RIB" and "End-of-RIB" in Enhanced Route-RefreshToshiki Tsuboi
According to RFC 7313 [Enhanced Route Refresh Capability for BGP-4], Ryu bgps needs to send "Start-of-RIB" before it advertises the Adj-RIB-Out. And then, Ryu bgps needs to send "End-of-RIB" after it advertises the Adj-RIB-Out. Signed-off-by: Toshiki Tsuboi <t.tsubo2000@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-10-28doc/app/ofctl_rest: Add description for OFPTableStats messageMinoru TAKAHASHI
Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-10-28doc/app/ofctl_rest: Add description for OFPQueueGetConfig messageMinoru TAKAHASHI
Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-10-28doc/app/ofctl_rest: Add description for OFPTableFeaturesStats messageMinoru TAKAHASHI
Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-10-28ofctl_rest: support OFPQueueGetConfig MessageMinoru TAKAHASHI
this patch makes ofctl_rest enable use of OFPQueueGetConfig message. Get queues config: usage) URI: /stats/queueconfig/<dpid>/<port> method: GET e.g.) $ curl -X GET http://localhost:8080/stats/queueconfig/1/1 { "1": [ { "port": 1, "queues": [ { "properties": [ { "property": "MIN_RATE", "rate": 80 } ], "port": 0, "queue_id": 1 }, { "properties": [ { "property": "MAX_RATE", "rate": 120 } ], "port": 2, "queue_id": 2 }, { "properties": [ { "property": "EXPERIMENTER", "data": [], "experimenter": 999 } ], "port": 3, "queue_id": 3 } ] } ] } Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-10-28ofctl_rest: support OFPTableFeaturesStats MessageMinoru TAKAHASHI
this patch makes ofctl_rest enable use of OFPTableFeaturesStats message. Get table features: usage) URI: /stats/tablefeatures/<dpid> method: GET e.g.) $ curl -X GET http://localhost:8080/stats/tablefeatures/1 { "1": [ { "metadata_write": 18446744073709552000, "config": 0, "table_id": 0, "metadata_match": 18446744073709552000, "max_entries": 4096, "properties": [ { "type": "INSTRUCTIONS", "instruction_ids": [ { "len": 4, "type": 1 }, .... ] }, ... ], "name": "table_0" }, { "metadata_write": 18446744073709552000, "config": 0, "table_id": 1, "metadata_match": 18446744073709552000, "max_entries": 4096, "properties": [ { "type": "INSTRUCTIONS", "instruction_ids": [ { "len": 4, "type": 1 }, .... ] }, ... ], "name": "table_1" }, ... ] } Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-10-28ofctl_rest: support OFPTableStats MessageMinoru TAKAHASHI
this patch makes ofctl_rest enable use of OFPTableStats message. Get table stats: usage) URI: /stats/table/<dpid> method: GET e.g.) $ curl -X GET http://localhost:8080/stats/table/1 More infomation about this feature is described in the following URL. http://ryu.readthedocs.org/en/latest/app/ofctl_rest.html#get-table-stats Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-10-28vrrp: fix param of virtual_ip_address for rpc_apiToshiki Tsuboi
It looks VRRPManager can't handle virtual_ip_address properly as bellow. $ sudo ryu-manager ryu.services.protocols.vrrp.rpc_manager.py loading app ryu.services.protocols.vrrp.rpc_manager.py loading app ryu.services.protocols.vrrp.manager instantiating app ryu.services.protocols.vrrp.manager of VRRPManager instantiating app ryu.services.protocols.vrrp.rpc_manager.py of RpcVRRPManager instantiating app None of VRRPInterfaceMonitorNetworkDevice instantiating app None of VRRPRouterV3 handle EventVRRPStateChanged VRID:1 VRRP-Router-VRRPInterfaceNetworkDevice<00:00:00:00:00:00, 192.168.0.2, None, eth1>-1-ipv4: None -> Initialize handle EventVRRPStateChanged VRID:1 VRRP-Router-VRRPInterfaceNetworkDevice<00:00:00:00:00:00, 192.168.0.2, None, eth1>-1-ipv4: Initialize -> Backup hub: uncaught exception: Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/ryu/lib/hub.py", line 52, in _launch func(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/ryu/base/app_manager.py", line 276, in _event_loop handler(ev) File "/usr/local/lib/python2.7/dist-packages/ryu/services/protocols/vrrp/router.py", line 234, in master_down_handler self.state_impl.master_down(ev) File "/usr/local/lib/python2.7/dist-packages/ryu/services/protocols/vrrp/router.py", line 613, in master_down self._master_down() File "/usr/local/lib/python2.7/dist-packages/ryu/services/protocols/vrrp/router.py", line 579, in _master_down vrrp_router.send_advertisement() File "/usr/local/lib/python2.7/dist-packages/ryu/services/protocols/vrrp/router.py", line 219, in send_advertisement packet_.serialize() File "/usr/local/lib/python2.7/dist-packages/ryu/lib/packet/packet.py", line 74, in serialize data = p.serialize(self.data, prev) File "/usr/local/lib/python2.7/dist-packages/ryu/lib/packet/vrrp.py", line 394, in serialize return self.serialize_static(self, prev) File "/usr/local/lib/python2.7/dist-packages/ryu/lib/packet/vrrp.py", line 625, in serialize_static *[conv(x) for x in vrrp_.ip_addresses]) File "/usr/local/lib/python2.7/dist-packages/ryu/lib/addrconv.py", line 27, in text_to_bin return self._addr(text, **self._addr_kwargs).packed File "/usr/local/lib/python2.7/dist-packages/netaddr/ip/__init__.py", line 314, in __init__ % (addr, self._module.version)) AddrFormatError: base address '.' is not IPv4 Signed-off-by: Toshiki Tsuboi <t.tsubo2000@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-10-28tester: Reduce pylint warningsIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-10-28tester: Add test cases for OpenFlow1.0IWASE Yusuke
Note: OpenFlow 1.0 does not mention IPv6, but some implemetation of the switch (e.g. Open vSwitch) can deal with IPv6 header field in some OpenFlow1.0 match/actions. So this patch includes tester.py to test match/actions with IPv6. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-10-28tester: Support to test OpenFlow1.0 switchIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-10-28packet_data: Fix wildcarded match value in OF1.0IWASE Yusuke
OpenFlow Spec 1.0 does not define clearly the match value when the corresponding wildcard flags are set, but OpenFlow 1.3.2 mandate that masked value must be 0-bits in match. This patch fixes wildcarded match value (dl_src) into 0-bits. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-10-28of10: Human readable address field in json Match/ActionIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-10-22Try logging.config.dictConfig before in-tree versionIWAMOTO Toshihiro
Python bundles dictConfig since 2.7. Try the bundled version first as the version included in Ryu will not work with python3. Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-10-22Python3: use int instead of longIWAMOTO Toshihiro
Using int for long int should not cause issues since python2.4. c.f. https://docs.python.org/2.6/whatsnew/2.4.html#pep-237-unifying-long-integers-and-integers Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-10-22Python3: complete previous removal of types usageIWAMOTO Toshihiro
Fix the leftover of previos types.*Type removal. Also, as python3 doesn't have long type, use six.integer_types instead. Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-10-22Python3: use dict instead of types.DictTypeIWAMOTO Toshihiro
Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-10-22doc: Change Sphinx html_theme to sphinx_rtd_themeIWASE Yusuke
Currently, Ryu-Documentation page adopts 'haiku' for Sphinx html_theme, but 'haiku' does not have page-index and no sidebar. This patch changes Sphinx html_theme to 'sphinx_rtd_theme', which outputs page-index for each page and a mobile-friendly sphinx theme that was made for readthedocs.org. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-10-15bgp: support of CAP_ENHANCED_REFRESH for vpnv4Toshiki Tsuboi
Bgpspeaker cannot handle CAP_ENHANCED_REFRESH in BGP OPEN Messages. Signed-off-by: Toshiki Tsuboi <t.tsubo2000@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-10-11tester: Use six.binary_type for binary data comparisonIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-10-11tester: Enable to sort instructions instance by typeIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-10-11tester: Remove too broad exception handlingIWASE Yusuke
Because too broad exception handling obscures errors while testing, it makes difficult to detect the bugs in tester.py or the test pattern files. This patch removes an except statement and avoid this problem. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>