From 11034b999781b1182d80bbf0d521f7698ba4aed6 Mon Sep 17 00:00:00 2001 From: Gorka Eguileor Date: Tue, 26 May 2020 16:17:49 +0200 Subject: [PATCH] 3PAR: Set the right minimum client version The 3PAR driver currently has a mismatch between the minimum version reported in the driver-requirements.txt file and cinder/volume/drivers/hpe/hpe_3par_common.py. Currently the minimum version enforced by the code is 4.2.0, but that is not correct for the iSCSI driver, since it's using the "is_primera_array" method which was first included on 4.2.10 [1]. This patch updates the driver-requirements file to match the minimum version for iSCSI, and also enforces version 4.2.10 for both drivers, iSCSI and FC, for simplicity's sake. [1]: https://github.com/hpe-storage/python-3parclient/commit/aad552214254c89d8e793a1270a94430d1ae961a Change-Id: I6698e4d6cba617413d9c53c5381ff748f64e21b4 --- cinder/tests/unit/volume/drivers/hpe/fake_hpe_3par_client.py | 2 +- cinder/tests/unit/volume/drivers/hpe/test_hpe3par.py | 1 - cinder/volume/drivers/hpe/hpe_3par_common.py | 2 +- driver-requirements.txt | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/cinder/tests/unit/volume/drivers/hpe/fake_hpe_3par_client.py b/cinder/tests/unit/volume/drivers/hpe/fake_hpe_3par_client.py index 52aa6a9ae34..6a246993aa0 100644 --- a/cinder/tests/unit/volume/drivers/hpe/fake_hpe_3par_client.py +++ b/cinder/tests/unit/volume/drivers/hpe/fake_hpe_3par_client.py @@ -22,7 +22,7 @@ from cinder.tests.unit.volume.drivers.hpe \ import fake_hpe_client_exceptions as hpeexceptions hpe3par = mock.Mock() -hpe3par.version = "4.2.0" +hpe3par.version = "4.2.10" hpe3par.exceptions = hpeexceptions sys.modules['hpe3parclient'] = hpe3par diff --git a/cinder/tests/unit/volume/drivers/hpe/test_hpe3par.py b/cinder/tests/unit/volume/drivers/hpe/test_hpe3par.py index 127aedb069a..1cc891be539 100644 --- a/cinder/tests/unit/volume/drivers/hpe/test_hpe3par.py +++ b/cinder/tests/unit/volume/drivers/hpe/test_hpe3par.py @@ -7122,7 +7122,6 @@ class TestHPE3PARDriverBase(HPE3PARBaseDriver): @ddt.ddt class TestHPE3PARFCDriver(HPE3PARBaseDriver): - properties = { 'driver_volume_type': 'fibre_channel', 'data': { diff --git a/cinder/volume/drivers/hpe/hpe_3par_common.py b/cinder/volume/drivers/hpe/hpe_3par_common.py index b65902705de..88fc640b23f 100644 --- a/cinder/volume/drivers/hpe/hpe_3par_common.py +++ b/cinder/volume/drivers/hpe/hpe_3par_common.py @@ -75,7 +75,7 @@ except ImportError: LOG = logging.getLogger(__name__) -MIN_CLIENT_VERSION = '4.2.0' +MIN_CLIENT_VERSION = '4.2.10' DEDUP_API_VERSION = 30201120 FLASH_CACHE_API_VERSION = 30201200 COMPRESSION_API_VERSION = 30301215 diff --git a/driver-requirements.txt b/driver-requirements.txt index 7b568f8f485..2330f305bb9 100644 --- a/driver-requirements.txt +++ b/driver-requirements.txt @@ -3,7 +3,7 @@ # requirements tools. # HPE 3PAR -python-3parclient>=4.1.0 # Apache-2.0 +python-3parclient>=4.2.10 # Apache-2.0 # Kaminario krest>=1.3.0 # Apache-2.0