From 839a32ee04345da1b832ad5659ad2df330f7aca0 Mon Sep 17 00:00:00 2001 From: Alex O'Rourke Date: Thu, 14 Jan 2016 10:50:16 -0800 Subject: [PATCH] Remove old client version checks from 3PAR driver The minimum required 3PAR client version has been bumped from 4.0.0 to 4.1.0. There are a few checks that look for a version between these that can be removed. DocImpact Change-Id: I13796bc880cd2f71dcce934274b810027cbb39b6 --- cinder/volume/drivers/hpe/hpe_3par_common.py | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/cinder/volume/drivers/hpe/hpe_3par_common.py b/cinder/volume/drivers/hpe/hpe_3par_common.py index 5892ddef0..0ee1ec77f 100644 --- a/cinder/volume/drivers/hpe/hpe_3par_common.py +++ b/cinder/volume/drivers/hpe/hpe_3par_common.py @@ -72,7 +72,6 @@ from taskflow.patterns import linear_flow LOG = logging.getLogger(__name__) MIN_CLIENT_VERSION = '4.1.0' -MIN_REP_CLIENT_VERSION = '4.0.2' DEDUP_API_VERSION = 30201120 FLASH_CACHE_API_VERSION = 30201200 SRSTATLD_API_VERSION = 30201200 @@ -225,10 +224,11 @@ class HPE3PARCommon(object): 3.0.9 - Bump minimum API version for volume replication 3.0.10 - Added additional volumes checks to the manage snapshot API 3.0.11 - Fix the image cache capability bug #1491088 + 3.0.12 - Remove client version checks for replication """ - VERSION = "3.0.11" + VERSION = "3.0.12" stats = {} @@ -305,12 +305,7 @@ class HPE3PARCommon(object): def _create_client(self, timeout=None): hpe3par_api_url = self._client_conf['hpe3par_api_url'] - # Timeout is only supported in version 4.0.2 and greater of the - # python-3parclient. - if hpe3parclient.version >= MIN_REP_CLIENT_VERSION: - cl = client.HPE3ParClient(hpe3par_api_url, timeout=timeout) - else: - cl = client.HPE3ParClient(hpe3par_api_url) + cl = client.HPE3ParClient(hpe3par_api_url, timeout=timeout) client_version = hpe3parclient.version if client_version < MIN_CLIENT_VERSION: @@ -416,8 +411,7 @@ class HPE3PARCommon(object): except hpeexceptions.UnsupportedVersion as ex: # In the event we cannot contact the configured primary array, # we want to allow a failover if replication is enabled. - if hpe3parclient.version >= MIN_REP_CLIENT_VERSION: - self._do_replication_setup() + self._do_replication_setup() if self._replication_enabled: self.client = None raise exception.InvalidInput(ex) @@ -1294,8 +1288,7 @@ class HPE3PARCommon(object): 'consistencygroup_support': True, } - if (hpe3parclient.version >= MIN_REP_CLIENT_VERSION - and remotecopy_support): + if remotecopy_support: pool['replication_enabled'] = self._replication_enabled pool['replication_type'] = ['sync', 'periodic'] pool['replication_count'] = len(self._replication_targets) @@ -3155,8 +3148,7 @@ class HPE3PARCommon(object): return ret_mode def _get_3par_config(self, volume): - if hpe3parclient.version >= MIN_REP_CLIENT_VERSION: - self._do_replication_setup() + self._do_replication_setup() conf = None if self._replication_enabled and volume: provider_location = volume.get('provider_location') -- 2.45.2