]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
NetApp fix for compression and dedup stats
authorNavneet Singh <singn@netapp.com>
Sat, 19 Oct 2013 13:21:01 +0000 (18:51 +0530)
committerNavneet Singh <singn@netapp.com>
Sat, 19 Oct 2013 13:26:27 +0000 (18:56 +0530)
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
cinder/volume/drivers/netapp/nfs.py
cinder/volume/drivers/netapp/ssc_utils.py

index ccd318dcfe1bd2b8110bdbdc2bca9623c26a72a7..90384896f6fc782d6efa66779a659f55f89c80be 100644 (file)
@@ -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'])\
index bde0f6c1608fa3c431988213ca8bb32479fa3fa5..03cc3b69a89c66bb4f51b04bc7db38e1933f088b 100644 (file)
@@ -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'
index 5e53221d92d30b50b8fe2dc228eca81091b36847..8ba6567ae13d4bfaffb9dc09e48752661ada0cc1 100644 (file)
@@ -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 = {}