From: Navneet Singh Date: Sat, 19 Oct 2013 13:21:01 +0000 (+0530) Subject: NetApp fix for compression and dedup stats X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=592d860481e04312448d9ae0338066bd475fad7e;p=openstack-build%2Fcinder-build.git NetApp fix for compression and dedup stats This change fixes the incorrect stats reported for compression and deduplication by NetApp iscsi and nfs backend. Change-Id: I3e97d953b3ea2231c3eb1f950b0ca6705b3b2286 Closes-Bug:#1236839 --- diff --git a/cinder/volume/drivers/netapp/iscsi.py b/cinder/volume/drivers/netapp/iscsi.py index ccd318dcf..90384896f 100644 --- a/cinder/volume/drivers/netapp/iscsi.py +++ b/cinder/volume/drivers/netapp/iscsi.py @@ -1067,7 +1067,7 @@ class NetAppDirectCmodeISCSIDriver(NetAppDirectISCSIDriver): if len(self.ssc_vols['all']) > len(self.ssc_vols['dedup'])\ else 'false' data['netapp_compression'] = 'true'\ - if self.ssc_vols['compression'] else False + if self.ssc_vols['compression'] else 'false' data['netapp_nocompression'] = 'true'\ if len(self.ssc_vols['all']) >\ len(self.ssc_vols['compression'])\ diff --git a/cinder/volume/drivers/netapp/nfs.py b/cinder/volume/drivers/netapp/nfs.py index bde0f6c16..03cc3b69a 100644 --- a/cinder/volume/drivers/netapp/nfs.py +++ b/cinder/volume/drivers/netapp/nfs.py @@ -893,7 +893,7 @@ class NetAppDirectCmodeNfsDriver (NetAppDirectNfsDriver): if len(self.ssc_vols['all']) >\ len(self.ssc_vols['dedup']) else 'false' data['netapp_compression'] = 'true'\ - if self.ssc_vols['compression'] else False + if self.ssc_vols['compression'] else 'false' data['netapp_nocompression'] = 'true'\ if len(self.ssc_vols['all']) >\ len(self.ssc_vols['compression']) else 'false' diff --git a/cinder/volume/drivers/netapp/ssc_utils.py b/cinder/volume/drivers/netapp/ssc_utils.py index 5e53221d9..8ba6567ae 100644 --- a/cinder/volume/drivers/netapp/ssc_utils.py +++ b/cinder/volume/drivers/netapp/ssc_utils.py @@ -293,7 +293,7 @@ def get_sis_vol_dict(na_server, vserver, volume=None): path = sis.get_child_content('path') if not path: continue - (vol, __, ___) = path.rpartition('/') + (___, __, vol) = path.rpartition('/') if not vol: continue v_sis = {}