From 144eca05b058db17de79d366946f2224193652e7 Mon Sep 17 00:00:00 2001 From: Shaun Crampton Date: Sat, 1 Jun 2013 21:47:20 +0900 Subject: of1.3: various fixes - OFPActionSetField - OFPBucket parser - OFPMeterBandStats Signed-off-by: Shaun Crampton Signed-off-by: FUJITA Tomonori --- ryu/ofproto/ofproto_v1_3_parser.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/ryu/ofproto/ofproto_v1_3_parser.py b/ryu/ofproto/ofproto_v1_3_parser.py index 80a777da..524994d3 100644 --- a/ryu/ofproto/ofproto_v1_3_parser.py +++ b/ryu/ofproto/ofproto_v1_3_parser.py @@ -1832,7 +1832,7 @@ class OFPActionPopMpls(OFPAction): class OFPActionSetField(OFPAction): def __init__(self, field): super(OFPActionSetField, self).__init__() - set.field = field + self.field = field @classmethod def parser(cls, buf, offset): @@ -1884,13 +1884,12 @@ class OFPBucket(object): @classmethod def parser(cls, buf, offset): - (msg.len, msg.weigth, msg.watch_port, - msg.watch_group) = struct.unpack_from( - ofproto_v1_3.OFP_BUCKET_PACK_STR, buf, offset) + (len_, weigth, watch_port, watch_group) = struct.unpack_from( + ofproto_v1_3.OFP_BUCKET_PACK_STR, buf, offset) + msg = cls(len_, weight, watch_port, watch_group, []) length = ofproto_v1_3.OFP_BUCKET_SIZE offset += ofproto_v1_3.OFP_BUCKET_SIZE - msg.actions = [] while length < msg.len: action = OFPAction.parser(buf, offset) msg.actions.append(action) @@ -2402,7 +2401,7 @@ class OFPGroupFeaturesStatsReply(OFPMultipartReply): class OFPMeterBandStats(object): def __init__(self, packet_band_count, byte_band_count): super(OFPMeterBandStats, self).__init__() - self.packet_band_count = packet_bound_count + self.packet_band_count = packet_band_count self.byte_band_count = byte_band_count @classmethod -- cgit v1.2.3