summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2018-04-01Ryu 4.24FUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-03-28ofproto: add Nicira extension ct_clear actionIWAMOTO Toshihiro
Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-03-26ofproto: Encode data field on OFPErrorMsgIWASE Yusuke
Currently, when Ryu failed to negotiate the OpenFlow version with a switch, Ryu will send the OFPT_ERROR message with an error reason on its data field. But on Python 3, error reason string is a str type value and required to be encoded into a bytes type value, otherwise causes an exception when sending the message. This patch fixes to encode the given str value into a bytes type value in OFPErrorMsg.__init__() and solves this problem. Signed-off-by: William Fisher <william.w.fisher@gmail.com> Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-03-26ofp_handler: Close socket when HELLO failedIWASE Yusuke
With this patch, when failed to negotiate the OpenFlow version with a switch, Ryu will close the socket connecting to the switch after sending a OFPT_ERROR message. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-03-26controller: Wait for switch to disconnect connectionIWASE Yusuke
If a sender closes a socket immediately after sending some data, a receiver can fail to receive full data from the sender. This patch fixes to shutdown a socket with "SHUT_WR" (disallows further sends only) and enables "Datapath" to wait for a switch to disconnect the connection. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-03-26controller: Option to close socket after sending MessageIWASE Yusuke
Currently, Ryu does not provide the way to close a socket connecting to a switch after sending all enqueued messages, but provides only the way to close the socket immediately regardless of enqueued messages. This patch adds a new option "close_socket" into "Datapath.send_msg()" method and this option enables to close the socket after sending the given message. This patch is convenient to close the socket after sending OFPT_ERROR message to the switch. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-03-26controller: Improve pylint resultIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-03-26test_requirements: Avoid using pip as libraryIWASE Yusuke
Because importing "pip" in Python scripts is not supported usage of "pip", this patch fixes to use "pkg_resources" + "urllib" instead. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-03-26utils: Remove "parse_requirements" functionIWASE Yusuke
This patch removes unused function "parse_requirements" in order to avoid using "pip" as a Python library. Note: Officially "from pip import req as pip_req" is not supported usage of "pip". Reported-by: Katsaounis Molyvas Stamatios <mokats@intracom-telecom.com> Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-03-20Switch to msgpack in pip-requiresThomas Bechtold
msgpack-python got renamed to msgpack[1] so use the new name. [1] https://pypi.python.org/pypi/msgpack/0.5.1 Signed-off-by: Thomas Bechtold <tbechtold@suse.com> Acked-By: Iwase Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-03-20nicira_ext: Support DEC_NSH_TTL actionIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-03-20nicira_ext: Support Network Service Header matchIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-03-05doc: Fix unexpected indent in ofctl.api docIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-03-02Ryu 4.23FUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-02-10doc: Document for ryu.lib.ovsIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-02-10lib/ovs: Fix a typo of "--may-exist" optionIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-02-01Ryu 4.22FUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-01-23bgp/application: Add note for BGPSpeaker API referenceIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-01-23BGPSpeaker: Move docstring from __init__ to classIWASE Yusuke
By the default, Sphinx does not include __init__() method for the "autoclass" directive, and currently the description for the arguments of BGPSpeaker is not generated. This patch moves the docstring of __init__() to the class's docstring and enables to generate the docs for the arguments of __init__(). Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-01-23BGPSpeaker: Enable to notify adj-RIB-in changedIWASE Yusuke
This patch introduces a new argument "adj_rib_in_change_handler" into BGPSpeaker and enables to notify adj-RIB-in changed to watchers. Also this patch enables to "bgp.application.RyuBGPSpeaker" to notify a new event EventAdjRibInChanged to other Ryu applications. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-01-17ofctl: Enable to get all datapath objectsIWASE Yusuke
Also, updates the API document of ryu.app.ofctl.api. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-01-17confroller/dpset: Add usage example of instantiationIWASE Yusuke
This patch adds the example to explain how to register dpset.DPSet service and how to get DPSet instance from user application in order to call the API of DPSet. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-01-17test_rpc: Adopt to msgpack-python>=0.50IWASE Yusuke
msgpack-python version 0.50 or later supports bytearray objects, this patch fixes to adopt to this change. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-01-17doc: Usage for ryu/services/protocols/bgp/application.pyIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-01-02Ryu 4.21FUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-12-17*: Apply autopep8IWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-12-17travis: Introduce autopep8 testIWASE Yusuke
This patch add a new test using "autopep8" to keep codes reformatted easily by using Python tool. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-12-17*: Adopt to pycodestyle's checksIWASE Yusuke
This patch adopts to the following pycodestyle's checks; E275: missing whitespace after keyword E305: expected 2 blank lines after end of function or class Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-12-17pycodestyle: Replace pep8IWASE Yusuke
pep8 has been renamed to pycodestyle and will be removed in a future release. This patch replaces pep8 by pycodestyle and adding some settings for pycodestyle. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-12-17ofproto_v1_5_parser: oxm_ids with name str in OFPActionCopyFieldIWASE Yusuke
Currently, oxm_ids argument of OFPActionCopyField should be a list of OFPOxmId instances, but this patch enables to specify with the OXM field name as the str type value which is corresponding to the keywords of OFPMatch. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-12-17ofproto_v1_5_parser: Missing trailing pads of OFPActionCopyFieldIWASE Yusuke
OpenFlow Spec 1.5 says OFPActionCopyField has the trailing paddings to make the action a whole multiple of 8 bytes in length. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-12-17ofproto_v1_5_parser: Fix length calculation of OFPOxmIdIWASE Yusuke
Currently, the oxm_length field is always composed with zero value because OpenFlow Spec does not still clarify whether its value should be doubled if the hasmask bit is set. This patch fixes to compose the oxm_length value with the payload length because Open vSwitch strictly checks the oxm_length which contained in the OFPAT_COPY_FIELD action (introduced at OpenFlow 1.5), and this causes the OFPT_ERROR messages then flows will not be installed. Note: This patch does not backport this fix to ofproto_v1_3_parser.py and ofproto_v1_4_parser.py because those modules are tested based on the implementation of "linc/of_protocol" which supposes the oxm_length is always zero. Also OFPOxmId should be rarely serialized at the controller side when using OpenFlow 1.3 or 1.4. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-12-11ovsdb: Fix small bugFelician Nemeth
Signed-off-by: Felicián Németh <nemethf@tmit.bme.hu> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-12-11packet_data_generator3: Generate OF13 Ext-230 bundle packetsIWAMOTO Toshihiro
Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-12-11packet_data_generator3: Support ovs-2.8IWAMOTO Toshihiro
From ovs 2.8, ovs-ofctl tries to collect port descriptions, which isn't handled by the fake server in gen.py. Pass the --no-names option to work around this. Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-12-11ofproto_v1_3: Add bundle extensionIWAMOTO Toshihiro
Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-12-11ofproto: Correct OFPBundle{Ctrl, Add}Msg docstringsIWAMOTO Toshihiro
Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-12-11rest_vtep: Add some descriptions for troubleshootingIWASE Yusuke
This patch adds some notes about the settings when using the Mininet VMs for the environment on which rest_vtep.py running. Reported-by: Varun Amrutiya <h20170244@pilani.bits-pilani.ac.in> Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-12-11topology: Enable to detect migrations of hostsIWASE Yusuke
Currently, the topology library does not update the position of a host which was detected before even if the host migrated to another port. This patch enables to detect the migrations of the hosts when the host is detected on another port. Reported-by: Mahmoud Elzoghbi <mahmoud.said.elzoghbi@gmail.com> Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-12-02Ryu 4.20FUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-11-28fix bug in the example of flow_stats_replymorland
Signed-off-by: morland <mqy_bs@hotmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-11-28app: added simple switch with openflow 1.5 supportThomas Boros
Signed-off-by: Thomas Boros <tomas.boros92@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-11-28ofproto_v1_5_parser: Change default of command_bucket_idIWASE Yusuke
Currently, Ryu will send the OFPGroupMod message with "command_bucket_id=0" by the default if using the OpenFlow version 1.5. OTOH, Open vSwitch expects "command_bucket_id=OFPG_BUCKET_ALL" if "command" is other than OFPGC_INSERT_BUCKET or OFPGC_REMOVE_BUCKET, otherwise OVS will rejects the OFPGroupMod message. This patch changes the default value of "command_bucket_id" to OFPG_BUCKET_ALL as OVS expects. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-11-28app: Fix simple_switch for multi switch envJerico Moeyersons
Currently, the matches of flows in the learning switch examples are based on the destination and the in_port. In a multi-OF-switch environment this could cause issues when doing calls from a host on a first switch to multiple hosts on another switch, namely that new destinations aren't added as a flow because the source is already known on the second switch (when doing multiple calls to different hosts on another switch). This patch fixes this issue by adding the eth_src to the match field. Reported-by: Jerico Moeyersons <jerico09@hotmail.com>
2017-11-18doc: fix typoCharlie Lewis
2017-11-16test_icmpv6: Catch proper ExceptionIWASE Yusuke
In some test cases in test_icmpv6.py, @raises() decorator does not catch the correct Exception, because "pack" function cannot be resolved and it need to be specified as "struct.pack". This patch fixes to this unresolved references and make it more strictly matching of Exception class (e.g., AssertionError). Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-11-16packet/icmp: Avoid TypeError when calculating lengthIWASE Yusuke
Currently, ICMPv4 packet instance without its payload, it will raise TypeError when calculating packet length, because the default value of "data" field (payload data) is None and len() can not be applied against None type object. This patch changes the default value of "data" to the empty binary value and confirms the value type of "data" field before serialization. Also, this patch applies the same improvements to ICMPv6 packet library. Reported-by: William Fisher <william.w.fisher@gmail.com> Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-11-16*: Reject Binary Represented IP AddressesSatoshi Fujimoto
As a default, netaddr.valid_ipv4() uses the "aton" rule for its validation, so valid_ipv4('2') and valid_ipv4('1.2.3') returns True. It may cause unexpected behaviors. This commit replaces netaddr.valid_ipv4() to ryu.lib.ip.valid_ipv4(), which is wrapper of netaddr.valid_ipv4(), and use "pton" rule in the method. So, address representation like '2' or '1.2.3' will be rejected. Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2017-11-05serivice/bgp: Fix ssh connection problem in Python 2.7Satoshi Fujimoto
Currently, 'is_connected' attribute in SshServer is refered before it is created, in Python 2.7. This raises an Exception and the SSH operation won't work anymore after this happens. This commit ensures that 'is_connected' is created before it is refered. Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-11-02flags: Inject __class__ attribute to LooseVersionIWASE Yusuke
Currently, ryu-manager uses distutils.version.LooseVersion for "--zapi-frr-version" to parse the given version sting. With custom type class for oslo_config.cfg.Opt, oslo_config might access __class__ attribute for equal comparison. But in case on Python 2, LooseVersion does not have __class__ attribute and it causes AttributeError. (This error is not always reproduced) This patch injects required attribute into LooseVersion and avoids this problem. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>