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>
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>
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>
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>
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>
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>
Also, improve experimenter action related code so that
it can handle unknown actions as unknown.
Only OpenFlow 1.3 for now because this is planned to be used
for Neutron OVS agent and 1.3 is the version to be used there.
(https://blueprints.launchpad.net/neutron/+spec/ovs-ofctl-to-python)
Following the style of oxm_fields, make an OpenFlow version independent
module generate OpenFlow version specific code so that it's easier to
add the functionality to other OpenFlow versions later.
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
this patch makes ofctl_rest enable use of OFPAggregateStats message.
Get aggregate flow stats:
usage)
URI: /stats/aggregateflow/<dpid>
method: GET
e.g.)
$ curl -X GET http://localhost:8080/stats/aggregateflow/1
{
"1": [
{
"packet_count": 18,
"byte_count": 756,
"flow_count": 3
}
]
}
Get aggregate flow stats filtered by fields:
usage)
URI: /stats/aggregateflow/<dpid>
method: POST
the message body is as follows.
table_id Table ID (int)
out_port Require matching entries to include this as an output port (int)
out_group Require matching entries to include this as an output group (int)
cookie Require matching entries to contain this cookie value (int)
cookie_mask Mask used to restrict the cookie bits that must match (int)
match Fields to match (dict)
e.g.)
$ curl -X POST -d '{
"table_id": 0,
"out_port": 2,
"cookie": 1,
"cookie_mask": 1,
"match":{
"in_port":1
}
}' http://localhost:8080/stats/aggregateflow/1
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Following Open vSwitch, introduce "dp_hash" OXM for testing.
>From their commit log: (commit 508a933809f8a8ede4fb93f1c1e3212799efc16a)
> Testing experimenter OXM is tricky because I do not know of any in
> widespread use. Two ONF proposals use experimenter OXMs: EXT-256 and
> EXT-233. EXT-256 is not suitable to implement for testing because its use
> of experimenter OXM is wrong and will be changed. EXT-233 is not suitable
> to implement for testing because it requires adding a new field to struct
> flow and I am not yet convinced that that field and the feature that it
> supports is worth having in Open vSwitch. Thus, this commit assigns an
> experimenter OXM code point to an existing OVS field that is currently
> restricted from use by controllers, "dp_hash", and uses that for testing.
> Because controllers cannot use it, this leaves future versions of OVS free
> to drop the support for the experimenter OXM for this field without causing
> backward compatibility problems.
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
These will be used for coming REG_MOVE support.
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
In case of selecting new best path, Ryu BGPSpeaker send withdraw messages.
Signed-off-by: Toshiki Tsuboi <t.tsubo2000@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Currently, clear flow entries command (/stats/flowentry/clear/<dpid>)
in ofctl_rest deletes flow entries from only table 0.
This patch fixes the command to delete flow entries from all tables.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Currently, rest_qos is impossible to set the "priority" of QoS rule on a switch.
Also, "priority" is should be described in the same depth as "match" and "actions".
This patch fixes these problems.
Now, rest_qos is possible to set the "priority" with the following curl command.
e.g.)
$ curl -X POST -d '{"priority":"5",
"match": {"nw_dst": "10.0.0.1", "nw_proto": "UDP", "tp_dst": "5002"},
"actions":{"queue": "1"}}' http://localhost:8080/qos/rules/0000000000000001
Reported-by: Jace Liang <b436412@gmail.com>
Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>