Re: [Ryu-devel] ryu's event mechanism

2013-03-12 Thread Can Zhang
Hi there, After reading some of the source code, I figured out that this might be a better minimal example for raising and receiving events in ryu: --- import gevent from ryu.base import app_manager from ryu.controller import event from ryu.controller.handler import set_ev_cls TEST_EVENT_E

[Ryu-devel] [PATCH 00/17] cli patches

2013-03-12 Thread YAMAMOTO Takashi
updated version of cli patches. i refrained from squashing much because the previous version is still under a review. YAMAMOTO Takashi (17): maintain a list of loggers cli: a simple management api management: comment cli: add a utility module (plogger) cli: add a utility module (call_via

[Ryu-devel] [PATCH 02/17] cli: a simple management api

2013-03-12 Thread YAMAMOTO Takashi
this will be used by cli app. Signed-off-by: YAMAMOTO Takashi --- ryu/base/management.py | 57 ++ 1 file changed, 57 insertions(+) create mode 100644 ryu/base/management.py diff --git a/ryu/base/management.py b/ryu/base/management.py new file mod

[Ryu-devel] [PATCH 03/17] management: comment

2013-03-12 Thread YAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi --- ryu/base/management.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ryu/base/management.py b/ryu/base/management.py index 55ae7dc..106029d 100644 --- a/ryu/base/management.py +++ b/ryu/base/management.py @@ -15,6 +15,9 @@ # limitations under the Lic

[Ryu-devel] [PATCH 01/17] maintain a list of loggers

2013-03-12 Thread YAMAMOTO Takashi
this will be used by management api. Signed-off-by: YAMAMOTO Takashi --- bin/ryu-manager | 1 + ryu/logger.py | 31 +++ 2 files changed, 32 insertions(+) create mode 100644 ryu/logger.py diff --git a/bin/ryu-manager b/bin/ryu-manager index 03b1b79..18a38d6 100755

[Ryu-devel] [PATCH 04/17] cli: add a utility module (plogger)

2013-03-12 Thread YAMAMOTO Takashi
this will be used by cli app. Signed-off-by: YAMAMOTO Takashi --- ryu/plogger.py | 27 +++ 1 file changed, 27 insertions(+) create mode 100644 ryu/plogger.py diff --git a/ryu/plogger.py b/ryu/plogger.py new file mode 100644 index 000..7204d43 --- /dev/null +++ b/ryu

[Ryu-devel] [PATCH 11/17] cli: let child process die explicitly with os._exit(0)

2013-03-12 Thread YAMAMOTO Takashi
instead of returning to somewhere. Signed-off-by: YAMAMOTO Takashi --- ryu/app/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ryu/app/cli.py b/ryu/app/cli.py index f95be1c..75284f9 100644 --- a/ryu/app/cli.py +++ b/ryu/app/cli.py @@ -191,7 +191,7 @@ class SshServer(pa

[Ryu-devel] [PATCH 07/17] cli: completion of logger names for set_log_level command

2013-03-12 Thread YAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi --- ryu/app/cli.py | 6 ++ 1 file changed, 6 insertions(+) diff --git a/ryu/app/cli.py b/ryu/app/cli.py index 22a515b..03c61b5 100644 --- a/ryu/app/cli.py +++ b/ryu/app/cli.py @@ -91,6 +91,12 @@ class CliCmd(cmd.Cmd): return print('logger

[Ryu-devel] [PATCH 05/17] cli: add a utility module (call_via_pipe)

2013-03-12 Thread YAMAMOTO Takashi
this will be used by cli app. Signed-off-by: YAMAMOTO Takashi --- ryu/call_via_pipe.py | 100 +++ 1 file changed, 100 insertions(+) create mode 100644 ryu/call_via_pipe.py diff --git a/ryu/call_via_pipe.py b/ryu/call_via_pipe.py new file mode 100

[Ryu-devel] [PATCH 08/17] cli: sample config

2013-03-12 Thread YAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi --- etc/ryu/ryu.conf | 5 + 1 file changed, 5 insertions(+) diff --git a/etc/ryu/ryu.conf b/etc/ryu/ryu.conf index 341de67..702492e 100644 --- a/etc/ryu/ryu.conf +++ b/etc/ryu/ryu.conf @@ -6,3 +6,8 @@ #wsapi_port= #ofp_listen_host= #ofp_listen_port= + +cli

[Ryu-devel] [PATCH 10/17] cli: fix return value of command_log decorated functions

2013-03-12 Thread YAMAMOTO Takashi
currently no one uses the value, though. Signed-off-by: YAMAMOTO Takashi --- ryu/app/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ryu/app/cli.py b/ryu/app/cli.py index 03c61b5..f95be1c 100644 --- a/ryu/app/cli.py +++ b/ryu/app/cli.py @@ -57,7 +57,7 @@ def command_lo

[Ryu-devel] [PATCH 09/17] call_by_pipe: handle broken pipe explicitly

2013-03-12 Thread YAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi --- ryu/call_via_pipe.py | 4 1 file changed, 4 insertions(+) diff --git a/ryu/call_via_pipe.py b/ryu/call_via_pipe.py index 4e96d9a..06600a6 100644 --- a/ryu/call_via_pipe.py +++ b/ryu/call_via_pipe.py @@ -35,8 +35,12 @@ def send_msg(fd, msg): def recv_m

[Ryu-devel] [PATCH 13/17] cli: add EOF commmand

2013-03-12 Thread YAMAMOTO Takashi
so that a user can disconnect easily by hitting ^D. Signed-off-by: YAMAMOTO Takashi --- ryu/app/cli.py | 4 1 file changed, 4 insertions(+) diff --git a/ryu/app/cli.py b/ryu/app/cli.py index 96b9b78..db7ba6a 100644 --- a/ryu/app/cli.py +++ b/ryu/app/cli.py @@ -126,6 +126,10 @@ class CliCmd

[Ryu-devel] [PATCH 14/17] add a utility module (instance_registry)

2013-03-12 Thread YAMAMOTO Takashi
will be used by management code Signed-off-by: YAMAMOTO Takashi --- ryu/instance_registry.py | 94 1 file changed, 94 insertions(+) create mode 100644 ryu/instance_registry.py diff --git a/ryu/instance_registry.py b/ryu/instance_registry.py new

[Ryu-devel] [PATCH 16/17] management: add a function to retrieve a list of connected datapaths

2013-03-12 Thread YAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi --- ryu/base/management.py | 8 1 file changed, 8 insertions(+) diff --git a/ryu/base/management.py b/ryu/base/management.py index 106029d..097a756 100644 --- a/ryu/base/management.py +++ b/ryu/base/management.py @@ -58,3 +58,11 @@ def list_bricks():

[Ryu-devel] [PATCH 17/17] cli: add show_datapaths command

2013-03-12 Thread YAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi --- ryu/app/cli.py | 7 +++ 1 file changed, 7 insertions(+) diff --git a/ryu/app/cli.py b/ryu/app/cli.py index db7ba6a..abeff16 100644 --- a/ryu/app/cli.py +++ b/ryu/app/cli.py @@ -105,6 +105,13 @@ class CliCmd(cmd.Cmd): map(lambda b: print('%s' % (b

[Ryu-devel] [PATCH 15/17] maintain a list of Datapath instances

2013-03-12 Thread YAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi --- ryu/controller/controller.py | 5 + 1 file changed, 5 insertions(+) diff --git a/ryu/controller/controller.py b/ryu/controller/controller.py index c753f01..7ed24de 100644 --- a/ryu/controller/controller.py +++ b/ryu/controller/controller.py @@ -40,6 +40,8

[Ryu-devel] [PATCH 12/17] cli: exit parent loop on broken pipe

2013-03-12 Thread YAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi --- ryu/app/cli.py | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ryu/app/cli.py b/ryu/app/cli.py index 75284f9..96b9b78 100644 --- a/ryu/app/cli.py +++ b/ryu/app/cli.py @@ -175,7 +175,10 @@ class SshServer(paramiko.ServerInterface):

[Ryu-devel] [PATCH 06/17] cli: add cli app

2013-03-12 Thread YAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi --- ryu/app/cli.py | 227 + 1 file changed, 227 insertions(+) create mode 100644 ryu/app/cli.py diff --git a/ryu/app/cli.py b/ryu/app/cli.py new file mode 100644 index 000..22a515b --- /dev/null +++ b/ry

[Ryu-devel] [PATCH] group quantum related options

2013-03-12 Thread YAMAMOTO Takashi
caveats: no config file backward compat Signed-off-by: YAMAMOTO Takashi --- ryu/app/quantum_adapter.py | 24 ryu/flags.py | 22 +- 2 files changed, 25 insertions(+), 21 deletions(-) diff --git a/ryu/app/quantum_adapter.py b/ryu/app/quan

Re: [Ryu-devel] [PATCH] group quantum related options

2013-03-12 Thread YAMAMOTO Takashi
> caveats: no config file backward compat this means that devstack needs some changes like the following. YAMAMOTO Takashi diff --git a/lib/quantum_thirdparty/ryu b/lib/quantum_thirdparty/ryu index f1e9e7c..af9e9c3 100644 --- a/lib/quantum_thirdparty/ryu +++ b/lib/quantum_thirdparty/ryu @@ -44,1

Re: [Ryu-devel] [PATCH] xflow: add netflow packet collector

2013-03-12 Thread Kei Ohmura
2013/3/6 Isaku Yamahata : > On Wed, Mar 06, 2013 at 11:54:00AM +0900, OHMURA Kei wrote: >> This gets a netflow packet and sends it to the other >> applications. Each application can use this to get netflow >> messages as an event. >> >> Signed-off-by: OHMURA Kei >> --- >> ryu/flags.py

[Ryu-devel] [PATCH] vsctl: fix timeout

2013-03-12 Thread YAMAMOTO 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: YAMAM