diff options
author | Shaun Crampton <Shaun.Crampton@metaswitch.com> | 2013-06-01 21:47:20 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2013-06-02 20:12:49 +0900 |
commit | 144eca05b058db17de79d366946f2224193652e7 (patch) | |
tree | 32b66db5d2ab2ec61179540cd15bbc5be79d43b6 | |
parent | d7d4d8c1b5bfb6715e6b55fd4aacd059a4441fcf (diff) |
of1.3: various fixes
- OFPActionSetField
- OFPBucket parser
- OFPMeterBandStats
Signed-off-by: Shaun Crampton <Shaun.Crampton@metaswitch.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | ryu/ofproto/ofproto_v1_3_parser.py | 11 |
1 files 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 |