Signed-off-by: YAMAMOTO Takashi <[email protected]>
---
ryu/ofproto/ofproto_v1_2_parser.py | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/ryu/ofproto/ofproto_v1_2_parser.py
b/ryu/ofproto/ofproto_v1_2_parser.py
index bccecc0..6d5a805 100644
--- a/ryu/ofproto/ofproto_v1_2_parser.py
+++ b/ryu/ofproto/ofproto_v1_2_parser.py
@@ -1062,7 +1062,7 @@ class OFPStatsReply(MsgBase):
while offset < msg_len:
r = stats_type_cls.parser(msg.buf, offset)
body.append(r)
- offset += r._length
+ offset += r.length
if stats_type_cls.cls_body_single_struct:
msg.body = body[0]
@@ -1089,7 +1089,7 @@ class
OFPDescStats(ofproto_parser.namedtuple('OFPDescStats', (
desc = struct.unpack_from(ofproto_v1_2.OFP_DESC_STATS_PACK_STR,
buf, offset)
stats = cls(*desc)
- stats._length = ofproto_v1_2.OFP_DESC_STATS_SIZE
+ stats.length = ofproto_v1_2.OFP_DESC_STATS_SIZE
return stats
@@ -1124,7 +1124,7 @@ class OFPFlowStatsRequest(OFPStatsRequest):
class OFPFlowStats(StringifyMixin):
def __init__(self, table_id, duration_sec, duration_nsec,
priority, idle_timeout, hard_timeout, cookie, packet_count,
- byte_count, match, instructions=None):
+ byte_count, match, instructions=None, length=None):
super(OFPFlowStats, self).__init__()
self.table_id = table_id
self.duration_sec = duration_sec
@@ -1164,7 +1164,7 @@ class OFPFlowStats(StringifyMixin):
o = cls(table_id, duration_sec, duration_nsec, priority,
idle_timeout, hard_timeout, cookie, packet_count,
byte_count, match, instructions)
- o._length = length
+ o.length = length
return o
@@ -1207,7 +1207,7 @@ class
OFPAggregateStatsReply(ofproto_parser.namedtuple('OFPAggregateStats', (
ofproto_v1_2.OFP_AGGREGATE_STATS_REPLY_PACK_STR,
buf, offset)
stats = cls(*desc)
- stats._length = ofproto_v1_2.OFP_AGGREGATE_STATS_REPLY_SIZE
+ stats.length = ofproto_v1_2.OFP_AGGREGATE_STATS_REPLY_SIZE
return stats
@@ -1235,7 +1235,7 @@ class OFPTableStats(
ofproto_v1_2.OFP_TABLE_STATS_PACK_STR,
buf, offset)
stats = cls(*table)
- stats._length = ofproto_v1_2.OFP_TABLE_STATS_SIZE
+ stats.length = ofproto_v1_2.OFP_TABLE_STATS_SIZE
return stats
@@ -1267,7 +1267,7 @@ class OFPPortStats(
port = struct.unpack_from(ofproto_v1_2.OFP_PORT_STATS_PACK_STR,
buf, offset)
stats = cls(*port)
- stats._length = ofproto_v1_2.OFP_PORT_STATS_SIZE
+ stats.length = ofproto_v1_2.OFP_PORT_STATS_SIZE
return stats
@@ -1296,7 +1296,7 @@ class OFPQueueStats(
queue = struct.unpack_from(ofproto_v1_2.OFP_QUEUE_STATS_PACK_STR,
buf, offset)
stats = cls(*queue)
- stats._length = ofproto_v1_2.OFP_QUEUE_STATS_SIZE
+ stats.length = ofproto_v1_2.OFP_QUEUE_STATS_SIZE
return stats
@@ -1356,7 +1356,7 @@ class OFPGroupStats(StringifyMixin):
o = cls(group_id, ref_count, packet_count,
byte_count, bucket_counters)
- o._length = length
+ o.length = length
return o
@@ -1371,7 +1371,7 @@ class OFPGroupDescStatsRequest(OFPStatsRequest):
@OFPStatsReply.register_stats_reply_type(ofproto_v1_2.OFPST_GROUP_DESC)
class OFPGroupDescStats(StringifyMixin):
- def __init__(self, type_, group_id, buckets):
+ def __init__(self, type_, group_id, buckets, length=None):
self.type = type_
self.group_id = group_id
self.buckets = buckets
@@ -1392,7 +1392,7 @@ class OFPGroupDescStats(StringifyMixin):
bucket_len -= bucket.len
o = cls(type_, group_id, buckets)
- o._length = length
+ o.length = length
return o
@@ -1408,7 +1408,7 @@ class OFPGroupFeaturesStatsRequest(OFPStatsRequest):
@OFPStatsReply.register_stats_reply_type(ofproto_v1_2.OFPST_GROUP_FEATURES,
body_single_struct=True)
class OFPGroupFeaturesStats(StringifyMixin):
- def __init__(self, types, capabilities, max_groups, actions):
+ def __init__(self, types, capabilities, max_groups, actions, length=None):
self.types = types
self.capabilities = capabilities
self.max_groups = max_groups
@@ -1424,7 +1424,7 @@ class OFPGroupFeaturesStats(StringifyMixin):
actions = list(stats[6:10])
o = cls(types, capabilities, max_groups, actions)
- o._length = ofproto_v1_2.OFP_GROUP_FEATURES_STATS_SIZE
+ o.length = ofproto_v1_2.OFP_GROUP_FEATURES_STATS_SIZE
return o
--
1.8.3.1
------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance Management.
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel