Sorry for my misunderstanding.

Short example:

$ cat << EOF > my_app1.py
# -*- coding: utf-8 -*-

from ryu.base import app_manager
from ryu.controller.handler import MAIN_DISPATCHER
from ryu.controller.handler import set_ev_cls
from ryu.controller import ofp_event


class App1(app_manager.RyuApp):

    @set_ev_cls(ofp_event.EventOFPPacketIn, MAIN_DISPATCHER)
    def _handler(self, ev):
        pass
EOF

$ cat << EOF > my_app2.py
# -*- coding: utf-8 -*-

from ryu.base import app_manager
from ryu.controller.handler import MAIN_DISPATCHER
from ryu.controller.handler import set_ev_cls
from ryu.controller import ofp_event


class App2(app_manager.RyuApp):

    @set_ev_cls(ofp_event.EventOFPPacketIn, MAIN_DISPATCHER)
    def _handler(self, ev):
        pass
EOF

$ ryu-manager --verbose my_app1.py my_app2.py
loading app my_app1.py
loading app my_app2.py
loading app ryu.controller.ofp_handler
instantiating app my_app1.py of App1
instantiating app my_app2.py of App2
instantiating app ryu.controller.ofp_handler of OFPHandler
BRICK App2
  CONSUMES EventOFPPacketIn
BRICK App1
  CONSUMES EventOFPPacketIn
BRICK ofp_event
  PROVIDES EventOFPPacketIn TO {'App2': set(['main']), 'App1':
set(['main'])}
  CONSUMES EventOFPPortDescStatsReply
  CONSUMES EventOFPEchoRequest
  CONSUMES EventOFPHello
  CONSUMES EventOFPErrorMsg
  CONSUMES EventOFPSwitchFeatures


2015-06-23 17:04 GMT+09:00 Chaitanya Kumar <[email protected]>:

> Thanks, but that's not the case here.
> Both my apps exist in the current directory from where I am executing the
> ryu-manager.
> Yet, only one of them gets instantiated.
> Could someone cite two example scripts where apps are run simultaneously?
> Also, Can Ryu read ScaPy packets?
>
> On Tue, Jun 23, 2015 at 1:23 PM, Satoshi KOBAYASHI <
> [email protected]> wrote:
>
>> How about this?
>>
>> $ ryu-manager --verbose ryu.app.simple_switch my_app.py
>>
>> In my expectations, simple_switch is inside Ryu which is already
>> installed.
>>
>>
>> 2015-06-23 16:09 GMT+09:00 Chaitanya Kumar <[email protected]>:
>>
>>> Hi,
>>> I am facing some trouble with executing two Ryu apps together. One of
>>> them is the SimpleSwitch while the other is an app that I wrote using
>>> scapy, in order to sniff tls packets.
>>>
>>> After looking this up, I found a similar question asked here
>>> <http://sourceforge.net/p/ryu/mailman/message/29988398/>. Following
>>> this, I tried to execute *ryu-manager --verbose simple_switch.py
>>> my_app.py*, but only one of them (my_app.py) got instantiated, although
>>> it loaded both of them.
>>>
>>> Any suggestions as to what I may be missing? Is there something specific
>>> way I need to have my apps designed? If this information helps,
>>> *my_app.py* needs to install flows on the switch, depending on the tls
>>> packets it sniffs.
>>>
>>> Thanks,
>>> Chaitanya
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Monitor 25 network devices or servers for free with OpManager!
>>> OpManager is web-based network management software that monitors
>>> network devices and physical & virtual servers, alerts via email & sms
>>> for fault. Monitor 25 devices for free with no restriction. Download now
>>> http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
>>> _______________________________________________
>>> Ryu-devel mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/ryu-devel
>>>
>>>
>>
>>
>> --
>> Satoshi KOBAYASHI <[email protected]>
>>
>
>
>
> --
> Chaitanya
>



-- 
Satoshi KOBAYASHI <[email protected]>
------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors 
network devices and physical & virtual servers, alerts via email & sms 
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to