diff options
author | Takeshi <a86487817@gmail.com> | 2015-08-18 17:00:45 +0800 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-08-20 18:14:22 +0900 |
commit | 6cdc2720f144ccc34b37548d1b38fa63b9c5a59b (patch) | |
tree | 145eb79a8766a8cedbbc570284f1aeaff67e4cbe | |
parent | 2281b7a6aeb13bc3b10f1b77fbc7754769911c8f (diff) |
Add register_service to topology events
If an application consumes topology event, Switches application should
start automatically.
Signed-off-by: Takeshi <a86487817@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | ryu/topology/event.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ryu/topology/event.py b/ryu/topology/event.py index 6afbe78f..c54152bf 100644 --- a/ryu/topology/event.py +++ b/ryu/topology/event.py @@ -14,6 +14,7 @@ # limitations under the License. import logging +from ryu.controller import handler from ryu.controller import event LOG = logging.getLogger(__name__) @@ -163,3 +164,5 @@ class EventHostBase(event.EventBase): class EventHostAdd(EventHostBase): def __init__(self, host): super(EventHostAdd, self).__init__(host) + +handler.register_service('ryu.topology.switches') |