Use the OFPTableStatsRequest object. It will return a list with all the installed flows.
Note there is also an OFPGroupStatsRequest that does the same thing for groups.
An untested example that relies on an instance variable datapath.
import ryu.app.ofctl.api as api
def ofdpaTableStatsRequest(datapath):
parser = datapath.ofproto_parser
return parser.OFPTableStatsRequest(datapath)
def getFlows(self):
"""
Obtain a list of Flows loaded on the switch
`
:return: A list of Flow Entires
"""
msg = ofdpaTableStatsRequest(self.datapath)
reply = api.send_msg(self.ryuapp, msg,
reply_cls=self.parser.OFPTableStatsReply,
reply_multi=True)
// the flow entries you are looking for will be in the reply
Let me know if this works for you