i attach you my code and the assertion error that i have, so you can understand what i'm doing port it's an istance of a port of a switch and where i sent the signal of BLOCK of port or LEARN, FORWARD or something other. I hope you can help me i'm going crazy with that...and another question i have to send port request every 5 seconds or more how can i do that?

Il giorno 13 set 2016 alle 03:20, Iwase Yusuke <iwase.yusu...@gmail.com> ha scritto:

Hi,

How about skipping the ofp event processing for the specific dpid
at the top of each event handler?

e.g.) If dpid is registered, do switch_features_handler, otherwise skip.
$ git diff
diff --git a/ryu/app/simple_switch_13.py b/ryu/app/simple_switch_13.py
index 3e7c598..c8a9291 100644
--- a/ryu/app/simple_switch_13.py
+++ b/ryu/app/simple_switch_13.py
@@ -30,8 +30,12 @@ class SimpleSwitch13(app_manager.RyuApp):
super(SimpleSwitch13, self).__init__(*args, **kwargs)
self.mac_to_port = {}

+ self.registered_dpids = [1, 2, 3] # specify the range of dpid
+
@set_ev_cls(ofp_event.EventOFPSwitchFeatures, CONFIG_DISPATCHER)
def switch_features_handler(self, ev):
+ if ev.msg.datapath.id not in self.registered_dpids:
+ return
datapath = ev.msg.datapath
ofproto = datapath.ofproto
parser = datapath.ofproto_parser


On 2016年09月06日 18:47, Francesco Murador wrote:
Hi i have a question...i need to start stplib when i check a thing how can i start it? Not at the begin of my program with _CONTEXTS...i have to check if some values in a switch are out of range if they aren't i need to start the spanning tree because all i want is to block a dpid but if i don't block a dpid i have a topology with loops so normal simple_switch will not work so i had to run the stplib
------------------------------------------------------------------------------
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Attachment: Archive.rar
Description: Binary data

------------------------------------------------------------------------------
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to