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

2013-02-28 Thread OHMURA Kei
2013/3/1 can. : > Thanks Kei, > > You mean a normal app does not need to call that method explicitly? And what > that method is supposed to do? Yes. bin/ryu-manager.py creates Ryu app instance. Please see it. Thanks, > > > 2013/3/1 OHMURA Kei >> >> 2013/3/1 can. : >> > I think I get it. I shoul

[Ryu-devel] [PATCH 1/3] import telnetsrv

2013-02-28 Thread YAMAMOTO Takashi
import telnetsrv in contrib. because: - RHEL6/Fedora18 doesn't have a package of telnetsrv. - telnetsrv 0.4 has some known bugs. - ssh problems fixed by telnetsrv commit 051665d79c10cd08c3600a6aa3854835c8c38fbb. - socket/thread leaks on forcible disconnect this

[Ryu-devel] [PATCH 2/3] stop requiring telnetsrv

2013-02-28 Thread YAMAMOTO Takashi
stop requiring telnetsrv as we now have it in contrib. Signed-off-by: YAMAMOTO Takashi --- tools/pip-requires | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/pip-requires b/tools/pip-requires index 3ecfb84..7be3072 100644 --- a/tools/pip-requires +++ b/tools/pip-requires @@ -1,4 +1,3 @@

[Ryu-devel] [PATCH 3/3] require paramiko

2013-02-28 Thread YAMAMOTO Takashi
it's used when cli ssh transport is configured. Signed-off-by: YAMAMOTO Takashi --- setup.cfg | 2 +- tools/pip-requires | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 2452758..bf0265c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -6,7 +6,7

[Ryu-devel] [PATCH 0/3] import telnetsrv and tweak dependencies

2013-02-28 Thread YAMAMOTO Takashi
this is after other cli patchsets. YAMAMOTO Takashi (3): import telnetsrv stop requiring telnetsrv require paramiko ryu/contrib/telnetsrv/__init__.py |1 + ryu/contrib/telnetsrv/green.py| 56 ++ ryu/contrib/telnetsrv/paramiko_ssh.py | 239 ryu/contrib/telnetsrv/

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

2013-02-28 Thread can.
Thanks Kei, You mean a normal app does not need to call that method explicitly? And what that method is supposed to do? 2013/3/1 OHMURA Kei > 2013/3/1 can. : > > I think I get it. I should add ` self.register_observer(EventTest, > > self.name) ` in TestEvent.__init__(). Thanks very much! > > A

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

2013-02-28 Thread OHMURA Kei
2013/3/1 can. : > I think I get it. I should add ` self.register_observer(EventTest, > self.name) ` in TestEvent.__init__(). Thanks very much! > And I also see register_handler() in class RyuApp, when should I use it? IIUC, your app don't need to use it. Thanks, > > > 2013/3/1 can. >> >> But I

[Ryu-devel] [PATCH] test of1.2: fix typos from mid to min

2013-02-28 Thread KONDOH Tasuku
Signed-off-by: KONDOH Tasuku --- ryu/tests/unit/ofproto/test_parser_v12.py | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ryu/tests/unit/ofproto/test_parser_v12.py b/ryu/tests/unit/ofproto/test_parser_v12.py index 3e53d9f..733fdfe 100644 --- a/ryu/tests/uni

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

2013-02-28 Thread can.
I think I get it. I should add ` self.register_observer(EventTest, self.name) ` in TestEvent.__init__(). Thanks very much! And I also see register_handler() in class RyuApp, when should I use it? 2013/3/1 can. > But I still cannot see the 'recv: xxx' as expected, here are the outputs: > - >

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

2013-02-28 Thread YAMAMOTO Takashi
hi, > I tried what you said, as: > - > class Event_1(event.EventBase): > def __init__(self): > super(Event_1, self).__init__() > self.msg = 'event 1' > > class Hehe(app_manager.RyuApp): > def __init__(self): > super(Hehe, self).__init__() > self.registe

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

2013-02-28 Thread can.
I tried what you said, as: - class Event_1(event.EventBase): def __init__(self): super(Event_1, self).__init__() self.msg = 'event 1' class Hehe(app_manager.RyuApp): def __init__(self): super(Hehe, self).__init__() self.register_observer(Event_1, self.na

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

2013-02-28 Thread OHMURA Kei
2013/3/1 can. : > What I want is a minimal example of handling event, including: > 1) define an event > 2) send an event > 3) receive an event The following code would help your understanding? -- import gevent from ryu.base import app_manager from ryu.controller import event from ryu.controller.

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

2013-02-28 Thread can.
What I want is a minimal example of handling event, including: 1) define an event 2) send an event 3) receive an event 2013/2/28 Isaku Yamahata > On Thu, Feb 28, 2013 at 04:13:36PM +0800, can. wrote: > > Hi there, > > > > I'm trying to figure out ryu's event mechanism by sending and receiving >

Re: [Ryu-devel] [PATCH] g/c --monkey-patch option

2013-02-28 Thread FUJITA Tomonori
On Thu, 28 Feb 2013 12:00:41 +0900 YAMAMOTO Takashi wrote: > this obscure option seems to have been a no-op since the initial commit. > > Signed-off-by: YAMAMOTO Takashi > --- > ryu/flags.py | 2 -- > 1 file changed, 2 deletions(-) Applied, thanks. ---

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

2013-02-28 Thread Isaku Yamahata
On Thu, Feb 28, 2013 at 04:13:36PM +0800, can. wrote: > Hi there, > > I'm trying to figure out ryu's event mechanism by sending and receiving an > event. Below is the test code I wrote: > - > from ryu.base import app_manager > from ryu.controller import event, handler > > class Hehe(app_m

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

2013-02-28 Thread FUJITA Tomonori
On Thu, 28 Feb 2013 16:13:36 +0800 "can." wrote: > Hi there, > > I'm trying to figure out ryu's event mechanism by sending and receiving an > event. Below is the test code I wrote: > - > from ryu.base import app_manager > from ryu.controller import event, handler > > class Hehe(app_mana

Re: [Ryu-devel] [PATCH] of1.2: add test code of OFPErrorExperimenterMsg. review of test code

2013-02-28 Thread FUJITA Tomonori
On Thu, 28 Feb 2013 15:18:04 +0900 KONDOH Tasuku wrote: > - add test code of max and min to OFPErrorExperimenterMsg > > Signed-off-by: KONDOH Tasuku > --- > ryu/tests/unit/ofproto/test_parser_v12.py | 237 > + > 1 file changed, 237 insertions(+) Applied, thanks.

[Ryu-devel] ryu's event mechanism

2013-02-28 Thread can.
Hi there, I'm trying to figure out ryu's event mechanism by sending and receiving an event. Below is the test code I wrote: - from ryu.base import app_manager from ryu.controller import event, handler class Hehe(app_manager.RyuApp): class Event_1(event.EventBase): def __init_