summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2014-01-29Add OF1.4 desc stats request and reply message supportSimon Horman
Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-01-29Add OF1.4 group stats request and reply message supportSimon Horman
Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-01-29Add OF1.4 multipart experimenter request and reply message supportSimon Horman
Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-01-29packet_data_generator: Remove OF1.4 queue set config request and reply ↵Simon Horman
message support These messages do not exist in OF1.4 Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-01-29Correct OF1.4 OFPMatch JSON serialisation and formattingSimon Horman
Prior to this patch the code serialises an OFPMatch as: "OFPMatch": { "oxm_fields": { "arp_op": 1, ... } } But the parser fails, complaining that "oxm_fields" is an unknown field name. Resolve this by using the same JSON format as OF1.3: "OFPMatch": { "length": 329, "oxm_fields": [ { "OXMTlv": { "field": "in_port", "mask": null, "value": 84281096 } }, ... } } Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-01-29Correct OF1.4 OFP_ACTION_HEADER_PACK_STRSimon Horman
As per parsers for earlier OF versions, include 4 trailing bytes in the header. Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-01-29of12: set default ethernet types for MPLS actionsFUJITA Tomonori
0x8847 (MPLS) for PUSH_MPLS 0x0800 (IP) for POP_MPLS Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-01-29of13: set default ethernet types for MPLS actionsFUJITA Tomonori
0x8847 (MPLS) for PUSH_MPLS 0x0800 (IP) for POP_MPLS Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-01-28ofproto_v1_3_parser: have a default value for push_vlan ethertypeYAMAMOTO Takashi
As this would be 0x8100 in most cases, make it the default. Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-01-28ofproto_v1_2_parser: have a default value for push_vlan ethertypeYAMAMOTO Takashi
As this would be 0x8100 in most cases, make it the default. Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-01-28ofproto_v1_3_parser: put some assertionsYAMAMOTO Takashi
Put some assertions to catch usage mistakes earlier. Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-01-28ofproto_v1_2_parser: put some assertionsYAMAMOTO Takashi
Put some assertions to catch usage mistakes earlier. Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-01-28Make type and len class attributes of OFPInstructionMeterSimon Horman
Make type and len class attributes of OFPInstructionMeter and update JSON accordingly. This is in keeping with the implementation of other OFPInstruction classes. Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-01-27doc: improve RyuApp documentationYAMAMOTO Takashi
This includes a small code change; the default value of OFP_VERIONS was changed to None from the lack of the attribute. No functional changes are intended by this. Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-01-27doc: update after the sync request changeYAMAMOTO Takashi
update documentation after commit c9325a22. ("fix bidirectional event confusion") Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-01-27vrrp: Add RPC APIFUJITA Tomonori
Adds RPC API to manage VRRP. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-01-27ofctl.service: fix a crash on error msgYAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-01-27ofctl.service: reduce log level of some messagesYAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-01-27ofctl.service: fix some crashesYAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-01-27Fix OFPInstructionWriteMetadata JSON decodeFUJITA Tomonori
Fix the following: CLS <class 'ryu.ofproto.ofproto_v1_3_parser.OFPInstructionWriteMetadata'> ARG {u'metadata_mask': 18446744073709551615L, u'type': 2, u'len': 24, u'metadata': 18446744069414584320L} KWARG {u'type_': 2, u'metadata_mask': 18446744073709551615L, u'len_': 24, u'metadata': 18446744069414584320L} Traceback (most recent call last): File "a.py", line 19, in <module> msg = ofproto_parser.ofp_msg_from_jsondict(dp, m) File "/Users/fujita/git/ryu/ryu/ofproto/ofproto_parser.py", line 100, in ofp_msg_from_jsondict return cls.from_jsondict(v, datapath=dp) File "/Users/fujita/git/ryu/ryu/lib/stringify.py", line 291, in from_jsondict kwargs = cls._restore_args(_mapdict_kv(decode, dict_)) File "/Users/fujita/git/ryu/ryu/lib/stringify.py", line 46, in <lambda> _mapdict_kv = lambda f, d: dict([(k, f(k, v)) for k, v in d.items()]) File "/Users/fujita/git/ryu/ryu/lib/stringify.py", line 290, in <lambda> decode = lambda k, x: cls._decode_value(k, x, decode_string) File "/Users/fujita/git/ryu/ryu/lib/stringify.py", line 234, in _decode_value return cls._get_decoder(k, decode_string)(json_value) File "/Users/fujita/git/ryu/ryu/lib/stringify.py", line 242, in _decode v = map(_decode, json_value) File "/Users/fujita/git/ryu/ryu/lib/stringify.py", line 245, in _decode v = cls.obj_from_jsondict(json_value) File "/Users/fujita/git/ryu/ryu/lib/stringify.py", line 223, in obj_from_jsondict return obj_cls.from_jsondict(v) File "/Users/fujita/git/ryu/ryu/lib/stringify.py", line 293, in from_jsondict return cls(**dict(kwargs, **additional_args)) TypeError: __init__() got an unexpected keyword argument 'type_' Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-01-24dpset: start up dpset if there are subscribers of dpset eventsFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-01-23fix bidirectional event confusionSatoshi Kobayashi
EventRequestBase has EventReplyBase Signed-off-by: Satoshi Kobayashi <satoshi-k@stratosphere.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-01-23packet_data_generator: Add OF1.4Simon Horman
Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-01-23ofctl_v1_2/3: fix SET_FIELD action and some match fieldsYuichi Ito
this patch fixes the following bugs: - "SET_FIELD" action caused an exception at mod_flow_entry command. - following match fields caused an exception at get_flow_stats command: * mpls_label, arp_spa, arp_tpa - following fields in "SET_FIELD" were displayed as classes: * eth_dst, eth_src, vlan_vid, mpls_label - "arp_spa" and "arp_tpa" were not displayed as IPv4 address Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-01-22bgp: fix IP/MPLS_VPN addressesYAMAMOTO Takashi
i misunderstood that RDs were in-core. actually they are on-wire. Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-01-22bgp: comments about notification dataYAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-01-22bgp: a commentYAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-01-22bgp: RFC 4486YAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-01-22bgp: constants for NOTIFICATION code/subcodeYAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-01-22bgp: a commentYAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-01-16ryu.app.ofctl: Add a proxy application to send OF messagesYAMAMOTO Takashi
This application provides functionality similar to ofctl_rest but via Ryu synchronous events instead of REST API. This is intended to be used by a feature version of ryu neutron agent. Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-01-16test tool: run_mininet: support CPqD Software SwitchYuichi Ito
this patch gets run_mininet.py to support CPqD Software Switch. usage) to use CPqD Software Switch: sudo ryu/tests/switch/run_mininet.py --switch cpqd to use Open vSwitch: sudo ryu/tests/switch/run_mininet.py --switch ovs or sudo ryu/tests/switch/run_mininet.py Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-01-15bgp: implement the rest of RFC 3107YAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-01-15bgp: implement BGPOptParamCapabilityCarryingLabelInfoYAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-01-15bgp: add a constant for enhanced route refreshYAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-01-15safi: add a constant for route target constrainYAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-01-15rest_firewall: support IPv6 match conditionsYuichi Ito
this patch gets rest_firewall to support IPv6 match conditions. 'ipv6_src' and 'ipv6_dst' are allowed as key. 'ICMPv6' is allowed as the value of 'nw_proto'. e.g.) curl -X POST -d '{"ipv6_src": "10::/64"}' http://localhost:8080/firewall/rules/0000000000000001 curl http://localhost:8080/firewall/rules/0000000000000001 [ { "access_control_list": [ { "rules": [ { "priority": 1, "dl_type": "IPv6", "ipv6_src": "10::/64", "rule_id": 1, "actions": "ALLOW" } ] } ], "switch_id": "0000000000000001" } ] Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-01-15ofctl_v1_2/3: fix match conditions about ARPYuichi Ito
ofctl_v1_0 has changed nw_src/dst into ipv4_src/dst or arp_spa/tpa automatically like ovs-ofctl. since ofctl_v1_2/3 change nw_src/dst only into ipv4_src/dst, it cannot create the match conditions which use arp_spa/tpa. this patch fixes this problem. before applying this patch (using ofctl_rest): curl -X POST -d '{"dpid": 1, "match": {"dl_type": 2048, "nw_src": "192.168.0.0/24"}, "actions": [{"type": "OUTPUT", "port": 2}]}' http://localhost:8080/stats/flowentry/add OFPST_FLOW reply (OF1.3) (xid=0x2): cookie=0x0, duration=3.602s, table=0, n_packets=0, n_bytes=0, priority=0,ip,nw_src=192.168.0.0/24 actions=output:2 curl -X POST -d '{"dpid": 1, "match": {"dl_type": 2054, "nw_src": "192.168.0.0/24"}, "actions": [{"type": "OUTPUT", "port": 2}]}' http://localhost:8080/stats/flowentry/add no flow entry was installed. after applying this patch (using ofctl_rest): curl -X POST -d '{"dpid": 1, "match": {"dl_type": 2048, "nw_src": "192.168.0.0/24"}, "actions": [{"type": "OUTPUT", "port": 2}]}' http://localhost:8080/stats/flowentry/add OFPST_FLOW reply (OF1.3) (xid=0x2): cookie=0x0, duration=3.602s, table=0, n_packets=0, n_bytes=0, priority=0,ip,nw_src=192.168.0.0/24 actions=output:2 curl -X POST -d '{"dpid": 1, "match": {"dl_type": 2054, "nw_src": "192.168.0.0/24"}, "actions": [{"type": "OUTPUT", "port": 2}]}' http://localhost:8080/stats/flowentry/add OFPST_FLOW reply (OF1.3) (xid=0x2): cookie=0x0, duration=2.555s, table=0, n_packets=0, n_bytes=0, priority=0,arp,arp_spa=192.168.0.0/24 actions=output:2 Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-01-15enable OpenFlow 1.4FUJITA Tomonori
Adds the very basic features for L2 switch. Kinda simple_switch_14.py successfully works with LINC switch. - HELLO - FEATURES_REQUEST_REQUEST/REPLY - GET_CONFIG_REQUEST/REPLY - SET_CONFIG - PACKET_IN - MULTIPART_REQUEST/REPLY (only flow_stats) - PACKET_OUT - FLOW_MOD Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-01-14packet_data_generator: update of_protocol upstreamYAMAMOTO Takashi
merely a clean up for a pullup request. no functionality changes. also, update comments. Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-01-09test_bpdu: add unit testwatanabe.fumitaka
Signed-off-by: WATANABE Fumitaka <watanabe.fumitaka1@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-01-09bpdu: handling based on version and typewatanabe.fumitaka
In bpdu.py only one version was permitted with one type, before. This patch improves parser so that it may be based on multiple versions and types. Signed-off-by: WATANABE Fumitaka <watanabe.fumitaka1@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-01-09ofctl_rest: improve readability of the result of MeterFeaturesYuichi Ito
although 'band_types' of MeterFeatures were bitmaps of supported band types, it was expressed numerically. this patch makes 'band_types' human-readable. e.g.) curl http://localhost:8080/stats/meterfeatures/8796750050962 { "8796750050962": [ { "max_meter": 16777216, "max_color": 0, "max_band": 255, "band_types": ["DROP", "DSCP_REMARK"] } ] } Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-01-09ofctl_rest: support group-related messagesYuichi Ito
this patch makes ofctl_rest possible to: - support the GROUP action in the FlowMod message - support the GroupMod message - support the GroupStats message - support the GroupFeatures message - support the GroupDesc message see following examples. FlowMod with the group action: e.g.) curl -X POST -d '{"dpid": 1, "match": {}, "actions": [{"type": "GROUP, "group_id": 1}]}' http://localhost:8080/stats/flowentry/add GroupMod: usage) URI: /stats/groupentry/{cmd} METHOD: POST NOTE: the value of 'cmd' is one of follows: 'add', 'modify', or 'delete'. the message body is as follows: type Group types. 'ALL', 'SELECT', 'INDIRECT', or 'FF'. group_id Group Identifier. (default: 0) buckets a list of buckets. where each bucket has the following members: weight Relative weight of bucket. (default: 0) watch_port Port whose state affects whether this bucket is live. (default: OFPP_ANY) watch_group Group whose state affects whether this bucket is live. (default: OFPG_ANY) actions a list of actions. the format is the same as that of FlowMod. e.g.) curl -X POST -d '{"dpid": 1, "type": "FF", "group_id": 1, "buckets": [{"watch_port": 2, "actions": [{"type": "OUTPUT", "port": 3}]}]}' http://localhost:8080/stats/groupentry/add GroupStats: usage) URI: /stats/group/{dpid} METHOD: GET e.g.) curl http://localhost:8080/stats/group/1 { "1": [ { "bucket_stats": [ { "packet_count": 0, "byte_count": 0 } ], "byte_count": 0, "ref_count": 0, "duration_nsec": 231000000, "packet_count": 0, "duration_sec": 11238, "group_id": 1 } ] } GroupFeatures: usage) URI: /stats/groupfeatures/{dpid} METHOD: GET e.g.) curl http://localhost:8080/stats/groupfeatures/1 { "1": [ { "actions": [ {"ALL": ["OUTPUT", "COPY_TTL_OUT", "COPY_TTL_IN", "SET_MPLS_TTL", "DEC_MPLS_TTL", "PUSH_VLAN", "POP_VLAN", "PUSH_MPLS", "POP_MPLS", "SET_QUEUE", "GROUP", "SET_NW_TTL", "DEC_NW_TTL", "SET_FIELD"]}, {"SELECT": []}, {"INDIRECT": []}, {"FF": []} ], "max_groups": [ {"ALL": 4294967040}, {"SELECT": 4294967040}, {"INDIRECT": 4294967040}, {"FF": 4294967040} ], "capabilities": ["SELECT_WEIGHT", "SELECT_LIVENESS", "CHAINING"], "types": [] } ] } GroupDesc: usage) URI: /stats/groupdesc/{dpid} METHOD: GET e.g.) curl http://localhost:8080/stats/groupdesc/1 { "1": [ { "buckets": [ { "actions": ["OUTPUT:2"], "watch_group": 4294967295, "weight": 0, "watch_port": 3 } ], "group_id": 1, "type": "FF" } ] } Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-01-09lib.of_config: import ryu.contribYAMAMOTO Takashi
import ryu.contrib by ourself for the benefit of programs which doesn't use other ryu.contrib stuffs like oslo.config. Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-01-09tests: add some tests for ryu.lib.of_config.classesYAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-01-09A happy new year 2014YAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-01-07Ryu 3.5FUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-01-07firewall: correct acquisition result of DENY rulewatanabe.fumitaka
When blocked packet logging is enabled, GET rest command shows DENY rules as 'ALLOW' before. This patch improves it. Signed-off-by: WATANABE Fumitaka <watanabe.fumitaka1@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-01-07ofctl_rest: fix mod_meter_entry in OpenFlow1.0/1.2Yuichi Ito
mod_meter_entry causes the following error when the protocol version is 1.0 or 1.2. AttributeError: 'module' object has no attribute 'OFPMC_ADD' this patch fixes this problem. Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>