]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Storwize: remove the useless method check_copy_ok
authorQian Gao <gaoqian1983@outlook.com>
Thu, 18 Jun 2015 05:57:02 +0000 (22:57 -0700)
committerQian Gao <gaoqian1983@outlook.com>
Thu, 18 Jun 2015 05:57:02 +0000 (22:57 -0700)
The method check_copy_ok still remains after the code refactor.
However, it is never used. This patch proposes to remove it.

Change-Id: I7cb8611fe242300d28d90520ec3c2867385f9fec
Closes-Bug: #1466321

cinder/volume/drivers/ibm/storwize_svc/helpers.py

index f24875b5a127f4df14395439acacb93a092443da..f684f4dda52d891bf8101cb9a0da7bf896cc795c 100644 (file)
@@ -676,27 +676,6 @@ class StorwizeHelpers(object):
                 copies['secondary'] = copy
         return copies
 
-    def check_copy_ok(self, vdisk, pool, copy_type):
-        try:
-            copy_id = self.find_vdisk_copy_id(vdisk, pool)
-            attrs = self.get_vdisk_copy_attrs(vdisk, copy_id)
-        except (exception.VolumeBackendAPIException,
-                exception.VolumeDriverException):
-            extended = ('No %(type)s copy in pool %(pool)s' %
-                        {'type': copy_type, 'pool': pool})
-            return ('error', extended)
-        if attrs['status'] != 'online':
-            extended = 'The %s copy is offline' % copy_type
-            return ('error', extended)
-        if copy_type == 'secondary':
-            if attrs['sync'] == 'yes':
-                return ('active', None)
-            else:
-                progress_info = self.ssh.lsvdisksyncprogress(vdisk, copy_id)
-                extended = 'progress: %s%%' % progress_info['progress']
-                return ('copying', extended)
-        return (None, None)
-
     def _prepare_fc_map(self, fc_map_id, timeout):
         self.ssh.prestartfcmap(fc_map_id)
         mapping_ready = False