summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2013-04-16g/c a stale reference to find_protocolYAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-04-16packet lib: docstringYAMAMOTO Takashi
also, prefix a private method with _. Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-04-16tests/unit, lib/packet/vrrp: unit test for vrrp packet parser/serializerIsaku Yamahata
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-04-16lib/packet: VRRP packet parser/serializerIsaku Yamahata
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-04-16lib/packet/ipv6: add constants for parse/serializeIsaku Yamahata
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-04-16lib/packet/ipv4: add constants for parse/serializeIsaku Yamahata
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-04-16ofproto/inet: add VRRP protocol numberIsaku Yamahata
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-04-16lib/packet/arp.py: add convenience function to create arp for ipIsaku Yamahata
Since ip case is most often used, introduce a convenience function for that. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-04-16ofproto/nx_match: pep8Isaku Yamahata
> $ pep8 --version > 1.4.5 > ryu/ofproto/nx_match.py:743:20: E128 continuation line under-indented for visual indent > ofproto_v1_0.NXM_NX_IPV6_SRC_W]) > ^ > ryu/ofproto/nx_match.py:764:20: E128 continuation line under-indented for visual indent > ofproto_v1_0.NXM_NX_IPV6_DST_W]) > ^ Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-04-13doc: fix the mailing list addressFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-04-13of1.3: Add special group identifier values defined on OpenFlow 1.3.1Eder Leão Fernandes
This patch add missing group special values of OpenFlow 1.3, added to the 1.3.1 version. It is useful to create a flow_mod message with an out_group with no > group restrictions and for flow_stats messages. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-04-11lib/packet/lldp.py: pylintIsaku Yamahata
> W: 78,0:LLDPBasicTLV.__init__: Unused argument 'args' > W: 78,0:LLDPBasicTLV.__init__: Unused argument 'kwargs' > W:109,4:lldp.__init__: __init__ method from base class 'PacketBase' is not called Cc: "can." <can@canx.me> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-04-11ryu/lib/packet/lldp.py: remove __str__ method from class LLDPBasicTLV and ↵Isaku Yamahata
class lldp Those methods are legacy when lldp.py was written for dpkt. They don't make sense. remove them. Cc: "can." <can@canx.me> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-04-09tests/integrated/test_of_config: comment on how to runIsaku Yamahata
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-09tests/integrated/test_of_config: disable known host checkIsaku Yamahata
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-09setup.py: install xsd filesIsaku Yamahata
They are necessary for OF-config support. 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-09nx: match_tuple() function now handles nw src/dstblacksheeep
match_tuple() function now handles nw src/dst correctly. FIX: match_tuple function now handles the nw src/dst masks correctly. If the mask is not valid, because there is no NX, it will be ignored. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-04-09nx: make pack string of IPv6 address consistent with OF1.2/1.3Can Zhang
Changed pack string of IPv6 address in NXM from former '!4I' to '!8H'. Registered IPv6 src/dst field header so we could parse IPv6 addresses now. Signed-off-by: Can Zhang <can@canx.me> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-04-07topology/dumper: define contexts to receive eventsOHMURA Kei
Signed-off-by: OHMURA Kei <ohmura.kei@lab.ntt.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-04-07ryu/topology/switches: simplify Switches with RyuApp.reply_to_requestIsaku Yamahata
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-04-07ryu/base/app_manager: introduce RyuApp:replay_to_request()Isaku Yamahata
This is a handy method for event request/reply. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-04-07base/app_manager.py: sort out registering bricksIsaku Yamahata
When registering RyuApps to observers with _EVENTS, it should applied to @set_ev_cls methods, and dispatchers should be honored. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-04-07ryu/base/app_manager: pylint unused variablesIsaku Yamahata
pylint fix > W:201,12:AppManager.instantiate_apps: Unused variable 'key' > W:222,24:AppManager.instantiate_apps: Unused variable 'handler' Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-04-07topology/dumper: use handler.set_ev_cls instead of set_ev_handlerIsaku Yamahata
There is no point for dumper.py to use handler.set_ev_cls. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-04-02remove openstack related documentYoshihiro Kaneko
Remove OpenStack related documents except using_with_openstack. README of Quantum Ryu plugin refers to it. remove: doc/source/images/* doc/source/openstack.rst doc/source/step_by_step.rst doc/source/internals_l2_isolation.rst modified: doc/source/index.rst remove index of openstack.rst. doc/source/using_with_openstack.rst replace contents with the pointer to the wiki page. Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-04-02ryu/lib/packet/packet.py: should use isinstance instead of __class__.__base__Isaku Yamahata
The current implementation doesn't allow inheriting twice from class PacketBase. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-04-02lib/packet/packet_utils: optimize checksumIsaku Yamahata
builtin function, sum, is much faster than for loop. The result on my machine is as follows > def main(): > from timeit import timeit > data = bytearray().zfill(1500) > print 'new=', timeit(lambda : checksum(data), number=1000) > print 'old=', timeit(lambda : checksum_old(data), number=1000) > > new= 0.00800108909607 > old= 0.266770124435 Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-04-01Ryu 1.8FUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-04-01rest_firewall: fix commentsYAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-04-01topology/dumper: fix RyuApp.__init__ signatureYAMAMOTO Takashi
so that this is at least instantiatable. Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Acked-by: YAMADA Hideki <yamada.hideki@po.ntts.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-04-01doc: fix a program nameYAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-04-01of1.0: fix import errorYoshihiro Kaneko
Fix the 533fd972519871afe441d365f911a2970fe0875f commit. This patch fixes the following issue. Traceback (most recent call last): File "/opt/stack/ryu/bin/ryu-manager", line 42, in <module> from ryu.base.app_manager import AppManager File "/opt/stack/ryu/ryu/base/app_manager.py", line 25, in <module> from ryu.controller.handler import register_instance File "/opt/stack/ryu/ryu/controller/handler.py", line 20, in <module> from ryu.controller import ofp_event File "/opt/stack/ryu/ryu/controller/ofp_event.py", line 75, in <module> _create_ofp_msg_ev_from_module(m) File "/opt/stack/ryu/ryu/controller/ofp_event.py", line 60, in _create_ofp_msg_ev_from_module mod = utils.import_module(modname) File "/opt/stack/ryu/ryu/utils.py", line 35, in import_module __import__(name) File "/opt/stack/ryu/ryu/ofproto/ofproto_v1_0_parser.py", line 26, in <module> import utils.round_up ImportError: No module named utils.round_up Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-04-01of1.0: utils.round_up cleanupCan Zhang
Signed-off-by: Can Zhang <can@canx.me> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-03-31lib/packet/tcp: use checksum_ip()Isaku Yamahata
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-03-31lib/packet/udp: use checksum_ip()Isaku Yamahata
As side effect, IPv6 is also supported. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-03-31lib/packet/icmpv6: use checksum_ip()Isaku Yamahata
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-03-31lib/packet: checksum function with pseudo ipv4/ipv6 headerIsaku Yamahata
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-03-31lib/packet/packet_utils: improve checksum byteswapIsaku Yamahata
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-31lib/packet/packet_utils: improve checksum paddingIsaku Yamahata
IP checksum needs padding. Move padding 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-31tests/unit/packet/test_tcp.py: typo UDP -> TCPIsaku Yamahata
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-31test_icmpv6: correct icmpv6 checksumIsaku Yamahata
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-31ryu-client: print http responseYAMADA Hideki
Signed-off-by: YAMADA Hideki <yamada.hideki@po.ntts.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-03-31ryu-client: support Topology REST APIYAMADA Hideki
Signed-off-by: YAMADA Hideki <yamada.hideki@po.ntts.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-03-31topology: Add REST APIYAMADA Hideki
1. run topology/switches and app/rest_topology $ ./bin/ryu-manager --verbose --observe-links ryu/topology/switches.py ryu/app/rest_topology.py 2. You can get topology json $ curl http://127.0.0.1:8080/v1.0/topology/links [{"src": {"hw_addr": "06:96:65:51:f8:ff", "name": "s2-eth3", "port_no": "00000003", "dpid": "0000000000000002"}, "dst": {"hw_addr": "4a:ed:13:ea:b7:e0", "name": "s1-eth1", "port_no": "00000001", "dpid": "0000000000000001"}}, {"src": {"hw_addr": "4a:ed:13:ea:b7:e0", "name": "s1-eth1", "port_no": "00000001", "dpid": "0000000000000001"}, "dst": {"hw_addr": "06:96:65:51:f8:ff", "name": "s2-eth3", "port_no": "00000003", "dpid": "0000000000000002"}}, {"src": {"hw_addr": "1e:7b:0b:fc:0a:2f", "name": "s1-eth2", "port_no": "00000002", "dpid": "0000000000000001"}, "dst": {"hw_addr": "4e:62:98:6f:16:57", "name": "s3-eth3", "port_no": "00000003", "dpid": "0000000000000003"}}, {"src": {"hw_addr": "4e:62:98:6f:16:57", "name": "s3-eth3", "port_no": "00000003", "dpid": "0000000000000003"}, "dst": {"hw_addr": "1e:7b:0b:fc:0a:2f", "name": "s1-eth2", "port_no": "00000002", "dpid": "0000000000000001"}}] $ curl http://127.0.0.1:8080/v1.0/topology/switches [{"ports": [{"hw_addr": "4a:ed:13:ea:b7:e0", "name": "s1-eth1", "port_no": "00000001", "dpid": "0000000000000001"}, {"hw_addr": "1e:7b:0b:fc:0a:2f", "name": "s1-eth2", "port_no": "00000002", "dpid": "0000000000000001"}], "dpid": "0000000000000001"}, {"ports": [{"hw_addr": "be:3b:8d:77:14:a5", "name": "s2-eth1", "port_no": "00000001", "dpid": "0000000000000002"}, {"hw_addr": "1e:bf:ec:8b:c2:5b", "name": "s2-eth2", "port_no": "00000002", "dpid": "0000000000000002"}, {"hw_addr": "06:96:65:51:f8:ff", "name": "s2-eth3", "port_no": "00000003", "dpid": "0000000000000002"}], "dpid": "0000000000000002"}, {"ports": [{"hw_addr": "52:a2:9a:7a:a8:a1", "name": "s3-eth1", "port_no": "00000001", "dpid": "0000000000000003"}, {"hw_addr": "62:25:ff:a5:a1:1a", "name": "s3-eth2", "port_no": "00000002", "dpid": "0000000000000003"}, {"hw_addr": "4e:62:98:6f:16:57", "name": "s3-eth3", "port_no": "00000003", "dpid": "0000000000000003"}], "dpid": "0000000000000003"}] Signed-off-by: YAMADA Hideki <yamada.hideki@po.ntts.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-03-31topology: exported function returns Switch/Link list instead of eventYAMADA Hideki
Signed-off-by: YAMADA Hideki <yamada.hideki@po.ntts.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-03-31lib/port_no: handling port_no as stringYAMADA Hideki
Signed-off-by: YAMADA Hideki <yamada.hideki@po.ntts.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-03-30support parse OFPAction in NXFlowStatsCan Zhang
Signed-off-by: Can Zhang <can@canx.me> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-03-30test_parser_v10: fix unittest breakageYAMADA Hideki
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-28lib/packet/packet_base: fix signature of PacketBase.{parser, serialize}Isaku Yamahata
All subclasses define them as parser(cls, buf) and serialize(self, payload, prev) Not parser(cls), serialize(self). pylint also complains like > W: 50,4:ipv4.parser: Arguments number differs from overridden method > W: 65,4:ipv4.serialize: Arguments number differs from overridden method Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-03-28of1.0: fix NXActionHeader typoCan Zhang
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>