and correct the inaccurate dispatchers.
Signed-off-by: Yuichi Ito <[email protected]>
---
ryu/app/simple_switch_lacp.py | 5 +++--
ryu/lib/lacplib.py | 3 ---
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/ryu/app/simple_switch_lacp.py b/ryu/app/simple_switch_lacp.py
index 2b4edb0..3774163 100644
--- a/ryu/app/simple_switch_lacp.py
+++ b/ryu/app/simple_switch_lacp.py
@@ -16,6 +16,7 @@
import struct
from ryu.base import app_manager
+from ryu.controller.handler import MAIN_DISPATCHER
from ryu.controller.handler import set_ev_cls
from ryu.ofproto import ofproto_v1_0
from ryu.lib import addrconv
@@ -64,7 +65,7 @@ class SimpleSwitchLacp(app_manager.RyuApp):
command=ofproto.OFPFC_DELETE)
datapath.send_msg(mod)
- @set_ev_cls(lacplib.EventPacketIn, lacplib.LAG_EV_DISPATCHER)
+ @set_ev_cls(lacplib.EventPacketIn, MAIN_DISPATCHER)
def _packet_in_handler(self, ev):
msg = ev.msg
datapath = msg.datapath
@@ -100,7 +101,7 @@ class SimpleSwitchLacp(app_manager.RyuApp):
actions=actions)
datapath.send_msg(out)
- @set_ev_cls(lacplib.EventSlaveStateChanged, lacplib.LAG_EV_DISPATCHER)
+ @set_ev_cls(lacplib.EventSlaveStateChanged, MAIN_DISPATCHER)
def _slave_state_changed_handler(self, ev):
datapath = ev.datapath
dpid = datapath.id
diff --git a/ryu/lib/lacplib.py b/ryu/lib/lacplib.py
index 48859c0..e425abb 100644
--- a/ryu/lib/lacplib.py
+++ b/ryu/lib/lacplib.py
@@ -31,9 +31,6 @@ from ryu.lib.packet import ethernet
from ryu.lib.packet import slow
-LAG_EV_DISPATCHER = "lacplib"
-
-
class EventPacketIn(event.EventBase):
"""a PacketIn event class using except LACP."""
def __init__(self, msg):
--
1.7.10.4
------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing
conversations that shape the rapidly evolving mobile landscape. Sign up now.
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel