Hello, sorry for the delay.
Yes, I, have tried. The problem is that the topology is a bit complex, so I'm running the applications in the following way: tc.cmdPrint("ryu-manager --verbose --observe-links --wsapi-host 192.168.100.1 --wsapi-port 8080 --ofp-listen-host=10.0.0.100 --ofp-tcp-listen-port=6653 ../ryu/transport_operator.py ../ryu/ryu_view/ryu_view.py ryu.app.transport_rest_topology ryu.app.ofctl_rest ryu.app.transport_ws_topology ryu.app.rest_conf_switch &> /tmp/tc-out &") tc.cmdPrint("ryu-manager --verbose --wsapi-host 192.168.100.1 --wsapi-port 8081 --ofp-listen-host=10.0.0.100 --ofp-tcp-listen-port=6654 ryu.app.almost_intelligent_switch_13 ryu.app.gui_topology.tenant_gui_topology ryu.app.tenant_rest_topology ryu.app.ofctl_rest &> /tmp/t1-out &") Those two lines are executed one after the other. Now, the problem is, how can I send a event from one app executed in the first command to another executed in the second one? I want to send the event from transport_operator.py to tenant_rest_topology. Thank you. Felipe Rodriguez ________________________________ From: IWAMOTO Toshihiro <iwam...@valinux.co.jp> Sent: Tuesday, September 25, 2018 10:47:17 AM To: Rodriguez Felipe Cc: ryu-devel@lists.sourceforge.net Subject: Re: [Ryu-devel] Raising a event from custom app On Thu, 20 Sep 2018 17:11:59 +0900, Rodriguez Felipe wrote: > > [1 <multipart/alternative (7bit)>] > [1.1 <text/plain; iso-8859-1 (quoted-printable)>] > Hi! > > > I'm trying to raise one event for sharing it from one app to another, > unfortunately I'm not able to set > > the first app as a event provider (checked when running the app in --verbose > mode). I've already done this > > one time with the app 2. Can you help me with this issue? Have you tried to send_event EventEntryPoint? With the debug logging turned on, it should report if a event is delivered or not. > Code of event file: > > > import logging > from ryu.controller import ofp_event, event > from ryu.controller import handler > > class EventEntryPointBase(event.EventBase): > def __init__(self, dpid): > super(EventEntryPointBase, self).__init__() > self.dpid = dpid > > def __str__(self): > return '%s<%s>' % (self.__class__.__name__, self.dpid) > > class EventEntryPoint(EventEntryPointBase): > def __init__(self, dpid): > super(EventEntryPoint, self).__init__(dpid) > > > > > Code of app 1: > > > class TransportOperator(app_manager.RyuApp): > OFP_VERSIONS = [ofproto_v1_3.OFP_VERSION] > _CONTEXTS = {'wsgi': WSGIApplication} > > _EVENTS = [pointEvent.EventEntryPoint] > > > def __init__(self, *args, **kwargs): > super(TransportOperator, self).__init__(*args, **kwargs) > > > . > > . > > . > > . > > Rest of code > > .l > > . > > . > > > > Code of app 2: > > > class SimpleSwitch(app_manager.RyuApp): > OFP_VERSIONS = [ofproto_v1_3.OFP_VERSION] > _CONTEXTS = { > 'dpset': dpset.DPSet > } > > _EVENTS = [tenantEvent.EventTenantHostAdd] > > def __init__(self, *args, **kwargs): > super(SimpleSwitch, self).__init__(*args, **kwargs) > self.mac_to_port = {} > self.arp_cache = {} > self.arp_info = {} > self.dpset = kwargs['dpset'] > > . > > . > > . > > code > > . > > . > > > @set_ev_cls(pointEvent.EventEntryPoint) > def data_switch_handler(self, dpid): > value.append(dpid) > self.logger.info("An Entry Point has been added") > > > > Thank you, > > > > Felipe Rodriguez > > -- IWAMOTO Toshihiro
_______________________________________________ Ryu-devel mailing list Ryu-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ryu-devel