Looks good.
Reviewed-by: Isaku Yamahata <[email protected]>

After I reconsider on vendor and subtype, they can be class member and I suppose
the code can be simplified a bit.
Anyway it can be addressed as separated clean up after this patch series.

thanks,

On Sun, May 20, 2012 at 10:42:13AM +0900, FUJITA Tomonori wrote:
> We use NXTRequest for Switch-to-Controller messages so let's rename it
> to an appropriate name.
> 
> Signed-off-by: FUJITA Tomonori <[email protected]>
> ---
>  ryu/ofproto/ofproto_v1_0_parser.py |   14 +++++++-------
>  1 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/ryu/ofproto/ofproto_v1_0_parser.py 
> b/ryu/ofproto/ofproto_v1_0_parser.py
> index efff7e5..eb291b2 100644
> --- a/ryu/ofproto/ofproto_v1_0_parser.py
> +++ b/ryu/ofproto/ofproto_v1_0_parser.py
> @@ -1006,20 +1006,20 @@ class OFPVendor(MsgBase):
>          self.buf += self.data
>  
>  
> -class NXTRequest(OFPVendor):
> +class NiciraHeader(OFPVendor):
>      def __init__(self, datapath, subtype):
> -        super(NXTRequest, self).__init__(datapath)
> +        super(NiciraHeader, self).__init__(datapath)
>          self.vendor = ofproto_v1_0.NX_VENDOR_ID
>          self.subtype = subtype
>  
>      def serialize_header(self):
> -        super(NXTRequest, self).serialize_header()
> +        super(NiciraHeader, self).serialize_header()
>          msg_pack_into(ofproto_v1_0.NICIRA_HEADER_PACK_STR,
>                        self.buf, ofproto_v1_0.OFP_HEADER_SIZE,
>                        self.vendor, self.subtype)
>  
>  
> -class NXTSetFlowFormat(NXTRequest):
> +class NXTSetFlowFormat(NiciraHeader):
>      def __init__(self, datapath, flow_format):
>          super(NXTSetFlowFormat, self).__init__(
>              datapath, ofproto_v1_0.NXT_SET_FLOW_FORMAT)
> @@ -1031,7 +1031,7 @@ class NXTSetFlowFormat(NXTRequest):
>                        self.buf, ofproto_v1_0.NICIRA_HEADER_SIZE, self.format)
>  
>  
> -class NXTFlowMod(NXTRequest):
> +class NXTFlowMod(NiciraHeader):
>      def __init__(self, datapath, cookie, command,
>                   idle_timeout=0, hard_timeout=0,
>                   priority=ofproto_v1_0.OFP_DEFAULT_PRIORITY,
> @@ -1077,7 +1077,7 @@ class NXTFlowMod(NXTRequest):
>                  offset += a.len
>  
>  
> -class NXTRoleRequest(NXTRequest):
> +class NXTRoleRequest(NiciraHeader):
>      def __init__(self, datapath, role):
>          super(NXTRoleRequest, self).__init__(
>              datapath, ofproto_v1_0.NXT_ROLE_REQUEST)
> @@ -1089,7 +1089,7 @@ class NXTRoleRequest(NXTRequest):
>                        self.buf, ofproto_v1_0.NICIRA_HEADER_SIZE, self.role)
>  
>  
> -class NXTFlowModTableId(NXTRequest):
> +class NXTFlowModTableId(NiciraHeader):
>      def __init__(self, datapath, set_):
>          super(NXTFlowModTableId, self).__init__(
>              datapath, ofproto_v1_0.NXT_FLOW_MOD_TABLE_ID)
> -- 
> 1.7.4.4
> 
> 
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. Discussions 
> will include endpoint security, mobile security and the latest in malware 
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Ryu-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ryu-devel
> 

-- 
yamahata

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to