diff options
author | IWASE Yusuke <iwase.yusuke0@gmail.com> | 2014-09-30 10:53:45 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-09-30 10:53:45 +0900 |
commit | 223dab9afe6c6eb8267512002ab10c9cce9baf22 (patch) | |
tree | d376d6722b60fe809432f6928a673ce3fcbeb422 | |
parent | 8f07bb29a96fa6d473212e185376365b5087a7c2 (diff) |
of: Fix name of class member variables
Fix name of class member variables in OFPMeterFeaturesStats
to reflect OpenFlow Specification.
Accordingly, fix json pattern files for unit tests.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
4 files changed, 8 insertions, 8 deletions
diff --git a/ryu/ofproto/ofproto_v1_3_parser.py b/ryu/ofproto/ofproto_v1_3_parser.py index 3c33556a..b4a1b7cc 100644 --- a/ryu/ofproto/ofproto_v1_3_parser.py +++ b/ryu/ofproto/ofproto_v1_3_parser.py @@ -4732,7 +4732,7 @@ class OFPMeterConfigStatsReply(OFPMultipartReply): class OFPMeterFeaturesStats(ofproto_parser.namedtuple('OFPMeterFeaturesStats', ('max_meter', 'band_types', 'capabilities', - 'max_band', 'max_color'))): + 'max_bands', 'max_color'))): @classmethod def parser(cls, buf, offset): meter_features = struct.unpack_from( @@ -4792,10 +4792,10 @@ class OFPMeterFeaturesStatsReply(OFPMultipartReply): features = [] for stat in ev.msg.body: features.append('max_meter=%d band_types=0x%08x ' - 'capabilities=0x%08x max_band=%d ' + 'capabilities=0x%08x max_bands=%d ' 'max_color=%d' % (stat.max_meter, stat.band_types, - stat.capabilities, stat.max_band, + stat.capabilities, stat.max_bands, stat.max_color)) self.logger.debug('MeterFeaturesStats: %s', configs) """ diff --git a/ryu/ofproto/ofproto_v1_4_parser.py b/ryu/ofproto/ofproto_v1_4_parser.py index babbcd64..b6432b3b 100644 --- a/ryu/ofproto/ofproto_v1_4_parser.py +++ b/ryu/ofproto/ofproto_v1_4_parser.py @@ -3347,7 +3347,7 @@ class OFPMeterConfigStatsReply(OFPMultipartReply): class OFPMeterFeaturesStats(ofproto_parser.namedtuple('OFPMeterFeaturesStats', ('max_meter', 'band_types', 'capabilities', - 'max_band', 'max_color'))): + 'max_bands', 'max_color'))): @classmethod def parser(cls, buf, offset): meter_features = struct.unpack_from( @@ -3407,10 +3407,10 @@ class OFPMeterFeaturesStatsReply(OFPMultipartReply): features = [] for stat in ev.msg.body: features.append('max_meter=%d band_types=0x%08x ' - 'capabilities=0x%08x max_band=%d ' + 'capabilities=0x%08x max_bands=%d ' 'max_color=%d' % (stat.max_meter, stat.band_types, - stat.capabilities, stat.max_band, + stat.capabilities, stat.max_bands, stat.max_color)) self.logger.debug('MeterFeaturesStats: %s', configs) """ diff --git a/ryu/tests/unit/ofproto/json/of13/4-52-ofp_meter_features_reply.packet.json b/ryu/tests/unit/ofproto/json/of13/4-52-ofp_meter_features_reply.packet.json index 4c101575..e3f6918f 100644 --- a/ryu/tests/unit/ofproto/json/of13/4-52-ofp_meter_features_reply.packet.json +++ b/ryu/tests/unit/ofproto/json/of13/4-52-ofp_meter_features_reply.packet.json @@ -5,7 +5,7 @@ "OFPMeterFeaturesStats": { "band_types": 2147483654, "capabilities": 15, - "max_band": 255, + "max_bands": 255, "max_color": 0, "max_meter": 16777216 } diff --git a/ryu/tests/unit/ofproto/json/of14/5-50-ofp_meter_features_reply.packet.json b/ryu/tests/unit/ofproto/json/of14/5-50-ofp_meter_features_reply.packet.json index 4c101575..e3f6918f 100644 --- a/ryu/tests/unit/ofproto/json/of14/5-50-ofp_meter_features_reply.packet.json +++ b/ryu/tests/unit/ofproto/json/of14/5-50-ofp_meter_features_reply.packet.json @@ -5,7 +5,7 @@ "OFPMeterFeaturesStats": { "band_types": 2147483654, "capabilities": 15, - "max_band": 255, + "max_bands": 255, "max_color": 0, "max_meter": 16777216 } |