summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
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>
2015-10-11tester: Strict string argument encoding in Python3IWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-10-11tester: Adapt to Python3 dictviewIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-10-11packet_data: RegenMinoru TAKAHASHI
Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com> Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-10-11test_parser: Add expected json for OFP13/15 MessagesMinoru TAKAHASHI
Add expected json for the following messages. - OFP13/15 Symmetric Messages - OFP13/15 Asynchronous Messages - OFP15 Multipart Messages - OFP13/15 TableMod Message - OFP13 PortMod Message - OFP13/15 MeterMod Message Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com> Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-10-11packet_data_generator2: Add OFP13/15 MessagesMinoru TAKAHASHI
Add the following OFP13/15 Messages. - OFP13/15 Symmetric Messages - OFP13/15 Asynchronous Messages - OFP15 Multipart Messages - OFP15 Packet-Out Message - OFP15 Barrier Message - OFP15 Role Request Message - OFP15 Set Asynchronous Configuration Message - OFP13/15 TableMod message - OFP13 PortMod message - OFP13/15 MeterMod message Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com> Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-10-11packet_data_generator2: Sort by OF1.5 index orderMinoru TAKAHASHI
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-10-11packet_data_generator2: Fix to use struct eth_addrMinoru TAKAHASHI
In accordance with the upgrade of the ofputil in OVS libraries, this patch fixes to use struct eth_addr. FYI: The appropriate commit on OVS GitHub https://github.com/openvswitch/ovs/commit/74ff3298c8806bb09d0c7e40a25b889ab7564769 Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-10-11doc: Add openflow api reference for of1.0Yusuke Iwase
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-10-11ofproto_v1_0_parser: Add comments for OF1.0 protocolYusuke Iwase
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-10-11doc: Handle ERROR of unexpected indentationYusuke Iwase
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-10-11test_ip: Add tests for IPv4-int conversionYusuke Iwase
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-10-11of10: Add __contains__ method into OFPMatchYusuke Iwase
To support query whether a match instance contains a specific field, This patch adds __contains__ method into OFPMatch. Example: >>> if 'nw_src' in match: ... print match['nw_src'] ... '192.168.0.1' Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-10-11test_parser_v10: Fix wildcards param for unit testYusuke Iwase
If all field is specified, wildcards field should be lower than (NW_DST_WILDCARD << 14 | NW_SRC_WILDCARD << 8), but the given value of this test case is larger than this value. So some test cases which check the wildcards field raise errors. This patch fixes the wildcards parameter to the possible value. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-10-11of10: Support human readable MAC/IPv4 address in OFPMatchYusuke Iwase
In OF1.0, OFPMatch is required to specify MAC address as a binary type value and to specify IPv4 Address as an int type value. This behavior is differ from that in OF1.2+. This patch makes OFPMatch in OF1.0 enable to support human readable representation of MAC/IPv4 address like OF1.2+ API. The current API in OF1.0: >>> match = parser.OFPMatch(dl_src=b'\x01\x02\x03\x04\x05\x06', ... nw_src=167772163) >>> match.dl_src '\x01\x02\x03\x04\x05\x06' >>> match.nw_src 167772163 The introduced API (the same as OF1.2+ API): >>> match = parser.OFPMatch(dl_dst='aa:bb:cc:dd:ee:ff', ... nw_dst='192.168.0.1') >>> match['dl_dst'] 'aa:bb:cc:dd:ee:ff' >>> match['nw_dst'] '192.168.0.1' Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-10-02Ryu 3.26FUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-10-01switch/tester: Add sleep interval for each test caseYusuke Iwase
Open vSwitch, which installed with the kernel module, has a cache in the kernel for the flow table and the cached flow entries have a hard timeout of 5 seconds. tester.py attempts to confirm its flow modifications with a barrier request, but Open vSwitch sends a barrier reply back regardless of the the state of the cached entries in the kernel module. So in some cases, Open vSwtich needs the interval between each test case. This patch adds an option for setting interval for the workaround. Note: With a zero seconds interval, the whole test suite runs in 20-30 minutes, but with a 10 seconds interval between each test, the entire suite takes 3-4 hours. Reported-by: Alan Deikman <alan.deikman@znyx.com> Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-09-30ofproto_v1_[45]_parser: Add parser() for OFPRequestForwardYusuke Iwase
OFPT_REQUESTFORWARD is defined as Asynchronous Message which sent from OF-Switch to Controller, but currently, OFPRequestForward class does not have parser() method. This patch adds parser() method into OFPRequestForward class and OFPGroupMod/OFPMeterMod classes which forwarded by OFPRequestForward message. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-09-28remove old Ryu OpenStack plugin stuffFUJITA Tomonori
The plugin that uses these was removed from OpenStack long ago. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-09-28packet: lldp: python3 fixFUJITA Tomonori
iterator doesn't has next method. Reported-by: Takeshi <a86487817@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Tested-by: Takeshi <a86487817@gmail.com>
2015-09-23bgp: support disabling listening socketFUJITA Tomonori
Setting bgp_server_port to 0 disables listening socket Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-09-21bgp: python3 fixesFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-09-18test_parser_ofpmatch: Add tests for Experimenter OXMsYusuke Iwase
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-09-18OXM/OXS: Enable to sort Experimenter oxm_type/oxs_type in Python3Yusuke Iwase
The representation of oxm_type/oxs_type is an int type value if OXM/OXS in OpenFlowBasic class, but a tuple type value if in Experimenter class. So, Python3 may fail to sort a list of OXM/OXS fields by using oxm_type/oxs_type. This patch adds 'key' parameter into sort() method and enables to sort a list which contains both OpenFlowBasic and Experimenter. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-09-18test_parser_ofpmatch: Add test cases for OF1.4 and OF1.5Yusuke Iwase
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-09-18.travis.yml: Suppress the output of unit testsYusuke Iwase
Because Travis-CI has a limit of the log file to 4MB, this patch suppress the output of unit tests by setting NOSE_VERBOSE in tox.ini. tox.ini does not effect when running run_tests.sh locally, so please run run_tests.sh, if the full log messages are needed. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-09-18ofproto: Sort out the NX OXMs definitionYusuke Iwase
Because the Nicira Experimenter OXMs are independent of the OpenFlow version, this patch separates the NX OXMs definitions into nx_match.py and enable to use the NX OXM in all OpenFlow 1.2+. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-09-18ofproto: Refine module importYusuke Iwase
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-09-18ofproto_v1_[45]_parser: Remove unused OFPMatchFieldYusuke Iwase
OFPMatchField and its subclasses are parser classes for old API of OFPMatch, but in OF1.4+, OFPMatch drops old API supports. This patch removes these unused classes from ofproto_v1_[45]_parser.py Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-09-18doc/ofproto_v1_2_ref: Add description for Port StructuresMinoru TAKAHASHI
Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-09-18doc/ofproto_v1_3_ref: Add description for Port StructuresMinoru TAKAHASHI
Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-09-18doc/ofproto_v1_4_ref: Add description for Port StructuresMinoru TAKAHASHI
Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-09-18doc/ofproto_v1_5_ref: Add description for Port Structures and Controller ↵Minoru TAKAHASHI
Status Structure Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-09-17Examples contain invalid MAC addressesSteffen Gebert
The documentation for `OFPActionSetField()` contains the following example: set_field = OFPActionSetField(eth_src="00:00:00:00:00") However, this MAC address lacks one byte. Thus add it.
2015-09-15ofproto_v1_0_parser: Add __getitem__ method into OFPMatchYusuke Iwase
Currently, ofproto_v1_0_parser does not support query with a match field name like ofproto_v1_[2345]_parser support. This patch adds __getitem__ method in order to get the match value witch a match field name. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-09-15test_parser_v10: Add test case for __getitem__ of OFPMatchYusuke Iwase
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-09-15doc/app/ofctl_rest: Add command examples for WRITE/CLEAR_ACTIONSMinoru TAKAHASHI
Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-09-15Uncap pbr versionIWAMOTO Toshihiro
This reverts commit 9414322f307fe607f7fefb8611871bbf810b5ee4, as the workaround for readthedocs seems to be no longer necessary. Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>