summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
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>
2013-03-28lib ofctl_v1_2: add VLAN_ID setting means竹下昇
This patch contains the following update for ofctl_v1_2 library. adding a means which sets up VLAN_ID. (I think that I will use this by a firewall Ryu application.) Signed-off-by: TAKESHITA Noboru <takeshita.noboru@yes.nttcom.ne.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-03-28ofproto_v1_0_parser: add nx_flow_stats_{request, reply}OHMURA Kei
Signed-off-by: OHMURA Kei <ohmura.kei@lab.ntt.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-03-28ofproto_v1_0: add nx_stats constantsOHMURA Kei
Signed-off-by: OHMURA Kei <ohmura.kei@lab.ntt.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-03-28nx_match: add MFField parserOHMURA Kei
Signed-off-by: OHMURA Kei <ohmura.kei@lab.ntt.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-03-25lib ofctl_v1_2: fix file modesFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-03-25add ofctl_v1_2 librarywatanabe.fumitaka
This is a openflow v1.2 control library. Signed-off-by: WATANABE Fumitaka <watanabe.fumitaka@nttcom.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-03-25update ofctl_v1_0 librarywatanabe.fumitaka
This patch contains the update for ofctl_v1_0 library. Signed-off-by: WATANABE Fumitaka <watanabe.fumitaka@nttcom.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-03-25add firewall Ryu applicationwatanabe.fumitaka
This application operates a switch as a firewall. Signed-off-by: WATANABE Fumitaka <watanabe.fumitaka@nttcom.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-03-24app_manager: fix close dict handling bugOHMURA Kei
Signed-off-by: OHMURA Kei <ohmura.kei@lab.ntt.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-03-24ryu-manager: use try-finally statementOHMURA Kei
This fixes a problem that app_mgr.close() is not called when KeyboardInterrupt exception occurs. Signed-off-by: OHMURA Kei <ohmura.kei@lab.ntt.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-03-24nx_match: add vlan and vlan_popChristopher Scherb
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-03-25topology: support link discoveryYAMADA Hideki
event.py: add link events. switches.py: add link discovery (only of1.0). dumper.py: add handler for link events. TODO: support other OpenFlow version. Signed-off-by: YAMADA Hideki <yamada.hideki@po.ntts.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-03-25topology: switch discovering moduleYAMADA Hideki
This is an alternative of dpset, which supports event passing. event.py: event class switches.py: switch(datapath) discovery app using ofp_event dumper.py: test and example app using switch discovery event Signed-off-by: YAMADA Hideki <yamada.hideki@po.ntts.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-03-25event: Add sync flag and event src for request/replyYAMADA Hideki
- To distinguish synchronous request or not. - Event src is needed for asynchronous request too. Signed-off-by: YAMADA Hideki <yamada.hideki@po.ntts.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-03-18TLS: use a full spelling of a cli optionYAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-03-18TLS: test cli options consistently in the same lineYAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-03-18TLS: update an example outputYAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-03-18ofconfig: use ElementTree iterator instead of getchildrenYAMAMOTO Takashi
getchildren is documented to be obsolete. Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-03-18ryu.controller.controller.Datapath: keep handler list regardless of stateYoshihiro Kaneko
The list of handler to be called for the OFP message should be kept even if the state is changed in a handler. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-03-18vsctl: fix timeoutYAMAMOTO Takashi
- run_command's timeout argument is named 'timeout_msec', but all callers seem to pass the value in second. so rename the argument to 'timeout_sec'. - gevent.Timeout takes a timeout value in second. remove a conversion, which seems wrong even if the argument was in ms. Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-03-18tunnel_port_updater: g/c _LOCKYAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-03-18packet lib: fix icmpv6.nd parserHIYAMA Manabu
Signed-off-by: HIYAMA Manabu <hiyama.manabu@po.ntts.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-03-08doc: of_config libraryIsaku Yamahata
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-03-08of_config: sample test code to use ofconfig capable_switchIsaku Yamahata
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-03-08of_config: OF capable switch class to issue OFConfig requestIsaku Yamahata
This class implements direct API to ofconfig. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-03-08of_config: constants for of-configIsaku Yamahata
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-03-08of_config/schema: add missing importIsaku Yamahata
Otherwise lxml.etree.XMLSchema complains. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-03-08of_config: import XML schema files for OF config.Isaku Yamahata
Import XML schema files for OF config. They are stolen from flowflowarding of_config. NOTE: They adds operation attribute where they accepts. When we supports another OF-config capable switch, they needs to be updated. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-03-08netconf: add constants for netconfIsaku Yamahata
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-03-08netconf: improve schema for netconfIsaku Yamahata
RFC6241 defines only message layer, doesn't operation layer. So adds definitions for operation layer. Note: notification layer is still missing yet. Plus indentation fix. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-03-08netconf: import XML schema for netconfIsaku Yamahata
This is from IANA defined by RFC6241. stolen from http://www.iana.org/assignments/xml-registry/schema/netconf.xsd Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>