summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2013-02-04replace dispatcher mechanismFUJITA Tomonori
This is purely internal change and no API for applications is changed. At least, I confirmed that folsom OpenStack plugin works. With the current dispatcher mechanism, multiple greenlets call applications' handlers and might be blocked anywhere so we need various locks to handle that concurrency. This makes things difficult for application developers. With this patch, each applications are connected with events. Each application has the own greenlet(s) to handle events and might send events to other applications. If an application registers handlers for some OF events, it subscribes to OF component and registers the OF events that it's interested. OF application delivers such OF events to the application and the application's greenlet executes the handlers. With this, we can completely remove dispatcher.py and its friends. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-02-04lib/ovs/bridge: helper class to manipulate ovs bridgeIsaku Yamahata
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-02-04lib/ovs/vsctl: python reimplementation of ovs-vsctlIsaku Yamahata
This implements subset of ovs-vsctl which is used later. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-02-04lib/ovs: add constants for ovsdb Open_vSwitch dbIsaku Yamahata
Those constants are used to manipulate Open_vSwitch db of ovsdb. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-02-02contrib: fix a comment typoYAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Reviewed-by: Simon Horman <horms@verge.net.au> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-01-30dpset: fix join racemarcelo
the datapath object should be added to the list in DPSet before datapath_join event is fired. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-01-30packet lib: pep8 warning fixYAMAMOTO Takashi
run_tests.sh complained. ryu/lib/packet/icmp.py:102:15: E271 multiple spaces after keyword return msg ^ Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-01-30test: remove some unnecessary bash dependenciesYAMAMOTO Takashi
/bin/bash is not so ubiquitous. Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-01-30Ryu 1.6FUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-01-29test: add mininet-test suiteHIYAMA Manabu
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-29test: Add "Decrement IP TTL" integration testHIYAMA Manabu
Signed-off-by: HIYAMA Manabu <hiyama.manabu@po.ntts.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-01-25ofctl_v1_0: fix stats timeout handlingOHMURA Kei
This patch fixes a issue reported by https://github.com/osrg/ryu/issues/7 Signed-off-by: OHMURA Kei <ohmura.kei@lab.ntt.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-01-23fix lack of comma in flagfile listYoshihiro Kaneko
When flagfile option is omitted, ryu-manager cannot find "/etc/ryu/ryu.conf". Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-01-10of1.3: Fix a typo in OFPPacketOutKrzysztof Rutka
- in_port was missing an underscore Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-01-08setup: update installation infosIsaku Yamahata
- clean up setup.py and MANIFEST.in - simplejson isn't needed anymore - allow webob >= 1.0.8 as openstack quantum uses >= 1.0.8 version - allow gflags >= 1.3 as Fedora 18 uses gflags 1.5 Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-01-07test: change the branch of openvswitch to 'of12'HIYAMA Manabu
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>
2012-12-20ofp_handler: receiving side of OFPHelloElem version negotiationIsaku Yamahata
Teach Hello handler OFPHelloElemBitmapVersion Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-12-20of1.3: improve OFPHello and OFPHelloElemVerionsBitmapIsaku Yamahata
- fix bitmap offset calculation - un-tuple bitmap. The result of struct.unpack is a tuple - OFPHelloElemVerionsBitmap parser needs to be aware padding - make OFPHelloElemVerionsBitmap parse bitmap into the list of versions - make OFPHello always have elements attribute Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-12-20ofctl_{rest, v1_0}: update and clean upOHMURA Kei
- rename push_flow_entry to mod_flow_entry - add OFPFC_{MODIFY, DELETE} support - remove debug message Signed-off-by: OHMURA Kei <ohmura.kei@lab.ntt.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-12-19ryu-manager: fix keyErrorOHMURA Kei
Exception can be be caused by importing the threading module before monkey.patch_all(). This patch fixes the following keyError: $ ryu-manager --version ryu-manager 1.5 Exception KeyError: KeyError(30027824,) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored Signed-off-by: OHMURA Kei <ohmura.kei@lab.ntt.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-12-19don't abuse __dict__ attributeIsaku Yamahata
There are built-in functions to handle attribute like hasattr. Use standard functions instead of abusing __dict__. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-12-19ofp_handler: Improve hello version negotiationIsaku Yamahata
When switch sends version higher than Ryu supports, Ryu fails to negotiate. In this case 4 = OF1.3 from switch 3 = OF1.2 from Ryu datapath.supported_ofp_version = (3 = OF1.2,) In such cases, we should use OF1.2 instead of error. > Connection to controller closed because of {"localhost",6633,0, {unsupported_version,4}} Reported-by: 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>
2012-12-18of1.3: fix OFPMultipartReply parserFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-12-15of1.3: support OFPHET_VERSIONBITMAPFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-12-11doc: setup TLS connectionOHMURA Kei
Signed-off-by: OHMURA Kei <ohmura.kei@lab.ntt.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-12-07of1.3: fix OFPT_PACKET_IN parserFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-11-30Ryu 1.5FUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-11-30set setup.py install_requires properlyFUJITA Tomonori
Let's enable pip to solve the dependency. The code is taken from OpenStack. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-11-30python/ovs/stream: Fix Stream.connect() retval for incomplete connection.Isaku Yamahata
This code is a backport from the upstream OVS (commit dcb66da): If the loop condition in Stream.connect() was false, which is especially likely for TCP connections, then Stream.connect() would return None, which violates its documented behavior. This commit fixes the problem. Reported-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-11-30Revert "contrib/ovs/stream.py: TypeError: bad operand type for unary -: ↵Isaku Yamahata
'NoneType'" This reverts commit c3a41d06a654ea81cdc79d7bda5106d05f2e1deb. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-11-28ryu/log: bugfixYAMADA Hideki
$ ryu-manager --log_file $HOME/ryu.log Traceback (most recent call last): (...) File "/usr/local/lib/python2.7/dist-packages/ryu-1.1-py2.7.egg/ryu/log.py", line 74, in init_log logging.addHandler(logging.handlers.WatchedFileHandler(log_file)) AttributeError: 'module' object has no attribute 'addHandler' $ ryu-manager --log_file $HOME/ryu.log Traceback (most recent call last): (...) File "/usr/local/lib/python2.7/dist-packages/ryu-1.4-py2.7.egg/ryu/log.py", line 74, in init_log log.addHandler(logging.handlers.WatchedFileHandler(log_file)) AttributeError: 'module' object has no attribute 'handlers' $ ryu-manager --log_file $HOME/ryu.log Traceback (most recent call last): (...) File "/usr/local/lib/python2.7/dist-packages/ryu-1.4-py2.7.egg/ryu/log.py", line 76, in init_log mode = int(FLAGS.log_file_mnode, 8) File "/usr/local/lib/python2.7/dist-packages/gflags.py", line 810, in __getattr__ raise AttributeError(name) AttributeError: log_file_mnode $ ryu-manager --log_dir $HOME/log/ Traceback (most recent call last): (...) File "/usr/local/lib/python2.7/dist-packages/ryu-1.4-py2.7.egg/ryu/log.py", line 54, in _get_log_file return os.path.join(FLAGS.logdir, File "/usr/local/lib/python2.7/dist-packages/gflags.py", line 810, in __getattr__ raise AttributeError(name) AttributeError: logdir Signed-off-by: YAMADA Hideki <yamada.hideki@po.ntts.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-11-26ofctl_v1_0: update and clean upOHMURA Kei
- add ip match support - add match_to_str() and actions_to_str() instead of action_to_str() Signed-off-by: OHMURA Kei <ohmura.kei@lab.ntt.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-11-23enable OF1.3 supportFUJITA Tomonori
Ryu sucessfully connects to CPqD OF1.3 switch. https://github.com/CPqD/ofsoftswitch13 Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-11-23of1.3: fix OFPMP_FLOWFUJITA Tomonori
FlowStats works now. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-11-23of1.3: support OFPMatchFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-11-23Add workaround to switch_features_handler for OF1.3FUJITA Tomonori
hacky workaround, will be removed. OF1.3 doesn't have ports. An application should not depend on them. But there might be such bad applications so let's keep this workaround for while. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-11-23of1.3: fix OFPPacketQueueFUJITA Tomonori
File "/Users/fujita/git/ryu/ryu/ofproto/ofproto_v1_3_parser.py", line 2649, in OFPPacketQueue @clasmethod NameError: name 'clasmethod' is not defined Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-11-23of1.3: fix OFPSetAsynFUJITA Tomonori
File "/Users/fujita/git/ryu/ryu/ofproto/ofproto_v1_3_parser.py", line 1555, in <module> @_set_msg_type(ofproto_v1_3.OFPT_SET_ASYNC) AttributeError: 'module' object has no attribute 'OFPT_SET_ASYNC' Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-11-23of1.3: fix OFPQueuePropFUJITA Tomonori
File "/Users/fujita/git/ryu/ryu/ofproto/ofproto_v1_3_parser.py", line 1398, in register_queue_property return _register_queue_property NameError: global name '_register_queue_property' is not defined Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-11-23of1.3: fix OFPMeterFeaturesStatsRequestFUJITA Tomonori
File "/Users/fujita/git/ryu/ryu/ofproto/ofproto_v1_3_parser.py", line 1265, in <module> @_set_stats_type(ofproto_v1_3.OFPMP_METER_FEATUERS, OFPMeterFeaturesStats) AttributeError: 'module' object has no attribute 'OFPMP_METER_FEATUERS' Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-11-23of1.3: fix OFPMeterConfigStatsReplyFUJITA Tomonori
File "/Users/fujita/git/ryu/ryu/ofproto/ofproto_v1_3_parser.py", line 1246, in <module> @_set_stats_type(ofproto_v1_3.OFPMP_METER_CONFIG, OFPMeterCOnfigStats) NameError: name 'OFPMeterCOnfigStats' is not defined Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-11-23of1.3: fix OFPPortStatsReplyFUJITA Tomonori
File "/Users/fujita/git/ryu/ryu/ofproto/ofproto_v1_3_parser.py", line 976, in <module> @_set_msg_type(ofproto_v1_3.OFPT_STATS_REPLY) AttributeError: 'module' object has no attribute 'OFPT_STATS_REPLY' Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-11-23of1.3: fix OFPMP_AGGREGATEFUJITA Tomonori
File "/Users/fujita/git/ryu/ryu/ofproto/ofproto_v1_3_parser.py", line 898, in <module> @_set_stats_type(ofproto_v1_3.OFPST_AGGREGATE, OFPAggregateStats) AttributeError: 'module' object has no attribute 'OFPST_AGGREGATE' Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-11-23of1.3: fix OFP_DESC_PACK_STRFUJITA Tomonori
File "/Users/fujita/git/ryu/ryu/ofproto/ofproto_v1_3.py", line 533, in <module> DESC_STR_LEN + 'c' TypeError: cannot concatenate 'str' and 'int' objects Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-11-23of1.3: fix OFP_METER_BAND_DSCP_REMARK_PACK_STR assertFUJITA Tomonori
File "/Users/fujita/git/ryu/ryu/ofproto/ofproto_v1_3.py", line 480, in <module> OFP_METER_BAND_DSCP_REMARK_SIZE) AssertionError Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-11-23of1.3: fix OFP_TABLE_MOD_PACK_STR assertFUJITA Tomonori
File "/Users/fujita/git/ryu/ryu/ofproto/ofproto_v1_3.py", line 383, in <module> assert (calcsize(OFP_TABLE_MOD_PACK_STR + OFP_HEADER_SIZE) == TypeError: cannot concatenate 'str' and 'int' objects Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-11-23of1.3: fix OFP_OXM_EXPERIMENTER_HEADER_SIZE assertFUJITA Tomonori
File "/Users/fujita/git/ryu/ryu/ofproto/ofproto_v1_3.py", line 233, in <module> OFP_OXM_EXPERIMENTER_HEADER_SIZE) == OFP_OXM_EXPERIMENTER_HEADER_SIZE Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-11-22contrib/ovs: TypeError: bad operand type for unary -: 'NoneType'Isaku Yamahata
This fixes the following exception: When Stream.__scs_connecting doesn't change self.state, Stream.connect() returns None as implicit return value. Thus, the following exception is raised. conf_switch_set_handler 00003247b5e63145 ovsdb_addr tcp:172.17.60.198:6634 _ovsdb_update 00003247b5e63145 tcp:172.17.60.198:6634 172.17.60.198 _add_tunnel_ports <ryu.app.tunnel_port_updater.TunnelDP object at 0x14a5950> set([]) 172.17.60.198 - - [2012-11-21 15:01:00] "PUT /v1.0/conf/switches/00003247b5e63145/ovsdb_addr HTTP/1.1" 201 120 0.267351 remote tcp:172.17.60.198:6634 Traceback (most recent call last): File "/usr/lib/pymodules/python2.7/gevent/greenlet.py", line 390, in run result = self._run(*self.args, **self.kwargs) File "/home/yamahata/openvswitch/sp-lab/scarab/gre-tunnel/ryu-2/bin/ryu/app/tunnel_port_updater.py", line 289, in _serve_loop self._init() File "/home/yamahata/openvswitch/sp-lab/scarab/gre-tunnel/ryu-2/bin/ryu/app/tunnel_port_updater.py", line 125, in _init self.ovs_bridge.init() File "/home/yamahata/openvswitch/sp-lab/scarab/gre-tunnel/ryu-2/bin/ryu/lib/ovs/bridge.py", line 103, in init self.br_name = self._get_bridge_name() File "/home/yamahata/openvswitch/sp-lab/scarab/gre-tunnel/ryu-2/bin/ryu/lib/ovs/bridge.py", line 111, in _get_bridge_name self.run_command([command]) File "/home/yamahata/openvswitch/sp-lab/scarab/gre-tunnel/ryu-2/bin/ryu/lib/ovs/bridge.py", line 99, in run_command self.vsctl.run_command(commands, self.timeout, self.exception) File "/home/yamahata/openvswitch/sp-lab/scarab/gre-tunnel/ryu-2/bin/ryu/lib/ovs/vsctl.py", line 1006, in run_command self._run_command(commands) File "/home/yamahata/openvswitch/sp-lab/scarab/gre-tunnel/ryu-2/bin/ryu/lib/ovs/vsctl.py", line 999, in _run_command self._do_main(commands) File "/home/yamahata/openvswitch/sp-lab/scarab/gre-tunnel/ryu-2/bin/ryu/lib/ovs/vsctl.py", line 918, in _do_main self._init_schema_helper() File "/home/yamahata/openvswitch/sp-lab/scarab/gre-tunnel/ryu-2/bin/ryu/lib/ovs/vsctl.py", line 805, in _init_schema_helper vswitch_idl.OVSREC_DB_NAME) File "/home/yamahata/openvswitch/sp-lab/scarab/gre-tunnel/ryu-2/bin/ryu/lib/ovs/vsctl.py", line 793, in _rpc_get_schema_json error, reply = rpc.transact_block(request) File "/home/yamahata/openvswitch/sp-lab/scarab/gre-tunnel/ryu-2/bin/ryu/contrib/ovs/jsonrpc.py", line 306, in transact_block error = self.send(request) File "/home/yamahata/openvswitch/sp-lab/scarab/gre-tunnel/ryu-2/bin/ryu/contrib/ovs/jsonrpc.py", line 240, in send self.run() File "/home/yamahata/openvswitch/sp-lab/scarab/gre-tunnel/ryu-2/bin/ryu/contrib/ovs/jsonrpc.py", line 200, in run retval = self.stream.send(self.output) File "/home/yamahata/openvswitch/sp-lab/scarab/gre-tunnel/ryu-2/bin/ryu/contrib/ovs/stream.py", line 213, in send return -retval TypeError: bad operand type for unary -: 'NoneType' <Greenlet at 0x133fd10: <bound method TunnelDP._serve_loop of <ryu.app.tunnel_port_updater.TunnelDP object at 0x14a5950>>> failed with TypeError Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-11-21of1.2: fix some error constant typosSriram Natarajan
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-11-20packet lib: add arp constantsOHMURA Kei
Signed-off-by: OHMURA Kei <ohmura.kei@lab.ntt.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>