Skip to content

Commit

Permalink
Merge branch 'master' into release/2022.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
viniarck committed Aug 11, 2022
2 parents ccae50d + 00c642c commit 1922785
Show file tree
Hide file tree
Showing 3 changed files with 564 additions and 23 deletions.
12 changes: 10 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,16 +512,24 @@ def flows_counters(self, field, dpid, counter=None, rate=None,
return jsonify(count_flows)

@listen_to('kytos/of_core.v0x01.messages.in.ofpt_stats_reply')
def on_stats_reply_0x01(self, event):
"""Capture flow stats messages for v0x01 switches."""
self.handle_stats_reply_0x01(event)

def handle_stats_reply_0x01(self, event):
"""Capture flow stats messages for OpenFlow 1.0."""
"""Handle stats replies for v0x01 switches."""
msg = event.content['message']
if msg.body_type == common01.StatsType.OFPST_FLOW:
switch = event.source.switch
self.handle_stats_reply(msg, switch)

@listen_to('kytos/of_core.v0x04.messages.in.ofpt_multipart_reply')
def handle_stats_reply_0x04(self, event):
def on_stats_reply_0x04(self, event):
"""Capture flow stats messages for OpenFlow 1.3."""
self.handle_stats_reply_0x04(event)

def handle_stats_reply_0x04(self, event):
"""Handle flow stats messages for OpenFlow 1.3."""
msg = event.content['message']
if msg.multipart_type == common04.MultipartType.OFPMP_FLOW:
switch = event.source.switch
Expand Down
Loading

0 comments on commit 1922785

Please sign in to comment.