From 33a21e947c10fe917398669baf969a5a7cbdf284 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Fri, 8 Feb 2013 12:28:16 +0900 Subject: [PATCH] tunnel_port_updater: adapt to the new world order after dispatcher removal Signed-off-by: YAMAMOTO Takashi Signed-off-by: FUJITA Tomonori --- ryu/app/tunnel_port_updater.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/ryu/app/tunnel_port_updater.py b/ryu/app/tunnel_port_updater.py index 2946737a..56d9601b 100644 --- a/ryu/app/tunnel_port_updater.py +++ b/ryu/app/tunnel_port_updater.py @@ -29,7 +29,6 @@ from ryu.controller import (conf_switch, network, tunnels) from ryu.lib import dpid as dpid_lib -from ryu.lib import synchronized from ryu.lib.ovs import bridge as ovs_bridge @@ -381,9 +380,7 @@ class TunnelPortUpdater(app_manager.RyuApp): self._add_tunnel_ports(tunnel_dp, self.tunnel_requests.get_remote(dpid)) - @handler.set_ev_cls(conf_switch.EventConfSwitchSet, - conf_switch.CONF_SWITCH_EV_DISPATCHER) - @synchronized.synchronized(_LOCK) + @handler.set_ev_cls(conf_switch.EventConfSwitchSet) def conf_switch_set_handler(self, ev): LOG.debug('conf_switch_set_handler %s %s %s', dpid_lib.dpid_to_str(ev.dpid), ev.key, ev.value) @@ -399,9 +396,7 @@ class TunnelPortUpdater(app_manager.RyuApp): for tunnel_dp in self.tunnel_dpset.values(): tunnel_dp.request_update_remote(ev.dpid, ev.value) - @handler.set_ev_cls(conf_switch.EventConfSwitchDel, - conf_switch.CONF_SWITCH_EV_DISPATCHER) - @synchronized.synchronized(_LOCK) + @handler.set_ev_cls(conf_switch.EventConfSwitchDel) def conf_switch_del_handler(self, ev): # TODO:XXX pass @@ -459,9 +454,7 @@ class TunnelPortUpdater(app_manager.RyuApp): tunnel_dp.request_del_tunnel_port(remote_dp.tunnel_ip) remote_dp.request_del_tunnel_port(tunnel_dp.tunnel_ip) - @handler.set_ev_cls(network.EventNetworkPort, - network.NETWORK_TENANT_EV_DISPATCHER) - @synchronized.synchronized(_LOCK) + @handler.set_ev_cls(network.EventNetworkPort) def network_port_handler(self, ev): LOG.debug('network_port_handler %s', ev) if ev.network_id in rest_nw_id.RESERVED_NETWORK_IDS: