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
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
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
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
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
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
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
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
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
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
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
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
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
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
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():
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
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
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):
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
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
> 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
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
- 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
23 matches
Mail list logo