From 592d860481e04312448d9ae0338066bd475fad7e Mon Sep 17 00:00:00 2001 From: Navneet Singh Date: Sat, 19 Oct 2013 18:51:01 +0530 Subject: [PATCH] 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 --- cinder/volume/drivers/netapp/iscsi.py | 2 +- cinder/volume/drivers/netapp/nfs.py | 2 +- cinder/volume/drivers/netapp/ssc_utils.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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 = {} -- 2.45.2