From 6cdc2720f144ccc34b37548d1b38fa63b9c5a59b Mon Sep 17 00:00:00 2001 From: Takeshi Date: Tue, 18 Aug 2015 17:00:45 +0800 Subject: [PATCH] Add register_service to topology events If an application consumes topology event, Switches application should start automatically. Signed-off-by: Takeshi Signed-off-by: FUJITA Tomonori --- ryu/topology/event.py | 3 +++ 1 file changed, 3 insertions(+) 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')