On Tue, 30 Sep 2014 10:27:08 +0900
Yusuke Iwase <[email protected]> wrote:

>>From 576e26e778964b381f538ed1ed88fc3bbe143061 Mon Sep 17 00:00:00 2001
> From: IWASE Yusuke <[email protected]>
> Date: Fri, 19 Sep 2014 14:51:47 +0900
> Subject: [PATCH] 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 <[email protected]>
> ---
>  ryu/ofproto/ofproto_v1_3_parser.py                                  | 6 
> +++---
>  ryu/ofproto/ofproto_v1_4_parser.py                                  | 6 
> +++---
>  .../ofproto/json/of13/4-52-ofp_meter_features_reply.packet.json     | 2 +-
>  .../ofproto/json/of14/5-50-ofp_meter_features_reply.packet.json     | 2 +-
>  4 files changed, 8 insertions(+), 8 deletions(-)

Applied, thanks!


> diff --git a/ryu/ofproto/ofproto_v1_3_parser.py 
> b/ryu/ofproto/ofproto_v1_3_parser.py
> index 3c33556..b4a1b7c 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 babbcd6..b6432b3 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 4c10157..e3f6918 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 4c10157..e3f6918 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
>              }
> -- 
> 1.9.1
> 

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to