diff options
author | YAMAMOTO Takashi <yamamoto@valinux.co.jp> | 2014-02-10 14:26:33 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-02-11 17:24:43 +0900 |
commit | 37fed5c76494ff7762d347fd854b9b1df7cedb9b (patch) | |
tree | 0492894394f9cde6bf45e3c8b40acc18cb51531c | |
parent | d5bb06a3f99ad697a2c7201a105feb9d8883781b (diff) |
handler.register_service: comment
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | ryu/controller/handler.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ryu/controller/handler.py b/ryu/controller/handler.py index d5f57cda..43f07d1a 100644 --- a/ryu/controller/handler.py +++ b/ryu/controller/handler.py @@ -80,6 +80,17 @@ def get_dependent_services(cls): def register_service(service): + """ + Register the ryu application specified by 'service' as + a provider of events defined in the calling module. + + If an application being loaded consumes events (in the sense of + set_ev_cls) provided by the 'service' application, the latter + application will be automatically loaded. + + This mechanism is used to e.g. automatically start ofp_handler if + there are applications consuming OFP events. + """ frm = inspect.stack()[1] m = inspect.getmodule(frm[0]) m._SERVICE_NAME = service |