From: Qian Gao Date: Thu, 18 Jun 2015 05:57:02 +0000 (-0700) Subject: Storwize: remove the useless method check_copy_ok X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=2bb9d6b0a92d0aea8ca419146f3719b90a44965e;p=openstack-build%2Fcinder-build.git Storwize: remove the useless method check_copy_ok 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 --- diff --git a/cinder/volume/drivers/ibm/storwize_svc/helpers.py b/cinder/volume/drivers/ibm/storwize_svc/helpers.py index f24875b5a..f684f4dda 100644 --- a/cinder/volume/drivers/ibm/storwize_svc/helpers.py +++ b/cinder/volume/drivers/ibm/storwize_svc/helpers.py @@ -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