Hi All,
I use the ofctl_rest.py to use the service. I get stuck in that how can I send
out events to other modules.'
For example, suppose when I visit /stats/switches to get a list of switches, I
want to send some events to another running RYU module (assume ryu_app1.py)
before generate a web HTTPResponse.
class StatsController(ControllerBase):
def __init__(self, req, link, data, **config):
super(StatsController, self).__init__(req, link, data, **config)
self.dpset = data['dpset']
self.waiters = data['waiters']
#### Get the list of all switches
def get_dpids(self, req, **_kwargs):
dps = self.dpset.dps.keys()
body = json.dumps(dps)
--build ryu events and send to ryu_app1.py observer--
return (Response(content_type='application/json', body=body))
I have no problem to build custom events but I have no clues on how to send it
out. The example uses self.send_request(ev), but that requires the class
inherits from RYUapp.manager and do not work in this case.
Any suggestions?
Thanks.
Weiyang
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel