Commit c76ec4d1 authored by Philipp Tennigkeit's avatar Philipp Tennigkeit

switch information on pop up

parent 51465f89
Pipeline #2486 passed with stage
in 27 seconds
......@@ -134,17 +134,26 @@ class SPBSwitchApp(app_manager.RyuApp):
@set_ev_cls(event.EventPortAdd, [MAIN_DISPATCHER, CONFIG_DISPATCHER, DEAD_DISPATCHER])
def _ev_port_add_handler(self, ev):
self._print_event("PORT", "PORT came up {0}".format(ev), ev)
self._print_event("PORT", "PORT came up {0}".format(ev.port_no), ev)
self._learn_by_ryu_topo()
@set_ev_cls(event.EventSwitchEnter, [MAIN_DISPATCHER, CONFIG_DISPATCHER, DEAD_DISPATCHER])
def ev_switch_add_handler(self, ev):
self._print_event("SWITCH", "Switch came up {0}".format(ev), ev)
ports = []
for port in ev.switch.ports:
ports.append(port.port_no)
self._print_event("SWITCH", "Switch came up {0} [{1}]".format(
dpid_to_str(
ev.switch.dp.id
), ','.join(ports)), ev)
self._learn_by_ryu_topo()
@set_ev_cls(event.EventPortDelete, [MAIN_DISPATCHER, CONFIG_DISPATCHER, DEAD_DISPATCHER])
def _ev_port_del_handler(self, ev):
self._print_event("PORT", "Port went down {0}".format(ev), ev)
self._print_event("PORT", "Port went down {0}".format(ev.port_no), ev)
#self.net.del_edge_by_port(ev.port.dpid, ev.port.port_no)
#pass
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment