summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2013-06-20of12: fix OFPExperimenter parserYAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-06-11of1.3: Fix parsing of OFP_QUEUE_GET_CONFIG_REPLYOren Spector
Make parsing similar to that of OpenFlow 1.2 (message has the same format as in 1.3) Signed-off-by: Oren Spector <oren@oliver-solutions.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-06-10packet lib: packet class supports get_protocol methodIsaku Yamahata
returns a list of protocols that matches to the specified protocol. Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-06-10packet lib: add Packet.__contains__Isaku Yamahata
you can do something like: if arp.arp in Packet(msg.data): a = arp.arp(...) if a in Packet(msg.data): >>> from ryu.lib.packet import packet >>> from ryu.lib.packet import arp >>> a = arp.arp_ip(1, 0, 0, 0, 0) >>> p = packet.Packet() >>> p.protocols = [a] >>> arp.arp in p True >>> a in p True Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-06-10packet lib: packet class accepts protocols list argumentFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-06-10packet lib: arp default argsFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-06-10packet lib: vlan default argsFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-06-10packet lib: mpls default argsFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-06-10packet lib: ipv4 default argsFUJITA Tomonori
Make ipv4 more handy by not asking for every args. I prefer to use more human-readble representation for src and dst but it leads to the API change so let's do it later with another patch. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-06-10packet lib: icmp support time exceeded typeFUJITA Tomonori
Used mainly for traceroute. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-06-10of1.2: fix OFPSetConfig default argumentsFUJITA Tomonori
If you use initialize like the following way: OFPSetConfig(dp, miss_send_len=1600) You get the following assertion when it's serialized: File "/Users/fujita/git/ryu/ryu/ofproto/ofproto_v1_2_parser.py", line 244, in _serialize_body assert self.flags is not None Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-06-09fix travis config fileFUJITA Tomonori
force to use virtual env. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-06-10Add config file for TravisFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-06-10packet lib: allow packet type to be specified when parsing packetShaun Crampton
Signed-off-by: Shaun Crampton <Shaun.Crampton@metaswitch.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-06-08packet lib: For convenience, make packet into a sequence typeShaun Crampton
Protocols can mow be accesed as packet[n]. Signed-off-by: Shaun Crampton <Shaun.Crampton@metaswitch.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-06-02Ryu 2.0FUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-06-02of1.3: various fixesShaun Crampton
- OFPActionSetField - OFPBucket parser - OFPMeterBandStats Signed-off-by: Shaun Crampton <Shaun.Crampton@metaswitch.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-06-02fix 77effb29 regressionFUJITA Tomonori
The following commit broke ofp_attrs(): commit 77effb29a69eeb6d320dd9a7554924b2578c3c95 Author: Isaku Yamahata <yamahata@valinux.co.jp> Date: Mon May 27 18:15:27 2013 +0900 ofproto/ofproto_parser: pylint Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-06-01packet lib: make test_packet work stand-aloneShaun Crampton
Prevent missing imports when running ./run_tests.sh ryu.tests.unit.packet Signed-off-by: Shaun Crampton <Shaun.Crampton@metaswitch.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-05-31Add Packet library API Reference竹下昇
Add DHCP encoder/decoder class. Signed-off-by: TAKESHITA Noboru <takeshita.noboru@yes.nttcom.ne.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-05-31lib/packet: DHCP packet parser/serializer竹下昇
Add DHCP encoder/decoder class. Signed-off-by: TAKESHITA Noboru <takeshita.noboru@yes.nttcom.ne.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-05-31ofproto/ofproto_parser: pylintIsaku Yamahata
************* Module ryu.ofproto.ofproto_parser W:155,4:MsgBase.__init__: __init__ method from base class 'StringifyMixin' is not called W:186,8:MsgBase.parser: Redefining name 'msg' from outer scope (line 48) W:240,14:ofp_attrs: Redefining name 'msg' from outer scope (line 48) W:268,17:msg_str_attr: Redefining name 'msg' from outer scope (line 48) E:270,20:msg_str_attr: Undefined variable 'ofp_attr' Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-05-31of1.0: use tun_id instead of tun_id_Isaku Yamahata
Since there is no name conflict with tun_id, no reason to use tun_id_ instead of tun_id. This is needed for OF message conversion from/to json later. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-05-23docs: fix ryu module importFUJITA Tomonori
readthedocs.org complains about the failure about ryu module import. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-05-23tests/unit/packet/test_vrrp: add tests for is_valid()YAMADA Hideki
Signed-off-by: YAMADA Hideki <yamada.hideki@po.ntts.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-05-23lib/packet/vrrp: fix is_valid()YAMADA Hideki
Signed-off-by: YAMADA Hideki <yamada.hideki@po.ntts.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-05-23test_parser_v10: remove tests for __str__YAMADA Hideki
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-23Merge branch 'master' of github.com:osrg/ryuFUJITA Tomonori
2013-05-18of13: Fix for OFPQueueGetConfigReply/RequestPhilipp Aeschlimann
Signed-off-by: Philipp Aeschlimann <aepp@zhaw.ch> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-05-18run_tests: make python interpreter overridableYAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-05-18app/gre_tunnel: pylintIsaku Yamahata
> E: 60,18:PortSet.EventTunnelKeyDel.__init__: Undefined variable 'EventTunnelKeyDel' > W: 18,0: Unused import logging Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-05-18app/quantum_adapter: unbreak quantum changeIsaku Yamahata
Now quantum checks attributes strictly on REST request by the changeset of 61bdda62e8950a9747073e2be7b81cdea0af2f25 Don't send non-standard attribute. > commit 61bdda62e8950a9747073e2be7b81cdea0af2f25 > Author: Jason Zhang <zhesen@nttmcl.com> > Date: Tue Feb 12 18:40:12 2013 -0800 > > Raising error if invalid attribute passed in. > > 400 will be returned when invalid attributes > are passed into Quantum API. > > Fixed the some test cases failed since the > enforcement of invalid attribute checking > > Fixes: bug #1076179 > > Change-Id: I4e9e2891c444f9dcd051f7b325d3c9403b28db86 Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-05-18of10: sprinkle StringifyMixinYAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-05-18of: StringifyMixinYAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-05-18use dpid_to_str in some placesYAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-05-14tests/ofproto: add unit test for ofproto automatic detectionIsaku Yamahata
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-05-14ofproto: exception during startup related ofp module detactionIsaku Yamahata
This patch fixes the following exception. ryu/controller/ofp_event.py: update cd /opt/stack/ryu && /opt/stack/ryu/bin/ryu-mana ^Mger --config-file /etc/ryu/ryu.conf || touch "/opt/stack/status/stack/ryu.failur ^Me" > Traceback (most recent call last): > File "/opt/stack/ryu/bin/ryu-manager", line 41, in <module> > from ryu.base.app_manager import AppManager > File "/opt/stack/ryu/ryu/base/app_manager.py", line 22, 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 69, in <module> > for ofp_mods in ofproto.get_ofp_module(): > TypeError: get_ofp_module() takes exactly 1 argument (0 given) Reported-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-05-15tests/ofproto: add unit test for ofproto automatic detectionIsaku Yamahata
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-05-15ofproto: exception during startup related ofp module detactionIsaku Yamahata
This patch fixes the following exception. ryu/controller/ofp_event.py: update cd /opt/stack/ryu && /opt/stack/ryu/bin/ryu-mana ^Mger --config-file /etc/ryu/ryu.conf || touch "/opt/stack/status/stack/ryu.failur ^Me" > Traceback (most recent call last): > File "/opt/stack/ryu/bin/ryu-manager", line 41, in <module> > from ryu.base.app_manager import AppManager > File "/opt/stack/ryu/ryu/base/app_manager.py", line 22, 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 69, in <module> > for ofp_mods in ofproto.get_ofp_module(): > TypeError: get_ofp_module() takes exactly 1 argument (0 given) Reported-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-05-14of13: add missing UINTxx_MAXYAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-05-14controller/ofp_event: don't hardcode supported OFP parser moduleIsaku Yamahata
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-05-14ofproto: detect supported OFP versions automatically.Isaku Yamahata
And add helper functions to get OFP modules/class for a given OFP version. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-05-14ofproto_parser: simplify msg_str_attr() a bitIsaku Yamahata
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-05-13update requirementsYAMAMOTO Takashi
netaddr is used by: ryu/app/tunnel_port_updater.py ryu/lib/packet/vrrp.py Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-05-11Support bind IPv6 addresses in StreamServerCan Zhang
Use a very loose condition to determine if the address is an IPv6 address or not. Signed-off-by: Can Zhang <can@canx.me> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-05-11Revert "add eventlet to test requirement"FUJITA Tomonori
This reverts commit e93a3f2d99133422e51fbd531dd58052e8e261a3. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-05-12ofproto: change the way __str__ is implemented for of-wire messagesYAMAMOTO Takashi
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-10controller: stop catching GreenletExitYAMAMOTO Takashi
no longer necessary after the hub changes. Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-05-10hub: add some more testsYAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-05-10hub: handle GreenletExit internallyYAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>