From 2bb9d6b0a92d0aea8ca419146f3719b90a44965e Mon Sep 17 00:00:00 2001 From: Qian Gao Date: Wed, 17 Jun 2015 22:57:02 -0700 Subject: [PATCH] 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 --- .../drivers/ibm/storwize_svc/helpers.py | 21 ------------------- 1 file changed, 21 deletions(-) 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 -- 2.45.2