summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2015-03-18doc/app/ofctl_rest: Fix example of ipv6_exthdr match fieldYusuke Iwase
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-03-18test_ofctl: Add unit test for masked ipv6_exthdr match fieldYusuke Iwase
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-03-18ofctl_v1_3: Support masked ipv6_exthdr match fieldYusuke Iwase
In OpenFlow Spec 1.3.4, ipv6_exthdr is maskable match field, but ofctl_v1_3 does not support mask. This patch makes ofctl_v1_3 enable to set masked ipv6_exthdr. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-03-17requirements: Drop some optional requirementsYAMAMOTO Takashi
Move some non pure python requirements (namely lxml and paramiko) from pip-requires to test-requires. Document it in README.rst. Motivations: - Make this pip-installable with pypy - Less distribution package requirements (deb/rpm/etc) in case a user do not actually need the functionality Note: while paramiko itself is pure python, it requires pycrypto. Note: msgpack has pure python fallback implementation. Separating ryu into smaller packages would be a better alternative. However, it would involve a lot more work than this workaround. Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-03-17README.rst: Replace a reference to ryu-plugin with ofagentYAMAMOTO Takashi
Ryu-plugin is obsolete and has been removed in the development version of OpenStack/Networking. Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-03-17pip-requires: Add comments to say what's required by whatYAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-03-17UT: Remove unused importsYAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-03-17bgp: Remove an unused importYAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-03-17yet more logging call cleanupsMark Lentczner
Signed-off-by: Jerry Cen <zhiweic@google.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-03-16ryu.app.ofctl: Handle a race with connection closeYAMAMOTO Takashi
Report the failure to the client rather than crashing. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-03-16silence pep8 warnings to the previous commitFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-03-16Reduce logging overhead by cleaning up logging callsMark Lentczner
Deferred formatting to the logging system: --------------------------------------------- In general logger.debug('xxx %s yyy %d zzz' % (a, b, c)) can be written as: logger.debug('xxx %s yyy %d %zzz', a, b, c) This is faster, as Python logging doesn't bother doing the format operation (which is slow) if the log message won't be logged. We measured that a significant amount of CPU time in the BGP service was attributable to these formatting operations. Removed unneeded calls to str() and repr() ------------------------------------------ since formatting operations %s and %r will make these calls when (and if) the formatting is performed. Signed-off-by: Jerry Cen <zhiweic@google.com> Acked-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-03-02Ryu 3.19FUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-03-02snortlib: Remove disabled flag MSG_WAITALLYusuke Iwase
Because Ryu is based on Eventlet, GreenSocket is used by default and blocking flags is disabled. So MSG_WAITALL flag is not available. This patch removes MSG_WAITALL flag, and fixes snortlib.py to check received buffer size in _recv_loop_nw_sock(). Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-02-26ryu.cfg: Use a dedicated ConfigOpt instanceYAMAMOTO Takashi
This might be necessary for future vesions of Neutron OVS agent. 1. The agent parses options, including command line options, using oslo.config.cfg.CONF ConfigOpt instance. 2. Depending on options, it might lazily import ryu modules. 3. The ryu modules might have import-time register_cli_opts calls against ryu.cfg.CONF. 3. As ryu.cfg.CONF is same as oslo.config.cfg.CONF, oslo.config raises an exception, complaining register_cli_opts is used after parsing command line options. Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-02-25snortlib: Fix nw_sock handlingYusuke Iwase
Currently, snortlib cannot receive reconnect request from Snort client program (e.g. pigrelay.py). This patch fixes this problem. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-02-25of: Prevent __str__() methods from raising exceptionsAkihiro Suda
ofproto_parser.MsgBase.__str__(): avoid "TypeError: %x format: a number is required, not NoneType"
2015-02-25bgp: Prevent __str__() methods from raising exceptionsAkihiro Suda
bgp.BadMsg.__str__(): avoid "AttributeError: 'BadMsg' object has no attribute 'msg'" Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-02-20packet lib: dhcp: Fix to calculate Hardware address lengthMinoru TAKAHASHI
Reported-by: Sam Russell <sam.h.russell@gmail.com> Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-02-16travis-ci: use container-based infrastructure for faster testingsFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-02-16Move msg_pack_into from ofproto to libYAMAMOTO Takashi
A motivation of this change is a better modularity. I.e. Make packet lib independent from ofproto. Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-02-16tox.ini: Disable pep8 W503 for nowYAMAMOTO Takashi
Disable pep8 "W503 line break before binary operator" warning for now. The check was recently introduced by pep8 1.6.2. Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-02-15bgp/bmp: bug fix. remove redundant construction of path attributesISHIDA Wataru
BGPPathAttributeNextHop and BGPPathAttributeMpReachNLRI is already in new_pathattr. so stop construct and append it to new_pathattr list. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-02-15Move the definitions of ether types and inet protocols to lib.packetYAMAMOTO Takashi
A motivation of this change is a better modularity. I.e. Make packet lib independent from ofproto. Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-02-15ofproto: Fix invalid error code OFPQCFC_EPERM -> OFPSCFC_EPERM (EXT-208)Shu Shen
Invalid error code OFPQCFC_EPERM should be OFPSCFC_EPERM instead. This is EXT-208 that was included in Openflow v1.3.1. OFPSCFC_EPERM is backported to ofproto_v1_2 so that any new or updated application could consistently use OFPSCFC_EPERM to handle all protocol versions. OFPQCFC_EPERM is left in ofproto_v1_2 and ofproto_v1_3 definitions for backward compatibility. Signed-off-by: Shu Shen <shu.shen@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-02-15ofproto: Openflow 1.5 support (work-in-progress)Shu Shen
Work done: - The baseline is copied over from ofproto_v1_4.py and ofproto_v1_4_parser.py and into ofproto_v1_5.py and ofproto_v1_5_parser.py respectively. - Most of structs, enums, and pack strings in ofproto_v1_5.py has been updated to spec. Exception is oxs_fields has not been done yet. - ofproto_v1_5_parser.py has not been updated except those necessary to allow run_tests.sh to complete successfully - ofproto_protocol.py imports ofproto_v1_5 and ofproto_v1_5_parser now - oxm_fields.py is updated for OFPXMC_PACKET_REGS - Tests are updated to include Openflow v1.5 when it's obvious. But not much work has been done to acutally test v1.5 yet. I also found tests for v1.4 are scarce. TODO: - Add oxs_fields support. It shall be similar to oxm_fields - Update and implement ofproto_v1_5_parser.py - More tests, tests, tests. Signed-off-by: Shu Shen <shu.shen@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-02-08ignore some pep8 errors for nowFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-02-08test_oxm: Add tests for EXT-109 and EXT-233YAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-02-08ofproto_v1_3: Implement EXT-109 and EXT-233YAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-02-08oxm_fields: Rename ONFExperimenter to OldONFExperimenterYAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-02-08oxm_fields: Update comment for the new version of EXT-256YAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-02-08bgp: support of new api for "show neighbor"Toshiki Tsuboi
You can understand adj-RIB-in information through new api. - received-routes : paths received and not withdrawn by given peer - sent-routes : paths sent and not withdrawn to given peer (sample log of show neighbor) INFO:bgpspeaker.api.base:API method operator.show called with args: {'params': ['neighbor', 'received-routes', '192.168.101.101', 'all'], 'format': 'cli'} Status codes: x filtered Origin codes: i - IGP, e - EGP, ? - incomplete Timestamp Network Labels Next Hop Metric LocPrf Path 2015/02/06 06:52:04 192.168.1.0/30 None 192.168.101.101 100 None [65010] i 2015/02/06 06:52:04 192.168.2.0/30 None 192.168.101.101 100 None [65010] i 2015/02/06 06:52:04 0.0.0.0/0 None 192.168.101.101 100 None [65010, 65001] i Signed-off-by: Toshiki Tsuboi <t.tsubo2000@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-02-08bgp: Fixed error in bgp implementation with single peerAlan Quillin
When a single peer is specified for BGPSpeaker the server value was not being set upon return. Signed-off-by: Alan Quillin <alanquillin@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-02-08bgp: fix bug of Path formatting in "show neighbor"Toshiki Tsuboi
The field of "Path" has not displayed in properly as bellow. It looks the raw data of Origin code has displayed instead. bgpd> show neighbor received-routes 192.168.101.101 all Status codes: x filtered Origin codes: i - IGP, e - EGP, ? - incomplete Timestamp Network Labels Next Hop Metric LocPrf Path 2015/02/05 07:39:05 192.168.1.0/30 None 192.168.101.101 100 None [65010] 2 2015/02/05 07:39:05 192.168.2.0/30 None 192.168.101.101 100 None [65010] 2 2015/02/05 07:39:05 0.0.0.0/0 None 192.168.101.101 100 None [65010, 65001] 2 Signed-off-by: Toshiki Tsuboi <t.tsubo2000@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-02-03Ryu 3.18FUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-02-01bgp: bug fix of sending Adj-RIB-OutToshiki Tsuboi
Signed-off-by: Toshiki Tsuboi <t.tsubo2000@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-30ryu-manager: add --enable-debugger optionSatoshi Kobayashi
Eventlet's monkey patch overwrite Python standard threading library by default. It affects to Python debugger working. This will be often an issue for the user of Python debugger. Therefore, it's necessary to add the option which doesn't overwrite Python standard threading library. Signed-off-by: Satoshi Kobayashi <satoshi-k@stratosphere.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-26bgp/cli: fix internel data destruction due to cli show commandISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-26bgp: remove unnecessary bgp update constructionISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-26bgp: fix bug of NameError: global name 'sent_route' is not definedISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-26bmpstation: bug fix. stop closing fds which are in use.ISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-26bgp: don't hold withdrawn routes in adj_rib_inISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-26bgp/bmp: send unmodified BGPUpdate to bmp server.ISHIDA Wataru
Current implementation of bmp client uses Peer._construct_update() which modifies original BGPUpdate message for sending to peers. This function is not appropriate to use for bmp client, because bmp client must send a BGPUpdate message which contains unmodified path attributes. Fix this by introducing BMPClient._construct_update(). Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-25Add parsing libpcap and reading/writing PCAP fileChe-Wei Lin
Add parsing libpcap and reading/writing PCAP file for debugging. Now you can easily dump the PCAP file in ryu controller. Here is the quick example for dumping the data packets: from ryu.lib import pcaplib class SimpleSwitch13(app_manager.RyuApp): OFP_VERSIONS = [ofproto_v1_3.OFP_VERSION] def __init__(self, *args, **kwargs): super(SimpleSwitch13, self).__init__(*args, **kwargs) self.mac_to_port = {} # Creating an instance with a PCAP filename self.pcap_pen = Writer(open('mypcap.pcap', 'wb')) @set_ev_cls(ofp_event.EventOFPPacketIn, MAIN_DISPATCHER) def _packet_in_handler(self, ev): msg = ev.msg # Dump the data packet into PCAP file self.pcap_pen.write_pkt(msg.data) Signed-off-by: Che-Wei Lin <linton.tw@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-25nx_actions: Avoid confusing StringifyMixinYAMAMOTO Takashi
Having class attributes and instance attributes of the same name confuses StringifyMixin. Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-25nx_actions: Implement nx_action_learnYAMAMOTO Takashi
This is planned to be used for upcoming Neutron OVS agent changes. (https://blueprints.launchpad.net/neutron/+spec/ovs-ofctl-to-python) Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-25test_nx_flow_spec: Add UTs for NX flow_mod_specYAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-25nx_actions: Implement NX flow_mod_specYAMAMOTO Takashi
Will be used for NX learn implementation. Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-25type_desc: Separate type conversion classes from oxm_fieldsYAMAMOTO Takashi
Will be used for NX learn implementation. Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-25nx_actions: Remove redundant initializationsYAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>