69 Commits

Author SHA1 Message Date
Isaku Yamahata
fa946a94e1 packege: rpmlint warning
ryu.noarch: E: non-executable-script /usr/lib/python2.7/site-packages/ryu/tests/unit/lib/test_hub.py 0644L /usr/bin/env
ryu.noarch: E: non-executable-script /usr/lib/python2.7/site-packages/ryu/lib/hub.py 0644L /usr/bin/env

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-07-09 12:12:28 +09:00
Isaku Yamahata
3837a84eec lib/packet: teach packet library to truncate padding octet
The patch teaches packet library to truncate padding octets.
Change packet_base.parser() to return (header, next_type, rest_of_packet)
The protocol class that knows its payload length should rest_of_packet
where padding octets at the last of packet is truncated.

As bonus,
- fix ipv6 parser as ipv6 header doesn't have options.
  It seems copy-and-paste from ipv4
- improve ipv4, tcp a bit

Cc: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Cc: Shaun Crampton <Shaun.Crampton@metaswitch.com>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-07-02 01:19:27 +09:00
Isaku Yamahata
b38974f363 rename ryu-client under ryu/tests
Since it is debugging tool for developer, don't install it.
and move it under ryu/rests directory.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-07-01 06:04:06 +09:00
YAMAMOTO Takashi
03e469c1fc of1.2: OFPGroupFeaturesStats: tuple -> list
tuples are json-unfriendly.

(of1.3 version was completely broken until very recently
and the way i fixed it is consistent with this change.)

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-06-29 03:45:56 +09:00
YAMAMOTO Takashi
ea7798fc69 of12: prefix private attributes of OFPMatch with _
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-06-20 06:44:24 +09:00
YAMADA Hideki
cc6fc59e1d tests/unit/packet/test_vrrp: add tests for is_valid()
Signed-off-by: YAMADA Hideki <yamada.hideki@po.ntts.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-05-23 07:46:10 +09:00
YAMADA Hideki
524f79ebb2 test_parser_v10: remove tests for __str__
Following errors occur at current master
(commit 21692141dc7e8be2d44338ce4eff5af584e4ff8f)

======================================================================
ERROR: test_parser (ryu.tests.unit.ofproto.test_parser_v10.TestOFPFlowRemoved)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hideki/ryu/ryu/tests/unit/ofproto/test_parser_v10.py", line 4080, in test_parser
    eq_(str(cookie['val']), check['cookie'])
KeyError: 'cookie'

======================================================================
ERROR: test_parser (ryu.tests.unit.ofproto.test_parser_v10.TestOFPPacketIn)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hideki/ryu/ryu/tests/unit/ofproto/test_parser_v10.py", line 3782, in test_parser
    ok_(self._test_parser())
  File "/home/hideki/ryu/ryu/tests/unit/ofproto/test_parser_v10.py", line 3774, in _test_parser
    eq_(str(buffer_id['val']), check['buffer_id'])
KeyError: 'buffer_id'

======================================================================
ERROR: test_parser_padding (ryu.tests.unit.ofproto.test_parser_v10.TestOFPPacketIn)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hideki/ryu/ryu/tests/unit/ofproto/test_parser_v10.py", line 3785, in test_parser_padding
    ok_(self._test_parser(True))
  File "/home/hideki/ryu/ryu/tests/unit/ofproto/test_parser_v10.py", line 3774, in _test_parser
    eq_(str(buffer_id['val']), check['buffer_id'])
KeyError: 'buffer_id'

======================================================================
ERROR: test_str (ryu.tests.unit.ofproto.test_parser_v10.TestOFPQueuePropMinRate)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hideki/ryu/ryu/tests/unit/ofproto/test_parser_v10.py", line 2615, in test_str
    eq_(check['rate'], str(self.rate['val']))
KeyError: 'rate'

======================================================================
ERROR: test_str (ryu.tests.unit.ofproto.test_parser_v10.TestOFPQueuePropNone)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hideki/ryu/ryu/tests/unit/ofproto/test_parser_v10.py", line 2564, in test_str
    eq_(check['property'], str(self.property['val']))
KeyError: 'property'

======================================================================
ERROR: test_parser (ryu.tests.unit.ofproto.test_parser_v10.TestOFPSwitchFeatures)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hideki/ryu/ryu/tests/unit/ofproto/test_parser_v10.py", line 3580, in test_parser
    eq_(check['ports'].find('OFPPhyPort'), 0)
KeyError: 'ports'

Signed-off-by: YAMADA Hideki <yamada.hideki@po.ntts.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-05-23 07:42:46 +09:00
Isaku Yamahata
608ae016f5 tests/ofproto: add unit test for ofproto automatic detection
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-05-15 04:01:25 +09:00
YAMAMOTO Takashi
edd7048be2 ofproto: change the way __str__ is implemented for of-wire messages
instead of explicit listing of of-wire attributes, use a heuristics
to exclude internal attributes. (eg. buf, datapath, etc)

this commit changes __str__ outputs.  update a test case accordingly.

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-05-12 06:30:27 +09:00
YAMAMOTO Takashi
5003c1634c hub: add some more tests
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-05-10 00:36:32 +09:00
YAMAMOTO Takashi
9e6d3053c0 sweep the tree to change from gevent to ryu.lib.hub
mostly mechanical changes.
also, change the requirement from gevent to eventlet.

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-05-01 22:18:39 +09:00
YAMAMOTO Takashi
a01972e18c add a threading hub module
this provides gevent-like api using eventlet.

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-05-01 22:18:39 +09:00
YAMADA Hideki
0d4ff7d34d tests/integrated: auto testing script using Mininet and OVS
Signed-off-by: YAMADA Hideki <yamada.hideki@po.ntts.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-04-28 08:13:57 +09:00
YAMADA Hideki
84ef5c5046 tests/integrated: Skip MPLS related test
Signed-off-by: YAMADA Hideki <yamada.hideki@po.ntts.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-04-28 08:13:55 +09:00
Can Zhang
fd7723eaa1 lib: ip address presentation convert helper methods
Signed-off-by: Can Zhang <can@canx.me>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-04-16 07:52:33 -07:00
Isaku Yamahata
2b18979305 tests/unit, lib/packet/vrrp: unit test for vrrp packet parser/serializer
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-04-16 02:48:02 +09:00
Isaku Yamahata
5ccf67169f tests/integrated/test_of_config: comment on how to run
Cc: Shivaram Mysore <shivaram.mysore@gmail.com>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-04-09 21:31:20 +09:00
Isaku Yamahata
1f529be407 tests/integrated/test_of_config: disable known host check
This test can fail with unknow hosts as follows.
Since this is a OF-config test/sample, known host check is not essential.
Disable the check to avoid non-essential problem for easy test.

> ryu $ PYTHONPATH=. ./bin/ryu-manager --verbose ryu/tests/integrated/test_of_config.py
> loading app ryu/tests/integrated/test_of_config.py
> loading app ryu.controller.ofp_handler
> instantiating app ryu/tests/integrated/test_of_config.py of OFConfigClient
> <SSHSession(session, initial daemon)> created: client_capabilities=['urn:ietf:params:netconf:capability:writable-running:1.0', 'urn:ietf:params:netconf:capability:rollback-on-error:1.0', 'urn:ietf:params:netconf:capability:validate:1.0', 'urn:ietf:params:netconf:capability:confirmed-commit:1.0', 'urn:ietf:params:netconf:capability:url:1.0?scheme=http,ftp,file,https,sftp', 'urn:ietf:params:netconf:base:1.0', 'urn:liberouter:params:netconf:capability:power-control:1.0', 'urn:ietf:params:netconf:capability:candidate:1.0', 'urn:ietf:params:netconf:capability:xpath:1.0', 'urn:ietf:params:netconf:capability:startup:1.0', 'urn:ietf:params:netconf:capability:interleave:1.0']
> starting thread (client mode): 0x2348650L
> Connected (version 2.0, client Erlang)
> kex algos:['diffie-hellman-group1-sha1'] server key:['ssh-rsa', 'ssh-dss'] client encrypt:['aes128-cbc', '3des-cbc'] server encrypt:['aes128-cbc', '3des-cbc'] client mac:['hmac-sha1'] server mac:['hmac-sha1'] client compress:['none', 'zlib'] server compress:['none', 'zlib'] client lang:[''] server lang:[''] kex follows?False
> Ciphers agreed: local=aes128-cbc, remote=aes128-cbc
> using kex diffie-hellman-group1-sha1; server key type ssh-rsa; cipher: local aes128-cbc, remote aes128-cbc; mac: local hmac-sha1, remote hmac-sha1; compression: local none, remote none
> Switch to new keys ...
> Traceback (most recent call last):
>   File "./bin/ryu-manager", line 87, in <module>
>     main()
>   File "./bin/ryu-manager", line 67, in main
>     app_mgr.instantiate_apps(**contexts)
>   File "/ryu/ryu/base/app_manager.py", line 289, in instantiate_apps
>     self._instantiate(app_name, cls, *args, **kwargs)
>   File "/ryu/ryu/base/app_manager.py", line 275, in _instantiate
>     app = cls(*args, **kwargs)
>   File "/ryu/ryu/tests/integrated/test_of_config.py", line 123, in __init__
>     host=HOST, port=PORT, username=USERNAME, password=PASSWORD)
>   File "/ryu/ryu/lib/of_config/capable_switch.py", line 49, in __init__
>     self.netconf = connect(*self._connect_args, **self._connect_kwargs)
>   File "/ryu/ryu/contrib/ncclient/manager.py", line 67, in connect_ssh
>     session.connect(*args, **kwds)
>   File "/ryu/ryu/contrib/ncclient/transport/ssh.py", line 193, in connect
>     raise SSHUnknownHostError(host, fingerprint)
> ncclient.transport.errors.SSHUnknownHostError: Unknown host key [63:c2:19:95:97:29:84:f6:86:41:1a:15:17:d7:90:0d] for [127.0.0.1]

Cc: Shivaram Mysore <shivaram.mysore@gmail.com>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-04-09 21:31:05 +09:00
Isaku Yamahata
565df6fc48 lib/packet/packet_utils: improve checksum byteswap
move byteswap logic into checksum from caller.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-03-31 18:19:42 +09:00
Isaku Yamahata
01798a7439 tests/unit/packet/test_tcp.py: typo UDP -> TCP
TODO: test doesn't pass yet.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-03-31 18:19:42 +09:00
Isaku Yamahata
1439e2c341 test_icmpv6: correct icmpv6 checksum
icmpv6_csum() uses wrong format. It happened to produce correct value
for csum.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-03-31 18:19:42 +09:00
YAMADA Hideki
03c622453a test_parser_v10: fix unittest breakage
Commit 366da0 break unittest.
The following error occurs.

$ ./run_tests.sh
(...)

======================================================================
ERROR: test_parser (ryu.tests.unit.ofproto.test_parser_v10.TestOFPVendorStatsReply)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hideki/ryu/ryu/tests/unit/ofproto/test_parser_v10.py", line 4962, in test_parser
    eq_(specific_data, body.specific_data)
AttributeError: 'str' object has no attribute 'specific_data'

----------------------------------------------------------------------
Ran 1249 tests in 0.991s

FAILED (errors=1)

Signed-off-by: YAMADA Hideki <yamada.hideki@po.ntts.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-03-30 14:10:33 +09:00
HIYAMA Manabu
5cff2a3630 packet lib: fix icmpv6.nd parser
Signed-off-by: HIYAMA Manabu <hiyama.manabu@po.ntts.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-03-18 07:47:09 +09:00
Isaku Yamahata
3cfb6fa6e9 of_config: sample test code to use ofconfig capable_switch
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-03-08 12:12:01 +09:00
KONDOH Tasuku
5e29110126 test of1.2: fix typos from mid to min
Signed-off-by: KONDOH Tasuku <kondoh.tasuku@po.ntts.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-03-01 16:02:52 +09:00
KONDOH Tasuku
fe786cd0ce test of1.2: add test code of OFPErrorExperimenterMsg
- add test code of max and min to OFPErrorExperimenterMsg

Signed-off-by: KONDOH Tasuku <kondoh.tasuku@po.ntts.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-02-28 19:22:16 +09:00
EisukeTAKAHASHI
22dbaa1b86 lib/mac: fix raise ValueError
Traceback (most recent call last):
  File "/home/openflow/ryu/.venv/local/lib/python2.7/site-packages/nose/tools/nontrivial.py", line 67, in newfunc
    raise AssertionError(message)
AssertionError: test_mac_haddr_to_bin_true() did not raise ValueError

Signed-off-by: EisukeTAKAHASHI <takahashi.eisuke@po.ntts.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-02-27 19:52:41 +09:00
KONDOH Tasuku
0fab6cdf2f of1.2: fix OFPErrorExperimenterMsg
- add OFPErrorExperimenterMsg.

Signed-off-by: KONDOH Tasuku <kondoh.tasuku@po.ntts.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-02-27 00:23:05 +09:00
KONDOH Tasuku
c36d388a15 test of1.2: add test code of max, min, and pattern. review of the test code
Signed-off-by: KONDOH Tasuku <kondoh.tasuku@po.ntts.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-02-25 19:57:13 +09:00
HIYAMA Manabu
19a8d21636 test: remove unnecessary variables
Signed-off-by: HIYAMA Manabu <hiyama.manabu@po.ntts.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-02-24 12:50:38 +09:00
KONDOH Tasuku
7518f396e6 of1.2: fix OFPGroupDescStats parser
- add action's size to offset of bucket.

Signed-off-by: KONDOH Tasuku <kondoh.tasuku@po.ntts.co.jp>
Reviewed-by: Simon Horman <horms@verge.net.au>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-02-24 07:50:39 +09:00
HIYAMA Manabu
c947e66fd1 test: tuning integration test for OFPT_FLOW_REMOVED
tuning grace sec of tests for OFPT_FLOW_REMOVED.

Sometimes, we will received the OFPT_FLOW_REMOVED message before
rewirte the duration time of the ofp_flow_removed by the switch.

Signed-off-by: HIYAMA Manabu <hiyama.manabu@po.ntts.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-02-15 16:58:14 +09:00
KONDOH Tasuku
d4822f6da8 of1.2: fix OFPQueueProp parser
- add OFP_QUEUE_PROP_HEADER_SIZE to offset of argument of propreties class.

Signed-off-by: KONDOH Tasuku <kondoh.tasuku@po.ntts.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-02-13 18:05:18 +09:00
Isaku Yamahata
95321218c1 tests: make run_tests.py, test_lib.py executable as it includes #!
rpmlint requires it as follows.

> ryu.noarch: E: non-executable-script /usr/lib/python2.7/site-packages/ryu/tests/run_tests.py 0644L /usr/bin/env
> ryu.noarch: E: non-executable-script /usr/lib/python2.7/site-packages/ryu/tests/test_lib.py 0644L /usr/bin/env
> This text file contains a shebang or is located in a path dedicated for
> executables, but lacks the executable bits and cannot thus be executed.  If
> the file is meant to be an executable script, add the executable bits,
> otherwise remove the shebang or move the file elsewhere.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-02-12 20:21:33 +09:00
HIYAMA Manabu
e97b724591 test: fix integration tests: reflects 978f3e5c
File "/home/openflow/git/osrg/ryu/ryu/tests/integrated/tester.py", line 167, in TestFlowBase
    @handler.set_ev_cls(dpset.EventDP, dpset.DPSET_EV_DISPATCHER)
AttributeError: 'module' object has no attribute 'DPSET_EV_DISPATCHER'

Signed-off-by: HIYAMA Manabu <hiyama.manabu@po.ntts.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-02-07 06:26:57 +09:00
HIYAMA Manabu
2d999c7677 test: update integration tests
- remove get_supported() at test_request_reply_v12.py.
  use 'is_supported()' if any test wants to skip.
- print results summary.

Signed-off-by: HIYAMA Manabu <hiyama.manabu@po.ntts.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-02-06 11:57:39 +09:00
YAMADA Hideki
76996337bb packet lib: add LLDP support.
See "ryu/tests/unit/packet/test_lldp.py" to use this library.

This patch is based on Yamahata's topology discovery patch series.
http://thread.gmane.org/gmane.network.ryu.devel/467

Signed-off-by: YAMADA Hideki <yamada.hideki@po.ntts.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-02-05 16:14:30 +09:00
HIYAMA Manabu
24d894bc95 test: add mininet-test suite
This patch adds a test framework using mininet. The following tests
can be performed.

- Set the flow for the OVS-switch from Ryu-app, we test the actual
  packet is to be handled properly in accordance with the flow; The
  packet that generated by "mz" or replayed by "tcpreplay" is routed
  through the ovs-switch, are processed according to the flow, then
  compare test conditions and the results captured by "tshark".

- Create a packet with ryu using the packet-lib, we test the packet
  and response are correct; to compare test conditions and the results
  captured by "tshark".

  $ ./run_mnet-test.sh [OPTION] [TEST DIR or FILE]...
  $ ./run_mnet-test.sh l2 l3/icmp packet_lib/arp/ARP_gratuitous.mn
  $ ./run_mnet-test.sh --help

Requirements package:
 - mininet: git://github.com/mininet/mininet.git
 - openvswitch: git://openvswitch.org/openvswitch
 - Mausezahn 0.40: http://www.perihel.at/sec/mz/
 - TShark 1.6.2: http://www.wireshark.org/
 - tcpreplay 3.4: http://tcpreplay.synfin.net/

Signed-off-by: HIYAMA Manabu <hiyama.manabu@po.ntts.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-01-29 18:35:01 +09:00
HIYAMA Manabu
7d5b4960a8 test: Add "Decrement IP TTL" integration test
Signed-off-by: HIYAMA Manabu <hiyama.manabu@po.ntts.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-01-29 06:25:20 +09:00
HIYAMA Manabu
429401a1b8 test: change the branch of openvswitch to 'of12'
Change the branch of openvswitch used by integration tests to 'of12'

Signed-off-by: HIYAMA Manabu <hiyama.manabu@po.ntts.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-01-07 08:47:04 +09:00
HIYAMA Manabu
6afa1c35ec of1.2: Fix MTVlanVid() parser and serializer
- The OFPVID_PRESENT bit indicate the presence of a valid VLAN_ID.
- Reflect to unittests.

Signed-off-by: HIYAMA Manabu <hiyama.manabu@po.ntts.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-11-06 20:16:33 +09:00
HIYAMA Manabu
51b3b9a2bd test: add unittests for packet library
Signed-off-by: HIYAMA Manabu <hiyama.manabu@po.ntts.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-10-23 13:33:43 +09:00
HIYAMA Manabu
21f29c6f41 test: add unittests for packet library
Signed-off-by: HIYAMA Manabu <hiyama.manabu@po.ntts.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-10-12 02:29:23 +09:00
HIYAMA Manabu
7ad45aa1c1 test: fix unittests for of parser
- use bytearray(n) instead of str().zfill(n)
- test data are more strictly.

Signed-off-by: HIYAMA Manabu <hiyama.manabu@po.ntts.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-10-05 18:57:59 +09:00
HIYAMA Manabu
fc264cc971 Fix zero padding
- zfill() is a func of the string to be putting in a '0'.
  bytearray().zfill(n) -> bytearray(n)

- unify notation of zero with other code.
  '\0' -> '\x00'

Signed-off-by: HIYAMA Manabu <hiyama.manabu@po.ntts.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-09-30 21:48:05 +09:00
HIYAMA Manabu
bb05f39c3a test: add more of1.2 integration tests
- some tests need attached port to switch.

Signed-off-by: HIYAMA Manabu <hiyama.manabu@po.ntts.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-09-26 13:06:03 +09:00
FUJITA Tomonori
cccd01f5ea test: fix pep8 1.3.3 warnings
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-08-23 11:40:46 +09:00
FUJITA Tomonori
c771dc8d6f test: add stats and config tests to integrated test suite
Run this in the following way:

$ ryu-manager ryu/ryu/tests/integrated/test_request_reply_v12.py

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-08-20 09:52:23 +09:00
FUJITA Tomonori
b49ccfc11b clean up ETH_TYPE_ constants
Use ofproto/ether.py

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Reviewed-by: Simon Horman <horms@verge.net.au>
2012-07-31 13:26:53 +09:00
FUJITA Tomonori
254db170ec test: fix SET_NW_TOS action in test_add_flow_v10
The lowest two bits must be zero.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Reviewed-by: Simon Horman <horms@verge.net.au>
2012-07-31 13:26:17 +09:00