May we add a treatment to ryu.controller.ofp_handler.OFPHandler? That is always an available application when OpenFlow is enabled in Ryu. This is just my humble idea.
On 2016/01/13 14:39 Satoshi KOBAYASHI <satosh...@iij.ad.jp> wrote: > Hi Iwase-san, > > Thanks for your reply and good mention. > > On 2016/01/13 14:04 > Yusuke Iwase <iwase.yusu...@gmail.com> wrote: > > > Hi Kobayashi-San, > > > > This UserWarning will occur with all RyuApps which access Datapath.ports > > member. > > Yes. That's right. > > > > > With this patch, UserWarning will be supressed in ryu.topology module, > > but it still occurs in other RyuApps (e.g. DPSet). > > I was going to have handled DPSet already. > If the issue is still alive, it's my mistake. > > > > > Can we solve this problem fundamentally? > > (not by using UserWarning) > > Probably. > > I have been worrying that this isn't fundamental solution. > If Datapath#ports is updated by EventOFPPortStatus, that is the right way. > If there is a good idea, I'm happy. > > > > > Thanks, > > Iwase > > > > > > On 2016年01月13日 10:50, Satoshi KOBAYASHI wrote: > > > Thank you. This is the patch. > > > > > > On 2016/01/13 10:34 > > > 俊 赵 <zhaoju...@outlook.com> wrote: > > > > > > Thanks. > > > > > > I can try the patch. > > > > > > And I also provide you with the details but I am not sure whether it > > > causes this. > > > > > > I want to use ryu.topology to find switches entering in the network. > > > I am using Open vSwitch 2.4.0. > > > > > > So I use the following code > > > > > > |from ryu.topology import api as topo_api from ryu.topology import > > > event as topo_event| > > > > > > > > > |@set_ev_cls(topo_event.EventSwitchEnter) def > > > _switch_enter_handler(self, ev): # self.datapath_ip = {} for sw in > > > topo_api.get_all_switch(self): if sw.dp.id == ev.switch.dp.id: > > > console.info("enter a switch with attributes datapath - "+str(sw.dp.id)+" > > > and ip - "+sw.dp.socket.getpeername()[0]) > > > | > > > > > > > > > Every time I start the app, it shows me that warning. > > > > > > Thank you! > > > > > > /Zhao Jun/ > > > > > > > > > ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ > > > Date: Wed, 13 Jan 2016 10:19:09 +0900 > > > From: satosh...@iij.ad.jp > > > To: zhaoju...@outlook.com; ryu-devel@lists.sourceforge.net > > > Subject: Re: [Ryu-devel] /ryu/topology/switches.py:545: UserWarning: > > > Datapath#ports > > > > > > Hi, > > > > > > The warning mean that Datapath#ports is not recommended to use > > > directory. > > > But the warning should not be appear in this case. > > > Because perhaps you just use ryu.topology. > > > > > > I found out the code of the cause. This should be suppressed. > > > https://github.com/osrg/ryu/blob/v3.29/ryu/topology/switches.py#L545 > > > > > > I can make a patch to resolve the issue but I don't know how to hit > > > the above line. > > > My environment don't show the warning. (Mininet w/ Open vSwitch) > > > Can you confirm the patch instead of me? > > > Or please give me more details. (e.g. product name of your openflow > > > switch and your procedure) > > > > > > Regards, > > > Satoshi > > > > > > On 2016/01/12 14:30 > > > 俊 赵 <zhaoju...@outlook.com> wrote: > > > > > > Hi, > > > > > > I got warning with > > > "/usr/local/lib/python2.7/dist-packages/ryu/topology/switches.py:545: > > > UserWarning: Datapath#ports is kept for compatibility with the previous > > > openflow versions (< 1.3). This not be updated by EventOFPPortStatus > > > message. If you want to be updated, you can use 'ryu.controller.dpset' or > > > 'ryu.topology.switches'. > > > > > > for port in dp.ports.values():" > > > > > > I found this message coming from /ryu/controller/controller.py > > > > > > The constraint causing this is "ofproto.OFP_VERSION >= 0x04" > > > > > > Does it mean that if I am using openflow 1.3, the warning message > > > will trigger all the time? > > > > > > How can I get rid of this? > > > > > > Thanks. > > > > > > > > > /Zhao Jun/ > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------------Site24x7 > > > APM Insight: Get Deep Visibility into Application PerformanceAPM + > > > Mobile APM + RUM: Monitor 3 App instances at just $35/MonthMonitor > > > end-to-end web transactions and take corrective actions nowTroubleshoot > > > faster and improve end-user experience. Signup > > > Now!http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 > > > _______________________________________________Ryu-devel mailing > > > listRyu-devel@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/ryu-devel > > > > > > > > > > > > -- > > > Satoshi KOBAYASHI > > > > > > > > > ------------------------------------------------------------------------------ > > > Site24x7 APM Insight: Get Deep Visibility into Application Performance > > > APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month > > > Monitor end-to-end web transactions and take corrective actions now > > > Troubleshoot faster and improve end-user experience. Signup Now! > > > http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 > > > > > > > > > > > > _______________________________________________ > > > Ryu-devel mailing list > > > Ryu-devel@lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/ryu-devel > > > > > > > > -- > Satoshi KOBAYASHI > > ------------------------------------------------------------------------------ > Site24x7 APM Insight: Get Deep Visibility into Application Performance > APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month > Monitor end-to-end web transactions and take corrective actions now > Troubleshoot faster and improve end-user experience. Signup Now! > http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 > _______________________________________________ > Ryu-devel mailing list > Ryu-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/ryu-devel > ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 _______________________________________________ Ryu-devel mailing list Ryu-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ryu-devel