If an application consumes topology event,  Switches application should
start automatically.

Please check attached file for more detail.

-- 
Yi Tseng (a.k.a Takeshi)
Taiwan National Chiao Tung University
Department of Computer Science
W2CNLab

http://blog.takeshi.tw
From 82b5a0c9523c951f8083f951a0bcf4b0aeab6fa7 Mon Sep 17 00:00:00 2001
From: Takeshi <[email protected]>
Date: Tue, 18 Aug 2015 17:00:45 +0800
Subject: [PATCH 2/2] Add register_service to topology events

If an application consumes topology event,  Switches application should
start automatically.

Signed-off-by: Takeshi <[email protected]>
---
 ryu/topology/event.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/ryu/topology/event.py b/ryu/topology/event.py
index 6afbe78..c54152b 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')
-- 
2.3.2 (Apple Git-55)

------------------------------------------------------------------------------
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to